@@ -55,65 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5555 return this .unknownFields ;
5656 }
5757
58- private PublishChannelConnectionEventsRequest (
59- com .google .protobuf .CodedInputStream input ,
60- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
61- throws com .google .protobuf .InvalidProtocolBufferException {
62- this ();
63- if (extensionRegistry == null ) {
64- throw new java .lang .NullPointerException ();
65- }
66- int mutable_bitField0_ = 0 ;
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- channelConnection_ = s ;
82- break ;
83- }
84- case 18 :
85- {
86- if (!((mutable_bitField0_ & 0x00000001 ) != 0 )) {
87- events_ = new java .util .ArrayList <com .google .protobuf .Any >();
88- mutable_bitField0_ |= 0x00000001 ;
89- }
90- events_ .add (input .readMessage (com .google .protobuf .Any .parser (), extensionRegistry ));
91- break ;
92- }
93- default :
94- {
95- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
96- done = true ;
97- }
98- break ;
99- }
100- }
101- }
102- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
103- throw e .setUnfinishedMessage (this );
104- } catch (com .google .protobuf .UninitializedMessageException e ) {
105- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
106- } catch (java .io .IOException e ) {
107- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
108- } finally {
109- if (((mutable_bitField0_ & 0x00000001 ) != 0 )) {
110- events_ = java .util .Collections .unmodifiableList (events_ );
111- }
112- this .unknownFields = unknownFields .build ();
113- makeExtensionsImmutable ();
114- }
115- }
116-
11758 public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
11859 return com .google .cloud .eventarc .publishing .v1 .PublisherProto
11960 .internal_static_google_cloud_eventarc_publishing_v1_PublishChannelConnectionEventsRequest_descriptor ;
@@ -269,7 +210,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
269210 for (int i = 0 ; i < events_ .size (); i ++) {
270211 output .writeMessage (2 , events_ .get (i ));
271212 }
272- unknownFields .writeTo (output );
213+ getUnknownFields () .writeTo (output );
273214 }
274215
275216 @ java .lang .Override
@@ -284,7 +225,7 @@ public int getSerializedSize() {
284225 for (int i = 0 ; i < events_ .size (); i ++) {
285226 size += com .google .protobuf .CodedOutputStream .computeMessageSize (2 , events_ .get (i ));
286227 }
287- size += unknownFields .getSerializedSize ();
228+ size += getUnknownFields () .getSerializedSize ();
288229 memoizedSize = size ;
289230 return size ;
290231 }
@@ -303,7 +244,7 @@ public boolean equals(final java.lang.Object obj) {
303244
304245 if (!getChannelConnection ().equals (other .getChannelConnection ())) return false ;
305246 if (!getEventsList ().equals (other .getEventsList ())) return false ;
306- if (!unknownFields .equals (other .unknownFields )) return false ;
247+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
307248 return true ;
308249 }
309250
@@ -320,7 +261,7 @@ public int hashCode() {
320261 hash = (37 * hash ) + EVENTS_FIELD_NUMBER ;
321262 hash = (53 * hash ) + getEventsList ().hashCode ();
322263 }
323- hash = (29 * hash ) + unknownFields .hashCode ();
264+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
324265 memoizedHashCode = hash ;
325266 return hash ;
326267 }
@@ -458,19 +399,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
458399
459400 // Construct using
460401 // com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.newBuilder()
461- private Builder () {
462- maybeForceBuilderInitialization ();
463- }
402+ private Builder () {}
464403
465404 private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
466405 super (parent );
467- maybeForceBuilderInitialization ();
468- }
469-
470- private void maybeForceBuilderInitialization () {
471- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {
472- getEventsFieldBuilder ();
473- }
474406 }
475407
476408 @ java .lang .Override
@@ -480,10 +412,11 @@ public Builder clear() {
480412
481413 if (eventsBuilder_ == null ) {
482414 events_ = java .util .Collections .emptyList ();
483- bitField0_ = (bitField0_ & ~0x00000001 );
484415 } else {
416+ events_ = null ;
485417 eventsBuilder_ .clear ();
486418 }
419+ bitField0_ = (bitField0_ & ~0x00000001 );
487420 return this ;
488421 }
489422
@@ -612,7 +545,7 @@ public Builder mergeFrom(
612545 }
613546 }
614547 }
615- this .mergeUnknownFields (other .unknownFields );
548+ this .mergeUnknownFields (other .getUnknownFields () );
616549 onChanged ();
617550 return this ;
618551 }
@@ -627,20 +560,49 @@ public Builder mergeFrom(
627560 com .google .protobuf .CodedInputStream input ,
628561 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
629562 throws java .io .IOException {
630- com .google .cloud .eventarc .publishing .v1 .PublishChannelConnectionEventsRequest parsedMessage =
631- null ;
563+ if (extensionRegistry == null ) {
564+ throw new java .lang .NullPointerException ();
565+ }
632566 try {
633- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
567+ boolean done = false ;
568+ while (!done ) {
569+ int tag = input .readTag ();
570+ switch (tag ) {
571+ case 0 :
572+ done = true ;
573+ break ;
574+ case 10 :
575+ {
576+ channelConnection_ = input .readStringRequireUtf8 ();
577+
578+ break ;
579+ } // case 10
580+ case 18 :
581+ {
582+ com .google .protobuf .Any m =
583+ input .readMessage (com .google .protobuf .Any .parser (), extensionRegistry );
584+ if (eventsBuilder_ == null ) {
585+ ensureEventsIsMutable ();
586+ events_ .add (m );
587+ } else {
588+ eventsBuilder_ .addMessage (m );
589+ }
590+ break ;
591+ } // case 18
592+ default :
593+ {
594+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
595+ done = true ; // was an endgroup tag
596+ }
597+ break ;
598+ } // default:
599+ } // switch (tag)
600+ } // while (!done)
634601 } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
635- parsedMessage =
636- (com .google .cloud .eventarc .publishing .v1 .PublishChannelConnectionEventsRequest )
637- e .getUnfinishedMessage ();
638602 throw e .unwrapIOException ();
639603 } finally {
640- if (parsedMessage != null ) {
641- mergeFrom (parsedMessage );
642- }
643- }
604+ onChanged ();
605+ } // finally
644606 return this ;
645607 }
646608
@@ -1134,7 +1096,18 @@ public PublishChannelConnectionEventsRequest parsePartialFrom(
11341096 com .google .protobuf .CodedInputStream input ,
11351097 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
11361098 throws com .google .protobuf .InvalidProtocolBufferException {
1137- return new PublishChannelConnectionEventsRequest (input , extensionRegistry );
1099+ Builder builder = newBuilder ();
1100+ try {
1101+ builder .mergeFrom (input , extensionRegistry );
1102+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1103+ throw e .setUnfinishedMessage (builder .buildPartial ());
1104+ } catch (com .google .protobuf .UninitializedMessageException e ) {
1105+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
1106+ } catch (java .io .IOException e ) {
1107+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
1108+ .setUnfinishedMessage (builder .buildPartial ());
1109+ }
1110+ return builder .buildPartial ();
11381111 }
11391112 };
11401113
0 commit comments