@@ -53,81 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { |
53 | 53 | return this.unknownFields; |
54 | 54 | } |
55 | 55 |
|
56 | | - private AcceleratorConfig( |
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 | | - int mutable_bitField0_ = 0; |
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 8: |
76 | | - { |
77 | | - acceleratorCount_ = input.readInt64(); |
78 | | - break; |
79 | | - } |
80 | | - case 18: |
81 | | - { |
82 | | - java.lang.String s = input.readStringRequireUtf8(); |
83 | | - |
84 | | - acceleratorType_ = s; |
85 | | - break; |
86 | | - } |
87 | | - case 26: |
88 | | - { |
89 | | - java.lang.String s = input.readStringRequireUtf8(); |
90 | | - |
91 | | - gpuPartitionSize_ = s; |
92 | | - break; |
93 | | - } |
94 | | - case 42: |
95 | | - { |
96 | | - com.google.container.v1.GPUSharingConfig.Builder subBuilder = null; |
97 | | - if (((bitField0_ & 0x00000001) != 0)) { |
98 | | - subBuilder = gpuSharingConfig_.toBuilder(); |
99 | | - } |
100 | | - gpuSharingConfig_ = |
101 | | - input.readMessage( |
102 | | - com.google.container.v1.GPUSharingConfig.parser(), extensionRegistry); |
103 | | - if (subBuilder != null) { |
104 | | - subBuilder.mergeFrom(gpuSharingConfig_); |
105 | | - gpuSharingConfig_ = subBuilder.buildPartial(); |
106 | | - } |
107 | | - bitField0_ |= 0x00000001; |
108 | | - break; |
109 | | - } |
110 | | - default: |
111 | | - { |
112 | | - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { |
113 | | - done = true; |
114 | | - } |
115 | | - break; |
116 | | - } |
117 | | - } |
118 | | - } |
119 | | - } catch (com.google.protobuf.InvalidProtocolBufferException e) { |
120 | | - throw e.setUnfinishedMessage(this); |
121 | | - } catch (com.google.protobuf.UninitializedMessageException e) { |
122 | | - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); |
123 | | - } catch (java.io.IOException e) { |
124 | | - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); |
125 | | - } finally { |
126 | | - this.unknownFields = unknownFields.build(); |
127 | | - makeExtensionsImmutable(); |
128 | | - } |
129 | | - } |
130 | | - |
131 | 56 | public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { |
132 | 57 | return com.google.container.v1.ClusterServiceProto |
133 | 58 | .internal_static_google_container_v1_AcceleratorConfig_descriptor; |
@@ -342,7 +267,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io |
342 | 267 | if (((bitField0_ & 0x00000001) != 0)) { |
343 | 268 | output.writeMessage(5, getGpuSharingConfig()); |
344 | 269 | } |
345 | | - unknownFields.writeTo(output); |
| 270 | + getUnknownFields().writeTo(output); |
346 | 271 | } |
347 | 272 |
|
348 | 273 | @java.lang.Override |
@@ -363,7 +288,7 @@ public int getSerializedSize() { |
363 | 288 | if (((bitField0_ & 0x00000001) != 0)) { |
364 | 289 | size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getGpuSharingConfig()); |
365 | 290 | } |
366 | | - size += unknownFields.getSerializedSize(); |
| 291 | + size += getUnknownFields().getSerializedSize(); |
367 | 292 | memoizedSize = size; |
368 | 293 | return size; |
369 | 294 | } |
@@ -386,7 +311,7 @@ public boolean equals(final java.lang.Object obj) { |
386 | 311 | if (hasGpuSharingConfig()) { |
387 | 312 | if (!getGpuSharingConfig().equals(other.getGpuSharingConfig())) return false; |
388 | 313 | } |
389 | | - if (!unknownFields.equals(other.unknownFields)) return false; |
| 314 | + if (!getUnknownFields().equals(other.getUnknownFields())) return false; |
390 | 315 | return true; |
391 | 316 | } |
392 | 317 |
|
@@ -407,7 +332,7 @@ public int hashCode() { |
407 | 332 | hash = (37 * hash) + GPU_SHARING_CONFIG_FIELD_NUMBER; |
408 | 333 | hash = (53 * hash) + getGpuSharingConfig().hashCode(); |
409 | 334 | } |
410 | | - hash = (29 * hash) + unknownFields.hashCode(); |
| 335 | + hash = (29 * hash) + getUnknownFields().hashCode(); |
411 | 336 | memoizedHashCode = hash; |
412 | 337 | return hash; |
413 | 338 | } |
@@ -670,7 +595,7 @@ public Builder mergeFrom(com.google.container.v1.AcceleratorConfig other) { |
670 | 595 | if (other.hasGpuSharingConfig()) { |
671 | 596 | mergeGpuSharingConfig(other.getGpuSharingConfig()); |
672 | 597 | } |
673 | | - this.mergeUnknownFields(other.unknownFields); |
| 598 | + this.mergeUnknownFields(other.getUnknownFields()); |
674 | 599 | onChanged(); |
675 | 600 | return this; |
676 | 601 | } |
@@ -685,17 +610,56 @@ public Builder mergeFrom( |
685 | 610 | com.google.protobuf.CodedInputStream input, |
686 | 611 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
687 | 612 | throws java.io.IOException { |
688 | | - com.google.container.v1.AcceleratorConfig parsedMessage = null; |
| 613 | + if (extensionRegistry == null) { |
| 614 | + throw new java.lang.NullPointerException(); |
| 615 | + } |
689 | 616 | try { |
690 | | - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); |
| 617 | + boolean done = false; |
| 618 | + while (!done) { |
| 619 | + int tag = input.readTag(); |
| 620 | + switch (tag) { |
| 621 | + case 0: |
| 622 | + done = true; |
| 623 | + break; |
| 624 | + case 8: |
| 625 | + { |
| 626 | + acceleratorCount_ = input.readInt64(); |
| 627 | + |
| 628 | + break; |
| 629 | + } // case 8 |
| 630 | + case 18: |
| 631 | + { |
| 632 | + acceleratorType_ = input.readStringRequireUtf8(); |
| 633 | + |
| 634 | + break; |
| 635 | + } // case 18 |
| 636 | + case 26: |
| 637 | + { |
| 638 | + gpuPartitionSize_ = input.readStringRequireUtf8(); |
| 639 | + |
| 640 | + break; |
| 641 | + } // case 26 |
| 642 | + case 42: |
| 643 | + { |
| 644 | + input.readMessage( |
| 645 | + getGpuSharingConfigFieldBuilder().getBuilder(), extensionRegistry); |
| 646 | + bitField0_ |= 0x00000001; |
| 647 | + break; |
| 648 | + } // case 42 |
| 649 | + default: |
| 650 | + { |
| 651 | + if (!super.parseUnknownField(input, extensionRegistry, tag)) { |
| 652 | + done = true; // was an endgroup tag |
| 653 | + } |
| 654 | + break; |
| 655 | + } // default: |
| 656 | + } // switch (tag) |
| 657 | + } // while (!done) |
691 | 658 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { |
692 | | - parsedMessage = (com.google.container.v1.AcceleratorConfig) e.getUnfinishedMessage(); |
693 | 659 | throw e.unwrapIOException(); |
694 | 660 | } finally { |
695 | | - if (parsedMessage != null) { |
696 | | - mergeFrom(parsedMessage); |
697 | | - } |
698 | | - } |
| 661 | + onChanged(); |
| 662 | + } // finally |
699 | 663 | return this; |
700 | 664 | } |
701 | 665 |
|
@@ -1199,7 +1163,18 @@ public AcceleratorConfig parsePartialFrom( |
1199 | 1163 | com.google.protobuf.CodedInputStream input, |
1200 | 1164 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
1201 | 1165 | throws com.google.protobuf.InvalidProtocolBufferException { |
1202 | | - return new AcceleratorConfig(input, extensionRegistry); |
| 1166 | + Builder builder = newBuilder(); |
| 1167 | + try { |
| 1168 | + builder.mergeFrom(input, extensionRegistry); |
| 1169 | + } catch (com.google.protobuf.InvalidProtocolBufferException e) { |
| 1170 | + throw e.setUnfinishedMessage(builder.buildPartial()); |
| 1171 | + } catch (com.google.protobuf.UninitializedMessageException e) { |
| 1172 | + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); |
| 1173 | + } catch (java.io.IOException e) { |
| 1174 | + throw new com.google.protobuf.InvalidProtocolBufferException(e) |
| 1175 | + .setUnfinishedMessage(builder.buildPartial()); |
| 1176 | + } |
| 1177 | + return builder.buildPartial(); |
1203 | 1178 | } |
1204 | 1179 | }; |
1205 | 1180 |
|
|