@@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5454 return this .unknownFields ;
5555 }
5656
57- private BindDeviceToGatewayRequest (
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- gatewayId_ = s ;
87- break ;
88- }
89- case 26 :
90- {
91- java .lang .String s = input .readStringRequireUtf8 ();
92-
93- deviceId_ = s ;
94- break ;
95- }
96- default :
97- {
98- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
99- done = true ;
100- }
101- break ;
102- }
103- }
104- }
105- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
106- throw e .setUnfinishedMessage (this );
107- } catch (com .google .protobuf .UninitializedMessageException e ) {
108- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
109- } catch (java .io .IOException e ) {
110- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
111- } finally {
112- this .unknownFields = unknownFields .build ();
113- makeExtensionsImmutable ();
114- }
115- }
116-
11757 public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
11858 return com .google .cloud .iot .v1 .DeviceManagerProto
11959 .internal_static_google_cloud_iot_v1_BindDeviceToGatewayRequest_descriptor ;
@@ -311,7 +251,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
311251 if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (deviceId_ )) {
312252 com .google .protobuf .GeneratedMessageV3 .writeString (output , 3 , deviceId_ );
313253 }
314- unknownFields .writeTo (output );
254+ getUnknownFields () .writeTo (output );
315255 }
316256
317257 @ java .lang .Override
@@ -329,7 +269,7 @@ public int getSerializedSize() {
329269 if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (deviceId_ )) {
330270 size += com .google .protobuf .GeneratedMessageV3 .computeStringSize (3 , deviceId_ );
331271 }
332- size += unknownFields .getSerializedSize ();
272+ size += getUnknownFields () .getSerializedSize ();
333273 memoizedSize = size ;
334274 return size ;
335275 }
@@ -348,7 +288,7 @@ public boolean equals(final java.lang.Object obj) {
348288 if (!getParent ().equals (other .getParent ())) return false ;
349289 if (!getGatewayId ().equals (other .getGatewayId ())) return false ;
350290 if (!getDeviceId ().equals (other .getDeviceId ())) return false ;
351- if (!unknownFields .equals (other .unknownFields )) return false ;
291+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
352292 return true ;
353293 }
354294
@@ -365,7 +305,7 @@ public int hashCode() {
365305 hash = (53 * hash ) + getGatewayId ().hashCode ();
366306 hash = (37 * hash ) + DEVICE_ID_FIELD_NUMBER ;
367307 hash = (53 * hash ) + getDeviceId ().hashCode ();
368- hash = (29 * hash ) + unknownFields .hashCode ();
308+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
369309 memoizedHashCode = hash ;
370310 return hash ;
371311 }
@@ -494,17 +434,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
494434 }
495435
496436 // Construct using com.google.cloud.iot.v1.BindDeviceToGatewayRequest.newBuilder()
497- private Builder () {
498- maybeForceBuilderInitialization ();
499- }
437+ private Builder () {}
500438
501439 private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
502440 super (parent );
503- maybeForceBuilderInitialization ();
504- }
505-
506- private void maybeForceBuilderInitialization () {
507- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
508441 }
509442
510443 @ java .lang .Override
@@ -608,7 +541,7 @@ public Builder mergeFrom(com.google.cloud.iot.v1.BindDeviceToGatewayRequest othe
608541 deviceId_ = other .deviceId_ ;
609542 onChanged ();
610543 }
611- this .mergeUnknownFields (other .unknownFields );
544+ this .mergeUnknownFields (other .getUnknownFields () );
612545 onChanged ();
613546 return this ;
614547 }
@@ -623,18 +556,49 @@ public Builder mergeFrom(
623556 com .google .protobuf .CodedInputStream input ,
624557 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
625558 throws java .io .IOException {
626- com .google .cloud .iot .v1 .BindDeviceToGatewayRequest parsedMessage = null ;
559+ if (extensionRegistry == null ) {
560+ throw new java .lang .NullPointerException ();
561+ }
627562 try {
628- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
563+ boolean done = false ;
564+ while (!done ) {
565+ int tag = input .readTag ();
566+ switch (tag ) {
567+ case 0 :
568+ done = true ;
569+ break ;
570+ case 10 :
571+ {
572+ parent_ = input .readStringRequireUtf8 ();
573+
574+ break ;
575+ } // case 10
576+ case 18 :
577+ {
578+ gatewayId_ = input .readStringRequireUtf8 ();
579+
580+ break ;
581+ } // case 18
582+ case 26 :
583+ {
584+ deviceId_ = input .readStringRequireUtf8 ();
585+
586+ break ;
587+ } // case 26
588+ default :
589+ {
590+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
591+ done = true ; // was an endgroup tag
592+ }
593+ break ;
594+ } // default:
595+ } // switch (tag)
596+ } // while (!done)
629597 } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
630- parsedMessage =
631- (com .google .cloud .iot .v1 .BindDeviceToGatewayRequest ) e .getUnfinishedMessage ();
632598 throw e .unwrapIOException ();
633599 } finally {
634- if (parsedMessage != null ) {
635- mergeFrom (parsedMessage );
636- }
637- }
600+ onChanged ();
601+ } // finally
638602 return this ;
639603 }
640604
@@ -1018,7 +982,18 @@ public BindDeviceToGatewayRequest parsePartialFrom(
1018982 com .google .protobuf .CodedInputStream input ,
1019983 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
1020984 throws com .google .protobuf .InvalidProtocolBufferException {
1021- return new BindDeviceToGatewayRequest (input , extensionRegistry );
985+ Builder builder = newBuilder ();
986+ try {
987+ builder .mergeFrom (input , extensionRegistry );
988+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
989+ throw e .setUnfinishedMessage (builder .buildPartial ());
990+ } catch (com .google .protobuf .UninitializedMessageException e ) {
991+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
992+ } catch (java .io .IOException e ) {
993+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
994+ .setUnfinishedMessage (builder .buildPartial ());
995+ }
996+ return builder .buildPartial ();
1022997 }
1023998 };
1024999
0 commit comments