@@ -50,60 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5050 return this .unknownFields ;
5151 }
5252
53- private ComputeResource (
54- com .google .protobuf .CodedInputStream input ,
55- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
56- throws com .google .protobuf .InvalidProtocolBufferException {
57- this ();
58- if (extensionRegistry == null ) {
59- throw new java .lang .NullPointerException ();
60- }
61- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
62- com .google .protobuf .UnknownFieldSet .newBuilder ();
63- try {
64- boolean done = false ;
65- while (!done ) {
66- int tag = input .readTag ();
67- switch (tag ) {
68- case 0 :
69- done = true ;
70- break ;
71- case 8 :
72- {
73- cpuMilli_ = input .readInt64 ();
74- break ;
75- }
76- case 16 :
77- {
78- memoryMib_ = input .readInt64 ();
79- break ;
80- }
81- case 32 :
82- {
83- bootDiskMib_ = input .readInt64 ();
84- break ;
85- }
86- default :
87- {
88- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
89- done = true ;
90- }
91- break ;
92- }
93- }
94- }
95- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
96- throw e .setUnfinishedMessage (this );
97- } catch (com .google .protobuf .UninitializedMessageException e ) {
98- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
99- } catch (java .io .IOException e ) {
100- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
101- } finally {
102- this .unknownFields = unknownFields .build ();
103- makeExtensionsImmutable ();
104- }
105- }
106-
10753 public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
10854 return com .google .cloud .batch .v1 .TaskProto
10955 .internal_static_google_cloud_batch_v1_ComputeResource_descriptor ;
@@ -196,7 +142,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
196142 if (bootDiskMib_ != 0L ) {
197143 output .writeInt64 (4 , bootDiskMib_ );
198144 }
199- unknownFields .writeTo (output );
145+ getUnknownFields () .writeTo (output );
200146 }
201147
202148 @ java .lang .Override
@@ -214,7 +160,7 @@ public int getSerializedSize() {
214160 if (bootDiskMib_ != 0L ) {
215161 size += com .google .protobuf .CodedOutputStream .computeInt64Size (4 , bootDiskMib_ );
216162 }
217- size += unknownFields .getSerializedSize ();
163+ size += getUnknownFields () .getSerializedSize ();
218164 memoizedSize = size ;
219165 return size ;
220166 }
@@ -233,7 +179,7 @@ public boolean equals(final java.lang.Object obj) {
233179 if (getCpuMilli () != other .getCpuMilli ()) return false ;
234180 if (getMemoryMib () != other .getMemoryMib ()) return false ;
235181 if (getBootDiskMib () != other .getBootDiskMib ()) return false ;
236- if (!unknownFields .equals (other .unknownFields )) return false ;
182+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
237183 return true ;
238184 }
239185
@@ -250,7 +196,7 @@ public int hashCode() {
250196 hash = (53 * hash ) + com .google .protobuf .Internal .hashLong (getMemoryMib ());
251197 hash = (37 * hash ) + BOOT_DISK_MIB_FIELD_NUMBER ;
252198 hash = (53 * hash ) + com .google .protobuf .Internal .hashLong (getBootDiskMib ());
253- hash = (29 * hash ) + unknownFields .hashCode ();
199+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
254200 memoizedHashCode = hash ;
255201 return hash ;
256202 }
@@ -379,17 +325,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
379325 }
380326
381327 // Construct using com.google.cloud.batch.v1.ComputeResource.newBuilder()
382- private Builder () {
383- maybeForceBuilderInitialization ();
384- }
328+ private Builder () {}
385329
386330 private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
387331 super (parent );
388- maybeForceBuilderInitialization ();
389- }
390-
391- private void maybeForceBuilderInitialization () {
392- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
393332 }
394333
395334 @ java .lang .Override
@@ -489,7 +428,7 @@ public Builder mergeFrom(com.google.cloud.batch.v1.ComputeResource other) {
489428 if (other .getBootDiskMib () != 0L ) {
490429 setBootDiskMib (other .getBootDiskMib ());
491430 }
492- this .mergeUnknownFields (other .unknownFields );
431+ this .mergeUnknownFields (other .getUnknownFields () );
493432 onChanged ();
494433 return this ;
495434 }
@@ -504,17 +443,49 @@ public Builder mergeFrom(
504443 com .google .protobuf .CodedInputStream input ,
505444 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
506445 throws java .io .IOException {
507- com .google .cloud .batch .v1 .ComputeResource parsedMessage = null ;
446+ if (extensionRegistry == null ) {
447+ throw new java .lang .NullPointerException ();
448+ }
508449 try {
509- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
450+ boolean done = false ;
451+ while (!done ) {
452+ int tag = input .readTag ();
453+ switch (tag ) {
454+ case 0 :
455+ done = true ;
456+ break ;
457+ case 8 :
458+ {
459+ cpuMilli_ = input .readInt64 ();
460+
461+ break ;
462+ } // case 8
463+ case 16 :
464+ {
465+ memoryMib_ = input .readInt64 ();
466+
467+ break ;
468+ } // case 16
469+ case 32 :
470+ {
471+ bootDiskMib_ = input .readInt64 ();
472+
473+ break ;
474+ } // case 32
475+ default :
476+ {
477+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
478+ done = true ; // was an endgroup tag
479+ }
480+ break ;
481+ } // default:
482+ } // switch (tag)
483+ } // while (!done)
510484 } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
511- parsedMessage = (com .google .cloud .batch .v1 .ComputeResource ) e .getUnfinishedMessage ();
512485 throw e .unwrapIOException ();
513486 } finally {
514- if (parsedMessage != null ) {
515- mergeFrom (parsedMessage );
516- }
517- }
487+ onChanged ();
488+ } // finally
518489 return this ;
519490 }
520491
@@ -706,7 +677,18 @@ public ComputeResource parsePartialFrom(
706677 com .google .protobuf .CodedInputStream input ,
707678 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
708679 throws com .google .protobuf .InvalidProtocolBufferException {
709- return new ComputeResource (input , extensionRegistry );
680+ Builder builder = newBuilder ();
681+ try {
682+ builder .mergeFrom (input , extensionRegistry );
683+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
684+ throw e .setUnfinishedMessage (builder .buildPartial ());
685+ } catch (com .google .protobuf .UninitializedMessageException e ) {
686+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
687+ } catch (java .io .IOException e ) {
688+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
689+ .setUnfinishedMessage (builder .buildPartial ());
690+ }
691+ return builder .buildPartial ();
710692 }
711693 };
712694
0 commit comments