@@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5353 return this .unknownFields ;
5454 }
5555
56- private CreateBackupPlanRequest (
57- com .google .protobuf .CodedInputStream input ,
58- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
59- throws com .google .protobuf .InvalidProtocolBufferException {
60- this ();
61- if (extensionRegistry == null ) {
62- throw new java .lang .NullPointerException ();
63- }
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 10 :
75- {
76- java .lang .String s = input .readStringRequireUtf8 ();
77-
78- parent_ = s ;
79- break ;
80- }
81- case 18 :
82- {
83- com .google .cloud .gkebackup .v1 .BackupPlan .Builder subBuilder = null ;
84- if (backupPlan_ != null ) {
85- subBuilder = backupPlan_ .toBuilder ();
86- }
87- backupPlan_ =
88- input .readMessage (
89- com .google .cloud .gkebackup .v1 .BackupPlan .parser (), extensionRegistry );
90- if (subBuilder != null ) {
91- subBuilder .mergeFrom (backupPlan_ );
92- backupPlan_ = subBuilder .buildPartial ();
93- }
94-
95- break ;
96- }
97- case 26 :
98- {
99- java .lang .String s = input .readStringRequireUtf8 ();
100-
101- backupPlanId_ = s ;
102- break ;
103- }
104- default :
105- {
106- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
107- done = true ;
108- }
109- break ;
110- }
111- }
112- }
113- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
114- throw e .setUnfinishedMessage (this );
115- } catch (com .google .protobuf .UninitializedMessageException e ) {
116- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
117- } catch (java .io .IOException e ) {
118- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
119- } finally {
120- this .unknownFields = unknownFields .build ();
121- makeExtensionsImmutable ();
122- }
123- }
124-
12556 public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
12657 return com .google .cloud .gkebackup .v1 .GKEBackupProto
12758 .internal_static_google_cloud_gkebackup_v1_CreateBackupPlanRequest_descriptor ;
@@ -330,7 +261,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
330261 if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (backupPlanId_ )) {
331262 com .google .protobuf .GeneratedMessageV3 .writeString (output , 3 , backupPlanId_ );
332263 }
333- unknownFields .writeTo (output );
264+ getUnknownFields () .writeTo (output );
334265 }
335266
336267 @ java .lang .Override
@@ -348,7 +279,7 @@ public int getSerializedSize() {
348279 if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (backupPlanId_ )) {
349280 size += com .google .protobuf .GeneratedMessageV3 .computeStringSize (3 , backupPlanId_ );
350281 }
351- size += unknownFields .getSerializedSize ();
282+ size += getUnknownFields () .getSerializedSize ();
352283 memoizedSize = size ;
353284 return size ;
354285 }
@@ -370,7 +301,7 @@ public boolean equals(final java.lang.Object obj) {
370301 if (!getBackupPlan ().equals (other .getBackupPlan ())) return false ;
371302 }
372303 if (!getBackupPlanId ().equals (other .getBackupPlanId ())) return false ;
373- if (!unknownFields .equals (other .unknownFields )) return false ;
304+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
374305 return true ;
375306 }
376307
@@ -389,7 +320,7 @@ public int hashCode() {
389320 }
390321 hash = (37 * hash ) + BACKUP_PLAN_ID_FIELD_NUMBER ;
391322 hash = (53 * hash ) + getBackupPlanId ().hashCode ();
392- hash = (29 * hash ) + unknownFields .hashCode ();
323+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
393324 memoizedHashCode = hash ;
394325 return hash ;
395326 }
@@ -519,17 +450,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
519450 }
520451
521452 // Construct using com.google.cloud.gkebackup.v1.CreateBackupPlanRequest.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.gkebackup.v1.CreateBackupPlanRequest o
640564 backupPlanId_ = other .backupPlanId_ ;
641565 onChanged ();
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 .gkebackup .v1 .CreateBackupPlanRequest 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+ input .readMessage (getBackupPlanFieldBuilder ().getBuilder (), extensionRegistry );
602+
603+ break ;
604+ } // case 18
605+ case 26 :
606+ {
607+ backupPlanId_ = input .readStringRequireUtf8 ();
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 .gkebackup .v1 .CreateBackupPlanRequest ) 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
@@ -1162,7 +1117,18 @@ public CreateBackupPlanRequest parsePartialFrom(
11621117 com .google .protobuf .CodedInputStream input ,
11631118 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
11641119 throws com .google .protobuf .InvalidProtocolBufferException {
1165- return new CreateBackupPlanRequest (input , extensionRegistry );
1120+ Builder builder = newBuilder ();
1121+ try {
1122+ builder .mergeFrom (input , extensionRegistry );
1123+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1124+ throw e .setUnfinishedMessage (builder .buildPartial ());
1125+ } catch (com .google .protobuf .UninitializedMessageException e ) {
1126+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
1127+ } catch (java .io .IOException e ) {
1128+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
1129+ .setUnfinishedMessage (builder .buildPartial ());
1130+ }
1131+ return builder .buildPartial ();
11661132 }
11671133 };
11681134
0 commit comments