@@ -54,75 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5454 return this .unknownFields ;
5555 }
5656
57- private CreateEndpointRequest (
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- endpointId_ = s ;
87- break ;
88- }
89- case 26 :
90- {
91- com .google .cloud .servicedirectory .v1 .Endpoint .Builder subBuilder = null ;
92- if (endpoint_ != null ) {
93- subBuilder = endpoint_ .toBuilder ();
94- }
95- endpoint_ =
96- input .readMessage (
97- com .google .cloud .servicedirectory .v1 .Endpoint .parser (), extensionRegistry );
98- if (subBuilder != null ) {
99- subBuilder .mergeFrom (endpoint_ );
100- endpoint_ = subBuilder .buildPartial ();
101- }
102-
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-
12657 public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
12758 return com .google .cloud .servicedirectory .v1 .RegistrationServiceProto
12859 .internal_static_google_cloud_servicedirectory_v1_CreateEndpointRequest_descriptor ;
@@ -329,7 +260,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
329260 if (endpoint_ != null ) {
330261 output .writeMessage (3 , getEndpoint ());
331262 }
332- unknownFields .writeTo (output );
263+ getUnknownFields () .writeTo (output );
333264 }
334265
335266 @ java .lang .Override
@@ -347,7 +278,7 @@ public int getSerializedSize() {
347278 if (endpoint_ != null ) {
348279 size += com .google .protobuf .CodedOutputStream .computeMessageSize (3 , getEndpoint ());
349280 }
350- size += unknownFields .getSerializedSize ();
281+ size += getUnknownFields () .getSerializedSize ();
351282 memoizedSize = size ;
352283 return size ;
353284 }
@@ -369,7 +300,7 @@ public boolean equals(final java.lang.Object obj) {
369300 if (hasEndpoint ()) {
370301 if (!getEndpoint ().equals (other .getEndpoint ())) return false ;
371302 }
372- if (!unknownFields .equals (other .unknownFields )) return false ;
303+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
373304 return true ;
374305 }
375306
@@ -388,7 +319,7 @@ public int hashCode() {
388319 hash = (37 * hash ) + ENDPOINT_FIELD_NUMBER ;
389320 hash = (53 * hash ) + getEndpoint ().hashCode ();
390321 }
391- hash = (29 * hash ) + unknownFields .hashCode ();
322+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
392323 memoizedHashCode = hash ;
393324 return hash ;
394325 }
@@ -519,17 +450,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
519450 }
520451
521452 // Construct using com.google.cloud.servicedirectory.v1.CreateEndpointRequest.newBuilder()
522- private Builder () {
523- maybeForceBuilderInitialization ();
524- }
453+ private Builder () {}
525454
526455 private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
527456 super (parent );
528- maybeForceBuilderInitialization ();
529- }
530-
531- private void maybeForceBuilderInitialization () {
532- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
533457 }
534458
535459 @ java .lang .Override
@@ -640,7 +564,7 @@ public Builder mergeFrom(com.google.cloud.servicedirectory.v1.CreateEndpointRequ
640564 if (other .hasEndpoint ()) {
641565 mergeEndpoint (other .getEndpoint ());
642566 }
643- this .mergeUnknownFields (other .unknownFields );
567+ this .mergeUnknownFields (other .getUnknownFields () );
644568 onChanged ();
645569 return this ;
646570 }
@@ -655,18 +579,49 @@ public Builder mergeFrom(
655579 com .google .protobuf .CodedInputStream input ,
656580 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
657581 throws java .io .IOException {
658- com .google .cloud .servicedirectory .v1 .CreateEndpointRequest parsedMessage = null ;
582+ if (extensionRegistry == null ) {
583+ throw new java .lang .NullPointerException ();
584+ }
659585 try {
660- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
586+ boolean done = false ;
587+ while (!done ) {
588+ int tag = input .readTag ();
589+ switch (tag ) {
590+ case 0 :
591+ done = true ;
592+ break ;
593+ case 10 :
594+ {
595+ parent_ = input .readStringRequireUtf8 ();
596+
597+ break ;
598+ } // case 10
599+ case 18 :
600+ {
601+ endpointId_ = input .readStringRequireUtf8 ();
602+
603+ break ;
604+ } // case 18
605+ case 26 :
606+ {
607+ input .readMessage (getEndpointFieldBuilder ().getBuilder (), extensionRegistry );
608+
609+ break ;
610+ } // case 26
611+ default :
612+ {
613+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
614+ done = true ; // was an endgroup tag
615+ }
616+ break ;
617+ } // default:
618+ } // switch (tag)
619+ } // while (!done)
661620 } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
662- parsedMessage =
663- (com .google .cloud .servicedirectory .v1 .CreateEndpointRequest ) e .getUnfinishedMessage ();
664621 throw e .unwrapIOException ();
665622 } finally {
666- if (parsedMessage != null ) {
667- mergeFrom (parsedMessage );
668- }
669- }
623+ onChanged ();
624+ } // finally
670625 return this ;
671626 }
672627
@@ -1158,7 +1113,18 @@ public CreateEndpointRequest parsePartialFrom(
11581113 com .google .protobuf .CodedInputStream input ,
11591114 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
11601115 throws com .google .protobuf .InvalidProtocolBufferException {
1161- return new CreateEndpointRequest (input , extensionRegistry );
1116+ Builder builder = newBuilder ();
1117+ try {
1118+ builder .mergeFrom (input , extensionRegistry );
1119+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1120+ throw e .setUnfinishedMessage (builder .buildPartial ());
1121+ } catch (com .google .protobuf .UninitializedMessageException e ) {
1122+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
1123+ } catch (java .io .IOException e ) {
1124+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
1125+ .setUnfinishedMessage (builder .buildPartial ());
1126+ }
1127+ return builder .buildPartial ();
11621128 }
11631129 };
11641130
0 commit comments