@@ -54,82 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5454 return this .unknownFields ;
5555 }
5656
57- private CreateHubRequest (
58- com .google .protobuf .CodedInputStream input ,
59- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
60- throws com .google .protobuf .InvalidProtocolBufferException {
61- this ();
62- if (extensionRegistry == null ) {
63- throw new java .lang .NullPointerException ();
64- }
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- java .lang .String s = input .readStringRequireUtf8 ();
78-
79- parent_ = s ;
80- break ;
81- }
82- case 18 :
83- {
84- java .lang .String s = input .readStringRequireUtf8 ();
85-
86- hubId_ = s ;
87- break ;
88- }
89- case 26 :
90- {
91- com .google .cloud .networkconnectivity .v1 .Hub .Builder subBuilder = null ;
92- if (hub_ != null ) {
93- subBuilder = hub_ .toBuilder ();
94- }
95- hub_ =
96- input .readMessage (
97- com .google .cloud .networkconnectivity .v1 .Hub .parser (), extensionRegistry );
98- if (subBuilder != null ) {
99- subBuilder .mergeFrom (hub_ );
100- hub_ = subBuilder .buildPartial ();
101- }
102-
103- break ;
104- }
105- case 34 :
106- {
107- java .lang .String s = input .readStringRequireUtf8 ();
108-
109- requestId_ = s ;
110- break ;
111- }
112- default :
113- {
114- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
115- done = true ;
116- }
117- break ;
118- }
119- }
120- }
121- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
122- throw e .setUnfinishedMessage (this );
123- } catch (com .google .protobuf .UninitializedMessageException e ) {
124- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
125- } catch (java .io .IOException e ) {
126- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
127- } finally {
128- this .unknownFields = unknownFields .build ();
129- makeExtensionsImmutable ();
130- }
131- }
132-
13357 public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
13458 return com .google .cloud .networkconnectivity .v1 .HubProto
13559 .internal_static_google_cloud_networkconnectivity_v1_CreateHubRequest_descriptor ;
@@ -396,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
396320 if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (requestId_ )) {
397321 com .google .protobuf .GeneratedMessageV3 .writeString (output , 4 , requestId_ );
398322 }
399- unknownFields .writeTo (output );
323+ getUnknownFields () .writeTo (output );
400324 }
401325
402326 @ java .lang .Override
@@ -417,7 +341,7 @@ public int getSerializedSize() {
417341 if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (requestId_ )) {
418342 size += com .google .protobuf .GeneratedMessageV3 .computeStringSize (4 , requestId_ );
419343 }
420- size += unknownFields .getSerializedSize ();
344+ size += getUnknownFields () .getSerializedSize ();
421345 memoizedSize = size ;
422346 return size ;
423347 }
@@ -440,7 +364,7 @@ public boolean equals(final java.lang.Object obj) {
440364 if (!getHub ().equals (other .getHub ())) return false ;
441365 }
442366 if (!getRequestId ().equals (other .getRequestId ())) return false ;
443- if (!unknownFields .equals (other .unknownFields )) return false ;
367+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
444368 return true ;
445369 }
446370
@@ -461,7 +385,7 @@ public int hashCode() {
461385 }
462386 hash = (37 * hash ) + REQUEST_ID_FIELD_NUMBER ;
463387 hash = (53 * hash ) + getRequestId ().hashCode ();
464- hash = (29 * hash ) + unknownFields .hashCode ();
388+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
465389 memoizedHashCode = hash ;
466390 return hash ;
467391 }
@@ -591,17 +515,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
591515 }
592516
593517 // Construct using com.google.cloud.networkconnectivity.v1.CreateHubRequest.newBuilder()
594- private Builder () {
595- maybeForceBuilderInitialization ();
596- }
518+ private Builder () {}
597519
598520 private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
599521 super (parent );
600- maybeForceBuilderInitialization ();
601- }
602-
603- private void maybeForceBuilderInitialization () {
604- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
605522 }
606523
607524 @ java .lang .Override
@@ -719,7 +636,7 @@ public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.CreateHubReques
719636 requestId_ = other .requestId_ ;
720637 onChanged ();
721638 }
722- this .mergeUnknownFields (other .unknownFields );
639+ this .mergeUnknownFields (other .getUnknownFields () );
723640 onChanged ();
724641 return this ;
725642 }
@@ -734,18 +651,55 @@ public Builder mergeFrom(
734651 com .google .protobuf .CodedInputStream input ,
735652 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
736653 throws java .io .IOException {
737- com .google .cloud .networkconnectivity .v1 .CreateHubRequest parsedMessage = null ;
654+ if (extensionRegistry == null ) {
655+ throw new java .lang .NullPointerException ();
656+ }
738657 try {
739- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
658+ boolean done = false ;
659+ while (!done ) {
660+ int tag = input .readTag ();
661+ switch (tag ) {
662+ case 0 :
663+ done = true ;
664+ break ;
665+ case 10 :
666+ {
667+ parent_ = input .readStringRequireUtf8 ();
668+
669+ break ;
670+ } // case 10
671+ case 18 :
672+ {
673+ hubId_ = input .readStringRequireUtf8 ();
674+
675+ break ;
676+ } // case 18
677+ case 26 :
678+ {
679+ input .readMessage (getHubFieldBuilder ().getBuilder (), extensionRegistry );
680+
681+ break ;
682+ } // case 26
683+ case 34 :
684+ {
685+ requestId_ = input .readStringRequireUtf8 ();
686+
687+ break ;
688+ } // case 34
689+ default :
690+ {
691+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
692+ done = true ; // was an endgroup tag
693+ }
694+ break ;
695+ } // default:
696+ } // switch (tag)
697+ } // while (!done)
740698 } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
741- parsedMessage =
742- (com .google .cloud .networkconnectivity .v1 .CreateHubRequest ) e .getUnfinishedMessage ();
743699 throw e .unwrapIOException ();
744700 } finally {
745- if (parsedMessage != null ) {
746- mergeFrom (parsedMessage );
747- }
748- }
701+ onChanged ();
702+ } // finally
749703 return this ;
750704 }
751705
@@ -1367,7 +1321,18 @@ public CreateHubRequest parsePartialFrom(
13671321 com .google .protobuf .CodedInputStream input ,
13681322 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
13691323 throws com .google .protobuf .InvalidProtocolBufferException {
1370- return new CreateHubRequest (input , extensionRegistry );
1324+ Builder builder = newBuilder ();
1325+ try {
1326+ builder .mergeFrom (input , extensionRegistry );
1327+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1328+ throw e .setUnfinishedMessage (builder .buildPartial ());
1329+ } catch (com .google .protobuf .UninitializedMessageException e ) {
1330+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
1331+ } catch (java .io .IOException e ) {
1332+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
1333+ .setUnfinishedMessage (builder .buildPartial ());
1334+ }
1335+ return builder .buildPartial ();
13711336 }
13721337 };
13731338
0 commit comments