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