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/notebooks/v1beta1/instance.proto 18 19 package com.google.cloud.notebooks.v1beta1; 20 21 /** 22 * 23 * 24 * <pre> 25 * The definition of a notebook instance. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.notebooks.v1beta1.Instance} 29 */ 30 public final class Instance extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1beta1.Instance) 33 InstanceOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use Instance.newBuilder() to construct. Instance(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private Instance(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 Instance()40 private Instance() { 41 name_ = ""; 42 postStartupScript_ = ""; 43 proxyUri_ = ""; 44 instanceOwners_ = com.google.protobuf.LazyStringArrayList.EMPTY; 45 serviceAccount_ = ""; 46 machineType_ = ""; 47 state_ = 0; 48 customGpuDriverPath_ = ""; 49 bootDiskType_ = 0; 50 dataDiskType_ = 0; 51 diskEncryption_ = 0; 52 kmsKey_ = ""; 53 network_ = ""; 54 subnet_ = ""; 55 nicType_ = 0; 56 } 57 58 @java.lang.Override 59 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)60 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 61 return new Instance(); 62 } 63 64 @java.lang.Override getUnknownFields()65 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 66 return this.unknownFields; 67 } 68 getDescriptor()69 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 70 return com.google.cloud.notebooks.v1beta1.InstanceProto 71 .internal_static_google_cloud_notebooks_v1beta1_Instance_descriptor; 72 } 73 74 @SuppressWarnings({"rawtypes"}) 75 @java.lang.Override internalGetMapField(int number)76 protected com.google.protobuf.MapField internalGetMapField(int number) { 77 switch (number) { 78 case 21: 79 return internalGetLabels(); 80 case 22: 81 return internalGetMetadata(); 82 default: 83 throw new RuntimeException("Invalid map field number: " + number); 84 } 85 } 86 87 @java.lang.Override 88 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()89 internalGetFieldAccessorTable() { 90 return com.google.cloud.notebooks.v1beta1.InstanceProto 91 .internal_static_google_cloud_notebooks_v1beta1_Instance_fieldAccessorTable 92 .ensureFieldAccessorsInitialized( 93 com.google.cloud.notebooks.v1beta1.Instance.class, 94 com.google.cloud.notebooks.v1beta1.Instance.Builder.class); 95 } 96 97 /** 98 * 99 * 100 * <pre> 101 * Definition of the types of hardware accelerators that can be used on this 102 * instance. 103 * </pre> 104 * 105 * Protobuf enum {@code google.cloud.notebooks.v1beta1.Instance.AcceleratorType} 106 */ 107 public enum AcceleratorType implements com.google.protobuf.ProtocolMessageEnum { 108 /** 109 * 110 * 111 * <pre> 112 * Accelerator type is not specified. 113 * </pre> 114 * 115 * <code>ACCELERATOR_TYPE_UNSPECIFIED = 0;</code> 116 */ 117 ACCELERATOR_TYPE_UNSPECIFIED(0), 118 /** 119 * 120 * 121 * <pre> 122 * Accelerator type is Nvidia Tesla K80. 123 * </pre> 124 * 125 * <code>NVIDIA_TESLA_K80 = 1;</code> 126 */ 127 NVIDIA_TESLA_K80(1), 128 /** 129 * 130 * 131 * <pre> 132 * Accelerator type is Nvidia Tesla P100. 133 * </pre> 134 * 135 * <code>NVIDIA_TESLA_P100 = 2;</code> 136 */ 137 NVIDIA_TESLA_P100(2), 138 /** 139 * 140 * 141 * <pre> 142 * Accelerator type is Nvidia Tesla V100. 143 * </pre> 144 * 145 * <code>NVIDIA_TESLA_V100 = 3;</code> 146 */ 147 NVIDIA_TESLA_V100(3), 148 /** 149 * 150 * 151 * <pre> 152 * Accelerator type is Nvidia Tesla P4. 153 * </pre> 154 * 155 * <code>NVIDIA_TESLA_P4 = 4;</code> 156 */ 157 NVIDIA_TESLA_P4(4), 158 /** 159 * 160 * 161 * <pre> 162 * Accelerator type is Nvidia Tesla T4. 163 * </pre> 164 * 165 * <code>NVIDIA_TESLA_T4 = 5;</code> 166 */ 167 NVIDIA_TESLA_T4(5), 168 /** 169 * 170 * 171 * <pre> 172 * Accelerator type is NVIDIA Tesla T4 Virtual Workstations. 173 * </pre> 174 * 175 * <code>NVIDIA_TESLA_T4_VWS = 8;</code> 176 */ 177 NVIDIA_TESLA_T4_VWS(8), 178 /** 179 * 180 * 181 * <pre> 182 * Accelerator type is NVIDIA Tesla P100 Virtual Workstations. 183 * </pre> 184 * 185 * <code>NVIDIA_TESLA_P100_VWS = 9;</code> 186 */ 187 NVIDIA_TESLA_P100_VWS(9), 188 /** 189 * 190 * 191 * <pre> 192 * Accelerator type is NVIDIA Tesla P4 Virtual Workstations. 193 * </pre> 194 * 195 * <code>NVIDIA_TESLA_P4_VWS = 10;</code> 196 */ 197 NVIDIA_TESLA_P4_VWS(10), 198 /** 199 * 200 * 201 * <pre> 202 * (Coming soon) Accelerator type is TPU V2. 203 * </pre> 204 * 205 * <code>TPU_V2 = 6;</code> 206 */ 207 TPU_V2(6), 208 /** 209 * 210 * 211 * <pre> 212 * (Coming soon) Accelerator type is TPU V3. 213 * </pre> 214 * 215 * <code>TPU_V3 = 7;</code> 216 */ 217 TPU_V3(7), 218 UNRECOGNIZED(-1), 219 ; 220 221 /** 222 * 223 * 224 * <pre> 225 * Accelerator type is not specified. 226 * </pre> 227 * 228 * <code>ACCELERATOR_TYPE_UNSPECIFIED = 0;</code> 229 */ 230 public static final int ACCELERATOR_TYPE_UNSPECIFIED_VALUE = 0; 231 /** 232 * 233 * 234 * <pre> 235 * Accelerator type is Nvidia Tesla K80. 236 * </pre> 237 * 238 * <code>NVIDIA_TESLA_K80 = 1;</code> 239 */ 240 public static final int NVIDIA_TESLA_K80_VALUE = 1; 241 /** 242 * 243 * 244 * <pre> 245 * Accelerator type is Nvidia Tesla P100. 246 * </pre> 247 * 248 * <code>NVIDIA_TESLA_P100 = 2;</code> 249 */ 250 public static final int NVIDIA_TESLA_P100_VALUE = 2; 251 /** 252 * 253 * 254 * <pre> 255 * Accelerator type is Nvidia Tesla V100. 256 * </pre> 257 * 258 * <code>NVIDIA_TESLA_V100 = 3;</code> 259 */ 260 public static final int NVIDIA_TESLA_V100_VALUE = 3; 261 /** 262 * 263 * 264 * <pre> 265 * Accelerator type is Nvidia Tesla P4. 266 * </pre> 267 * 268 * <code>NVIDIA_TESLA_P4 = 4;</code> 269 */ 270 public static final int NVIDIA_TESLA_P4_VALUE = 4; 271 /** 272 * 273 * 274 * <pre> 275 * Accelerator type is Nvidia Tesla T4. 276 * </pre> 277 * 278 * <code>NVIDIA_TESLA_T4 = 5;</code> 279 */ 280 public static final int NVIDIA_TESLA_T4_VALUE = 5; 281 /** 282 * 283 * 284 * <pre> 285 * Accelerator type is NVIDIA Tesla T4 Virtual Workstations. 286 * </pre> 287 * 288 * <code>NVIDIA_TESLA_T4_VWS = 8;</code> 289 */ 290 public static final int NVIDIA_TESLA_T4_VWS_VALUE = 8; 291 /** 292 * 293 * 294 * <pre> 295 * Accelerator type is NVIDIA Tesla P100 Virtual Workstations. 296 * </pre> 297 * 298 * <code>NVIDIA_TESLA_P100_VWS = 9;</code> 299 */ 300 public static final int NVIDIA_TESLA_P100_VWS_VALUE = 9; 301 /** 302 * 303 * 304 * <pre> 305 * Accelerator type is NVIDIA Tesla P4 Virtual Workstations. 306 * </pre> 307 * 308 * <code>NVIDIA_TESLA_P4_VWS = 10;</code> 309 */ 310 public static final int NVIDIA_TESLA_P4_VWS_VALUE = 10; 311 /** 312 * 313 * 314 * <pre> 315 * (Coming soon) Accelerator type is TPU V2. 316 * </pre> 317 * 318 * <code>TPU_V2 = 6;</code> 319 */ 320 public static final int TPU_V2_VALUE = 6; 321 /** 322 * 323 * 324 * <pre> 325 * (Coming soon) Accelerator type is TPU V3. 326 * </pre> 327 * 328 * <code>TPU_V3 = 7;</code> 329 */ 330 public static final int TPU_V3_VALUE = 7; 331 getNumber()332 public final int getNumber() { 333 if (this == UNRECOGNIZED) { 334 throw new java.lang.IllegalArgumentException( 335 "Can't get the number of an unknown enum value."); 336 } 337 return value; 338 } 339 340 /** 341 * @param value The numeric wire value of the corresponding enum entry. 342 * @return The enum associated with the given numeric wire value. 343 * @deprecated Use {@link #forNumber(int)} instead. 344 */ 345 @java.lang.Deprecated valueOf(int value)346 public static AcceleratorType valueOf(int value) { 347 return forNumber(value); 348 } 349 350 /** 351 * @param value The numeric wire value of the corresponding enum entry. 352 * @return The enum associated with the given numeric wire value. 353 */ forNumber(int value)354 public static AcceleratorType forNumber(int value) { 355 switch (value) { 356 case 0: 357 return ACCELERATOR_TYPE_UNSPECIFIED; 358 case 1: 359 return NVIDIA_TESLA_K80; 360 case 2: 361 return NVIDIA_TESLA_P100; 362 case 3: 363 return NVIDIA_TESLA_V100; 364 case 4: 365 return NVIDIA_TESLA_P4; 366 case 5: 367 return NVIDIA_TESLA_T4; 368 case 8: 369 return NVIDIA_TESLA_T4_VWS; 370 case 9: 371 return NVIDIA_TESLA_P100_VWS; 372 case 10: 373 return NVIDIA_TESLA_P4_VWS; 374 case 6: 375 return TPU_V2; 376 case 7: 377 return TPU_V3; 378 default: 379 return null; 380 } 381 } 382 internalGetValueMap()383 public static com.google.protobuf.Internal.EnumLiteMap<AcceleratorType> internalGetValueMap() { 384 return internalValueMap; 385 } 386 387 private static final com.google.protobuf.Internal.EnumLiteMap<AcceleratorType> 388 internalValueMap = 389 new com.google.protobuf.Internal.EnumLiteMap<AcceleratorType>() { 390 public AcceleratorType findValueByNumber(int number) { 391 return AcceleratorType.forNumber(number); 392 } 393 }; 394 getValueDescriptor()395 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 396 if (this == UNRECOGNIZED) { 397 throw new java.lang.IllegalStateException( 398 "Can't get the descriptor of an unrecognized enum value."); 399 } 400 return getDescriptor().getValues().get(ordinal()); 401 } 402 getDescriptorForType()403 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 404 return getDescriptor(); 405 } 406 getDescriptor()407 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 408 return com.google.cloud.notebooks.v1beta1.Instance.getDescriptor().getEnumTypes().get(0); 409 } 410 411 private static final AcceleratorType[] VALUES = values(); 412 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)413 public static AcceleratorType valueOf( 414 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 415 if (desc.getType() != getDescriptor()) { 416 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 417 } 418 if (desc.getIndex() == -1) { 419 return UNRECOGNIZED; 420 } 421 return VALUES[desc.getIndex()]; 422 } 423 424 private final int value; 425 AcceleratorType(int value)426 private AcceleratorType(int value) { 427 this.value = value; 428 } 429 430 // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1beta1.Instance.AcceleratorType) 431 } 432 433 /** 434 * 435 * 436 * <pre> 437 * The definition of the states of this instance. 438 * </pre> 439 * 440 * Protobuf enum {@code google.cloud.notebooks.v1beta1.Instance.State} 441 */ 442 public enum State implements com.google.protobuf.ProtocolMessageEnum { 443 /** 444 * 445 * 446 * <pre> 447 * State is not specified. 448 * </pre> 449 * 450 * <code>STATE_UNSPECIFIED = 0;</code> 451 */ 452 STATE_UNSPECIFIED(0), 453 /** 454 * 455 * 456 * <pre> 457 * The control logic is starting the instance. 458 * </pre> 459 * 460 * <code>STARTING = 1;</code> 461 */ 462 STARTING(1), 463 /** 464 * 465 * 466 * <pre> 467 * The control logic is installing required frameworks and registering the 468 * instance with notebook proxy 469 * </pre> 470 * 471 * <code>PROVISIONING = 2;</code> 472 */ 473 PROVISIONING(2), 474 /** 475 * 476 * 477 * <pre> 478 * The instance is running. 479 * </pre> 480 * 481 * <code>ACTIVE = 3;</code> 482 */ 483 ACTIVE(3), 484 /** 485 * 486 * 487 * <pre> 488 * The control logic is stopping the instance. 489 * </pre> 490 * 491 * <code>STOPPING = 4;</code> 492 */ 493 STOPPING(4), 494 /** 495 * 496 * 497 * <pre> 498 * The instance is stopped. 499 * </pre> 500 * 501 * <code>STOPPED = 5;</code> 502 */ 503 STOPPED(5), 504 /** 505 * 506 * 507 * <pre> 508 * The instance is deleted. 509 * </pre> 510 * 511 * <code>DELETED = 6;</code> 512 */ 513 DELETED(6), 514 /** 515 * 516 * 517 * <pre> 518 * The instance is upgrading. 519 * </pre> 520 * 521 * <code>UPGRADING = 7;</code> 522 */ 523 UPGRADING(7), 524 /** 525 * 526 * 527 * <pre> 528 * The instance is being created. 529 * </pre> 530 * 531 * <code>INITIALIZING = 8;</code> 532 */ 533 INITIALIZING(8), 534 /** 535 * 536 * 537 * <pre> 538 * The instance is getting registered. 539 * </pre> 540 * 541 * <code>REGISTERING = 9;</code> 542 */ 543 REGISTERING(9), 544 /** 545 * 546 * 547 * <pre> 548 * The instance is suspending. 549 * </pre> 550 * 551 * <code>SUSPENDING = 10;</code> 552 */ 553 SUSPENDING(10), 554 /** 555 * 556 * 557 * <pre> 558 * The instance is suspended. 559 * </pre> 560 * 561 * <code>SUSPENDED = 11;</code> 562 */ 563 SUSPENDED(11), 564 UNRECOGNIZED(-1), 565 ; 566 567 /** 568 * 569 * 570 * <pre> 571 * State is not specified. 572 * </pre> 573 * 574 * <code>STATE_UNSPECIFIED = 0;</code> 575 */ 576 public static final int STATE_UNSPECIFIED_VALUE = 0; 577 /** 578 * 579 * 580 * <pre> 581 * The control logic is starting the instance. 582 * </pre> 583 * 584 * <code>STARTING = 1;</code> 585 */ 586 public static final int STARTING_VALUE = 1; 587 /** 588 * 589 * 590 * <pre> 591 * The control logic is installing required frameworks and registering the 592 * instance with notebook proxy 593 * </pre> 594 * 595 * <code>PROVISIONING = 2;</code> 596 */ 597 public static final int PROVISIONING_VALUE = 2; 598 /** 599 * 600 * 601 * <pre> 602 * The instance is running. 603 * </pre> 604 * 605 * <code>ACTIVE = 3;</code> 606 */ 607 public static final int ACTIVE_VALUE = 3; 608 /** 609 * 610 * 611 * <pre> 612 * The control logic is stopping the instance. 613 * </pre> 614 * 615 * <code>STOPPING = 4;</code> 616 */ 617 public static final int STOPPING_VALUE = 4; 618 /** 619 * 620 * 621 * <pre> 622 * The instance is stopped. 623 * </pre> 624 * 625 * <code>STOPPED = 5;</code> 626 */ 627 public static final int STOPPED_VALUE = 5; 628 /** 629 * 630 * 631 * <pre> 632 * The instance is deleted. 633 * </pre> 634 * 635 * <code>DELETED = 6;</code> 636 */ 637 public static final int DELETED_VALUE = 6; 638 /** 639 * 640 * 641 * <pre> 642 * The instance is upgrading. 643 * </pre> 644 * 645 * <code>UPGRADING = 7;</code> 646 */ 647 public static final int UPGRADING_VALUE = 7; 648 /** 649 * 650 * 651 * <pre> 652 * The instance is being created. 653 * </pre> 654 * 655 * <code>INITIALIZING = 8;</code> 656 */ 657 public static final int INITIALIZING_VALUE = 8; 658 /** 659 * 660 * 661 * <pre> 662 * The instance is getting registered. 663 * </pre> 664 * 665 * <code>REGISTERING = 9;</code> 666 */ 667 public static final int REGISTERING_VALUE = 9; 668 /** 669 * 670 * 671 * <pre> 672 * The instance is suspending. 673 * </pre> 674 * 675 * <code>SUSPENDING = 10;</code> 676 */ 677 public static final int SUSPENDING_VALUE = 10; 678 /** 679 * 680 * 681 * <pre> 682 * The instance is suspended. 683 * </pre> 684 * 685 * <code>SUSPENDED = 11;</code> 686 */ 687 public static final int SUSPENDED_VALUE = 11; 688 getNumber()689 public final int getNumber() { 690 if (this == UNRECOGNIZED) { 691 throw new java.lang.IllegalArgumentException( 692 "Can't get the number of an unknown enum value."); 693 } 694 return value; 695 } 696 697 /** 698 * @param value The numeric wire value of the corresponding enum entry. 699 * @return The enum associated with the given numeric wire value. 700 * @deprecated Use {@link #forNumber(int)} instead. 701 */ 702 @java.lang.Deprecated valueOf(int value)703 public static State valueOf(int value) { 704 return forNumber(value); 705 } 706 707 /** 708 * @param value The numeric wire value of the corresponding enum entry. 709 * @return The enum associated with the given numeric wire value. 710 */ forNumber(int value)711 public static State forNumber(int value) { 712 switch (value) { 713 case 0: 714 return STATE_UNSPECIFIED; 715 case 1: 716 return STARTING; 717 case 2: 718 return PROVISIONING; 719 case 3: 720 return ACTIVE; 721 case 4: 722 return STOPPING; 723 case 5: 724 return STOPPED; 725 case 6: 726 return DELETED; 727 case 7: 728 return UPGRADING; 729 case 8: 730 return INITIALIZING; 731 case 9: 732 return REGISTERING; 733 case 10: 734 return SUSPENDING; 735 case 11: 736 return SUSPENDED; 737 default: 738 return null; 739 } 740 } 741 internalGetValueMap()742 public static com.google.protobuf.Internal.EnumLiteMap<State> internalGetValueMap() { 743 return internalValueMap; 744 } 745 746 private static final com.google.protobuf.Internal.EnumLiteMap<State> internalValueMap = 747 new com.google.protobuf.Internal.EnumLiteMap<State>() { 748 public State findValueByNumber(int number) { 749 return State.forNumber(number); 750 } 751 }; 752 getValueDescriptor()753 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 754 if (this == UNRECOGNIZED) { 755 throw new java.lang.IllegalStateException( 756 "Can't get the descriptor of an unrecognized enum value."); 757 } 758 return getDescriptor().getValues().get(ordinal()); 759 } 760 getDescriptorForType()761 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 762 return getDescriptor(); 763 } 764 getDescriptor()765 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 766 return com.google.cloud.notebooks.v1beta1.Instance.getDescriptor().getEnumTypes().get(1); 767 } 768 769 private static final State[] VALUES = values(); 770 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)771 public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 772 if (desc.getType() != getDescriptor()) { 773 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 774 } 775 if (desc.getIndex() == -1) { 776 return UNRECOGNIZED; 777 } 778 return VALUES[desc.getIndex()]; 779 } 780 781 private final int value; 782 State(int value)783 private State(int value) { 784 this.value = value; 785 } 786 787 // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1beta1.Instance.State) 788 } 789 790 /** 791 * 792 * 793 * <pre> 794 * Possible disk types for notebook instances. 795 * </pre> 796 * 797 * Protobuf enum {@code google.cloud.notebooks.v1beta1.Instance.DiskType} 798 */ 799 public enum DiskType implements com.google.protobuf.ProtocolMessageEnum { 800 /** 801 * 802 * 803 * <pre> 804 * Disk type not set. 805 * </pre> 806 * 807 * <code>DISK_TYPE_UNSPECIFIED = 0;</code> 808 */ 809 DISK_TYPE_UNSPECIFIED(0), 810 /** 811 * 812 * 813 * <pre> 814 * Standard persistent disk type. 815 * </pre> 816 * 817 * <code>PD_STANDARD = 1;</code> 818 */ 819 PD_STANDARD(1), 820 /** 821 * 822 * 823 * <pre> 824 * SSD persistent disk type. 825 * </pre> 826 * 827 * <code>PD_SSD = 2;</code> 828 */ 829 PD_SSD(2), 830 /** 831 * 832 * 833 * <pre> 834 * Balanced persistent disk type. 835 * </pre> 836 * 837 * <code>PD_BALANCED = 3;</code> 838 */ 839 PD_BALANCED(3), 840 UNRECOGNIZED(-1), 841 ; 842 843 /** 844 * 845 * 846 * <pre> 847 * Disk type not set. 848 * </pre> 849 * 850 * <code>DISK_TYPE_UNSPECIFIED = 0;</code> 851 */ 852 public static final int DISK_TYPE_UNSPECIFIED_VALUE = 0; 853 /** 854 * 855 * 856 * <pre> 857 * Standard persistent disk type. 858 * </pre> 859 * 860 * <code>PD_STANDARD = 1;</code> 861 */ 862 public static final int PD_STANDARD_VALUE = 1; 863 /** 864 * 865 * 866 * <pre> 867 * SSD persistent disk type. 868 * </pre> 869 * 870 * <code>PD_SSD = 2;</code> 871 */ 872 public static final int PD_SSD_VALUE = 2; 873 /** 874 * 875 * 876 * <pre> 877 * Balanced persistent disk type. 878 * </pre> 879 * 880 * <code>PD_BALANCED = 3;</code> 881 */ 882 public static final int PD_BALANCED_VALUE = 3; 883 getNumber()884 public final int getNumber() { 885 if (this == UNRECOGNIZED) { 886 throw new java.lang.IllegalArgumentException( 887 "Can't get the number of an unknown enum value."); 888 } 889 return value; 890 } 891 892 /** 893 * @param value The numeric wire value of the corresponding enum entry. 894 * @return The enum associated with the given numeric wire value. 895 * @deprecated Use {@link #forNumber(int)} instead. 896 */ 897 @java.lang.Deprecated valueOf(int value)898 public static DiskType valueOf(int value) { 899 return forNumber(value); 900 } 901 902 /** 903 * @param value The numeric wire value of the corresponding enum entry. 904 * @return The enum associated with the given numeric wire value. 905 */ forNumber(int value)906 public static DiskType forNumber(int value) { 907 switch (value) { 908 case 0: 909 return DISK_TYPE_UNSPECIFIED; 910 case 1: 911 return PD_STANDARD; 912 case 2: 913 return PD_SSD; 914 case 3: 915 return PD_BALANCED; 916 default: 917 return null; 918 } 919 } 920 internalGetValueMap()921 public static com.google.protobuf.Internal.EnumLiteMap<DiskType> internalGetValueMap() { 922 return internalValueMap; 923 } 924 925 private static final com.google.protobuf.Internal.EnumLiteMap<DiskType> internalValueMap = 926 new com.google.protobuf.Internal.EnumLiteMap<DiskType>() { 927 public DiskType findValueByNumber(int number) { 928 return DiskType.forNumber(number); 929 } 930 }; 931 getValueDescriptor()932 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 933 if (this == UNRECOGNIZED) { 934 throw new java.lang.IllegalStateException( 935 "Can't get the descriptor of an unrecognized enum value."); 936 } 937 return getDescriptor().getValues().get(ordinal()); 938 } 939 getDescriptorForType()940 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 941 return getDescriptor(); 942 } 943 getDescriptor()944 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 945 return com.google.cloud.notebooks.v1beta1.Instance.getDescriptor().getEnumTypes().get(2); 946 } 947 948 private static final DiskType[] VALUES = values(); 949 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)950 public static DiskType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 951 if (desc.getType() != getDescriptor()) { 952 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 953 } 954 if (desc.getIndex() == -1) { 955 return UNRECOGNIZED; 956 } 957 return VALUES[desc.getIndex()]; 958 } 959 960 private final int value; 961 DiskType(int value)962 private DiskType(int value) { 963 this.value = value; 964 } 965 966 // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1beta1.Instance.DiskType) 967 } 968 969 /** 970 * 971 * 972 * <pre> 973 * Definition of the disk encryption options. 974 * </pre> 975 * 976 * Protobuf enum {@code google.cloud.notebooks.v1beta1.Instance.DiskEncryption} 977 */ 978 public enum DiskEncryption implements com.google.protobuf.ProtocolMessageEnum { 979 /** 980 * 981 * 982 * <pre> 983 * Disk encryption is not specified. 984 * </pre> 985 * 986 * <code>DISK_ENCRYPTION_UNSPECIFIED = 0;</code> 987 */ 988 DISK_ENCRYPTION_UNSPECIFIED(0), 989 /** 990 * 991 * 992 * <pre> 993 * Use Google managed encryption keys to encrypt the boot disk. 994 * </pre> 995 * 996 * <code>GMEK = 1;</code> 997 */ 998 GMEK(1), 999 /** 1000 * 1001 * 1002 * <pre> 1003 * Use customer managed encryption keys to encrypt the boot disk. 1004 * </pre> 1005 * 1006 * <code>CMEK = 2;</code> 1007 */ 1008 CMEK(2), 1009 UNRECOGNIZED(-1), 1010 ; 1011 1012 /** 1013 * 1014 * 1015 * <pre> 1016 * Disk encryption is not specified. 1017 * </pre> 1018 * 1019 * <code>DISK_ENCRYPTION_UNSPECIFIED = 0;</code> 1020 */ 1021 public static final int DISK_ENCRYPTION_UNSPECIFIED_VALUE = 0; 1022 /** 1023 * 1024 * 1025 * <pre> 1026 * Use Google managed encryption keys to encrypt the boot disk. 1027 * </pre> 1028 * 1029 * <code>GMEK = 1;</code> 1030 */ 1031 public static final int GMEK_VALUE = 1; 1032 /** 1033 * 1034 * 1035 * <pre> 1036 * Use customer managed encryption keys to encrypt the boot disk. 1037 * </pre> 1038 * 1039 * <code>CMEK = 2;</code> 1040 */ 1041 public static final int CMEK_VALUE = 2; 1042 getNumber()1043 public final int getNumber() { 1044 if (this == UNRECOGNIZED) { 1045 throw new java.lang.IllegalArgumentException( 1046 "Can't get the number of an unknown enum value."); 1047 } 1048 return value; 1049 } 1050 1051 /** 1052 * @param value The numeric wire value of the corresponding enum entry. 1053 * @return The enum associated with the given numeric wire value. 1054 * @deprecated Use {@link #forNumber(int)} instead. 1055 */ 1056 @java.lang.Deprecated valueOf(int value)1057 public static DiskEncryption valueOf(int value) { 1058 return forNumber(value); 1059 } 1060 1061 /** 1062 * @param value The numeric wire value of the corresponding enum entry. 1063 * @return The enum associated with the given numeric wire value. 1064 */ forNumber(int value)1065 public static DiskEncryption forNumber(int value) { 1066 switch (value) { 1067 case 0: 1068 return DISK_ENCRYPTION_UNSPECIFIED; 1069 case 1: 1070 return GMEK; 1071 case 2: 1072 return CMEK; 1073 default: 1074 return null; 1075 } 1076 } 1077 internalGetValueMap()1078 public static com.google.protobuf.Internal.EnumLiteMap<DiskEncryption> internalGetValueMap() { 1079 return internalValueMap; 1080 } 1081 1082 private static final com.google.protobuf.Internal.EnumLiteMap<DiskEncryption> internalValueMap = 1083 new com.google.protobuf.Internal.EnumLiteMap<DiskEncryption>() { 1084 public DiskEncryption findValueByNumber(int number) { 1085 return DiskEncryption.forNumber(number); 1086 } 1087 }; 1088 getValueDescriptor()1089 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 1090 if (this == UNRECOGNIZED) { 1091 throw new java.lang.IllegalStateException( 1092 "Can't get the descriptor of an unrecognized enum value."); 1093 } 1094 return getDescriptor().getValues().get(ordinal()); 1095 } 1096 getDescriptorForType()1097 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 1098 return getDescriptor(); 1099 } 1100 getDescriptor()1101 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 1102 return com.google.cloud.notebooks.v1beta1.Instance.getDescriptor().getEnumTypes().get(3); 1103 } 1104 1105 private static final DiskEncryption[] VALUES = values(); 1106 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)1107 public static DiskEncryption valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 1108 if (desc.getType() != getDescriptor()) { 1109 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 1110 } 1111 if (desc.getIndex() == -1) { 1112 return UNRECOGNIZED; 1113 } 1114 return VALUES[desc.getIndex()]; 1115 } 1116 1117 private final int value; 1118 DiskEncryption(int value)1119 private DiskEncryption(int value) { 1120 this.value = value; 1121 } 1122 1123 // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1beta1.Instance.DiskEncryption) 1124 } 1125 1126 /** 1127 * 1128 * 1129 * <pre> 1130 * The type of vNIC driver. 1131 * </pre> 1132 * 1133 * Protobuf enum {@code google.cloud.notebooks.v1beta1.Instance.NicType} 1134 */ 1135 public enum NicType implements com.google.protobuf.ProtocolMessageEnum { 1136 /** 1137 * 1138 * 1139 * <pre> 1140 * No type specified. Default should be UNSPECIFIED_NIC_TYPE. 1141 * </pre> 1142 * 1143 * <code>UNSPECIFIED_NIC_TYPE = 0;</code> 1144 */ 1145 UNSPECIFIED_NIC_TYPE(0), 1146 /** 1147 * 1148 * 1149 * <pre> 1150 * VIRTIO. Default in Notebooks DLVM. 1151 * </pre> 1152 * 1153 * <code>VIRTIO_NET = 1;</code> 1154 */ 1155 VIRTIO_NET(1), 1156 /** 1157 * 1158 * 1159 * <pre> 1160 * GVNIC. Alternative to VIRTIO. 1161 * https://github.com/GoogleCloudPlatform/compute-virtual-ethernet-linux 1162 * </pre> 1163 * 1164 * <code>GVNIC = 2;</code> 1165 */ 1166 GVNIC(2), 1167 UNRECOGNIZED(-1), 1168 ; 1169 1170 /** 1171 * 1172 * 1173 * <pre> 1174 * No type specified. Default should be UNSPECIFIED_NIC_TYPE. 1175 * </pre> 1176 * 1177 * <code>UNSPECIFIED_NIC_TYPE = 0;</code> 1178 */ 1179 public static final int UNSPECIFIED_NIC_TYPE_VALUE = 0; 1180 /** 1181 * 1182 * 1183 * <pre> 1184 * VIRTIO. Default in Notebooks DLVM. 1185 * </pre> 1186 * 1187 * <code>VIRTIO_NET = 1;</code> 1188 */ 1189 public static final int VIRTIO_NET_VALUE = 1; 1190 /** 1191 * 1192 * 1193 * <pre> 1194 * GVNIC. Alternative to VIRTIO. 1195 * https://github.com/GoogleCloudPlatform/compute-virtual-ethernet-linux 1196 * </pre> 1197 * 1198 * <code>GVNIC = 2;</code> 1199 */ 1200 public static final int GVNIC_VALUE = 2; 1201 getNumber()1202 public final int getNumber() { 1203 if (this == UNRECOGNIZED) { 1204 throw new java.lang.IllegalArgumentException( 1205 "Can't get the number of an unknown enum value."); 1206 } 1207 return value; 1208 } 1209 1210 /** 1211 * @param value The numeric wire value of the corresponding enum entry. 1212 * @return The enum associated with the given numeric wire value. 1213 * @deprecated Use {@link #forNumber(int)} instead. 1214 */ 1215 @java.lang.Deprecated valueOf(int value)1216 public static NicType valueOf(int value) { 1217 return forNumber(value); 1218 } 1219 1220 /** 1221 * @param value The numeric wire value of the corresponding enum entry. 1222 * @return The enum associated with the given numeric wire value. 1223 */ forNumber(int value)1224 public static NicType forNumber(int value) { 1225 switch (value) { 1226 case 0: 1227 return UNSPECIFIED_NIC_TYPE; 1228 case 1: 1229 return VIRTIO_NET; 1230 case 2: 1231 return GVNIC; 1232 default: 1233 return null; 1234 } 1235 } 1236 internalGetValueMap()1237 public static com.google.protobuf.Internal.EnumLiteMap<NicType> internalGetValueMap() { 1238 return internalValueMap; 1239 } 1240 1241 private static final com.google.protobuf.Internal.EnumLiteMap<NicType> internalValueMap = 1242 new com.google.protobuf.Internal.EnumLiteMap<NicType>() { 1243 public NicType findValueByNumber(int number) { 1244 return NicType.forNumber(number); 1245 } 1246 }; 1247 getValueDescriptor()1248 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 1249 if (this == UNRECOGNIZED) { 1250 throw new java.lang.IllegalStateException( 1251 "Can't get the descriptor of an unrecognized enum value."); 1252 } 1253 return getDescriptor().getValues().get(ordinal()); 1254 } 1255 getDescriptorForType()1256 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 1257 return getDescriptor(); 1258 } 1259 getDescriptor()1260 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 1261 return com.google.cloud.notebooks.v1beta1.Instance.getDescriptor().getEnumTypes().get(4); 1262 } 1263 1264 private static final NicType[] VALUES = values(); 1265 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)1266 public static NicType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 1267 if (desc.getType() != getDescriptor()) { 1268 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 1269 } 1270 if (desc.getIndex() == -1) { 1271 return UNRECOGNIZED; 1272 } 1273 return VALUES[desc.getIndex()]; 1274 } 1275 1276 private final int value; 1277 NicType(int value)1278 private NicType(int value) { 1279 this.value = value; 1280 } 1281 1282 // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1beta1.Instance.NicType) 1283 } 1284 1285 public interface AcceleratorConfigOrBuilder 1286 extends 1287 // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig) 1288 com.google.protobuf.MessageOrBuilder { 1289 1290 /** 1291 * 1292 * 1293 * <pre> 1294 * Type of this accelerator. 1295 * </pre> 1296 * 1297 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 1;</code> 1298 * 1299 * @return The enum numeric value on the wire for type. 1300 */ getTypeValue()1301 int getTypeValue(); 1302 /** 1303 * 1304 * 1305 * <pre> 1306 * Type of this accelerator. 1307 * </pre> 1308 * 1309 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 1;</code> 1310 * 1311 * @return The type. 1312 */ getType()1313 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorType getType(); 1314 1315 /** 1316 * 1317 * 1318 * <pre> 1319 * Count of cores of this accelerator. 1320 * </pre> 1321 * 1322 * <code>int64 core_count = 2;</code> 1323 * 1324 * @return The coreCount. 1325 */ getCoreCount()1326 long getCoreCount(); 1327 } 1328 /** 1329 * 1330 * 1331 * <pre> 1332 * Definition of a hardware accelerator. Note that not all combinations 1333 * of `type` and `core_count` are valid. Check [GPUs on Compute 1334 * Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to find a 1335 * valid combination. TPUs are not supported. 1336 * </pre> 1337 * 1338 * Protobuf type {@code google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig} 1339 */ 1340 public static final class AcceleratorConfig extends com.google.protobuf.GeneratedMessageV3 1341 implements 1342 // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig) 1343 AcceleratorConfigOrBuilder { 1344 private static final long serialVersionUID = 0L; 1345 // Use AcceleratorConfig.newBuilder() to construct. AcceleratorConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)1346 private AcceleratorConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 1347 super(builder); 1348 } 1349 AcceleratorConfig()1350 private AcceleratorConfig() { 1351 type_ = 0; 1352 } 1353 1354 @java.lang.Override 1355 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)1356 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 1357 return new AcceleratorConfig(); 1358 } 1359 1360 @java.lang.Override getUnknownFields()1361 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 1362 return this.unknownFields; 1363 } 1364 getDescriptor()1365 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1366 return com.google.cloud.notebooks.v1beta1.InstanceProto 1367 .internal_static_google_cloud_notebooks_v1beta1_Instance_AcceleratorConfig_descriptor; 1368 } 1369 1370 @java.lang.Override 1371 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1372 internalGetFieldAccessorTable() { 1373 return com.google.cloud.notebooks.v1beta1.InstanceProto 1374 .internal_static_google_cloud_notebooks_v1beta1_Instance_AcceleratorConfig_fieldAccessorTable 1375 .ensureFieldAccessorsInitialized( 1376 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.class, 1377 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.Builder.class); 1378 } 1379 1380 public static final int TYPE_FIELD_NUMBER = 1; 1381 private int type_ = 0; 1382 /** 1383 * 1384 * 1385 * <pre> 1386 * Type of this accelerator. 1387 * </pre> 1388 * 1389 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 1;</code> 1390 * 1391 * @return The enum numeric value on the wire for type. 1392 */ 1393 @java.lang.Override getTypeValue()1394 public int getTypeValue() { 1395 return type_; 1396 } 1397 /** 1398 * 1399 * 1400 * <pre> 1401 * Type of this accelerator. 1402 * </pre> 1403 * 1404 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 1;</code> 1405 * 1406 * @return The type. 1407 */ 1408 @java.lang.Override getType()1409 public com.google.cloud.notebooks.v1beta1.Instance.AcceleratorType getType() { 1410 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorType result = 1411 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorType.forNumber(type_); 1412 return result == null 1413 ? com.google.cloud.notebooks.v1beta1.Instance.AcceleratorType.UNRECOGNIZED 1414 : result; 1415 } 1416 1417 public static final int CORE_COUNT_FIELD_NUMBER = 2; 1418 private long coreCount_ = 0L; 1419 /** 1420 * 1421 * 1422 * <pre> 1423 * Count of cores of this accelerator. 1424 * </pre> 1425 * 1426 * <code>int64 core_count = 2;</code> 1427 * 1428 * @return The coreCount. 1429 */ 1430 @java.lang.Override getCoreCount()1431 public long getCoreCount() { 1432 return coreCount_; 1433 } 1434 1435 private byte memoizedIsInitialized = -1; 1436 1437 @java.lang.Override isInitialized()1438 public final boolean isInitialized() { 1439 byte isInitialized = memoizedIsInitialized; 1440 if (isInitialized == 1) return true; 1441 if (isInitialized == 0) return false; 1442 1443 memoizedIsInitialized = 1; 1444 return true; 1445 } 1446 1447 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)1448 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 1449 if (type_ 1450 != com.google.cloud.notebooks.v1beta1.Instance.AcceleratorType 1451 .ACCELERATOR_TYPE_UNSPECIFIED 1452 .getNumber()) { 1453 output.writeEnum(1, type_); 1454 } 1455 if (coreCount_ != 0L) { 1456 output.writeInt64(2, coreCount_); 1457 } 1458 getUnknownFields().writeTo(output); 1459 } 1460 1461 @java.lang.Override getSerializedSize()1462 public int getSerializedSize() { 1463 int size = memoizedSize; 1464 if (size != -1) return size; 1465 1466 size = 0; 1467 if (type_ 1468 != com.google.cloud.notebooks.v1beta1.Instance.AcceleratorType 1469 .ACCELERATOR_TYPE_UNSPECIFIED 1470 .getNumber()) { 1471 size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); 1472 } 1473 if (coreCount_ != 0L) { 1474 size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, coreCount_); 1475 } 1476 size += getUnknownFields().getSerializedSize(); 1477 memoizedSize = size; 1478 return size; 1479 } 1480 1481 @java.lang.Override equals(final java.lang.Object obj)1482 public boolean equals(final java.lang.Object obj) { 1483 if (obj == this) { 1484 return true; 1485 } 1486 if (!(obj instanceof com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig)) { 1487 return super.equals(obj); 1488 } 1489 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig other = 1490 (com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig) obj; 1491 1492 if (type_ != other.type_) return false; 1493 if (getCoreCount() != other.getCoreCount()) return false; 1494 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1495 return true; 1496 } 1497 1498 @java.lang.Override hashCode()1499 public int hashCode() { 1500 if (memoizedHashCode != 0) { 1501 return memoizedHashCode; 1502 } 1503 int hash = 41; 1504 hash = (19 * hash) + getDescriptor().hashCode(); 1505 hash = (37 * hash) + TYPE_FIELD_NUMBER; 1506 hash = (53 * hash) + type_; 1507 hash = (37 * hash) + CORE_COUNT_FIELD_NUMBER; 1508 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCoreCount()); 1509 hash = (29 * hash) + getUnknownFields().hashCode(); 1510 memoizedHashCode = hash; 1511 return hash; 1512 } 1513 parseFrom( java.nio.ByteBuffer data)1514 public static com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig parseFrom( 1515 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 1516 return PARSER.parseFrom(data); 1517 } 1518 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1519 public static com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig parseFrom( 1520 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1521 throws com.google.protobuf.InvalidProtocolBufferException { 1522 return PARSER.parseFrom(data, extensionRegistry); 1523 } 1524 parseFrom( com.google.protobuf.ByteString data)1525 public static com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig parseFrom( 1526 com.google.protobuf.ByteString data) 1527 throws com.google.protobuf.InvalidProtocolBufferException { 1528 return PARSER.parseFrom(data); 1529 } 1530 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1531 public static com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig parseFrom( 1532 com.google.protobuf.ByteString data, 1533 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1534 throws com.google.protobuf.InvalidProtocolBufferException { 1535 return PARSER.parseFrom(data, extensionRegistry); 1536 } 1537 parseFrom( byte[] data)1538 public static com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig parseFrom( 1539 byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { 1540 return PARSER.parseFrom(data); 1541 } 1542 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1543 public static com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig parseFrom( 1544 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1545 throws com.google.protobuf.InvalidProtocolBufferException { 1546 return PARSER.parseFrom(data, extensionRegistry); 1547 } 1548 parseFrom( java.io.InputStream input)1549 public static com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig parseFrom( 1550 java.io.InputStream input) throws java.io.IOException { 1551 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1552 } 1553 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1554 public static com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig parseFrom( 1555 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1556 throws java.io.IOException { 1557 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1558 PARSER, input, extensionRegistry); 1559 } 1560 parseDelimitedFrom( java.io.InputStream input)1561 public static com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig parseDelimitedFrom( 1562 java.io.InputStream input) throws java.io.IOException { 1563 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1564 } 1565 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1566 public static com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig parseDelimitedFrom( 1567 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1568 throws java.io.IOException { 1569 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1570 PARSER, input, extensionRegistry); 1571 } 1572 parseFrom( com.google.protobuf.CodedInputStream input)1573 public static com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig parseFrom( 1574 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1575 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1576 } 1577 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1578 public static com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig parseFrom( 1579 com.google.protobuf.CodedInputStream input, 1580 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1581 throws java.io.IOException { 1582 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1583 PARSER, input, extensionRegistry); 1584 } 1585 1586 @java.lang.Override newBuilderForType()1587 public Builder newBuilderForType() { 1588 return newBuilder(); 1589 } 1590 newBuilder()1591 public static Builder newBuilder() { 1592 return DEFAULT_INSTANCE.toBuilder(); 1593 } 1594 newBuilder( com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig prototype)1595 public static Builder newBuilder( 1596 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig prototype) { 1597 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1598 } 1599 1600 @java.lang.Override toBuilder()1601 public Builder toBuilder() { 1602 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1603 } 1604 1605 @java.lang.Override newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1606 protected Builder newBuilderForType( 1607 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1608 Builder builder = new Builder(parent); 1609 return builder; 1610 } 1611 /** 1612 * 1613 * 1614 * <pre> 1615 * Definition of a hardware accelerator. Note that not all combinations 1616 * of `type` and `core_count` are valid. Check [GPUs on Compute 1617 * Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to find a 1618 * valid combination. TPUs are not supported. 1619 * </pre> 1620 * 1621 * Protobuf type {@code google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig} 1622 */ 1623 public static final class Builder 1624 extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1625 implements 1626 // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig) 1627 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfigOrBuilder { getDescriptor()1628 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1629 return com.google.cloud.notebooks.v1beta1.InstanceProto 1630 .internal_static_google_cloud_notebooks_v1beta1_Instance_AcceleratorConfig_descriptor; 1631 } 1632 1633 @java.lang.Override 1634 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1635 internalGetFieldAccessorTable() { 1636 return com.google.cloud.notebooks.v1beta1.InstanceProto 1637 .internal_static_google_cloud_notebooks_v1beta1_Instance_AcceleratorConfig_fieldAccessorTable 1638 .ensureFieldAccessorsInitialized( 1639 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.class, 1640 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.Builder.class); 1641 } 1642 1643 // Construct using com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.newBuilder() Builder()1644 private Builder() {} 1645 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1646 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1647 super(parent); 1648 } 1649 1650 @java.lang.Override clear()1651 public Builder clear() { 1652 super.clear(); 1653 bitField0_ = 0; 1654 type_ = 0; 1655 coreCount_ = 0L; 1656 return this; 1657 } 1658 1659 @java.lang.Override getDescriptorForType()1660 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1661 return com.google.cloud.notebooks.v1beta1.InstanceProto 1662 .internal_static_google_cloud_notebooks_v1beta1_Instance_AcceleratorConfig_descriptor; 1663 } 1664 1665 @java.lang.Override 1666 public com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig getDefaultInstanceForType()1667 getDefaultInstanceForType() { 1668 return com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.getDefaultInstance(); 1669 } 1670 1671 @java.lang.Override build()1672 public com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig build() { 1673 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig result = buildPartial(); 1674 if (!result.isInitialized()) { 1675 throw newUninitializedMessageException(result); 1676 } 1677 return result; 1678 } 1679 1680 @java.lang.Override buildPartial()1681 public com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig buildPartial() { 1682 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig result = 1683 new com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig(this); 1684 if (bitField0_ != 0) { 1685 buildPartial0(result); 1686 } 1687 onBuilt(); 1688 return result; 1689 } 1690 buildPartial0( com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig result)1691 private void buildPartial0( 1692 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig result) { 1693 int from_bitField0_ = bitField0_; 1694 if (((from_bitField0_ & 0x00000001) != 0)) { 1695 result.type_ = type_; 1696 } 1697 if (((from_bitField0_ & 0x00000002) != 0)) { 1698 result.coreCount_ = coreCount_; 1699 } 1700 } 1701 1702 @java.lang.Override clone()1703 public Builder clone() { 1704 return super.clone(); 1705 } 1706 1707 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1708 public Builder setField( 1709 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1710 return super.setField(field, value); 1711 } 1712 1713 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1714 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1715 return super.clearField(field); 1716 } 1717 1718 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1719 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1720 return super.clearOneof(oneof); 1721 } 1722 1723 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1724 public Builder setRepeatedField( 1725 com.google.protobuf.Descriptors.FieldDescriptor field, 1726 int index, 1727 java.lang.Object value) { 1728 return super.setRepeatedField(field, index, value); 1729 } 1730 1731 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1732 public Builder addRepeatedField( 1733 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1734 return super.addRepeatedField(field, value); 1735 } 1736 1737 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1738 public Builder mergeFrom(com.google.protobuf.Message other) { 1739 if (other instanceof com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig) { 1740 return mergeFrom((com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig) other); 1741 } else { 1742 super.mergeFrom(other); 1743 return this; 1744 } 1745 } 1746 mergeFrom( com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig other)1747 public Builder mergeFrom( 1748 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig other) { 1749 if (other 1750 == com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.getDefaultInstance()) 1751 return this; 1752 if (other.type_ != 0) { 1753 setTypeValue(other.getTypeValue()); 1754 } 1755 if (other.getCoreCount() != 0L) { 1756 setCoreCount(other.getCoreCount()); 1757 } 1758 this.mergeUnknownFields(other.getUnknownFields()); 1759 onChanged(); 1760 return this; 1761 } 1762 1763 @java.lang.Override isInitialized()1764 public final boolean isInitialized() { 1765 return true; 1766 } 1767 1768 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1769 public Builder mergeFrom( 1770 com.google.protobuf.CodedInputStream input, 1771 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1772 throws java.io.IOException { 1773 if (extensionRegistry == null) { 1774 throw new java.lang.NullPointerException(); 1775 } 1776 try { 1777 boolean done = false; 1778 while (!done) { 1779 int tag = input.readTag(); 1780 switch (tag) { 1781 case 0: 1782 done = true; 1783 break; 1784 case 8: 1785 { 1786 type_ = input.readEnum(); 1787 bitField0_ |= 0x00000001; 1788 break; 1789 } // case 8 1790 case 16: 1791 { 1792 coreCount_ = input.readInt64(); 1793 bitField0_ |= 0x00000002; 1794 break; 1795 } // case 16 1796 default: 1797 { 1798 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1799 done = true; // was an endgroup tag 1800 } 1801 break; 1802 } // default: 1803 } // switch (tag) 1804 } // while (!done) 1805 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1806 throw e.unwrapIOException(); 1807 } finally { 1808 onChanged(); 1809 } // finally 1810 return this; 1811 } 1812 1813 private int bitField0_; 1814 1815 private int type_ = 0; 1816 /** 1817 * 1818 * 1819 * <pre> 1820 * Type of this accelerator. 1821 * </pre> 1822 * 1823 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 1;</code> 1824 * 1825 * @return The enum numeric value on the wire for type. 1826 */ 1827 @java.lang.Override getTypeValue()1828 public int getTypeValue() { 1829 return type_; 1830 } 1831 /** 1832 * 1833 * 1834 * <pre> 1835 * Type of this accelerator. 1836 * </pre> 1837 * 1838 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 1;</code> 1839 * 1840 * @param value The enum numeric value on the wire for type to set. 1841 * @return This builder for chaining. 1842 */ setTypeValue(int value)1843 public Builder setTypeValue(int value) { 1844 type_ = value; 1845 bitField0_ |= 0x00000001; 1846 onChanged(); 1847 return this; 1848 } 1849 /** 1850 * 1851 * 1852 * <pre> 1853 * Type of this accelerator. 1854 * </pre> 1855 * 1856 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 1;</code> 1857 * 1858 * @return The type. 1859 */ 1860 @java.lang.Override getType()1861 public com.google.cloud.notebooks.v1beta1.Instance.AcceleratorType getType() { 1862 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorType result = 1863 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorType.forNumber(type_); 1864 return result == null 1865 ? com.google.cloud.notebooks.v1beta1.Instance.AcceleratorType.UNRECOGNIZED 1866 : result; 1867 } 1868 /** 1869 * 1870 * 1871 * <pre> 1872 * Type of this accelerator. 1873 * </pre> 1874 * 1875 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 1;</code> 1876 * 1877 * @param value The type to set. 1878 * @return This builder for chaining. 1879 */ setType(com.google.cloud.notebooks.v1beta1.Instance.AcceleratorType value)1880 public Builder setType(com.google.cloud.notebooks.v1beta1.Instance.AcceleratorType value) { 1881 if (value == null) { 1882 throw new NullPointerException(); 1883 } 1884 bitField0_ |= 0x00000001; 1885 type_ = value.getNumber(); 1886 onChanged(); 1887 return this; 1888 } 1889 /** 1890 * 1891 * 1892 * <pre> 1893 * Type of this accelerator. 1894 * </pre> 1895 * 1896 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorType type = 1;</code> 1897 * 1898 * @return This builder for chaining. 1899 */ clearType()1900 public Builder clearType() { 1901 bitField0_ = (bitField0_ & ~0x00000001); 1902 type_ = 0; 1903 onChanged(); 1904 return this; 1905 } 1906 1907 private long coreCount_; 1908 /** 1909 * 1910 * 1911 * <pre> 1912 * Count of cores of this accelerator. 1913 * </pre> 1914 * 1915 * <code>int64 core_count = 2;</code> 1916 * 1917 * @return The coreCount. 1918 */ 1919 @java.lang.Override getCoreCount()1920 public long getCoreCount() { 1921 return coreCount_; 1922 } 1923 /** 1924 * 1925 * 1926 * <pre> 1927 * Count of cores of this accelerator. 1928 * </pre> 1929 * 1930 * <code>int64 core_count = 2;</code> 1931 * 1932 * @param value The coreCount to set. 1933 * @return This builder for chaining. 1934 */ setCoreCount(long value)1935 public Builder setCoreCount(long value) { 1936 1937 coreCount_ = value; 1938 bitField0_ |= 0x00000002; 1939 onChanged(); 1940 return this; 1941 } 1942 /** 1943 * 1944 * 1945 * <pre> 1946 * Count of cores of this accelerator. 1947 * </pre> 1948 * 1949 * <code>int64 core_count = 2;</code> 1950 * 1951 * @return This builder for chaining. 1952 */ clearCoreCount()1953 public Builder clearCoreCount() { 1954 bitField0_ = (bitField0_ & ~0x00000002); 1955 coreCount_ = 0L; 1956 onChanged(); 1957 return this; 1958 } 1959 1960 @java.lang.Override setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1961 public final Builder setUnknownFields( 1962 final com.google.protobuf.UnknownFieldSet unknownFields) { 1963 return super.setUnknownFields(unknownFields); 1964 } 1965 1966 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1967 public final Builder mergeUnknownFields( 1968 final com.google.protobuf.UnknownFieldSet unknownFields) { 1969 return super.mergeUnknownFields(unknownFields); 1970 } 1971 1972 // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig) 1973 } 1974 1975 // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig) 1976 private static final com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig 1977 DEFAULT_INSTANCE; 1978 1979 static { 1980 DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig(); 1981 } 1982 1983 public static com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig getDefaultInstance()1984 getDefaultInstance() { 1985 return DEFAULT_INSTANCE; 1986 } 1987 1988 private static final com.google.protobuf.Parser<AcceleratorConfig> PARSER = 1989 new com.google.protobuf.AbstractParser<AcceleratorConfig>() { 1990 @java.lang.Override 1991 public AcceleratorConfig parsePartialFrom( 1992 com.google.protobuf.CodedInputStream input, 1993 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1994 throws com.google.protobuf.InvalidProtocolBufferException { 1995 Builder builder = newBuilder(); 1996 try { 1997 builder.mergeFrom(input, extensionRegistry); 1998 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1999 throw e.setUnfinishedMessage(builder.buildPartial()); 2000 } catch (com.google.protobuf.UninitializedMessageException e) { 2001 throw e.asInvalidProtocolBufferException() 2002 .setUnfinishedMessage(builder.buildPartial()); 2003 } catch (java.io.IOException e) { 2004 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2005 .setUnfinishedMessage(builder.buildPartial()); 2006 } 2007 return builder.buildPartial(); 2008 } 2009 }; 2010 parser()2011 public static com.google.protobuf.Parser<AcceleratorConfig> parser() { 2012 return PARSER; 2013 } 2014 2015 @java.lang.Override getParserForType()2016 public com.google.protobuf.Parser<AcceleratorConfig> getParserForType() { 2017 return PARSER; 2018 } 2019 2020 @java.lang.Override 2021 public com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig getDefaultInstanceForType()2022 getDefaultInstanceForType() { 2023 return DEFAULT_INSTANCE; 2024 } 2025 } 2026 2027 private int environmentCase_ = 0; 2028 private java.lang.Object environment_; 2029 2030 public enum EnvironmentCase 2031 implements 2032 com.google.protobuf.Internal.EnumLite, 2033 com.google.protobuf.AbstractMessage.InternalOneOfEnum { 2034 VM_IMAGE(2), 2035 CONTAINER_IMAGE(3), 2036 ENVIRONMENT_NOT_SET(0); 2037 private final int value; 2038 EnvironmentCase(int value)2039 private EnvironmentCase(int value) { 2040 this.value = value; 2041 } 2042 /** 2043 * @param value The number of the enum to look for. 2044 * @return The enum associated with the given number. 2045 * @deprecated Use {@link #forNumber(int)} instead. 2046 */ 2047 @java.lang.Deprecated valueOf(int value)2048 public static EnvironmentCase valueOf(int value) { 2049 return forNumber(value); 2050 } 2051 forNumber(int value)2052 public static EnvironmentCase forNumber(int value) { 2053 switch (value) { 2054 case 2: 2055 return VM_IMAGE; 2056 case 3: 2057 return CONTAINER_IMAGE; 2058 case 0: 2059 return ENVIRONMENT_NOT_SET; 2060 default: 2061 return null; 2062 } 2063 } 2064 getNumber()2065 public int getNumber() { 2066 return this.value; 2067 } 2068 }; 2069 getEnvironmentCase()2070 public EnvironmentCase getEnvironmentCase() { 2071 return EnvironmentCase.forNumber(environmentCase_); 2072 } 2073 2074 public static final int NAME_FIELD_NUMBER = 1; 2075 2076 @SuppressWarnings("serial") 2077 private volatile java.lang.Object name_ = ""; 2078 /** 2079 * 2080 * 2081 * <pre> 2082 * Output only. The name of this notebook instance. Format: 2083 * `projects/{project_id}/locations/{location}/instances/{instance_id}` 2084 * </pre> 2085 * 2086 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 2087 * 2088 * @return The name. 2089 */ 2090 @java.lang.Override getName()2091 public java.lang.String getName() { 2092 java.lang.Object ref = name_; 2093 if (ref instanceof java.lang.String) { 2094 return (java.lang.String) ref; 2095 } else { 2096 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2097 java.lang.String s = bs.toStringUtf8(); 2098 name_ = s; 2099 return s; 2100 } 2101 } 2102 /** 2103 * 2104 * 2105 * <pre> 2106 * Output only. The name of this notebook instance. Format: 2107 * `projects/{project_id}/locations/{location}/instances/{instance_id}` 2108 * </pre> 2109 * 2110 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 2111 * 2112 * @return The bytes for name. 2113 */ 2114 @java.lang.Override getNameBytes()2115 public com.google.protobuf.ByteString getNameBytes() { 2116 java.lang.Object ref = name_; 2117 if (ref instanceof java.lang.String) { 2118 com.google.protobuf.ByteString b = 2119 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2120 name_ = b; 2121 return b; 2122 } else { 2123 return (com.google.protobuf.ByteString) ref; 2124 } 2125 } 2126 2127 public static final int VM_IMAGE_FIELD_NUMBER = 2; 2128 /** 2129 * 2130 * 2131 * <pre> 2132 * Use a Compute Engine VM image to start the notebook instance. 2133 * </pre> 2134 * 2135 * <code>.google.cloud.notebooks.v1beta1.VmImage vm_image = 2;</code> 2136 * 2137 * @return Whether the vmImage field is set. 2138 */ 2139 @java.lang.Override hasVmImage()2140 public boolean hasVmImage() { 2141 return environmentCase_ == 2; 2142 } 2143 /** 2144 * 2145 * 2146 * <pre> 2147 * Use a Compute Engine VM image to start the notebook instance. 2148 * </pre> 2149 * 2150 * <code>.google.cloud.notebooks.v1beta1.VmImage vm_image = 2;</code> 2151 * 2152 * @return The vmImage. 2153 */ 2154 @java.lang.Override getVmImage()2155 public com.google.cloud.notebooks.v1beta1.VmImage getVmImage() { 2156 if (environmentCase_ == 2) { 2157 return (com.google.cloud.notebooks.v1beta1.VmImage) environment_; 2158 } 2159 return com.google.cloud.notebooks.v1beta1.VmImage.getDefaultInstance(); 2160 } 2161 /** 2162 * 2163 * 2164 * <pre> 2165 * Use a Compute Engine VM image to start the notebook instance. 2166 * </pre> 2167 * 2168 * <code>.google.cloud.notebooks.v1beta1.VmImage vm_image = 2;</code> 2169 */ 2170 @java.lang.Override getVmImageOrBuilder()2171 public com.google.cloud.notebooks.v1beta1.VmImageOrBuilder getVmImageOrBuilder() { 2172 if (environmentCase_ == 2) { 2173 return (com.google.cloud.notebooks.v1beta1.VmImage) environment_; 2174 } 2175 return com.google.cloud.notebooks.v1beta1.VmImage.getDefaultInstance(); 2176 } 2177 2178 public static final int CONTAINER_IMAGE_FIELD_NUMBER = 3; 2179 /** 2180 * 2181 * 2182 * <pre> 2183 * Use a container image to start the notebook instance. 2184 * </pre> 2185 * 2186 * <code>.google.cloud.notebooks.v1beta1.ContainerImage container_image = 3;</code> 2187 * 2188 * @return Whether the containerImage field is set. 2189 */ 2190 @java.lang.Override hasContainerImage()2191 public boolean hasContainerImage() { 2192 return environmentCase_ == 3; 2193 } 2194 /** 2195 * 2196 * 2197 * <pre> 2198 * Use a container image to start the notebook instance. 2199 * </pre> 2200 * 2201 * <code>.google.cloud.notebooks.v1beta1.ContainerImage container_image = 3;</code> 2202 * 2203 * @return The containerImage. 2204 */ 2205 @java.lang.Override getContainerImage()2206 public com.google.cloud.notebooks.v1beta1.ContainerImage getContainerImage() { 2207 if (environmentCase_ == 3) { 2208 return (com.google.cloud.notebooks.v1beta1.ContainerImage) environment_; 2209 } 2210 return com.google.cloud.notebooks.v1beta1.ContainerImage.getDefaultInstance(); 2211 } 2212 /** 2213 * 2214 * 2215 * <pre> 2216 * Use a container image to start the notebook instance. 2217 * </pre> 2218 * 2219 * <code>.google.cloud.notebooks.v1beta1.ContainerImage container_image = 3;</code> 2220 */ 2221 @java.lang.Override getContainerImageOrBuilder()2222 public com.google.cloud.notebooks.v1beta1.ContainerImageOrBuilder getContainerImageOrBuilder() { 2223 if (environmentCase_ == 3) { 2224 return (com.google.cloud.notebooks.v1beta1.ContainerImage) environment_; 2225 } 2226 return com.google.cloud.notebooks.v1beta1.ContainerImage.getDefaultInstance(); 2227 } 2228 2229 public static final int POST_STARTUP_SCRIPT_FIELD_NUMBER = 4; 2230 2231 @SuppressWarnings("serial") 2232 private volatile java.lang.Object postStartupScript_ = ""; 2233 /** 2234 * 2235 * 2236 * <pre> 2237 * Path to a Bash script that automatically runs after a notebook instance 2238 * fully boots up. The path must be a URL or 2239 * Cloud Storage path (`gs://path-to-file/file-name`). 2240 * </pre> 2241 * 2242 * <code>string post_startup_script = 4;</code> 2243 * 2244 * @return The postStartupScript. 2245 */ 2246 @java.lang.Override getPostStartupScript()2247 public java.lang.String getPostStartupScript() { 2248 java.lang.Object ref = postStartupScript_; 2249 if (ref instanceof java.lang.String) { 2250 return (java.lang.String) ref; 2251 } else { 2252 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2253 java.lang.String s = bs.toStringUtf8(); 2254 postStartupScript_ = s; 2255 return s; 2256 } 2257 } 2258 /** 2259 * 2260 * 2261 * <pre> 2262 * Path to a Bash script that automatically runs after a notebook instance 2263 * fully boots up. The path must be a URL or 2264 * Cloud Storage path (`gs://path-to-file/file-name`). 2265 * </pre> 2266 * 2267 * <code>string post_startup_script = 4;</code> 2268 * 2269 * @return The bytes for postStartupScript. 2270 */ 2271 @java.lang.Override getPostStartupScriptBytes()2272 public com.google.protobuf.ByteString getPostStartupScriptBytes() { 2273 java.lang.Object ref = postStartupScript_; 2274 if (ref instanceof java.lang.String) { 2275 com.google.protobuf.ByteString b = 2276 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2277 postStartupScript_ = b; 2278 return b; 2279 } else { 2280 return (com.google.protobuf.ByteString) ref; 2281 } 2282 } 2283 2284 public static final int PROXY_URI_FIELD_NUMBER = 5; 2285 2286 @SuppressWarnings("serial") 2287 private volatile java.lang.Object proxyUri_ = ""; 2288 /** 2289 * 2290 * 2291 * <pre> 2292 * Output only. The proxy endpoint that is used to access the Jupyter notebook. 2293 * </pre> 2294 * 2295 * <code>string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 2296 * 2297 * @return The proxyUri. 2298 */ 2299 @java.lang.Override getProxyUri()2300 public java.lang.String getProxyUri() { 2301 java.lang.Object ref = proxyUri_; 2302 if (ref instanceof java.lang.String) { 2303 return (java.lang.String) ref; 2304 } else { 2305 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2306 java.lang.String s = bs.toStringUtf8(); 2307 proxyUri_ = s; 2308 return s; 2309 } 2310 } 2311 /** 2312 * 2313 * 2314 * <pre> 2315 * Output only. The proxy endpoint that is used to access the Jupyter notebook. 2316 * </pre> 2317 * 2318 * <code>string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 2319 * 2320 * @return The bytes for proxyUri. 2321 */ 2322 @java.lang.Override getProxyUriBytes()2323 public com.google.protobuf.ByteString getProxyUriBytes() { 2324 java.lang.Object ref = proxyUri_; 2325 if (ref instanceof java.lang.String) { 2326 com.google.protobuf.ByteString b = 2327 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2328 proxyUri_ = b; 2329 return b; 2330 } else { 2331 return (com.google.protobuf.ByteString) ref; 2332 } 2333 } 2334 2335 public static final int INSTANCE_OWNERS_FIELD_NUMBER = 6; 2336 2337 @SuppressWarnings("serial") 2338 private com.google.protobuf.LazyStringList instanceOwners_; 2339 /** 2340 * 2341 * 2342 * <pre> 2343 * Input only. The owner of this instance after creation. Format: `alias@example.com` 2344 * Currently supports one owner only. If not specified, all of the service 2345 * account users of your VM instance's service account can use 2346 * the instance. 2347 * </pre> 2348 * 2349 * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code> 2350 * 2351 * @return A list containing the instanceOwners. 2352 */ getInstanceOwnersList()2353 public com.google.protobuf.ProtocolStringList getInstanceOwnersList() { 2354 return instanceOwners_; 2355 } 2356 /** 2357 * 2358 * 2359 * <pre> 2360 * Input only. The owner of this instance after creation. Format: `alias@example.com` 2361 * Currently supports one owner only. If not specified, all of the service 2362 * account users of your VM instance's service account can use 2363 * the instance. 2364 * </pre> 2365 * 2366 * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code> 2367 * 2368 * @return The count of instanceOwners. 2369 */ getInstanceOwnersCount()2370 public int getInstanceOwnersCount() { 2371 return instanceOwners_.size(); 2372 } 2373 /** 2374 * 2375 * 2376 * <pre> 2377 * Input only. The owner of this instance after creation. Format: `alias@example.com` 2378 * Currently supports one owner only. If not specified, all of the service 2379 * account users of your VM instance's service account can use 2380 * the instance. 2381 * </pre> 2382 * 2383 * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code> 2384 * 2385 * @param index The index of the element to return. 2386 * @return The instanceOwners at the given index. 2387 */ getInstanceOwners(int index)2388 public java.lang.String getInstanceOwners(int index) { 2389 return instanceOwners_.get(index); 2390 } 2391 /** 2392 * 2393 * 2394 * <pre> 2395 * Input only. The owner of this instance after creation. Format: `alias@example.com` 2396 * Currently supports one owner only. If not specified, all of the service 2397 * account users of your VM instance's service account can use 2398 * the instance. 2399 * </pre> 2400 * 2401 * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code> 2402 * 2403 * @param index The index of the value to return. 2404 * @return The bytes of the instanceOwners at the given index. 2405 */ getInstanceOwnersBytes(int index)2406 public com.google.protobuf.ByteString getInstanceOwnersBytes(int index) { 2407 return instanceOwners_.getByteString(index); 2408 } 2409 2410 public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 7; 2411 2412 @SuppressWarnings("serial") 2413 private volatile java.lang.Object serviceAccount_ = ""; 2414 /** 2415 * 2416 * 2417 * <pre> 2418 * The service account on this instance, giving access to other Google 2419 * Cloud services. 2420 * You can use any service account within the same project, but you 2421 * must have the service account user permission to use the instance. 2422 * If not specified, the [Compute Engine default service 2423 * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) 2424 * is used. 2425 * </pre> 2426 * 2427 * <code>string service_account = 7;</code> 2428 * 2429 * @return The serviceAccount. 2430 */ 2431 @java.lang.Override getServiceAccount()2432 public java.lang.String getServiceAccount() { 2433 java.lang.Object ref = serviceAccount_; 2434 if (ref instanceof java.lang.String) { 2435 return (java.lang.String) ref; 2436 } else { 2437 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2438 java.lang.String s = bs.toStringUtf8(); 2439 serviceAccount_ = s; 2440 return s; 2441 } 2442 } 2443 /** 2444 * 2445 * 2446 * <pre> 2447 * The service account on this instance, giving access to other Google 2448 * Cloud services. 2449 * You can use any service account within the same project, but you 2450 * must have the service account user permission to use the instance. 2451 * If not specified, the [Compute Engine default service 2452 * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) 2453 * is used. 2454 * </pre> 2455 * 2456 * <code>string service_account = 7;</code> 2457 * 2458 * @return The bytes for serviceAccount. 2459 */ 2460 @java.lang.Override getServiceAccountBytes()2461 public com.google.protobuf.ByteString getServiceAccountBytes() { 2462 java.lang.Object ref = serviceAccount_; 2463 if (ref instanceof java.lang.String) { 2464 com.google.protobuf.ByteString b = 2465 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2466 serviceAccount_ = b; 2467 return b; 2468 } else { 2469 return (com.google.protobuf.ByteString) ref; 2470 } 2471 } 2472 2473 public static final int MACHINE_TYPE_FIELD_NUMBER = 8; 2474 2475 @SuppressWarnings("serial") 2476 private volatile java.lang.Object machineType_ = ""; 2477 /** 2478 * 2479 * 2480 * <pre> 2481 * Required. The [Compute Engine machine 2482 * type](https://cloud.google.com/compute/docs/machine-types) of this 2483 * instance. 2484 * </pre> 2485 * 2486 * <code>string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];</code> 2487 * 2488 * @return The machineType. 2489 */ 2490 @java.lang.Override getMachineType()2491 public java.lang.String getMachineType() { 2492 java.lang.Object ref = machineType_; 2493 if (ref instanceof java.lang.String) { 2494 return (java.lang.String) ref; 2495 } else { 2496 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2497 java.lang.String s = bs.toStringUtf8(); 2498 machineType_ = s; 2499 return s; 2500 } 2501 } 2502 /** 2503 * 2504 * 2505 * <pre> 2506 * Required. The [Compute Engine machine 2507 * type](https://cloud.google.com/compute/docs/machine-types) of this 2508 * instance. 2509 * </pre> 2510 * 2511 * <code>string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];</code> 2512 * 2513 * @return The bytes for machineType. 2514 */ 2515 @java.lang.Override getMachineTypeBytes()2516 public com.google.protobuf.ByteString getMachineTypeBytes() { 2517 java.lang.Object ref = machineType_; 2518 if (ref instanceof java.lang.String) { 2519 com.google.protobuf.ByteString b = 2520 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2521 machineType_ = b; 2522 return b; 2523 } else { 2524 return (com.google.protobuf.ByteString) ref; 2525 } 2526 } 2527 2528 public static final int ACCELERATOR_CONFIG_FIELD_NUMBER = 9; 2529 private com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig acceleratorConfig_; 2530 /** 2531 * 2532 * 2533 * <pre> 2534 * The hardware accelerator used on this instance. If you use 2535 * accelerators, make sure that your configuration has 2536 * [enough vCPUs and memory to support the `machine_type` you have 2537 * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). 2538 * </pre> 2539 * 2540 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig accelerator_config = 9;</code> 2541 * 2542 * @return Whether the acceleratorConfig field is set. 2543 */ 2544 @java.lang.Override hasAcceleratorConfig()2545 public boolean hasAcceleratorConfig() { 2546 return acceleratorConfig_ != null; 2547 } 2548 /** 2549 * 2550 * 2551 * <pre> 2552 * The hardware accelerator used on this instance. If you use 2553 * accelerators, make sure that your configuration has 2554 * [enough vCPUs and memory to support the `machine_type` you have 2555 * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). 2556 * </pre> 2557 * 2558 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig accelerator_config = 9;</code> 2559 * 2560 * @return The acceleratorConfig. 2561 */ 2562 @java.lang.Override getAcceleratorConfig()2563 public com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig getAcceleratorConfig() { 2564 return acceleratorConfig_ == null 2565 ? com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.getDefaultInstance() 2566 : acceleratorConfig_; 2567 } 2568 /** 2569 * 2570 * 2571 * <pre> 2572 * The hardware accelerator used on this instance. If you use 2573 * accelerators, make sure that your configuration has 2574 * [enough vCPUs and memory to support the `machine_type` you have 2575 * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). 2576 * </pre> 2577 * 2578 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig accelerator_config = 9;</code> 2579 */ 2580 @java.lang.Override 2581 public com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfigOrBuilder getAcceleratorConfigOrBuilder()2582 getAcceleratorConfigOrBuilder() { 2583 return acceleratorConfig_ == null 2584 ? com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.getDefaultInstance() 2585 : acceleratorConfig_; 2586 } 2587 2588 public static final int STATE_FIELD_NUMBER = 10; 2589 private int state_ = 0; 2590 /** 2591 * 2592 * 2593 * <pre> 2594 * Output only. The state of this instance. 2595 * </pre> 2596 * 2597 * <code> 2598 * .google.cloud.notebooks.v1beta1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2599 * </code> 2600 * 2601 * @return The enum numeric value on the wire for state. 2602 */ 2603 @java.lang.Override getStateValue()2604 public int getStateValue() { 2605 return state_; 2606 } 2607 /** 2608 * 2609 * 2610 * <pre> 2611 * Output only. The state of this instance. 2612 * </pre> 2613 * 2614 * <code> 2615 * .google.cloud.notebooks.v1beta1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2616 * </code> 2617 * 2618 * @return The state. 2619 */ 2620 @java.lang.Override getState()2621 public com.google.cloud.notebooks.v1beta1.Instance.State getState() { 2622 com.google.cloud.notebooks.v1beta1.Instance.State result = 2623 com.google.cloud.notebooks.v1beta1.Instance.State.forNumber(state_); 2624 return result == null ? com.google.cloud.notebooks.v1beta1.Instance.State.UNRECOGNIZED : result; 2625 } 2626 2627 public static final int INSTALL_GPU_DRIVER_FIELD_NUMBER = 11; 2628 private boolean installGpuDriver_ = false; 2629 /** 2630 * 2631 * 2632 * <pre> 2633 * Whether the end user authorizes Google Cloud to install GPU driver 2634 * on this instance. 2635 * If this field is empty or set to false, the GPU driver won't be installed. 2636 * Only applicable to instances with GPUs. 2637 * </pre> 2638 * 2639 * <code>bool install_gpu_driver = 11;</code> 2640 * 2641 * @return The installGpuDriver. 2642 */ 2643 @java.lang.Override getInstallGpuDriver()2644 public boolean getInstallGpuDriver() { 2645 return installGpuDriver_; 2646 } 2647 2648 public static final int CUSTOM_GPU_DRIVER_PATH_FIELD_NUMBER = 12; 2649 2650 @SuppressWarnings("serial") 2651 private volatile java.lang.Object customGpuDriverPath_ = ""; 2652 /** 2653 * 2654 * 2655 * <pre> 2656 * Specify a custom Cloud Storage path where the GPU driver is stored. 2657 * If not specified, we'll automatically choose from official GPU drivers. 2658 * </pre> 2659 * 2660 * <code>string custom_gpu_driver_path = 12;</code> 2661 * 2662 * @return The customGpuDriverPath. 2663 */ 2664 @java.lang.Override getCustomGpuDriverPath()2665 public java.lang.String getCustomGpuDriverPath() { 2666 java.lang.Object ref = customGpuDriverPath_; 2667 if (ref instanceof java.lang.String) { 2668 return (java.lang.String) ref; 2669 } else { 2670 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2671 java.lang.String s = bs.toStringUtf8(); 2672 customGpuDriverPath_ = s; 2673 return s; 2674 } 2675 } 2676 /** 2677 * 2678 * 2679 * <pre> 2680 * Specify a custom Cloud Storage path where the GPU driver is stored. 2681 * If not specified, we'll automatically choose from official GPU drivers. 2682 * </pre> 2683 * 2684 * <code>string custom_gpu_driver_path = 12;</code> 2685 * 2686 * @return The bytes for customGpuDriverPath. 2687 */ 2688 @java.lang.Override getCustomGpuDriverPathBytes()2689 public com.google.protobuf.ByteString getCustomGpuDriverPathBytes() { 2690 java.lang.Object ref = customGpuDriverPath_; 2691 if (ref instanceof java.lang.String) { 2692 com.google.protobuf.ByteString b = 2693 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2694 customGpuDriverPath_ = b; 2695 return b; 2696 } else { 2697 return (com.google.protobuf.ByteString) ref; 2698 } 2699 } 2700 2701 public static final int BOOT_DISK_TYPE_FIELD_NUMBER = 13; 2702 private int bootDiskType_ = 0; 2703 /** 2704 * 2705 * 2706 * <pre> 2707 * Input only. The type of the boot disk attached to this instance, defaults to 2708 * standard persistent disk (`PD_STANDARD`). 2709 * </pre> 2710 * 2711 * <code> 2712 * .google.cloud.notebooks.v1beta1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; 2713 * </code> 2714 * 2715 * @return The enum numeric value on the wire for bootDiskType. 2716 */ 2717 @java.lang.Override getBootDiskTypeValue()2718 public int getBootDiskTypeValue() { 2719 return bootDiskType_; 2720 } 2721 /** 2722 * 2723 * 2724 * <pre> 2725 * Input only. The type of the boot disk attached to this instance, defaults to 2726 * standard persistent disk (`PD_STANDARD`). 2727 * </pre> 2728 * 2729 * <code> 2730 * .google.cloud.notebooks.v1beta1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; 2731 * </code> 2732 * 2733 * @return The bootDiskType. 2734 */ 2735 @java.lang.Override getBootDiskType()2736 public com.google.cloud.notebooks.v1beta1.Instance.DiskType getBootDiskType() { 2737 com.google.cloud.notebooks.v1beta1.Instance.DiskType result = 2738 com.google.cloud.notebooks.v1beta1.Instance.DiskType.forNumber(bootDiskType_); 2739 return result == null 2740 ? com.google.cloud.notebooks.v1beta1.Instance.DiskType.UNRECOGNIZED 2741 : result; 2742 } 2743 2744 public static final int BOOT_DISK_SIZE_GB_FIELD_NUMBER = 14; 2745 private long bootDiskSizeGb_ = 0L; 2746 /** 2747 * 2748 * 2749 * <pre> 2750 * Input only. The size of the boot disk in GB attached to this instance, up to a maximum 2751 * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not 2752 * specified, this defaults to 100. 2753 * </pre> 2754 * 2755 * <code>int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY];</code> 2756 * 2757 * @return The bootDiskSizeGb. 2758 */ 2759 @java.lang.Override getBootDiskSizeGb()2760 public long getBootDiskSizeGb() { 2761 return bootDiskSizeGb_; 2762 } 2763 2764 public static final int DATA_DISK_TYPE_FIELD_NUMBER = 25; 2765 private int dataDiskType_ = 0; 2766 /** 2767 * 2768 * 2769 * <pre> 2770 * Input only. The type of the data disk attached to this instance, defaults to 2771 * standard persistent disk (`PD_STANDARD`). 2772 * </pre> 2773 * 2774 * <code> 2775 * .google.cloud.notebooks.v1beta1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; 2776 * </code> 2777 * 2778 * @return The enum numeric value on the wire for dataDiskType. 2779 */ 2780 @java.lang.Override getDataDiskTypeValue()2781 public int getDataDiskTypeValue() { 2782 return dataDiskType_; 2783 } 2784 /** 2785 * 2786 * 2787 * <pre> 2788 * Input only. The type of the data disk attached to this instance, defaults to 2789 * standard persistent disk (`PD_STANDARD`). 2790 * </pre> 2791 * 2792 * <code> 2793 * .google.cloud.notebooks.v1beta1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; 2794 * </code> 2795 * 2796 * @return The dataDiskType. 2797 */ 2798 @java.lang.Override getDataDiskType()2799 public com.google.cloud.notebooks.v1beta1.Instance.DiskType getDataDiskType() { 2800 com.google.cloud.notebooks.v1beta1.Instance.DiskType result = 2801 com.google.cloud.notebooks.v1beta1.Instance.DiskType.forNumber(dataDiskType_); 2802 return result == null 2803 ? com.google.cloud.notebooks.v1beta1.Instance.DiskType.UNRECOGNIZED 2804 : result; 2805 } 2806 2807 public static final int DATA_DISK_SIZE_GB_FIELD_NUMBER = 26; 2808 private long dataDiskSizeGb_ = 0L; 2809 /** 2810 * 2811 * 2812 * <pre> 2813 * Input only. The size of the data disk in GB attached to this instance, up to a maximum 2814 * of 64000 GB (64 TB). You can choose the size of the data disk based on how 2815 * big your notebooks and data are. If not specified, this defaults to 100. 2816 * </pre> 2817 * 2818 * <code>int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY];</code> 2819 * 2820 * @return The dataDiskSizeGb. 2821 */ 2822 @java.lang.Override getDataDiskSizeGb()2823 public long getDataDiskSizeGb() { 2824 return dataDiskSizeGb_; 2825 } 2826 2827 public static final int NO_REMOVE_DATA_DISK_FIELD_NUMBER = 27; 2828 private boolean noRemoveDataDisk_ = false; 2829 /** 2830 * 2831 * 2832 * <pre> 2833 * Input only. If true, the data disk will not be auto deleted when deleting the instance. 2834 * </pre> 2835 * 2836 * <code>bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY];</code> 2837 * 2838 * @return The noRemoveDataDisk. 2839 */ 2840 @java.lang.Override getNoRemoveDataDisk()2841 public boolean getNoRemoveDataDisk() { 2842 return noRemoveDataDisk_; 2843 } 2844 2845 public static final int DISK_ENCRYPTION_FIELD_NUMBER = 15; 2846 private int diskEncryption_ = 0; 2847 /** 2848 * 2849 * 2850 * <pre> 2851 * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. 2852 * </pre> 2853 * 2854 * <code> 2855 * .google.cloud.notebooks.v1beta1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; 2856 * </code> 2857 * 2858 * @return The enum numeric value on the wire for diskEncryption. 2859 */ 2860 @java.lang.Override getDiskEncryptionValue()2861 public int getDiskEncryptionValue() { 2862 return diskEncryption_; 2863 } 2864 /** 2865 * 2866 * 2867 * <pre> 2868 * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. 2869 * </pre> 2870 * 2871 * <code> 2872 * .google.cloud.notebooks.v1beta1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; 2873 * </code> 2874 * 2875 * @return The diskEncryption. 2876 */ 2877 @java.lang.Override getDiskEncryption()2878 public com.google.cloud.notebooks.v1beta1.Instance.DiskEncryption getDiskEncryption() { 2879 com.google.cloud.notebooks.v1beta1.Instance.DiskEncryption result = 2880 com.google.cloud.notebooks.v1beta1.Instance.DiskEncryption.forNumber(diskEncryption_); 2881 return result == null 2882 ? com.google.cloud.notebooks.v1beta1.Instance.DiskEncryption.UNRECOGNIZED 2883 : result; 2884 } 2885 2886 public static final int KMS_KEY_FIELD_NUMBER = 16; 2887 2888 @SuppressWarnings("serial") 2889 private volatile java.lang.Object kmsKey_ = ""; 2890 /** 2891 * 2892 * 2893 * <pre> 2894 * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption 2895 * is CMEK. 2896 * Format: 2897 * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` 2898 * Learn more about [using your own encryption 2899 * keys](https://cloud.google.com/kms/docs/quickstart). 2900 * </pre> 2901 * 2902 * <code>string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];</code> 2903 * 2904 * @return The kmsKey. 2905 */ 2906 @java.lang.Override getKmsKey()2907 public java.lang.String getKmsKey() { 2908 java.lang.Object ref = kmsKey_; 2909 if (ref instanceof java.lang.String) { 2910 return (java.lang.String) ref; 2911 } else { 2912 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2913 java.lang.String s = bs.toStringUtf8(); 2914 kmsKey_ = s; 2915 return s; 2916 } 2917 } 2918 /** 2919 * 2920 * 2921 * <pre> 2922 * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption 2923 * is CMEK. 2924 * Format: 2925 * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` 2926 * Learn more about [using your own encryption 2927 * keys](https://cloud.google.com/kms/docs/quickstart). 2928 * </pre> 2929 * 2930 * <code>string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];</code> 2931 * 2932 * @return The bytes for kmsKey. 2933 */ 2934 @java.lang.Override getKmsKeyBytes()2935 public com.google.protobuf.ByteString getKmsKeyBytes() { 2936 java.lang.Object ref = kmsKey_; 2937 if (ref instanceof java.lang.String) { 2938 com.google.protobuf.ByteString b = 2939 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2940 kmsKey_ = b; 2941 return b; 2942 } else { 2943 return (com.google.protobuf.ByteString) ref; 2944 } 2945 } 2946 2947 public static final int NO_PUBLIC_IP_FIELD_NUMBER = 17; 2948 private boolean noPublicIp_ = false; 2949 /** 2950 * 2951 * 2952 * <pre> 2953 * If true, no public IP will be assigned to this instance. 2954 * </pre> 2955 * 2956 * <code>bool no_public_ip = 17;</code> 2957 * 2958 * @return The noPublicIp. 2959 */ 2960 @java.lang.Override getNoPublicIp()2961 public boolean getNoPublicIp() { 2962 return noPublicIp_; 2963 } 2964 2965 public static final int NO_PROXY_ACCESS_FIELD_NUMBER = 18; 2966 private boolean noProxyAccess_ = false; 2967 /** 2968 * 2969 * 2970 * <pre> 2971 * If true, the notebook instance will not register with the proxy. 2972 * </pre> 2973 * 2974 * <code>bool no_proxy_access = 18;</code> 2975 * 2976 * @return The noProxyAccess. 2977 */ 2978 @java.lang.Override getNoProxyAccess()2979 public boolean getNoProxyAccess() { 2980 return noProxyAccess_; 2981 } 2982 2983 public static final int NETWORK_FIELD_NUMBER = 19; 2984 2985 @SuppressWarnings("serial") 2986 private volatile java.lang.Object network_ = ""; 2987 /** 2988 * 2989 * 2990 * <pre> 2991 * The name of the VPC that this instance is in. 2992 * Format: 2993 * `projects/{project_id}/global/networks/{network_id}` 2994 * </pre> 2995 * 2996 * <code>string network = 19;</code> 2997 * 2998 * @return The network. 2999 */ 3000 @java.lang.Override getNetwork()3001 public java.lang.String getNetwork() { 3002 java.lang.Object ref = network_; 3003 if (ref instanceof java.lang.String) { 3004 return (java.lang.String) ref; 3005 } else { 3006 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3007 java.lang.String s = bs.toStringUtf8(); 3008 network_ = s; 3009 return s; 3010 } 3011 } 3012 /** 3013 * 3014 * 3015 * <pre> 3016 * The name of the VPC that this instance is in. 3017 * Format: 3018 * `projects/{project_id}/global/networks/{network_id}` 3019 * </pre> 3020 * 3021 * <code>string network = 19;</code> 3022 * 3023 * @return The bytes for network. 3024 */ 3025 @java.lang.Override getNetworkBytes()3026 public com.google.protobuf.ByteString getNetworkBytes() { 3027 java.lang.Object ref = network_; 3028 if (ref instanceof java.lang.String) { 3029 com.google.protobuf.ByteString b = 3030 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3031 network_ = b; 3032 return b; 3033 } else { 3034 return (com.google.protobuf.ByteString) ref; 3035 } 3036 } 3037 3038 public static final int SUBNET_FIELD_NUMBER = 20; 3039 3040 @SuppressWarnings("serial") 3041 private volatile java.lang.Object subnet_ = ""; 3042 /** 3043 * 3044 * 3045 * <pre> 3046 * The name of the subnet that this instance is in. 3047 * Format: 3048 * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` 3049 * </pre> 3050 * 3051 * <code>string subnet = 20;</code> 3052 * 3053 * @return The subnet. 3054 */ 3055 @java.lang.Override getSubnet()3056 public java.lang.String getSubnet() { 3057 java.lang.Object ref = subnet_; 3058 if (ref instanceof java.lang.String) { 3059 return (java.lang.String) ref; 3060 } else { 3061 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3062 java.lang.String s = bs.toStringUtf8(); 3063 subnet_ = s; 3064 return s; 3065 } 3066 } 3067 /** 3068 * 3069 * 3070 * <pre> 3071 * The name of the subnet that this instance is in. 3072 * Format: 3073 * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` 3074 * </pre> 3075 * 3076 * <code>string subnet = 20;</code> 3077 * 3078 * @return The bytes for subnet. 3079 */ 3080 @java.lang.Override getSubnetBytes()3081 public com.google.protobuf.ByteString getSubnetBytes() { 3082 java.lang.Object ref = subnet_; 3083 if (ref instanceof java.lang.String) { 3084 com.google.protobuf.ByteString b = 3085 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3086 subnet_ = b; 3087 return b; 3088 } else { 3089 return (com.google.protobuf.ByteString) ref; 3090 } 3091 } 3092 3093 public static final int LABELS_FIELD_NUMBER = 21; 3094 3095 private static final class LabelsDefaultEntryHolder { 3096 static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry = 3097 com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance( 3098 com.google.cloud.notebooks.v1beta1.InstanceProto 3099 .internal_static_google_cloud_notebooks_v1beta1_Instance_LabelsEntry_descriptor, 3100 com.google.protobuf.WireFormat.FieldType.STRING, 3101 "", 3102 com.google.protobuf.WireFormat.FieldType.STRING, 3103 ""); 3104 } 3105 3106 @SuppressWarnings("serial") 3107 private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_; 3108 internalGetLabels()3109 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() { 3110 if (labels_ == null) { 3111 return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); 3112 } 3113 return labels_; 3114 } 3115 getLabelsCount()3116 public int getLabelsCount() { 3117 return internalGetLabels().getMap().size(); 3118 } 3119 /** 3120 * 3121 * 3122 * <pre> 3123 * Labels to apply to this instance. 3124 * These can be later modified by the setLabels method. 3125 * </pre> 3126 * 3127 * <code>map<string, string> labels = 21;</code> 3128 */ 3129 @java.lang.Override containsLabels(java.lang.String key)3130 public boolean containsLabels(java.lang.String key) { 3131 if (key == null) { 3132 throw new NullPointerException("map key"); 3133 } 3134 return internalGetLabels().getMap().containsKey(key); 3135 } 3136 /** Use {@link #getLabelsMap()} instead. */ 3137 @java.lang.Override 3138 @java.lang.Deprecated getLabels()3139 public java.util.Map<java.lang.String, java.lang.String> getLabels() { 3140 return getLabelsMap(); 3141 } 3142 /** 3143 * 3144 * 3145 * <pre> 3146 * Labels to apply to this instance. 3147 * These can be later modified by the setLabels method. 3148 * </pre> 3149 * 3150 * <code>map<string, string> labels = 21;</code> 3151 */ 3152 @java.lang.Override getLabelsMap()3153 public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { 3154 return internalGetLabels().getMap(); 3155 } 3156 /** 3157 * 3158 * 3159 * <pre> 3160 * Labels to apply to this instance. 3161 * These can be later modified by the setLabels method. 3162 * </pre> 3163 * 3164 * <code>map<string, string> labels = 21;</code> 3165 */ 3166 @java.lang.Override getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)3167 public /* nullable */ java.lang.String getLabelsOrDefault( 3168 java.lang.String key, 3169 /* nullable */ 3170 java.lang.String defaultValue) { 3171 if (key == null) { 3172 throw new NullPointerException("map key"); 3173 } 3174 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 3175 return map.containsKey(key) ? map.get(key) : defaultValue; 3176 } 3177 /** 3178 * 3179 * 3180 * <pre> 3181 * Labels to apply to this instance. 3182 * These can be later modified by the setLabels method. 3183 * </pre> 3184 * 3185 * <code>map<string, string> labels = 21;</code> 3186 */ 3187 @java.lang.Override getLabelsOrThrow(java.lang.String key)3188 public java.lang.String getLabelsOrThrow(java.lang.String key) { 3189 if (key == null) { 3190 throw new NullPointerException("map key"); 3191 } 3192 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 3193 if (!map.containsKey(key)) { 3194 throw new java.lang.IllegalArgumentException(); 3195 } 3196 return map.get(key); 3197 } 3198 3199 public static final int METADATA_FIELD_NUMBER = 22; 3200 3201 private static final class MetadataDefaultEntryHolder { 3202 static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry = 3203 com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance( 3204 com.google.cloud.notebooks.v1beta1.InstanceProto 3205 .internal_static_google_cloud_notebooks_v1beta1_Instance_MetadataEntry_descriptor, 3206 com.google.protobuf.WireFormat.FieldType.STRING, 3207 "", 3208 com.google.protobuf.WireFormat.FieldType.STRING, 3209 ""); 3210 } 3211 3212 @SuppressWarnings("serial") 3213 private com.google.protobuf.MapField<java.lang.String, java.lang.String> metadata_; 3214 internalGetMetadata()3215 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMetadata() { 3216 if (metadata_ == null) { 3217 return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); 3218 } 3219 return metadata_; 3220 } 3221 getMetadataCount()3222 public int getMetadataCount() { 3223 return internalGetMetadata().getMap().size(); 3224 } 3225 /** 3226 * 3227 * 3228 * <pre> 3229 * Custom metadata to apply to this instance. 3230 * </pre> 3231 * 3232 * <code>map<string, string> metadata = 22;</code> 3233 */ 3234 @java.lang.Override containsMetadata(java.lang.String key)3235 public boolean containsMetadata(java.lang.String key) { 3236 if (key == null) { 3237 throw new NullPointerException("map key"); 3238 } 3239 return internalGetMetadata().getMap().containsKey(key); 3240 } 3241 /** Use {@link #getMetadataMap()} instead. */ 3242 @java.lang.Override 3243 @java.lang.Deprecated getMetadata()3244 public java.util.Map<java.lang.String, java.lang.String> getMetadata() { 3245 return getMetadataMap(); 3246 } 3247 /** 3248 * 3249 * 3250 * <pre> 3251 * Custom metadata to apply to this instance. 3252 * </pre> 3253 * 3254 * <code>map<string, string> metadata = 22;</code> 3255 */ 3256 @java.lang.Override getMetadataMap()3257 public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() { 3258 return internalGetMetadata().getMap(); 3259 } 3260 /** 3261 * 3262 * 3263 * <pre> 3264 * Custom metadata to apply to this instance. 3265 * </pre> 3266 * 3267 * <code>map<string, string> metadata = 22;</code> 3268 */ 3269 @java.lang.Override getMetadataOrDefault( java.lang.String key, java.lang.String defaultValue)3270 public /* nullable */ java.lang.String getMetadataOrDefault( 3271 java.lang.String key, 3272 /* nullable */ 3273 java.lang.String defaultValue) { 3274 if (key == null) { 3275 throw new NullPointerException("map key"); 3276 } 3277 java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); 3278 return map.containsKey(key) ? map.get(key) : defaultValue; 3279 } 3280 /** 3281 * 3282 * 3283 * <pre> 3284 * Custom metadata to apply to this instance. 3285 * </pre> 3286 * 3287 * <code>map<string, string> metadata = 22;</code> 3288 */ 3289 @java.lang.Override getMetadataOrThrow(java.lang.String key)3290 public java.lang.String getMetadataOrThrow(java.lang.String key) { 3291 if (key == null) { 3292 throw new NullPointerException("map key"); 3293 } 3294 java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); 3295 if (!map.containsKey(key)) { 3296 throw new java.lang.IllegalArgumentException(); 3297 } 3298 return map.get(key); 3299 } 3300 3301 public static final int NIC_TYPE_FIELD_NUMBER = 28; 3302 private int nicType_ = 0; 3303 /** 3304 * 3305 * 3306 * <pre> 3307 * Optional. The type of vNIC to be used on this interface. This may be gVNIC or 3308 * VirtioNet. 3309 * </pre> 3310 * 3311 * <code> 3312 * .google.cloud.notebooks.v1beta1.Instance.NicType nic_type = 28 [(.google.api.field_behavior) = OPTIONAL]; 3313 * </code> 3314 * 3315 * @return The enum numeric value on the wire for nicType. 3316 */ 3317 @java.lang.Override getNicTypeValue()3318 public int getNicTypeValue() { 3319 return nicType_; 3320 } 3321 /** 3322 * 3323 * 3324 * <pre> 3325 * Optional. The type of vNIC to be used on this interface. This may be gVNIC or 3326 * VirtioNet. 3327 * </pre> 3328 * 3329 * <code> 3330 * .google.cloud.notebooks.v1beta1.Instance.NicType nic_type = 28 [(.google.api.field_behavior) = OPTIONAL]; 3331 * </code> 3332 * 3333 * @return The nicType. 3334 */ 3335 @java.lang.Override getNicType()3336 public com.google.cloud.notebooks.v1beta1.Instance.NicType getNicType() { 3337 com.google.cloud.notebooks.v1beta1.Instance.NicType result = 3338 com.google.cloud.notebooks.v1beta1.Instance.NicType.forNumber(nicType_); 3339 return result == null 3340 ? com.google.cloud.notebooks.v1beta1.Instance.NicType.UNRECOGNIZED 3341 : result; 3342 } 3343 3344 public static final int RESERVATION_AFFINITY_FIELD_NUMBER = 29; 3345 private com.google.cloud.notebooks.v1beta1.ReservationAffinity reservationAffinity_; 3346 /** 3347 * 3348 * 3349 * <pre> 3350 * Optional. The optional reservation affinity. Setting this field will apply 3351 * the specified [Zonal Compute 3352 * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) 3353 * to this notebook instance. 3354 * </pre> 3355 * 3356 * <code> 3357 * .google.cloud.notebooks.v1beta1.ReservationAffinity reservation_affinity = 29 [(.google.api.field_behavior) = OPTIONAL]; 3358 * </code> 3359 * 3360 * @return Whether the reservationAffinity field is set. 3361 */ 3362 @java.lang.Override hasReservationAffinity()3363 public boolean hasReservationAffinity() { 3364 return reservationAffinity_ != null; 3365 } 3366 /** 3367 * 3368 * 3369 * <pre> 3370 * Optional. The optional reservation affinity. Setting this field will apply 3371 * the specified [Zonal Compute 3372 * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) 3373 * to this notebook instance. 3374 * </pre> 3375 * 3376 * <code> 3377 * .google.cloud.notebooks.v1beta1.ReservationAffinity reservation_affinity = 29 [(.google.api.field_behavior) = OPTIONAL]; 3378 * </code> 3379 * 3380 * @return The reservationAffinity. 3381 */ 3382 @java.lang.Override getReservationAffinity()3383 public com.google.cloud.notebooks.v1beta1.ReservationAffinity getReservationAffinity() { 3384 return reservationAffinity_ == null 3385 ? com.google.cloud.notebooks.v1beta1.ReservationAffinity.getDefaultInstance() 3386 : reservationAffinity_; 3387 } 3388 /** 3389 * 3390 * 3391 * <pre> 3392 * Optional. The optional reservation affinity. Setting this field will apply 3393 * the specified [Zonal Compute 3394 * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) 3395 * to this notebook instance. 3396 * </pre> 3397 * 3398 * <code> 3399 * .google.cloud.notebooks.v1beta1.ReservationAffinity reservation_affinity = 29 [(.google.api.field_behavior) = OPTIONAL]; 3400 * </code> 3401 */ 3402 @java.lang.Override 3403 public com.google.cloud.notebooks.v1beta1.ReservationAffinityOrBuilder getReservationAffinityOrBuilder()3404 getReservationAffinityOrBuilder() { 3405 return reservationAffinity_ == null 3406 ? com.google.cloud.notebooks.v1beta1.ReservationAffinity.getDefaultInstance() 3407 : reservationAffinity_; 3408 } 3409 3410 public static final int CAN_IP_FORWARD_FIELD_NUMBER = 31; 3411 private boolean canIpForward_ = false; 3412 /** 3413 * 3414 * 3415 * <pre> 3416 * Optional. Flag to enable ip forwarding or not, default false/off. 3417 * https://cloud.google.com/vpc/docs/using-routes#canipforward 3418 * </pre> 3419 * 3420 * <code>bool can_ip_forward = 31 [(.google.api.field_behavior) = OPTIONAL];</code> 3421 * 3422 * @return The canIpForward. 3423 */ 3424 @java.lang.Override getCanIpForward()3425 public boolean getCanIpForward() { 3426 return canIpForward_; 3427 } 3428 3429 public static final int CREATE_TIME_FIELD_NUMBER = 23; 3430 private com.google.protobuf.Timestamp createTime_; 3431 /** 3432 * 3433 * 3434 * <pre> 3435 * Output only. Instance creation time. 3436 * </pre> 3437 * 3438 * <code>.google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; 3439 * </code> 3440 * 3441 * @return Whether the createTime field is set. 3442 */ 3443 @java.lang.Override hasCreateTime()3444 public boolean hasCreateTime() { 3445 return createTime_ != null; 3446 } 3447 /** 3448 * 3449 * 3450 * <pre> 3451 * Output only. Instance creation time. 3452 * </pre> 3453 * 3454 * <code>.google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; 3455 * </code> 3456 * 3457 * @return The createTime. 3458 */ 3459 @java.lang.Override getCreateTime()3460 public com.google.protobuf.Timestamp getCreateTime() { 3461 return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; 3462 } 3463 /** 3464 * 3465 * 3466 * <pre> 3467 * Output only. Instance creation time. 3468 * </pre> 3469 * 3470 * <code>.google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; 3471 * </code> 3472 */ 3473 @java.lang.Override getCreateTimeOrBuilder()3474 public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { 3475 return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; 3476 } 3477 3478 public static final int UPDATE_TIME_FIELD_NUMBER = 24; 3479 private com.google.protobuf.Timestamp updateTime_; 3480 /** 3481 * 3482 * 3483 * <pre> 3484 * Output only. Instance update time. 3485 * </pre> 3486 * 3487 * <code>.google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; 3488 * </code> 3489 * 3490 * @return Whether the updateTime field is set. 3491 */ 3492 @java.lang.Override hasUpdateTime()3493 public boolean hasUpdateTime() { 3494 return updateTime_ != null; 3495 } 3496 /** 3497 * 3498 * 3499 * <pre> 3500 * Output only. Instance update time. 3501 * </pre> 3502 * 3503 * <code>.google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; 3504 * </code> 3505 * 3506 * @return The updateTime. 3507 */ 3508 @java.lang.Override getUpdateTime()3509 public com.google.protobuf.Timestamp getUpdateTime() { 3510 return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; 3511 } 3512 /** 3513 * 3514 * 3515 * <pre> 3516 * Output only. Instance update time. 3517 * </pre> 3518 * 3519 * <code>.google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; 3520 * </code> 3521 */ 3522 @java.lang.Override getUpdateTimeOrBuilder()3523 public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { 3524 return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; 3525 } 3526 3527 private byte memoizedIsInitialized = -1; 3528 3529 @java.lang.Override isInitialized()3530 public final boolean isInitialized() { 3531 byte isInitialized = memoizedIsInitialized; 3532 if (isInitialized == 1) return true; 3533 if (isInitialized == 0) return false; 3534 3535 memoizedIsInitialized = 1; 3536 return true; 3537 } 3538 3539 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)3540 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 3541 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 3542 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); 3543 } 3544 if (environmentCase_ == 2) { 3545 output.writeMessage(2, (com.google.cloud.notebooks.v1beta1.VmImage) environment_); 3546 } 3547 if (environmentCase_ == 3) { 3548 output.writeMessage(3, (com.google.cloud.notebooks.v1beta1.ContainerImage) environment_); 3549 } 3550 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postStartupScript_)) { 3551 com.google.protobuf.GeneratedMessageV3.writeString(output, 4, postStartupScript_); 3552 } 3553 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proxyUri_)) { 3554 com.google.protobuf.GeneratedMessageV3.writeString(output, 5, proxyUri_); 3555 } 3556 for (int i = 0; i < instanceOwners_.size(); i++) { 3557 com.google.protobuf.GeneratedMessageV3.writeString(output, 6, instanceOwners_.getRaw(i)); 3558 } 3559 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { 3560 com.google.protobuf.GeneratedMessageV3.writeString(output, 7, serviceAccount_); 3561 } 3562 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { 3563 com.google.protobuf.GeneratedMessageV3.writeString(output, 8, machineType_); 3564 } 3565 if (acceleratorConfig_ != null) { 3566 output.writeMessage(9, getAcceleratorConfig()); 3567 } 3568 if (state_ != com.google.cloud.notebooks.v1beta1.Instance.State.STATE_UNSPECIFIED.getNumber()) { 3569 output.writeEnum(10, state_); 3570 } 3571 if (installGpuDriver_ != false) { 3572 output.writeBool(11, installGpuDriver_); 3573 } 3574 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customGpuDriverPath_)) { 3575 com.google.protobuf.GeneratedMessageV3.writeString(output, 12, customGpuDriverPath_); 3576 } 3577 if (bootDiskType_ 3578 != com.google.cloud.notebooks.v1beta1.Instance.DiskType.DISK_TYPE_UNSPECIFIED.getNumber()) { 3579 output.writeEnum(13, bootDiskType_); 3580 } 3581 if (bootDiskSizeGb_ != 0L) { 3582 output.writeInt64(14, bootDiskSizeGb_); 3583 } 3584 if (diskEncryption_ 3585 != com.google.cloud.notebooks.v1beta1.Instance.DiskEncryption.DISK_ENCRYPTION_UNSPECIFIED 3586 .getNumber()) { 3587 output.writeEnum(15, diskEncryption_); 3588 } 3589 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { 3590 com.google.protobuf.GeneratedMessageV3.writeString(output, 16, kmsKey_); 3591 } 3592 if (noPublicIp_ != false) { 3593 output.writeBool(17, noPublicIp_); 3594 } 3595 if (noProxyAccess_ != false) { 3596 output.writeBool(18, noProxyAccess_); 3597 } 3598 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { 3599 com.google.protobuf.GeneratedMessageV3.writeString(output, 19, network_); 3600 } 3601 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnet_)) { 3602 com.google.protobuf.GeneratedMessageV3.writeString(output, 20, subnet_); 3603 } 3604 com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( 3605 output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 21); 3606 com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( 3607 output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 22); 3608 if (createTime_ != null) { 3609 output.writeMessage(23, getCreateTime()); 3610 } 3611 if (updateTime_ != null) { 3612 output.writeMessage(24, getUpdateTime()); 3613 } 3614 if (dataDiskType_ 3615 != com.google.cloud.notebooks.v1beta1.Instance.DiskType.DISK_TYPE_UNSPECIFIED.getNumber()) { 3616 output.writeEnum(25, dataDiskType_); 3617 } 3618 if (dataDiskSizeGb_ != 0L) { 3619 output.writeInt64(26, dataDiskSizeGb_); 3620 } 3621 if (noRemoveDataDisk_ != false) { 3622 output.writeBool(27, noRemoveDataDisk_); 3623 } 3624 if (nicType_ 3625 != com.google.cloud.notebooks.v1beta1.Instance.NicType.UNSPECIFIED_NIC_TYPE.getNumber()) { 3626 output.writeEnum(28, nicType_); 3627 } 3628 if (reservationAffinity_ != null) { 3629 output.writeMessage(29, getReservationAffinity()); 3630 } 3631 if (canIpForward_ != false) { 3632 output.writeBool(31, canIpForward_); 3633 } 3634 getUnknownFields().writeTo(output); 3635 } 3636 3637 @java.lang.Override getSerializedSize()3638 public int getSerializedSize() { 3639 int size = memoizedSize; 3640 if (size != -1) return size; 3641 3642 size = 0; 3643 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 3644 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); 3645 } 3646 if (environmentCase_ == 2) { 3647 size += 3648 com.google.protobuf.CodedOutputStream.computeMessageSize( 3649 2, (com.google.cloud.notebooks.v1beta1.VmImage) environment_); 3650 } 3651 if (environmentCase_ == 3) { 3652 size += 3653 com.google.protobuf.CodedOutputStream.computeMessageSize( 3654 3, (com.google.cloud.notebooks.v1beta1.ContainerImage) environment_); 3655 } 3656 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postStartupScript_)) { 3657 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, postStartupScript_); 3658 } 3659 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proxyUri_)) { 3660 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, proxyUri_); 3661 } 3662 { 3663 int dataSize = 0; 3664 for (int i = 0; i < instanceOwners_.size(); i++) { 3665 dataSize += computeStringSizeNoTag(instanceOwners_.getRaw(i)); 3666 } 3667 size += dataSize; 3668 size += 1 * getInstanceOwnersList().size(); 3669 } 3670 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { 3671 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, serviceAccount_); 3672 } 3673 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { 3674 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, machineType_); 3675 } 3676 if (acceleratorConfig_ != null) { 3677 size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getAcceleratorConfig()); 3678 } 3679 if (state_ != com.google.cloud.notebooks.v1beta1.Instance.State.STATE_UNSPECIFIED.getNumber()) { 3680 size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_); 3681 } 3682 if (installGpuDriver_ != false) { 3683 size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, installGpuDriver_); 3684 } 3685 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customGpuDriverPath_)) { 3686 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, customGpuDriverPath_); 3687 } 3688 if (bootDiskType_ 3689 != com.google.cloud.notebooks.v1beta1.Instance.DiskType.DISK_TYPE_UNSPECIFIED.getNumber()) { 3690 size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, bootDiskType_); 3691 } 3692 if (bootDiskSizeGb_ != 0L) { 3693 size += com.google.protobuf.CodedOutputStream.computeInt64Size(14, bootDiskSizeGb_); 3694 } 3695 if (diskEncryption_ 3696 != com.google.cloud.notebooks.v1beta1.Instance.DiskEncryption.DISK_ENCRYPTION_UNSPECIFIED 3697 .getNumber()) { 3698 size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, diskEncryption_); 3699 } 3700 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { 3701 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, kmsKey_); 3702 } 3703 if (noPublicIp_ != false) { 3704 size += com.google.protobuf.CodedOutputStream.computeBoolSize(17, noPublicIp_); 3705 } 3706 if (noProxyAccess_ != false) { 3707 size += com.google.protobuf.CodedOutputStream.computeBoolSize(18, noProxyAccess_); 3708 } 3709 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { 3710 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, network_); 3711 } 3712 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnet_)) { 3713 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, subnet_); 3714 } 3715 for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : 3716 internalGetLabels().getMap().entrySet()) { 3717 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = 3718 LabelsDefaultEntryHolder.defaultEntry 3719 .newBuilderForType() 3720 .setKey(entry.getKey()) 3721 .setValue(entry.getValue()) 3722 .build(); 3723 size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, labels__); 3724 } 3725 for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : 3726 internalGetMetadata().getMap().entrySet()) { 3727 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> metadata__ = 3728 MetadataDefaultEntryHolder.defaultEntry 3729 .newBuilderForType() 3730 .setKey(entry.getKey()) 3731 .setValue(entry.getValue()) 3732 .build(); 3733 size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, metadata__); 3734 } 3735 if (createTime_ != null) { 3736 size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getCreateTime()); 3737 } 3738 if (updateTime_ != null) { 3739 size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getUpdateTime()); 3740 } 3741 if (dataDiskType_ 3742 != com.google.cloud.notebooks.v1beta1.Instance.DiskType.DISK_TYPE_UNSPECIFIED.getNumber()) { 3743 size += com.google.protobuf.CodedOutputStream.computeEnumSize(25, dataDiskType_); 3744 } 3745 if (dataDiskSizeGb_ != 0L) { 3746 size += com.google.protobuf.CodedOutputStream.computeInt64Size(26, dataDiskSizeGb_); 3747 } 3748 if (noRemoveDataDisk_ != false) { 3749 size += com.google.protobuf.CodedOutputStream.computeBoolSize(27, noRemoveDataDisk_); 3750 } 3751 if (nicType_ 3752 != com.google.cloud.notebooks.v1beta1.Instance.NicType.UNSPECIFIED_NIC_TYPE.getNumber()) { 3753 size += com.google.protobuf.CodedOutputStream.computeEnumSize(28, nicType_); 3754 } 3755 if (reservationAffinity_ != null) { 3756 size += 3757 com.google.protobuf.CodedOutputStream.computeMessageSize(29, getReservationAffinity()); 3758 } 3759 if (canIpForward_ != false) { 3760 size += com.google.protobuf.CodedOutputStream.computeBoolSize(31, canIpForward_); 3761 } 3762 size += getUnknownFields().getSerializedSize(); 3763 memoizedSize = size; 3764 return size; 3765 } 3766 3767 @java.lang.Override equals(final java.lang.Object obj)3768 public boolean equals(final java.lang.Object obj) { 3769 if (obj == this) { 3770 return true; 3771 } 3772 if (!(obj instanceof com.google.cloud.notebooks.v1beta1.Instance)) { 3773 return super.equals(obj); 3774 } 3775 com.google.cloud.notebooks.v1beta1.Instance other = 3776 (com.google.cloud.notebooks.v1beta1.Instance) obj; 3777 3778 if (!getName().equals(other.getName())) return false; 3779 if (!getPostStartupScript().equals(other.getPostStartupScript())) return false; 3780 if (!getProxyUri().equals(other.getProxyUri())) return false; 3781 if (!getInstanceOwnersList().equals(other.getInstanceOwnersList())) return false; 3782 if (!getServiceAccount().equals(other.getServiceAccount())) return false; 3783 if (!getMachineType().equals(other.getMachineType())) return false; 3784 if (hasAcceleratorConfig() != other.hasAcceleratorConfig()) return false; 3785 if (hasAcceleratorConfig()) { 3786 if (!getAcceleratorConfig().equals(other.getAcceleratorConfig())) return false; 3787 } 3788 if (state_ != other.state_) return false; 3789 if (getInstallGpuDriver() != other.getInstallGpuDriver()) return false; 3790 if (!getCustomGpuDriverPath().equals(other.getCustomGpuDriverPath())) return false; 3791 if (bootDiskType_ != other.bootDiskType_) return false; 3792 if (getBootDiskSizeGb() != other.getBootDiskSizeGb()) return false; 3793 if (dataDiskType_ != other.dataDiskType_) return false; 3794 if (getDataDiskSizeGb() != other.getDataDiskSizeGb()) return false; 3795 if (getNoRemoveDataDisk() != other.getNoRemoveDataDisk()) return false; 3796 if (diskEncryption_ != other.diskEncryption_) return false; 3797 if (!getKmsKey().equals(other.getKmsKey())) return false; 3798 if (getNoPublicIp() != other.getNoPublicIp()) return false; 3799 if (getNoProxyAccess() != other.getNoProxyAccess()) return false; 3800 if (!getNetwork().equals(other.getNetwork())) return false; 3801 if (!getSubnet().equals(other.getSubnet())) return false; 3802 if (!internalGetLabels().equals(other.internalGetLabels())) return false; 3803 if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; 3804 if (nicType_ != other.nicType_) return false; 3805 if (hasReservationAffinity() != other.hasReservationAffinity()) return false; 3806 if (hasReservationAffinity()) { 3807 if (!getReservationAffinity().equals(other.getReservationAffinity())) return false; 3808 } 3809 if (getCanIpForward() != other.getCanIpForward()) return false; 3810 if (hasCreateTime() != other.hasCreateTime()) return false; 3811 if (hasCreateTime()) { 3812 if (!getCreateTime().equals(other.getCreateTime())) return false; 3813 } 3814 if (hasUpdateTime() != other.hasUpdateTime()) return false; 3815 if (hasUpdateTime()) { 3816 if (!getUpdateTime().equals(other.getUpdateTime())) return false; 3817 } 3818 if (!getEnvironmentCase().equals(other.getEnvironmentCase())) return false; 3819 switch (environmentCase_) { 3820 case 2: 3821 if (!getVmImage().equals(other.getVmImage())) return false; 3822 break; 3823 case 3: 3824 if (!getContainerImage().equals(other.getContainerImage())) return false; 3825 break; 3826 case 0: 3827 default: 3828 } 3829 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 3830 return true; 3831 } 3832 3833 @java.lang.Override hashCode()3834 public int hashCode() { 3835 if (memoizedHashCode != 0) { 3836 return memoizedHashCode; 3837 } 3838 int hash = 41; 3839 hash = (19 * hash) + getDescriptor().hashCode(); 3840 hash = (37 * hash) + NAME_FIELD_NUMBER; 3841 hash = (53 * hash) + getName().hashCode(); 3842 hash = (37 * hash) + POST_STARTUP_SCRIPT_FIELD_NUMBER; 3843 hash = (53 * hash) + getPostStartupScript().hashCode(); 3844 hash = (37 * hash) + PROXY_URI_FIELD_NUMBER; 3845 hash = (53 * hash) + getProxyUri().hashCode(); 3846 if (getInstanceOwnersCount() > 0) { 3847 hash = (37 * hash) + INSTANCE_OWNERS_FIELD_NUMBER; 3848 hash = (53 * hash) + getInstanceOwnersList().hashCode(); 3849 } 3850 hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; 3851 hash = (53 * hash) + getServiceAccount().hashCode(); 3852 hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; 3853 hash = (53 * hash) + getMachineType().hashCode(); 3854 if (hasAcceleratorConfig()) { 3855 hash = (37 * hash) + ACCELERATOR_CONFIG_FIELD_NUMBER; 3856 hash = (53 * hash) + getAcceleratorConfig().hashCode(); 3857 } 3858 hash = (37 * hash) + STATE_FIELD_NUMBER; 3859 hash = (53 * hash) + state_; 3860 hash = (37 * hash) + INSTALL_GPU_DRIVER_FIELD_NUMBER; 3861 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInstallGpuDriver()); 3862 hash = (37 * hash) + CUSTOM_GPU_DRIVER_PATH_FIELD_NUMBER; 3863 hash = (53 * hash) + getCustomGpuDriverPath().hashCode(); 3864 hash = (37 * hash) + BOOT_DISK_TYPE_FIELD_NUMBER; 3865 hash = (53 * hash) + bootDiskType_; 3866 hash = (37 * hash) + BOOT_DISK_SIZE_GB_FIELD_NUMBER; 3867 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBootDiskSizeGb()); 3868 hash = (37 * hash) + DATA_DISK_TYPE_FIELD_NUMBER; 3869 hash = (53 * hash) + dataDiskType_; 3870 hash = (37 * hash) + DATA_DISK_SIZE_GB_FIELD_NUMBER; 3871 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDataDiskSizeGb()); 3872 hash = (37 * hash) + NO_REMOVE_DATA_DISK_FIELD_NUMBER; 3873 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoRemoveDataDisk()); 3874 hash = (37 * hash) + DISK_ENCRYPTION_FIELD_NUMBER; 3875 hash = (53 * hash) + diskEncryption_; 3876 hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; 3877 hash = (53 * hash) + getKmsKey().hashCode(); 3878 hash = (37 * hash) + NO_PUBLIC_IP_FIELD_NUMBER; 3879 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoPublicIp()); 3880 hash = (37 * hash) + NO_PROXY_ACCESS_FIELD_NUMBER; 3881 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoProxyAccess()); 3882 hash = (37 * hash) + NETWORK_FIELD_NUMBER; 3883 hash = (53 * hash) + getNetwork().hashCode(); 3884 hash = (37 * hash) + SUBNET_FIELD_NUMBER; 3885 hash = (53 * hash) + getSubnet().hashCode(); 3886 if (!internalGetLabels().getMap().isEmpty()) { 3887 hash = (37 * hash) + LABELS_FIELD_NUMBER; 3888 hash = (53 * hash) + internalGetLabels().hashCode(); 3889 } 3890 if (!internalGetMetadata().getMap().isEmpty()) { 3891 hash = (37 * hash) + METADATA_FIELD_NUMBER; 3892 hash = (53 * hash) + internalGetMetadata().hashCode(); 3893 } 3894 hash = (37 * hash) + NIC_TYPE_FIELD_NUMBER; 3895 hash = (53 * hash) + nicType_; 3896 if (hasReservationAffinity()) { 3897 hash = (37 * hash) + RESERVATION_AFFINITY_FIELD_NUMBER; 3898 hash = (53 * hash) + getReservationAffinity().hashCode(); 3899 } 3900 hash = (37 * hash) + CAN_IP_FORWARD_FIELD_NUMBER; 3901 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCanIpForward()); 3902 if (hasCreateTime()) { 3903 hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; 3904 hash = (53 * hash) + getCreateTime().hashCode(); 3905 } 3906 if (hasUpdateTime()) { 3907 hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; 3908 hash = (53 * hash) + getUpdateTime().hashCode(); 3909 } 3910 switch (environmentCase_) { 3911 case 2: 3912 hash = (37 * hash) + VM_IMAGE_FIELD_NUMBER; 3913 hash = (53 * hash) + getVmImage().hashCode(); 3914 break; 3915 case 3: 3916 hash = (37 * hash) + CONTAINER_IMAGE_FIELD_NUMBER; 3917 hash = (53 * hash) + getContainerImage().hashCode(); 3918 break; 3919 case 0: 3920 default: 3921 } 3922 hash = (29 * hash) + getUnknownFields().hashCode(); 3923 memoizedHashCode = hash; 3924 return hash; 3925 } 3926 parseFrom(java.nio.ByteBuffer data)3927 public static com.google.cloud.notebooks.v1beta1.Instance parseFrom(java.nio.ByteBuffer data) 3928 throws com.google.protobuf.InvalidProtocolBufferException { 3929 return PARSER.parseFrom(data); 3930 } 3931 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3932 public static com.google.cloud.notebooks.v1beta1.Instance parseFrom( 3933 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3934 throws com.google.protobuf.InvalidProtocolBufferException { 3935 return PARSER.parseFrom(data, extensionRegistry); 3936 } 3937 parseFrom( com.google.protobuf.ByteString data)3938 public static com.google.cloud.notebooks.v1beta1.Instance parseFrom( 3939 com.google.protobuf.ByteString data) 3940 throws com.google.protobuf.InvalidProtocolBufferException { 3941 return PARSER.parseFrom(data); 3942 } 3943 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3944 public static com.google.cloud.notebooks.v1beta1.Instance parseFrom( 3945 com.google.protobuf.ByteString data, 3946 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3947 throws com.google.protobuf.InvalidProtocolBufferException { 3948 return PARSER.parseFrom(data, extensionRegistry); 3949 } 3950 parseFrom(byte[] data)3951 public static com.google.cloud.notebooks.v1beta1.Instance parseFrom(byte[] data) 3952 throws com.google.protobuf.InvalidProtocolBufferException { 3953 return PARSER.parseFrom(data); 3954 } 3955 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3956 public static com.google.cloud.notebooks.v1beta1.Instance parseFrom( 3957 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3958 throws com.google.protobuf.InvalidProtocolBufferException { 3959 return PARSER.parseFrom(data, extensionRegistry); 3960 } 3961 parseFrom(java.io.InputStream input)3962 public static com.google.cloud.notebooks.v1beta1.Instance parseFrom(java.io.InputStream input) 3963 throws java.io.IOException { 3964 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 3965 } 3966 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3967 public static com.google.cloud.notebooks.v1beta1.Instance parseFrom( 3968 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3969 throws java.io.IOException { 3970 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 3971 PARSER, input, extensionRegistry); 3972 } 3973 parseDelimitedFrom( java.io.InputStream input)3974 public static com.google.cloud.notebooks.v1beta1.Instance parseDelimitedFrom( 3975 java.io.InputStream input) throws java.io.IOException { 3976 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 3977 } 3978 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3979 public static com.google.cloud.notebooks.v1beta1.Instance parseDelimitedFrom( 3980 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3981 throws java.io.IOException { 3982 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 3983 PARSER, input, extensionRegistry); 3984 } 3985 parseFrom( com.google.protobuf.CodedInputStream input)3986 public static com.google.cloud.notebooks.v1beta1.Instance parseFrom( 3987 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 3988 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 3989 } 3990 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3991 public static com.google.cloud.notebooks.v1beta1.Instance parseFrom( 3992 com.google.protobuf.CodedInputStream input, 3993 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3994 throws java.io.IOException { 3995 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 3996 PARSER, input, extensionRegistry); 3997 } 3998 3999 @java.lang.Override newBuilderForType()4000 public Builder newBuilderForType() { 4001 return newBuilder(); 4002 } 4003 newBuilder()4004 public static Builder newBuilder() { 4005 return DEFAULT_INSTANCE.toBuilder(); 4006 } 4007 newBuilder(com.google.cloud.notebooks.v1beta1.Instance prototype)4008 public static Builder newBuilder(com.google.cloud.notebooks.v1beta1.Instance prototype) { 4009 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 4010 } 4011 4012 @java.lang.Override toBuilder()4013 public Builder toBuilder() { 4014 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 4015 } 4016 4017 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)4018 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 4019 Builder builder = new Builder(parent); 4020 return builder; 4021 } 4022 /** 4023 * 4024 * 4025 * <pre> 4026 * The definition of a notebook instance. 4027 * </pre> 4028 * 4029 * Protobuf type {@code google.cloud.notebooks.v1beta1.Instance} 4030 */ 4031 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 4032 implements 4033 // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1beta1.Instance) 4034 com.google.cloud.notebooks.v1beta1.InstanceOrBuilder { getDescriptor()4035 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 4036 return com.google.cloud.notebooks.v1beta1.InstanceProto 4037 .internal_static_google_cloud_notebooks_v1beta1_Instance_descriptor; 4038 } 4039 4040 @SuppressWarnings({"rawtypes"}) internalGetMapField(int number)4041 protected com.google.protobuf.MapField internalGetMapField(int number) { 4042 switch (number) { 4043 case 21: 4044 return internalGetLabels(); 4045 case 22: 4046 return internalGetMetadata(); 4047 default: 4048 throw new RuntimeException("Invalid map field number: " + number); 4049 } 4050 } 4051 4052 @SuppressWarnings({"rawtypes"}) internalGetMutableMapField(int number)4053 protected com.google.protobuf.MapField internalGetMutableMapField(int number) { 4054 switch (number) { 4055 case 21: 4056 return internalGetMutableLabels(); 4057 case 22: 4058 return internalGetMutableMetadata(); 4059 default: 4060 throw new RuntimeException("Invalid map field number: " + number); 4061 } 4062 } 4063 4064 @java.lang.Override 4065 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()4066 internalGetFieldAccessorTable() { 4067 return com.google.cloud.notebooks.v1beta1.InstanceProto 4068 .internal_static_google_cloud_notebooks_v1beta1_Instance_fieldAccessorTable 4069 .ensureFieldAccessorsInitialized( 4070 com.google.cloud.notebooks.v1beta1.Instance.class, 4071 com.google.cloud.notebooks.v1beta1.Instance.Builder.class); 4072 } 4073 4074 // Construct using com.google.cloud.notebooks.v1beta1.Instance.newBuilder() Builder()4075 private Builder() {} 4076 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)4077 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 4078 super(parent); 4079 } 4080 4081 @java.lang.Override clear()4082 public Builder clear() { 4083 super.clear(); 4084 bitField0_ = 0; 4085 name_ = ""; 4086 if (vmImageBuilder_ != null) { 4087 vmImageBuilder_.clear(); 4088 } 4089 if (containerImageBuilder_ != null) { 4090 containerImageBuilder_.clear(); 4091 } 4092 postStartupScript_ = ""; 4093 proxyUri_ = ""; 4094 instanceOwners_ = com.google.protobuf.LazyStringArrayList.EMPTY; 4095 bitField0_ = (bitField0_ & ~0x00000020); 4096 serviceAccount_ = ""; 4097 machineType_ = ""; 4098 acceleratorConfig_ = null; 4099 if (acceleratorConfigBuilder_ != null) { 4100 acceleratorConfigBuilder_.dispose(); 4101 acceleratorConfigBuilder_ = null; 4102 } 4103 state_ = 0; 4104 installGpuDriver_ = false; 4105 customGpuDriverPath_ = ""; 4106 bootDiskType_ = 0; 4107 bootDiskSizeGb_ = 0L; 4108 dataDiskType_ = 0; 4109 dataDiskSizeGb_ = 0L; 4110 noRemoveDataDisk_ = false; 4111 diskEncryption_ = 0; 4112 kmsKey_ = ""; 4113 noPublicIp_ = false; 4114 noProxyAccess_ = false; 4115 network_ = ""; 4116 subnet_ = ""; 4117 internalGetMutableLabels().clear(); 4118 internalGetMutableMetadata().clear(); 4119 nicType_ = 0; 4120 reservationAffinity_ = null; 4121 if (reservationAffinityBuilder_ != null) { 4122 reservationAffinityBuilder_.dispose(); 4123 reservationAffinityBuilder_ = null; 4124 } 4125 canIpForward_ = false; 4126 createTime_ = null; 4127 if (createTimeBuilder_ != null) { 4128 createTimeBuilder_.dispose(); 4129 createTimeBuilder_ = null; 4130 } 4131 updateTime_ = null; 4132 if (updateTimeBuilder_ != null) { 4133 updateTimeBuilder_.dispose(); 4134 updateTimeBuilder_ = null; 4135 } 4136 environmentCase_ = 0; 4137 environment_ = null; 4138 return this; 4139 } 4140 4141 @java.lang.Override getDescriptorForType()4142 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 4143 return com.google.cloud.notebooks.v1beta1.InstanceProto 4144 .internal_static_google_cloud_notebooks_v1beta1_Instance_descriptor; 4145 } 4146 4147 @java.lang.Override getDefaultInstanceForType()4148 public com.google.cloud.notebooks.v1beta1.Instance getDefaultInstanceForType() { 4149 return com.google.cloud.notebooks.v1beta1.Instance.getDefaultInstance(); 4150 } 4151 4152 @java.lang.Override build()4153 public com.google.cloud.notebooks.v1beta1.Instance build() { 4154 com.google.cloud.notebooks.v1beta1.Instance result = buildPartial(); 4155 if (!result.isInitialized()) { 4156 throw newUninitializedMessageException(result); 4157 } 4158 return result; 4159 } 4160 4161 @java.lang.Override buildPartial()4162 public com.google.cloud.notebooks.v1beta1.Instance buildPartial() { 4163 com.google.cloud.notebooks.v1beta1.Instance result = 4164 new com.google.cloud.notebooks.v1beta1.Instance(this); 4165 buildPartialRepeatedFields(result); 4166 if (bitField0_ != 0) { 4167 buildPartial0(result); 4168 } 4169 buildPartialOneofs(result); 4170 onBuilt(); 4171 return result; 4172 } 4173 buildPartialRepeatedFields(com.google.cloud.notebooks.v1beta1.Instance result)4174 private void buildPartialRepeatedFields(com.google.cloud.notebooks.v1beta1.Instance result) { 4175 if (((bitField0_ & 0x00000020) != 0)) { 4176 instanceOwners_ = instanceOwners_.getUnmodifiableView(); 4177 bitField0_ = (bitField0_ & ~0x00000020); 4178 } 4179 result.instanceOwners_ = instanceOwners_; 4180 } 4181 buildPartial0(com.google.cloud.notebooks.v1beta1.Instance result)4182 private void buildPartial0(com.google.cloud.notebooks.v1beta1.Instance result) { 4183 int from_bitField0_ = bitField0_; 4184 if (((from_bitField0_ & 0x00000001) != 0)) { 4185 result.name_ = name_; 4186 } 4187 if (((from_bitField0_ & 0x00000008) != 0)) { 4188 result.postStartupScript_ = postStartupScript_; 4189 } 4190 if (((from_bitField0_ & 0x00000010) != 0)) { 4191 result.proxyUri_ = proxyUri_; 4192 } 4193 if (((from_bitField0_ & 0x00000040) != 0)) { 4194 result.serviceAccount_ = serviceAccount_; 4195 } 4196 if (((from_bitField0_ & 0x00000080) != 0)) { 4197 result.machineType_ = machineType_; 4198 } 4199 if (((from_bitField0_ & 0x00000100) != 0)) { 4200 result.acceleratorConfig_ = 4201 acceleratorConfigBuilder_ == null 4202 ? acceleratorConfig_ 4203 : acceleratorConfigBuilder_.build(); 4204 } 4205 if (((from_bitField0_ & 0x00000200) != 0)) { 4206 result.state_ = state_; 4207 } 4208 if (((from_bitField0_ & 0x00000400) != 0)) { 4209 result.installGpuDriver_ = installGpuDriver_; 4210 } 4211 if (((from_bitField0_ & 0x00000800) != 0)) { 4212 result.customGpuDriverPath_ = customGpuDriverPath_; 4213 } 4214 if (((from_bitField0_ & 0x00001000) != 0)) { 4215 result.bootDiskType_ = bootDiskType_; 4216 } 4217 if (((from_bitField0_ & 0x00002000) != 0)) { 4218 result.bootDiskSizeGb_ = bootDiskSizeGb_; 4219 } 4220 if (((from_bitField0_ & 0x00004000) != 0)) { 4221 result.dataDiskType_ = dataDiskType_; 4222 } 4223 if (((from_bitField0_ & 0x00008000) != 0)) { 4224 result.dataDiskSizeGb_ = dataDiskSizeGb_; 4225 } 4226 if (((from_bitField0_ & 0x00010000) != 0)) { 4227 result.noRemoveDataDisk_ = noRemoveDataDisk_; 4228 } 4229 if (((from_bitField0_ & 0x00020000) != 0)) { 4230 result.diskEncryption_ = diskEncryption_; 4231 } 4232 if (((from_bitField0_ & 0x00040000) != 0)) { 4233 result.kmsKey_ = kmsKey_; 4234 } 4235 if (((from_bitField0_ & 0x00080000) != 0)) { 4236 result.noPublicIp_ = noPublicIp_; 4237 } 4238 if (((from_bitField0_ & 0x00100000) != 0)) { 4239 result.noProxyAccess_ = noProxyAccess_; 4240 } 4241 if (((from_bitField0_ & 0x00200000) != 0)) { 4242 result.network_ = network_; 4243 } 4244 if (((from_bitField0_ & 0x00400000) != 0)) { 4245 result.subnet_ = subnet_; 4246 } 4247 if (((from_bitField0_ & 0x00800000) != 0)) { 4248 result.labels_ = internalGetLabels(); 4249 result.labels_.makeImmutable(); 4250 } 4251 if (((from_bitField0_ & 0x01000000) != 0)) { 4252 result.metadata_ = internalGetMetadata(); 4253 result.metadata_.makeImmutable(); 4254 } 4255 if (((from_bitField0_ & 0x02000000) != 0)) { 4256 result.nicType_ = nicType_; 4257 } 4258 if (((from_bitField0_ & 0x04000000) != 0)) { 4259 result.reservationAffinity_ = 4260 reservationAffinityBuilder_ == null 4261 ? reservationAffinity_ 4262 : reservationAffinityBuilder_.build(); 4263 } 4264 if (((from_bitField0_ & 0x08000000) != 0)) { 4265 result.canIpForward_ = canIpForward_; 4266 } 4267 if (((from_bitField0_ & 0x10000000) != 0)) { 4268 result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); 4269 } 4270 if (((from_bitField0_ & 0x20000000) != 0)) { 4271 result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); 4272 } 4273 } 4274 buildPartialOneofs(com.google.cloud.notebooks.v1beta1.Instance result)4275 private void buildPartialOneofs(com.google.cloud.notebooks.v1beta1.Instance result) { 4276 result.environmentCase_ = environmentCase_; 4277 result.environment_ = this.environment_; 4278 if (environmentCase_ == 2 && vmImageBuilder_ != null) { 4279 result.environment_ = vmImageBuilder_.build(); 4280 } 4281 if (environmentCase_ == 3 && containerImageBuilder_ != null) { 4282 result.environment_ = containerImageBuilder_.build(); 4283 } 4284 } 4285 4286 @java.lang.Override clone()4287 public Builder clone() { 4288 return super.clone(); 4289 } 4290 4291 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)4292 public Builder setField( 4293 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 4294 return super.setField(field, value); 4295 } 4296 4297 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)4298 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 4299 return super.clearField(field); 4300 } 4301 4302 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)4303 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 4304 return super.clearOneof(oneof); 4305 } 4306 4307 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)4308 public Builder setRepeatedField( 4309 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 4310 return super.setRepeatedField(field, index, value); 4311 } 4312 4313 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)4314 public Builder addRepeatedField( 4315 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 4316 return super.addRepeatedField(field, value); 4317 } 4318 4319 @java.lang.Override mergeFrom(com.google.protobuf.Message other)4320 public Builder mergeFrom(com.google.protobuf.Message other) { 4321 if (other instanceof com.google.cloud.notebooks.v1beta1.Instance) { 4322 return mergeFrom((com.google.cloud.notebooks.v1beta1.Instance) other); 4323 } else { 4324 super.mergeFrom(other); 4325 return this; 4326 } 4327 } 4328 mergeFrom(com.google.cloud.notebooks.v1beta1.Instance other)4329 public Builder mergeFrom(com.google.cloud.notebooks.v1beta1.Instance other) { 4330 if (other == com.google.cloud.notebooks.v1beta1.Instance.getDefaultInstance()) return this; 4331 if (!other.getName().isEmpty()) { 4332 name_ = other.name_; 4333 bitField0_ |= 0x00000001; 4334 onChanged(); 4335 } 4336 if (!other.getPostStartupScript().isEmpty()) { 4337 postStartupScript_ = other.postStartupScript_; 4338 bitField0_ |= 0x00000008; 4339 onChanged(); 4340 } 4341 if (!other.getProxyUri().isEmpty()) { 4342 proxyUri_ = other.proxyUri_; 4343 bitField0_ |= 0x00000010; 4344 onChanged(); 4345 } 4346 if (!other.instanceOwners_.isEmpty()) { 4347 if (instanceOwners_.isEmpty()) { 4348 instanceOwners_ = other.instanceOwners_; 4349 bitField0_ = (bitField0_ & ~0x00000020); 4350 } else { 4351 ensureInstanceOwnersIsMutable(); 4352 instanceOwners_.addAll(other.instanceOwners_); 4353 } 4354 onChanged(); 4355 } 4356 if (!other.getServiceAccount().isEmpty()) { 4357 serviceAccount_ = other.serviceAccount_; 4358 bitField0_ |= 0x00000040; 4359 onChanged(); 4360 } 4361 if (!other.getMachineType().isEmpty()) { 4362 machineType_ = other.machineType_; 4363 bitField0_ |= 0x00000080; 4364 onChanged(); 4365 } 4366 if (other.hasAcceleratorConfig()) { 4367 mergeAcceleratorConfig(other.getAcceleratorConfig()); 4368 } 4369 if (other.state_ != 0) { 4370 setStateValue(other.getStateValue()); 4371 } 4372 if (other.getInstallGpuDriver() != false) { 4373 setInstallGpuDriver(other.getInstallGpuDriver()); 4374 } 4375 if (!other.getCustomGpuDriverPath().isEmpty()) { 4376 customGpuDriverPath_ = other.customGpuDriverPath_; 4377 bitField0_ |= 0x00000800; 4378 onChanged(); 4379 } 4380 if (other.bootDiskType_ != 0) { 4381 setBootDiskTypeValue(other.getBootDiskTypeValue()); 4382 } 4383 if (other.getBootDiskSizeGb() != 0L) { 4384 setBootDiskSizeGb(other.getBootDiskSizeGb()); 4385 } 4386 if (other.dataDiskType_ != 0) { 4387 setDataDiskTypeValue(other.getDataDiskTypeValue()); 4388 } 4389 if (other.getDataDiskSizeGb() != 0L) { 4390 setDataDiskSizeGb(other.getDataDiskSizeGb()); 4391 } 4392 if (other.getNoRemoveDataDisk() != false) { 4393 setNoRemoveDataDisk(other.getNoRemoveDataDisk()); 4394 } 4395 if (other.diskEncryption_ != 0) { 4396 setDiskEncryptionValue(other.getDiskEncryptionValue()); 4397 } 4398 if (!other.getKmsKey().isEmpty()) { 4399 kmsKey_ = other.kmsKey_; 4400 bitField0_ |= 0x00040000; 4401 onChanged(); 4402 } 4403 if (other.getNoPublicIp() != false) { 4404 setNoPublicIp(other.getNoPublicIp()); 4405 } 4406 if (other.getNoProxyAccess() != false) { 4407 setNoProxyAccess(other.getNoProxyAccess()); 4408 } 4409 if (!other.getNetwork().isEmpty()) { 4410 network_ = other.network_; 4411 bitField0_ |= 0x00200000; 4412 onChanged(); 4413 } 4414 if (!other.getSubnet().isEmpty()) { 4415 subnet_ = other.subnet_; 4416 bitField0_ |= 0x00400000; 4417 onChanged(); 4418 } 4419 internalGetMutableLabels().mergeFrom(other.internalGetLabels()); 4420 bitField0_ |= 0x00800000; 4421 internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); 4422 bitField0_ |= 0x01000000; 4423 if (other.nicType_ != 0) { 4424 setNicTypeValue(other.getNicTypeValue()); 4425 } 4426 if (other.hasReservationAffinity()) { 4427 mergeReservationAffinity(other.getReservationAffinity()); 4428 } 4429 if (other.getCanIpForward() != false) { 4430 setCanIpForward(other.getCanIpForward()); 4431 } 4432 if (other.hasCreateTime()) { 4433 mergeCreateTime(other.getCreateTime()); 4434 } 4435 if (other.hasUpdateTime()) { 4436 mergeUpdateTime(other.getUpdateTime()); 4437 } 4438 switch (other.getEnvironmentCase()) { 4439 case VM_IMAGE: 4440 { 4441 mergeVmImage(other.getVmImage()); 4442 break; 4443 } 4444 case CONTAINER_IMAGE: 4445 { 4446 mergeContainerImage(other.getContainerImage()); 4447 break; 4448 } 4449 case ENVIRONMENT_NOT_SET: 4450 { 4451 break; 4452 } 4453 } 4454 this.mergeUnknownFields(other.getUnknownFields()); 4455 onChanged(); 4456 return this; 4457 } 4458 4459 @java.lang.Override isInitialized()4460 public final boolean isInitialized() { 4461 return true; 4462 } 4463 4464 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4465 public Builder mergeFrom( 4466 com.google.protobuf.CodedInputStream input, 4467 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4468 throws java.io.IOException { 4469 if (extensionRegistry == null) { 4470 throw new java.lang.NullPointerException(); 4471 } 4472 try { 4473 boolean done = false; 4474 while (!done) { 4475 int tag = input.readTag(); 4476 switch (tag) { 4477 case 0: 4478 done = true; 4479 break; 4480 case 10: 4481 { 4482 name_ = input.readStringRequireUtf8(); 4483 bitField0_ |= 0x00000001; 4484 break; 4485 } // case 10 4486 case 18: 4487 { 4488 input.readMessage(getVmImageFieldBuilder().getBuilder(), extensionRegistry); 4489 environmentCase_ = 2; 4490 break; 4491 } // case 18 4492 case 26: 4493 { 4494 input.readMessage(getContainerImageFieldBuilder().getBuilder(), extensionRegistry); 4495 environmentCase_ = 3; 4496 break; 4497 } // case 26 4498 case 34: 4499 { 4500 postStartupScript_ = input.readStringRequireUtf8(); 4501 bitField0_ |= 0x00000008; 4502 break; 4503 } // case 34 4504 case 42: 4505 { 4506 proxyUri_ = input.readStringRequireUtf8(); 4507 bitField0_ |= 0x00000010; 4508 break; 4509 } // case 42 4510 case 50: 4511 { 4512 java.lang.String s = input.readStringRequireUtf8(); 4513 ensureInstanceOwnersIsMutable(); 4514 instanceOwners_.add(s); 4515 break; 4516 } // case 50 4517 case 58: 4518 { 4519 serviceAccount_ = input.readStringRequireUtf8(); 4520 bitField0_ |= 0x00000040; 4521 break; 4522 } // case 58 4523 case 66: 4524 { 4525 machineType_ = input.readStringRequireUtf8(); 4526 bitField0_ |= 0x00000080; 4527 break; 4528 } // case 66 4529 case 74: 4530 { 4531 input.readMessage( 4532 getAcceleratorConfigFieldBuilder().getBuilder(), extensionRegistry); 4533 bitField0_ |= 0x00000100; 4534 break; 4535 } // case 74 4536 case 80: 4537 { 4538 state_ = input.readEnum(); 4539 bitField0_ |= 0x00000200; 4540 break; 4541 } // case 80 4542 case 88: 4543 { 4544 installGpuDriver_ = input.readBool(); 4545 bitField0_ |= 0x00000400; 4546 break; 4547 } // case 88 4548 case 98: 4549 { 4550 customGpuDriverPath_ = input.readStringRequireUtf8(); 4551 bitField0_ |= 0x00000800; 4552 break; 4553 } // case 98 4554 case 104: 4555 { 4556 bootDiskType_ = input.readEnum(); 4557 bitField0_ |= 0x00001000; 4558 break; 4559 } // case 104 4560 case 112: 4561 { 4562 bootDiskSizeGb_ = input.readInt64(); 4563 bitField0_ |= 0x00002000; 4564 break; 4565 } // case 112 4566 case 120: 4567 { 4568 diskEncryption_ = input.readEnum(); 4569 bitField0_ |= 0x00020000; 4570 break; 4571 } // case 120 4572 case 130: 4573 { 4574 kmsKey_ = input.readStringRequireUtf8(); 4575 bitField0_ |= 0x00040000; 4576 break; 4577 } // case 130 4578 case 136: 4579 { 4580 noPublicIp_ = input.readBool(); 4581 bitField0_ |= 0x00080000; 4582 break; 4583 } // case 136 4584 case 144: 4585 { 4586 noProxyAccess_ = input.readBool(); 4587 bitField0_ |= 0x00100000; 4588 break; 4589 } // case 144 4590 case 154: 4591 { 4592 network_ = input.readStringRequireUtf8(); 4593 bitField0_ |= 0x00200000; 4594 break; 4595 } // case 154 4596 case 162: 4597 { 4598 subnet_ = input.readStringRequireUtf8(); 4599 bitField0_ |= 0x00400000; 4600 break; 4601 } // case 162 4602 case 170: 4603 { 4604 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = 4605 input.readMessage( 4606 LabelsDefaultEntryHolder.defaultEntry.getParserForType(), 4607 extensionRegistry); 4608 internalGetMutableLabels() 4609 .getMutableMap() 4610 .put(labels__.getKey(), labels__.getValue()); 4611 bitField0_ |= 0x00800000; 4612 break; 4613 } // case 170 4614 case 178: 4615 { 4616 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> metadata__ = 4617 input.readMessage( 4618 MetadataDefaultEntryHolder.defaultEntry.getParserForType(), 4619 extensionRegistry); 4620 internalGetMutableMetadata() 4621 .getMutableMap() 4622 .put(metadata__.getKey(), metadata__.getValue()); 4623 bitField0_ |= 0x01000000; 4624 break; 4625 } // case 178 4626 case 186: 4627 { 4628 input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); 4629 bitField0_ |= 0x10000000; 4630 break; 4631 } // case 186 4632 case 194: 4633 { 4634 input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); 4635 bitField0_ |= 0x20000000; 4636 break; 4637 } // case 194 4638 case 200: 4639 { 4640 dataDiskType_ = input.readEnum(); 4641 bitField0_ |= 0x00004000; 4642 break; 4643 } // case 200 4644 case 208: 4645 { 4646 dataDiskSizeGb_ = input.readInt64(); 4647 bitField0_ |= 0x00008000; 4648 break; 4649 } // case 208 4650 case 216: 4651 { 4652 noRemoveDataDisk_ = input.readBool(); 4653 bitField0_ |= 0x00010000; 4654 break; 4655 } // case 216 4656 case 224: 4657 { 4658 nicType_ = input.readEnum(); 4659 bitField0_ |= 0x02000000; 4660 break; 4661 } // case 224 4662 case 234: 4663 { 4664 input.readMessage( 4665 getReservationAffinityFieldBuilder().getBuilder(), extensionRegistry); 4666 bitField0_ |= 0x04000000; 4667 break; 4668 } // case 234 4669 case 248: 4670 { 4671 canIpForward_ = input.readBool(); 4672 bitField0_ |= 0x08000000; 4673 break; 4674 } // case 248 4675 default: 4676 { 4677 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 4678 done = true; // was an endgroup tag 4679 } 4680 break; 4681 } // default: 4682 } // switch (tag) 4683 } // while (!done) 4684 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 4685 throw e.unwrapIOException(); 4686 } finally { 4687 onChanged(); 4688 } // finally 4689 return this; 4690 } 4691 4692 private int environmentCase_ = 0; 4693 private java.lang.Object environment_; 4694 getEnvironmentCase()4695 public EnvironmentCase getEnvironmentCase() { 4696 return EnvironmentCase.forNumber(environmentCase_); 4697 } 4698 clearEnvironment()4699 public Builder clearEnvironment() { 4700 environmentCase_ = 0; 4701 environment_ = null; 4702 onChanged(); 4703 return this; 4704 } 4705 4706 private int bitField0_; 4707 4708 private java.lang.Object name_ = ""; 4709 /** 4710 * 4711 * 4712 * <pre> 4713 * Output only. The name of this notebook instance. Format: 4714 * `projects/{project_id}/locations/{location}/instances/{instance_id}` 4715 * </pre> 4716 * 4717 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 4718 * 4719 * @return The name. 4720 */ getName()4721 public java.lang.String getName() { 4722 java.lang.Object ref = name_; 4723 if (!(ref instanceof java.lang.String)) { 4724 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 4725 java.lang.String s = bs.toStringUtf8(); 4726 name_ = s; 4727 return s; 4728 } else { 4729 return (java.lang.String) ref; 4730 } 4731 } 4732 /** 4733 * 4734 * 4735 * <pre> 4736 * Output only. The name of this notebook instance. Format: 4737 * `projects/{project_id}/locations/{location}/instances/{instance_id}` 4738 * </pre> 4739 * 4740 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 4741 * 4742 * @return The bytes for name. 4743 */ getNameBytes()4744 public com.google.protobuf.ByteString getNameBytes() { 4745 java.lang.Object ref = name_; 4746 if (ref instanceof String) { 4747 com.google.protobuf.ByteString b = 4748 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 4749 name_ = b; 4750 return b; 4751 } else { 4752 return (com.google.protobuf.ByteString) ref; 4753 } 4754 } 4755 /** 4756 * 4757 * 4758 * <pre> 4759 * Output only. The name of this notebook instance. Format: 4760 * `projects/{project_id}/locations/{location}/instances/{instance_id}` 4761 * </pre> 4762 * 4763 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 4764 * 4765 * @param value The name to set. 4766 * @return This builder for chaining. 4767 */ setName(java.lang.String value)4768 public Builder setName(java.lang.String value) { 4769 if (value == null) { 4770 throw new NullPointerException(); 4771 } 4772 name_ = value; 4773 bitField0_ |= 0x00000001; 4774 onChanged(); 4775 return this; 4776 } 4777 /** 4778 * 4779 * 4780 * <pre> 4781 * Output only. The name of this notebook instance. Format: 4782 * `projects/{project_id}/locations/{location}/instances/{instance_id}` 4783 * </pre> 4784 * 4785 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 4786 * 4787 * @return This builder for chaining. 4788 */ clearName()4789 public Builder clearName() { 4790 name_ = getDefaultInstance().getName(); 4791 bitField0_ = (bitField0_ & ~0x00000001); 4792 onChanged(); 4793 return this; 4794 } 4795 /** 4796 * 4797 * 4798 * <pre> 4799 * Output only. The name of this notebook instance. Format: 4800 * `projects/{project_id}/locations/{location}/instances/{instance_id}` 4801 * </pre> 4802 * 4803 * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 4804 * 4805 * @param value The bytes for name to set. 4806 * @return This builder for chaining. 4807 */ setNameBytes(com.google.protobuf.ByteString value)4808 public Builder setNameBytes(com.google.protobuf.ByteString value) { 4809 if (value == null) { 4810 throw new NullPointerException(); 4811 } 4812 checkByteStringIsUtf8(value); 4813 name_ = value; 4814 bitField0_ |= 0x00000001; 4815 onChanged(); 4816 return this; 4817 } 4818 4819 private com.google.protobuf.SingleFieldBuilderV3< 4820 com.google.cloud.notebooks.v1beta1.VmImage, 4821 com.google.cloud.notebooks.v1beta1.VmImage.Builder, 4822 com.google.cloud.notebooks.v1beta1.VmImageOrBuilder> 4823 vmImageBuilder_; 4824 /** 4825 * 4826 * 4827 * <pre> 4828 * Use a Compute Engine VM image to start the notebook instance. 4829 * </pre> 4830 * 4831 * <code>.google.cloud.notebooks.v1beta1.VmImage vm_image = 2;</code> 4832 * 4833 * @return Whether the vmImage field is set. 4834 */ 4835 @java.lang.Override hasVmImage()4836 public boolean hasVmImage() { 4837 return environmentCase_ == 2; 4838 } 4839 /** 4840 * 4841 * 4842 * <pre> 4843 * Use a Compute Engine VM image to start the notebook instance. 4844 * </pre> 4845 * 4846 * <code>.google.cloud.notebooks.v1beta1.VmImage vm_image = 2;</code> 4847 * 4848 * @return The vmImage. 4849 */ 4850 @java.lang.Override getVmImage()4851 public com.google.cloud.notebooks.v1beta1.VmImage getVmImage() { 4852 if (vmImageBuilder_ == null) { 4853 if (environmentCase_ == 2) { 4854 return (com.google.cloud.notebooks.v1beta1.VmImage) environment_; 4855 } 4856 return com.google.cloud.notebooks.v1beta1.VmImage.getDefaultInstance(); 4857 } else { 4858 if (environmentCase_ == 2) { 4859 return vmImageBuilder_.getMessage(); 4860 } 4861 return com.google.cloud.notebooks.v1beta1.VmImage.getDefaultInstance(); 4862 } 4863 } 4864 /** 4865 * 4866 * 4867 * <pre> 4868 * Use a Compute Engine VM image to start the notebook instance. 4869 * </pre> 4870 * 4871 * <code>.google.cloud.notebooks.v1beta1.VmImage vm_image = 2;</code> 4872 */ setVmImage(com.google.cloud.notebooks.v1beta1.VmImage value)4873 public Builder setVmImage(com.google.cloud.notebooks.v1beta1.VmImage value) { 4874 if (vmImageBuilder_ == null) { 4875 if (value == null) { 4876 throw new NullPointerException(); 4877 } 4878 environment_ = value; 4879 onChanged(); 4880 } else { 4881 vmImageBuilder_.setMessage(value); 4882 } 4883 environmentCase_ = 2; 4884 return this; 4885 } 4886 /** 4887 * 4888 * 4889 * <pre> 4890 * Use a Compute Engine VM image to start the notebook instance. 4891 * </pre> 4892 * 4893 * <code>.google.cloud.notebooks.v1beta1.VmImage vm_image = 2;</code> 4894 */ setVmImage(com.google.cloud.notebooks.v1beta1.VmImage.Builder builderForValue)4895 public Builder setVmImage(com.google.cloud.notebooks.v1beta1.VmImage.Builder builderForValue) { 4896 if (vmImageBuilder_ == null) { 4897 environment_ = builderForValue.build(); 4898 onChanged(); 4899 } else { 4900 vmImageBuilder_.setMessage(builderForValue.build()); 4901 } 4902 environmentCase_ = 2; 4903 return this; 4904 } 4905 /** 4906 * 4907 * 4908 * <pre> 4909 * Use a Compute Engine VM image to start the notebook instance. 4910 * </pre> 4911 * 4912 * <code>.google.cloud.notebooks.v1beta1.VmImage vm_image = 2;</code> 4913 */ mergeVmImage(com.google.cloud.notebooks.v1beta1.VmImage value)4914 public Builder mergeVmImage(com.google.cloud.notebooks.v1beta1.VmImage value) { 4915 if (vmImageBuilder_ == null) { 4916 if (environmentCase_ == 2 4917 && environment_ != com.google.cloud.notebooks.v1beta1.VmImage.getDefaultInstance()) { 4918 environment_ = 4919 com.google.cloud.notebooks.v1beta1.VmImage.newBuilder( 4920 (com.google.cloud.notebooks.v1beta1.VmImage) environment_) 4921 .mergeFrom(value) 4922 .buildPartial(); 4923 } else { 4924 environment_ = value; 4925 } 4926 onChanged(); 4927 } else { 4928 if (environmentCase_ == 2) { 4929 vmImageBuilder_.mergeFrom(value); 4930 } else { 4931 vmImageBuilder_.setMessage(value); 4932 } 4933 } 4934 environmentCase_ = 2; 4935 return this; 4936 } 4937 /** 4938 * 4939 * 4940 * <pre> 4941 * Use a Compute Engine VM image to start the notebook instance. 4942 * </pre> 4943 * 4944 * <code>.google.cloud.notebooks.v1beta1.VmImage vm_image = 2;</code> 4945 */ clearVmImage()4946 public Builder clearVmImage() { 4947 if (vmImageBuilder_ == null) { 4948 if (environmentCase_ == 2) { 4949 environmentCase_ = 0; 4950 environment_ = null; 4951 onChanged(); 4952 } 4953 } else { 4954 if (environmentCase_ == 2) { 4955 environmentCase_ = 0; 4956 environment_ = null; 4957 } 4958 vmImageBuilder_.clear(); 4959 } 4960 return this; 4961 } 4962 /** 4963 * 4964 * 4965 * <pre> 4966 * Use a Compute Engine VM image to start the notebook instance. 4967 * </pre> 4968 * 4969 * <code>.google.cloud.notebooks.v1beta1.VmImage vm_image = 2;</code> 4970 */ getVmImageBuilder()4971 public com.google.cloud.notebooks.v1beta1.VmImage.Builder getVmImageBuilder() { 4972 return getVmImageFieldBuilder().getBuilder(); 4973 } 4974 /** 4975 * 4976 * 4977 * <pre> 4978 * Use a Compute Engine VM image to start the notebook instance. 4979 * </pre> 4980 * 4981 * <code>.google.cloud.notebooks.v1beta1.VmImage vm_image = 2;</code> 4982 */ 4983 @java.lang.Override getVmImageOrBuilder()4984 public com.google.cloud.notebooks.v1beta1.VmImageOrBuilder getVmImageOrBuilder() { 4985 if ((environmentCase_ == 2) && (vmImageBuilder_ != null)) { 4986 return vmImageBuilder_.getMessageOrBuilder(); 4987 } else { 4988 if (environmentCase_ == 2) { 4989 return (com.google.cloud.notebooks.v1beta1.VmImage) environment_; 4990 } 4991 return com.google.cloud.notebooks.v1beta1.VmImage.getDefaultInstance(); 4992 } 4993 } 4994 /** 4995 * 4996 * 4997 * <pre> 4998 * Use a Compute Engine VM image to start the notebook instance. 4999 * </pre> 5000 * 5001 * <code>.google.cloud.notebooks.v1beta1.VmImage vm_image = 2;</code> 5002 */ 5003 private com.google.protobuf.SingleFieldBuilderV3< 5004 com.google.cloud.notebooks.v1beta1.VmImage, 5005 com.google.cloud.notebooks.v1beta1.VmImage.Builder, 5006 com.google.cloud.notebooks.v1beta1.VmImageOrBuilder> getVmImageFieldBuilder()5007 getVmImageFieldBuilder() { 5008 if (vmImageBuilder_ == null) { 5009 if (!(environmentCase_ == 2)) { 5010 environment_ = com.google.cloud.notebooks.v1beta1.VmImage.getDefaultInstance(); 5011 } 5012 vmImageBuilder_ = 5013 new com.google.protobuf.SingleFieldBuilderV3< 5014 com.google.cloud.notebooks.v1beta1.VmImage, 5015 com.google.cloud.notebooks.v1beta1.VmImage.Builder, 5016 com.google.cloud.notebooks.v1beta1.VmImageOrBuilder>( 5017 (com.google.cloud.notebooks.v1beta1.VmImage) environment_, 5018 getParentForChildren(), 5019 isClean()); 5020 environment_ = null; 5021 } 5022 environmentCase_ = 2; 5023 onChanged(); 5024 return vmImageBuilder_; 5025 } 5026 5027 private com.google.protobuf.SingleFieldBuilderV3< 5028 com.google.cloud.notebooks.v1beta1.ContainerImage, 5029 com.google.cloud.notebooks.v1beta1.ContainerImage.Builder, 5030 com.google.cloud.notebooks.v1beta1.ContainerImageOrBuilder> 5031 containerImageBuilder_; 5032 /** 5033 * 5034 * 5035 * <pre> 5036 * Use a container image to start the notebook instance. 5037 * </pre> 5038 * 5039 * <code>.google.cloud.notebooks.v1beta1.ContainerImage container_image = 3;</code> 5040 * 5041 * @return Whether the containerImage field is set. 5042 */ 5043 @java.lang.Override hasContainerImage()5044 public boolean hasContainerImage() { 5045 return environmentCase_ == 3; 5046 } 5047 /** 5048 * 5049 * 5050 * <pre> 5051 * Use a container image to start the notebook instance. 5052 * </pre> 5053 * 5054 * <code>.google.cloud.notebooks.v1beta1.ContainerImage container_image = 3;</code> 5055 * 5056 * @return The containerImage. 5057 */ 5058 @java.lang.Override getContainerImage()5059 public com.google.cloud.notebooks.v1beta1.ContainerImage getContainerImage() { 5060 if (containerImageBuilder_ == null) { 5061 if (environmentCase_ == 3) { 5062 return (com.google.cloud.notebooks.v1beta1.ContainerImage) environment_; 5063 } 5064 return com.google.cloud.notebooks.v1beta1.ContainerImage.getDefaultInstance(); 5065 } else { 5066 if (environmentCase_ == 3) { 5067 return containerImageBuilder_.getMessage(); 5068 } 5069 return com.google.cloud.notebooks.v1beta1.ContainerImage.getDefaultInstance(); 5070 } 5071 } 5072 /** 5073 * 5074 * 5075 * <pre> 5076 * Use a container image to start the notebook instance. 5077 * </pre> 5078 * 5079 * <code>.google.cloud.notebooks.v1beta1.ContainerImage container_image = 3;</code> 5080 */ setContainerImage(com.google.cloud.notebooks.v1beta1.ContainerImage value)5081 public Builder setContainerImage(com.google.cloud.notebooks.v1beta1.ContainerImage value) { 5082 if (containerImageBuilder_ == null) { 5083 if (value == null) { 5084 throw new NullPointerException(); 5085 } 5086 environment_ = value; 5087 onChanged(); 5088 } else { 5089 containerImageBuilder_.setMessage(value); 5090 } 5091 environmentCase_ = 3; 5092 return this; 5093 } 5094 /** 5095 * 5096 * 5097 * <pre> 5098 * Use a container image to start the notebook instance. 5099 * </pre> 5100 * 5101 * <code>.google.cloud.notebooks.v1beta1.ContainerImage container_image = 3;</code> 5102 */ setContainerImage( com.google.cloud.notebooks.v1beta1.ContainerImage.Builder builderForValue)5103 public Builder setContainerImage( 5104 com.google.cloud.notebooks.v1beta1.ContainerImage.Builder builderForValue) { 5105 if (containerImageBuilder_ == null) { 5106 environment_ = builderForValue.build(); 5107 onChanged(); 5108 } else { 5109 containerImageBuilder_.setMessage(builderForValue.build()); 5110 } 5111 environmentCase_ = 3; 5112 return this; 5113 } 5114 /** 5115 * 5116 * 5117 * <pre> 5118 * Use a container image to start the notebook instance. 5119 * </pre> 5120 * 5121 * <code>.google.cloud.notebooks.v1beta1.ContainerImage container_image = 3;</code> 5122 */ mergeContainerImage(com.google.cloud.notebooks.v1beta1.ContainerImage value)5123 public Builder mergeContainerImage(com.google.cloud.notebooks.v1beta1.ContainerImage value) { 5124 if (containerImageBuilder_ == null) { 5125 if (environmentCase_ == 3 5126 && environment_ 5127 != com.google.cloud.notebooks.v1beta1.ContainerImage.getDefaultInstance()) { 5128 environment_ = 5129 com.google.cloud.notebooks.v1beta1.ContainerImage.newBuilder( 5130 (com.google.cloud.notebooks.v1beta1.ContainerImage) environment_) 5131 .mergeFrom(value) 5132 .buildPartial(); 5133 } else { 5134 environment_ = value; 5135 } 5136 onChanged(); 5137 } else { 5138 if (environmentCase_ == 3) { 5139 containerImageBuilder_.mergeFrom(value); 5140 } else { 5141 containerImageBuilder_.setMessage(value); 5142 } 5143 } 5144 environmentCase_ = 3; 5145 return this; 5146 } 5147 /** 5148 * 5149 * 5150 * <pre> 5151 * Use a container image to start the notebook instance. 5152 * </pre> 5153 * 5154 * <code>.google.cloud.notebooks.v1beta1.ContainerImage container_image = 3;</code> 5155 */ clearContainerImage()5156 public Builder clearContainerImage() { 5157 if (containerImageBuilder_ == null) { 5158 if (environmentCase_ == 3) { 5159 environmentCase_ = 0; 5160 environment_ = null; 5161 onChanged(); 5162 } 5163 } else { 5164 if (environmentCase_ == 3) { 5165 environmentCase_ = 0; 5166 environment_ = null; 5167 } 5168 containerImageBuilder_.clear(); 5169 } 5170 return this; 5171 } 5172 /** 5173 * 5174 * 5175 * <pre> 5176 * Use a container image to start the notebook instance. 5177 * </pre> 5178 * 5179 * <code>.google.cloud.notebooks.v1beta1.ContainerImage container_image = 3;</code> 5180 */ getContainerImageBuilder()5181 public com.google.cloud.notebooks.v1beta1.ContainerImage.Builder getContainerImageBuilder() { 5182 return getContainerImageFieldBuilder().getBuilder(); 5183 } 5184 /** 5185 * 5186 * 5187 * <pre> 5188 * Use a container image to start the notebook instance. 5189 * </pre> 5190 * 5191 * <code>.google.cloud.notebooks.v1beta1.ContainerImage container_image = 3;</code> 5192 */ 5193 @java.lang.Override getContainerImageOrBuilder()5194 public com.google.cloud.notebooks.v1beta1.ContainerImageOrBuilder getContainerImageOrBuilder() { 5195 if ((environmentCase_ == 3) && (containerImageBuilder_ != null)) { 5196 return containerImageBuilder_.getMessageOrBuilder(); 5197 } else { 5198 if (environmentCase_ == 3) { 5199 return (com.google.cloud.notebooks.v1beta1.ContainerImage) environment_; 5200 } 5201 return com.google.cloud.notebooks.v1beta1.ContainerImage.getDefaultInstance(); 5202 } 5203 } 5204 /** 5205 * 5206 * 5207 * <pre> 5208 * Use a container image to start the notebook instance. 5209 * </pre> 5210 * 5211 * <code>.google.cloud.notebooks.v1beta1.ContainerImage container_image = 3;</code> 5212 */ 5213 private com.google.protobuf.SingleFieldBuilderV3< 5214 com.google.cloud.notebooks.v1beta1.ContainerImage, 5215 com.google.cloud.notebooks.v1beta1.ContainerImage.Builder, 5216 com.google.cloud.notebooks.v1beta1.ContainerImageOrBuilder> getContainerImageFieldBuilder()5217 getContainerImageFieldBuilder() { 5218 if (containerImageBuilder_ == null) { 5219 if (!(environmentCase_ == 3)) { 5220 environment_ = com.google.cloud.notebooks.v1beta1.ContainerImage.getDefaultInstance(); 5221 } 5222 containerImageBuilder_ = 5223 new com.google.protobuf.SingleFieldBuilderV3< 5224 com.google.cloud.notebooks.v1beta1.ContainerImage, 5225 com.google.cloud.notebooks.v1beta1.ContainerImage.Builder, 5226 com.google.cloud.notebooks.v1beta1.ContainerImageOrBuilder>( 5227 (com.google.cloud.notebooks.v1beta1.ContainerImage) environment_, 5228 getParentForChildren(), 5229 isClean()); 5230 environment_ = null; 5231 } 5232 environmentCase_ = 3; 5233 onChanged(); 5234 return containerImageBuilder_; 5235 } 5236 5237 private java.lang.Object postStartupScript_ = ""; 5238 /** 5239 * 5240 * 5241 * <pre> 5242 * Path to a Bash script that automatically runs after a notebook instance 5243 * fully boots up. The path must be a URL or 5244 * Cloud Storage path (`gs://path-to-file/file-name`). 5245 * </pre> 5246 * 5247 * <code>string post_startup_script = 4;</code> 5248 * 5249 * @return The postStartupScript. 5250 */ getPostStartupScript()5251 public java.lang.String getPostStartupScript() { 5252 java.lang.Object ref = postStartupScript_; 5253 if (!(ref instanceof java.lang.String)) { 5254 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 5255 java.lang.String s = bs.toStringUtf8(); 5256 postStartupScript_ = s; 5257 return s; 5258 } else { 5259 return (java.lang.String) ref; 5260 } 5261 } 5262 /** 5263 * 5264 * 5265 * <pre> 5266 * Path to a Bash script that automatically runs after a notebook instance 5267 * fully boots up. The path must be a URL or 5268 * Cloud Storage path (`gs://path-to-file/file-name`). 5269 * </pre> 5270 * 5271 * <code>string post_startup_script = 4;</code> 5272 * 5273 * @return The bytes for postStartupScript. 5274 */ getPostStartupScriptBytes()5275 public com.google.protobuf.ByteString getPostStartupScriptBytes() { 5276 java.lang.Object ref = postStartupScript_; 5277 if (ref instanceof String) { 5278 com.google.protobuf.ByteString b = 5279 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 5280 postStartupScript_ = b; 5281 return b; 5282 } else { 5283 return (com.google.protobuf.ByteString) ref; 5284 } 5285 } 5286 /** 5287 * 5288 * 5289 * <pre> 5290 * Path to a Bash script that automatically runs after a notebook instance 5291 * fully boots up. The path must be a URL or 5292 * Cloud Storage path (`gs://path-to-file/file-name`). 5293 * </pre> 5294 * 5295 * <code>string post_startup_script = 4;</code> 5296 * 5297 * @param value The postStartupScript to set. 5298 * @return This builder for chaining. 5299 */ setPostStartupScript(java.lang.String value)5300 public Builder setPostStartupScript(java.lang.String value) { 5301 if (value == null) { 5302 throw new NullPointerException(); 5303 } 5304 postStartupScript_ = value; 5305 bitField0_ |= 0x00000008; 5306 onChanged(); 5307 return this; 5308 } 5309 /** 5310 * 5311 * 5312 * <pre> 5313 * Path to a Bash script that automatically runs after a notebook instance 5314 * fully boots up. The path must be a URL or 5315 * Cloud Storage path (`gs://path-to-file/file-name`). 5316 * </pre> 5317 * 5318 * <code>string post_startup_script = 4;</code> 5319 * 5320 * @return This builder for chaining. 5321 */ clearPostStartupScript()5322 public Builder clearPostStartupScript() { 5323 postStartupScript_ = getDefaultInstance().getPostStartupScript(); 5324 bitField0_ = (bitField0_ & ~0x00000008); 5325 onChanged(); 5326 return this; 5327 } 5328 /** 5329 * 5330 * 5331 * <pre> 5332 * Path to a Bash script that automatically runs after a notebook instance 5333 * fully boots up. The path must be a URL or 5334 * Cloud Storage path (`gs://path-to-file/file-name`). 5335 * </pre> 5336 * 5337 * <code>string post_startup_script = 4;</code> 5338 * 5339 * @param value The bytes for postStartupScript to set. 5340 * @return This builder for chaining. 5341 */ setPostStartupScriptBytes(com.google.protobuf.ByteString value)5342 public Builder setPostStartupScriptBytes(com.google.protobuf.ByteString value) { 5343 if (value == null) { 5344 throw new NullPointerException(); 5345 } 5346 checkByteStringIsUtf8(value); 5347 postStartupScript_ = value; 5348 bitField0_ |= 0x00000008; 5349 onChanged(); 5350 return this; 5351 } 5352 5353 private java.lang.Object proxyUri_ = ""; 5354 /** 5355 * 5356 * 5357 * <pre> 5358 * Output only. The proxy endpoint that is used to access the Jupyter notebook. 5359 * </pre> 5360 * 5361 * <code>string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 5362 * 5363 * @return The proxyUri. 5364 */ getProxyUri()5365 public java.lang.String getProxyUri() { 5366 java.lang.Object ref = proxyUri_; 5367 if (!(ref instanceof java.lang.String)) { 5368 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 5369 java.lang.String s = bs.toStringUtf8(); 5370 proxyUri_ = s; 5371 return s; 5372 } else { 5373 return (java.lang.String) ref; 5374 } 5375 } 5376 /** 5377 * 5378 * 5379 * <pre> 5380 * Output only. The proxy endpoint that is used to access the Jupyter notebook. 5381 * </pre> 5382 * 5383 * <code>string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 5384 * 5385 * @return The bytes for proxyUri. 5386 */ getProxyUriBytes()5387 public com.google.protobuf.ByteString getProxyUriBytes() { 5388 java.lang.Object ref = proxyUri_; 5389 if (ref instanceof String) { 5390 com.google.protobuf.ByteString b = 5391 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 5392 proxyUri_ = b; 5393 return b; 5394 } else { 5395 return (com.google.protobuf.ByteString) ref; 5396 } 5397 } 5398 /** 5399 * 5400 * 5401 * <pre> 5402 * Output only. The proxy endpoint that is used to access the Jupyter notebook. 5403 * </pre> 5404 * 5405 * <code>string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 5406 * 5407 * @param value The proxyUri to set. 5408 * @return This builder for chaining. 5409 */ setProxyUri(java.lang.String value)5410 public Builder setProxyUri(java.lang.String value) { 5411 if (value == null) { 5412 throw new NullPointerException(); 5413 } 5414 proxyUri_ = value; 5415 bitField0_ |= 0x00000010; 5416 onChanged(); 5417 return this; 5418 } 5419 /** 5420 * 5421 * 5422 * <pre> 5423 * Output only. The proxy endpoint that is used to access the Jupyter notebook. 5424 * </pre> 5425 * 5426 * <code>string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 5427 * 5428 * @return This builder for chaining. 5429 */ clearProxyUri()5430 public Builder clearProxyUri() { 5431 proxyUri_ = getDefaultInstance().getProxyUri(); 5432 bitField0_ = (bitField0_ & ~0x00000010); 5433 onChanged(); 5434 return this; 5435 } 5436 /** 5437 * 5438 * 5439 * <pre> 5440 * Output only. The proxy endpoint that is used to access the Jupyter notebook. 5441 * </pre> 5442 * 5443 * <code>string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 5444 * 5445 * @param value The bytes for proxyUri to set. 5446 * @return This builder for chaining. 5447 */ setProxyUriBytes(com.google.protobuf.ByteString value)5448 public Builder setProxyUriBytes(com.google.protobuf.ByteString value) { 5449 if (value == null) { 5450 throw new NullPointerException(); 5451 } 5452 checkByteStringIsUtf8(value); 5453 proxyUri_ = value; 5454 bitField0_ |= 0x00000010; 5455 onChanged(); 5456 return this; 5457 } 5458 5459 private com.google.protobuf.LazyStringList instanceOwners_ = 5460 com.google.protobuf.LazyStringArrayList.EMPTY; 5461 ensureInstanceOwnersIsMutable()5462 private void ensureInstanceOwnersIsMutable() { 5463 if (!((bitField0_ & 0x00000020) != 0)) { 5464 instanceOwners_ = new com.google.protobuf.LazyStringArrayList(instanceOwners_); 5465 bitField0_ |= 0x00000020; 5466 } 5467 } 5468 /** 5469 * 5470 * 5471 * <pre> 5472 * Input only. The owner of this instance after creation. Format: `alias@example.com` 5473 * Currently supports one owner only. If not specified, all of the service 5474 * account users of your VM instance's service account can use 5475 * the instance. 5476 * </pre> 5477 * 5478 * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code> 5479 * 5480 * @return A list containing the instanceOwners. 5481 */ getInstanceOwnersList()5482 public com.google.protobuf.ProtocolStringList getInstanceOwnersList() { 5483 return instanceOwners_.getUnmodifiableView(); 5484 } 5485 /** 5486 * 5487 * 5488 * <pre> 5489 * Input only. The owner of this instance after creation. Format: `alias@example.com` 5490 * Currently supports one owner only. If not specified, all of the service 5491 * account users of your VM instance's service account can use 5492 * the instance. 5493 * </pre> 5494 * 5495 * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code> 5496 * 5497 * @return The count of instanceOwners. 5498 */ getInstanceOwnersCount()5499 public int getInstanceOwnersCount() { 5500 return instanceOwners_.size(); 5501 } 5502 /** 5503 * 5504 * 5505 * <pre> 5506 * Input only. The owner of this instance after creation. Format: `alias@example.com` 5507 * Currently supports one owner only. If not specified, all of the service 5508 * account users of your VM instance's service account can use 5509 * the instance. 5510 * </pre> 5511 * 5512 * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code> 5513 * 5514 * @param index The index of the element to return. 5515 * @return The instanceOwners at the given index. 5516 */ getInstanceOwners(int index)5517 public java.lang.String getInstanceOwners(int index) { 5518 return instanceOwners_.get(index); 5519 } 5520 /** 5521 * 5522 * 5523 * <pre> 5524 * Input only. The owner of this instance after creation. Format: `alias@example.com` 5525 * Currently supports one owner only. If not specified, all of the service 5526 * account users of your VM instance's service account can use 5527 * the instance. 5528 * </pre> 5529 * 5530 * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code> 5531 * 5532 * @param index The index of the value to return. 5533 * @return The bytes of the instanceOwners at the given index. 5534 */ getInstanceOwnersBytes(int index)5535 public com.google.protobuf.ByteString getInstanceOwnersBytes(int index) { 5536 return instanceOwners_.getByteString(index); 5537 } 5538 /** 5539 * 5540 * 5541 * <pre> 5542 * Input only. The owner of this instance after creation. Format: `alias@example.com` 5543 * Currently supports one owner only. If not specified, all of the service 5544 * account users of your VM instance's service account can use 5545 * the instance. 5546 * </pre> 5547 * 5548 * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code> 5549 * 5550 * @param index The index to set the value at. 5551 * @param value The instanceOwners to set. 5552 * @return This builder for chaining. 5553 */ setInstanceOwners(int index, java.lang.String value)5554 public Builder setInstanceOwners(int index, java.lang.String value) { 5555 if (value == null) { 5556 throw new NullPointerException(); 5557 } 5558 ensureInstanceOwnersIsMutable(); 5559 instanceOwners_.set(index, value); 5560 onChanged(); 5561 return this; 5562 } 5563 /** 5564 * 5565 * 5566 * <pre> 5567 * Input only. The owner of this instance after creation. Format: `alias@example.com` 5568 * Currently supports one owner only. If not specified, all of the service 5569 * account users of your VM instance's service account can use 5570 * the instance. 5571 * </pre> 5572 * 5573 * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code> 5574 * 5575 * @param value The instanceOwners to add. 5576 * @return This builder for chaining. 5577 */ addInstanceOwners(java.lang.String value)5578 public Builder addInstanceOwners(java.lang.String value) { 5579 if (value == null) { 5580 throw new NullPointerException(); 5581 } 5582 ensureInstanceOwnersIsMutable(); 5583 instanceOwners_.add(value); 5584 onChanged(); 5585 return this; 5586 } 5587 /** 5588 * 5589 * 5590 * <pre> 5591 * Input only. The owner of this instance after creation. Format: `alias@example.com` 5592 * Currently supports one owner only. If not specified, all of the service 5593 * account users of your VM instance's service account can use 5594 * the instance. 5595 * </pre> 5596 * 5597 * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code> 5598 * 5599 * @param values The instanceOwners to add. 5600 * @return This builder for chaining. 5601 */ addAllInstanceOwners(java.lang.Iterable<java.lang.String> values)5602 public Builder addAllInstanceOwners(java.lang.Iterable<java.lang.String> values) { 5603 ensureInstanceOwnersIsMutable(); 5604 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instanceOwners_); 5605 onChanged(); 5606 return this; 5607 } 5608 /** 5609 * 5610 * 5611 * <pre> 5612 * Input only. The owner of this instance after creation. Format: `alias@example.com` 5613 * Currently supports one owner only. If not specified, all of the service 5614 * account users of your VM instance's service account can use 5615 * the instance. 5616 * </pre> 5617 * 5618 * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code> 5619 * 5620 * @return This builder for chaining. 5621 */ clearInstanceOwners()5622 public Builder clearInstanceOwners() { 5623 instanceOwners_ = com.google.protobuf.LazyStringArrayList.EMPTY; 5624 bitField0_ = (bitField0_ & ~0x00000020); 5625 onChanged(); 5626 return this; 5627 } 5628 /** 5629 * 5630 * 5631 * <pre> 5632 * Input only. The owner of this instance after creation. Format: `alias@example.com` 5633 * Currently supports one owner only. If not specified, all of the service 5634 * account users of your VM instance's service account can use 5635 * the instance. 5636 * </pre> 5637 * 5638 * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code> 5639 * 5640 * @param value The bytes of the instanceOwners to add. 5641 * @return This builder for chaining. 5642 */ addInstanceOwnersBytes(com.google.protobuf.ByteString value)5643 public Builder addInstanceOwnersBytes(com.google.protobuf.ByteString value) { 5644 if (value == null) { 5645 throw new NullPointerException(); 5646 } 5647 checkByteStringIsUtf8(value); 5648 ensureInstanceOwnersIsMutable(); 5649 instanceOwners_.add(value); 5650 onChanged(); 5651 return this; 5652 } 5653 5654 private java.lang.Object serviceAccount_ = ""; 5655 /** 5656 * 5657 * 5658 * <pre> 5659 * The service account on this instance, giving access to other Google 5660 * Cloud services. 5661 * You can use any service account within the same project, but you 5662 * must have the service account user permission to use the instance. 5663 * If not specified, the [Compute Engine default service 5664 * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) 5665 * is used. 5666 * </pre> 5667 * 5668 * <code>string service_account = 7;</code> 5669 * 5670 * @return The serviceAccount. 5671 */ getServiceAccount()5672 public java.lang.String getServiceAccount() { 5673 java.lang.Object ref = serviceAccount_; 5674 if (!(ref instanceof java.lang.String)) { 5675 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 5676 java.lang.String s = bs.toStringUtf8(); 5677 serviceAccount_ = s; 5678 return s; 5679 } else { 5680 return (java.lang.String) ref; 5681 } 5682 } 5683 /** 5684 * 5685 * 5686 * <pre> 5687 * The service account on this instance, giving access to other Google 5688 * Cloud services. 5689 * You can use any service account within the same project, but you 5690 * must have the service account user permission to use the instance. 5691 * If not specified, the [Compute Engine default service 5692 * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) 5693 * is used. 5694 * </pre> 5695 * 5696 * <code>string service_account = 7;</code> 5697 * 5698 * @return The bytes for serviceAccount. 5699 */ getServiceAccountBytes()5700 public com.google.protobuf.ByteString getServiceAccountBytes() { 5701 java.lang.Object ref = serviceAccount_; 5702 if (ref instanceof String) { 5703 com.google.protobuf.ByteString b = 5704 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 5705 serviceAccount_ = b; 5706 return b; 5707 } else { 5708 return (com.google.protobuf.ByteString) ref; 5709 } 5710 } 5711 /** 5712 * 5713 * 5714 * <pre> 5715 * The service account on this instance, giving access to other Google 5716 * Cloud services. 5717 * You can use any service account within the same project, but you 5718 * must have the service account user permission to use the instance. 5719 * If not specified, the [Compute Engine default service 5720 * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) 5721 * is used. 5722 * </pre> 5723 * 5724 * <code>string service_account = 7;</code> 5725 * 5726 * @param value The serviceAccount to set. 5727 * @return This builder for chaining. 5728 */ setServiceAccount(java.lang.String value)5729 public Builder setServiceAccount(java.lang.String value) { 5730 if (value == null) { 5731 throw new NullPointerException(); 5732 } 5733 serviceAccount_ = value; 5734 bitField0_ |= 0x00000040; 5735 onChanged(); 5736 return this; 5737 } 5738 /** 5739 * 5740 * 5741 * <pre> 5742 * The service account on this instance, giving access to other Google 5743 * Cloud services. 5744 * You can use any service account within the same project, but you 5745 * must have the service account user permission to use the instance. 5746 * If not specified, the [Compute Engine default service 5747 * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) 5748 * is used. 5749 * </pre> 5750 * 5751 * <code>string service_account = 7;</code> 5752 * 5753 * @return This builder for chaining. 5754 */ clearServiceAccount()5755 public Builder clearServiceAccount() { 5756 serviceAccount_ = getDefaultInstance().getServiceAccount(); 5757 bitField0_ = (bitField0_ & ~0x00000040); 5758 onChanged(); 5759 return this; 5760 } 5761 /** 5762 * 5763 * 5764 * <pre> 5765 * The service account on this instance, giving access to other Google 5766 * Cloud services. 5767 * You can use any service account within the same project, but you 5768 * must have the service account user permission to use the instance. 5769 * If not specified, the [Compute Engine default service 5770 * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) 5771 * is used. 5772 * </pre> 5773 * 5774 * <code>string service_account = 7;</code> 5775 * 5776 * @param value The bytes for serviceAccount to set. 5777 * @return This builder for chaining. 5778 */ setServiceAccountBytes(com.google.protobuf.ByteString value)5779 public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { 5780 if (value == null) { 5781 throw new NullPointerException(); 5782 } 5783 checkByteStringIsUtf8(value); 5784 serviceAccount_ = value; 5785 bitField0_ |= 0x00000040; 5786 onChanged(); 5787 return this; 5788 } 5789 5790 private java.lang.Object machineType_ = ""; 5791 /** 5792 * 5793 * 5794 * <pre> 5795 * Required. The [Compute Engine machine 5796 * type](https://cloud.google.com/compute/docs/machine-types) of this 5797 * instance. 5798 * </pre> 5799 * 5800 * <code>string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];</code> 5801 * 5802 * @return The machineType. 5803 */ getMachineType()5804 public java.lang.String getMachineType() { 5805 java.lang.Object ref = machineType_; 5806 if (!(ref instanceof java.lang.String)) { 5807 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 5808 java.lang.String s = bs.toStringUtf8(); 5809 machineType_ = s; 5810 return s; 5811 } else { 5812 return (java.lang.String) ref; 5813 } 5814 } 5815 /** 5816 * 5817 * 5818 * <pre> 5819 * Required. The [Compute Engine machine 5820 * type](https://cloud.google.com/compute/docs/machine-types) of this 5821 * instance. 5822 * </pre> 5823 * 5824 * <code>string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];</code> 5825 * 5826 * @return The bytes for machineType. 5827 */ getMachineTypeBytes()5828 public com.google.protobuf.ByteString getMachineTypeBytes() { 5829 java.lang.Object ref = machineType_; 5830 if (ref instanceof String) { 5831 com.google.protobuf.ByteString b = 5832 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 5833 machineType_ = b; 5834 return b; 5835 } else { 5836 return (com.google.protobuf.ByteString) ref; 5837 } 5838 } 5839 /** 5840 * 5841 * 5842 * <pre> 5843 * Required. The [Compute Engine machine 5844 * type](https://cloud.google.com/compute/docs/machine-types) of this 5845 * instance. 5846 * </pre> 5847 * 5848 * <code>string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];</code> 5849 * 5850 * @param value The machineType to set. 5851 * @return This builder for chaining. 5852 */ setMachineType(java.lang.String value)5853 public Builder setMachineType(java.lang.String value) { 5854 if (value == null) { 5855 throw new NullPointerException(); 5856 } 5857 machineType_ = value; 5858 bitField0_ |= 0x00000080; 5859 onChanged(); 5860 return this; 5861 } 5862 /** 5863 * 5864 * 5865 * <pre> 5866 * Required. The [Compute Engine machine 5867 * type](https://cloud.google.com/compute/docs/machine-types) of this 5868 * instance. 5869 * </pre> 5870 * 5871 * <code>string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];</code> 5872 * 5873 * @return This builder for chaining. 5874 */ clearMachineType()5875 public Builder clearMachineType() { 5876 machineType_ = getDefaultInstance().getMachineType(); 5877 bitField0_ = (bitField0_ & ~0x00000080); 5878 onChanged(); 5879 return this; 5880 } 5881 /** 5882 * 5883 * 5884 * <pre> 5885 * Required. The [Compute Engine machine 5886 * type](https://cloud.google.com/compute/docs/machine-types) of this 5887 * instance. 5888 * </pre> 5889 * 5890 * <code>string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];</code> 5891 * 5892 * @param value The bytes for machineType to set. 5893 * @return This builder for chaining. 5894 */ setMachineTypeBytes(com.google.protobuf.ByteString value)5895 public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { 5896 if (value == null) { 5897 throw new NullPointerException(); 5898 } 5899 checkByteStringIsUtf8(value); 5900 machineType_ = value; 5901 bitField0_ |= 0x00000080; 5902 onChanged(); 5903 return this; 5904 } 5905 5906 private com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig acceleratorConfig_; 5907 private com.google.protobuf.SingleFieldBuilderV3< 5908 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig, 5909 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.Builder, 5910 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfigOrBuilder> 5911 acceleratorConfigBuilder_; 5912 /** 5913 * 5914 * 5915 * <pre> 5916 * The hardware accelerator used on this instance. If you use 5917 * accelerators, make sure that your configuration has 5918 * [enough vCPUs and memory to support the `machine_type` you have 5919 * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). 5920 * </pre> 5921 * 5922 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig accelerator_config = 9; 5923 * </code> 5924 * 5925 * @return Whether the acceleratorConfig field is set. 5926 */ hasAcceleratorConfig()5927 public boolean hasAcceleratorConfig() { 5928 return ((bitField0_ & 0x00000100) != 0); 5929 } 5930 /** 5931 * 5932 * 5933 * <pre> 5934 * The hardware accelerator used on this instance. If you use 5935 * accelerators, make sure that your configuration has 5936 * [enough vCPUs and memory to support the `machine_type` you have 5937 * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). 5938 * </pre> 5939 * 5940 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig accelerator_config = 9; 5941 * </code> 5942 * 5943 * @return The acceleratorConfig. 5944 */ getAcceleratorConfig()5945 public com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig getAcceleratorConfig() { 5946 if (acceleratorConfigBuilder_ == null) { 5947 return acceleratorConfig_ == null 5948 ? com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.getDefaultInstance() 5949 : acceleratorConfig_; 5950 } else { 5951 return acceleratorConfigBuilder_.getMessage(); 5952 } 5953 } 5954 /** 5955 * 5956 * 5957 * <pre> 5958 * The hardware accelerator used on this instance. If you use 5959 * accelerators, make sure that your configuration has 5960 * [enough vCPUs and memory to support the `machine_type` you have 5961 * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). 5962 * </pre> 5963 * 5964 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig accelerator_config = 9; 5965 * </code> 5966 */ setAcceleratorConfig( com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig value)5967 public Builder setAcceleratorConfig( 5968 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig value) { 5969 if (acceleratorConfigBuilder_ == null) { 5970 if (value == null) { 5971 throw new NullPointerException(); 5972 } 5973 acceleratorConfig_ = value; 5974 } else { 5975 acceleratorConfigBuilder_.setMessage(value); 5976 } 5977 bitField0_ |= 0x00000100; 5978 onChanged(); 5979 return this; 5980 } 5981 /** 5982 * 5983 * 5984 * <pre> 5985 * The hardware accelerator used on this instance. If you use 5986 * accelerators, make sure that your configuration has 5987 * [enough vCPUs and memory to support the `machine_type` you have 5988 * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). 5989 * </pre> 5990 * 5991 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig accelerator_config = 9; 5992 * </code> 5993 */ setAcceleratorConfig( com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.Builder builderForValue)5994 public Builder setAcceleratorConfig( 5995 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.Builder builderForValue) { 5996 if (acceleratorConfigBuilder_ == null) { 5997 acceleratorConfig_ = builderForValue.build(); 5998 } else { 5999 acceleratorConfigBuilder_.setMessage(builderForValue.build()); 6000 } 6001 bitField0_ |= 0x00000100; 6002 onChanged(); 6003 return this; 6004 } 6005 /** 6006 * 6007 * 6008 * <pre> 6009 * The hardware accelerator used on this instance. If you use 6010 * accelerators, make sure that your configuration has 6011 * [enough vCPUs and memory to support the `machine_type` you have 6012 * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). 6013 * </pre> 6014 * 6015 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig accelerator_config = 9; 6016 * </code> 6017 */ mergeAcceleratorConfig( com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig value)6018 public Builder mergeAcceleratorConfig( 6019 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig value) { 6020 if (acceleratorConfigBuilder_ == null) { 6021 if (((bitField0_ & 0x00000100) != 0) 6022 && acceleratorConfig_ != null 6023 && acceleratorConfig_ 6024 != com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig 6025 .getDefaultInstance()) { 6026 getAcceleratorConfigBuilder().mergeFrom(value); 6027 } else { 6028 acceleratorConfig_ = value; 6029 } 6030 } else { 6031 acceleratorConfigBuilder_.mergeFrom(value); 6032 } 6033 bitField0_ |= 0x00000100; 6034 onChanged(); 6035 return this; 6036 } 6037 /** 6038 * 6039 * 6040 * <pre> 6041 * The hardware accelerator used on this instance. If you use 6042 * accelerators, make sure that your configuration has 6043 * [enough vCPUs and memory to support the `machine_type` you have 6044 * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). 6045 * </pre> 6046 * 6047 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig accelerator_config = 9; 6048 * </code> 6049 */ clearAcceleratorConfig()6050 public Builder clearAcceleratorConfig() { 6051 bitField0_ = (bitField0_ & ~0x00000100); 6052 acceleratorConfig_ = null; 6053 if (acceleratorConfigBuilder_ != null) { 6054 acceleratorConfigBuilder_.dispose(); 6055 acceleratorConfigBuilder_ = null; 6056 } 6057 onChanged(); 6058 return this; 6059 } 6060 /** 6061 * 6062 * 6063 * <pre> 6064 * The hardware accelerator used on this instance. If you use 6065 * accelerators, make sure that your configuration has 6066 * [enough vCPUs and memory to support the `machine_type` you have 6067 * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). 6068 * </pre> 6069 * 6070 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig accelerator_config = 9; 6071 * </code> 6072 */ 6073 public com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.Builder getAcceleratorConfigBuilder()6074 getAcceleratorConfigBuilder() { 6075 bitField0_ |= 0x00000100; 6076 onChanged(); 6077 return getAcceleratorConfigFieldBuilder().getBuilder(); 6078 } 6079 /** 6080 * 6081 * 6082 * <pre> 6083 * The hardware accelerator used on this instance. If you use 6084 * accelerators, make sure that your configuration has 6085 * [enough vCPUs and memory to support the `machine_type` you have 6086 * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). 6087 * </pre> 6088 * 6089 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig accelerator_config = 9; 6090 * </code> 6091 */ 6092 public com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfigOrBuilder getAcceleratorConfigOrBuilder()6093 getAcceleratorConfigOrBuilder() { 6094 if (acceleratorConfigBuilder_ != null) { 6095 return acceleratorConfigBuilder_.getMessageOrBuilder(); 6096 } else { 6097 return acceleratorConfig_ == null 6098 ? com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.getDefaultInstance() 6099 : acceleratorConfig_; 6100 } 6101 } 6102 /** 6103 * 6104 * 6105 * <pre> 6106 * The hardware accelerator used on this instance. If you use 6107 * accelerators, make sure that your configuration has 6108 * [enough vCPUs and memory to support the `machine_type` you have 6109 * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). 6110 * </pre> 6111 * 6112 * <code>.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig accelerator_config = 9; 6113 * </code> 6114 */ 6115 private com.google.protobuf.SingleFieldBuilderV3< 6116 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig, 6117 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.Builder, 6118 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfigOrBuilder> getAcceleratorConfigFieldBuilder()6119 getAcceleratorConfigFieldBuilder() { 6120 if (acceleratorConfigBuilder_ == null) { 6121 acceleratorConfigBuilder_ = 6122 new com.google.protobuf.SingleFieldBuilderV3< 6123 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig, 6124 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfig.Builder, 6125 com.google.cloud.notebooks.v1beta1.Instance.AcceleratorConfigOrBuilder>( 6126 getAcceleratorConfig(), getParentForChildren(), isClean()); 6127 acceleratorConfig_ = null; 6128 } 6129 return acceleratorConfigBuilder_; 6130 } 6131 6132 private int state_ = 0; 6133 /** 6134 * 6135 * 6136 * <pre> 6137 * Output only. The state of this instance. 6138 * </pre> 6139 * 6140 * <code> 6141 * .google.cloud.notebooks.v1beta1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 6142 * </code> 6143 * 6144 * @return The enum numeric value on the wire for state. 6145 */ 6146 @java.lang.Override getStateValue()6147 public int getStateValue() { 6148 return state_; 6149 } 6150 /** 6151 * 6152 * 6153 * <pre> 6154 * Output only. The state of this instance. 6155 * </pre> 6156 * 6157 * <code> 6158 * .google.cloud.notebooks.v1beta1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 6159 * </code> 6160 * 6161 * @param value The enum numeric value on the wire for state to set. 6162 * @return This builder for chaining. 6163 */ setStateValue(int value)6164 public Builder setStateValue(int value) { 6165 state_ = value; 6166 bitField0_ |= 0x00000200; 6167 onChanged(); 6168 return this; 6169 } 6170 /** 6171 * 6172 * 6173 * <pre> 6174 * Output only. The state of this instance. 6175 * </pre> 6176 * 6177 * <code> 6178 * .google.cloud.notebooks.v1beta1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 6179 * </code> 6180 * 6181 * @return The state. 6182 */ 6183 @java.lang.Override getState()6184 public com.google.cloud.notebooks.v1beta1.Instance.State getState() { 6185 com.google.cloud.notebooks.v1beta1.Instance.State result = 6186 com.google.cloud.notebooks.v1beta1.Instance.State.forNumber(state_); 6187 return result == null 6188 ? com.google.cloud.notebooks.v1beta1.Instance.State.UNRECOGNIZED 6189 : result; 6190 } 6191 /** 6192 * 6193 * 6194 * <pre> 6195 * Output only. The state of this instance. 6196 * </pre> 6197 * 6198 * <code> 6199 * .google.cloud.notebooks.v1beta1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 6200 * </code> 6201 * 6202 * @param value The state to set. 6203 * @return This builder for chaining. 6204 */ setState(com.google.cloud.notebooks.v1beta1.Instance.State value)6205 public Builder setState(com.google.cloud.notebooks.v1beta1.Instance.State value) { 6206 if (value == null) { 6207 throw new NullPointerException(); 6208 } 6209 bitField0_ |= 0x00000200; 6210 state_ = value.getNumber(); 6211 onChanged(); 6212 return this; 6213 } 6214 /** 6215 * 6216 * 6217 * <pre> 6218 * Output only. The state of this instance. 6219 * </pre> 6220 * 6221 * <code> 6222 * .google.cloud.notebooks.v1beta1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 6223 * </code> 6224 * 6225 * @return This builder for chaining. 6226 */ clearState()6227 public Builder clearState() { 6228 bitField0_ = (bitField0_ & ~0x00000200); 6229 state_ = 0; 6230 onChanged(); 6231 return this; 6232 } 6233 6234 private boolean installGpuDriver_; 6235 /** 6236 * 6237 * 6238 * <pre> 6239 * Whether the end user authorizes Google Cloud to install GPU driver 6240 * on this instance. 6241 * If this field is empty or set to false, the GPU driver won't be installed. 6242 * Only applicable to instances with GPUs. 6243 * </pre> 6244 * 6245 * <code>bool install_gpu_driver = 11;</code> 6246 * 6247 * @return The installGpuDriver. 6248 */ 6249 @java.lang.Override getInstallGpuDriver()6250 public boolean getInstallGpuDriver() { 6251 return installGpuDriver_; 6252 } 6253 /** 6254 * 6255 * 6256 * <pre> 6257 * Whether the end user authorizes Google Cloud to install GPU driver 6258 * on this instance. 6259 * If this field is empty or set to false, the GPU driver won't be installed. 6260 * Only applicable to instances with GPUs. 6261 * </pre> 6262 * 6263 * <code>bool install_gpu_driver = 11;</code> 6264 * 6265 * @param value The installGpuDriver to set. 6266 * @return This builder for chaining. 6267 */ setInstallGpuDriver(boolean value)6268 public Builder setInstallGpuDriver(boolean value) { 6269 6270 installGpuDriver_ = value; 6271 bitField0_ |= 0x00000400; 6272 onChanged(); 6273 return this; 6274 } 6275 /** 6276 * 6277 * 6278 * <pre> 6279 * Whether the end user authorizes Google Cloud to install GPU driver 6280 * on this instance. 6281 * If this field is empty or set to false, the GPU driver won't be installed. 6282 * Only applicable to instances with GPUs. 6283 * </pre> 6284 * 6285 * <code>bool install_gpu_driver = 11;</code> 6286 * 6287 * @return This builder for chaining. 6288 */ clearInstallGpuDriver()6289 public Builder clearInstallGpuDriver() { 6290 bitField0_ = (bitField0_ & ~0x00000400); 6291 installGpuDriver_ = false; 6292 onChanged(); 6293 return this; 6294 } 6295 6296 private java.lang.Object customGpuDriverPath_ = ""; 6297 /** 6298 * 6299 * 6300 * <pre> 6301 * Specify a custom Cloud Storage path where the GPU driver is stored. 6302 * If not specified, we'll automatically choose from official GPU drivers. 6303 * </pre> 6304 * 6305 * <code>string custom_gpu_driver_path = 12;</code> 6306 * 6307 * @return The customGpuDriverPath. 6308 */ getCustomGpuDriverPath()6309 public java.lang.String getCustomGpuDriverPath() { 6310 java.lang.Object ref = customGpuDriverPath_; 6311 if (!(ref instanceof java.lang.String)) { 6312 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 6313 java.lang.String s = bs.toStringUtf8(); 6314 customGpuDriverPath_ = s; 6315 return s; 6316 } else { 6317 return (java.lang.String) ref; 6318 } 6319 } 6320 /** 6321 * 6322 * 6323 * <pre> 6324 * Specify a custom Cloud Storage path where the GPU driver is stored. 6325 * If not specified, we'll automatically choose from official GPU drivers. 6326 * </pre> 6327 * 6328 * <code>string custom_gpu_driver_path = 12;</code> 6329 * 6330 * @return The bytes for customGpuDriverPath. 6331 */ getCustomGpuDriverPathBytes()6332 public com.google.protobuf.ByteString getCustomGpuDriverPathBytes() { 6333 java.lang.Object ref = customGpuDriverPath_; 6334 if (ref instanceof String) { 6335 com.google.protobuf.ByteString b = 6336 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 6337 customGpuDriverPath_ = b; 6338 return b; 6339 } else { 6340 return (com.google.protobuf.ByteString) ref; 6341 } 6342 } 6343 /** 6344 * 6345 * 6346 * <pre> 6347 * Specify a custom Cloud Storage path where the GPU driver is stored. 6348 * If not specified, we'll automatically choose from official GPU drivers. 6349 * </pre> 6350 * 6351 * <code>string custom_gpu_driver_path = 12;</code> 6352 * 6353 * @param value The customGpuDriverPath to set. 6354 * @return This builder for chaining. 6355 */ setCustomGpuDriverPath(java.lang.String value)6356 public Builder setCustomGpuDriverPath(java.lang.String value) { 6357 if (value == null) { 6358 throw new NullPointerException(); 6359 } 6360 customGpuDriverPath_ = value; 6361 bitField0_ |= 0x00000800; 6362 onChanged(); 6363 return this; 6364 } 6365 /** 6366 * 6367 * 6368 * <pre> 6369 * Specify a custom Cloud Storage path where the GPU driver is stored. 6370 * If not specified, we'll automatically choose from official GPU drivers. 6371 * </pre> 6372 * 6373 * <code>string custom_gpu_driver_path = 12;</code> 6374 * 6375 * @return This builder for chaining. 6376 */ clearCustomGpuDriverPath()6377 public Builder clearCustomGpuDriverPath() { 6378 customGpuDriverPath_ = getDefaultInstance().getCustomGpuDriverPath(); 6379 bitField0_ = (bitField0_ & ~0x00000800); 6380 onChanged(); 6381 return this; 6382 } 6383 /** 6384 * 6385 * 6386 * <pre> 6387 * Specify a custom Cloud Storage path where the GPU driver is stored. 6388 * If not specified, we'll automatically choose from official GPU drivers. 6389 * </pre> 6390 * 6391 * <code>string custom_gpu_driver_path = 12;</code> 6392 * 6393 * @param value The bytes for customGpuDriverPath to set. 6394 * @return This builder for chaining. 6395 */ setCustomGpuDriverPathBytes(com.google.protobuf.ByteString value)6396 public Builder setCustomGpuDriverPathBytes(com.google.protobuf.ByteString value) { 6397 if (value == null) { 6398 throw new NullPointerException(); 6399 } 6400 checkByteStringIsUtf8(value); 6401 customGpuDriverPath_ = value; 6402 bitField0_ |= 0x00000800; 6403 onChanged(); 6404 return this; 6405 } 6406 6407 private int bootDiskType_ = 0; 6408 /** 6409 * 6410 * 6411 * <pre> 6412 * Input only. The type of the boot disk attached to this instance, defaults to 6413 * standard persistent disk (`PD_STANDARD`). 6414 * </pre> 6415 * 6416 * <code> 6417 * .google.cloud.notebooks.v1beta1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; 6418 * </code> 6419 * 6420 * @return The enum numeric value on the wire for bootDiskType. 6421 */ 6422 @java.lang.Override getBootDiskTypeValue()6423 public int getBootDiskTypeValue() { 6424 return bootDiskType_; 6425 } 6426 /** 6427 * 6428 * 6429 * <pre> 6430 * Input only. The type of the boot disk attached to this instance, defaults to 6431 * standard persistent disk (`PD_STANDARD`). 6432 * </pre> 6433 * 6434 * <code> 6435 * .google.cloud.notebooks.v1beta1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; 6436 * </code> 6437 * 6438 * @param value The enum numeric value on the wire for bootDiskType to set. 6439 * @return This builder for chaining. 6440 */ setBootDiskTypeValue(int value)6441 public Builder setBootDiskTypeValue(int value) { 6442 bootDiskType_ = value; 6443 bitField0_ |= 0x00001000; 6444 onChanged(); 6445 return this; 6446 } 6447 /** 6448 * 6449 * 6450 * <pre> 6451 * Input only. The type of the boot disk attached to this instance, defaults to 6452 * standard persistent disk (`PD_STANDARD`). 6453 * </pre> 6454 * 6455 * <code> 6456 * .google.cloud.notebooks.v1beta1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; 6457 * </code> 6458 * 6459 * @return The bootDiskType. 6460 */ 6461 @java.lang.Override getBootDiskType()6462 public com.google.cloud.notebooks.v1beta1.Instance.DiskType getBootDiskType() { 6463 com.google.cloud.notebooks.v1beta1.Instance.DiskType result = 6464 com.google.cloud.notebooks.v1beta1.Instance.DiskType.forNumber(bootDiskType_); 6465 return result == null 6466 ? com.google.cloud.notebooks.v1beta1.Instance.DiskType.UNRECOGNIZED 6467 : result; 6468 } 6469 /** 6470 * 6471 * 6472 * <pre> 6473 * Input only. The type of the boot disk attached to this instance, defaults to 6474 * standard persistent disk (`PD_STANDARD`). 6475 * </pre> 6476 * 6477 * <code> 6478 * .google.cloud.notebooks.v1beta1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; 6479 * </code> 6480 * 6481 * @param value The bootDiskType to set. 6482 * @return This builder for chaining. 6483 */ setBootDiskType(com.google.cloud.notebooks.v1beta1.Instance.DiskType value)6484 public Builder setBootDiskType(com.google.cloud.notebooks.v1beta1.Instance.DiskType value) { 6485 if (value == null) { 6486 throw new NullPointerException(); 6487 } 6488 bitField0_ |= 0x00001000; 6489 bootDiskType_ = value.getNumber(); 6490 onChanged(); 6491 return this; 6492 } 6493 /** 6494 * 6495 * 6496 * <pre> 6497 * Input only. The type of the boot disk attached to this instance, defaults to 6498 * standard persistent disk (`PD_STANDARD`). 6499 * </pre> 6500 * 6501 * <code> 6502 * .google.cloud.notebooks.v1beta1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; 6503 * </code> 6504 * 6505 * @return This builder for chaining. 6506 */ clearBootDiskType()6507 public Builder clearBootDiskType() { 6508 bitField0_ = (bitField0_ & ~0x00001000); 6509 bootDiskType_ = 0; 6510 onChanged(); 6511 return this; 6512 } 6513 6514 private long bootDiskSizeGb_; 6515 /** 6516 * 6517 * 6518 * <pre> 6519 * Input only. The size of the boot disk in GB attached to this instance, up to a maximum 6520 * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not 6521 * specified, this defaults to 100. 6522 * </pre> 6523 * 6524 * <code>int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY];</code> 6525 * 6526 * @return The bootDiskSizeGb. 6527 */ 6528 @java.lang.Override getBootDiskSizeGb()6529 public long getBootDiskSizeGb() { 6530 return bootDiskSizeGb_; 6531 } 6532 /** 6533 * 6534 * 6535 * <pre> 6536 * Input only. The size of the boot disk in GB attached to this instance, up to a maximum 6537 * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not 6538 * specified, this defaults to 100. 6539 * </pre> 6540 * 6541 * <code>int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY];</code> 6542 * 6543 * @param value The bootDiskSizeGb to set. 6544 * @return This builder for chaining. 6545 */ setBootDiskSizeGb(long value)6546 public Builder setBootDiskSizeGb(long value) { 6547 6548 bootDiskSizeGb_ = value; 6549 bitField0_ |= 0x00002000; 6550 onChanged(); 6551 return this; 6552 } 6553 /** 6554 * 6555 * 6556 * <pre> 6557 * Input only. The size of the boot disk in GB attached to this instance, up to a maximum 6558 * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not 6559 * specified, this defaults to 100. 6560 * </pre> 6561 * 6562 * <code>int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY];</code> 6563 * 6564 * @return This builder for chaining. 6565 */ clearBootDiskSizeGb()6566 public Builder clearBootDiskSizeGb() { 6567 bitField0_ = (bitField0_ & ~0x00002000); 6568 bootDiskSizeGb_ = 0L; 6569 onChanged(); 6570 return this; 6571 } 6572 6573 private int dataDiskType_ = 0; 6574 /** 6575 * 6576 * 6577 * <pre> 6578 * Input only. The type of the data disk attached to this instance, defaults to 6579 * standard persistent disk (`PD_STANDARD`). 6580 * </pre> 6581 * 6582 * <code> 6583 * .google.cloud.notebooks.v1beta1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; 6584 * </code> 6585 * 6586 * @return The enum numeric value on the wire for dataDiskType. 6587 */ 6588 @java.lang.Override getDataDiskTypeValue()6589 public int getDataDiskTypeValue() { 6590 return dataDiskType_; 6591 } 6592 /** 6593 * 6594 * 6595 * <pre> 6596 * Input only. The type of the data disk attached to this instance, defaults to 6597 * standard persistent disk (`PD_STANDARD`). 6598 * </pre> 6599 * 6600 * <code> 6601 * .google.cloud.notebooks.v1beta1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; 6602 * </code> 6603 * 6604 * @param value The enum numeric value on the wire for dataDiskType to set. 6605 * @return This builder for chaining. 6606 */ setDataDiskTypeValue(int value)6607 public Builder setDataDiskTypeValue(int value) { 6608 dataDiskType_ = value; 6609 bitField0_ |= 0x00004000; 6610 onChanged(); 6611 return this; 6612 } 6613 /** 6614 * 6615 * 6616 * <pre> 6617 * Input only. The type of the data disk attached to this instance, defaults to 6618 * standard persistent disk (`PD_STANDARD`). 6619 * </pre> 6620 * 6621 * <code> 6622 * .google.cloud.notebooks.v1beta1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; 6623 * </code> 6624 * 6625 * @return The dataDiskType. 6626 */ 6627 @java.lang.Override getDataDiskType()6628 public com.google.cloud.notebooks.v1beta1.Instance.DiskType getDataDiskType() { 6629 com.google.cloud.notebooks.v1beta1.Instance.DiskType result = 6630 com.google.cloud.notebooks.v1beta1.Instance.DiskType.forNumber(dataDiskType_); 6631 return result == null 6632 ? com.google.cloud.notebooks.v1beta1.Instance.DiskType.UNRECOGNIZED 6633 : result; 6634 } 6635 /** 6636 * 6637 * 6638 * <pre> 6639 * Input only. The type of the data disk attached to this instance, defaults to 6640 * standard persistent disk (`PD_STANDARD`). 6641 * </pre> 6642 * 6643 * <code> 6644 * .google.cloud.notebooks.v1beta1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; 6645 * </code> 6646 * 6647 * @param value The dataDiskType to set. 6648 * @return This builder for chaining. 6649 */ setDataDiskType(com.google.cloud.notebooks.v1beta1.Instance.DiskType value)6650 public Builder setDataDiskType(com.google.cloud.notebooks.v1beta1.Instance.DiskType value) { 6651 if (value == null) { 6652 throw new NullPointerException(); 6653 } 6654 bitField0_ |= 0x00004000; 6655 dataDiskType_ = value.getNumber(); 6656 onChanged(); 6657 return this; 6658 } 6659 /** 6660 * 6661 * 6662 * <pre> 6663 * Input only. The type of the data disk attached to this instance, defaults to 6664 * standard persistent disk (`PD_STANDARD`). 6665 * </pre> 6666 * 6667 * <code> 6668 * .google.cloud.notebooks.v1beta1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; 6669 * </code> 6670 * 6671 * @return This builder for chaining. 6672 */ clearDataDiskType()6673 public Builder clearDataDiskType() { 6674 bitField0_ = (bitField0_ & ~0x00004000); 6675 dataDiskType_ = 0; 6676 onChanged(); 6677 return this; 6678 } 6679 6680 private long dataDiskSizeGb_; 6681 /** 6682 * 6683 * 6684 * <pre> 6685 * Input only. The size of the data disk in GB attached to this instance, up to a maximum 6686 * of 64000 GB (64 TB). You can choose the size of the data disk based on how 6687 * big your notebooks and data are. If not specified, this defaults to 100. 6688 * </pre> 6689 * 6690 * <code>int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY];</code> 6691 * 6692 * @return The dataDiskSizeGb. 6693 */ 6694 @java.lang.Override getDataDiskSizeGb()6695 public long getDataDiskSizeGb() { 6696 return dataDiskSizeGb_; 6697 } 6698 /** 6699 * 6700 * 6701 * <pre> 6702 * Input only. The size of the data disk in GB attached to this instance, up to a maximum 6703 * of 64000 GB (64 TB). You can choose the size of the data disk based on how 6704 * big your notebooks and data are. If not specified, this defaults to 100. 6705 * </pre> 6706 * 6707 * <code>int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY];</code> 6708 * 6709 * @param value The dataDiskSizeGb to set. 6710 * @return This builder for chaining. 6711 */ setDataDiskSizeGb(long value)6712 public Builder setDataDiskSizeGb(long value) { 6713 6714 dataDiskSizeGb_ = value; 6715 bitField0_ |= 0x00008000; 6716 onChanged(); 6717 return this; 6718 } 6719 /** 6720 * 6721 * 6722 * <pre> 6723 * Input only. The size of the data disk in GB attached to this instance, up to a maximum 6724 * of 64000 GB (64 TB). You can choose the size of the data disk based on how 6725 * big your notebooks and data are. If not specified, this defaults to 100. 6726 * </pre> 6727 * 6728 * <code>int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY];</code> 6729 * 6730 * @return This builder for chaining. 6731 */ clearDataDiskSizeGb()6732 public Builder clearDataDiskSizeGb() { 6733 bitField0_ = (bitField0_ & ~0x00008000); 6734 dataDiskSizeGb_ = 0L; 6735 onChanged(); 6736 return this; 6737 } 6738 6739 private boolean noRemoveDataDisk_; 6740 /** 6741 * 6742 * 6743 * <pre> 6744 * Input only. If true, the data disk will not be auto deleted when deleting the instance. 6745 * </pre> 6746 * 6747 * <code>bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY];</code> 6748 * 6749 * @return The noRemoveDataDisk. 6750 */ 6751 @java.lang.Override getNoRemoveDataDisk()6752 public boolean getNoRemoveDataDisk() { 6753 return noRemoveDataDisk_; 6754 } 6755 /** 6756 * 6757 * 6758 * <pre> 6759 * Input only. If true, the data disk will not be auto deleted when deleting the instance. 6760 * </pre> 6761 * 6762 * <code>bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY];</code> 6763 * 6764 * @param value The noRemoveDataDisk to set. 6765 * @return This builder for chaining. 6766 */ setNoRemoveDataDisk(boolean value)6767 public Builder setNoRemoveDataDisk(boolean value) { 6768 6769 noRemoveDataDisk_ = value; 6770 bitField0_ |= 0x00010000; 6771 onChanged(); 6772 return this; 6773 } 6774 /** 6775 * 6776 * 6777 * <pre> 6778 * Input only. If true, the data disk will not be auto deleted when deleting the instance. 6779 * </pre> 6780 * 6781 * <code>bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY];</code> 6782 * 6783 * @return This builder for chaining. 6784 */ clearNoRemoveDataDisk()6785 public Builder clearNoRemoveDataDisk() { 6786 bitField0_ = (bitField0_ & ~0x00010000); 6787 noRemoveDataDisk_ = false; 6788 onChanged(); 6789 return this; 6790 } 6791 6792 private int diskEncryption_ = 0; 6793 /** 6794 * 6795 * 6796 * <pre> 6797 * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. 6798 * </pre> 6799 * 6800 * <code> 6801 * .google.cloud.notebooks.v1beta1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; 6802 * </code> 6803 * 6804 * @return The enum numeric value on the wire for diskEncryption. 6805 */ 6806 @java.lang.Override getDiskEncryptionValue()6807 public int getDiskEncryptionValue() { 6808 return diskEncryption_; 6809 } 6810 /** 6811 * 6812 * 6813 * <pre> 6814 * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. 6815 * </pre> 6816 * 6817 * <code> 6818 * .google.cloud.notebooks.v1beta1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; 6819 * </code> 6820 * 6821 * @param value The enum numeric value on the wire for diskEncryption to set. 6822 * @return This builder for chaining. 6823 */ setDiskEncryptionValue(int value)6824 public Builder setDiskEncryptionValue(int value) { 6825 diskEncryption_ = value; 6826 bitField0_ |= 0x00020000; 6827 onChanged(); 6828 return this; 6829 } 6830 /** 6831 * 6832 * 6833 * <pre> 6834 * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. 6835 * </pre> 6836 * 6837 * <code> 6838 * .google.cloud.notebooks.v1beta1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; 6839 * </code> 6840 * 6841 * @return The diskEncryption. 6842 */ 6843 @java.lang.Override getDiskEncryption()6844 public com.google.cloud.notebooks.v1beta1.Instance.DiskEncryption getDiskEncryption() { 6845 com.google.cloud.notebooks.v1beta1.Instance.DiskEncryption result = 6846 com.google.cloud.notebooks.v1beta1.Instance.DiskEncryption.forNumber(diskEncryption_); 6847 return result == null 6848 ? com.google.cloud.notebooks.v1beta1.Instance.DiskEncryption.UNRECOGNIZED 6849 : result; 6850 } 6851 /** 6852 * 6853 * 6854 * <pre> 6855 * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. 6856 * </pre> 6857 * 6858 * <code> 6859 * .google.cloud.notebooks.v1beta1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; 6860 * </code> 6861 * 6862 * @param value The diskEncryption to set. 6863 * @return This builder for chaining. 6864 */ setDiskEncryption( com.google.cloud.notebooks.v1beta1.Instance.DiskEncryption value)6865 public Builder setDiskEncryption( 6866 com.google.cloud.notebooks.v1beta1.Instance.DiskEncryption value) { 6867 if (value == null) { 6868 throw new NullPointerException(); 6869 } 6870 bitField0_ |= 0x00020000; 6871 diskEncryption_ = value.getNumber(); 6872 onChanged(); 6873 return this; 6874 } 6875 /** 6876 * 6877 * 6878 * <pre> 6879 * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. 6880 * </pre> 6881 * 6882 * <code> 6883 * .google.cloud.notebooks.v1beta1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; 6884 * </code> 6885 * 6886 * @return This builder for chaining. 6887 */ clearDiskEncryption()6888 public Builder clearDiskEncryption() { 6889 bitField0_ = (bitField0_ & ~0x00020000); 6890 diskEncryption_ = 0; 6891 onChanged(); 6892 return this; 6893 } 6894 6895 private java.lang.Object kmsKey_ = ""; 6896 /** 6897 * 6898 * 6899 * <pre> 6900 * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption 6901 * is CMEK. 6902 * Format: 6903 * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` 6904 * Learn more about [using your own encryption 6905 * keys](https://cloud.google.com/kms/docs/quickstart). 6906 * </pre> 6907 * 6908 * <code>string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];</code> 6909 * 6910 * @return The kmsKey. 6911 */ getKmsKey()6912 public java.lang.String getKmsKey() { 6913 java.lang.Object ref = kmsKey_; 6914 if (!(ref instanceof java.lang.String)) { 6915 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 6916 java.lang.String s = bs.toStringUtf8(); 6917 kmsKey_ = s; 6918 return s; 6919 } else { 6920 return (java.lang.String) ref; 6921 } 6922 } 6923 /** 6924 * 6925 * 6926 * <pre> 6927 * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption 6928 * is CMEK. 6929 * Format: 6930 * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` 6931 * Learn more about [using your own encryption 6932 * keys](https://cloud.google.com/kms/docs/quickstart). 6933 * </pre> 6934 * 6935 * <code>string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];</code> 6936 * 6937 * @return The bytes for kmsKey. 6938 */ getKmsKeyBytes()6939 public com.google.protobuf.ByteString getKmsKeyBytes() { 6940 java.lang.Object ref = kmsKey_; 6941 if (ref instanceof String) { 6942 com.google.protobuf.ByteString b = 6943 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 6944 kmsKey_ = b; 6945 return b; 6946 } else { 6947 return (com.google.protobuf.ByteString) ref; 6948 } 6949 } 6950 /** 6951 * 6952 * 6953 * <pre> 6954 * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption 6955 * is CMEK. 6956 * Format: 6957 * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` 6958 * Learn more about [using your own encryption 6959 * keys](https://cloud.google.com/kms/docs/quickstart). 6960 * </pre> 6961 * 6962 * <code>string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];</code> 6963 * 6964 * @param value The kmsKey to set. 6965 * @return This builder for chaining. 6966 */ setKmsKey(java.lang.String value)6967 public Builder setKmsKey(java.lang.String value) { 6968 if (value == null) { 6969 throw new NullPointerException(); 6970 } 6971 kmsKey_ = value; 6972 bitField0_ |= 0x00040000; 6973 onChanged(); 6974 return this; 6975 } 6976 /** 6977 * 6978 * 6979 * <pre> 6980 * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption 6981 * is CMEK. 6982 * Format: 6983 * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` 6984 * Learn more about [using your own encryption 6985 * keys](https://cloud.google.com/kms/docs/quickstart). 6986 * </pre> 6987 * 6988 * <code>string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];</code> 6989 * 6990 * @return This builder for chaining. 6991 */ clearKmsKey()6992 public Builder clearKmsKey() { 6993 kmsKey_ = getDefaultInstance().getKmsKey(); 6994 bitField0_ = (bitField0_ & ~0x00040000); 6995 onChanged(); 6996 return this; 6997 } 6998 /** 6999 * 7000 * 7001 * <pre> 7002 * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption 7003 * is CMEK. 7004 * Format: 7005 * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` 7006 * Learn more about [using your own encryption 7007 * keys](https://cloud.google.com/kms/docs/quickstart). 7008 * </pre> 7009 * 7010 * <code>string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];</code> 7011 * 7012 * @param value The bytes for kmsKey to set. 7013 * @return This builder for chaining. 7014 */ setKmsKeyBytes(com.google.protobuf.ByteString value)7015 public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { 7016 if (value == null) { 7017 throw new NullPointerException(); 7018 } 7019 checkByteStringIsUtf8(value); 7020 kmsKey_ = value; 7021 bitField0_ |= 0x00040000; 7022 onChanged(); 7023 return this; 7024 } 7025 7026 private boolean noPublicIp_; 7027 /** 7028 * 7029 * 7030 * <pre> 7031 * If true, no public IP will be assigned to this instance. 7032 * </pre> 7033 * 7034 * <code>bool no_public_ip = 17;</code> 7035 * 7036 * @return The noPublicIp. 7037 */ 7038 @java.lang.Override getNoPublicIp()7039 public boolean getNoPublicIp() { 7040 return noPublicIp_; 7041 } 7042 /** 7043 * 7044 * 7045 * <pre> 7046 * If true, no public IP will be assigned to this instance. 7047 * </pre> 7048 * 7049 * <code>bool no_public_ip = 17;</code> 7050 * 7051 * @param value The noPublicIp to set. 7052 * @return This builder for chaining. 7053 */ setNoPublicIp(boolean value)7054 public Builder setNoPublicIp(boolean value) { 7055 7056 noPublicIp_ = value; 7057 bitField0_ |= 0x00080000; 7058 onChanged(); 7059 return this; 7060 } 7061 /** 7062 * 7063 * 7064 * <pre> 7065 * If true, no public IP will be assigned to this instance. 7066 * </pre> 7067 * 7068 * <code>bool no_public_ip = 17;</code> 7069 * 7070 * @return This builder for chaining. 7071 */ clearNoPublicIp()7072 public Builder clearNoPublicIp() { 7073 bitField0_ = (bitField0_ & ~0x00080000); 7074 noPublicIp_ = false; 7075 onChanged(); 7076 return this; 7077 } 7078 7079 private boolean noProxyAccess_; 7080 /** 7081 * 7082 * 7083 * <pre> 7084 * If true, the notebook instance will not register with the proxy. 7085 * </pre> 7086 * 7087 * <code>bool no_proxy_access = 18;</code> 7088 * 7089 * @return The noProxyAccess. 7090 */ 7091 @java.lang.Override getNoProxyAccess()7092 public boolean getNoProxyAccess() { 7093 return noProxyAccess_; 7094 } 7095 /** 7096 * 7097 * 7098 * <pre> 7099 * If true, the notebook instance will not register with the proxy. 7100 * </pre> 7101 * 7102 * <code>bool no_proxy_access = 18;</code> 7103 * 7104 * @param value The noProxyAccess to set. 7105 * @return This builder for chaining. 7106 */ setNoProxyAccess(boolean value)7107 public Builder setNoProxyAccess(boolean value) { 7108 7109 noProxyAccess_ = value; 7110 bitField0_ |= 0x00100000; 7111 onChanged(); 7112 return this; 7113 } 7114 /** 7115 * 7116 * 7117 * <pre> 7118 * If true, the notebook instance will not register with the proxy. 7119 * </pre> 7120 * 7121 * <code>bool no_proxy_access = 18;</code> 7122 * 7123 * @return This builder for chaining. 7124 */ clearNoProxyAccess()7125 public Builder clearNoProxyAccess() { 7126 bitField0_ = (bitField0_ & ~0x00100000); 7127 noProxyAccess_ = false; 7128 onChanged(); 7129 return this; 7130 } 7131 7132 private java.lang.Object network_ = ""; 7133 /** 7134 * 7135 * 7136 * <pre> 7137 * The name of the VPC that this instance is in. 7138 * Format: 7139 * `projects/{project_id}/global/networks/{network_id}` 7140 * </pre> 7141 * 7142 * <code>string network = 19;</code> 7143 * 7144 * @return The network. 7145 */ getNetwork()7146 public java.lang.String getNetwork() { 7147 java.lang.Object ref = network_; 7148 if (!(ref instanceof java.lang.String)) { 7149 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 7150 java.lang.String s = bs.toStringUtf8(); 7151 network_ = s; 7152 return s; 7153 } else { 7154 return (java.lang.String) ref; 7155 } 7156 } 7157 /** 7158 * 7159 * 7160 * <pre> 7161 * The name of the VPC that this instance is in. 7162 * Format: 7163 * `projects/{project_id}/global/networks/{network_id}` 7164 * </pre> 7165 * 7166 * <code>string network = 19;</code> 7167 * 7168 * @return The bytes for network. 7169 */ getNetworkBytes()7170 public com.google.protobuf.ByteString getNetworkBytes() { 7171 java.lang.Object ref = network_; 7172 if (ref instanceof String) { 7173 com.google.protobuf.ByteString b = 7174 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 7175 network_ = b; 7176 return b; 7177 } else { 7178 return (com.google.protobuf.ByteString) ref; 7179 } 7180 } 7181 /** 7182 * 7183 * 7184 * <pre> 7185 * The name of the VPC that this instance is in. 7186 * Format: 7187 * `projects/{project_id}/global/networks/{network_id}` 7188 * </pre> 7189 * 7190 * <code>string network = 19;</code> 7191 * 7192 * @param value The network to set. 7193 * @return This builder for chaining. 7194 */ setNetwork(java.lang.String value)7195 public Builder setNetwork(java.lang.String value) { 7196 if (value == null) { 7197 throw new NullPointerException(); 7198 } 7199 network_ = value; 7200 bitField0_ |= 0x00200000; 7201 onChanged(); 7202 return this; 7203 } 7204 /** 7205 * 7206 * 7207 * <pre> 7208 * The name of the VPC that this instance is in. 7209 * Format: 7210 * `projects/{project_id}/global/networks/{network_id}` 7211 * </pre> 7212 * 7213 * <code>string network = 19;</code> 7214 * 7215 * @return This builder for chaining. 7216 */ clearNetwork()7217 public Builder clearNetwork() { 7218 network_ = getDefaultInstance().getNetwork(); 7219 bitField0_ = (bitField0_ & ~0x00200000); 7220 onChanged(); 7221 return this; 7222 } 7223 /** 7224 * 7225 * 7226 * <pre> 7227 * The name of the VPC that this instance is in. 7228 * Format: 7229 * `projects/{project_id}/global/networks/{network_id}` 7230 * </pre> 7231 * 7232 * <code>string network = 19;</code> 7233 * 7234 * @param value The bytes for network to set. 7235 * @return This builder for chaining. 7236 */ setNetworkBytes(com.google.protobuf.ByteString value)7237 public Builder setNetworkBytes(com.google.protobuf.ByteString value) { 7238 if (value == null) { 7239 throw new NullPointerException(); 7240 } 7241 checkByteStringIsUtf8(value); 7242 network_ = value; 7243 bitField0_ |= 0x00200000; 7244 onChanged(); 7245 return this; 7246 } 7247 7248 private java.lang.Object subnet_ = ""; 7249 /** 7250 * 7251 * 7252 * <pre> 7253 * The name of the subnet that this instance is in. 7254 * Format: 7255 * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` 7256 * </pre> 7257 * 7258 * <code>string subnet = 20;</code> 7259 * 7260 * @return The subnet. 7261 */ getSubnet()7262 public java.lang.String getSubnet() { 7263 java.lang.Object ref = subnet_; 7264 if (!(ref instanceof java.lang.String)) { 7265 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 7266 java.lang.String s = bs.toStringUtf8(); 7267 subnet_ = s; 7268 return s; 7269 } else { 7270 return (java.lang.String) ref; 7271 } 7272 } 7273 /** 7274 * 7275 * 7276 * <pre> 7277 * The name of the subnet that this instance is in. 7278 * Format: 7279 * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` 7280 * </pre> 7281 * 7282 * <code>string subnet = 20;</code> 7283 * 7284 * @return The bytes for subnet. 7285 */ getSubnetBytes()7286 public com.google.protobuf.ByteString getSubnetBytes() { 7287 java.lang.Object ref = subnet_; 7288 if (ref instanceof String) { 7289 com.google.protobuf.ByteString b = 7290 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 7291 subnet_ = b; 7292 return b; 7293 } else { 7294 return (com.google.protobuf.ByteString) ref; 7295 } 7296 } 7297 /** 7298 * 7299 * 7300 * <pre> 7301 * The name of the subnet that this instance is in. 7302 * Format: 7303 * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` 7304 * </pre> 7305 * 7306 * <code>string subnet = 20;</code> 7307 * 7308 * @param value The subnet to set. 7309 * @return This builder for chaining. 7310 */ setSubnet(java.lang.String value)7311 public Builder setSubnet(java.lang.String value) { 7312 if (value == null) { 7313 throw new NullPointerException(); 7314 } 7315 subnet_ = value; 7316 bitField0_ |= 0x00400000; 7317 onChanged(); 7318 return this; 7319 } 7320 /** 7321 * 7322 * 7323 * <pre> 7324 * The name of the subnet that this instance is in. 7325 * Format: 7326 * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` 7327 * </pre> 7328 * 7329 * <code>string subnet = 20;</code> 7330 * 7331 * @return This builder for chaining. 7332 */ clearSubnet()7333 public Builder clearSubnet() { 7334 subnet_ = getDefaultInstance().getSubnet(); 7335 bitField0_ = (bitField0_ & ~0x00400000); 7336 onChanged(); 7337 return this; 7338 } 7339 /** 7340 * 7341 * 7342 * <pre> 7343 * The name of the subnet that this instance is in. 7344 * Format: 7345 * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` 7346 * </pre> 7347 * 7348 * <code>string subnet = 20;</code> 7349 * 7350 * @param value The bytes for subnet to set. 7351 * @return This builder for chaining. 7352 */ setSubnetBytes(com.google.protobuf.ByteString value)7353 public Builder setSubnetBytes(com.google.protobuf.ByteString value) { 7354 if (value == null) { 7355 throw new NullPointerException(); 7356 } 7357 checkByteStringIsUtf8(value); 7358 subnet_ = value; 7359 bitField0_ |= 0x00400000; 7360 onChanged(); 7361 return this; 7362 } 7363 7364 private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_; 7365 internalGetLabels()7366 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() { 7367 if (labels_ == null) { 7368 return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); 7369 } 7370 return labels_; 7371 } 7372 7373 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableLabels()7374 internalGetMutableLabels() { 7375 if (labels_ == null) { 7376 labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); 7377 } 7378 if (!labels_.isMutable()) { 7379 labels_ = labels_.copy(); 7380 } 7381 bitField0_ |= 0x00800000; 7382 onChanged(); 7383 return labels_; 7384 } 7385 getLabelsCount()7386 public int getLabelsCount() { 7387 return internalGetLabels().getMap().size(); 7388 } 7389 /** 7390 * 7391 * 7392 * <pre> 7393 * Labels to apply to this instance. 7394 * These can be later modified by the setLabels method. 7395 * </pre> 7396 * 7397 * <code>map<string, string> labels = 21;</code> 7398 */ 7399 @java.lang.Override containsLabels(java.lang.String key)7400 public boolean containsLabels(java.lang.String key) { 7401 if (key == null) { 7402 throw new NullPointerException("map key"); 7403 } 7404 return internalGetLabels().getMap().containsKey(key); 7405 } 7406 /** Use {@link #getLabelsMap()} instead. */ 7407 @java.lang.Override 7408 @java.lang.Deprecated getLabels()7409 public java.util.Map<java.lang.String, java.lang.String> getLabels() { 7410 return getLabelsMap(); 7411 } 7412 /** 7413 * 7414 * 7415 * <pre> 7416 * Labels to apply to this instance. 7417 * These can be later modified by the setLabels method. 7418 * </pre> 7419 * 7420 * <code>map<string, string> labels = 21;</code> 7421 */ 7422 @java.lang.Override getLabelsMap()7423 public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { 7424 return internalGetLabels().getMap(); 7425 } 7426 /** 7427 * 7428 * 7429 * <pre> 7430 * Labels to apply to this instance. 7431 * These can be later modified by the setLabels method. 7432 * </pre> 7433 * 7434 * <code>map<string, string> labels = 21;</code> 7435 */ 7436 @java.lang.Override getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)7437 public /* nullable */ java.lang.String getLabelsOrDefault( 7438 java.lang.String key, 7439 /* nullable */ 7440 java.lang.String defaultValue) { 7441 if (key == null) { 7442 throw new NullPointerException("map key"); 7443 } 7444 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 7445 return map.containsKey(key) ? map.get(key) : defaultValue; 7446 } 7447 /** 7448 * 7449 * 7450 * <pre> 7451 * Labels to apply to this instance. 7452 * These can be later modified by the setLabels method. 7453 * </pre> 7454 * 7455 * <code>map<string, string> labels = 21;</code> 7456 */ 7457 @java.lang.Override getLabelsOrThrow(java.lang.String key)7458 public java.lang.String getLabelsOrThrow(java.lang.String key) { 7459 if (key == null) { 7460 throw new NullPointerException("map key"); 7461 } 7462 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 7463 if (!map.containsKey(key)) { 7464 throw new java.lang.IllegalArgumentException(); 7465 } 7466 return map.get(key); 7467 } 7468 clearLabels()7469 public Builder clearLabels() { 7470 bitField0_ = (bitField0_ & ~0x00800000); 7471 internalGetMutableLabels().getMutableMap().clear(); 7472 return this; 7473 } 7474 /** 7475 * 7476 * 7477 * <pre> 7478 * Labels to apply to this instance. 7479 * These can be later modified by the setLabels method. 7480 * </pre> 7481 * 7482 * <code>map<string, string> labels = 21;</code> 7483 */ removeLabels(java.lang.String key)7484 public Builder removeLabels(java.lang.String key) { 7485 if (key == null) { 7486 throw new NullPointerException("map key"); 7487 } 7488 internalGetMutableLabels().getMutableMap().remove(key); 7489 return this; 7490 } 7491 /** Use alternate mutation accessors instead. */ 7492 @java.lang.Deprecated getMutableLabels()7493 public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() { 7494 bitField0_ |= 0x00800000; 7495 return internalGetMutableLabels().getMutableMap(); 7496 } 7497 /** 7498 * 7499 * 7500 * <pre> 7501 * Labels to apply to this instance. 7502 * These can be later modified by the setLabels method. 7503 * </pre> 7504 * 7505 * <code>map<string, string> labels = 21;</code> 7506 */ putLabels(java.lang.String key, java.lang.String value)7507 public Builder putLabels(java.lang.String key, java.lang.String value) { 7508 if (key == null) { 7509 throw new NullPointerException("map key"); 7510 } 7511 if (value == null) { 7512 throw new NullPointerException("map value"); 7513 } 7514 internalGetMutableLabels().getMutableMap().put(key, value); 7515 bitField0_ |= 0x00800000; 7516 return this; 7517 } 7518 /** 7519 * 7520 * 7521 * <pre> 7522 * Labels to apply to this instance. 7523 * These can be later modified by the setLabels method. 7524 * </pre> 7525 * 7526 * <code>map<string, string> labels = 21;</code> 7527 */ putAllLabels(java.util.Map<java.lang.String, java.lang.String> values)7528 public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) { 7529 internalGetMutableLabels().getMutableMap().putAll(values); 7530 bitField0_ |= 0x00800000; 7531 return this; 7532 } 7533 7534 private com.google.protobuf.MapField<java.lang.String, java.lang.String> metadata_; 7535 internalGetMetadata()7536 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMetadata() { 7537 if (metadata_ == null) { 7538 return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); 7539 } 7540 return metadata_; 7541 } 7542 7543 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableMetadata()7544 internalGetMutableMetadata() { 7545 if (metadata_ == null) { 7546 metadata_ = 7547 com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry); 7548 } 7549 if (!metadata_.isMutable()) { 7550 metadata_ = metadata_.copy(); 7551 } 7552 bitField0_ |= 0x01000000; 7553 onChanged(); 7554 return metadata_; 7555 } 7556 getMetadataCount()7557 public int getMetadataCount() { 7558 return internalGetMetadata().getMap().size(); 7559 } 7560 /** 7561 * 7562 * 7563 * <pre> 7564 * Custom metadata to apply to this instance. 7565 * </pre> 7566 * 7567 * <code>map<string, string> metadata = 22;</code> 7568 */ 7569 @java.lang.Override containsMetadata(java.lang.String key)7570 public boolean containsMetadata(java.lang.String key) { 7571 if (key == null) { 7572 throw new NullPointerException("map key"); 7573 } 7574 return internalGetMetadata().getMap().containsKey(key); 7575 } 7576 /** Use {@link #getMetadataMap()} instead. */ 7577 @java.lang.Override 7578 @java.lang.Deprecated getMetadata()7579 public java.util.Map<java.lang.String, java.lang.String> getMetadata() { 7580 return getMetadataMap(); 7581 } 7582 /** 7583 * 7584 * 7585 * <pre> 7586 * Custom metadata to apply to this instance. 7587 * </pre> 7588 * 7589 * <code>map<string, string> metadata = 22;</code> 7590 */ 7591 @java.lang.Override getMetadataMap()7592 public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() { 7593 return internalGetMetadata().getMap(); 7594 } 7595 /** 7596 * 7597 * 7598 * <pre> 7599 * Custom metadata to apply to this instance. 7600 * </pre> 7601 * 7602 * <code>map<string, string> metadata = 22;</code> 7603 */ 7604 @java.lang.Override getMetadataOrDefault( java.lang.String key, java.lang.String defaultValue)7605 public /* nullable */ java.lang.String getMetadataOrDefault( 7606 java.lang.String key, 7607 /* nullable */ 7608 java.lang.String defaultValue) { 7609 if (key == null) { 7610 throw new NullPointerException("map key"); 7611 } 7612 java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); 7613 return map.containsKey(key) ? map.get(key) : defaultValue; 7614 } 7615 /** 7616 * 7617 * 7618 * <pre> 7619 * Custom metadata to apply to this instance. 7620 * </pre> 7621 * 7622 * <code>map<string, string> metadata = 22;</code> 7623 */ 7624 @java.lang.Override getMetadataOrThrow(java.lang.String key)7625 public java.lang.String getMetadataOrThrow(java.lang.String key) { 7626 if (key == null) { 7627 throw new NullPointerException("map key"); 7628 } 7629 java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); 7630 if (!map.containsKey(key)) { 7631 throw new java.lang.IllegalArgumentException(); 7632 } 7633 return map.get(key); 7634 } 7635 clearMetadata()7636 public Builder clearMetadata() { 7637 bitField0_ = (bitField0_ & ~0x01000000); 7638 internalGetMutableMetadata().getMutableMap().clear(); 7639 return this; 7640 } 7641 /** 7642 * 7643 * 7644 * <pre> 7645 * Custom metadata to apply to this instance. 7646 * </pre> 7647 * 7648 * <code>map<string, string> metadata = 22;</code> 7649 */ removeMetadata(java.lang.String key)7650 public Builder removeMetadata(java.lang.String key) { 7651 if (key == null) { 7652 throw new NullPointerException("map key"); 7653 } 7654 internalGetMutableMetadata().getMutableMap().remove(key); 7655 return this; 7656 } 7657 /** Use alternate mutation accessors instead. */ 7658 @java.lang.Deprecated getMutableMetadata()7659 public java.util.Map<java.lang.String, java.lang.String> getMutableMetadata() { 7660 bitField0_ |= 0x01000000; 7661 return internalGetMutableMetadata().getMutableMap(); 7662 } 7663 /** 7664 * 7665 * 7666 * <pre> 7667 * Custom metadata to apply to this instance. 7668 * </pre> 7669 * 7670 * <code>map<string, string> metadata = 22;</code> 7671 */ putMetadata(java.lang.String key, java.lang.String value)7672 public Builder putMetadata(java.lang.String key, java.lang.String value) { 7673 if (key == null) { 7674 throw new NullPointerException("map key"); 7675 } 7676 if (value == null) { 7677 throw new NullPointerException("map value"); 7678 } 7679 internalGetMutableMetadata().getMutableMap().put(key, value); 7680 bitField0_ |= 0x01000000; 7681 return this; 7682 } 7683 /** 7684 * 7685 * 7686 * <pre> 7687 * Custom metadata to apply to this instance. 7688 * </pre> 7689 * 7690 * <code>map<string, string> metadata = 22;</code> 7691 */ putAllMetadata(java.util.Map<java.lang.String, java.lang.String> values)7692 public Builder putAllMetadata(java.util.Map<java.lang.String, java.lang.String> values) { 7693 internalGetMutableMetadata().getMutableMap().putAll(values); 7694 bitField0_ |= 0x01000000; 7695 return this; 7696 } 7697 7698 private int nicType_ = 0; 7699 /** 7700 * 7701 * 7702 * <pre> 7703 * Optional. The type of vNIC to be used on this interface. This may be gVNIC or 7704 * VirtioNet. 7705 * </pre> 7706 * 7707 * <code> 7708 * .google.cloud.notebooks.v1beta1.Instance.NicType nic_type = 28 [(.google.api.field_behavior) = OPTIONAL]; 7709 * </code> 7710 * 7711 * @return The enum numeric value on the wire for nicType. 7712 */ 7713 @java.lang.Override getNicTypeValue()7714 public int getNicTypeValue() { 7715 return nicType_; 7716 } 7717 /** 7718 * 7719 * 7720 * <pre> 7721 * Optional. The type of vNIC to be used on this interface. This may be gVNIC or 7722 * VirtioNet. 7723 * </pre> 7724 * 7725 * <code> 7726 * .google.cloud.notebooks.v1beta1.Instance.NicType nic_type = 28 [(.google.api.field_behavior) = OPTIONAL]; 7727 * </code> 7728 * 7729 * @param value The enum numeric value on the wire for nicType to set. 7730 * @return This builder for chaining. 7731 */ setNicTypeValue(int value)7732 public Builder setNicTypeValue(int value) { 7733 nicType_ = value; 7734 bitField0_ |= 0x02000000; 7735 onChanged(); 7736 return this; 7737 } 7738 /** 7739 * 7740 * 7741 * <pre> 7742 * Optional. The type of vNIC to be used on this interface. This may be gVNIC or 7743 * VirtioNet. 7744 * </pre> 7745 * 7746 * <code> 7747 * .google.cloud.notebooks.v1beta1.Instance.NicType nic_type = 28 [(.google.api.field_behavior) = OPTIONAL]; 7748 * </code> 7749 * 7750 * @return The nicType. 7751 */ 7752 @java.lang.Override getNicType()7753 public com.google.cloud.notebooks.v1beta1.Instance.NicType getNicType() { 7754 com.google.cloud.notebooks.v1beta1.Instance.NicType result = 7755 com.google.cloud.notebooks.v1beta1.Instance.NicType.forNumber(nicType_); 7756 return result == null 7757 ? com.google.cloud.notebooks.v1beta1.Instance.NicType.UNRECOGNIZED 7758 : result; 7759 } 7760 /** 7761 * 7762 * 7763 * <pre> 7764 * Optional. The type of vNIC to be used on this interface. This may be gVNIC or 7765 * VirtioNet. 7766 * </pre> 7767 * 7768 * <code> 7769 * .google.cloud.notebooks.v1beta1.Instance.NicType nic_type = 28 [(.google.api.field_behavior) = OPTIONAL]; 7770 * </code> 7771 * 7772 * @param value The nicType to set. 7773 * @return This builder for chaining. 7774 */ setNicType(com.google.cloud.notebooks.v1beta1.Instance.NicType value)7775 public Builder setNicType(com.google.cloud.notebooks.v1beta1.Instance.NicType value) { 7776 if (value == null) { 7777 throw new NullPointerException(); 7778 } 7779 bitField0_ |= 0x02000000; 7780 nicType_ = value.getNumber(); 7781 onChanged(); 7782 return this; 7783 } 7784 /** 7785 * 7786 * 7787 * <pre> 7788 * Optional. The type of vNIC to be used on this interface. This may be gVNIC or 7789 * VirtioNet. 7790 * </pre> 7791 * 7792 * <code> 7793 * .google.cloud.notebooks.v1beta1.Instance.NicType nic_type = 28 [(.google.api.field_behavior) = OPTIONAL]; 7794 * </code> 7795 * 7796 * @return This builder for chaining. 7797 */ clearNicType()7798 public Builder clearNicType() { 7799 bitField0_ = (bitField0_ & ~0x02000000); 7800 nicType_ = 0; 7801 onChanged(); 7802 return this; 7803 } 7804 7805 private com.google.cloud.notebooks.v1beta1.ReservationAffinity reservationAffinity_; 7806 private com.google.protobuf.SingleFieldBuilderV3< 7807 com.google.cloud.notebooks.v1beta1.ReservationAffinity, 7808 com.google.cloud.notebooks.v1beta1.ReservationAffinity.Builder, 7809 com.google.cloud.notebooks.v1beta1.ReservationAffinityOrBuilder> 7810 reservationAffinityBuilder_; 7811 /** 7812 * 7813 * 7814 * <pre> 7815 * Optional. The optional reservation affinity. Setting this field will apply 7816 * the specified [Zonal Compute 7817 * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) 7818 * to this notebook instance. 7819 * </pre> 7820 * 7821 * <code> 7822 * .google.cloud.notebooks.v1beta1.ReservationAffinity reservation_affinity = 29 [(.google.api.field_behavior) = OPTIONAL]; 7823 * </code> 7824 * 7825 * @return Whether the reservationAffinity field is set. 7826 */ hasReservationAffinity()7827 public boolean hasReservationAffinity() { 7828 return ((bitField0_ & 0x04000000) != 0); 7829 } 7830 /** 7831 * 7832 * 7833 * <pre> 7834 * Optional. The optional reservation affinity. Setting this field will apply 7835 * the specified [Zonal Compute 7836 * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) 7837 * to this notebook instance. 7838 * </pre> 7839 * 7840 * <code> 7841 * .google.cloud.notebooks.v1beta1.ReservationAffinity reservation_affinity = 29 [(.google.api.field_behavior) = OPTIONAL]; 7842 * </code> 7843 * 7844 * @return The reservationAffinity. 7845 */ getReservationAffinity()7846 public com.google.cloud.notebooks.v1beta1.ReservationAffinity getReservationAffinity() { 7847 if (reservationAffinityBuilder_ == null) { 7848 return reservationAffinity_ == null 7849 ? com.google.cloud.notebooks.v1beta1.ReservationAffinity.getDefaultInstance() 7850 : reservationAffinity_; 7851 } else { 7852 return reservationAffinityBuilder_.getMessage(); 7853 } 7854 } 7855 /** 7856 * 7857 * 7858 * <pre> 7859 * Optional. The optional reservation affinity. Setting this field will apply 7860 * the specified [Zonal Compute 7861 * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) 7862 * to this notebook instance. 7863 * </pre> 7864 * 7865 * <code> 7866 * .google.cloud.notebooks.v1beta1.ReservationAffinity reservation_affinity = 29 [(.google.api.field_behavior) = OPTIONAL]; 7867 * </code> 7868 */ setReservationAffinity( com.google.cloud.notebooks.v1beta1.ReservationAffinity value)7869 public Builder setReservationAffinity( 7870 com.google.cloud.notebooks.v1beta1.ReservationAffinity value) { 7871 if (reservationAffinityBuilder_ == null) { 7872 if (value == null) { 7873 throw new NullPointerException(); 7874 } 7875 reservationAffinity_ = value; 7876 } else { 7877 reservationAffinityBuilder_.setMessage(value); 7878 } 7879 bitField0_ |= 0x04000000; 7880 onChanged(); 7881 return this; 7882 } 7883 /** 7884 * 7885 * 7886 * <pre> 7887 * Optional. The optional reservation affinity. Setting this field will apply 7888 * the specified [Zonal Compute 7889 * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) 7890 * to this notebook instance. 7891 * </pre> 7892 * 7893 * <code> 7894 * .google.cloud.notebooks.v1beta1.ReservationAffinity reservation_affinity = 29 [(.google.api.field_behavior) = OPTIONAL]; 7895 * </code> 7896 */ setReservationAffinity( com.google.cloud.notebooks.v1beta1.ReservationAffinity.Builder builderForValue)7897 public Builder setReservationAffinity( 7898 com.google.cloud.notebooks.v1beta1.ReservationAffinity.Builder builderForValue) { 7899 if (reservationAffinityBuilder_ == null) { 7900 reservationAffinity_ = builderForValue.build(); 7901 } else { 7902 reservationAffinityBuilder_.setMessage(builderForValue.build()); 7903 } 7904 bitField0_ |= 0x04000000; 7905 onChanged(); 7906 return this; 7907 } 7908 /** 7909 * 7910 * 7911 * <pre> 7912 * Optional. The optional reservation affinity. Setting this field will apply 7913 * the specified [Zonal Compute 7914 * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) 7915 * to this notebook instance. 7916 * </pre> 7917 * 7918 * <code> 7919 * .google.cloud.notebooks.v1beta1.ReservationAffinity reservation_affinity = 29 [(.google.api.field_behavior) = OPTIONAL]; 7920 * </code> 7921 */ mergeReservationAffinity( com.google.cloud.notebooks.v1beta1.ReservationAffinity value)7922 public Builder mergeReservationAffinity( 7923 com.google.cloud.notebooks.v1beta1.ReservationAffinity value) { 7924 if (reservationAffinityBuilder_ == null) { 7925 if (((bitField0_ & 0x04000000) != 0) 7926 && reservationAffinity_ != null 7927 && reservationAffinity_ 7928 != com.google.cloud.notebooks.v1beta1.ReservationAffinity.getDefaultInstance()) { 7929 getReservationAffinityBuilder().mergeFrom(value); 7930 } else { 7931 reservationAffinity_ = value; 7932 } 7933 } else { 7934 reservationAffinityBuilder_.mergeFrom(value); 7935 } 7936 bitField0_ |= 0x04000000; 7937 onChanged(); 7938 return this; 7939 } 7940 /** 7941 * 7942 * 7943 * <pre> 7944 * Optional. The optional reservation affinity. Setting this field will apply 7945 * the specified [Zonal Compute 7946 * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) 7947 * to this notebook instance. 7948 * </pre> 7949 * 7950 * <code> 7951 * .google.cloud.notebooks.v1beta1.ReservationAffinity reservation_affinity = 29 [(.google.api.field_behavior) = OPTIONAL]; 7952 * </code> 7953 */ clearReservationAffinity()7954 public Builder clearReservationAffinity() { 7955 bitField0_ = (bitField0_ & ~0x04000000); 7956 reservationAffinity_ = null; 7957 if (reservationAffinityBuilder_ != null) { 7958 reservationAffinityBuilder_.dispose(); 7959 reservationAffinityBuilder_ = null; 7960 } 7961 onChanged(); 7962 return this; 7963 } 7964 /** 7965 * 7966 * 7967 * <pre> 7968 * Optional. The optional reservation affinity. Setting this field will apply 7969 * the specified [Zonal Compute 7970 * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) 7971 * to this notebook instance. 7972 * </pre> 7973 * 7974 * <code> 7975 * .google.cloud.notebooks.v1beta1.ReservationAffinity reservation_affinity = 29 [(.google.api.field_behavior) = OPTIONAL]; 7976 * </code> 7977 */ 7978 public com.google.cloud.notebooks.v1beta1.ReservationAffinity.Builder getReservationAffinityBuilder()7979 getReservationAffinityBuilder() { 7980 bitField0_ |= 0x04000000; 7981 onChanged(); 7982 return getReservationAffinityFieldBuilder().getBuilder(); 7983 } 7984 /** 7985 * 7986 * 7987 * <pre> 7988 * Optional. The optional reservation affinity. Setting this field will apply 7989 * the specified [Zonal Compute 7990 * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) 7991 * to this notebook instance. 7992 * </pre> 7993 * 7994 * <code> 7995 * .google.cloud.notebooks.v1beta1.ReservationAffinity reservation_affinity = 29 [(.google.api.field_behavior) = OPTIONAL]; 7996 * </code> 7997 */ 7998 public com.google.cloud.notebooks.v1beta1.ReservationAffinityOrBuilder getReservationAffinityOrBuilder()7999 getReservationAffinityOrBuilder() { 8000 if (reservationAffinityBuilder_ != null) { 8001 return reservationAffinityBuilder_.getMessageOrBuilder(); 8002 } else { 8003 return reservationAffinity_ == null 8004 ? com.google.cloud.notebooks.v1beta1.ReservationAffinity.getDefaultInstance() 8005 : reservationAffinity_; 8006 } 8007 } 8008 /** 8009 * 8010 * 8011 * <pre> 8012 * Optional. The optional reservation affinity. Setting this field will apply 8013 * the specified [Zonal Compute 8014 * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) 8015 * to this notebook instance. 8016 * </pre> 8017 * 8018 * <code> 8019 * .google.cloud.notebooks.v1beta1.ReservationAffinity reservation_affinity = 29 [(.google.api.field_behavior) = OPTIONAL]; 8020 * </code> 8021 */ 8022 private com.google.protobuf.SingleFieldBuilderV3< 8023 com.google.cloud.notebooks.v1beta1.ReservationAffinity, 8024 com.google.cloud.notebooks.v1beta1.ReservationAffinity.Builder, 8025 com.google.cloud.notebooks.v1beta1.ReservationAffinityOrBuilder> getReservationAffinityFieldBuilder()8026 getReservationAffinityFieldBuilder() { 8027 if (reservationAffinityBuilder_ == null) { 8028 reservationAffinityBuilder_ = 8029 new com.google.protobuf.SingleFieldBuilderV3< 8030 com.google.cloud.notebooks.v1beta1.ReservationAffinity, 8031 com.google.cloud.notebooks.v1beta1.ReservationAffinity.Builder, 8032 com.google.cloud.notebooks.v1beta1.ReservationAffinityOrBuilder>( 8033 getReservationAffinity(), getParentForChildren(), isClean()); 8034 reservationAffinity_ = null; 8035 } 8036 return reservationAffinityBuilder_; 8037 } 8038 8039 private boolean canIpForward_; 8040 /** 8041 * 8042 * 8043 * <pre> 8044 * Optional. Flag to enable ip forwarding or not, default false/off. 8045 * https://cloud.google.com/vpc/docs/using-routes#canipforward 8046 * </pre> 8047 * 8048 * <code>bool can_ip_forward = 31 [(.google.api.field_behavior) = OPTIONAL];</code> 8049 * 8050 * @return The canIpForward. 8051 */ 8052 @java.lang.Override getCanIpForward()8053 public boolean getCanIpForward() { 8054 return canIpForward_; 8055 } 8056 /** 8057 * 8058 * 8059 * <pre> 8060 * Optional. Flag to enable ip forwarding or not, default false/off. 8061 * https://cloud.google.com/vpc/docs/using-routes#canipforward 8062 * </pre> 8063 * 8064 * <code>bool can_ip_forward = 31 [(.google.api.field_behavior) = OPTIONAL];</code> 8065 * 8066 * @param value The canIpForward to set. 8067 * @return This builder for chaining. 8068 */ setCanIpForward(boolean value)8069 public Builder setCanIpForward(boolean value) { 8070 8071 canIpForward_ = value; 8072 bitField0_ |= 0x08000000; 8073 onChanged(); 8074 return this; 8075 } 8076 /** 8077 * 8078 * 8079 * <pre> 8080 * Optional. Flag to enable ip forwarding or not, default false/off. 8081 * https://cloud.google.com/vpc/docs/using-routes#canipforward 8082 * </pre> 8083 * 8084 * <code>bool can_ip_forward = 31 [(.google.api.field_behavior) = OPTIONAL];</code> 8085 * 8086 * @return This builder for chaining. 8087 */ clearCanIpForward()8088 public Builder clearCanIpForward() { 8089 bitField0_ = (bitField0_ & ~0x08000000); 8090 canIpForward_ = false; 8091 onChanged(); 8092 return this; 8093 } 8094 8095 private com.google.protobuf.Timestamp createTime_; 8096 private com.google.protobuf.SingleFieldBuilderV3< 8097 com.google.protobuf.Timestamp, 8098 com.google.protobuf.Timestamp.Builder, 8099 com.google.protobuf.TimestampOrBuilder> 8100 createTimeBuilder_; 8101 /** 8102 * 8103 * 8104 * <pre> 8105 * Output only. Instance creation time. 8106 * </pre> 8107 * 8108 * <code> 8109 * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8110 * </code> 8111 * 8112 * @return Whether the createTime field is set. 8113 */ hasCreateTime()8114 public boolean hasCreateTime() { 8115 return ((bitField0_ & 0x10000000) != 0); 8116 } 8117 /** 8118 * 8119 * 8120 * <pre> 8121 * Output only. Instance creation time. 8122 * </pre> 8123 * 8124 * <code> 8125 * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8126 * </code> 8127 * 8128 * @return The createTime. 8129 */ getCreateTime()8130 public com.google.protobuf.Timestamp getCreateTime() { 8131 if (createTimeBuilder_ == null) { 8132 return createTime_ == null 8133 ? com.google.protobuf.Timestamp.getDefaultInstance() 8134 : createTime_; 8135 } else { 8136 return createTimeBuilder_.getMessage(); 8137 } 8138 } 8139 /** 8140 * 8141 * 8142 * <pre> 8143 * Output only. Instance creation time. 8144 * </pre> 8145 * 8146 * <code> 8147 * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8148 * </code> 8149 */ setCreateTime(com.google.protobuf.Timestamp value)8150 public Builder setCreateTime(com.google.protobuf.Timestamp value) { 8151 if (createTimeBuilder_ == null) { 8152 if (value == null) { 8153 throw new NullPointerException(); 8154 } 8155 createTime_ = value; 8156 } else { 8157 createTimeBuilder_.setMessage(value); 8158 } 8159 bitField0_ |= 0x10000000; 8160 onChanged(); 8161 return this; 8162 } 8163 /** 8164 * 8165 * 8166 * <pre> 8167 * Output only. Instance creation time. 8168 * </pre> 8169 * 8170 * <code> 8171 * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8172 * </code> 8173 */ setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)8174 public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { 8175 if (createTimeBuilder_ == null) { 8176 createTime_ = builderForValue.build(); 8177 } else { 8178 createTimeBuilder_.setMessage(builderForValue.build()); 8179 } 8180 bitField0_ |= 0x10000000; 8181 onChanged(); 8182 return this; 8183 } 8184 /** 8185 * 8186 * 8187 * <pre> 8188 * Output only. Instance creation time. 8189 * </pre> 8190 * 8191 * <code> 8192 * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8193 * </code> 8194 */ mergeCreateTime(com.google.protobuf.Timestamp value)8195 public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { 8196 if (createTimeBuilder_ == null) { 8197 if (((bitField0_ & 0x10000000) != 0) 8198 && createTime_ != null 8199 && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 8200 getCreateTimeBuilder().mergeFrom(value); 8201 } else { 8202 createTime_ = value; 8203 } 8204 } else { 8205 createTimeBuilder_.mergeFrom(value); 8206 } 8207 bitField0_ |= 0x10000000; 8208 onChanged(); 8209 return this; 8210 } 8211 /** 8212 * 8213 * 8214 * <pre> 8215 * Output only. Instance creation time. 8216 * </pre> 8217 * 8218 * <code> 8219 * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8220 * </code> 8221 */ clearCreateTime()8222 public Builder clearCreateTime() { 8223 bitField0_ = (bitField0_ & ~0x10000000); 8224 createTime_ = null; 8225 if (createTimeBuilder_ != null) { 8226 createTimeBuilder_.dispose(); 8227 createTimeBuilder_ = null; 8228 } 8229 onChanged(); 8230 return this; 8231 } 8232 /** 8233 * 8234 * 8235 * <pre> 8236 * Output only. Instance creation time. 8237 * </pre> 8238 * 8239 * <code> 8240 * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8241 * </code> 8242 */ getCreateTimeBuilder()8243 public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { 8244 bitField0_ |= 0x10000000; 8245 onChanged(); 8246 return getCreateTimeFieldBuilder().getBuilder(); 8247 } 8248 /** 8249 * 8250 * 8251 * <pre> 8252 * Output only. Instance creation time. 8253 * </pre> 8254 * 8255 * <code> 8256 * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8257 * </code> 8258 */ getCreateTimeOrBuilder()8259 public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { 8260 if (createTimeBuilder_ != null) { 8261 return createTimeBuilder_.getMessageOrBuilder(); 8262 } else { 8263 return createTime_ == null 8264 ? com.google.protobuf.Timestamp.getDefaultInstance() 8265 : createTime_; 8266 } 8267 } 8268 /** 8269 * 8270 * 8271 * <pre> 8272 * Output only. Instance creation time. 8273 * </pre> 8274 * 8275 * <code> 8276 * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8277 * </code> 8278 */ 8279 private com.google.protobuf.SingleFieldBuilderV3< 8280 com.google.protobuf.Timestamp, 8281 com.google.protobuf.Timestamp.Builder, 8282 com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder()8283 getCreateTimeFieldBuilder() { 8284 if (createTimeBuilder_ == null) { 8285 createTimeBuilder_ = 8286 new com.google.protobuf.SingleFieldBuilderV3< 8287 com.google.protobuf.Timestamp, 8288 com.google.protobuf.Timestamp.Builder, 8289 com.google.protobuf.TimestampOrBuilder>( 8290 getCreateTime(), getParentForChildren(), isClean()); 8291 createTime_ = null; 8292 } 8293 return createTimeBuilder_; 8294 } 8295 8296 private com.google.protobuf.Timestamp updateTime_; 8297 private com.google.protobuf.SingleFieldBuilderV3< 8298 com.google.protobuf.Timestamp, 8299 com.google.protobuf.Timestamp.Builder, 8300 com.google.protobuf.TimestampOrBuilder> 8301 updateTimeBuilder_; 8302 /** 8303 * 8304 * 8305 * <pre> 8306 * Output only. Instance update time. 8307 * </pre> 8308 * 8309 * <code> 8310 * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8311 * </code> 8312 * 8313 * @return Whether the updateTime field is set. 8314 */ hasUpdateTime()8315 public boolean hasUpdateTime() { 8316 return ((bitField0_ & 0x20000000) != 0); 8317 } 8318 /** 8319 * 8320 * 8321 * <pre> 8322 * Output only. Instance update time. 8323 * </pre> 8324 * 8325 * <code> 8326 * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8327 * </code> 8328 * 8329 * @return The updateTime. 8330 */ getUpdateTime()8331 public com.google.protobuf.Timestamp getUpdateTime() { 8332 if (updateTimeBuilder_ == null) { 8333 return updateTime_ == null 8334 ? com.google.protobuf.Timestamp.getDefaultInstance() 8335 : updateTime_; 8336 } else { 8337 return updateTimeBuilder_.getMessage(); 8338 } 8339 } 8340 /** 8341 * 8342 * 8343 * <pre> 8344 * Output only. Instance update time. 8345 * </pre> 8346 * 8347 * <code> 8348 * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8349 * </code> 8350 */ setUpdateTime(com.google.protobuf.Timestamp value)8351 public Builder setUpdateTime(com.google.protobuf.Timestamp value) { 8352 if (updateTimeBuilder_ == null) { 8353 if (value == null) { 8354 throw new NullPointerException(); 8355 } 8356 updateTime_ = value; 8357 } else { 8358 updateTimeBuilder_.setMessage(value); 8359 } 8360 bitField0_ |= 0x20000000; 8361 onChanged(); 8362 return this; 8363 } 8364 /** 8365 * 8366 * 8367 * <pre> 8368 * Output only. Instance update time. 8369 * </pre> 8370 * 8371 * <code> 8372 * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8373 * </code> 8374 */ setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)8375 public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { 8376 if (updateTimeBuilder_ == null) { 8377 updateTime_ = builderForValue.build(); 8378 } else { 8379 updateTimeBuilder_.setMessage(builderForValue.build()); 8380 } 8381 bitField0_ |= 0x20000000; 8382 onChanged(); 8383 return this; 8384 } 8385 /** 8386 * 8387 * 8388 * <pre> 8389 * Output only. Instance update time. 8390 * </pre> 8391 * 8392 * <code> 8393 * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8394 * </code> 8395 */ mergeUpdateTime(com.google.protobuf.Timestamp value)8396 public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { 8397 if (updateTimeBuilder_ == null) { 8398 if (((bitField0_ & 0x20000000) != 0) 8399 && updateTime_ != null 8400 && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 8401 getUpdateTimeBuilder().mergeFrom(value); 8402 } else { 8403 updateTime_ = value; 8404 } 8405 } else { 8406 updateTimeBuilder_.mergeFrom(value); 8407 } 8408 bitField0_ |= 0x20000000; 8409 onChanged(); 8410 return this; 8411 } 8412 /** 8413 * 8414 * 8415 * <pre> 8416 * Output only. Instance update time. 8417 * </pre> 8418 * 8419 * <code> 8420 * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8421 * </code> 8422 */ clearUpdateTime()8423 public Builder clearUpdateTime() { 8424 bitField0_ = (bitField0_ & ~0x20000000); 8425 updateTime_ = null; 8426 if (updateTimeBuilder_ != null) { 8427 updateTimeBuilder_.dispose(); 8428 updateTimeBuilder_ = null; 8429 } 8430 onChanged(); 8431 return this; 8432 } 8433 /** 8434 * 8435 * 8436 * <pre> 8437 * Output only. Instance update time. 8438 * </pre> 8439 * 8440 * <code> 8441 * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8442 * </code> 8443 */ getUpdateTimeBuilder()8444 public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { 8445 bitField0_ |= 0x20000000; 8446 onChanged(); 8447 return getUpdateTimeFieldBuilder().getBuilder(); 8448 } 8449 /** 8450 * 8451 * 8452 * <pre> 8453 * Output only. Instance update time. 8454 * </pre> 8455 * 8456 * <code> 8457 * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8458 * </code> 8459 */ getUpdateTimeOrBuilder()8460 public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { 8461 if (updateTimeBuilder_ != null) { 8462 return updateTimeBuilder_.getMessageOrBuilder(); 8463 } else { 8464 return updateTime_ == null 8465 ? com.google.protobuf.Timestamp.getDefaultInstance() 8466 : updateTime_; 8467 } 8468 } 8469 /** 8470 * 8471 * 8472 * <pre> 8473 * Output only. Instance update time. 8474 * </pre> 8475 * 8476 * <code> 8477 * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; 8478 * </code> 8479 */ 8480 private com.google.protobuf.SingleFieldBuilderV3< 8481 com.google.protobuf.Timestamp, 8482 com.google.protobuf.Timestamp.Builder, 8483 com.google.protobuf.TimestampOrBuilder> getUpdateTimeFieldBuilder()8484 getUpdateTimeFieldBuilder() { 8485 if (updateTimeBuilder_ == null) { 8486 updateTimeBuilder_ = 8487 new com.google.protobuf.SingleFieldBuilderV3< 8488 com.google.protobuf.Timestamp, 8489 com.google.protobuf.Timestamp.Builder, 8490 com.google.protobuf.TimestampOrBuilder>( 8491 getUpdateTime(), getParentForChildren(), isClean()); 8492 updateTime_ = null; 8493 } 8494 return updateTimeBuilder_; 8495 } 8496 8497 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)8498 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 8499 return super.setUnknownFields(unknownFields); 8500 } 8501 8502 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)8503 public final Builder mergeUnknownFields( 8504 final com.google.protobuf.UnknownFieldSet unknownFields) { 8505 return super.mergeUnknownFields(unknownFields); 8506 } 8507 8508 // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1beta1.Instance) 8509 } 8510 8511 // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1beta1.Instance) 8512 private static final com.google.cloud.notebooks.v1beta1.Instance DEFAULT_INSTANCE; 8513 8514 static { 8515 DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1beta1.Instance(); 8516 } 8517 getDefaultInstance()8518 public static com.google.cloud.notebooks.v1beta1.Instance getDefaultInstance() { 8519 return DEFAULT_INSTANCE; 8520 } 8521 8522 private static final com.google.protobuf.Parser<Instance> PARSER = 8523 new com.google.protobuf.AbstractParser<Instance>() { 8524 @java.lang.Override 8525 public Instance parsePartialFrom( 8526 com.google.protobuf.CodedInputStream input, 8527 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 8528 throws com.google.protobuf.InvalidProtocolBufferException { 8529 Builder builder = newBuilder(); 8530 try { 8531 builder.mergeFrom(input, extensionRegistry); 8532 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 8533 throw e.setUnfinishedMessage(builder.buildPartial()); 8534 } catch (com.google.protobuf.UninitializedMessageException e) { 8535 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 8536 } catch (java.io.IOException e) { 8537 throw new com.google.protobuf.InvalidProtocolBufferException(e) 8538 .setUnfinishedMessage(builder.buildPartial()); 8539 } 8540 return builder.buildPartial(); 8541 } 8542 }; 8543 parser()8544 public static com.google.protobuf.Parser<Instance> parser() { 8545 return PARSER; 8546 } 8547 8548 @java.lang.Override getParserForType()8549 public com.google.protobuf.Parser<Instance> getParserForType() { 8550 return PARSER; 8551 } 8552 8553 @java.lang.Override getDefaultInstanceForType()8554 public com.google.cloud.notebooks.v1beta1.Instance getDefaultInstanceForType() { 8555 return DEFAULT_INSTANCE; 8556 } 8557 } 8558