@@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { |
53 | 53 | return this.unknownFields; |
54 | 54 | } |
55 | 55 |
|
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 | | - |
125 | 56 | public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { |
126 | 57 | return com.google.cloud.gkebackup.v1.GKEBackupProto |
127 | 58 | .internal_static_google_cloud_gkebackup_v1_CreateBackupPlanRequest_descriptor; |
@@ -330,7 +261,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io |
330 | 261 | if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupPlanId_)) { |
331 | 262 | com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupPlanId_); |
332 | 263 | } |
333 | | - unknownFields.writeTo(output); |
| 264 | + getUnknownFields().writeTo(output); |
334 | 265 | } |
335 | 266 |
|
336 | 267 | @java.lang.Override |
@@ -348,7 +279,7 @@ public int getSerializedSize() { |
348 | 279 | if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupPlanId_)) { |
349 | 280 | size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupPlanId_); |
350 | 281 | } |
351 | | - size += unknownFields.getSerializedSize(); |
| 282 | + size += getUnknownFields().getSerializedSize(); |
352 | 283 | memoizedSize = size; |
353 | 284 | return size; |
354 | 285 | } |
@@ -370,7 +301,7 @@ public boolean equals(final java.lang.Object obj) { |
370 | 301 | if (!getBackupPlan().equals(other.getBackupPlan())) return false; |
371 | 302 | } |
372 | 303 | if (!getBackupPlanId().equals(other.getBackupPlanId())) return false; |
373 | | - if (!unknownFields.equals(other.unknownFields)) return false; |
| 304 | + if (!getUnknownFields().equals(other.getUnknownFields())) return false; |
374 | 305 | return true; |
375 | 306 | } |
376 | 307 |
|
@@ -389,7 +320,7 @@ public int hashCode() { |
389 | 320 | } |
390 | 321 | hash = (37 * hash) + BACKUP_PLAN_ID_FIELD_NUMBER; |
391 | 322 | hash = (53 * hash) + getBackupPlanId().hashCode(); |
392 | | - hash = (29 * hash) + unknownFields.hashCode(); |
| 323 | + hash = (29 * hash) + getUnknownFields().hashCode(); |
393 | 324 | memoizedHashCode = hash; |
394 | 325 | return hash; |
395 | 326 | } |
@@ -519,17 +450,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { |
519 | 450 | } |
520 | 451 |
|
521 | 452 | // Construct using com.google.cloud.gkebackup.v1.CreateBackupPlanRequest.newBuilder() |
522 | | - private Builder() { |
523 | | - maybeForceBuilderInitialization(); |
524 | | - } |
| 453 | + private Builder() {} |
525 | 454 |
|
526 | 455 | private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { |
527 | 456 | super(parent); |
528 | | - maybeForceBuilderInitialization(); |
529 | | - } |
530 | | - |
531 | | - private void maybeForceBuilderInitialization() { |
532 | | - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} |
533 | 457 | } |
534 | 458 |
|
535 | 459 | @java.lang.Override |
@@ -640,7 +564,7 @@ public Builder mergeFrom(com.google.cloud.gkebackup.v1.CreateBackupPlanRequest o |
640 | 564 | backupPlanId_ = other.backupPlanId_; |
641 | 565 | onChanged(); |
642 | 566 | } |
643 | | - this.mergeUnknownFields(other.unknownFields); |
| 567 | + this.mergeUnknownFields(other.getUnknownFields()); |
644 | 568 | onChanged(); |
645 | 569 | return this; |
646 | 570 | } |
@@ -655,18 +579,49 @@ public Builder mergeFrom( |
655 | 579 | com.google.protobuf.CodedInputStream input, |
656 | 580 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
657 | 581 | throws java.io.IOException { |
658 | | - com.google.cloud.gkebackup.v1.CreateBackupPlanRequest parsedMessage = null; |
| 582 | + if (extensionRegistry == null) { |
| 583 | + throw new java.lang.NullPointerException(); |
| 584 | + } |
659 | 585 | 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) |
661 | 620 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { |
662 | | - parsedMessage = |
663 | | - (com.google.cloud.gkebackup.v1.CreateBackupPlanRequest) e.getUnfinishedMessage(); |
664 | 621 | throw e.unwrapIOException(); |
665 | 622 | } finally { |
666 | | - if (parsedMessage != null) { |
667 | | - mergeFrom(parsedMessage); |
668 | | - } |
669 | | - } |
| 623 | + onChanged(); |
| 624 | + } // finally |
670 | 625 | return this; |
671 | 626 | } |
672 | 627 |
|
@@ -1162,7 +1117,18 @@ public CreateBackupPlanRequest parsePartialFrom( |
1162 | 1117 | com.google.protobuf.CodedInputStream input, |
1163 | 1118 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
1164 | 1119 | 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(); |
1166 | 1132 | } |
1167 | 1133 | }; |
1168 | 1134 |
|
|