1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/compute/v1/compute.proto 18 19 package com.google.cloud.compute.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Represent a sole-tenant Node Template resource. You can use a template to define properties for nodes in a node group. For more information, read Creating node groups and instances. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.compute.v1.NodeTemplate} 29 */ 30 public final class NodeTemplate extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.NodeTemplate) 33 NodeTemplateOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use NodeTemplate.newBuilder() to construct. NodeTemplate(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private NodeTemplate(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 NodeTemplate()40 private NodeTemplate() { 41 accelerators_ = java.util.Collections.emptyList(); 42 cpuOvercommitType_ = ""; 43 creationTimestamp_ = ""; 44 description_ = ""; 45 disks_ = java.util.Collections.emptyList(); 46 kind_ = ""; 47 name_ = ""; 48 nodeType_ = ""; 49 region_ = ""; 50 selfLink_ = ""; 51 status_ = ""; 52 statusMessage_ = ""; 53 } 54 55 @java.lang.Override 56 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)57 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 58 return new NodeTemplate(); 59 } 60 61 @java.lang.Override getUnknownFields()62 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 63 return this.unknownFields; 64 } 65 getDescriptor()66 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 67 return com.google.cloud.compute.v1.Compute 68 .internal_static_google_cloud_compute_v1_NodeTemplate_descriptor; 69 } 70 71 @SuppressWarnings({"rawtypes"}) 72 @java.lang.Override internalGetMapField(int number)73 protected com.google.protobuf.MapField internalGetMapField(int number) { 74 switch (number) { 75 case 339007161: 76 return internalGetNodeAffinityLabels(); 77 default: 78 throw new RuntimeException("Invalid map field number: " + number); 79 } 80 } 81 82 @java.lang.Override 83 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()84 internalGetFieldAccessorTable() { 85 return com.google.cloud.compute.v1.Compute 86 .internal_static_google_cloud_compute_v1_NodeTemplate_fieldAccessorTable 87 .ensureFieldAccessorsInitialized( 88 com.google.cloud.compute.v1.NodeTemplate.class, 89 com.google.cloud.compute.v1.NodeTemplate.Builder.class); 90 } 91 92 /** 93 * 94 * 95 * <pre> 96 * CPU overcommit. 97 * </pre> 98 * 99 * Protobuf enum {@code google.cloud.compute.v1.NodeTemplate.CpuOvercommitType} 100 */ 101 public enum CpuOvercommitType implements com.google.protobuf.ProtocolMessageEnum { 102 /** 103 * 104 * 105 * <pre> 106 * A value indicating that the enum field is not set. 107 * </pre> 108 * 109 * <code>UNDEFINED_CPU_OVERCOMMIT_TYPE = 0;</code> 110 */ 111 UNDEFINED_CPU_OVERCOMMIT_TYPE(0), 112 /** <code>CPU_OVERCOMMIT_TYPE_UNSPECIFIED = 520665615;</code> */ 113 CPU_OVERCOMMIT_TYPE_UNSPECIFIED(520665615), 114 /** <code>ENABLED = 182130465;</code> */ 115 ENABLED(182130465), 116 /** <code>NONE = 2402104;</code> */ 117 NONE(2402104), 118 UNRECOGNIZED(-1), 119 ; 120 121 /** 122 * 123 * 124 * <pre> 125 * A value indicating that the enum field is not set. 126 * </pre> 127 * 128 * <code>UNDEFINED_CPU_OVERCOMMIT_TYPE = 0;</code> 129 */ 130 public static final int UNDEFINED_CPU_OVERCOMMIT_TYPE_VALUE = 0; 131 /** <code>CPU_OVERCOMMIT_TYPE_UNSPECIFIED = 520665615;</code> */ 132 public static final int CPU_OVERCOMMIT_TYPE_UNSPECIFIED_VALUE = 520665615; 133 /** <code>ENABLED = 182130465;</code> */ 134 public static final int ENABLED_VALUE = 182130465; 135 /** <code>NONE = 2402104;</code> */ 136 public static final int NONE_VALUE = 2402104; 137 getNumber()138 public final int getNumber() { 139 if (this == UNRECOGNIZED) { 140 throw new java.lang.IllegalArgumentException( 141 "Can't get the number of an unknown enum value."); 142 } 143 return value; 144 } 145 146 /** 147 * @param value The numeric wire value of the corresponding enum entry. 148 * @return The enum associated with the given numeric wire value. 149 * @deprecated Use {@link #forNumber(int)} instead. 150 */ 151 @java.lang.Deprecated valueOf(int value)152 public static CpuOvercommitType valueOf(int value) { 153 return forNumber(value); 154 } 155 156 /** 157 * @param value The numeric wire value of the corresponding enum entry. 158 * @return The enum associated with the given numeric wire value. 159 */ forNumber(int value)160 public static CpuOvercommitType forNumber(int value) { 161 switch (value) { 162 case 0: 163 return UNDEFINED_CPU_OVERCOMMIT_TYPE; 164 case 520665615: 165 return CPU_OVERCOMMIT_TYPE_UNSPECIFIED; 166 case 182130465: 167 return ENABLED; 168 case 2402104: 169 return NONE; 170 default: 171 return null; 172 } 173 } 174 175 public static com.google.protobuf.Internal.EnumLiteMap<CpuOvercommitType> internalGetValueMap()176 internalGetValueMap() { 177 return internalValueMap; 178 } 179 180 private static final com.google.protobuf.Internal.EnumLiteMap<CpuOvercommitType> 181 internalValueMap = 182 new com.google.protobuf.Internal.EnumLiteMap<CpuOvercommitType>() { 183 public CpuOvercommitType findValueByNumber(int number) { 184 return CpuOvercommitType.forNumber(number); 185 } 186 }; 187 getValueDescriptor()188 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 189 if (this == UNRECOGNIZED) { 190 throw new java.lang.IllegalStateException( 191 "Can't get the descriptor of an unrecognized enum value."); 192 } 193 return getDescriptor().getValues().get(ordinal()); 194 } 195 getDescriptorForType()196 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 197 return getDescriptor(); 198 } 199 getDescriptor()200 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 201 return com.google.cloud.compute.v1.NodeTemplate.getDescriptor().getEnumTypes().get(0); 202 } 203 204 private static final CpuOvercommitType[] VALUES = values(); 205 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)206 public static CpuOvercommitType valueOf( 207 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 208 if (desc.getType() != getDescriptor()) { 209 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 210 } 211 if (desc.getIndex() == -1) { 212 return UNRECOGNIZED; 213 } 214 return VALUES[desc.getIndex()]; 215 } 216 217 private final int value; 218 CpuOvercommitType(int value)219 private CpuOvercommitType(int value) { 220 this.value = value; 221 } 222 223 // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.NodeTemplate.CpuOvercommitType) 224 } 225 226 /** 227 * 228 * 229 * <pre> 230 * [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING. 231 * </pre> 232 * 233 * Protobuf enum {@code google.cloud.compute.v1.NodeTemplate.Status} 234 */ 235 public enum Status implements com.google.protobuf.ProtocolMessageEnum { 236 /** 237 * 238 * 239 * <pre> 240 * A value indicating that the enum field is not set. 241 * </pre> 242 * 243 * <code>UNDEFINED_STATUS = 0;</code> 244 */ 245 UNDEFINED_STATUS(0), 246 /** 247 * 248 * 249 * <pre> 250 * Resources are being allocated. 251 * </pre> 252 * 253 * <code>CREATING = 455564985;</code> 254 */ 255 CREATING(455564985), 256 /** 257 * 258 * 259 * <pre> 260 * The node template is currently being deleted. 261 * </pre> 262 * 263 * <code>DELETING = 528602024;</code> 264 */ 265 DELETING(528602024), 266 /** 267 * 268 * 269 * <pre> 270 * Invalid status. 271 * </pre> 272 * 273 * <code>INVALID = 530283991;</code> 274 */ 275 INVALID(530283991), 276 /** 277 * 278 * 279 * <pre> 280 * The node template is ready. 281 * </pre> 282 * 283 * <code>READY = 77848963;</code> 284 */ 285 READY(77848963), 286 UNRECOGNIZED(-1), 287 ; 288 289 /** 290 * 291 * 292 * <pre> 293 * A value indicating that the enum field is not set. 294 * </pre> 295 * 296 * <code>UNDEFINED_STATUS = 0;</code> 297 */ 298 public static final int UNDEFINED_STATUS_VALUE = 0; 299 /** 300 * 301 * 302 * <pre> 303 * Resources are being allocated. 304 * </pre> 305 * 306 * <code>CREATING = 455564985;</code> 307 */ 308 public static final int CREATING_VALUE = 455564985; 309 /** 310 * 311 * 312 * <pre> 313 * The node template is currently being deleted. 314 * </pre> 315 * 316 * <code>DELETING = 528602024;</code> 317 */ 318 public static final int DELETING_VALUE = 528602024; 319 /** 320 * 321 * 322 * <pre> 323 * Invalid status. 324 * </pre> 325 * 326 * <code>INVALID = 530283991;</code> 327 */ 328 public static final int INVALID_VALUE = 530283991; 329 /** 330 * 331 * 332 * <pre> 333 * The node template is ready. 334 * </pre> 335 * 336 * <code>READY = 77848963;</code> 337 */ 338 public static final int READY_VALUE = 77848963; 339 getNumber()340 public final int getNumber() { 341 if (this == UNRECOGNIZED) { 342 throw new java.lang.IllegalArgumentException( 343 "Can't get the number of an unknown enum value."); 344 } 345 return value; 346 } 347 348 /** 349 * @param value The numeric wire value of the corresponding enum entry. 350 * @return The enum associated with the given numeric wire value. 351 * @deprecated Use {@link #forNumber(int)} instead. 352 */ 353 @java.lang.Deprecated valueOf(int value)354 public static Status valueOf(int value) { 355 return forNumber(value); 356 } 357 358 /** 359 * @param value The numeric wire value of the corresponding enum entry. 360 * @return The enum associated with the given numeric wire value. 361 */ forNumber(int value)362 public static Status forNumber(int value) { 363 switch (value) { 364 case 0: 365 return UNDEFINED_STATUS; 366 case 455564985: 367 return CREATING; 368 case 528602024: 369 return DELETING; 370 case 530283991: 371 return INVALID; 372 case 77848963: 373 return READY; 374 default: 375 return null; 376 } 377 } 378 internalGetValueMap()379 public static com.google.protobuf.Internal.EnumLiteMap<Status> internalGetValueMap() { 380 return internalValueMap; 381 } 382 383 private static final com.google.protobuf.Internal.EnumLiteMap<Status> internalValueMap = 384 new com.google.protobuf.Internal.EnumLiteMap<Status>() { 385 public Status findValueByNumber(int number) { 386 return Status.forNumber(number); 387 } 388 }; 389 getValueDescriptor()390 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 391 if (this == UNRECOGNIZED) { 392 throw new java.lang.IllegalStateException( 393 "Can't get the descriptor of an unrecognized enum value."); 394 } 395 return getDescriptor().getValues().get(ordinal()); 396 } 397 getDescriptorForType()398 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 399 return getDescriptor(); 400 } 401 getDescriptor()402 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 403 return com.google.cloud.compute.v1.NodeTemplate.getDescriptor().getEnumTypes().get(1); 404 } 405 406 private static final Status[] VALUES = values(); 407 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)408 public static Status valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 409 if (desc.getType() != getDescriptor()) { 410 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 411 } 412 if (desc.getIndex() == -1) { 413 return UNRECOGNIZED; 414 } 415 return VALUES[desc.getIndex()]; 416 } 417 418 private final int value; 419 Status(int value)420 private Status(int value) { 421 this.value = value; 422 } 423 424 // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.NodeTemplate.Status) 425 } 426 427 private int bitField0_; 428 public static final int ACCELERATORS_FIELD_NUMBER = 269577064; 429 430 @SuppressWarnings("serial") 431 private java.util.List<com.google.cloud.compute.v1.AcceleratorConfig> accelerators_; 432 /** <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> */ 433 @java.lang.Override getAcceleratorsList()434 public java.util.List<com.google.cloud.compute.v1.AcceleratorConfig> getAcceleratorsList() { 435 return accelerators_; 436 } 437 /** <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> */ 438 @java.lang.Override 439 public java.util.List<? extends com.google.cloud.compute.v1.AcceleratorConfigOrBuilder> getAcceleratorsOrBuilderList()440 getAcceleratorsOrBuilderList() { 441 return accelerators_; 442 } 443 /** <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> */ 444 @java.lang.Override getAcceleratorsCount()445 public int getAcceleratorsCount() { 446 return accelerators_.size(); 447 } 448 /** <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> */ 449 @java.lang.Override getAccelerators(int index)450 public com.google.cloud.compute.v1.AcceleratorConfig getAccelerators(int index) { 451 return accelerators_.get(index); 452 } 453 /** <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> */ 454 @java.lang.Override getAcceleratorsOrBuilder( int index)455 public com.google.cloud.compute.v1.AcceleratorConfigOrBuilder getAcceleratorsOrBuilder( 456 int index) { 457 return accelerators_.get(index); 458 } 459 460 public static final int CPU_OVERCOMMIT_TYPE_FIELD_NUMBER = 247727959; 461 462 @SuppressWarnings("serial") 463 private volatile java.lang.Object cpuOvercommitType_ = ""; 464 /** 465 * 466 * 467 * <pre> 468 * CPU overcommit. 469 * Check the CpuOvercommitType enum for the list of possible values. 470 * </pre> 471 * 472 * <code>optional string cpu_overcommit_type = 247727959;</code> 473 * 474 * @return Whether the cpuOvercommitType field is set. 475 */ 476 @java.lang.Override hasCpuOvercommitType()477 public boolean hasCpuOvercommitType() { 478 return ((bitField0_ & 0x00000001) != 0); 479 } 480 /** 481 * 482 * 483 * <pre> 484 * CPU overcommit. 485 * Check the CpuOvercommitType enum for the list of possible values. 486 * </pre> 487 * 488 * <code>optional string cpu_overcommit_type = 247727959;</code> 489 * 490 * @return The cpuOvercommitType. 491 */ 492 @java.lang.Override getCpuOvercommitType()493 public java.lang.String getCpuOvercommitType() { 494 java.lang.Object ref = cpuOvercommitType_; 495 if (ref instanceof java.lang.String) { 496 return (java.lang.String) ref; 497 } else { 498 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 499 java.lang.String s = bs.toStringUtf8(); 500 cpuOvercommitType_ = s; 501 return s; 502 } 503 } 504 /** 505 * 506 * 507 * <pre> 508 * CPU overcommit. 509 * Check the CpuOvercommitType enum for the list of possible values. 510 * </pre> 511 * 512 * <code>optional string cpu_overcommit_type = 247727959;</code> 513 * 514 * @return The bytes for cpuOvercommitType. 515 */ 516 @java.lang.Override getCpuOvercommitTypeBytes()517 public com.google.protobuf.ByteString getCpuOvercommitTypeBytes() { 518 java.lang.Object ref = cpuOvercommitType_; 519 if (ref instanceof java.lang.String) { 520 com.google.protobuf.ByteString b = 521 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 522 cpuOvercommitType_ = b; 523 return b; 524 } else { 525 return (com.google.protobuf.ByteString) ref; 526 } 527 } 528 529 public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366; 530 531 @SuppressWarnings("serial") 532 private volatile java.lang.Object creationTimestamp_ = ""; 533 /** 534 * 535 * 536 * <pre> 537 * [Output Only] Creation timestamp in RFC3339 text format. 538 * </pre> 539 * 540 * <code>optional string creation_timestamp = 30525366;</code> 541 * 542 * @return Whether the creationTimestamp field is set. 543 */ 544 @java.lang.Override hasCreationTimestamp()545 public boolean hasCreationTimestamp() { 546 return ((bitField0_ & 0x00000002) != 0); 547 } 548 /** 549 * 550 * 551 * <pre> 552 * [Output Only] Creation timestamp in RFC3339 text format. 553 * </pre> 554 * 555 * <code>optional string creation_timestamp = 30525366;</code> 556 * 557 * @return The creationTimestamp. 558 */ 559 @java.lang.Override getCreationTimestamp()560 public java.lang.String getCreationTimestamp() { 561 java.lang.Object ref = creationTimestamp_; 562 if (ref instanceof java.lang.String) { 563 return (java.lang.String) ref; 564 } else { 565 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 566 java.lang.String s = bs.toStringUtf8(); 567 creationTimestamp_ = s; 568 return s; 569 } 570 } 571 /** 572 * 573 * 574 * <pre> 575 * [Output Only] Creation timestamp in RFC3339 text format. 576 * </pre> 577 * 578 * <code>optional string creation_timestamp = 30525366;</code> 579 * 580 * @return The bytes for creationTimestamp. 581 */ 582 @java.lang.Override getCreationTimestampBytes()583 public com.google.protobuf.ByteString getCreationTimestampBytes() { 584 java.lang.Object ref = creationTimestamp_; 585 if (ref instanceof java.lang.String) { 586 com.google.protobuf.ByteString b = 587 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 588 creationTimestamp_ = b; 589 return b; 590 } else { 591 return (com.google.protobuf.ByteString) ref; 592 } 593 } 594 595 public static final int DESCRIPTION_FIELD_NUMBER = 422937596; 596 597 @SuppressWarnings("serial") 598 private volatile java.lang.Object description_ = ""; 599 /** 600 * 601 * 602 * <pre> 603 * An optional description of this resource. Provide this property when you create the resource. 604 * </pre> 605 * 606 * <code>optional string description = 422937596;</code> 607 * 608 * @return Whether the description field is set. 609 */ 610 @java.lang.Override hasDescription()611 public boolean hasDescription() { 612 return ((bitField0_ & 0x00000004) != 0); 613 } 614 /** 615 * 616 * 617 * <pre> 618 * An optional description of this resource. Provide this property when you create the resource. 619 * </pre> 620 * 621 * <code>optional string description = 422937596;</code> 622 * 623 * @return The description. 624 */ 625 @java.lang.Override getDescription()626 public java.lang.String getDescription() { 627 java.lang.Object ref = description_; 628 if (ref instanceof java.lang.String) { 629 return (java.lang.String) ref; 630 } else { 631 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 632 java.lang.String s = bs.toStringUtf8(); 633 description_ = s; 634 return s; 635 } 636 } 637 /** 638 * 639 * 640 * <pre> 641 * An optional description of this resource. Provide this property when you create the resource. 642 * </pre> 643 * 644 * <code>optional string description = 422937596;</code> 645 * 646 * @return The bytes for description. 647 */ 648 @java.lang.Override getDescriptionBytes()649 public com.google.protobuf.ByteString getDescriptionBytes() { 650 java.lang.Object ref = description_; 651 if (ref instanceof java.lang.String) { 652 com.google.protobuf.ByteString b = 653 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 654 description_ = b; 655 return b; 656 } else { 657 return (com.google.protobuf.ByteString) ref; 658 } 659 } 660 661 public static final int DISKS_FIELD_NUMBER = 95594102; 662 663 @SuppressWarnings("serial") 664 private java.util.List<com.google.cloud.compute.v1.LocalDisk> disks_; 665 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ 666 @java.lang.Override getDisksList()667 public java.util.List<com.google.cloud.compute.v1.LocalDisk> getDisksList() { 668 return disks_; 669 } 670 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ 671 @java.lang.Override 672 public java.util.List<? extends com.google.cloud.compute.v1.LocalDiskOrBuilder> getDisksOrBuilderList()673 getDisksOrBuilderList() { 674 return disks_; 675 } 676 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ 677 @java.lang.Override getDisksCount()678 public int getDisksCount() { 679 return disks_.size(); 680 } 681 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ 682 @java.lang.Override getDisks(int index)683 public com.google.cloud.compute.v1.LocalDisk getDisks(int index) { 684 return disks_.get(index); 685 } 686 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ 687 @java.lang.Override getDisksOrBuilder(int index)688 public com.google.cloud.compute.v1.LocalDiskOrBuilder getDisksOrBuilder(int index) { 689 return disks_.get(index); 690 } 691 692 public static final int ID_FIELD_NUMBER = 3355; 693 private long id_ = 0L; 694 /** 695 * 696 * 697 * <pre> 698 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 699 * </pre> 700 * 701 * <code>optional uint64 id = 3355;</code> 702 * 703 * @return Whether the id field is set. 704 */ 705 @java.lang.Override hasId()706 public boolean hasId() { 707 return ((bitField0_ & 0x00000008) != 0); 708 } 709 /** 710 * 711 * 712 * <pre> 713 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 714 * </pre> 715 * 716 * <code>optional uint64 id = 3355;</code> 717 * 718 * @return The id. 719 */ 720 @java.lang.Override getId()721 public long getId() { 722 return id_; 723 } 724 725 public static final int KIND_FIELD_NUMBER = 3292052; 726 727 @SuppressWarnings("serial") 728 private volatile java.lang.Object kind_ = ""; 729 /** 730 * 731 * 732 * <pre> 733 * [Output Only] The type of the resource. Always compute#nodeTemplate for node templates. 734 * </pre> 735 * 736 * <code>optional string kind = 3292052;</code> 737 * 738 * @return Whether the kind field is set. 739 */ 740 @java.lang.Override hasKind()741 public boolean hasKind() { 742 return ((bitField0_ & 0x00000010) != 0); 743 } 744 /** 745 * 746 * 747 * <pre> 748 * [Output Only] The type of the resource. Always compute#nodeTemplate for node templates. 749 * </pre> 750 * 751 * <code>optional string kind = 3292052;</code> 752 * 753 * @return The kind. 754 */ 755 @java.lang.Override getKind()756 public java.lang.String getKind() { 757 java.lang.Object ref = kind_; 758 if (ref instanceof java.lang.String) { 759 return (java.lang.String) ref; 760 } else { 761 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 762 java.lang.String s = bs.toStringUtf8(); 763 kind_ = s; 764 return s; 765 } 766 } 767 /** 768 * 769 * 770 * <pre> 771 * [Output Only] The type of the resource. Always compute#nodeTemplate for node templates. 772 * </pre> 773 * 774 * <code>optional string kind = 3292052;</code> 775 * 776 * @return The bytes for kind. 777 */ 778 @java.lang.Override getKindBytes()779 public com.google.protobuf.ByteString getKindBytes() { 780 java.lang.Object ref = kind_; 781 if (ref instanceof java.lang.String) { 782 com.google.protobuf.ByteString b = 783 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 784 kind_ = b; 785 return b; 786 } else { 787 return (com.google.protobuf.ByteString) ref; 788 } 789 } 790 791 public static final int NAME_FIELD_NUMBER = 3373707; 792 793 @SuppressWarnings("serial") 794 private volatile java.lang.Object name_ = ""; 795 /** 796 * 797 * 798 * <pre> 799 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 800 * </pre> 801 * 802 * <code>optional string name = 3373707;</code> 803 * 804 * @return Whether the name field is set. 805 */ 806 @java.lang.Override hasName()807 public boolean hasName() { 808 return ((bitField0_ & 0x00000020) != 0); 809 } 810 /** 811 * 812 * 813 * <pre> 814 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 815 * </pre> 816 * 817 * <code>optional string name = 3373707;</code> 818 * 819 * @return The name. 820 */ 821 @java.lang.Override getName()822 public java.lang.String getName() { 823 java.lang.Object ref = name_; 824 if (ref instanceof java.lang.String) { 825 return (java.lang.String) ref; 826 } else { 827 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 828 java.lang.String s = bs.toStringUtf8(); 829 name_ = s; 830 return s; 831 } 832 } 833 /** 834 * 835 * 836 * <pre> 837 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 838 * </pre> 839 * 840 * <code>optional string name = 3373707;</code> 841 * 842 * @return The bytes for name. 843 */ 844 @java.lang.Override getNameBytes()845 public com.google.protobuf.ByteString getNameBytes() { 846 java.lang.Object ref = name_; 847 if (ref instanceof java.lang.String) { 848 com.google.protobuf.ByteString b = 849 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 850 name_ = b; 851 return b; 852 } else { 853 return (com.google.protobuf.ByteString) ref; 854 } 855 } 856 857 public static final int NODE_AFFINITY_LABELS_FIELD_NUMBER = 339007161; 858 859 private static final class NodeAffinityLabelsDefaultEntryHolder { 860 static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry = 861 com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance( 862 com.google.cloud.compute.v1.Compute 863 .internal_static_google_cloud_compute_v1_NodeTemplate_NodeAffinityLabelsEntry_descriptor, 864 com.google.protobuf.WireFormat.FieldType.STRING, 865 "", 866 com.google.protobuf.WireFormat.FieldType.STRING, 867 ""); 868 } 869 870 @SuppressWarnings("serial") 871 private com.google.protobuf.MapField<java.lang.String, java.lang.String> nodeAffinityLabels_; 872 873 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetNodeAffinityLabels()874 internalGetNodeAffinityLabels() { 875 if (nodeAffinityLabels_ == null) { 876 return com.google.protobuf.MapField.emptyMapField( 877 NodeAffinityLabelsDefaultEntryHolder.defaultEntry); 878 } 879 return nodeAffinityLabels_; 880 } 881 getNodeAffinityLabelsCount()882 public int getNodeAffinityLabelsCount() { 883 return internalGetNodeAffinityLabels().getMap().size(); 884 } 885 /** 886 * 887 * 888 * <pre> 889 * Labels to use for node affinity, which will be used in instance scheduling. 890 * </pre> 891 * 892 * <code>map<string, string> node_affinity_labels = 339007161;</code> 893 */ 894 @java.lang.Override containsNodeAffinityLabels(java.lang.String key)895 public boolean containsNodeAffinityLabels(java.lang.String key) { 896 if (key == null) { 897 throw new NullPointerException("map key"); 898 } 899 return internalGetNodeAffinityLabels().getMap().containsKey(key); 900 } 901 /** Use {@link #getNodeAffinityLabelsMap()} instead. */ 902 @java.lang.Override 903 @java.lang.Deprecated getNodeAffinityLabels()904 public java.util.Map<java.lang.String, java.lang.String> getNodeAffinityLabels() { 905 return getNodeAffinityLabelsMap(); 906 } 907 /** 908 * 909 * 910 * <pre> 911 * Labels to use for node affinity, which will be used in instance scheduling. 912 * </pre> 913 * 914 * <code>map<string, string> node_affinity_labels = 339007161;</code> 915 */ 916 @java.lang.Override getNodeAffinityLabelsMap()917 public java.util.Map<java.lang.String, java.lang.String> getNodeAffinityLabelsMap() { 918 return internalGetNodeAffinityLabels().getMap(); 919 } 920 /** 921 * 922 * 923 * <pre> 924 * Labels to use for node affinity, which will be used in instance scheduling. 925 * </pre> 926 * 927 * <code>map<string, string> node_affinity_labels = 339007161;</code> 928 */ 929 @java.lang.Override getNodeAffinityLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)930 public /* nullable */ java.lang.String getNodeAffinityLabelsOrDefault( 931 java.lang.String key, 932 /* nullable */ 933 java.lang.String defaultValue) { 934 if (key == null) { 935 throw new NullPointerException("map key"); 936 } 937 java.util.Map<java.lang.String, java.lang.String> map = 938 internalGetNodeAffinityLabels().getMap(); 939 return map.containsKey(key) ? map.get(key) : defaultValue; 940 } 941 /** 942 * 943 * 944 * <pre> 945 * Labels to use for node affinity, which will be used in instance scheduling. 946 * </pre> 947 * 948 * <code>map<string, string> node_affinity_labels = 339007161;</code> 949 */ 950 @java.lang.Override getNodeAffinityLabelsOrThrow(java.lang.String key)951 public java.lang.String getNodeAffinityLabelsOrThrow(java.lang.String key) { 952 if (key == null) { 953 throw new NullPointerException("map key"); 954 } 955 java.util.Map<java.lang.String, java.lang.String> map = 956 internalGetNodeAffinityLabels().getMap(); 957 if (!map.containsKey(key)) { 958 throw new java.lang.IllegalArgumentException(); 959 } 960 return map.get(key); 961 } 962 963 public static final int NODE_TYPE_FIELD_NUMBER = 465832791; 964 965 @SuppressWarnings("serial") 966 private volatile java.lang.Object nodeType_ = ""; 967 /** 968 * 969 * 970 * <pre> 971 * The node type to use for nodes group that are created from this template. 972 * </pre> 973 * 974 * <code>optional string node_type = 465832791;</code> 975 * 976 * @return Whether the nodeType field is set. 977 */ 978 @java.lang.Override hasNodeType()979 public boolean hasNodeType() { 980 return ((bitField0_ & 0x00000040) != 0); 981 } 982 /** 983 * 984 * 985 * <pre> 986 * The node type to use for nodes group that are created from this template. 987 * </pre> 988 * 989 * <code>optional string node_type = 465832791;</code> 990 * 991 * @return The nodeType. 992 */ 993 @java.lang.Override getNodeType()994 public java.lang.String getNodeType() { 995 java.lang.Object ref = nodeType_; 996 if (ref instanceof java.lang.String) { 997 return (java.lang.String) ref; 998 } else { 999 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1000 java.lang.String s = bs.toStringUtf8(); 1001 nodeType_ = s; 1002 return s; 1003 } 1004 } 1005 /** 1006 * 1007 * 1008 * <pre> 1009 * The node type to use for nodes group that are created from this template. 1010 * </pre> 1011 * 1012 * <code>optional string node_type = 465832791;</code> 1013 * 1014 * @return The bytes for nodeType. 1015 */ 1016 @java.lang.Override getNodeTypeBytes()1017 public com.google.protobuf.ByteString getNodeTypeBytes() { 1018 java.lang.Object ref = nodeType_; 1019 if (ref instanceof java.lang.String) { 1020 com.google.protobuf.ByteString b = 1021 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1022 nodeType_ = b; 1023 return b; 1024 } else { 1025 return (com.google.protobuf.ByteString) ref; 1026 } 1027 } 1028 1029 public static final int NODE_TYPE_FLEXIBILITY_FIELD_NUMBER = 315257905; 1030 private com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility nodeTypeFlexibility_; 1031 /** 1032 * 1033 * 1034 * <pre> 1035 * Do not use. Instead, use the node_type property. 1036 * </pre> 1037 * 1038 * <code> 1039 * optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905; 1040 * </code> 1041 * 1042 * @return Whether the nodeTypeFlexibility field is set. 1043 */ 1044 @java.lang.Override hasNodeTypeFlexibility()1045 public boolean hasNodeTypeFlexibility() { 1046 return ((bitField0_ & 0x00000080) != 0); 1047 } 1048 /** 1049 * 1050 * 1051 * <pre> 1052 * Do not use. Instead, use the node_type property. 1053 * </pre> 1054 * 1055 * <code> 1056 * optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905; 1057 * </code> 1058 * 1059 * @return The nodeTypeFlexibility. 1060 */ 1061 @java.lang.Override getNodeTypeFlexibility()1062 public com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility getNodeTypeFlexibility() { 1063 return nodeTypeFlexibility_ == null 1064 ? com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility.getDefaultInstance() 1065 : nodeTypeFlexibility_; 1066 } 1067 /** 1068 * 1069 * 1070 * <pre> 1071 * Do not use. Instead, use the node_type property. 1072 * </pre> 1073 * 1074 * <code> 1075 * optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905; 1076 * </code> 1077 */ 1078 @java.lang.Override 1079 public com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibilityOrBuilder getNodeTypeFlexibilityOrBuilder()1080 getNodeTypeFlexibilityOrBuilder() { 1081 return nodeTypeFlexibility_ == null 1082 ? com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility.getDefaultInstance() 1083 : nodeTypeFlexibility_; 1084 } 1085 1086 public static final int REGION_FIELD_NUMBER = 138946292; 1087 1088 @SuppressWarnings("serial") 1089 private volatile java.lang.Object region_ = ""; 1090 /** 1091 * 1092 * 1093 * <pre> 1094 * [Output Only] The name of the region where the node template resides, such as us-central1. 1095 * </pre> 1096 * 1097 * <code>optional string region = 138946292;</code> 1098 * 1099 * @return Whether the region field is set. 1100 */ 1101 @java.lang.Override hasRegion()1102 public boolean hasRegion() { 1103 return ((bitField0_ & 0x00000100) != 0); 1104 } 1105 /** 1106 * 1107 * 1108 * <pre> 1109 * [Output Only] The name of the region where the node template resides, such as us-central1. 1110 * </pre> 1111 * 1112 * <code>optional string region = 138946292;</code> 1113 * 1114 * @return The region. 1115 */ 1116 @java.lang.Override getRegion()1117 public java.lang.String getRegion() { 1118 java.lang.Object ref = region_; 1119 if (ref instanceof java.lang.String) { 1120 return (java.lang.String) ref; 1121 } else { 1122 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1123 java.lang.String s = bs.toStringUtf8(); 1124 region_ = s; 1125 return s; 1126 } 1127 } 1128 /** 1129 * 1130 * 1131 * <pre> 1132 * [Output Only] The name of the region where the node template resides, such as us-central1. 1133 * </pre> 1134 * 1135 * <code>optional string region = 138946292;</code> 1136 * 1137 * @return The bytes for region. 1138 */ 1139 @java.lang.Override getRegionBytes()1140 public com.google.protobuf.ByteString getRegionBytes() { 1141 java.lang.Object ref = region_; 1142 if (ref instanceof java.lang.String) { 1143 com.google.protobuf.ByteString b = 1144 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1145 region_ = b; 1146 return b; 1147 } else { 1148 return (com.google.protobuf.ByteString) ref; 1149 } 1150 } 1151 1152 public static final int SELF_LINK_FIELD_NUMBER = 456214797; 1153 1154 @SuppressWarnings("serial") 1155 private volatile java.lang.Object selfLink_ = ""; 1156 /** 1157 * 1158 * 1159 * <pre> 1160 * [Output Only] Server-defined URL for the resource. 1161 * </pre> 1162 * 1163 * <code>optional string self_link = 456214797;</code> 1164 * 1165 * @return Whether the selfLink field is set. 1166 */ 1167 @java.lang.Override hasSelfLink()1168 public boolean hasSelfLink() { 1169 return ((bitField0_ & 0x00000200) != 0); 1170 } 1171 /** 1172 * 1173 * 1174 * <pre> 1175 * [Output Only] Server-defined URL for the resource. 1176 * </pre> 1177 * 1178 * <code>optional string self_link = 456214797;</code> 1179 * 1180 * @return The selfLink. 1181 */ 1182 @java.lang.Override getSelfLink()1183 public java.lang.String getSelfLink() { 1184 java.lang.Object ref = selfLink_; 1185 if (ref instanceof java.lang.String) { 1186 return (java.lang.String) ref; 1187 } else { 1188 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1189 java.lang.String s = bs.toStringUtf8(); 1190 selfLink_ = s; 1191 return s; 1192 } 1193 } 1194 /** 1195 * 1196 * 1197 * <pre> 1198 * [Output Only] Server-defined URL for the resource. 1199 * </pre> 1200 * 1201 * <code>optional string self_link = 456214797;</code> 1202 * 1203 * @return The bytes for selfLink. 1204 */ 1205 @java.lang.Override getSelfLinkBytes()1206 public com.google.protobuf.ByteString getSelfLinkBytes() { 1207 java.lang.Object ref = selfLink_; 1208 if (ref instanceof java.lang.String) { 1209 com.google.protobuf.ByteString b = 1210 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1211 selfLink_ = b; 1212 return b; 1213 } else { 1214 return (com.google.protobuf.ByteString) ref; 1215 } 1216 } 1217 1218 public static final int SERVER_BINDING_FIELD_NUMBER = 208179593; 1219 private com.google.cloud.compute.v1.ServerBinding serverBinding_; 1220 /** 1221 * 1222 * 1223 * <pre> 1224 * Sets the binding properties for the physical server. Valid values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information. 1225 * </pre> 1226 * 1227 * <code>optional .google.cloud.compute.v1.ServerBinding server_binding = 208179593;</code> 1228 * 1229 * @return Whether the serverBinding field is set. 1230 */ 1231 @java.lang.Override hasServerBinding()1232 public boolean hasServerBinding() { 1233 return ((bitField0_ & 0x00000400) != 0); 1234 } 1235 /** 1236 * 1237 * 1238 * <pre> 1239 * Sets the binding properties for the physical server. Valid values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information. 1240 * </pre> 1241 * 1242 * <code>optional .google.cloud.compute.v1.ServerBinding server_binding = 208179593;</code> 1243 * 1244 * @return The serverBinding. 1245 */ 1246 @java.lang.Override getServerBinding()1247 public com.google.cloud.compute.v1.ServerBinding getServerBinding() { 1248 return serverBinding_ == null 1249 ? com.google.cloud.compute.v1.ServerBinding.getDefaultInstance() 1250 : serverBinding_; 1251 } 1252 /** 1253 * 1254 * 1255 * <pre> 1256 * Sets the binding properties for the physical server. Valid values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information. 1257 * </pre> 1258 * 1259 * <code>optional .google.cloud.compute.v1.ServerBinding server_binding = 208179593;</code> 1260 */ 1261 @java.lang.Override getServerBindingOrBuilder()1262 public com.google.cloud.compute.v1.ServerBindingOrBuilder getServerBindingOrBuilder() { 1263 return serverBinding_ == null 1264 ? com.google.cloud.compute.v1.ServerBinding.getDefaultInstance() 1265 : serverBinding_; 1266 } 1267 1268 public static final int STATUS_FIELD_NUMBER = 181260274; 1269 1270 @SuppressWarnings("serial") 1271 private volatile java.lang.Object status_ = ""; 1272 /** 1273 * 1274 * 1275 * <pre> 1276 * [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING. 1277 * Check the Status enum for the list of possible values. 1278 * </pre> 1279 * 1280 * <code>optional string status = 181260274;</code> 1281 * 1282 * @return Whether the status field is set. 1283 */ 1284 @java.lang.Override hasStatus()1285 public boolean hasStatus() { 1286 return ((bitField0_ & 0x00000800) != 0); 1287 } 1288 /** 1289 * 1290 * 1291 * <pre> 1292 * [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING. 1293 * Check the Status enum for the list of possible values. 1294 * </pre> 1295 * 1296 * <code>optional string status = 181260274;</code> 1297 * 1298 * @return The status. 1299 */ 1300 @java.lang.Override getStatus()1301 public java.lang.String getStatus() { 1302 java.lang.Object ref = status_; 1303 if (ref instanceof java.lang.String) { 1304 return (java.lang.String) ref; 1305 } else { 1306 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1307 java.lang.String s = bs.toStringUtf8(); 1308 status_ = s; 1309 return s; 1310 } 1311 } 1312 /** 1313 * 1314 * 1315 * <pre> 1316 * [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING. 1317 * Check the Status enum for the list of possible values. 1318 * </pre> 1319 * 1320 * <code>optional string status = 181260274;</code> 1321 * 1322 * @return The bytes for status. 1323 */ 1324 @java.lang.Override getStatusBytes()1325 public com.google.protobuf.ByteString getStatusBytes() { 1326 java.lang.Object ref = status_; 1327 if (ref instanceof java.lang.String) { 1328 com.google.protobuf.ByteString b = 1329 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1330 status_ = b; 1331 return b; 1332 } else { 1333 return (com.google.protobuf.ByteString) ref; 1334 } 1335 } 1336 1337 public static final int STATUS_MESSAGE_FIELD_NUMBER = 297428154; 1338 1339 @SuppressWarnings("serial") 1340 private volatile java.lang.Object statusMessage_ = ""; 1341 /** 1342 * 1343 * 1344 * <pre> 1345 * [Output Only] An optional, human-readable explanation of the status. 1346 * </pre> 1347 * 1348 * <code>optional string status_message = 297428154;</code> 1349 * 1350 * @return Whether the statusMessage field is set. 1351 */ 1352 @java.lang.Override hasStatusMessage()1353 public boolean hasStatusMessage() { 1354 return ((bitField0_ & 0x00001000) != 0); 1355 } 1356 /** 1357 * 1358 * 1359 * <pre> 1360 * [Output Only] An optional, human-readable explanation of the status. 1361 * </pre> 1362 * 1363 * <code>optional string status_message = 297428154;</code> 1364 * 1365 * @return The statusMessage. 1366 */ 1367 @java.lang.Override getStatusMessage()1368 public java.lang.String getStatusMessage() { 1369 java.lang.Object ref = statusMessage_; 1370 if (ref instanceof java.lang.String) { 1371 return (java.lang.String) ref; 1372 } else { 1373 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1374 java.lang.String s = bs.toStringUtf8(); 1375 statusMessage_ = s; 1376 return s; 1377 } 1378 } 1379 /** 1380 * 1381 * 1382 * <pre> 1383 * [Output Only] An optional, human-readable explanation of the status. 1384 * </pre> 1385 * 1386 * <code>optional string status_message = 297428154;</code> 1387 * 1388 * @return The bytes for statusMessage. 1389 */ 1390 @java.lang.Override getStatusMessageBytes()1391 public com.google.protobuf.ByteString getStatusMessageBytes() { 1392 java.lang.Object ref = statusMessage_; 1393 if (ref instanceof java.lang.String) { 1394 com.google.protobuf.ByteString b = 1395 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1396 statusMessage_ = b; 1397 return b; 1398 } else { 1399 return (com.google.protobuf.ByteString) ref; 1400 } 1401 } 1402 1403 private byte memoizedIsInitialized = -1; 1404 1405 @java.lang.Override isInitialized()1406 public final boolean isInitialized() { 1407 byte isInitialized = memoizedIsInitialized; 1408 if (isInitialized == 1) return true; 1409 if (isInitialized == 0) return false; 1410 1411 memoizedIsInitialized = 1; 1412 return true; 1413 } 1414 1415 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)1416 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 1417 if (((bitField0_ & 0x00000008) != 0)) { 1418 output.writeUInt64(3355, id_); 1419 } 1420 if (((bitField0_ & 0x00000010) != 0)) { 1421 com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_); 1422 } 1423 if (((bitField0_ & 0x00000020) != 0)) { 1424 com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_); 1425 } 1426 if (((bitField0_ & 0x00000002) != 0)) { 1427 com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_); 1428 } 1429 for (int i = 0; i < disks_.size(); i++) { 1430 output.writeMessage(95594102, disks_.get(i)); 1431 } 1432 if (((bitField0_ & 0x00000100) != 0)) { 1433 com.google.protobuf.GeneratedMessageV3.writeString(output, 138946292, region_); 1434 } 1435 if (((bitField0_ & 0x00000800) != 0)) { 1436 com.google.protobuf.GeneratedMessageV3.writeString(output, 181260274, status_); 1437 } 1438 if (((bitField0_ & 0x00000400) != 0)) { 1439 output.writeMessage(208179593, getServerBinding()); 1440 } 1441 if (((bitField0_ & 0x00000001) != 0)) { 1442 com.google.protobuf.GeneratedMessageV3.writeString(output, 247727959, cpuOvercommitType_); 1443 } 1444 for (int i = 0; i < accelerators_.size(); i++) { 1445 output.writeMessage(269577064, accelerators_.get(i)); 1446 } 1447 if (((bitField0_ & 0x00001000) != 0)) { 1448 com.google.protobuf.GeneratedMessageV3.writeString(output, 297428154, statusMessage_); 1449 } 1450 if (((bitField0_ & 0x00000080) != 0)) { 1451 output.writeMessage(315257905, getNodeTypeFlexibility()); 1452 } 1453 com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( 1454 output, 1455 internalGetNodeAffinityLabels(), 1456 NodeAffinityLabelsDefaultEntryHolder.defaultEntry, 1457 339007161); 1458 if (((bitField0_ & 0x00000004) != 0)) { 1459 com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); 1460 } 1461 if (((bitField0_ & 0x00000200) != 0)) { 1462 com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); 1463 } 1464 if (((bitField0_ & 0x00000040) != 0)) { 1465 com.google.protobuf.GeneratedMessageV3.writeString(output, 465832791, nodeType_); 1466 } 1467 getUnknownFields().writeTo(output); 1468 } 1469 1470 @java.lang.Override getSerializedSize()1471 public int getSerializedSize() { 1472 int size = memoizedSize; 1473 if (size != -1) return size; 1474 1475 size = 0; 1476 if (((bitField0_ & 0x00000008) != 0)) { 1477 size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_); 1478 } 1479 if (((bitField0_ & 0x00000010) != 0)) { 1480 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_); 1481 } 1482 if (((bitField0_ & 0x00000020) != 0)) { 1483 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_); 1484 } 1485 if (((bitField0_ & 0x00000002) != 0)) { 1486 size += 1487 com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_); 1488 } 1489 for (int i = 0; i < disks_.size(); i++) { 1490 size += com.google.protobuf.CodedOutputStream.computeMessageSize(95594102, disks_.get(i)); 1491 } 1492 if (((bitField0_ & 0x00000100) != 0)) { 1493 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(138946292, region_); 1494 } 1495 if (((bitField0_ & 0x00000800) != 0)) { 1496 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(181260274, status_); 1497 } 1498 if (((bitField0_ & 0x00000400) != 0)) { 1499 size += 1500 com.google.protobuf.CodedOutputStream.computeMessageSize(208179593, getServerBinding()); 1501 } 1502 if (((bitField0_ & 0x00000001) != 0)) { 1503 size += 1504 com.google.protobuf.GeneratedMessageV3.computeStringSize(247727959, cpuOvercommitType_); 1505 } 1506 for (int i = 0; i < accelerators_.size(); i++) { 1507 size += 1508 com.google.protobuf.CodedOutputStream.computeMessageSize(269577064, accelerators_.get(i)); 1509 } 1510 if (((bitField0_ & 0x00001000) != 0)) { 1511 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(297428154, statusMessage_); 1512 } 1513 if (((bitField0_ & 0x00000080) != 0)) { 1514 size += 1515 com.google.protobuf.CodedOutputStream.computeMessageSize( 1516 315257905, getNodeTypeFlexibility()); 1517 } 1518 for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : 1519 internalGetNodeAffinityLabels().getMap().entrySet()) { 1520 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> nodeAffinityLabels__ = 1521 NodeAffinityLabelsDefaultEntryHolder.defaultEntry 1522 .newBuilderForType() 1523 .setKey(entry.getKey()) 1524 .setValue(entry.getValue()) 1525 .build(); 1526 size += 1527 com.google.protobuf.CodedOutputStream.computeMessageSize(339007161, nodeAffinityLabels__); 1528 } 1529 if (((bitField0_ & 0x00000004) != 0)) { 1530 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); 1531 } 1532 if (((bitField0_ & 0x00000200) != 0)) { 1533 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); 1534 } 1535 if (((bitField0_ & 0x00000040) != 0)) { 1536 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(465832791, nodeType_); 1537 } 1538 size += getUnknownFields().getSerializedSize(); 1539 memoizedSize = size; 1540 return size; 1541 } 1542 1543 @java.lang.Override equals(final java.lang.Object obj)1544 public boolean equals(final java.lang.Object obj) { 1545 if (obj == this) { 1546 return true; 1547 } 1548 if (!(obj instanceof com.google.cloud.compute.v1.NodeTemplate)) { 1549 return super.equals(obj); 1550 } 1551 com.google.cloud.compute.v1.NodeTemplate other = (com.google.cloud.compute.v1.NodeTemplate) obj; 1552 1553 if (!getAcceleratorsList().equals(other.getAcceleratorsList())) return false; 1554 if (hasCpuOvercommitType() != other.hasCpuOvercommitType()) return false; 1555 if (hasCpuOvercommitType()) { 1556 if (!getCpuOvercommitType().equals(other.getCpuOvercommitType())) return false; 1557 } 1558 if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false; 1559 if (hasCreationTimestamp()) { 1560 if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false; 1561 } 1562 if (hasDescription() != other.hasDescription()) return false; 1563 if (hasDescription()) { 1564 if (!getDescription().equals(other.getDescription())) return false; 1565 } 1566 if (!getDisksList().equals(other.getDisksList())) return false; 1567 if (hasId() != other.hasId()) return false; 1568 if (hasId()) { 1569 if (getId() != other.getId()) return false; 1570 } 1571 if (hasKind() != other.hasKind()) return false; 1572 if (hasKind()) { 1573 if (!getKind().equals(other.getKind())) return false; 1574 } 1575 if (hasName() != other.hasName()) return false; 1576 if (hasName()) { 1577 if (!getName().equals(other.getName())) return false; 1578 } 1579 if (!internalGetNodeAffinityLabels().equals(other.internalGetNodeAffinityLabels())) 1580 return false; 1581 if (hasNodeType() != other.hasNodeType()) return false; 1582 if (hasNodeType()) { 1583 if (!getNodeType().equals(other.getNodeType())) return false; 1584 } 1585 if (hasNodeTypeFlexibility() != other.hasNodeTypeFlexibility()) return false; 1586 if (hasNodeTypeFlexibility()) { 1587 if (!getNodeTypeFlexibility().equals(other.getNodeTypeFlexibility())) return false; 1588 } 1589 if (hasRegion() != other.hasRegion()) return false; 1590 if (hasRegion()) { 1591 if (!getRegion().equals(other.getRegion())) return false; 1592 } 1593 if (hasSelfLink() != other.hasSelfLink()) return false; 1594 if (hasSelfLink()) { 1595 if (!getSelfLink().equals(other.getSelfLink())) return false; 1596 } 1597 if (hasServerBinding() != other.hasServerBinding()) return false; 1598 if (hasServerBinding()) { 1599 if (!getServerBinding().equals(other.getServerBinding())) return false; 1600 } 1601 if (hasStatus() != other.hasStatus()) return false; 1602 if (hasStatus()) { 1603 if (!getStatus().equals(other.getStatus())) return false; 1604 } 1605 if (hasStatusMessage() != other.hasStatusMessage()) return false; 1606 if (hasStatusMessage()) { 1607 if (!getStatusMessage().equals(other.getStatusMessage())) return false; 1608 } 1609 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1610 return true; 1611 } 1612 1613 @java.lang.Override hashCode()1614 public int hashCode() { 1615 if (memoizedHashCode != 0) { 1616 return memoizedHashCode; 1617 } 1618 int hash = 41; 1619 hash = (19 * hash) + getDescriptor().hashCode(); 1620 if (getAcceleratorsCount() > 0) { 1621 hash = (37 * hash) + ACCELERATORS_FIELD_NUMBER; 1622 hash = (53 * hash) + getAcceleratorsList().hashCode(); 1623 } 1624 if (hasCpuOvercommitType()) { 1625 hash = (37 * hash) + CPU_OVERCOMMIT_TYPE_FIELD_NUMBER; 1626 hash = (53 * hash) + getCpuOvercommitType().hashCode(); 1627 } 1628 if (hasCreationTimestamp()) { 1629 hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER; 1630 hash = (53 * hash) + getCreationTimestamp().hashCode(); 1631 } 1632 if (hasDescription()) { 1633 hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; 1634 hash = (53 * hash) + getDescription().hashCode(); 1635 } 1636 if (getDisksCount() > 0) { 1637 hash = (37 * hash) + DISKS_FIELD_NUMBER; 1638 hash = (53 * hash) + getDisksList().hashCode(); 1639 } 1640 if (hasId()) { 1641 hash = (37 * hash) + ID_FIELD_NUMBER; 1642 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId()); 1643 } 1644 if (hasKind()) { 1645 hash = (37 * hash) + KIND_FIELD_NUMBER; 1646 hash = (53 * hash) + getKind().hashCode(); 1647 } 1648 if (hasName()) { 1649 hash = (37 * hash) + NAME_FIELD_NUMBER; 1650 hash = (53 * hash) + getName().hashCode(); 1651 } 1652 if (!internalGetNodeAffinityLabels().getMap().isEmpty()) { 1653 hash = (37 * hash) + NODE_AFFINITY_LABELS_FIELD_NUMBER; 1654 hash = (53 * hash) + internalGetNodeAffinityLabels().hashCode(); 1655 } 1656 if (hasNodeType()) { 1657 hash = (37 * hash) + NODE_TYPE_FIELD_NUMBER; 1658 hash = (53 * hash) + getNodeType().hashCode(); 1659 } 1660 if (hasNodeTypeFlexibility()) { 1661 hash = (37 * hash) + NODE_TYPE_FLEXIBILITY_FIELD_NUMBER; 1662 hash = (53 * hash) + getNodeTypeFlexibility().hashCode(); 1663 } 1664 if (hasRegion()) { 1665 hash = (37 * hash) + REGION_FIELD_NUMBER; 1666 hash = (53 * hash) + getRegion().hashCode(); 1667 } 1668 if (hasSelfLink()) { 1669 hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; 1670 hash = (53 * hash) + getSelfLink().hashCode(); 1671 } 1672 if (hasServerBinding()) { 1673 hash = (37 * hash) + SERVER_BINDING_FIELD_NUMBER; 1674 hash = (53 * hash) + getServerBinding().hashCode(); 1675 } 1676 if (hasStatus()) { 1677 hash = (37 * hash) + STATUS_FIELD_NUMBER; 1678 hash = (53 * hash) + getStatus().hashCode(); 1679 } 1680 if (hasStatusMessage()) { 1681 hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; 1682 hash = (53 * hash) + getStatusMessage().hashCode(); 1683 } 1684 hash = (29 * hash) + getUnknownFields().hashCode(); 1685 memoizedHashCode = hash; 1686 return hash; 1687 } 1688 parseFrom(java.nio.ByteBuffer data)1689 public static com.google.cloud.compute.v1.NodeTemplate parseFrom(java.nio.ByteBuffer data) 1690 throws com.google.protobuf.InvalidProtocolBufferException { 1691 return PARSER.parseFrom(data); 1692 } 1693 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1694 public static com.google.cloud.compute.v1.NodeTemplate parseFrom( 1695 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1696 throws com.google.protobuf.InvalidProtocolBufferException { 1697 return PARSER.parseFrom(data, extensionRegistry); 1698 } 1699 parseFrom( com.google.protobuf.ByteString data)1700 public static com.google.cloud.compute.v1.NodeTemplate parseFrom( 1701 com.google.protobuf.ByteString data) 1702 throws com.google.protobuf.InvalidProtocolBufferException { 1703 return PARSER.parseFrom(data); 1704 } 1705 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1706 public static com.google.cloud.compute.v1.NodeTemplate parseFrom( 1707 com.google.protobuf.ByteString data, 1708 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1709 throws com.google.protobuf.InvalidProtocolBufferException { 1710 return PARSER.parseFrom(data, extensionRegistry); 1711 } 1712 parseFrom(byte[] data)1713 public static com.google.cloud.compute.v1.NodeTemplate parseFrom(byte[] data) 1714 throws com.google.protobuf.InvalidProtocolBufferException { 1715 return PARSER.parseFrom(data); 1716 } 1717 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1718 public static com.google.cloud.compute.v1.NodeTemplate parseFrom( 1719 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1720 throws com.google.protobuf.InvalidProtocolBufferException { 1721 return PARSER.parseFrom(data, extensionRegistry); 1722 } 1723 parseFrom(java.io.InputStream input)1724 public static com.google.cloud.compute.v1.NodeTemplate parseFrom(java.io.InputStream input) 1725 throws java.io.IOException { 1726 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1727 } 1728 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1729 public static com.google.cloud.compute.v1.NodeTemplate parseFrom( 1730 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1731 throws java.io.IOException { 1732 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1733 PARSER, input, extensionRegistry); 1734 } 1735 parseDelimitedFrom( java.io.InputStream input)1736 public static com.google.cloud.compute.v1.NodeTemplate parseDelimitedFrom( 1737 java.io.InputStream input) throws java.io.IOException { 1738 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1739 } 1740 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1741 public static com.google.cloud.compute.v1.NodeTemplate parseDelimitedFrom( 1742 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1743 throws java.io.IOException { 1744 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1745 PARSER, input, extensionRegistry); 1746 } 1747 parseFrom( com.google.protobuf.CodedInputStream input)1748 public static com.google.cloud.compute.v1.NodeTemplate parseFrom( 1749 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1750 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1751 } 1752 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1753 public static com.google.cloud.compute.v1.NodeTemplate parseFrom( 1754 com.google.protobuf.CodedInputStream input, 1755 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1756 throws java.io.IOException { 1757 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1758 PARSER, input, extensionRegistry); 1759 } 1760 1761 @java.lang.Override newBuilderForType()1762 public Builder newBuilderForType() { 1763 return newBuilder(); 1764 } 1765 newBuilder()1766 public static Builder newBuilder() { 1767 return DEFAULT_INSTANCE.toBuilder(); 1768 } 1769 newBuilder(com.google.cloud.compute.v1.NodeTemplate prototype)1770 public static Builder newBuilder(com.google.cloud.compute.v1.NodeTemplate prototype) { 1771 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1772 } 1773 1774 @java.lang.Override toBuilder()1775 public Builder toBuilder() { 1776 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1777 } 1778 1779 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1780 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1781 Builder builder = new Builder(parent); 1782 return builder; 1783 } 1784 /** 1785 * 1786 * 1787 * <pre> 1788 * Represent a sole-tenant Node Template resource. You can use a template to define properties for nodes in a node group. For more information, read Creating node groups and instances. 1789 * </pre> 1790 * 1791 * Protobuf type {@code google.cloud.compute.v1.NodeTemplate} 1792 */ 1793 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1794 implements 1795 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.NodeTemplate) 1796 com.google.cloud.compute.v1.NodeTemplateOrBuilder { getDescriptor()1797 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1798 return com.google.cloud.compute.v1.Compute 1799 .internal_static_google_cloud_compute_v1_NodeTemplate_descriptor; 1800 } 1801 1802 @SuppressWarnings({"rawtypes"}) internalGetMapField(int number)1803 protected com.google.protobuf.MapField internalGetMapField(int number) { 1804 switch (number) { 1805 case 339007161: 1806 return internalGetNodeAffinityLabels(); 1807 default: 1808 throw new RuntimeException("Invalid map field number: " + number); 1809 } 1810 } 1811 1812 @SuppressWarnings({"rawtypes"}) internalGetMutableMapField(int number)1813 protected com.google.protobuf.MapField internalGetMutableMapField(int number) { 1814 switch (number) { 1815 case 339007161: 1816 return internalGetMutableNodeAffinityLabels(); 1817 default: 1818 throw new RuntimeException("Invalid map field number: " + number); 1819 } 1820 } 1821 1822 @java.lang.Override 1823 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1824 internalGetFieldAccessorTable() { 1825 return com.google.cloud.compute.v1.Compute 1826 .internal_static_google_cloud_compute_v1_NodeTemplate_fieldAccessorTable 1827 .ensureFieldAccessorsInitialized( 1828 com.google.cloud.compute.v1.NodeTemplate.class, 1829 com.google.cloud.compute.v1.NodeTemplate.Builder.class); 1830 } 1831 1832 // Construct using com.google.cloud.compute.v1.NodeTemplate.newBuilder() Builder()1833 private Builder() { 1834 maybeForceBuilderInitialization(); 1835 } 1836 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1837 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1838 super(parent); 1839 maybeForceBuilderInitialization(); 1840 } 1841 maybeForceBuilderInitialization()1842 private void maybeForceBuilderInitialization() { 1843 if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { 1844 getAcceleratorsFieldBuilder(); 1845 getDisksFieldBuilder(); 1846 getNodeTypeFlexibilityFieldBuilder(); 1847 getServerBindingFieldBuilder(); 1848 } 1849 } 1850 1851 @java.lang.Override clear()1852 public Builder clear() { 1853 super.clear(); 1854 bitField0_ = 0; 1855 if (acceleratorsBuilder_ == null) { 1856 accelerators_ = java.util.Collections.emptyList(); 1857 } else { 1858 accelerators_ = null; 1859 acceleratorsBuilder_.clear(); 1860 } 1861 bitField0_ = (bitField0_ & ~0x00000001); 1862 cpuOvercommitType_ = ""; 1863 creationTimestamp_ = ""; 1864 description_ = ""; 1865 if (disksBuilder_ == null) { 1866 disks_ = java.util.Collections.emptyList(); 1867 } else { 1868 disks_ = null; 1869 disksBuilder_.clear(); 1870 } 1871 bitField0_ = (bitField0_ & ~0x00000010); 1872 id_ = 0L; 1873 kind_ = ""; 1874 name_ = ""; 1875 internalGetMutableNodeAffinityLabels().clear(); 1876 nodeType_ = ""; 1877 nodeTypeFlexibility_ = null; 1878 if (nodeTypeFlexibilityBuilder_ != null) { 1879 nodeTypeFlexibilityBuilder_.dispose(); 1880 nodeTypeFlexibilityBuilder_ = null; 1881 } 1882 region_ = ""; 1883 selfLink_ = ""; 1884 serverBinding_ = null; 1885 if (serverBindingBuilder_ != null) { 1886 serverBindingBuilder_.dispose(); 1887 serverBindingBuilder_ = null; 1888 } 1889 status_ = ""; 1890 statusMessage_ = ""; 1891 return this; 1892 } 1893 1894 @java.lang.Override getDescriptorForType()1895 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1896 return com.google.cloud.compute.v1.Compute 1897 .internal_static_google_cloud_compute_v1_NodeTemplate_descriptor; 1898 } 1899 1900 @java.lang.Override getDefaultInstanceForType()1901 public com.google.cloud.compute.v1.NodeTemplate getDefaultInstanceForType() { 1902 return com.google.cloud.compute.v1.NodeTemplate.getDefaultInstance(); 1903 } 1904 1905 @java.lang.Override build()1906 public com.google.cloud.compute.v1.NodeTemplate build() { 1907 com.google.cloud.compute.v1.NodeTemplate result = buildPartial(); 1908 if (!result.isInitialized()) { 1909 throw newUninitializedMessageException(result); 1910 } 1911 return result; 1912 } 1913 1914 @java.lang.Override buildPartial()1915 public com.google.cloud.compute.v1.NodeTemplate buildPartial() { 1916 com.google.cloud.compute.v1.NodeTemplate result = 1917 new com.google.cloud.compute.v1.NodeTemplate(this); 1918 buildPartialRepeatedFields(result); 1919 if (bitField0_ != 0) { 1920 buildPartial0(result); 1921 } 1922 onBuilt(); 1923 return result; 1924 } 1925 buildPartialRepeatedFields(com.google.cloud.compute.v1.NodeTemplate result)1926 private void buildPartialRepeatedFields(com.google.cloud.compute.v1.NodeTemplate result) { 1927 if (acceleratorsBuilder_ == null) { 1928 if (((bitField0_ & 0x00000001) != 0)) { 1929 accelerators_ = java.util.Collections.unmodifiableList(accelerators_); 1930 bitField0_ = (bitField0_ & ~0x00000001); 1931 } 1932 result.accelerators_ = accelerators_; 1933 } else { 1934 result.accelerators_ = acceleratorsBuilder_.build(); 1935 } 1936 if (disksBuilder_ == null) { 1937 if (((bitField0_ & 0x00000010) != 0)) { 1938 disks_ = java.util.Collections.unmodifiableList(disks_); 1939 bitField0_ = (bitField0_ & ~0x00000010); 1940 } 1941 result.disks_ = disks_; 1942 } else { 1943 result.disks_ = disksBuilder_.build(); 1944 } 1945 } 1946 buildPartial0(com.google.cloud.compute.v1.NodeTemplate result)1947 private void buildPartial0(com.google.cloud.compute.v1.NodeTemplate result) { 1948 int from_bitField0_ = bitField0_; 1949 int to_bitField0_ = 0; 1950 if (((from_bitField0_ & 0x00000002) != 0)) { 1951 result.cpuOvercommitType_ = cpuOvercommitType_; 1952 to_bitField0_ |= 0x00000001; 1953 } 1954 if (((from_bitField0_ & 0x00000004) != 0)) { 1955 result.creationTimestamp_ = creationTimestamp_; 1956 to_bitField0_ |= 0x00000002; 1957 } 1958 if (((from_bitField0_ & 0x00000008) != 0)) { 1959 result.description_ = description_; 1960 to_bitField0_ |= 0x00000004; 1961 } 1962 if (((from_bitField0_ & 0x00000020) != 0)) { 1963 result.id_ = id_; 1964 to_bitField0_ |= 0x00000008; 1965 } 1966 if (((from_bitField0_ & 0x00000040) != 0)) { 1967 result.kind_ = kind_; 1968 to_bitField0_ |= 0x00000010; 1969 } 1970 if (((from_bitField0_ & 0x00000080) != 0)) { 1971 result.name_ = name_; 1972 to_bitField0_ |= 0x00000020; 1973 } 1974 if (((from_bitField0_ & 0x00000100) != 0)) { 1975 result.nodeAffinityLabels_ = internalGetNodeAffinityLabels(); 1976 result.nodeAffinityLabels_.makeImmutable(); 1977 } 1978 if (((from_bitField0_ & 0x00000200) != 0)) { 1979 result.nodeType_ = nodeType_; 1980 to_bitField0_ |= 0x00000040; 1981 } 1982 if (((from_bitField0_ & 0x00000400) != 0)) { 1983 result.nodeTypeFlexibility_ = 1984 nodeTypeFlexibilityBuilder_ == null 1985 ? nodeTypeFlexibility_ 1986 : nodeTypeFlexibilityBuilder_.build(); 1987 to_bitField0_ |= 0x00000080; 1988 } 1989 if (((from_bitField0_ & 0x00000800) != 0)) { 1990 result.region_ = region_; 1991 to_bitField0_ |= 0x00000100; 1992 } 1993 if (((from_bitField0_ & 0x00001000) != 0)) { 1994 result.selfLink_ = selfLink_; 1995 to_bitField0_ |= 0x00000200; 1996 } 1997 if (((from_bitField0_ & 0x00002000) != 0)) { 1998 result.serverBinding_ = 1999 serverBindingBuilder_ == null ? serverBinding_ : serverBindingBuilder_.build(); 2000 to_bitField0_ |= 0x00000400; 2001 } 2002 if (((from_bitField0_ & 0x00004000) != 0)) { 2003 result.status_ = status_; 2004 to_bitField0_ |= 0x00000800; 2005 } 2006 if (((from_bitField0_ & 0x00008000) != 0)) { 2007 result.statusMessage_ = statusMessage_; 2008 to_bitField0_ |= 0x00001000; 2009 } 2010 result.bitField0_ |= to_bitField0_; 2011 } 2012 2013 @java.lang.Override clone()2014 public Builder clone() { 2015 return super.clone(); 2016 } 2017 2018 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2019 public Builder setField( 2020 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 2021 return super.setField(field, value); 2022 } 2023 2024 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)2025 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 2026 return super.clearField(field); 2027 } 2028 2029 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)2030 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 2031 return super.clearOneof(oneof); 2032 } 2033 2034 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)2035 public Builder setRepeatedField( 2036 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 2037 return super.setRepeatedField(field, index, value); 2038 } 2039 2040 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2041 public Builder addRepeatedField( 2042 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 2043 return super.addRepeatedField(field, value); 2044 } 2045 2046 @java.lang.Override mergeFrom(com.google.protobuf.Message other)2047 public Builder mergeFrom(com.google.protobuf.Message other) { 2048 if (other instanceof com.google.cloud.compute.v1.NodeTemplate) { 2049 return mergeFrom((com.google.cloud.compute.v1.NodeTemplate) other); 2050 } else { 2051 super.mergeFrom(other); 2052 return this; 2053 } 2054 } 2055 mergeFrom(com.google.cloud.compute.v1.NodeTemplate other)2056 public Builder mergeFrom(com.google.cloud.compute.v1.NodeTemplate other) { 2057 if (other == com.google.cloud.compute.v1.NodeTemplate.getDefaultInstance()) return this; 2058 if (acceleratorsBuilder_ == null) { 2059 if (!other.accelerators_.isEmpty()) { 2060 if (accelerators_.isEmpty()) { 2061 accelerators_ = other.accelerators_; 2062 bitField0_ = (bitField0_ & ~0x00000001); 2063 } else { 2064 ensureAcceleratorsIsMutable(); 2065 accelerators_.addAll(other.accelerators_); 2066 } 2067 onChanged(); 2068 } 2069 } else { 2070 if (!other.accelerators_.isEmpty()) { 2071 if (acceleratorsBuilder_.isEmpty()) { 2072 acceleratorsBuilder_.dispose(); 2073 acceleratorsBuilder_ = null; 2074 accelerators_ = other.accelerators_; 2075 bitField0_ = (bitField0_ & ~0x00000001); 2076 acceleratorsBuilder_ = 2077 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 2078 ? getAcceleratorsFieldBuilder() 2079 : null; 2080 } else { 2081 acceleratorsBuilder_.addAllMessages(other.accelerators_); 2082 } 2083 } 2084 } 2085 if (other.hasCpuOvercommitType()) { 2086 cpuOvercommitType_ = other.cpuOvercommitType_; 2087 bitField0_ |= 0x00000002; 2088 onChanged(); 2089 } 2090 if (other.hasCreationTimestamp()) { 2091 creationTimestamp_ = other.creationTimestamp_; 2092 bitField0_ |= 0x00000004; 2093 onChanged(); 2094 } 2095 if (other.hasDescription()) { 2096 description_ = other.description_; 2097 bitField0_ |= 0x00000008; 2098 onChanged(); 2099 } 2100 if (disksBuilder_ == null) { 2101 if (!other.disks_.isEmpty()) { 2102 if (disks_.isEmpty()) { 2103 disks_ = other.disks_; 2104 bitField0_ = (bitField0_ & ~0x00000010); 2105 } else { 2106 ensureDisksIsMutable(); 2107 disks_.addAll(other.disks_); 2108 } 2109 onChanged(); 2110 } 2111 } else { 2112 if (!other.disks_.isEmpty()) { 2113 if (disksBuilder_.isEmpty()) { 2114 disksBuilder_.dispose(); 2115 disksBuilder_ = null; 2116 disks_ = other.disks_; 2117 bitField0_ = (bitField0_ & ~0x00000010); 2118 disksBuilder_ = 2119 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 2120 ? getDisksFieldBuilder() 2121 : null; 2122 } else { 2123 disksBuilder_.addAllMessages(other.disks_); 2124 } 2125 } 2126 } 2127 if (other.hasId()) { 2128 setId(other.getId()); 2129 } 2130 if (other.hasKind()) { 2131 kind_ = other.kind_; 2132 bitField0_ |= 0x00000040; 2133 onChanged(); 2134 } 2135 if (other.hasName()) { 2136 name_ = other.name_; 2137 bitField0_ |= 0x00000080; 2138 onChanged(); 2139 } 2140 internalGetMutableNodeAffinityLabels().mergeFrom(other.internalGetNodeAffinityLabels()); 2141 bitField0_ |= 0x00000100; 2142 if (other.hasNodeType()) { 2143 nodeType_ = other.nodeType_; 2144 bitField0_ |= 0x00000200; 2145 onChanged(); 2146 } 2147 if (other.hasNodeTypeFlexibility()) { 2148 mergeNodeTypeFlexibility(other.getNodeTypeFlexibility()); 2149 } 2150 if (other.hasRegion()) { 2151 region_ = other.region_; 2152 bitField0_ |= 0x00000800; 2153 onChanged(); 2154 } 2155 if (other.hasSelfLink()) { 2156 selfLink_ = other.selfLink_; 2157 bitField0_ |= 0x00001000; 2158 onChanged(); 2159 } 2160 if (other.hasServerBinding()) { 2161 mergeServerBinding(other.getServerBinding()); 2162 } 2163 if (other.hasStatus()) { 2164 status_ = other.status_; 2165 bitField0_ |= 0x00004000; 2166 onChanged(); 2167 } 2168 if (other.hasStatusMessage()) { 2169 statusMessage_ = other.statusMessage_; 2170 bitField0_ |= 0x00008000; 2171 onChanged(); 2172 } 2173 this.mergeUnknownFields(other.getUnknownFields()); 2174 onChanged(); 2175 return this; 2176 } 2177 2178 @java.lang.Override isInitialized()2179 public final boolean isInitialized() { 2180 return true; 2181 } 2182 2183 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2184 public Builder mergeFrom( 2185 com.google.protobuf.CodedInputStream input, 2186 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2187 throws java.io.IOException { 2188 if (extensionRegistry == null) { 2189 throw new java.lang.NullPointerException(); 2190 } 2191 try { 2192 boolean done = false; 2193 while (!done) { 2194 int tag = input.readTag(); 2195 switch (tag) { 2196 case 0: 2197 done = true; 2198 break; 2199 case 26840: 2200 { 2201 id_ = input.readUInt64(); 2202 bitField0_ |= 0x00000020; 2203 break; 2204 } // case 26840 2205 case 26336418: 2206 { 2207 kind_ = input.readStringRequireUtf8(); 2208 bitField0_ |= 0x00000040; 2209 break; 2210 } // case 26336418 2211 case 26989658: 2212 { 2213 name_ = input.readStringRequireUtf8(); 2214 bitField0_ |= 0x00000080; 2215 break; 2216 } // case 26989658 2217 case 244202930: 2218 { 2219 creationTimestamp_ = input.readStringRequireUtf8(); 2220 bitField0_ |= 0x00000004; 2221 break; 2222 } // case 244202930 2223 case 764752818: 2224 { 2225 com.google.cloud.compute.v1.LocalDisk m = 2226 input.readMessage( 2227 com.google.cloud.compute.v1.LocalDisk.parser(), extensionRegistry); 2228 if (disksBuilder_ == null) { 2229 ensureDisksIsMutable(); 2230 disks_.add(m); 2231 } else { 2232 disksBuilder_.addMessage(m); 2233 } 2234 break; 2235 } // case 764752818 2236 case 1111570338: 2237 { 2238 region_ = input.readStringRequireUtf8(); 2239 bitField0_ |= 0x00000800; 2240 break; 2241 } // case 1111570338 2242 case 1450082194: 2243 { 2244 status_ = input.readStringRequireUtf8(); 2245 bitField0_ |= 0x00004000; 2246 break; 2247 } // case 1450082194 2248 case 1665436746: 2249 { 2250 input.readMessage(getServerBindingFieldBuilder().getBuilder(), extensionRegistry); 2251 bitField0_ |= 0x00002000; 2252 break; 2253 } // case 1665436746 2254 case 1981823674: 2255 { 2256 cpuOvercommitType_ = input.readStringRequireUtf8(); 2257 bitField0_ |= 0x00000002; 2258 break; 2259 } // case 1981823674 2260 case -2138350782: 2261 { 2262 com.google.cloud.compute.v1.AcceleratorConfig m = 2263 input.readMessage( 2264 com.google.cloud.compute.v1.AcceleratorConfig.parser(), extensionRegistry); 2265 if (acceleratorsBuilder_ == null) { 2266 ensureAcceleratorsIsMutable(); 2267 accelerators_.add(m); 2268 } else { 2269 acceleratorsBuilder_.addMessage(m); 2270 } 2271 break; 2272 } // case -2138350782 2273 case -1915542062: 2274 { 2275 statusMessage_ = input.readStringRequireUtf8(); 2276 bitField0_ |= 0x00008000; 2277 break; 2278 } // case -1915542062 2279 case -1772904054: 2280 { 2281 input.readMessage( 2282 getNodeTypeFlexibilityFieldBuilder().getBuilder(), extensionRegistry); 2283 bitField0_ |= 0x00000400; 2284 break; 2285 } // case -1772904054 2286 case -1582910006: 2287 { 2288 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> 2289 nodeAffinityLabels__ = 2290 input.readMessage( 2291 NodeAffinityLabelsDefaultEntryHolder.defaultEntry.getParserForType(), 2292 extensionRegistry); 2293 internalGetMutableNodeAffinityLabels() 2294 .getMutableMap() 2295 .put(nodeAffinityLabels__.getKey(), nodeAffinityLabels__.getValue()); 2296 bitField0_ |= 0x00000100; 2297 break; 2298 } // case -1582910006 2299 case -911466526: 2300 { 2301 description_ = input.readStringRequireUtf8(); 2302 bitField0_ |= 0x00000008; 2303 break; 2304 } // case -911466526 2305 case -645248918: 2306 { 2307 selfLink_ = input.readStringRequireUtf8(); 2308 bitField0_ |= 0x00001000; 2309 break; 2310 } // case -645248918 2311 case -568304966: 2312 { 2313 nodeType_ = input.readStringRequireUtf8(); 2314 bitField0_ |= 0x00000200; 2315 break; 2316 } // case -568304966 2317 default: 2318 { 2319 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 2320 done = true; // was an endgroup tag 2321 } 2322 break; 2323 } // default: 2324 } // switch (tag) 2325 } // while (!done) 2326 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2327 throw e.unwrapIOException(); 2328 } finally { 2329 onChanged(); 2330 } // finally 2331 return this; 2332 } 2333 2334 private int bitField0_; 2335 2336 private java.util.List<com.google.cloud.compute.v1.AcceleratorConfig> accelerators_ = 2337 java.util.Collections.emptyList(); 2338 ensureAcceleratorsIsMutable()2339 private void ensureAcceleratorsIsMutable() { 2340 if (!((bitField0_ & 0x00000001) != 0)) { 2341 accelerators_ = 2342 new java.util.ArrayList<com.google.cloud.compute.v1.AcceleratorConfig>(accelerators_); 2343 bitField0_ |= 0x00000001; 2344 } 2345 } 2346 2347 private com.google.protobuf.RepeatedFieldBuilderV3< 2348 com.google.cloud.compute.v1.AcceleratorConfig, 2349 com.google.cloud.compute.v1.AcceleratorConfig.Builder, 2350 com.google.cloud.compute.v1.AcceleratorConfigOrBuilder> 2351 acceleratorsBuilder_; 2352 2353 /** 2354 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2355 */ getAcceleratorsList()2356 public java.util.List<com.google.cloud.compute.v1.AcceleratorConfig> getAcceleratorsList() { 2357 if (acceleratorsBuilder_ == null) { 2358 return java.util.Collections.unmodifiableList(accelerators_); 2359 } else { 2360 return acceleratorsBuilder_.getMessageList(); 2361 } 2362 } 2363 /** 2364 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2365 */ getAcceleratorsCount()2366 public int getAcceleratorsCount() { 2367 if (acceleratorsBuilder_ == null) { 2368 return accelerators_.size(); 2369 } else { 2370 return acceleratorsBuilder_.getCount(); 2371 } 2372 } 2373 /** 2374 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2375 */ getAccelerators(int index)2376 public com.google.cloud.compute.v1.AcceleratorConfig getAccelerators(int index) { 2377 if (acceleratorsBuilder_ == null) { 2378 return accelerators_.get(index); 2379 } else { 2380 return acceleratorsBuilder_.getMessage(index); 2381 } 2382 } 2383 /** 2384 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2385 */ setAccelerators(int index, com.google.cloud.compute.v1.AcceleratorConfig value)2386 public Builder setAccelerators(int index, com.google.cloud.compute.v1.AcceleratorConfig value) { 2387 if (acceleratorsBuilder_ == null) { 2388 if (value == null) { 2389 throw new NullPointerException(); 2390 } 2391 ensureAcceleratorsIsMutable(); 2392 accelerators_.set(index, value); 2393 onChanged(); 2394 } else { 2395 acceleratorsBuilder_.setMessage(index, value); 2396 } 2397 return this; 2398 } 2399 /** 2400 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2401 */ setAccelerators( int index, com.google.cloud.compute.v1.AcceleratorConfig.Builder builderForValue)2402 public Builder setAccelerators( 2403 int index, com.google.cloud.compute.v1.AcceleratorConfig.Builder builderForValue) { 2404 if (acceleratorsBuilder_ == null) { 2405 ensureAcceleratorsIsMutable(); 2406 accelerators_.set(index, builderForValue.build()); 2407 onChanged(); 2408 } else { 2409 acceleratorsBuilder_.setMessage(index, builderForValue.build()); 2410 } 2411 return this; 2412 } 2413 /** 2414 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2415 */ addAccelerators(com.google.cloud.compute.v1.AcceleratorConfig value)2416 public Builder addAccelerators(com.google.cloud.compute.v1.AcceleratorConfig value) { 2417 if (acceleratorsBuilder_ == null) { 2418 if (value == null) { 2419 throw new NullPointerException(); 2420 } 2421 ensureAcceleratorsIsMutable(); 2422 accelerators_.add(value); 2423 onChanged(); 2424 } else { 2425 acceleratorsBuilder_.addMessage(value); 2426 } 2427 return this; 2428 } 2429 /** 2430 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2431 */ addAccelerators(int index, com.google.cloud.compute.v1.AcceleratorConfig value)2432 public Builder addAccelerators(int index, com.google.cloud.compute.v1.AcceleratorConfig value) { 2433 if (acceleratorsBuilder_ == null) { 2434 if (value == null) { 2435 throw new NullPointerException(); 2436 } 2437 ensureAcceleratorsIsMutable(); 2438 accelerators_.add(index, value); 2439 onChanged(); 2440 } else { 2441 acceleratorsBuilder_.addMessage(index, value); 2442 } 2443 return this; 2444 } 2445 /** 2446 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2447 */ addAccelerators( com.google.cloud.compute.v1.AcceleratorConfig.Builder builderForValue)2448 public Builder addAccelerators( 2449 com.google.cloud.compute.v1.AcceleratorConfig.Builder builderForValue) { 2450 if (acceleratorsBuilder_ == null) { 2451 ensureAcceleratorsIsMutable(); 2452 accelerators_.add(builderForValue.build()); 2453 onChanged(); 2454 } else { 2455 acceleratorsBuilder_.addMessage(builderForValue.build()); 2456 } 2457 return this; 2458 } 2459 /** 2460 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2461 */ addAccelerators( int index, com.google.cloud.compute.v1.AcceleratorConfig.Builder builderForValue)2462 public Builder addAccelerators( 2463 int index, com.google.cloud.compute.v1.AcceleratorConfig.Builder builderForValue) { 2464 if (acceleratorsBuilder_ == null) { 2465 ensureAcceleratorsIsMutable(); 2466 accelerators_.add(index, builderForValue.build()); 2467 onChanged(); 2468 } else { 2469 acceleratorsBuilder_.addMessage(index, builderForValue.build()); 2470 } 2471 return this; 2472 } 2473 /** 2474 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2475 */ addAllAccelerators( java.lang.Iterable<? extends com.google.cloud.compute.v1.AcceleratorConfig> values)2476 public Builder addAllAccelerators( 2477 java.lang.Iterable<? extends com.google.cloud.compute.v1.AcceleratorConfig> values) { 2478 if (acceleratorsBuilder_ == null) { 2479 ensureAcceleratorsIsMutable(); 2480 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accelerators_); 2481 onChanged(); 2482 } else { 2483 acceleratorsBuilder_.addAllMessages(values); 2484 } 2485 return this; 2486 } 2487 /** 2488 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2489 */ clearAccelerators()2490 public Builder clearAccelerators() { 2491 if (acceleratorsBuilder_ == null) { 2492 accelerators_ = java.util.Collections.emptyList(); 2493 bitField0_ = (bitField0_ & ~0x00000001); 2494 onChanged(); 2495 } else { 2496 acceleratorsBuilder_.clear(); 2497 } 2498 return this; 2499 } 2500 /** 2501 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2502 */ removeAccelerators(int index)2503 public Builder removeAccelerators(int index) { 2504 if (acceleratorsBuilder_ == null) { 2505 ensureAcceleratorsIsMutable(); 2506 accelerators_.remove(index); 2507 onChanged(); 2508 } else { 2509 acceleratorsBuilder_.remove(index); 2510 } 2511 return this; 2512 } 2513 /** 2514 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2515 */ getAcceleratorsBuilder(int index)2516 public com.google.cloud.compute.v1.AcceleratorConfig.Builder getAcceleratorsBuilder(int index) { 2517 return getAcceleratorsFieldBuilder().getBuilder(index); 2518 } 2519 /** 2520 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2521 */ getAcceleratorsOrBuilder( int index)2522 public com.google.cloud.compute.v1.AcceleratorConfigOrBuilder getAcceleratorsOrBuilder( 2523 int index) { 2524 if (acceleratorsBuilder_ == null) { 2525 return accelerators_.get(index); 2526 } else { 2527 return acceleratorsBuilder_.getMessageOrBuilder(index); 2528 } 2529 } 2530 /** 2531 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2532 */ 2533 public java.util.List<? extends com.google.cloud.compute.v1.AcceleratorConfigOrBuilder> getAcceleratorsOrBuilderList()2534 getAcceleratorsOrBuilderList() { 2535 if (acceleratorsBuilder_ != null) { 2536 return acceleratorsBuilder_.getMessageOrBuilderList(); 2537 } else { 2538 return java.util.Collections.unmodifiableList(accelerators_); 2539 } 2540 } 2541 /** 2542 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2543 */ addAcceleratorsBuilder()2544 public com.google.cloud.compute.v1.AcceleratorConfig.Builder addAcceleratorsBuilder() { 2545 return getAcceleratorsFieldBuilder() 2546 .addBuilder(com.google.cloud.compute.v1.AcceleratorConfig.getDefaultInstance()); 2547 } 2548 /** 2549 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2550 */ addAcceleratorsBuilder(int index)2551 public com.google.cloud.compute.v1.AcceleratorConfig.Builder addAcceleratorsBuilder(int index) { 2552 return getAcceleratorsFieldBuilder() 2553 .addBuilder(index, com.google.cloud.compute.v1.AcceleratorConfig.getDefaultInstance()); 2554 } 2555 /** 2556 * <code>repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;</code> 2557 */ 2558 public java.util.List<com.google.cloud.compute.v1.AcceleratorConfig.Builder> getAcceleratorsBuilderList()2559 getAcceleratorsBuilderList() { 2560 return getAcceleratorsFieldBuilder().getBuilderList(); 2561 } 2562 2563 private com.google.protobuf.RepeatedFieldBuilderV3< 2564 com.google.cloud.compute.v1.AcceleratorConfig, 2565 com.google.cloud.compute.v1.AcceleratorConfig.Builder, 2566 com.google.cloud.compute.v1.AcceleratorConfigOrBuilder> getAcceleratorsFieldBuilder()2567 getAcceleratorsFieldBuilder() { 2568 if (acceleratorsBuilder_ == null) { 2569 acceleratorsBuilder_ = 2570 new com.google.protobuf.RepeatedFieldBuilderV3< 2571 com.google.cloud.compute.v1.AcceleratorConfig, 2572 com.google.cloud.compute.v1.AcceleratorConfig.Builder, 2573 com.google.cloud.compute.v1.AcceleratorConfigOrBuilder>( 2574 accelerators_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); 2575 accelerators_ = null; 2576 } 2577 return acceleratorsBuilder_; 2578 } 2579 2580 private java.lang.Object cpuOvercommitType_ = ""; 2581 /** 2582 * 2583 * 2584 * <pre> 2585 * CPU overcommit. 2586 * Check the CpuOvercommitType enum for the list of possible values. 2587 * </pre> 2588 * 2589 * <code>optional string cpu_overcommit_type = 247727959;</code> 2590 * 2591 * @return Whether the cpuOvercommitType field is set. 2592 */ hasCpuOvercommitType()2593 public boolean hasCpuOvercommitType() { 2594 return ((bitField0_ & 0x00000002) != 0); 2595 } 2596 /** 2597 * 2598 * 2599 * <pre> 2600 * CPU overcommit. 2601 * Check the CpuOvercommitType enum for the list of possible values. 2602 * </pre> 2603 * 2604 * <code>optional string cpu_overcommit_type = 247727959;</code> 2605 * 2606 * @return The cpuOvercommitType. 2607 */ getCpuOvercommitType()2608 public java.lang.String getCpuOvercommitType() { 2609 java.lang.Object ref = cpuOvercommitType_; 2610 if (!(ref instanceof java.lang.String)) { 2611 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2612 java.lang.String s = bs.toStringUtf8(); 2613 cpuOvercommitType_ = s; 2614 return s; 2615 } else { 2616 return (java.lang.String) ref; 2617 } 2618 } 2619 /** 2620 * 2621 * 2622 * <pre> 2623 * CPU overcommit. 2624 * Check the CpuOvercommitType enum for the list of possible values. 2625 * </pre> 2626 * 2627 * <code>optional string cpu_overcommit_type = 247727959;</code> 2628 * 2629 * @return The bytes for cpuOvercommitType. 2630 */ getCpuOvercommitTypeBytes()2631 public com.google.protobuf.ByteString getCpuOvercommitTypeBytes() { 2632 java.lang.Object ref = cpuOvercommitType_; 2633 if (ref instanceof String) { 2634 com.google.protobuf.ByteString b = 2635 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2636 cpuOvercommitType_ = b; 2637 return b; 2638 } else { 2639 return (com.google.protobuf.ByteString) ref; 2640 } 2641 } 2642 /** 2643 * 2644 * 2645 * <pre> 2646 * CPU overcommit. 2647 * Check the CpuOvercommitType enum for the list of possible values. 2648 * </pre> 2649 * 2650 * <code>optional string cpu_overcommit_type = 247727959;</code> 2651 * 2652 * @param value The cpuOvercommitType to set. 2653 * @return This builder for chaining. 2654 */ setCpuOvercommitType(java.lang.String value)2655 public Builder setCpuOvercommitType(java.lang.String value) { 2656 if (value == null) { 2657 throw new NullPointerException(); 2658 } 2659 cpuOvercommitType_ = value; 2660 bitField0_ |= 0x00000002; 2661 onChanged(); 2662 return this; 2663 } 2664 /** 2665 * 2666 * 2667 * <pre> 2668 * CPU overcommit. 2669 * Check the CpuOvercommitType enum for the list of possible values. 2670 * </pre> 2671 * 2672 * <code>optional string cpu_overcommit_type = 247727959;</code> 2673 * 2674 * @return This builder for chaining. 2675 */ clearCpuOvercommitType()2676 public Builder clearCpuOvercommitType() { 2677 cpuOvercommitType_ = getDefaultInstance().getCpuOvercommitType(); 2678 bitField0_ = (bitField0_ & ~0x00000002); 2679 onChanged(); 2680 return this; 2681 } 2682 /** 2683 * 2684 * 2685 * <pre> 2686 * CPU overcommit. 2687 * Check the CpuOvercommitType enum for the list of possible values. 2688 * </pre> 2689 * 2690 * <code>optional string cpu_overcommit_type = 247727959;</code> 2691 * 2692 * @param value The bytes for cpuOvercommitType to set. 2693 * @return This builder for chaining. 2694 */ setCpuOvercommitTypeBytes(com.google.protobuf.ByteString value)2695 public Builder setCpuOvercommitTypeBytes(com.google.protobuf.ByteString value) { 2696 if (value == null) { 2697 throw new NullPointerException(); 2698 } 2699 checkByteStringIsUtf8(value); 2700 cpuOvercommitType_ = value; 2701 bitField0_ |= 0x00000002; 2702 onChanged(); 2703 return this; 2704 } 2705 2706 private java.lang.Object creationTimestamp_ = ""; 2707 /** 2708 * 2709 * 2710 * <pre> 2711 * [Output Only] Creation timestamp in RFC3339 text format. 2712 * </pre> 2713 * 2714 * <code>optional string creation_timestamp = 30525366;</code> 2715 * 2716 * @return Whether the creationTimestamp field is set. 2717 */ hasCreationTimestamp()2718 public boolean hasCreationTimestamp() { 2719 return ((bitField0_ & 0x00000004) != 0); 2720 } 2721 /** 2722 * 2723 * 2724 * <pre> 2725 * [Output Only] Creation timestamp in RFC3339 text format. 2726 * </pre> 2727 * 2728 * <code>optional string creation_timestamp = 30525366;</code> 2729 * 2730 * @return The creationTimestamp. 2731 */ getCreationTimestamp()2732 public java.lang.String getCreationTimestamp() { 2733 java.lang.Object ref = creationTimestamp_; 2734 if (!(ref instanceof java.lang.String)) { 2735 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2736 java.lang.String s = bs.toStringUtf8(); 2737 creationTimestamp_ = s; 2738 return s; 2739 } else { 2740 return (java.lang.String) ref; 2741 } 2742 } 2743 /** 2744 * 2745 * 2746 * <pre> 2747 * [Output Only] Creation timestamp in RFC3339 text format. 2748 * </pre> 2749 * 2750 * <code>optional string creation_timestamp = 30525366;</code> 2751 * 2752 * @return The bytes for creationTimestamp. 2753 */ getCreationTimestampBytes()2754 public com.google.protobuf.ByteString getCreationTimestampBytes() { 2755 java.lang.Object ref = creationTimestamp_; 2756 if (ref instanceof String) { 2757 com.google.protobuf.ByteString b = 2758 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2759 creationTimestamp_ = b; 2760 return b; 2761 } else { 2762 return (com.google.protobuf.ByteString) ref; 2763 } 2764 } 2765 /** 2766 * 2767 * 2768 * <pre> 2769 * [Output Only] Creation timestamp in RFC3339 text format. 2770 * </pre> 2771 * 2772 * <code>optional string creation_timestamp = 30525366;</code> 2773 * 2774 * @param value The creationTimestamp to set. 2775 * @return This builder for chaining. 2776 */ setCreationTimestamp(java.lang.String value)2777 public Builder setCreationTimestamp(java.lang.String value) { 2778 if (value == null) { 2779 throw new NullPointerException(); 2780 } 2781 creationTimestamp_ = value; 2782 bitField0_ |= 0x00000004; 2783 onChanged(); 2784 return this; 2785 } 2786 /** 2787 * 2788 * 2789 * <pre> 2790 * [Output Only] Creation timestamp in RFC3339 text format. 2791 * </pre> 2792 * 2793 * <code>optional string creation_timestamp = 30525366;</code> 2794 * 2795 * @return This builder for chaining. 2796 */ clearCreationTimestamp()2797 public Builder clearCreationTimestamp() { 2798 creationTimestamp_ = getDefaultInstance().getCreationTimestamp(); 2799 bitField0_ = (bitField0_ & ~0x00000004); 2800 onChanged(); 2801 return this; 2802 } 2803 /** 2804 * 2805 * 2806 * <pre> 2807 * [Output Only] Creation timestamp in RFC3339 text format. 2808 * </pre> 2809 * 2810 * <code>optional string creation_timestamp = 30525366;</code> 2811 * 2812 * @param value The bytes for creationTimestamp to set. 2813 * @return This builder for chaining. 2814 */ setCreationTimestampBytes(com.google.protobuf.ByteString value)2815 public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) { 2816 if (value == null) { 2817 throw new NullPointerException(); 2818 } 2819 checkByteStringIsUtf8(value); 2820 creationTimestamp_ = value; 2821 bitField0_ |= 0x00000004; 2822 onChanged(); 2823 return this; 2824 } 2825 2826 private java.lang.Object description_ = ""; 2827 /** 2828 * 2829 * 2830 * <pre> 2831 * An optional description of this resource. Provide this property when you create the resource. 2832 * </pre> 2833 * 2834 * <code>optional string description = 422937596;</code> 2835 * 2836 * @return Whether the description field is set. 2837 */ hasDescription()2838 public boolean hasDescription() { 2839 return ((bitField0_ & 0x00000008) != 0); 2840 } 2841 /** 2842 * 2843 * 2844 * <pre> 2845 * An optional description of this resource. Provide this property when you create the resource. 2846 * </pre> 2847 * 2848 * <code>optional string description = 422937596;</code> 2849 * 2850 * @return The description. 2851 */ getDescription()2852 public java.lang.String getDescription() { 2853 java.lang.Object ref = description_; 2854 if (!(ref instanceof java.lang.String)) { 2855 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2856 java.lang.String s = bs.toStringUtf8(); 2857 description_ = s; 2858 return s; 2859 } else { 2860 return (java.lang.String) ref; 2861 } 2862 } 2863 /** 2864 * 2865 * 2866 * <pre> 2867 * An optional description of this resource. Provide this property when you create the resource. 2868 * </pre> 2869 * 2870 * <code>optional string description = 422937596;</code> 2871 * 2872 * @return The bytes for description. 2873 */ getDescriptionBytes()2874 public com.google.protobuf.ByteString getDescriptionBytes() { 2875 java.lang.Object ref = description_; 2876 if (ref instanceof String) { 2877 com.google.protobuf.ByteString b = 2878 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2879 description_ = b; 2880 return b; 2881 } else { 2882 return (com.google.protobuf.ByteString) ref; 2883 } 2884 } 2885 /** 2886 * 2887 * 2888 * <pre> 2889 * An optional description of this resource. Provide this property when you create the resource. 2890 * </pre> 2891 * 2892 * <code>optional string description = 422937596;</code> 2893 * 2894 * @param value The description to set. 2895 * @return This builder for chaining. 2896 */ setDescription(java.lang.String value)2897 public Builder setDescription(java.lang.String value) { 2898 if (value == null) { 2899 throw new NullPointerException(); 2900 } 2901 description_ = value; 2902 bitField0_ |= 0x00000008; 2903 onChanged(); 2904 return this; 2905 } 2906 /** 2907 * 2908 * 2909 * <pre> 2910 * An optional description of this resource. Provide this property when you create the resource. 2911 * </pre> 2912 * 2913 * <code>optional string description = 422937596;</code> 2914 * 2915 * @return This builder for chaining. 2916 */ clearDescription()2917 public Builder clearDescription() { 2918 description_ = getDefaultInstance().getDescription(); 2919 bitField0_ = (bitField0_ & ~0x00000008); 2920 onChanged(); 2921 return this; 2922 } 2923 /** 2924 * 2925 * 2926 * <pre> 2927 * An optional description of this resource. Provide this property when you create the resource. 2928 * </pre> 2929 * 2930 * <code>optional string description = 422937596;</code> 2931 * 2932 * @param value The bytes for description to set. 2933 * @return This builder for chaining. 2934 */ setDescriptionBytes(com.google.protobuf.ByteString value)2935 public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { 2936 if (value == null) { 2937 throw new NullPointerException(); 2938 } 2939 checkByteStringIsUtf8(value); 2940 description_ = value; 2941 bitField0_ |= 0x00000008; 2942 onChanged(); 2943 return this; 2944 } 2945 2946 private java.util.List<com.google.cloud.compute.v1.LocalDisk> disks_ = 2947 java.util.Collections.emptyList(); 2948 ensureDisksIsMutable()2949 private void ensureDisksIsMutable() { 2950 if (!((bitField0_ & 0x00000010) != 0)) { 2951 disks_ = new java.util.ArrayList<com.google.cloud.compute.v1.LocalDisk>(disks_); 2952 bitField0_ |= 0x00000010; 2953 } 2954 } 2955 2956 private com.google.protobuf.RepeatedFieldBuilderV3< 2957 com.google.cloud.compute.v1.LocalDisk, 2958 com.google.cloud.compute.v1.LocalDisk.Builder, 2959 com.google.cloud.compute.v1.LocalDiskOrBuilder> 2960 disksBuilder_; 2961 2962 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ getDisksList()2963 public java.util.List<com.google.cloud.compute.v1.LocalDisk> getDisksList() { 2964 if (disksBuilder_ == null) { 2965 return java.util.Collections.unmodifiableList(disks_); 2966 } else { 2967 return disksBuilder_.getMessageList(); 2968 } 2969 } 2970 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ getDisksCount()2971 public int getDisksCount() { 2972 if (disksBuilder_ == null) { 2973 return disks_.size(); 2974 } else { 2975 return disksBuilder_.getCount(); 2976 } 2977 } 2978 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ getDisks(int index)2979 public com.google.cloud.compute.v1.LocalDisk getDisks(int index) { 2980 if (disksBuilder_ == null) { 2981 return disks_.get(index); 2982 } else { 2983 return disksBuilder_.getMessage(index); 2984 } 2985 } 2986 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ setDisks(int index, com.google.cloud.compute.v1.LocalDisk value)2987 public Builder setDisks(int index, com.google.cloud.compute.v1.LocalDisk value) { 2988 if (disksBuilder_ == null) { 2989 if (value == null) { 2990 throw new NullPointerException(); 2991 } 2992 ensureDisksIsMutable(); 2993 disks_.set(index, value); 2994 onChanged(); 2995 } else { 2996 disksBuilder_.setMessage(index, value); 2997 } 2998 return this; 2999 } 3000 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ setDisks( int index, com.google.cloud.compute.v1.LocalDisk.Builder builderForValue)3001 public Builder setDisks( 3002 int index, com.google.cloud.compute.v1.LocalDisk.Builder builderForValue) { 3003 if (disksBuilder_ == null) { 3004 ensureDisksIsMutable(); 3005 disks_.set(index, builderForValue.build()); 3006 onChanged(); 3007 } else { 3008 disksBuilder_.setMessage(index, builderForValue.build()); 3009 } 3010 return this; 3011 } 3012 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ addDisks(com.google.cloud.compute.v1.LocalDisk value)3013 public Builder addDisks(com.google.cloud.compute.v1.LocalDisk value) { 3014 if (disksBuilder_ == null) { 3015 if (value == null) { 3016 throw new NullPointerException(); 3017 } 3018 ensureDisksIsMutable(); 3019 disks_.add(value); 3020 onChanged(); 3021 } else { 3022 disksBuilder_.addMessage(value); 3023 } 3024 return this; 3025 } 3026 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ addDisks(int index, com.google.cloud.compute.v1.LocalDisk value)3027 public Builder addDisks(int index, com.google.cloud.compute.v1.LocalDisk value) { 3028 if (disksBuilder_ == null) { 3029 if (value == null) { 3030 throw new NullPointerException(); 3031 } 3032 ensureDisksIsMutable(); 3033 disks_.add(index, value); 3034 onChanged(); 3035 } else { 3036 disksBuilder_.addMessage(index, value); 3037 } 3038 return this; 3039 } 3040 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ addDisks(com.google.cloud.compute.v1.LocalDisk.Builder builderForValue)3041 public Builder addDisks(com.google.cloud.compute.v1.LocalDisk.Builder builderForValue) { 3042 if (disksBuilder_ == null) { 3043 ensureDisksIsMutable(); 3044 disks_.add(builderForValue.build()); 3045 onChanged(); 3046 } else { 3047 disksBuilder_.addMessage(builderForValue.build()); 3048 } 3049 return this; 3050 } 3051 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ addDisks( int index, com.google.cloud.compute.v1.LocalDisk.Builder builderForValue)3052 public Builder addDisks( 3053 int index, com.google.cloud.compute.v1.LocalDisk.Builder builderForValue) { 3054 if (disksBuilder_ == null) { 3055 ensureDisksIsMutable(); 3056 disks_.add(index, builderForValue.build()); 3057 onChanged(); 3058 } else { 3059 disksBuilder_.addMessage(index, builderForValue.build()); 3060 } 3061 return this; 3062 } 3063 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ addAllDisks( java.lang.Iterable<? extends com.google.cloud.compute.v1.LocalDisk> values)3064 public Builder addAllDisks( 3065 java.lang.Iterable<? extends com.google.cloud.compute.v1.LocalDisk> values) { 3066 if (disksBuilder_ == null) { 3067 ensureDisksIsMutable(); 3068 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, disks_); 3069 onChanged(); 3070 } else { 3071 disksBuilder_.addAllMessages(values); 3072 } 3073 return this; 3074 } 3075 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ clearDisks()3076 public Builder clearDisks() { 3077 if (disksBuilder_ == null) { 3078 disks_ = java.util.Collections.emptyList(); 3079 bitField0_ = (bitField0_ & ~0x00000010); 3080 onChanged(); 3081 } else { 3082 disksBuilder_.clear(); 3083 } 3084 return this; 3085 } 3086 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ removeDisks(int index)3087 public Builder removeDisks(int index) { 3088 if (disksBuilder_ == null) { 3089 ensureDisksIsMutable(); 3090 disks_.remove(index); 3091 onChanged(); 3092 } else { 3093 disksBuilder_.remove(index); 3094 } 3095 return this; 3096 } 3097 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ getDisksBuilder(int index)3098 public com.google.cloud.compute.v1.LocalDisk.Builder getDisksBuilder(int index) { 3099 return getDisksFieldBuilder().getBuilder(index); 3100 } 3101 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ getDisksOrBuilder(int index)3102 public com.google.cloud.compute.v1.LocalDiskOrBuilder getDisksOrBuilder(int index) { 3103 if (disksBuilder_ == null) { 3104 return disks_.get(index); 3105 } else { 3106 return disksBuilder_.getMessageOrBuilder(index); 3107 } 3108 } 3109 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ 3110 public java.util.List<? extends com.google.cloud.compute.v1.LocalDiskOrBuilder> getDisksOrBuilderList()3111 getDisksOrBuilderList() { 3112 if (disksBuilder_ != null) { 3113 return disksBuilder_.getMessageOrBuilderList(); 3114 } else { 3115 return java.util.Collections.unmodifiableList(disks_); 3116 } 3117 } 3118 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ addDisksBuilder()3119 public com.google.cloud.compute.v1.LocalDisk.Builder addDisksBuilder() { 3120 return getDisksFieldBuilder() 3121 .addBuilder(com.google.cloud.compute.v1.LocalDisk.getDefaultInstance()); 3122 } 3123 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ addDisksBuilder(int index)3124 public com.google.cloud.compute.v1.LocalDisk.Builder addDisksBuilder(int index) { 3125 return getDisksFieldBuilder() 3126 .addBuilder(index, com.google.cloud.compute.v1.LocalDisk.getDefaultInstance()); 3127 } 3128 /** <code>repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;</code> */ getDisksBuilderList()3129 public java.util.List<com.google.cloud.compute.v1.LocalDisk.Builder> getDisksBuilderList() { 3130 return getDisksFieldBuilder().getBuilderList(); 3131 } 3132 3133 private com.google.protobuf.RepeatedFieldBuilderV3< 3134 com.google.cloud.compute.v1.LocalDisk, 3135 com.google.cloud.compute.v1.LocalDisk.Builder, 3136 com.google.cloud.compute.v1.LocalDiskOrBuilder> getDisksFieldBuilder()3137 getDisksFieldBuilder() { 3138 if (disksBuilder_ == null) { 3139 disksBuilder_ = 3140 new com.google.protobuf.RepeatedFieldBuilderV3< 3141 com.google.cloud.compute.v1.LocalDisk, 3142 com.google.cloud.compute.v1.LocalDisk.Builder, 3143 com.google.cloud.compute.v1.LocalDiskOrBuilder>( 3144 disks_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); 3145 disks_ = null; 3146 } 3147 return disksBuilder_; 3148 } 3149 3150 private long id_; 3151 /** 3152 * 3153 * 3154 * <pre> 3155 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 3156 * </pre> 3157 * 3158 * <code>optional uint64 id = 3355;</code> 3159 * 3160 * @return Whether the id field is set. 3161 */ 3162 @java.lang.Override hasId()3163 public boolean hasId() { 3164 return ((bitField0_ & 0x00000020) != 0); 3165 } 3166 /** 3167 * 3168 * 3169 * <pre> 3170 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 3171 * </pre> 3172 * 3173 * <code>optional uint64 id = 3355;</code> 3174 * 3175 * @return The id. 3176 */ 3177 @java.lang.Override getId()3178 public long getId() { 3179 return id_; 3180 } 3181 /** 3182 * 3183 * 3184 * <pre> 3185 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 3186 * </pre> 3187 * 3188 * <code>optional uint64 id = 3355;</code> 3189 * 3190 * @param value The id to set. 3191 * @return This builder for chaining. 3192 */ setId(long value)3193 public Builder setId(long value) { 3194 3195 id_ = value; 3196 bitField0_ |= 0x00000020; 3197 onChanged(); 3198 return this; 3199 } 3200 /** 3201 * 3202 * 3203 * <pre> 3204 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 3205 * </pre> 3206 * 3207 * <code>optional uint64 id = 3355;</code> 3208 * 3209 * @return This builder for chaining. 3210 */ clearId()3211 public Builder clearId() { 3212 bitField0_ = (bitField0_ & ~0x00000020); 3213 id_ = 0L; 3214 onChanged(); 3215 return this; 3216 } 3217 3218 private java.lang.Object kind_ = ""; 3219 /** 3220 * 3221 * 3222 * <pre> 3223 * [Output Only] The type of the resource. Always compute#nodeTemplate for node templates. 3224 * </pre> 3225 * 3226 * <code>optional string kind = 3292052;</code> 3227 * 3228 * @return Whether the kind field is set. 3229 */ hasKind()3230 public boolean hasKind() { 3231 return ((bitField0_ & 0x00000040) != 0); 3232 } 3233 /** 3234 * 3235 * 3236 * <pre> 3237 * [Output Only] The type of the resource. Always compute#nodeTemplate for node templates. 3238 * </pre> 3239 * 3240 * <code>optional string kind = 3292052;</code> 3241 * 3242 * @return The kind. 3243 */ getKind()3244 public java.lang.String getKind() { 3245 java.lang.Object ref = kind_; 3246 if (!(ref instanceof java.lang.String)) { 3247 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3248 java.lang.String s = bs.toStringUtf8(); 3249 kind_ = s; 3250 return s; 3251 } else { 3252 return (java.lang.String) ref; 3253 } 3254 } 3255 /** 3256 * 3257 * 3258 * <pre> 3259 * [Output Only] The type of the resource. Always compute#nodeTemplate for node templates. 3260 * </pre> 3261 * 3262 * <code>optional string kind = 3292052;</code> 3263 * 3264 * @return The bytes for kind. 3265 */ getKindBytes()3266 public com.google.protobuf.ByteString getKindBytes() { 3267 java.lang.Object ref = kind_; 3268 if (ref instanceof String) { 3269 com.google.protobuf.ByteString b = 3270 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3271 kind_ = b; 3272 return b; 3273 } else { 3274 return (com.google.protobuf.ByteString) ref; 3275 } 3276 } 3277 /** 3278 * 3279 * 3280 * <pre> 3281 * [Output Only] The type of the resource. Always compute#nodeTemplate for node templates. 3282 * </pre> 3283 * 3284 * <code>optional string kind = 3292052;</code> 3285 * 3286 * @param value The kind to set. 3287 * @return This builder for chaining. 3288 */ setKind(java.lang.String value)3289 public Builder setKind(java.lang.String value) { 3290 if (value == null) { 3291 throw new NullPointerException(); 3292 } 3293 kind_ = value; 3294 bitField0_ |= 0x00000040; 3295 onChanged(); 3296 return this; 3297 } 3298 /** 3299 * 3300 * 3301 * <pre> 3302 * [Output Only] The type of the resource. Always compute#nodeTemplate for node templates. 3303 * </pre> 3304 * 3305 * <code>optional string kind = 3292052;</code> 3306 * 3307 * @return This builder for chaining. 3308 */ clearKind()3309 public Builder clearKind() { 3310 kind_ = getDefaultInstance().getKind(); 3311 bitField0_ = (bitField0_ & ~0x00000040); 3312 onChanged(); 3313 return this; 3314 } 3315 /** 3316 * 3317 * 3318 * <pre> 3319 * [Output Only] The type of the resource. Always compute#nodeTemplate for node templates. 3320 * </pre> 3321 * 3322 * <code>optional string kind = 3292052;</code> 3323 * 3324 * @param value The bytes for kind to set. 3325 * @return This builder for chaining. 3326 */ setKindBytes(com.google.protobuf.ByteString value)3327 public Builder setKindBytes(com.google.protobuf.ByteString value) { 3328 if (value == null) { 3329 throw new NullPointerException(); 3330 } 3331 checkByteStringIsUtf8(value); 3332 kind_ = value; 3333 bitField0_ |= 0x00000040; 3334 onChanged(); 3335 return this; 3336 } 3337 3338 private java.lang.Object name_ = ""; 3339 /** 3340 * 3341 * 3342 * <pre> 3343 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 3344 * </pre> 3345 * 3346 * <code>optional string name = 3373707;</code> 3347 * 3348 * @return Whether the name field is set. 3349 */ hasName()3350 public boolean hasName() { 3351 return ((bitField0_ & 0x00000080) != 0); 3352 } 3353 /** 3354 * 3355 * 3356 * <pre> 3357 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 3358 * </pre> 3359 * 3360 * <code>optional string name = 3373707;</code> 3361 * 3362 * @return The name. 3363 */ getName()3364 public java.lang.String getName() { 3365 java.lang.Object ref = name_; 3366 if (!(ref instanceof java.lang.String)) { 3367 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3368 java.lang.String s = bs.toStringUtf8(); 3369 name_ = s; 3370 return s; 3371 } else { 3372 return (java.lang.String) ref; 3373 } 3374 } 3375 /** 3376 * 3377 * 3378 * <pre> 3379 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 3380 * </pre> 3381 * 3382 * <code>optional string name = 3373707;</code> 3383 * 3384 * @return The bytes for name. 3385 */ getNameBytes()3386 public com.google.protobuf.ByteString getNameBytes() { 3387 java.lang.Object ref = name_; 3388 if (ref instanceof String) { 3389 com.google.protobuf.ByteString b = 3390 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3391 name_ = b; 3392 return b; 3393 } else { 3394 return (com.google.protobuf.ByteString) ref; 3395 } 3396 } 3397 /** 3398 * 3399 * 3400 * <pre> 3401 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 3402 * </pre> 3403 * 3404 * <code>optional string name = 3373707;</code> 3405 * 3406 * @param value The name to set. 3407 * @return This builder for chaining. 3408 */ setName(java.lang.String value)3409 public Builder setName(java.lang.String value) { 3410 if (value == null) { 3411 throw new NullPointerException(); 3412 } 3413 name_ = value; 3414 bitField0_ |= 0x00000080; 3415 onChanged(); 3416 return this; 3417 } 3418 /** 3419 * 3420 * 3421 * <pre> 3422 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 3423 * </pre> 3424 * 3425 * <code>optional string name = 3373707;</code> 3426 * 3427 * @return This builder for chaining. 3428 */ clearName()3429 public Builder clearName() { 3430 name_ = getDefaultInstance().getName(); 3431 bitField0_ = (bitField0_ & ~0x00000080); 3432 onChanged(); 3433 return this; 3434 } 3435 /** 3436 * 3437 * 3438 * <pre> 3439 * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 3440 * </pre> 3441 * 3442 * <code>optional string name = 3373707;</code> 3443 * 3444 * @param value The bytes for name to set. 3445 * @return This builder for chaining. 3446 */ setNameBytes(com.google.protobuf.ByteString value)3447 public Builder setNameBytes(com.google.protobuf.ByteString value) { 3448 if (value == null) { 3449 throw new NullPointerException(); 3450 } 3451 checkByteStringIsUtf8(value); 3452 name_ = value; 3453 bitField0_ |= 0x00000080; 3454 onChanged(); 3455 return this; 3456 } 3457 3458 private com.google.protobuf.MapField<java.lang.String, java.lang.String> nodeAffinityLabels_; 3459 3460 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetNodeAffinityLabels()3461 internalGetNodeAffinityLabels() { 3462 if (nodeAffinityLabels_ == null) { 3463 return com.google.protobuf.MapField.emptyMapField( 3464 NodeAffinityLabelsDefaultEntryHolder.defaultEntry); 3465 } 3466 return nodeAffinityLabels_; 3467 } 3468 3469 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableNodeAffinityLabels()3470 internalGetMutableNodeAffinityLabels() { 3471 if (nodeAffinityLabels_ == null) { 3472 nodeAffinityLabels_ = 3473 com.google.protobuf.MapField.newMapField( 3474 NodeAffinityLabelsDefaultEntryHolder.defaultEntry); 3475 } 3476 if (!nodeAffinityLabels_.isMutable()) { 3477 nodeAffinityLabels_ = nodeAffinityLabels_.copy(); 3478 } 3479 bitField0_ |= 0x00000100; 3480 onChanged(); 3481 return nodeAffinityLabels_; 3482 } 3483 getNodeAffinityLabelsCount()3484 public int getNodeAffinityLabelsCount() { 3485 return internalGetNodeAffinityLabels().getMap().size(); 3486 } 3487 /** 3488 * 3489 * 3490 * <pre> 3491 * Labels to use for node affinity, which will be used in instance scheduling. 3492 * </pre> 3493 * 3494 * <code>map<string, string> node_affinity_labels = 339007161;</code> 3495 */ 3496 @java.lang.Override containsNodeAffinityLabels(java.lang.String key)3497 public boolean containsNodeAffinityLabels(java.lang.String key) { 3498 if (key == null) { 3499 throw new NullPointerException("map key"); 3500 } 3501 return internalGetNodeAffinityLabels().getMap().containsKey(key); 3502 } 3503 /** Use {@link #getNodeAffinityLabelsMap()} instead. */ 3504 @java.lang.Override 3505 @java.lang.Deprecated getNodeAffinityLabels()3506 public java.util.Map<java.lang.String, java.lang.String> getNodeAffinityLabels() { 3507 return getNodeAffinityLabelsMap(); 3508 } 3509 /** 3510 * 3511 * 3512 * <pre> 3513 * Labels to use for node affinity, which will be used in instance scheduling. 3514 * </pre> 3515 * 3516 * <code>map<string, string> node_affinity_labels = 339007161;</code> 3517 */ 3518 @java.lang.Override getNodeAffinityLabelsMap()3519 public java.util.Map<java.lang.String, java.lang.String> getNodeAffinityLabelsMap() { 3520 return internalGetNodeAffinityLabels().getMap(); 3521 } 3522 /** 3523 * 3524 * 3525 * <pre> 3526 * Labels to use for node affinity, which will be used in instance scheduling. 3527 * </pre> 3528 * 3529 * <code>map<string, string> node_affinity_labels = 339007161;</code> 3530 */ 3531 @java.lang.Override getNodeAffinityLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)3532 public /* nullable */ java.lang.String getNodeAffinityLabelsOrDefault( 3533 java.lang.String key, 3534 /* nullable */ 3535 java.lang.String defaultValue) { 3536 if (key == null) { 3537 throw new NullPointerException("map key"); 3538 } 3539 java.util.Map<java.lang.String, java.lang.String> map = 3540 internalGetNodeAffinityLabels().getMap(); 3541 return map.containsKey(key) ? map.get(key) : defaultValue; 3542 } 3543 /** 3544 * 3545 * 3546 * <pre> 3547 * Labels to use for node affinity, which will be used in instance scheduling. 3548 * </pre> 3549 * 3550 * <code>map<string, string> node_affinity_labels = 339007161;</code> 3551 */ 3552 @java.lang.Override getNodeAffinityLabelsOrThrow(java.lang.String key)3553 public java.lang.String getNodeAffinityLabelsOrThrow(java.lang.String key) { 3554 if (key == null) { 3555 throw new NullPointerException("map key"); 3556 } 3557 java.util.Map<java.lang.String, java.lang.String> map = 3558 internalGetNodeAffinityLabels().getMap(); 3559 if (!map.containsKey(key)) { 3560 throw new java.lang.IllegalArgumentException(); 3561 } 3562 return map.get(key); 3563 } 3564 clearNodeAffinityLabels()3565 public Builder clearNodeAffinityLabels() { 3566 bitField0_ = (bitField0_ & ~0x00000100); 3567 internalGetMutableNodeAffinityLabels().getMutableMap().clear(); 3568 return this; 3569 } 3570 /** 3571 * 3572 * 3573 * <pre> 3574 * Labels to use for node affinity, which will be used in instance scheduling. 3575 * </pre> 3576 * 3577 * <code>map<string, string> node_affinity_labels = 339007161;</code> 3578 */ removeNodeAffinityLabels(java.lang.String key)3579 public Builder removeNodeAffinityLabels(java.lang.String key) { 3580 if (key == null) { 3581 throw new NullPointerException("map key"); 3582 } 3583 internalGetMutableNodeAffinityLabels().getMutableMap().remove(key); 3584 return this; 3585 } 3586 /** Use alternate mutation accessors instead. */ 3587 @java.lang.Deprecated getMutableNodeAffinityLabels()3588 public java.util.Map<java.lang.String, java.lang.String> getMutableNodeAffinityLabels() { 3589 bitField0_ |= 0x00000100; 3590 return internalGetMutableNodeAffinityLabels().getMutableMap(); 3591 } 3592 /** 3593 * 3594 * 3595 * <pre> 3596 * Labels to use for node affinity, which will be used in instance scheduling. 3597 * </pre> 3598 * 3599 * <code>map<string, string> node_affinity_labels = 339007161;</code> 3600 */ putNodeAffinityLabels(java.lang.String key, java.lang.String value)3601 public Builder putNodeAffinityLabels(java.lang.String key, java.lang.String value) { 3602 if (key == null) { 3603 throw new NullPointerException("map key"); 3604 } 3605 if (value == null) { 3606 throw new NullPointerException("map value"); 3607 } 3608 internalGetMutableNodeAffinityLabels().getMutableMap().put(key, value); 3609 bitField0_ |= 0x00000100; 3610 return this; 3611 } 3612 /** 3613 * 3614 * 3615 * <pre> 3616 * Labels to use for node affinity, which will be used in instance scheduling. 3617 * </pre> 3618 * 3619 * <code>map<string, string> node_affinity_labels = 339007161;</code> 3620 */ putAllNodeAffinityLabels( java.util.Map<java.lang.String, java.lang.String> values)3621 public Builder putAllNodeAffinityLabels( 3622 java.util.Map<java.lang.String, java.lang.String> values) { 3623 internalGetMutableNodeAffinityLabels().getMutableMap().putAll(values); 3624 bitField0_ |= 0x00000100; 3625 return this; 3626 } 3627 3628 private java.lang.Object nodeType_ = ""; 3629 /** 3630 * 3631 * 3632 * <pre> 3633 * The node type to use for nodes group that are created from this template. 3634 * </pre> 3635 * 3636 * <code>optional string node_type = 465832791;</code> 3637 * 3638 * @return Whether the nodeType field is set. 3639 */ hasNodeType()3640 public boolean hasNodeType() { 3641 return ((bitField0_ & 0x00000200) != 0); 3642 } 3643 /** 3644 * 3645 * 3646 * <pre> 3647 * The node type to use for nodes group that are created from this template. 3648 * </pre> 3649 * 3650 * <code>optional string node_type = 465832791;</code> 3651 * 3652 * @return The nodeType. 3653 */ getNodeType()3654 public java.lang.String getNodeType() { 3655 java.lang.Object ref = nodeType_; 3656 if (!(ref instanceof java.lang.String)) { 3657 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3658 java.lang.String s = bs.toStringUtf8(); 3659 nodeType_ = s; 3660 return s; 3661 } else { 3662 return (java.lang.String) ref; 3663 } 3664 } 3665 /** 3666 * 3667 * 3668 * <pre> 3669 * The node type to use for nodes group that are created from this template. 3670 * </pre> 3671 * 3672 * <code>optional string node_type = 465832791;</code> 3673 * 3674 * @return The bytes for nodeType. 3675 */ getNodeTypeBytes()3676 public com.google.protobuf.ByteString getNodeTypeBytes() { 3677 java.lang.Object ref = nodeType_; 3678 if (ref instanceof String) { 3679 com.google.protobuf.ByteString b = 3680 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3681 nodeType_ = b; 3682 return b; 3683 } else { 3684 return (com.google.protobuf.ByteString) ref; 3685 } 3686 } 3687 /** 3688 * 3689 * 3690 * <pre> 3691 * The node type to use for nodes group that are created from this template. 3692 * </pre> 3693 * 3694 * <code>optional string node_type = 465832791;</code> 3695 * 3696 * @param value The nodeType to set. 3697 * @return This builder for chaining. 3698 */ setNodeType(java.lang.String value)3699 public Builder setNodeType(java.lang.String value) { 3700 if (value == null) { 3701 throw new NullPointerException(); 3702 } 3703 nodeType_ = value; 3704 bitField0_ |= 0x00000200; 3705 onChanged(); 3706 return this; 3707 } 3708 /** 3709 * 3710 * 3711 * <pre> 3712 * The node type to use for nodes group that are created from this template. 3713 * </pre> 3714 * 3715 * <code>optional string node_type = 465832791;</code> 3716 * 3717 * @return This builder for chaining. 3718 */ clearNodeType()3719 public Builder clearNodeType() { 3720 nodeType_ = getDefaultInstance().getNodeType(); 3721 bitField0_ = (bitField0_ & ~0x00000200); 3722 onChanged(); 3723 return this; 3724 } 3725 /** 3726 * 3727 * 3728 * <pre> 3729 * The node type to use for nodes group that are created from this template. 3730 * </pre> 3731 * 3732 * <code>optional string node_type = 465832791;</code> 3733 * 3734 * @param value The bytes for nodeType to set. 3735 * @return This builder for chaining. 3736 */ setNodeTypeBytes(com.google.protobuf.ByteString value)3737 public Builder setNodeTypeBytes(com.google.protobuf.ByteString value) { 3738 if (value == null) { 3739 throw new NullPointerException(); 3740 } 3741 checkByteStringIsUtf8(value); 3742 nodeType_ = value; 3743 bitField0_ |= 0x00000200; 3744 onChanged(); 3745 return this; 3746 } 3747 3748 private com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility nodeTypeFlexibility_; 3749 private com.google.protobuf.SingleFieldBuilderV3< 3750 com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility, 3751 com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility.Builder, 3752 com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibilityOrBuilder> 3753 nodeTypeFlexibilityBuilder_; 3754 /** 3755 * 3756 * 3757 * <pre> 3758 * Do not use. Instead, use the node_type property. 3759 * </pre> 3760 * 3761 * <code> 3762 * optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905; 3763 * </code> 3764 * 3765 * @return Whether the nodeTypeFlexibility field is set. 3766 */ hasNodeTypeFlexibility()3767 public boolean hasNodeTypeFlexibility() { 3768 return ((bitField0_ & 0x00000400) != 0); 3769 } 3770 /** 3771 * 3772 * 3773 * <pre> 3774 * Do not use. Instead, use the node_type property. 3775 * </pre> 3776 * 3777 * <code> 3778 * optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905; 3779 * </code> 3780 * 3781 * @return The nodeTypeFlexibility. 3782 */ getNodeTypeFlexibility()3783 public com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility getNodeTypeFlexibility() { 3784 if (nodeTypeFlexibilityBuilder_ == null) { 3785 return nodeTypeFlexibility_ == null 3786 ? com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility.getDefaultInstance() 3787 : nodeTypeFlexibility_; 3788 } else { 3789 return nodeTypeFlexibilityBuilder_.getMessage(); 3790 } 3791 } 3792 /** 3793 * 3794 * 3795 * <pre> 3796 * Do not use. Instead, use the node_type property. 3797 * </pre> 3798 * 3799 * <code> 3800 * optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905; 3801 * </code> 3802 */ setNodeTypeFlexibility( com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility value)3803 public Builder setNodeTypeFlexibility( 3804 com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility value) { 3805 if (nodeTypeFlexibilityBuilder_ == null) { 3806 if (value == null) { 3807 throw new NullPointerException(); 3808 } 3809 nodeTypeFlexibility_ = value; 3810 } else { 3811 nodeTypeFlexibilityBuilder_.setMessage(value); 3812 } 3813 bitField0_ |= 0x00000400; 3814 onChanged(); 3815 return this; 3816 } 3817 /** 3818 * 3819 * 3820 * <pre> 3821 * Do not use. Instead, use the node_type property. 3822 * </pre> 3823 * 3824 * <code> 3825 * optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905; 3826 * </code> 3827 */ setNodeTypeFlexibility( com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility.Builder builderForValue)3828 public Builder setNodeTypeFlexibility( 3829 com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility.Builder builderForValue) { 3830 if (nodeTypeFlexibilityBuilder_ == null) { 3831 nodeTypeFlexibility_ = builderForValue.build(); 3832 } else { 3833 nodeTypeFlexibilityBuilder_.setMessage(builderForValue.build()); 3834 } 3835 bitField0_ |= 0x00000400; 3836 onChanged(); 3837 return this; 3838 } 3839 /** 3840 * 3841 * 3842 * <pre> 3843 * Do not use. Instead, use the node_type property. 3844 * </pre> 3845 * 3846 * <code> 3847 * optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905; 3848 * </code> 3849 */ mergeNodeTypeFlexibility( com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility value)3850 public Builder mergeNodeTypeFlexibility( 3851 com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility value) { 3852 if (nodeTypeFlexibilityBuilder_ == null) { 3853 if (((bitField0_ & 0x00000400) != 0) 3854 && nodeTypeFlexibility_ != null 3855 && nodeTypeFlexibility_ 3856 != com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility 3857 .getDefaultInstance()) { 3858 getNodeTypeFlexibilityBuilder().mergeFrom(value); 3859 } else { 3860 nodeTypeFlexibility_ = value; 3861 } 3862 } else { 3863 nodeTypeFlexibilityBuilder_.mergeFrom(value); 3864 } 3865 bitField0_ |= 0x00000400; 3866 onChanged(); 3867 return this; 3868 } 3869 /** 3870 * 3871 * 3872 * <pre> 3873 * Do not use. Instead, use the node_type property. 3874 * </pre> 3875 * 3876 * <code> 3877 * optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905; 3878 * </code> 3879 */ clearNodeTypeFlexibility()3880 public Builder clearNodeTypeFlexibility() { 3881 bitField0_ = (bitField0_ & ~0x00000400); 3882 nodeTypeFlexibility_ = null; 3883 if (nodeTypeFlexibilityBuilder_ != null) { 3884 nodeTypeFlexibilityBuilder_.dispose(); 3885 nodeTypeFlexibilityBuilder_ = null; 3886 } 3887 onChanged(); 3888 return this; 3889 } 3890 /** 3891 * 3892 * 3893 * <pre> 3894 * Do not use. Instead, use the node_type property. 3895 * </pre> 3896 * 3897 * <code> 3898 * optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905; 3899 * </code> 3900 */ 3901 public com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility.Builder getNodeTypeFlexibilityBuilder()3902 getNodeTypeFlexibilityBuilder() { 3903 bitField0_ |= 0x00000400; 3904 onChanged(); 3905 return getNodeTypeFlexibilityFieldBuilder().getBuilder(); 3906 } 3907 /** 3908 * 3909 * 3910 * <pre> 3911 * Do not use. Instead, use the node_type property. 3912 * </pre> 3913 * 3914 * <code> 3915 * optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905; 3916 * </code> 3917 */ 3918 public com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibilityOrBuilder getNodeTypeFlexibilityOrBuilder()3919 getNodeTypeFlexibilityOrBuilder() { 3920 if (nodeTypeFlexibilityBuilder_ != null) { 3921 return nodeTypeFlexibilityBuilder_.getMessageOrBuilder(); 3922 } else { 3923 return nodeTypeFlexibility_ == null 3924 ? com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility.getDefaultInstance() 3925 : nodeTypeFlexibility_; 3926 } 3927 } 3928 /** 3929 * 3930 * 3931 * <pre> 3932 * Do not use. Instead, use the node_type property. 3933 * </pre> 3934 * 3935 * <code> 3936 * optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905; 3937 * </code> 3938 */ 3939 private com.google.protobuf.SingleFieldBuilderV3< 3940 com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility, 3941 com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility.Builder, 3942 com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibilityOrBuilder> getNodeTypeFlexibilityFieldBuilder()3943 getNodeTypeFlexibilityFieldBuilder() { 3944 if (nodeTypeFlexibilityBuilder_ == null) { 3945 nodeTypeFlexibilityBuilder_ = 3946 new com.google.protobuf.SingleFieldBuilderV3< 3947 com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility, 3948 com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility.Builder, 3949 com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibilityOrBuilder>( 3950 getNodeTypeFlexibility(), getParentForChildren(), isClean()); 3951 nodeTypeFlexibility_ = null; 3952 } 3953 return nodeTypeFlexibilityBuilder_; 3954 } 3955 3956 private java.lang.Object region_ = ""; 3957 /** 3958 * 3959 * 3960 * <pre> 3961 * [Output Only] The name of the region where the node template resides, such as us-central1. 3962 * </pre> 3963 * 3964 * <code>optional string region = 138946292;</code> 3965 * 3966 * @return Whether the region field is set. 3967 */ hasRegion()3968 public boolean hasRegion() { 3969 return ((bitField0_ & 0x00000800) != 0); 3970 } 3971 /** 3972 * 3973 * 3974 * <pre> 3975 * [Output Only] The name of the region where the node template resides, such as us-central1. 3976 * </pre> 3977 * 3978 * <code>optional string region = 138946292;</code> 3979 * 3980 * @return The region. 3981 */ getRegion()3982 public java.lang.String getRegion() { 3983 java.lang.Object ref = region_; 3984 if (!(ref instanceof java.lang.String)) { 3985 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3986 java.lang.String s = bs.toStringUtf8(); 3987 region_ = s; 3988 return s; 3989 } else { 3990 return (java.lang.String) ref; 3991 } 3992 } 3993 /** 3994 * 3995 * 3996 * <pre> 3997 * [Output Only] The name of the region where the node template resides, such as us-central1. 3998 * </pre> 3999 * 4000 * <code>optional string region = 138946292;</code> 4001 * 4002 * @return The bytes for region. 4003 */ getRegionBytes()4004 public com.google.protobuf.ByteString getRegionBytes() { 4005 java.lang.Object ref = region_; 4006 if (ref instanceof String) { 4007 com.google.protobuf.ByteString b = 4008 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 4009 region_ = b; 4010 return b; 4011 } else { 4012 return (com.google.protobuf.ByteString) ref; 4013 } 4014 } 4015 /** 4016 * 4017 * 4018 * <pre> 4019 * [Output Only] The name of the region where the node template resides, such as us-central1. 4020 * </pre> 4021 * 4022 * <code>optional string region = 138946292;</code> 4023 * 4024 * @param value The region to set. 4025 * @return This builder for chaining. 4026 */ setRegion(java.lang.String value)4027 public Builder setRegion(java.lang.String value) { 4028 if (value == null) { 4029 throw new NullPointerException(); 4030 } 4031 region_ = value; 4032 bitField0_ |= 0x00000800; 4033 onChanged(); 4034 return this; 4035 } 4036 /** 4037 * 4038 * 4039 * <pre> 4040 * [Output Only] The name of the region where the node template resides, such as us-central1. 4041 * </pre> 4042 * 4043 * <code>optional string region = 138946292;</code> 4044 * 4045 * @return This builder for chaining. 4046 */ clearRegion()4047 public Builder clearRegion() { 4048 region_ = getDefaultInstance().getRegion(); 4049 bitField0_ = (bitField0_ & ~0x00000800); 4050 onChanged(); 4051 return this; 4052 } 4053 /** 4054 * 4055 * 4056 * <pre> 4057 * [Output Only] The name of the region where the node template resides, such as us-central1. 4058 * </pre> 4059 * 4060 * <code>optional string region = 138946292;</code> 4061 * 4062 * @param value The bytes for region to set. 4063 * @return This builder for chaining. 4064 */ setRegionBytes(com.google.protobuf.ByteString value)4065 public Builder setRegionBytes(com.google.protobuf.ByteString value) { 4066 if (value == null) { 4067 throw new NullPointerException(); 4068 } 4069 checkByteStringIsUtf8(value); 4070 region_ = value; 4071 bitField0_ |= 0x00000800; 4072 onChanged(); 4073 return this; 4074 } 4075 4076 private java.lang.Object selfLink_ = ""; 4077 /** 4078 * 4079 * 4080 * <pre> 4081 * [Output Only] Server-defined URL for the resource. 4082 * </pre> 4083 * 4084 * <code>optional string self_link = 456214797;</code> 4085 * 4086 * @return Whether the selfLink field is set. 4087 */ hasSelfLink()4088 public boolean hasSelfLink() { 4089 return ((bitField0_ & 0x00001000) != 0); 4090 } 4091 /** 4092 * 4093 * 4094 * <pre> 4095 * [Output Only] Server-defined URL for the resource. 4096 * </pre> 4097 * 4098 * <code>optional string self_link = 456214797;</code> 4099 * 4100 * @return The selfLink. 4101 */ getSelfLink()4102 public java.lang.String getSelfLink() { 4103 java.lang.Object ref = selfLink_; 4104 if (!(ref instanceof java.lang.String)) { 4105 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 4106 java.lang.String s = bs.toStringUtf8(); 4107 selfLink_ = s; 4108 return s; 4109 } else { 4110 return (java.lang.String) ref; 4111 } 4112 } 4113 /** 4114 * 4115 * 4116 * <pre> 4117 * [Output Only] Server-defined URL for the resource. 4118 * </pre> 4119 * 4120 * <code>optional string self_link = 456214797;</code> 4121 * 4122 * @return The bytes for selfLink. 4123 */ getSelfLinkBytes()4124 public com.google.protobuf.ByteString getSelfLinkBytes() { 4125 java.lang.Object ref = selfLink_; 4126 if (ref instanceof String) { 4127 com.google.protobuf.ByteString b = 4128 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 4129 selfLink_ = b; 4130 return b; 4131 } else { 4132 return (com.google.protobuf.ByteString) ref; 4133 } 4134 } 4135 /** 4136 * 4137 * 4138 * <pre> 4139 * [Output Only] Server-defined URL for the resource. 4140 * </pre> 4141 * 4142 * <code>optional string self_link = 456214797;</code> 4143 * 4144 * @param value The selfLink to set. 4145 * @return This builder for chaining. 4146 */ setSelfLink(java.lang.String value)4147 public Builder setSelfLink(java.lang.String value) { 4148 if (value == null) { 4149 throw new NullPointerException(); 4150 } 4151 selfLink_ = value; 4152 bitField0_ |= 0x00001000; 4153 onChanged(); 4154 return this; 4155 } 4156 /** 4157 * 4158 * 4159 * <pre> 4160 * [Output Only] Server-defined URL for the resource. 4161 * </pre> 4162 * 4163 * <code>optional string self_link = 456214797;</code> 4164 * 4165 * @return This builder for chaining. 4166 */ clearSelfLink()4167 public Builder clearSelfLink() { 4168 selfLink_ = getDefaultInstance().getSelfLink(); 4169 bitField0_ = (bitField0_ & ~0x00001000); 4170 onChanged(); 4171 return this; 4172 } 4173 /** 4174 * 4175 * 4176 * <pre> 4177 * [Output Only] Server-defined URL for the resource. 4178 * </pre> 4179 * 4180 * <code>optional string self_link = 456214797;</code> 4181 * 4182 * @param value The bytes for selfLink to set. 4183 * @return This builder for chaining. 4184 */ setSelfLinkBytes(com.google.protobuf.ByteString value)4185 public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) { 4186 if (value == null) { 4187 throw new NullPointerException(); 4188 } 4189 checkByteStringIsUtf8(value); 4190 selfLink_ = value; 4191 bitField0_ |= 0x00001000; 4192 onChanged(); 4193 return this; 4194 } 4195 4196 private com.google.cloud.compute.v1.ServerBinding serverBinding_; 4197 private com.google.protobuf.SingleFieldBuilderV3< 4198 com.google.cloud.compute.v1.ServerBinding, 4199 com.google.cloud.compute.v1.ServerBinding.Builder, 4200 com.google.cloud.compute.v1.ServerBindingOrBuilder> 4201 serverBindingBuilder_; 4202 /** 4203 * 4204 * 4205 * <pre> 4206 * Sets the binding properties for the physical server. Valid values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information. 4207 * </pre> 4208 * 4209 * <code>optional .google.cloud.compute.v1.ServerBinding server_binding = 208179593;</code> 4210 * 4211 * @return Whether the serverBinding field is set. 4212 */ hasServerBinding()4213 public boolean hasServerBinding() { 4214 return ((bitField0_ & 0x00002000) != 0); 4215 } 4216 /** 4217 * 4218 * 4219 * <pre> 4220 * Sets the binding properties for the physical server. Valid values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information. 4221 * </pre> 4222 * 4223 * <code>optional .google.cloud.compute.v1.ServerBinding server_binding = 208179593;</code> 4224 * 4225 * @return The serverBinding. 4226 */ getServerBinding()4227 public com.google.cloud.compute.v1.ServerBinding getServerBinding() { 4228 if (serverBindingBuilder_ == null) { 4229 return serverBinding_ == null 4230 ? com.google.cloud.compute.v1.ServerBinding.getDefaultInstance() 4231 : serverBinding_; 4232 } else { 4233 return serverBindingBuilder_.getMessage(); 4234 } 4235 } 4236 /** 4237 * 4238 * 4239 * <pre> 4240 * Sets the binding properties for the physical server. Valid values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information. 4241 * </pre> 4242 * 4243 * <code>optional .google.cloud.compute.v1.ServerBinding server_binding = 208179593;</code> 4244 */ setServerBinding(com.google.cloud.compute.v1.ServerBinding value)4245 public Builder setServerBinding(com.google.cloud.compute.v1.ServerBinding value) { 4246 if (serverBindingBuilder_ == null) { 4247 if (value == null) { 4248 throw new NullPointerException(); 4249 } 4250 serverBinding_ = value; 4251 } else { 4252 serverBindingBuilder_.setMessage(value); 4253 } 4254 bitField0_ |= 0x00002000; 4255 onChanged(); 4256 return this; 4257 } 4258 /** 4259 * 4260 * 4261 * <pre> 4262 * Sets the binding properties for the physical server. Valid values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information. 4263 * </pre> 4264 * 4265 * <code>optional .google.cloud.compute.v1.ServerBinding server_binding = 208179593;</code> 4266 */ setServerBinding( com.google.cloud.compute.v1.ServerBinding.Builder builderForValue)4267 public Builder setServerBinding( 4268 com.google.cloud.compute.v1.ServerBinding.Builder builderForValue) { 4269 if (serverBindingBuilder_ == null) { 4270 serverBinding_ = builderForValue.build(); 4271 } else { 4272 serverBindingBuilder_.setMessage(builderForValue.build()); 4273 } 4274 bitField0_ |= 0x00002000; 4275 onChanged(); 4276 return this; 4277 } 4278 /** 4279 * 4280 * 4281 * <pre> 4282 * Sets the binding properties for the physical server. Valid values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information. 4283 * </pre> 4284 * 4285 * <code>optional .google.cloud.compute.v1.ServerBinding server_binding = 208179593;</code> 4286 */ mergeServerBinding(com.google.cloud.compute.v1.ServerBinding value)4287 public Builder mergeServerBinding(com.google.cloud.compute.v1.ServerBinding value) { 4288 if (serverBindingBuilder_ == null) { 4289 if (((bitField0_ & 0x00002000) != 0) 4290 && serverBinding_ != null 4291 && serverBinding_ != com.google.cloud.compute.v1.ServerBinding.getDefaultInstance()) { 4292 getServerBindingBuilder().mergeFrom(value); 4293 } else { 4294 serverBinding_ = value; 4295 } 4296 } else { 4297 serverBindingBuilder_.mergeFrom(value); 4298 } 4299 bitField0_ |= 0x00002000; 4300 onChanged(); 4301 return this; 4302 } 4303 /** 4304 * 4305 * 4306 * <pre> 4307 * Sets the binding properties for the physical server. Valid values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information. 4308 * </pre> 4309 * 4310 * <code>optional .google.cloud.compute.v1.ServerBinding server_binding = 208179593;</code> 4311 */ clearServerBinding()4312 public Builder clearServerBinding() { 4313 bitField0_ = (bitField0_ & ~0x00002000); 4314 serverBinding_ = null; 4315 if (serverBindingBuilder_ != null) { 4316 serverBindingBuilder_.dispose(); 4317 serverBindingBuilder_ = null; 4318 } 4319 onChanged(); 4320 return this; 4321 } 4322 /** 4323 * 4324 * 4325 * <pre> 4326 * Sets the binding properties for the physical server. Valid values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information. 4327 * </pre> 4328 * 4329 * <code>optional .google.cloud.compute.v1.ServerBinding server_binding = 208179593;</code> 4330 */ getServerBindingBuilder()4331 public com.google.cloud.compute.v1.ServerBinding.Builder getServerBindingBuilder() { 4332 bitField0_ |= 0x00002000; 4333 onChanged(); 4334 return getServerBindingFieldBuilder().getBuilder(); 4335 } 4336 /** 4337 * 4338 * 4339 * <pre> 4340 * Sets the binding properties for the physical server. Valid values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information. 4341 * </pre> 4342 * 4343 * <code>optional .google.cloud.compute.v1.ServerBinding server_binding = 208179593;</code> 4344 */ getServerBindingOrBuilder()4345 public com.google.cloud.compute.v1.ServerBindingOrBuilder getServerBindingOrBuilder() { 4346 if (serverBindingBuilder_ != null) { 4347 return serverBindingBuilder_.getMessageOrBuilder(); 4348 } else { 4349 return serverBinding_ == null 4350 ? com.google.cloud.compute.v1.ServerBinding.getDefaultInstance() 4351 : serverBinding_; 4352 } 4353 } 4354 /** 4355 * 4356 * 4357 * <pre> 4358 * Sets the binding properties for the physical server. Valid values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information. 4359 * </pre> 4360 * 4361 * <code>optional .google.cloud.compute.v1.ServerBinding server_binding = 208179593;</code> 4362 */ 4363 private com.google.protobuf.SingleFieldBuilderV3< 4364 com.google.cloud.compute.v1.ServerBinding, 4365 com.google.cloud.compute.v1.ServerBinding.Builder, 4366 com.google.cloud.compute.v1.ServerBindingOrBuilder> getServerBindingFieldBuilder()4367 getServerBindingFieldBuilder() { 4368 if (serverBindingBuilder_ == null) { 4369 serverBindingBuilder_ = 4370 new com.google.protobuf.SingleFieldBuilderV3< 4371 com.google.cloud.compute.v1.ServerBinding, 4372 com.google.cloud.compute.v1.ServerBinding.Builder, 4373 com.google.cloud.compute.v1.ServerBindingOrBuilder>( 4374 getServerBinding(), getParentForChildren(), isClean()); 4375 serverBinding_ = null; 4376 } 4377 return serverBindingBuilder_; 4378 } 4379 4380 private java.lang.Object status_ = ""; 4381 /** 4382 * 4383 * 4384 * <pre> 4385 * [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING. 4386 * Check the Status enum for the list of possible values. 4387 * </pre> 4388 * 4389 * <code>optional string status = 181260274;</code> 4390 * 4391 * @return Whether the status field is set. 4392 */ hasStatus()4393 public boolean hasStatus() { 4394 return ((bitField0_ & 0x00004000) != 0); 4395 } 4396 /** 4397 * 4398 * 4399 * <pre> 4400 * [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING. 4401 * Check the Status enum for the list of possible values. 4402 * </pre> 4403 * 4404 * <code>optional string status = 181260274;</code> 4405 * 4406 * @return The status. 4407 */ getStatus()4408 public java.lang.String getStatus() { 4409 java.lang.Object ref = status_; 4410 if (!(ref instanceof java.lang.String)) { 4411 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 4412 java.lang.String s = bs.toStringUtf8(); 4413 status_ = s; 4414 return s; 4415 } else { 4416 return (java.lang.String) ref; 4417 } 4418 } 4419 /** 4420 * 4421 * 4422 * <pre> 4423 * [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING. 4424 * Check the Status enum for the list of possible values. 4425 * </pre> 4426 * 4427 * <code>optional string status = 181260274;</code> 4428 * 4429 * @return The bytes for status. 4430 */ getStatusBytes()4431 public com.google.protobuf.ByteString getStatusBytes() { 4432 java.lang.Object ref = status_; 4433 if (ref instanceof String) { 4434 com.google.protobuf.ByteString b = 4435 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 4436 status_ = b; 4437 return b; 4438 } else { 4439 return (com.google.protobuf.ByteString) ref; 4440 } 4441 } 4442 /** 4443 * 4444 * 4445 * <pre> 4446 * [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING. 4447 * Check the Status enum for the list of possible values. 4448 * </pre> 4449 * 4450 * <code>optional string status = 181260274;</code> 4451 * 4452 * @param value The status to set. 4453 * @return This builder for chaining. 4454 */ setStatus(java.lang.String value)4455 public Builder setStatus(java.lang.String value) { 4456 if (value == null) { 4457 throw new NullPointerException(); 4458 } 4459 status_ = value; 4460 bitField0_ |= 0x00004000; 4461 onChanged(); 4462 return this; 4463 } 4464 /** 4465 * 4466 * 4467 * <pre> 4468 * [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING. 4469 * Check the Status enum for the list of possible values. 4470 * </pre> 4471 * 4472 * <code>optional string status = 181260274;</code> 4473 * 4474 * @return This builder for chaining. 4475 */ clearStatus()4476 public Builder clearStatus() { 4477 status_ = getDefaultInstance().getStatus(); 4478 bitField0_ = (bitField0_ & ~0x00004000); 4479 onChanged(); 4480 return this; 4481 } 4482 /** 4483 * 4484 * 4485 * <pre> 4486 * [Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING. 4487 * Check the Status enum for the list of possible values. 4488 * </pre> 4489 * 4490 * <code>optional string status = 181260274;</code> 4491 * 4492 * @param value The bytes for status to set. 4493 * @return This builder for chaining. 4494 */ setStatusBytes(com.google.protobuf.ByteString value)4495 public Builder setStatusBytes(com.google.protobuf.ByteString value) { 4496 if (value == null) { 4497 throw new NullPointerException(); 4498 } 4499 checkByteStringIsUtf8(value); 4500 status_ = value; 4501 bitField0_ |= 0x00004000; 4502 onChanged(); 4503 return this; 4504 } 4505 4506 private java.lang.Object statusMessage_ = ""; 4507 /** 4508 * 4509 * 4510 * <pre> 4511 * [Output Only] An optional, human-readable explanation of the status. 4512 * </pre> 4513 * 4514 * <code>optional string status_message = 297428154;</code> 4515 * 4516 * @return Whether the statusMessage field is set. 4517 */ hasStatusMessage()4518 public boolean hasStatusMessage() { 4519 return ((bitField0_ & 0x00008000) != 0); 4520 } 4521 /** 4522 * 4523 * 4524 * <pre> 4525 * [Output Only] An optional, human-readable explanation of the status. 4526 * </pre> 4527 * 4528 * <code>optional string status_message = 297428154;</code> 4529 * 4530 * @return The statusMessage. 4531 */ getStatusMessage()4532 public java.lang.String getStatusMessage() { 4533 java.lang.Object ref = statusMessage_; 4534 if (!(ref instanceof java.lang.String)) { 4535 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 4536 java.lang.String s = bs.toStringUtf8(); 4537 statusMessage_ = s; 4538 return s; 4539 } else { 4540 return (java.lang.String) ref; 4541 } 4542 } 4543 /** 4544 * 4545 * 4546 * <pre> 4547 * [Output Only] An optional, human-readable explanation of the status. 4548 * </pre> 4549 * 4550 * <code>optional string status_message = 297428154;</code> 4551 * 4552 * @return The bytes for statusMessage. 4553 */ getStatusMessageBytes()4554 public com.google.protobuf.ByteString getStatusMessageBytes() { 4555 java.lang.Object ref = statusMessage_; 4556 if (ref instanceof String) { 4557 com.google.protobuf.ByteString b = 4558 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 4559 statusMessage_ = b; 4560 return b; 4561 } else { 4562 return (com.google.protobuf.ByteString) ref; 4563 } 4564 } 4565 /** 4566 * 4567 * 4568 * <pre> 4569 * [Output Only] An optional, human-readable explanation of the status. 4570 * </pre> 4571 * 4572 * <code>optional string status_message = 297428154;</code> 4573 * 4574 * @param value The statusMessage to set. 4575 * @return This builder for chaining. 4576 */ setStatusMessage(java.lang.String value)4577 public Builder setStatusMessage(java.lang.String value) { 4578 if (value == null) { 4579 throw new NullPointerException(); 4580 } 4581 statusMessage_ = value; 4582 bitField0_ |= 0x00008000; 4583 onChanged(); 4584 return this; 4585 } 4586 /** 4587 * 4588 * 4589 * <pre> 4590 * [Output Only] An optional, human-readable explanation of the status. 4591 * </pre> 4592 * 4593 * <code>optional string status_message = 297428154;</code> 4594 * 4595 * @return This builder for chaining. 4596 */ clearStatusMessage()4597 public Builder clearStatusMessage() { 4598 statusMessage_ = getDefaultInstance().getStatusMessage(); 4599 bitField0_ = (bitField0_ & ~0x00008000); 4600 onChanged(); 4601 return this; 4602 } 4603 /** 4604 * 4605 * 4606 * <pre> 4607 * [Output Only] An optional, human-readable explanation of the status. 4608 * </pre> 4609 * 4610 * <code>optional string status_message = 297428154;</code> 4611 * 4612 * @param value The bytes for statusMessage to set. 4613 * @return This builder for chaining. 4614 */ setStatusMessageBytes(com.google.protobuf.ByteString value)4615 public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { 4616 if (value == null) { 4617 throw new NullPointerException(); 4618 } 4619 checkByteStringIsUtf8(value); 4620 statusMessage_ = value; 4621 bitField0_ |= 0x00008000; 4622 onChanged(); 4623 return this; 4624 } 4625 4626 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)4627 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 4628 return super.setUnknownFields(unknownFields); 4629 } 4630 4631 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4632 public final Builder mergeUnknownFields( 4633 final com.google.protobuf.UnknownFieldSet unknownFields) { 4634 return super.mergeUnknownFields(unknownFields); 4635 } 4636 4637 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.NodeTemplate) 4638 } 4639 4640 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.NodeTemplate) 4641 private static final com.google.cloud.compute.v1.NodeTemplate DEFAULT_INSTANCE; 4642 4643 static { 4644 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.NodeTemplate(); 4645 } 4646 getDefaultInstance()4647 public static com.google.cloud.compute.v1.NodeTemplate getDefaultInstance() { 4648 return DEFAULT_INSTANCE; 4649 } 4650 4651 private static final com.google.protobuf.Parser<NodeTemplate> PARSER = 4652 new com.google.protobuf.AbstractParser<NodeTemplate>() { 4653 @java.lang.Override 4654 public NodeTemplate parsePartialFrom( 4655 com.google.protobuf.CodedInputStream input, 4656 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4657 throws com.google.protobuf.InvalidProtocolBufferException { 4658 Builder builder = newBuilder(); 4659 try { 4660 builder.mergeFrom(input, extensionRegistry); 4661 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 4662 throw e.setUnfinishedMessage(builder.buildPartial()); 4663 } catch (com.google.protobuf.UninitializedMessageException e) { 4664 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 4665 } catch (java.io.IOException e) { 4666 throw new com.google.protobuf.InvalidProtocolBufferException(e) 4667 .setUnfinishedMessage(builder.buildPartial()); 4668 } 4669 return builder.buildPartial(); 4670 } 4671 }; 4672 parser()4673 public static com.google.protobuf.Parser<NodeTemplate> parser() { 4674 return PARSER; 4675 } 4676 4677 @java.lang.Override getParserForType()4678 public com.google.protobuf.Parser<NodeTemplate> getParserForType() { 4679 return PARSER; 4680 } 4681 4682 @java.lang.Override getDefaultInstanceForType()4683 public com.google.cloud.compute.v1.NodeTemplate getDefaultInstanceForType() { 4684 return DEFAULT_INSTANCE; 4685 } 4686 } 4687