1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/compute/v1/compute.proto 18 19 package com.google.cloud.compute.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Represents a Region resource. A region is a geographical area where a resource is located. For more information, read Regions and Zones. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.compute.v1.Region} 29 */ 30 public final class Region extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.Region) 33 RegionOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use Region.newBuilder() to construct. Region(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private Region(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 Region()40 private Region() { 41 creationTimestamp_ = ""; 42 description_ = ""; 43 kind_ = ""; 44 name_ = ""; 45 quotas_ = java.util.Collections.emptyList(); 46 selfLink_ = ""; 47 status_ = ""; 48 zones_ = com.google.protobuf.LazyStringArrayList.EMPTY; 49 } 50 51 @java.lang.Override 52 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)53 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 54 return new Region(); 55 } 56 57 @java.lang.Override getUnknownFields()58 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 59 return this.unknownFields; 60 } 61 getDescriptor()62 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 63 return com.google.cloud.compute.v1.Compute 64 .internal_static_google_cloud_compute_v1_Region_descriptor; 65 } 66 67 @java.lang.Override 68 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()69 internalGetFieldAccessorTable() { 70 return com.google.cloud.compute.v1.Compute 71 .internal_static_google_cloud_compute_v1_Region_fieldAccessorTable 72 .ensureFieldAccessorsInitialized( 73 com.google.cloud.compute.v1.Region.class, 74 com.google.cloud.compute.v1.Region.Builder.class); 75 } 76 77 /** 78 * 79 * 80 * <pre> 81 * [Output Only] Status of the region, either UP or DOWN. 82 * </pre> 83 * 84 * Protobuf enum {@code google.cloud.compute.v1.Region.Status} 85 */ 86 public enum Status implements com.google.protobuf.ProtocolMessageEnum { 87 /** 88 * 89 * 90 * <pre> 91 * A value indicating that the enum field is not set. 92 * </pre> 93 * 94 * <code>UNDEFINED_STATUS = 0;</code> 95 */ 96 UNDEFINED_STATUS(0), 97 /** <code>DOWN = 2104482;</code> */ 98 DOWN(2104482), 99 /** <code>UP = 2715;</code> */ 100 UP(2715), 101 UNRECOGNIZED(-1), 102 ; 103 104 /** 105 * 106 * 107 * <pre> 108 * A value indicating that the enum field is not set. 109 * </pre> 110 * 111 * <code>UNDEFINED_STATUS = 0;</code> 112 */ 113 public static final int UNDEFINED_STATUS_VALUE = 0; 114 /** <code>DOWN = 2104482;</code> */ 115 public static final int DOWN_VALUE = 2104482; 116 /** <code>UP = 2715;</code> */ 117 public static final int UP_VALUE = 2715; 118 getNumber()119 public final int getNumber() { 120 if (this == UNRECOGNIZED) { 121 throw new java.lang.IllegalArgumentException( 122 "Can't get the number of an unknown enum value."); 123 } 124 return value; 125 } 126 127 /** 128 * @param value The numeric wire value of the corresponding enum entry. 129 * @return The enum associated with the given numeric wire value. 130 * @deprecated Use {@link #forNumber(int)} instead. 131 */ 132 @java.lang.Deprecated valueOf(int value)133 public static Status valueOf(int value) { 134 return forNumber(value); 135 } 136 137 /** 138 * @param value The numeric wire value of the corresponding enum entry. 139 * @return The enum associated with the given numeric wire value. 140 */ forNumber(int value)141 public static Status forNumber(int value) { 142 switch (value) { 143 case 0: 144 return UNDEFINED_STATUS; 145 case 2104482: 146 return DOWN; 147 case 2715: 148 return UP; 149 default: 150 return null; 151 } 152 } 153 internalGetValueMap()154 public static com.google.protobuf.Internal.EnumLiteMap<Status> internalGetValueMap() { 155 return internalValueMap; 156 } 157 158 private static final com.google.protobuf.Internal.EnumLiteMap<Status> internalValueMap = 159 new com.google.protobuf.Internal.EnumLiteMap<Status>() { 160 public Status findValueByNumber(int number) { 161 return Status.forNumber(number); 162 } 163 }; 164 getValueDescriptor()165 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 166 if (this == UNRECOGNIZED) { 167 throw new java.lang.IllegalStateException( 168 "Can't get the descriptor of an unrecognized enum value."); 169 } 170 return getDescriptor().getValues().get(ordinal()); 171 } 172 getDescriptorForType()173 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 174 return getDescriptor(); 175 } 176 getDescriptor()177 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 178 return com.google.cloud.compute.v1.Region.getDescriptor().getEnumTypes().get(0); 179 } 180 181 private static final Status[] VALUES = values(); 182 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)183 public static Status valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 184 if (desc.getType() != getDescriptor()) { 185 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 186 } 187 if (desc.getIndex() == -1) { 188 return UNRECOGNIZED; 189 } 190 return VALUES[desc.getIndex()]; 191 } 192 193 private final int value; 194 Status(int value)195 private Status(int value) { 196 this.value = value; 197 } 198 199 // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.Region.Status) 200 } 201 202 private int bitField0_; 203 public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366; 204 205 @SuppressWarnings("serial") 206 private volatile java.lang.Object creationTimestamp_ = ""; 207 /** 208 * 209 * 210 * <pre> 211 * [Output Only] Creation timestamp in RFC3339 text format. 212 * </pre> 213 * 214 * <code>optional string creation_timestamp = 30525366;</code> 215 * 216 * @return Whether the creationTimestamp field is set. 217 */ 218 @java.lang.Override hasCreationTimestamp()219 public boolean hasCreationTimestamp() { 220 return ((bitField0_ & 0x00000001) != 0); 221 } 222 /** 223 * 224 * 225 * <pre> 226 * [Output Only] Creation timestamp in RFC3339 text format. 227 * </pre> 228 * 229 * <code>optional string creation_timestamp = 30525366;</code> 230 * 231 * @return The creationTimestamp. 232 */ 233 @java.lang.Override getCreationTimestamp()234 public java.lang.String getCreationTimestamp() { 235 java.lang.Object ref = creationTimestamp_; 236 if (ref instanceof java.lang.String) { 237 return (java.lang.String) ref; 238 } else { 239 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 240 java.lang.String s = bs.toStringUtf8(); 241 creationTimestamp_ = s; 242 return s; 243 } 244 } 245 /** 246 * 247 * 248 * <pre> 249 * [Output Only] Creation timestamp in RFC3339 text format. 250 * </pre> 251 * 252 * <code>optional string creation_timestamp = 30525366;</code> 253 * 254 * @return The bytes for creationTimestamp. 255 */ 256 @java.lang.Override getCreationTimestampBytes()257 public com.google.protobuf.ByteString getCreationTimestampBytes() { 258 java.lang.Object ref = creationTimestamp_; 259 if (ref instanceof java.lang.String) { 260 com.google.protobuf.ByteString b = 261 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 262 creationTimestamp_ = b; 263 return b; 264 } else { 265 return (com.google.protobuf.ByteString) ref; 266 } 267 } 268 269 public static final int DEPRECATED_FIELD_NUMBER = 515138995; 270 private com.google.cloud.compute.v1.DeprecationStatus deprecated_; 271 /** 272 * 273 * 274 * <pre> 275 * [Output Only] The deprecation status associated with this region. 276 * </pre> 277 * 278 * <code>optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;</code> 279 * 280 * @return Whether the deprecated field is set. 281 */ 282 @java.lang.Override hasDeprecated()283 public boolean hasDeprecated() { 284 return ((bitField0_ & 0x00000002) != 0); 285 } 286 /** 287 * 288 * 289 * <pre> 290 * [Output Only] The deprecation status associated with this region. 291 * </pre> 292 * 293 * <code>optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;</code> 294 * 295 * @return The deprecated. 296 */ 297 @java.lang.Override getDeprecated()298 public com.google.cloud.compute.v1.DeprecationStatus getDeprecated() { 299 return deprecated_ == null 300 ? com.google.cloud.compute.v1.DeprecationStatus.getDefaultInstance() 301 : deprecated_; 302 } 303 /** 304 * 305 * 306 * <pre> 307 * [Output Only] The deprecation status associated with this region. 308 * </pre> 309 * 310 * <code>optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;</code> 311 */ 312 @java.lang.Override getDeprecatedOrBuilder()313 public com.google.cloud.compute.v1.DeprecationStatusOrBuilder getDeprecatedOrBuilder() { 314 return deprecated_ == null 315 ? com.google.cloud.compute.v1.DeprecationStatus.getDefaultInstance() 316 : deprecated_; 317 } 318 319 public static final int DESCRIPTION_FIELD_NUMBER = 422937596; 320 321 @SuppressWarnings("serial") 322 private volatile java.lang.Object description_ = ""; 323 /** 324 * 325 * 326 * <pre> 327 * [Output Only] Textual description of the resource. 328 * </pre> 329 * 330 * <code>optional string description = 422937596;</code> 331 * 332 * @return Whether the description field is set. 333 */ 334 @java.lang.Override hasDescription()335 public boolean hasDescription() { 336 return ((bitField0_ & 0x00000004) != 0); 337 } 338 /** 339 * 340 * 341 * <pre> 342 * [Output Only] Textual description of the resource. 343 * </pre> 344 * 345 * <code>optional string description = 422937596;</code> 346 * 347 * @return The description. 348 */ 349 @java.lang.Override getDescription()350 public java.lang.String getDescription() { 351 java.lang.Object ref = description_; 352 if (ref instanceof java.lang.String) { 353 return (java.lang.String) ref; 354 } else { 355 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 356 java.lang.String s = bs.toStringUtf8(); 357 description_ = s; 358 return s; 359 } 360 } 361 /** 362 * 363 * 364 * <pre> 365 * [Output Only] Textual description of the resource. 366 * </pre> 367 * 368 * <code>optional string description = 422937596;</code> 369 * 370 * @return The bytes for description. 371 */ 372 @java.lang.Override getDescriptionBytes()373 public com.google.protobuf.ByteString getDescriptionBytes() { 374 java.lang.Object ref = description_; 375 if (ref instanceof java.lang.String) { 376 com.google.protobuf.ByteString b = 377 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 378 description_ = b; 379 return b; 380 } else { 381 return (com.google.protobuf.ByteString) ref; 382 } 383 } 384 385 public static final int ID_FIELD_NUMBER = 3355; 386 private long id_ = 0L; 387 /** 388 * 389 * 390 * <pre> 391 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 392 * </pre> 393 * 394 * <code>optional uint64 id = 3355;</code> 395 * 396 * @return Whether the id field is set. 397 */ 398 @java.lang.Override hasId()399 public boolean hasId() { 400 return ((bitField0_ & 0x00000008) != 0); 401 } 402 /** 403 * 404 * 405 * <pre> 406 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 407 * </pre> 408 * 409 * <code>optional uint64 id = 3355;</code> 410 * 411 * @return The id. 412 */ 413 @java.lang.Override getId()414 public long getId() { 415 return id_; 416 } 417 418 public static final int KIND_FIELD_NUMBER = 3292052; 419 420 @SuppressWarnings("serial") 421 private volatile java.lang.Object kind_ = ""; 422 /** 423 * 424 * 425 * <pre> 426 * [Output Only] Type of the resource. Always compute#region for regions. 427 * </pre> 428 * 429 * <code>optional string kind = 3292052;</code> 430 * 431 * @return Whether the kind field is set. 432 */ 433 @java.lang.Override hasKind()434 public boolean hasKind() { 435 return ((bitField0_ & 0x00000010) != 0); 436 } 437 /** 438 * 439 * 440 * <pre> 441 * [Output Only] Type of the resource. Always compute#region for regions. 442 * </pre> 443 * 444 * <code>optional string kind = 3292052;</code> 445 * 446 * @return The kind. 447 */ 448 @java.lang.Override getKind()449 public java.lang.String getKind() { 450 java.lang.Object ref = kind_; 451 if (ref instanceof java.lang.String) { 452 return (java.lang.String) ref; 453 } else { 454 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 455 java.lang.String s = bs.toStringUtf8(); 456 kind_ = s; 457 return s; 458 } 459 } 460 /** 461 * 462 * 463 * <pre> 464 * [Output Only] Type of the resource. Always compute#region for regions. 465 * </pre> 466 * 467 * <code>optional string kind = 3292052;</code> 468 * 469 * @return The bytes for kind. 470 */ 471 @java.lang.Override getKindBytes()472 public com.google.protobuf.ByteString getKindBytes() { 473 java.lang.Object ref = kind_; 474 if (ref instanceof java.lang.String) { 475 com.google.protobuf.ByteString b = 476 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 477 kind_ = b; 478 return b; 479 } else { 480 return (com.google.protobuf.ByteString) ref; 481 } 482 } 483 484 public static final int NAME_FIELD_NUMBER = 3373707; 485 486 @SuppressWarnings("serial") 487 private volatile java.lang.Object name_ = ""; 488 /** 489 * 490 * 491 * <pre> 492 * [Output Only] Name of the resource. 493 * </pre> 494 * 495 * <code>optional string name = 3373707;</code> 496 * 497 * @return Whether the name field is set. 498 */ 499 @java.lang.Override hasName()500 public boolean hasName() { 501 return ((bitField0_ & 0x00000020) != 0); 502 } 503 /** 504 * 505 * 506 * <pre> 507 * [Output Only] Name of the resource. 508 * </pre> 509 * 510 * <code>optional string name = 3373707;</code> 511 * 512 * @return The name. 513 */ 514 @java.lang.Override getName()515 public java.lang.String getName() { 516 java.lang.Object ref = name_; 517 if (ref instanceof java.lang.String) { 518 return (java.lang.String) ref; 519 } else { 520 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 521 java.lang.String s = bs.toStringUtf8(); 522 name_ = s; 523 return s; 524 } 525 } 526 /** 527 * 528 * 529 * <pre> 530 * [Output Only] Name of the resource. 531 * </pre> 532 * 533 * <code>optional string name = 3373707;</code> 534 * 535 * @return The bytes for name. 536 */ 537 @java.lang.Override getNameBytes()538 public com.google.protobuf.ByteString getNameBytes() { 539 java.lang.Object ref = name_; 540 if (ref instanceof java.lang.String) { 541 com.google.protobuf.ByteString b = 542 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 543 name_ = b; 544 return b; 545 } else { 546 return (com.google.protobuf.ByteString) ref; 547 } 548 } 549 550 public static final int QUOTAS_FIELD_NUMBER = 125341947; 551 552 @SuppressWarnings("serial") 553 private java.util.List<com.google.cloud.compute.v1.Quota> quotas_; 554 /** 555 * 556 * 557 * <pre> 558 * [Output Only] Quotas assigned to this region. 559 * </pre> 560 * 561 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 562 */ 563 @java.lang.Override getQuotasList()564 public java.util.List<com.google.cloud.compute.v1.Quota> getQuotasList() { 565 return quotas_; 566 } 567 /** 568 * 569 * 570 * <pre> 571 * [Output Only] Quotas assigned to this region. 572 * </pre> 573 * 574 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 575 */ 576 @java.lang.Override 577 public java.util.List<? extends com.google.cloud.compute.v1.QuotaOrBuilder> getQuotasOrBuilderList()578 getQuotasOrBuilderList() { 579 return quotas_; 580 } 581 /** 582 * 583 * 584 * <pre> 585 * [Output Only] Quotas assigned to this region. 586 * </pre> 587 * 588 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 589 */ 590 @java.lang.Override getQuotasCount()591 public int getQuotasCount() { 592 return quotas_.size(); 593 } 594 /** 595 * 596 * 597 * <pre> 598 * [Output Only] Quotas assigned to this region. 599 * </pre> 600 * 601 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 602 */ 603 @java.lang.Override getQuotas(int index)604 public com.google.cloud.compute.v1.Quota getQuotas(int index) { 605 return quotas_.get(index); 606 } 607 /** 608 * 609 * 610 * <pre> 611 * [Output Only] Quotas assigned to this region. 612 * </pre> 613 * 614 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 615 */ 616 @java.lang.Override getQuotasOrBuilder(int index)617 public com.google.cloud.compute.v1.QuotaOrBuilder getQuotasOrBuilder(int index) { 618 return quotas_.get(index); 619 } 620 621 public static final int SELF_LINK_FIELD_NUMBER = 456214797; 622 623 @SuppressWarnings("serial") 624 private volatile java.lang.Object selfLink_ = ""; 625 /** 626 * 627 * 628 * <pre> 629 * [Output Only] Server-defined URL for the resource. 630 * </pre> 631 * 632 * <code>optional string self_link = 456214797;</code> 633 * 634 * @return Whether the selfLink field is set. 635 */ 636 @java.lang.Override hasSelfLink()637 public boolean hasSelfLink() { 638 return ((bitField0_ & 0x00000040) != 0); 639 } 640 /** 641 * 642 * 643 * <pre> 644 * [Output Only] Server-defined URL for the resource. 645 * </pre> 646 * 647 * <code>optional string self_link = 456214797;</code> 648 * 649 * @return The selfLink. 650 */ 651 @java.lang.Override getSelfLink()652 public java.lang.String getSelfLink() { 653 java.lang.Object ref = selfLink_; 654 if (ref instanceof java.lang.String) { 655 return (java.lang.String) ref; 656 } else { 657 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 658 java.lang.String s = bs.toStringUtf8(); 659 selfLink_ = s; 660 return s; 661 } 662 } 663 /** 664 * 665 * 666 * <pre> 667 * [Output Only] Server-defined URL for the resource. 668 * </pre> 669 * 670 * <code>optional string self_link = 456214797;</code> 671 * 672 * @return The bytes for selfLink. 673 */ 674 @java.lang.Override getSelfLinkBytes()675 public com.google.protobuf.ByteString getSelfLinkBytes() { 676 java.lang.Object ref = selfLink_; 677 if (ref instanceof java.lang.String) { 678 com.google.protobuf.ByteString b = 679 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 680 selfLink_ = b; 681 return b; 682 } else { 683 return (com.google.protobuf.ByteString) ref; 684 } 685 } 686 687 public static final int STATUS_FIELD_NUMBER = 181260274; 688 689 @SuppressWarnings("serial") 690 private volatile java.lang.Object status_ = ""; 691 /** 692 * 693 * 694 * <pre> 695 * [Output Only] Status of the region, either UP or DOWN. 696 * Check the Status enum for the list of possible values. 697 * </pre> 698 * 699 * <code>optional string status = 181260274;</code> 700 * 701 * @return Whether the status field is set. 702 */ 703 @java.lang.Override hasStatus()704 public boolean hasStatus() { 705 return ((bitField0_ & 0x00000080) != 0); 706 } 707 /** 708 * 709 * 710 * <pre> 711 * [Output Only] Status of the region, either UP or DOWN. 712 * Check the Status enum for the list of possible values. 713 * </pre> 714 * 715 * <code>optional string status = 181260274;</code> 716 * 717 * @return The status. 718 */ 719 @java.lang.Override getStatus()720 public java.lang.String getStatus() { 721 java.lang.Object ref = status_; 722 if (ref instanceof java.lang.String) { 723 return (java.lang.String) ref; 724 } else { 725 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 726 java.lang.String s = bs.toStringUtf8(); 727 status_ = s; 728 return s; 729 } 730 } 731 /** 732 * 733 * 734 * <pre> 735 * [Output Only] Status of the region, either UP or DOWN. 736 * Check the Status enum for the list of possible values. 737 * </pre> 738 * 739 * <code>optional string status = 181260274;</code> 740 * 741 * @return The bytes for status. 742 */ 743 @java.lang.Override getStatusBytes()744 public com.google.protobuf.ByteString getStatusBytes() { 745 java.lang.Object ref = status_; 746 if (ref instanceof java.lang.String) { 747 com.google.protobuf.ByteString b = 748 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 749 status_ = b; 750 return b; 751 } else { 752 return (com.google.protobuf.ByteString) ref; 753 } 754 } 755 756 public static final int SUPPORTS_PZS_FIELD_NUMBER = 83983214; 757 private boolean supportsPzs_ = false; 758 /** 759 * 760 * 761 * <pre> 762 * [Output Only] Reserved for future use. 763 * </pre> 764 * 765 * <code>optional bool supports_pzs = 83983214;</code> 766 * 767 * @return Whether the supportsPzs field is set. 768 */ 769 @java.lang.Override hasSupportsPzs()770 public boolean hasSupportsPzs() { 771 return ((bitField0_ & 0x00000100) != 0); 772 } 773 /** 774 * 775 * 776 * <pre> 777 * [Output Only] Reserved for future use. 778 * </pre> 779 * 780 * <code>optional bool supports_pzs = 83983214;</code> 781 * 782 * @return The supportsPzs. 783 */ 784 @java.lang.Override getSupportsPzs()785 public boolean getSupportsPzs() { 786 return supportsPzs_; 787 } 788 789 public static final int ZONES_FIELD_NUMBER = 116085319; 790 791 @SuppressWarnings("serial") 792 private com.google.protobuf.LazyStringList zones_; 793 /** 794 * 795 * 796 * <pre> 797 * [Output Only] A list of zones available in this region, in the form of resource URLs. 798 * </pre> 799 * 800 * <code>repeated string zones = 116085319;</code> 801 * 802 * @return A list containing the zones. 803 */ getZonesList()804 public com.google.protobuf.ProtocolStringList getZonesList() { 805 return zones_; 806 } 807 /** 808 * 809 * 810 * <pre> 811 * [Output Only] A list of zones available in this region, in the form of resource URLs. 812 * </pre> 813 * 814 * <code>repeated string zones = 116085319;</code> 815 * 816 * @return The count of zones. 817 */ getZonesCount()818 public int getZonesCount() { 819 return zones_.size(); 820 } 821 /** 822 * 823 * 824 * <pre> 825 * [Output Only] A list of zones available in this region, in the form of resource URLs. 826 * </pre> 827 * 828 * <code>repeated string zones = 116085319;</code> 829 * 830 * @param index The index of the element to return. 831 * @return The zones at the given index. 832 */ getZones(int index)833 public java.lang.String getZones(int index) { 834 return zones_.get(index); 835 } 836 /** 837 * 838 * 839 * <pre> 840 * [Output Only] A list of zones available in this region, in the form of resource URLs. 841 * </pre> 842 * 843 * <code>repeated string zones = 116085319;</code> 844 * 845 * @param index The index of the value to return. 846 * @return The bytes of the zones at the given index. 847 */ getZonesBytes(int index)848 public com.google.protobuf.ByteString getZonesBytes(int index) { 849 return zones_.getByteString(index); 850 } 851 852 private byte memoizedIsInitialized = -1; 853 854 @java.lang.Override isInitialized()855 public final boolean isInitialized() { 856 byte isInitialized = memoizedIsInitialized; 857 if (isInitialized == 1) return true; 858 if (isInitialized == 0) return false; 859 860 memoizedIsInitialized = 1; 861 return true; 862 } 863 864 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)865 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 866 if (((bitField0_ & 0x00000008) != 0)) { 867 output.writeUInt64(3355, id_); 868 } 869 if (((bitField0_ & 0x00000010) != 0)) { 870 com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_); 871 } 872 if (((bitField0_ & 0x00000020) != 0)) { 873 com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_); 874 } 875 if (((bitField0_ & 0x00000001) != 0)) { 876 com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_); 877 } 878 if (((bitField0_ & 0x00000100) != 0)) { 879 output.writeBool(83983214, supportsPzs_); 880 } 881 for (int i = 0; i < zones_.size(); i++) { 882 com.google.protobuf.GeneratedMessageV3.writeString(output, 116085319, zones_.getRaw(i)); 883 } 884 for (int i = 0; i < quotas_.size(); i++) { 885 output.writeMessage(125341947, quotas_.get(i)); 886 } 887 if (((bitField0_ & 0x00000080) != 0)) { 888 com.google.protobuf.GeneratedMessageV3.writeString(output, 181260274, status_); 889 } 890 if (((bitField0_ & 0x00000004) != 0)) { 891 com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); 892 } 893 if (((bitField0_ & 0x00000040) != 0)) { 894 com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); 895 } 896 if (((bitField0_ & 0x00000002) != 0)) { 897 output.writeMessage(515138995, getDeprecated()); 898 } 899 getUnknownFields().writeTo(output); 900 } 901 902 @java.lang.Override getSerializedSize()903 public int getSerializedSize() { 904 int size = memoizedSize; 905 if (size != -1) return size; 906 907 size = 0; 908 if (((bitField0_ & 0x00000008) != 0)) { 909 size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_); 910 } 911 if (((bitField0_ & 0x00000010) != 0)) { 912 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_); 913 } 914 if (((bitField0_ & 0x00000020) != 0)) { 915 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_); 916 } 917 if (((bitField0_ & 0x00000001) != 0)) { 918 size += 919 com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_); 920 } 921 if (((bitField0_ & 0x00000100) != 0)) { 922 size += com.google.protobuf.CodedOutputStream.computeBoolSize(83983214, supportsPzs_); 923 } 924 { 925 int dataSize = 0; 926 for (int i = 0; i < zones_.size(); i++) { 927 dataSize += computeStringSizeNoTag(zones_.getRaw(i)); 928 } 929 size += dataSize; 930 size += 5 * getZonesList().size(); 931 } 932 for (int i = 0; i < quotas_.size(); i++) { 933 size += com.google.protobuf.CodedOutputStream.computeMessageSize(125341947, quotas_.get(i)); 934 } 935 if (((bitField0_ & 0x00000080) != 0)) { 936 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(181260274, status_); 937 } 938 if (((bitField0_ & 0x00000004) != 0)) { 939 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); 940 } 941 if (((bitField0_ & 0x00000040) != 0)) { 942 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); 943 } 944 if (((bitField0_ & 0x00000002) != 0)) { 945 size += com.google.protobuf.CodedOutputStream.computeMessageSize(515138995, getDeprecated()); 946 } 947 size += getUnknownFields().getSerializedSize(); 948 memoizedSize = size; 949 return size; 950 } 951 952 @java.lang.Override equals(final java.lang.Object obj)953 public boolean equals(final java.lang.Object obj) { 954 if (obj == this) { 955 return true; 956 } 957 if (!(obj instanceof com.google.cloud.compute.v1.Region)) { 958 return super.equals(obj); 959 } 960 com.google.cloud.compute.v1.Region other = (com.google.cloud.compute.v1.Region) obj; 961 962 if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false; 963 if (hasCreationTimestamp()) { 964 if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false; 965 } 966 if (hasDeprecated() != other.hasDeprecated()) return false; 967 if (hasDeprecated()) { 968 if (!getDeprecated().equals(other.getDeprecated())) return false; 969 } 970 if (hasDescription() != other.hasDescription()) return false; 971 if (hasDescription()) { 972 if (!getDescription().equals(other.getDescription())) return false; 973 } 974 if (hasId() != other.hasId()) return false; 975 if (hasId()) { 976 if (getId() != other.getId()) return false; 977 } 978 if (hasKind() != other.hasKind()) return false; 979 if (hasKind()) { 980 if (!getKind().equals(other.getKind())) return false; 981 } 982 if (hasName() != other.hasName()) return false; 983 if (hasName()) { 984 if (!getName().equals(other.getName())) return false; 985 } 986 if (!getQuotasList().equals(other.getQuotasList())) return false; 987 if (hasSelfLink() != other.hasSelfLink()) return false; 988 if (hasSelfLink()) { 989 if (!getSelfLink().equals(other.getSelfLink())) return false; 990 } 991 if (hasStatus() != other.hasStatus()) return false; 992 if (hasStatus()) { 993 if (!getStatus().equals(other.getStatus())) return false; 994 } 995 if (hasSupportsPzs() != other.hasSupportsPzs()) return false; 996 if (hasSupportsPzs()) { 997 if (getSupportsPzs() != other.getSupportsPzs()) return false; 998 } 999 if (!getZonesList().equals(other.getZonesList())) return false; 1000 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1001 return true; 1002 } 1003 1004 @java.lang.Override hashCode()1005 public int hashCode() { 1006 if (memoizedHashCode != 0) { 1007 return memoizedHashCode; 1008 } 1009 int hash = 41; 1010 hash = (19 * hash) + getDescriptor().hashCode(); 1011 if (hasCreationTimestamp()) { 1012 hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER; 1013 hash = (53 * hash) + getCreationTimestamp().hashCode(); 1014 } 1015 if (hasDeprecated()) { 1016 hash = (37 * hash) + DEPRECATED_FIELD_NUMBER; 1017 hash = (53 * hash) + getDeprecated().hashCode(); 1018 } 1019 if (hasDescription()) { 1020 hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; 1021 hash = (53 * hash) + getDescription().hashCode(); 1022 } 1023 if (hasId()) { 1024 hash = (37 * hash) + ID_FIELD_NUMBER; 1025 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId()); 1026 } 1027 if (hasKind()) { 1028 hash = (37 * hash) + KIND_FIELD_NUMBER; 1029 hash = (53 * hash) + getKind().hashCode(); 1030 } 1031 if (hasName()) { 1032 hash = (37 * hash) + NAME_FIELD_NUMBER; 1033 hash = (53 * hash) + getName().hashCode(); 1034 } 1035 if (getQuotasCount() > 0) { 1036 hash = (37 * hash) + QUOTAS_FIELD_NUMBER; 1037 hash = (53 * hash) + getQuotasList().hashCode(); 1038 } 1039 if (hasSelfLink()) { 1040 hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; 1041 hash = (53 * hash) + getSelfLink().hashCode(); 1042 } 1043 if (hasStatus()) { 1044 hash = (37 * hash) + STATUS_FIELD_NUMBER; 1045 hash = (53 * hash) + getStatus().hashCode(); 1046 } 1047 if (hasSupportsPzs()) { 1048 hash = (37 * hash) + SUPPORTS_PZS_FIELD_NUMBER; 1049 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSupportsPzs()); 1050 } 1051 if (getZonesCount() > 0) { 1052 hash = (37 * hash) + ZONES_FIELD_NUMBER; 1053 hash = (53 * hash) + getZonesList().hashCode(); 1054 } 1055 hash = (29 * hash) + getUnknownFields().hashCode(); 1056 memoizedHashCode = hash; 1057 return hash; 1058 } 1059 parseFrom(java.nio.ByteBuffer data)1060 public static com.google.cloud.compute.v1.Region parseFrom(java.nio.ByteBuffer data) 1061 throws com.google.protobuf.InvalidProtocolBufferException { 1062 return PARSER.parseFrom(data); 1063 } 1064 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1065 public static com.google.cloud.compute.v1.Region parseFrom( 1066 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1067 throws com.google.protobuf.InvalidProtocolBufferException { 1068 return PARSER.parseFrom(data, extensionRegistry); 1069 } 1070 parseFrom(com.google.protobuf.ByteString data)1071 public static com.google.cloud.compute.v1.Region parseFrom(com.google.protobuf.ByteString data) 1072 throws com.google.protobuf.InvalidProtocolBufferException { 1073 return PARSER.parseFrom(data); 1074 } 1075 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1076 public static com.google.cloud.compute.v1.Region parseFrom( 1077 com.google.protobuf.ByteString data, 1078 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1079 throws com.google.protobuf.InvalidProtocolBufferException { 1080 return PARSER.parseFrom(data, extensionRegistry); 1081 } 1082 parseFrom(byte[] data)1083 public static com.google.cloud.compute.v1.Region parseFrom(byte[] data) 1084 throws com.google.protobuf.InvalidProtocolBufferException { 1085 return PARSER.parseFrom(data); 1086 } 1087 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1088 public static com.google.cloud.compute.v1.Region parseFrom( 1089 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1090 throws com.google.protobuf.InvalidProtocolBufferException { 1091 return PARSER.parseFrom(data, extensionRegistry); 1092 } 1093 parseFrom(java.io.InputStream input)1094 public static com.google.cloud.compute.v1.Region parseFrom(java.io.InputStream input) 1095 throws java.io.IOException { 1096 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1097 } 1098 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1099 public static com.google.cloud.compute.v1.Region parseFrom( 1100 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1101 throws java.io.IOException { 1102 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1103 PARSER, input, extensionRegistry); 1104 } 1105 parseDelimitedFrom(java.io.InputStream input)1106 public static com.google.cloud.compute.v1.Region parseDelimitedFrom(java.io.InputStream input) 1107 throws java.io.IOException { 1108 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1109 } 1110 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1111 public static com.google.cloud.compute.v1.Region parseDelimitedFrom( 1112 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1113 throws java.io.IOException { 1114 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1115 PARSER, input, extensionRegistry); 1116 } 1117 parseFrom( com.google.protobuf.CodedInputStream input)1118 public static com.google.cloud.compute.v1.Region parseFrom( 1119 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1120 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1121 } 1122 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1123 public static com.google.cloud.compute.v1.Region parseFrom( 1124 com.google.protobuf.CodedInputStream input, 1125 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1126 throws java.io.IOException { 1127 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1128 PARSER, input, extensionRegistry); 1129 } 1130 1131 @java.lang.Override newBuilderForType()1132 public Builder newBuilderForType() { 1133 return newBuilder(); 1134 } 1135 newBuilder()1136 public static Builder newBuilder() { 1137 return DEFAULT_INSTANCE.toBuilder(); 1138 } 1139 newBuilder(com.google.cloud.compute.v1.Region prototype)1140 public static Builder newBuilder(com.google.cloud.compute.v1.Region prototype) { 1141 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1142 } 1143 1144 @java.lang.Override toBuilder()1145 public Builder toBuilder() { 1146 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1147 } 1148 1149 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1150 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1151 Builder builder = new Builder(parent); 1152 return builder; 1153 } 1154 /** 1155 * 1156 * 1157 * <pre> 1158 * Represents a Region resource. A region is a geographical area where a resource is located. For more information, read Regions and Zones. 1159 * </pre> 1160 * 1161 * Protobuf type {@code google.cloud.compute.v1.Region} 1162 */ 1163 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1164 implements 1165 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.Region) 1166 com.google.cloud.compute.v1.RegionOrBuilder { getDescriptor()1167 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1168 return com.google.cloud.compute.v1.Compute 1169 .internal_static_google_cloud_compute_v1_Region_descriptor; 1170 } 1171 1172 @java.lang.Override 1173 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1174 internalGetFieldAccessorTable() { 1175 return com.google.cloud.compute.v1.Compute 1176 .internal_static_google_cloud_compute_v1_Region_fieldAccessorTable 1177 .ensureFieldAccessorsInitialized( 1178 com.google.cloud.compute.v1.Region.class, 1179 com.google.cloud.compute.v1.Region.Builder.class); 1180 } 1181 1182 // Construct using com.google.cloud.compute.v1.Region.newBuilder() Builder()1183 private Builder() { 1184 maybeForceBuilderInitialization(); 1185 } 1186 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1187 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1188 super(parent); 1189 maybeForceBuilderInitialization(); 1190 } 1191 maybeForceBuilderInitialization()1192 private void maybeForceBuilderInitialization() { 1193 if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { 1194 getDeprecatedFieldBuilder(); 1195 getQuotasFieldBuilder(); 1196 } 1197 } 1198 1199 @java.lang.Override clear()1200 public Builder clear() { 1201 super.clear(); 1202 bitField0_ = 0; 1203 creationTimestamp_ = ""; 1204 deprecated_ = null; 1205 if (deprecatedBuilder_ != null) { 1206 deprecatedBuilder_.dispose(); 1207 deprecatedBuilder_ = null; 1208 } 1209 description_ = ""; 1210 id_ = 0L; 1211 kind_ = ""; 1212 name_ = ""; 1213 if (quotasBuilder_ == null) { 1214 quotas_ = java.util.Collections.emptyList(); 1215 } else { 1216 quotas_ = null; 1217 quotasBuilder_.clear(); 1218 } 1219 bitField0_ = (bitField0_ & ~0x00000040); 1220 selfLink_ = ""; 1221 status_ = ""; 1222 supportsPzs_ = false; 1223 zones_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1224 bitField0_ = (bitField0_ & ~0x00000400); 1225 return this; 1226 } 1227 1228 @java.lang.Override getDescriptorForType()1229 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1230 return com.google.cloud.compute.v1.Compute 1231 .internal_static_google_cloud_compute_v1_Region_descriptor; 1232 } 1233 1234 @java.lang.Override getDefaultInstanceForType()1235 public com.google.cloud.compute.v1.Region getDefaultInstanceForType() { 1236 return com.google.cloud.compute.v1.Region.getDefaultInstance(); 1237 } 1238 1239 @java.lang.Override build()1240 public com.google.cloud.compute.v1.Region build() { 1241 com.google.cloud.compute.v1.Region result = buildPartial(); 1242 if (!result.isInitialized()) { 1243 throw newUninitializedMessageException(result); 1244 } 1245 return result; 1246 } 1247 1248 @java.lang.Override buildPartial()1249 public com.google.cloud.compute.v1.Region buildPartial() { 1250 com.google.cloud.compute.v1.Region result = new com.google.cloud.compute.v1.Region(this); 1251 buildPartialRepeatedFields(result); 1252 if (bitField0_ != 0) { 1253 buildPartial0(result); 1254 } 1255 onBuilt(); 1256 return result; 1257 } 1258 buildPartialRepeatedFields(com.google.cloud.compute.v1.Region result)1259 private void buildPartialRepeatedFields(com.google.cloud.compute.v1.Region result) { 1260 if (quotasBuilder_ == null) { 1261 if (((bitField0_ & 0x00000040) != 0)) { 1262 quotas_ = java.util.Collections.unmodifiableList(quotas_); 1263 bitField0_ = (bitField0_ & ~0x00000040); 1264 } 1265 result.quotas_ = quotas_; 1266 } else { 1267 result.quotas_ = quotasBuilder_.build(); 1268 } 1269 if (((bitField0_ & 0x00000400) != 0)) { 1270 zones_ = zones_.getUnmodifiableView(); 1271 bitField0_ = (bitField0_ & ~0x00000400); 1272 } 1273 result.zones_ = zones_; 1274 } 1275 buildPartial0(com.google.cloud.compute.v1.Region result)1276 private void buildPartial0(com.google.cloud.compute.v1.Region result) { 1277 int from_bitField0_ = bitField0_; 1278 int to_bitField0_ = 0; 1279 if (((from_bitField0_ & 0x00000001) != 0)) { 1280 result.creationTimestamp_ = creationTimestamp_; 1281 to_bitField0_ |= 0x00000001; 1282 } 1283 if (((from_bitField0_ & 0x00000002) != 0)) { 1284 result.deprecated_ = deprecatedBuilder_ == null ? deprecated_ : deprecatedBuilder_.build(); 1285 to_bitField0_ |= 0x00000002; 1286 } 1287 if (((from_bitField0_ & 0x00000004) != 0)) { 1288 result.description_ = description_; 1289 to_bitField0_ |= 0x00000004; 1290 } 1291 if (((from_bitField0_ & 0x00000008) != 0)) { 1292 result.id_ = id_; 1293 to_bitField0_ |= 0x00000008; 1294 } 1295 if (((from_bitField0_ & 0x00000010) != 0)) { 1296 result.kind_ = kind_; 1297 to_bitField0_ |= 0x00000010; 1298 } 1299 if (((from_bitField0_ & 0x00000020) != 0)) { 1300 result.name_ = name_; 1301 to_bitField0_ |= 0x00000020; 1302 } 1303 if (((from_bitField0_ & 0x00000080) != 0)) { 1304 result.selfLink_ = selfLink_; 1305 to_bitField0_ |= 0x00000040; 1306 } 1307 if (((from_bitField0_ & 0x00000100) != 0)) { 1308 result.status_ = status_; 1309 to_bitField0_ |= 0x00000080; 1310 } 1311 if (((from_bitField0_ & 0x00000200) != 0)) { 1312 result.supportsPzs_ = supportsPzs_; 1313 to_bitField0_ |= 0x00000100; 1314 } 1315 result.bitField0_ |= to_bitField0_; 1316 } 1317 1318 @java.lang.Override clone()1319 public Builder clone() { 1320 return super.clone(); 1321 } 1322 1323 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1324 public Builder setField( 1325 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1326 return super.setField(field, value); 1327 } 1328 1329 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1330 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1331 return super.clearField(field); 1332 } 1333 1334 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1335 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1336 return super.clearOneof(oneof); 1337 } 1338 1339 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1340 public Builder setRepeatedField( 1341 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1342 return super.setRepeatedField(field, index, value); 1343 } 1344 1345 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1346 public Builder addRepeatedField( 1347 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1348 return super.addRepeatedField(field, value); 1349 } 1350 1351 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1352 public Builder mergeFrom(com.google.protobuf.Message other) { 1353 if (other instanceof com.google.cloud.compute.v1.Region) { 1354 return mergeFrom((com.google.cloud.compute.v1.Region) other); 1355 } else { 1356 super.mergeFrom(other); 1357 return this; 1358 } 1359 } 1360 mergeFrom(com.google.cloud.compute.v1.Region other)1361 public Builder mergeFrom(com.google.cloud.compute.v1.Region other) { 1362 if (other == com.google.cloud.compute.v1.Region.getDefaultInstance()) return this; 1363 if (other.hasCreationTimestamp()) { 1364 creationTimestamp_ = other.creationTimestamp_; 1365 bitField0_ |= 0x00000001; 1366 onChanged(); 1367 } 1368 if (other.hasDeprecated()) { 1369 mergeDeprecated(other.getDeprecated()); 1370 } 1371 if (other.hasDescription()) { 1372 description_ = other.description_; 1373 bitField0_ |= 0x00000004; 1374 onChanged(); 1375 } 1376 if (other.hasId()) { 1377 setId(other.getId()); 1378 } 1379 if (other.hasKind()) { 1380 kind_ = other.kind_; 1381 bitField0_ |= 0x00000010; 1382 onChanged(); 1383 } 1384 if (other.hasName()) { 1385 name_ = other.name_; 1386 bitField0_ |= 0x00000020; 1387 onChanged(); 1388 } 1389 if (quotasBuilder_ == null) { 1390 if (!other.quotas_.isEmpty()) { 1391 if (quotas_.isEmpty()) { 1392 quotas_ = other.quotas_; 1393 bitField0_ = (bitField0_ & ~0x00000040); 1394 } else { 1395 ensureQuotasIsMutable(); 1396 quotas_.addAll(other.quotas_); 1397 } 1398 onChanged(); 1399 } 1400 } else { 1401 if (!other.quotas_.isEmpty()) { 1402 if (quotasBuilder_.isEmpty()) { 1403 quotasBuilder_.dispose(); 1404 quotasBuilder_ = null; 1405 quotas_ = other.quotas_; 1406 bitField0_ = (bitField0_ & ~0x00000040); 1407 quotasBuilder_ = 1408 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1409 ? getQuotasFieldBuilder() 1410 : null; 1411 } else { 1412 quotasBuilder_.addAllMessages(other.quotas_); 1413 } 1414 } 1415 } 1416 if (other.hasSelfLink()) { 1417 selfLink_ = other.selfLink_; 1418 bitField0_ |= 0x00000080; 1419 onChanged(); 1420 } 1421 if (other.hasStatus()) { 1422 status_ = other.status_; 1423 bitField0_ |= 0x00000100; 1424 onChanged(); 1425 } 1426 if (other.hasSupportsPzs()) { 1427 setSupportsPzs(other.getSupportsPzs()); 1428 } 1429 if (!other.zones_.isEmpty()) { 1430 if (zones_.isEmpty()) { 1431 zones_ = other.zones_; 1432 bitField0_ = (bitField0_ & ~0x00000400); 1433 } else { 1434 ensureZonesIsMutable(); 1435 zones_.addAll(other.zones_); 1436 } 1437 onChanged(); 1438 } 1439 this.mergeUnknownFields(other.getUnknownFields()); 1440 onChanged(); 1441 return this; 1442 } 1443 1444 @java.lang.Override isInitialized()1445 public final boolean isInitialized() { 1446 return true; 1447 } 1448 1449 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1450 public Builder mergeFrom( 1451 com.google.protobuf.CodedInputStream input, 1452 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1453 throws java.io.IOException { 1454 if (extensionRegistry == null) { 1455 throw new java.lang.NullPointerException(); 1456 } 1457 try { 1458 boolean done = false; 1459 while (!done) { 1460 int tag = input.readTag(); 1461 switch (tag) { 1462 case 0: 1463 done = true; 1464 break; 1465 case 26840: 1466 { 1467 id_ = input.readUInt64(); 1468 bitField0_ |= 0x00000008; 1469 break; 1470 } // case 26840 1471 case 26336418: 1472 { 1473 kind_ = input.readStringRequireUtf8(); 1474 bitField0_ |= 0x00000010; 1475 break; 1476 } // case 26336418 1477 case 26989658: 1478 { 1479 name_ = input.readStringRequireUtf8(); 1480 bitField0_ |= 0x00000020; 1481 break; 1482 } // case 26989658 1483 case 244202930: 1484 { 1485 creationTimestamp_ = input.readStringRequireUtf8(); 1486 bitField0_ |= 0x00000001; 1487 break; 1488 } // case 244202930 1489 case 671865712: 1490 { 1491 supportsPzs_ = input.readBool(); 1492 bitField0_ |= 0x00000200; 1493 break; 1494 } // case 671865712 1495 case 928682554: 1496 { 1497 java.lang.String s = input.readStringRequireUtf8(); 1498 ensureZonesIsMutable(); 1499 zones_.add(s); 1500 break; 1501 } // case 928682554 1502 case 1002735578: 1503 { 1504 com.google.cloud.compute.v1.Quota m = 1505 input.readMessage( 1506 com.google.cloud.compute.v1.Quota.parser(), extensionRegistry); 1507 if (quotasBuilder_ == null) { 1508 ensureQuotasIsMutable(); 1509 quotas_.add(m); 1510 } else { 1511 quotasBuilder_.addMessage(m); 1512 } 1513 break; 1514 } // case 1002735578 1515 case 1450082194: 1516 { 1517 status_ = input.readStringRequireUtf8(); 1518 bitField0_ |= 0x00000100; 1519 break; 1520 } // case 1450082194 1521 case -911466526: 1522 { 1523 description_ = input.readStringRequireUtf8(); 1524 bitField0_ |= 0x00000004; 1525 break; 1526 } // case -911466526 1527 case -645248918: 1528 { 1529 selfLink_ = input.readStringRequireUtf8(); 1530 bitField0_ |= 0x00000080; 1531 break; 1532 } // case -645248918 1533 case -173855334: 1534 { 1535 input.readMessage(getDeprecatedFieldBuilder().getBuilder(), extensionRegistry); 1536 bitField0_ |= 0x00000002; 1537 break; 1538 } // case -173855334 1539 default: 1540 { 1541 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1542 done = true; // was an endgroup tag 1543 } 1544 break; 1545 } // default: 1546 } // switch (tag) 1547 } // while (!done) 1548 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1549 throw e.unwrapIOException(); 1550 } finally { 1551 onChanged(); 1552 } // finally 1553 return this; 1554 } 1555 1556 private int bitField0_; 1557 1558 private java.lang.Object creationTimestamp_ = ""; 1559 /** 1560 * 1561 * 1562 * <pre> 1563 * [Output Only] Creation timestamp in RFC3339 text format. 1564 * </pre> 1565 * 1566 * <code>optional string creation_timestamp = 30525366;</code> 1567 * 1568 * @return Whether the creationTimestamp field is set. 1569 */ hasCreationTimestamp()1570 public boolean hasCreationTimestamp() { 1571 return ((bitField0_ & 0x00000001) != 0); 1572 } 1573 /** 1574 * 1575 * 1576 * <pre> 1577 * [Output Only] Creation timestamp in RFC3339 text format. 1578 * </pre> 1579 * 1580 * <code>optional string creation_timestamp = 30525366;</code> 1581 * 1582 * @return The creationTimestamp. 1583 */ getCreationTimestamp()1584 public java.lang.String getCreationTimestamp() { 1585 java.lang.Object ref = creationTimestamp_; 1586 if (!(ref instanceof java.lang.String)) { 1587 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1588 java.lang.String s = bs.toStringUtf8(); 1589 creationTimestamp_ = s; 1590 return s; 1591 } else { 1592 return (java.lang.String) ref; 1593 } 1594 } 1595 /** 1596 * 1597 * 1598 * <pre> 1599 * [Output Only] Creation timestamp in RFC3339 text format. 1600 * </pre> 1601 * 1602 * <code>optional string creation_timestamp = 30525366;</code> 1603 * 1604 * @return The bytes for creationTimestamp. 1605 */ getCreationTimestampBytes()1606 public com.google.protobuf.ByteString getCreationTimestampBytes() { 1607 java.lang.Object ref = creationTimestamp_; 1608 if (ref instanceof String) { 1609 com.google.protobuf.ByteString b = 1610 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1611 creationTimestamp_ = b; 1612 return b; 1613 } else { 1614 return (com.google.protobuf.ByteString) ref; 1615 } 1616 } 1617 /** 1618 * 1619 * 1620 * <pre> 1621 * [Output Only] Creation timestamp in RFC3339 text format. 1622 * </pre> 1623 * 1624 * <code>optional string creation_timestamp = 30525366;</code> 1625 * 1626 * @param value The creationTimestamp to set. 1627 * @return This builder for chaining. 1628 */ setCreationTimestamp(java.lang.String value)1629 public Builder setCreationTimestamp(java.lang.String value) { 1630 if (value == null) { 1631 throw new NullPointerException(); 1632 } 1633 creationTimestamp_ = value; 1634 bitField0_ |= 0x00000001; 1635 onChanged(); 1636 return this; 1637 } 1638 /** 1639 * 1640 * 1641 * <pre> 1642 * [Output Only] Creation timestamp in RFC3339 text format. 1643 * </pre> 1644 * 1645 * <code>optional string creation_timestamp = 30525366;</code> 1646 * 1647 * @return This builder for chaining. 1648 */ clearCreationTimestamp()1649 public Builder clearCreationTimestamp() { 1650 creationTimestamp_ = getDefaultInstance().getCreationTimestamp(); 1651 bitField0_ = (bitField0_ & ~0x00000001); 1652 onChanged(); 1653 return this; 1654 } 1655 /** 1656 * 1657 * 1658 * <pre> 1659 * [Output Only] Creation timestamp in RFC3339 text format. 1660 * </pre> 1661 * 1662 * <code>optional string creation_timestamp = 30525366;</code> 1663 * 1664 * @param value The bytes for creationTimestamp to set. 1665 * @return This builder for chaining. 1666 */ setCreationTimestampBytes(com.google.protobuf.ByteString value)1667 public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) { 1668 if (value == null) { 1669 throw new NullPointerException(); 1670 } 1671 checkByteStringIsUtf8(value); 1672 creationTimestamp_ = value; 1673 bitField0_ |= 0x00000001; 1674 onChanged(); 1675 return this; 1676 } 1677 1678 private com.google.cloud.compute.v1.DeprecationStatus deprecated_; 1679 private com.google.protobuf.SingleFieldBuilderV3< 1680 com.google.cloud.compute.v1.DeprecationStatus, 1681 com.google.cloud.compute.v1.DeprecationStatus.Builder, 1682 com.google.cloud.compute.v1.DeprecationStatusOrBuilder> 1683 deprecatedBuilder_; 1684 /** 1685 * 1686 * 1687 * <pre> 1688 * [Output Only] The deprecation status associated with this region. 1689 * </pre> 1690 * 1691 * <code>optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;</code> 1692 * 1693 * @return Whether the deprecated field is set. 1694 */ hasDeprecated()1695 public boolean hasDeprecated() { 1696 return ((bitField0_ & 0x00000002) != 0); 1697 } 1698 /** 1699 * 1700 * 1701 * <pre> 1702 * [Output Only] The deprecation status associated with this region. 1703 * </pre> 1704 * 1705 * <code>optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;</code> 1706 * 1707 * @return The deprecated. 1708 */ getDeprecated()1709 public com.google.cloud.compute.v1.DeprecationStatus getDeprecated() { 1710 if (deprecatedBuilder_ == null) { 1711 return deprecated_ == null 1712 ? com.google.cloud.compute.v1.DeprecationStatus.getDefaultInstance() 1713 : deprecated_; 1714 } else { 1715 return deprecatedBuilder_.getMessage(); 1716 } 1717 } 1718 /** 1719 * 1720 * 1721 * <pre> 1722 * [Output Only] The deprecation status associated with this region. 1723 * </pre> 1724 * 1725 * <code>optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;</code> 1726 */ setDeprecated(com.google.cloud.compute.v1.DeprecationStatus value)1727 public Builder setDeprecated(com.google.cloud.compute.v1.DeprecationStatus value) { 1728 if (deprecatedBuilder_ == null) { 1729 if (value == null) { 1730 throw new NullPointerException(); 1731 } 1732 deprecated_ = value; 1733 } else { 1734 deprecatedBuilder_.setMessage(value); 1735 } 1736 bitField0_ |= 0x00000002; 1737 onChanged(); 1738 return this; 1739 } 1740 /** 1741 * 1742 * 1743 * <pre> 1744 * [Output Only] The deprecation status associated with this region. 1745 * </pre> 1746 * 1747 * <code>optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;</code> 1748 */ setDeprecated( com.google.cloud.compute.v1.DeprecationStatus.Builder builderForValue)1749 public Builder setDeprecated( 1750 com.google.cloud.compute.v1.DeprecationStatus.Builder builderForValue) { 1751 if (deprecatedBuilder_ == null) { 1752 deprecated_ = builderForValue.build(); 1753 } else { 1754 deprecatedBuilder_.setMessage(builderForValue.build()); 1755 } 1756 bitField0_ |= 0x00000002; 1757 onChanged(); 1758 return this; 1759 } 1760 /** 1761 * 1762 * 1763 * <pre> 1764 * [Output Only] The deprecation status associated with this region. 1765 * </pre> 1766 * 1767 * <code>optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;</code> 1768 */ mergeDeprecated(com.google.cloud.compute.v1.DeprecationStatus value)1769 public Builder mergeDeprecated(com.google.cloud.compute.v1.DeprecationStatus value) { 1770 if (deprecatedBuilder_ == null) { 1771 if (((bitField0_ & 0x00000002) != 0) 1772 && deprecated_ != null 1773 && deprecated_ != com.google.cloud.compute.v1.DeprecationStatus.getDefaultInstance()) { 1774 getDeprecatedBuilder().mergeFrom(value); 1775 } else { 1776 deprecated_ = value; 1777 } 1778 } else { 1779 deprecatedBuilder_.mergeFrom(value); 1780 } 1781 bitField0_ |= 0x00000002; 1782 onChanged(); 1783 return this; 1784 } 1785 /** 1786 * 1787 * 1788 * <pre> 1789 * [Output Only] The deprecation status associated with this region. 1790 * </pre> 1791 * 1792 * <code>optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;</code> 1793 */ clearDeprecated()1794 public Builder clearDeprecated() { 1795 bitField0_ = (bitField0_ & ~0x00000002); 1796 deprecated_ = null; 1797 if (deprecatedBuilder_ != null) { 1798 deprecatedBuilder_.dispose(); 1799 deprecatedBuilder_ = null; 1800 } 1801 onChanged(); 1802 return this; 1803 } 1804 /** 1805 * 1806 * 1807 * <pre> 1808 * [Output Only] The deprecation status associated with this region. 1809 * </pre> 1810 * 1811 * <code>optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;</code> 1812 */ getDeprecatedBuilder()1813 public com.google.cloud.compute.v1.DeprecationStatus.Builder getDeprecatedBuilder() { 1814 bitField0_ |= 0x00000002; 1815 onChanged(); 1816 return getDeprecatedFieldBuilder().getBuilder(); 1817 } 1818 /** 1819 * 1820 * 1821 * <pre> 1822 * [Output Only] The deprecation status associated with this region. 1823 * </pre> 1824 * 1825 * <code>optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;</code> 1826 */ getDeprecatedOrBuilder()1827 public com.google.cloud.compute.v1.DeprecationStatusOrBuilder getDeprecatedOrBuilder() { 1828 if (deprecatedBuilder_ != null) { 1829 return deprecatedBuilder_.getMessageOrBuilder(); 1830 } else { 1831 return deprecated_ == null 1832 ? com.google.cloud.compute.v1.DeprecationStatus.getDefaultInstance() 1833 : deprecated_; 1834 } 1835 } 1836 /** 1837 * 1838 * 1839 * <pre> 1840 * [Output Only] The deprecation status associated with this region. 1841 * </pre> 1842 * 1843 * <code>optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;</code> 1844 */ 1845 private com.google.protobuf.SingleFieldBuilderV3< 1846 com.google.cloud.compute.v1.DeprecationStatus, 1847 com.google.cloud.compute.v1.DeprecationStatus.Builder, 1848 com.google.cloud.compute.v1.DeprecationStatusOrBuilder> getDeprecatedFieldBuilder()1849 getDeprecatedFieldBuilder() { 1850 if (deprecatedBuilder_ == null) { 1851 deprecatedBuilder_ = 1852 new com.google.protobuf.SingleFieldBuilderV3< 1853 com.google.cloud.compute.v1.DeprecationStatus, 1854 com.google.cloud.compute.v1.DeprecationStatus.Builder, 1855 com.google.cloud.compute.v1.DeprecationStatusOrBuilder>( 1856 getDeprecated(), getParentForChildren(), isClean()); 1857 deprecated_ = null; 1858 } 1859 return deprecatedBuilder_; 1860 } 1861 1862 private java.lang.Object description_ = ""; 1863 /** 1864 * 1865 * 1866 * <pre> 1867 * [Output Only] Textual description of the resource. 1868 * </pre> 1869 * 1870 * <code>optional string description = 422937596;</code> 1871 * 1872 * @return Whether the description field is set. 1873 */ hasDescription()1874 public boolean hasDescription() { 1875 return ((bitField0_ & 0x00000004) != 0); 1876 } 1877 /** 1878 * 1879 * 1880 * <pre> 1881 * [Output Only] Textual description of the resource. 1882 * </pre> 1883 * 1884 * <code>optional string description = 422937596;</code> 1885 * 1886 * @return The description. 1887 */ getDescription()1888 public java.lang.String getDescription() { 1889 java.lang.Object ref = description_; 1890 if (!(ref instanceof java.lang.String)) { 1891 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1892 java.lang.String s = bs.toStringUtf8(); 1893 description_ = s; 1894 return s; 1895 } else { 1896 return (java.lang.String) ref; 1897 } 1898 } 1899 /** 1900 * 1901 * 1902 * <pre> 1903 * [Output Only] Textual description of the resource. 1904 * </pre> 1905 * 1906 * <code>optional string description = 422937596;</code> 1907 * 1908 * @return The bytes for description. 1909 */ getDescriptionBytes()1910 public com.google.protobuf.ByteString getDescriptionBytes() { 1911 java.lang.Object ref = description_; 1912 if (ref instanceof String) { 1913 com.google.protobuf.ByteString b = 1914 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1915 description_ = b; 1916 return b; 1917 } else { 1918 return (com.google.protobuf.ByteString) ref; 1919 } 1920 } 1921 /** 1922 * 1923 * 1924 * <pre> 1925 * [Output Only] Textual description of the resource. 1926 * </pre> 1927 * 1928 * <code>optional string description = 422937596;</code> 1929 * 1930 * @param value The description to set. 1931 * @return This builder for chaining. 1932 */ setDescription(java.lang.String value)1933 public Builder setDescription(java.lang.String value) { 1934 if (value == null) { 1935 throw new NullPointerException(); 1936 } 1937 description_ = value; 1938 bitField0_ |= 0x00000004; 1939 onChanged(); 1940 return this; 1941 } 1942 /** 1943 * 1944 * 1945 * <pre> 1946 * [Output Only] Textual description of the resource. 1947 * </pre> 1948 * 1949 * <code>optional string description = 422937596;</code> 1950 * 1951 * @return This builder for chaining. 1952 */ clearDescription()1953 public Builder clearDescription() { 1954 description_ = getDefaultInstance().getDescription(); 1955 bitField0_ = (bitField0_ & ~0x00000004); 1956 onChanged(); 1957 return this; 1958 } 1959 /** 1960 * 1961 * 1962 * <pre> 1963 * [Output Only] Textual description of the resource. 1964 * </pre> 1965 * 1966 * <code>optional string description = 422937596;</code> 1967 * 1968 * @param value The bytes for description to set. 1969 * @return This builder for chaining. 1970 */ setDescriptionBytes(com.google.protobuf.ByteString value)1971 public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { 1972 if (value == null) { 1973 throw new NullPointerException(); 1974 } 1975 checkByteStringIsUtf8(value); 1976 description_ = value; 1977 bitField0_ |= 0x00000004; 1978 onChanged(); 1979 return this; 1980 } 1981 1982 private long id_; 1983 /** 1984 * 1985 * 1986 * <pre> 1987 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1988 * </pre> 1989 * 1990 * <code>optional uint64 id = 3355;</code> 1991 * 1992 * @return Whether the id field is set. 1993 */ 1994 @java.lang.Override hasId()1995 public boolean hasId() { 1996 return ((bitField0_ & 0x00000008) != 0); 1997 } 1998 /** 1999 * 2000 * 2001 * <pre> 2002 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 2003 * </pre> 2004 * 2005 * <code>optional uint64 id = 3355;</code> 2006 * 2007 * @return The id. 2008 */ 2009 @java.lang.Override getId()2010 public long getId() { 2011 return id_; 2012 } 2013 /** 2014 * 2015 * 2016 * <pre> 2017 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 2018 * </pre> 2019 * 2020 * <code>optional uint64 id = 3355;</code> 2021 * 2022 * @param value The id to set. 2023 * @return This builder for chaining. 2024 */ setId(long value)2025 public Builder setId(long value) { 2026 2027 id_ = value; 2028 bitField0_ |= 0x00000008; 2029 onChanged(); 2030 return this; 2031 } 2032 /** 2033 * 2034 * 2035 * <pre> 2036 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 2037 * </pre> 2038 * 2039 * <code>optional uint64 id = 3355;</code> 2040 * 2041 * @return This builder for chaining. 2042 */ clearId()2043 public Builder clearId() { 2044 bitField0_ = (bitField0_ & ~0x00000008); 2045 id_ = 0L; 2046 onChanged(); 2047 return this; 2048 } 2049 2050 private java.lang.Object kind_ = ""; 2051 /** 2052 * 2053 * 2054 * <pre> 2055 * [Output Only] Type of the resource. Always compute#region for regions. 2056 * </pre> 2057 * 2058 * <code>optional string kind = 3292052;</code> 2059 * 2060 * @return Whether the kind field is set. 2061 */ hasKind()2062 public boolean hasKind() { 2063 return ((bitField0_ & 0x00000010) != 0); 2064 } 2065 /** 2066 * 2067 * 2068 * <pre> 2069 * [Output Only] Type of the resource. Always compute#region for regions. 2070 * </pre> 2071 * 2072 * <code>optional string kind = 3292052;</code> 2073 * 2074 * @return The kind. 2075 */ getKind()2076 public java.lang.String getKind() { 2077 java.lang.Object ref = kind_; 2078 if (!(ref instanceof java.lang.String)) { 2079 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2080 java.lang.String s = bs.toStringUtf8(); 2081 kind_ = s; 2082 return s; 2083 } else { 2084 return (java.lang.String) ref; 2085 } 2086 } 2087 /** 2088 * 2089 * 2090 * <pre> 2091 * [Output Only] Type of the resource. Always compute#region for regions. 2092 * </pre> 2093 * 2094 * <code>optional string kind = 3292052;</code> 2095 * 2096 * @return The bytes for kind. 2097 */ getKindBytes()2098 public com.google.protobuf.ByteString getKindBytes() { 2099 java.lang.Object ref = kind_; 2100 if (ref instanceof String) { 2101 com.google.protobuf.ByteString b = 2102 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2103 kind_ = b; 2104 return b; 2105 } else { 2106 return (com.google.protobuf.ByteString) ref; 2107 } 2108 } 2109 /** 2110 * 2111 * 2112 * <pre> 2113 * [Output Only] Type of the resource. Always compute#region for regions. 2114 * </pre> 2115 * 2116 * <code>optional string kind = 3292052;</code> 2117 * 2118 * @param value The kind to set. 2119 * @return This builder for chaining. 2120 */ setKind(java.lang.String value)2121 public Builder setKind(java.lang.String value) { 2122 if (value == null) { 2123 throw new NullPointerException(); 2124 } 2125 kind_ = value; 2126 bitField0_ |= 0x00000010; 2127 onChanged(); 2128 return this; 2129 } 2130 /** 2131 * 2132 * 2133 * <pre> 2134 * [Output Only] Type of the resource. Always compute#region for regions. 2135 * </pre> 2136 * 2137 * <code>optional string kind = 3292052;</code> 2138 * 2139 * @return This builder for chaining. 2140 */ clearKind()2141 public Builder clearKind() { 2142 kind_ = getDefaultInstance().getKind(); 2143 bitField0_ = (bitField0_ & ~0x00000010); 2144 onChanged(); 2145 return this; 2146 } 2147 /** 2148 * 2149 * 2150 * <pre> 2151 * [Output Only] Type of the resource. Always compute#region for regions. 2152 * </pre> 2153 * 2154 * <code>optional string kind = 3292052;</code> 2155 * 2156 * @param value The bytes for kind to set. 2157 * @return This builder for chaining. 2158 */ setKindBytes(com.google.protobuf.ByteString value)2159 public Builder setKindBytes(com.google.protobuf.ByteString value) { 2160 if (value == null) { 2161 throw new NullPointerException(); 2162 } 2163 checkByteStringIsUtf8(value); 2164 kind_ = value; 2165 bitField0_ |= 0x00000010; 2166 onChanged(); 2167 return this; 2168 } 2169 2170 private java.lang.Object name_ = ""; 2171 /** 2172 * 2173 * 2174 * <pre> 2175 * [Output Only] Name of the resource. 2176 * </pre> 2177 * 2178 * <code>optional string name = 3373707;</code> 2179 * 2180 * @return Whether the name field is set. 2181 */ hasName()2182 public boolean hasName() { 2183 return ((bitField0_ & 0x00000020) != 0); 2184 } 2185 /** 2186 * 2187 * 2188 * <pre> 2189 * [Output Only] Name of the resource. 2190 * </pre> 2191 * 2192 * <code>optional string name = 3373707;</code> 2193 * 2194 * @return The name. 2195 */ getName()2196 public java.lang.String getName() { 2197 java.lang.Object ref = name_; 2198 if (!(ref instanceof java.lang.String)) { 2199 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2200 java.lang.String s = bs.toStringUtf8(); 2201 name_ = s; 2202 return s; 2203 } else { 2204 return (java.lang.String) ref; 2205 } 2206 } 2207 /** 2208 * 2209 * 2210 * <pre> 2211 * [Output Only] Name of the resource. 2212 * </pre> 2213 * 2214 * <code>optional string name = 3373707;</code> 2215 * 2216 * @return The bytes for name. 2217 */ getNameBytes()2218 public com.google.protobuf.ByteString getNameBytes() { 2219 java.lang.Object ref = name_; 2220 if (ref instanceof String) { 2221 com.google.protobuf.ByteString b = 2222 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2223 name_ = b; 2224 return b; 2225 } else { 2226 return (com.google.protobuf.ByteString) ref; 2227 } 2228 } 2229 /** 2230 * 2231 * 2232 * <pre> 2233 * [Output Only] Name of the resource. 2234 * </pre> 2235 * 2236 * <code>optional string name = 3373707;</code> 2237 * 2238 * @param value The name to set. 2239 * @return This builder for chaining. 2240 */ setName(java.lang.String value)2241 public Builder setName(java.lang.String value) { 2242 if (value == null) { 2243 throw new NullPointerException(); 2244 } 2245 name_ = value; 2246 bitField0_ |= 0x00000020; 2247 onChanged(); 2248 return this; 2249 } 2250 /** 2251 * 2252 * 2253 * <pre> 2254 * [Output Only] Name of the resource. 2255 * </pre> 2256 * 2257 * <code>optional string name = 3373707;</code> 2258 * 2259 * @return This builder for chaining. 2260 */ clearName()2261 public Builder clearName() { 2262 name_ = getDefaultInstance().getName(); 2263 bitField0_ = (bitField0_ & ~0x00000020); 2264 onChanged(); 2265 return this; 2266 } 2267 /** 2268 * 2269 * 2270 * <pre> 2271 * [Output Only] Name of the resource. 2272 * </pre> 2273 * 2274 * <code>optional string name = 3373707;</code> 2275 * 2276 * @param value The bytes for name to set. 2277 * @return This builder for chaining. 2278 */ setNameBytes(com.google.protobuf.ByteString value)2279 public Builder setNameBytes(com.google.protobuf.ByteString value) { 2280 if (value == null) { 2281 throw new NullPointerException(); 2282 } 2283 checkByteStringIsUtf8(value); 2284 name_ = value; 2285 bitField0_ |= 0x00000020; 2286 onChanged(); 2287 return this; 2288 } 2289 2290 private java.util.List<com.google.cloud.compute.v1.Quota> quotas_ = 2291 java.util.Collections.emptyList(); 2292 ensureQuotasIsMutable()2293 private void ensureQuotasIsMutable() { 2294 if (!((bitField0_ & 0x00000040) != 0)) { 2295 quotas_ = new java.util.ArrayList<com.google.cloud.compute.v1.Quota>(quotas_); 2296 bitField0_ |= 0x00000040; 2297 } 2298 } 2299 2300 private com.google.protobuf.RepeatedFieldBuilderV3< 2301 com.google.cloud.compute.v1.Quota, 2302 com.google.cloud.compute.v1.Quota.Builder, 2303 com.google.cloud.compute.v1.QuotaOrBuilder> 2304 quotasBuilder_; 2305 2306 /** 2307 * 2308 * 2309 * <pre> 2310 * [Output Only] Quotas assigned to this region. 2311 * </pre> 2312 * 2313 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2314 */ getQuotasList()2315 public java.util.List<com.google.cloud.compute.v1.Quota> getQuotasList() { 2316 if (quotasBuilder_ == null) { 2317 return java.util.Collections.unmodifiableList(quotas_); 2318 } else { 2319 return quotasBuilder_.getMessageList(); 2320 } 2321 } 2322 /** 2323 * 2324 * 2325 * <pre> 2326 * [Output Only] Quotas assigned to this region. 2327 * </pre> 2328 * 2329 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2330 */ getQuotasCount()2331 public int getQuotasCount() { 2332 if (quotasBuilder_ == null) { 2333 return quotas_.size(); 2334 } else { 2335 return quotasBuilder_.getCount(); 2336 } 2337 } 2338 /** 2339 * 2340 * 2341 * <pre> 2342 * [Output Only] Quotas assigned to this region. 2343 * </pre> 2344 * 2345 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2346 */ getQuotas(int index)2347 public com.google.cloud.compute.v1.Quota getQuotas(int index) { 2348 if (quotasBuilder_ == null) { 2349 return quotas_.get(index); 2350 } else { 2351 return quotasBuilder_.getMessage(index); 2352 } 2353 } 2354 /** 2355 * 2356 * 2357 * <pre> 2358 * [Output Only] Quotas assigned to this region. 2359 * </pre> 2360 * 2361 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2362 */ setQuotas(int index, com.google.cloud.compute.v1.Quota value)2363 public Builder setQuotas(int index, com.google.cloud.compute.v1.Quota value) { 2364 if (quotasBuilder_ == null) { 2365 if (value == null) { 2366 throw new NullPointerException(); 2367 } 2368 ensureQuotasIsMutable(); 2369 quotas_.set(index, value); 2370 onChanged(); 2371 } else { 2372 quotasBuilder_.setMessage(index, value); 2373 } 2374 return this; 2375 } 2376 /** 2377 * 2378 * 2379 * <pre> 2380 * [Output Only] Quotas assigned to this region. 2381 * </pre> 2382 * 2383 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2384 */ setQuotas(int index, com.google.cloud.compute.v1.Quota.Builder builderForValue)2385 public Builder setQuotas(int index, com.google.cloud.compute.v1.Quota.Builder builderForValue) { 2386 if (quotasBuilder_ == null) { 2387 ensureQuotasIsMutable(); 2388 quotas_.set(index, builderForValue.build()); 2389 onChanged(); 2390 } else { 2391 quotasBuilder_.setMessage(index, builderForValue.build()); 2392 } 2393 return this; 2394 } 2395 /** 2396 * 2397 * 2398 * <pre> 2399 * [Output Only] Quotas assigned to this region. 2400 * </pre> 2401 * 2402 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2403 */ addQuotas(com.google.cloud.compute.v1.Quota value)2404 public Builder addQuotas(com.google.cloud.compute.v1.Quota value) { 2405 if (quotasBuilder_ == null) { 2406 if (value == null) { 2407 throw new NullPointerException(); 2408 } 2409 ensureQuotasIsMutable(); 2410 quotas_.add(value); 2411 onChanged(); 2412 } else { 2413 quotasBuilder_.addMessage(value); 2414 } 2415 return this; 2416 } 2417 /** 2418 * 2419 * 2420 * <pre> 2421 * [Output Only] Quotas assigned to this region. 2422 * </pre> 2423 * 2424 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2425 */ addQuotas(int index, com.google.cloud.compute.v1.Quota value)2426 public Builder addQuotas(int index, com.google.cloud.compute.v1.Quota value) { 2427 if (quotasBuilder_ == null) { 2428 if (value == null) { 2429 throw new NullPointerException(); 2430 } 2431 ensureQuotasIsMutable(); 2432 quotas_.add(index, value); 2433 onChanged(); 2434 } else { 2435 quotasBuilder_.addMessage(index, value); 2436 } 2437 return this; 2438 } 2439 /** 2440 * 2441 * 2442 * <pre> 2443 * [Output Only] Quotas assigned to this region. 2444 * </pre> 2445 * 2446 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2447 */ addQuotas(com.google.cloud.compute.v1.Quota.Builder builderForValue)2448 public Builder addQuotas(com.google.cloud.compute.v1.Quota.Builder builderForValue) { 2449 if (quotasBuilder_ == null) { 2450 ensureQuotasIsMutable(); 2451 quotas_.add(builderForValue.build()); 2452 onChanged(); 2453 } else { 2454 quotasBuilder_.addMessage(builderForValue.build()); 2455 } 2456 return this; 2457 } 2458 /** 2459 * 2460 * 2461 * <pre> 2462 * [Output Only] Quotas assigned to this region. 2463 * </pre> 2464 * 2465 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2466 */ addQuotas(int index, com.google.cloud.compute.v1.Quota.Builder builderForValue)2467 public Builder addQuotas(int index, com.google.cloud.compute.v1.Quota.Builder builderForValue) { 2468 if (quotasBuilder_ == null) { 2469 ensureQuotasIsMutable(); 2470 quotas_.add(index, builderForValue.build()); 2471 onChanged(); 2472 } else { 2473 quotasBuilder_.addMessage(index, builderForValue.build()); 2474 } 2475 return this; 2476 } 2477 /** 2478 * 2479 * 2480 * <pre> 2481 * [Output Only] Quotas assigned to this region. 2482 * </pre> 2483 * 2484 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2485 */ addAllQuotas( java.lang.Iterable<? extends com.google.cloud.compute.v1.Quota> values)2486 public Builder addAllQuotas( 2487 java.lang.Iterable<? extends com.google.cloud.compute.v1.Quota> values) { 2488 if (quotasBuilder_ == null) { 2489 ensureQuotasIsMutable(); 2490 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, quotas_); 2491 onChanged(); 2492 } else { 2493 quotasBuilder_.addAllMessages(values); 2494 } 2495 return this; 2496 } 2497 /** 2498 * 2499 * 2500 * <pre> 2501 * [Output Only] Quotas assigned to this region. 2502 * </pre> 2503 * 2504 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2505 */ clearQuotas()2506 public Builder clearQuotas() { 2507 if (quotasBuilder_ == null) { 2508 quotas_ = java.util.Collections.emptyList(); 2509 bitField0_ = (bitField0_ & ~0x00000040); 2510 onChanged(); 2511 } else { 2512 quotasBuilder_.clear(); 2513 } 2514 return this; 2515 } 2516 /** 2517 * 2518 * 2519 * <pre> 2520 * [Output Only] Quotas assigned to this region. 2521 * </pre> 2522 * 2523 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2524 */ removeQuotas(int index)2525 public Builder removeQuotas(int index) { 2526 if (quotasBuilder_ == null) { 2527 ensureQuotasIsMutable(); 2528 quotas_.remove(index); 2529 onChanged(); 2530 } else { 2531 quotasBuilder_.remove(index); 2532 } 2533 return this; 2534 } 2535 /** 2536 * 2537 * 2538 * <pre> 2539 * [Output Only] Quotas assigned to this region. 2540 * </pre> 2541 * 2542 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2543 */ getQuotasBuilder(int index)2544 public com.google.cloud.compute.v1.Quota.Builder getQuotasBuilder(int index) { 2545 return getQuotasFieldBuilder().getBuilder(index); 2546 } 2547 /** 2548 * 2549 * 2550 * <pre> 2551 * [Output Only] Quotas assigned to this region. 2552 * </pre> 2553 * 2554 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2555 */ getQuotasOrBuilder(int index)2556 public com.google.cloud.compute.v1.QuotaOrBuilder getQuotasOrBuilder(int index) { 2557 if (quotasBuilder_ == null) { 2558 return quotas_.get(index); 2559 } else { 2560 return quotasBuilder_.getMessageOrBuilder(index); 2561 } 2562 } 2563 /** 2564 * 2565 * 2566 * <pre> 2567 * [Output Only] Quotas assigned to this region. 2568 * </pre> 2569 * 2570 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2571 */ 2572 public java.util.List<? extends com.google.cloud.compute.v1.QuotaOrBuilder> getQuotasOrBuilderList()2573 getQuotasOrBuilderList() { 2574 if (quotasBuilder_ != null) { 2575 return quotasBuilder_.getMessageOrBuilderList(); 2576 } else { 2577 return java.util.Collections.unmodifiableList(quotas_); 2578 } 2579 } 2580 /** 2581 * 2582 * 2583 * <pre> 2584 * [Output Only] Quotas assigned to this region. 2585 * </pre> 2586 * 2587 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2588 */ addQuotasBuilder()2589 public com.google.cloud.compute.v1.Quota.Builder addQuotasBuilder() { 2590 return getQuotasFieldBuilder() 2591 .addBuilder(com.google.cloud.compute.v1.Quota.getDefaultInstance()); 2592 } 2593 /** 2594 * 2595 * 2596 * <pre> 2597 * [Output Only] Quotas assigned to this region. 2598 * </pre> 2599 * 2600 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2601 */ addQuotasBuilder(int index)2602 public com.google.cloud.compute.v1.Quota.Builder addQuotasBuilder(int index) { 2603 return getQuotasFieldBuilder() 2604 .addBuilder(index, com.google.cloud.compute.v1.Quota.getDefaultInstance()); 2605 } 2606 /** 2607 * 2608 * 2609 * <pre> 2610 * [Output Only] Quotas assigned to this region. 2611 * </pre> 2612 * 2613 * <code>repeated .google.cloud.compute.v1.Quota quotas = 125341947;</code> 2614 */ getQuotasBuilderList()2615 public java.util.List<com.google.cloud.compute.v1.Quota.Builder> getQuotasBuilderList() { 2616 return getQuotasFieldBuilder().getBuilderList(); 2617 } 2618 2619 private com.google.protobuf.RepeatedFieldBuilderV3< 2620 com.google.cloud.compute.v1.Quota, 2621 com.google.cloud.compute.v1.Quota.Builder, 2622 com.google.cloud.compute.v1.QuotaOrBuilder> getQuotasFieldBuilder()2623 getQuotasFieldBuilder() { 2624 if (quotasBuilder_ == null) { 2625 quotasBuilder_ = 2626 new com.google.protobuf.RepeatedFieldBuilderV3< 2627 com.google.cloud.compute.v1.Quota, 2628 com.google.cloud.compute.v1.Quota.Builder, 2629 com.google.cloud.compute.v1.QuotaOrBuilder>( 2630 quotas_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); 2631 quotas_ = null; 2632 } 2633 return quotasBuilder_; 2634 } 2635 2636 private java.lang.Object selfLink_ = ""; 2637 /** 2638 * 2639 * 2640 * <pre> 2641 * [Output Only] Server-defined URL for the resource. 2642 * </pre> 2643 * 2644 * <code>optional string self_link = 456214797;</code> 2645 * 2646 * @return Whether the selfLink field is set. 2647 */ hasSelfLink()2648 public boolean hasSelfLink() { 2649 return ((bitField0_ & 0x00000080) != 0); 2650 } 2651 /** 2652 * 2653 * 2654 * <pre> 2655 * [Output Only] Server-defined URL for the resource. 2656 * </pre> 2657 * 2658 * <code>optional string self_link = 456214797;</code> 2659 * 2660 * @return The selfLink. 2661 */ getSelfLink()2662 public java.lang.String getSelfLink() { 2663 java.lang.Object ref = selfLink_; 2664 if (!(ref instanceof java.lang.String)) { 2665 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2666 java.lang.String s = bs.toStringUtf8(); 2667 selfLink_ = s; 2668 return s; 2669 } else { 2670 return (java.lang.String) ref; 2671 } 2672 } 2673 /** 2674 * 2675 * 2676 * <pre> 2677 * [Output Only] Server-defined URL for the resource. 2678 * </pre> 2679 * 2680 * <code>optional string self_link = 456214797;</code> 2681 * 2682 * @return The bytes for selfLink. 2683 */ getSelfLinkBytes()2684 public com.google.protobuf.ByteString getSelfLinkBytes() { 2685 java.lang.Object ref = selfLink_; 2686 if (ref instanceof String) { 2687 com.google.protobuf.ByteString b = 2688 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2689 selfLink_ = b; 2690 return b; 2691 } else { 2692 return (com.google.protobuf.ByteString) ref; 2693 } 2694 } 2695 /** 2696 * 2697 * 2698 * <pre> 2699 * [Output Only] Server-defined URL for the resource. 2700 * </pre> 2701 * 2702 * <code>optional string self_link = 456214797;</code> 2703 * 2704 * @param value The selfLink to set. 2705 * @return This builder for chaining. 2706 */ setSelfLink(java.lang.String value)2707 public Builder setSelfLink(java.lang.String value) { 2708 if (value == null) { 2709 throw new NullPointerException(); 2710 } 2711 selfLink_ = value; 2712 bitField0_ |= 0x00000080; 2713 onChanged(); 2714 return this; 2715 } 2716 /** 2717 * 2718 * 2719 * <pre> 2720 * [Output Only] Server-defined URL for the resource. 2721 * </pre> 2722 * 2723 * <code>optional string self_link = 456214797;</code> 2724 * 2725 * @return This builder for chaining. 2726 */ clearSelfLink()2727 public Builder clearSelfLink() { 2728 selfLink_ = getDefaultInstance().getSelfLink(); 2729 bitField0_ = (bitField0_ & ~0x00000080); 2730 onChanged(); 2731 return this; 2732 } 2733 /** 2734 * 2735 * 2736 * <pre> 2737 * [Output Only] Server-defined URL for the resource. 2738 * </pre> 2739 * 2740 * <code>optional string self_link = 456214797;</code> 2741 * 2742 * @param value The bytes for selfLink to set. 2743 * @return This builder for chaining. 2744 */ setSelfLinkBytes(com.google.protobuf.ByteString value)2745 public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) { 2746 if (value == null) { 2747 throw new NullPointerException(); 2748 } 2749 checkByteStringIsUtf8(value); 2750 selfLink_ = value; 2751 bitField0_ |= 0x00000080; 2752 onChanged(); 2753 return this; 2754 } 2755 2756 private java.lang.Object status_ = ""; 2757 /** 2758 * 2759 * 2760 * <pre> 2761 * [Output Only] Status of the region, either UP or DOWN. 2762 * Check the Status enum for the list of possible values. 2763 * </pre> 2764 * 2765 * <code>optional string status = 181260274;</code> 2766 * 2767 * @return Whether the status field is set. 2768 */ hasStatus()2769 public boolean hasStatus() { 2770 return ((bitField0_ & 0x00000100) != 0); 2771 } 2772 /** 2773 * 2774 * 2775 * <pre> 2776 * [Output Only] Status of the region, either UP or DOWN. 2777 * Check the Status enum for the list of possible values. 2778 * </pre> 2779 * 2780 * <code>optional string status = 181260274;</code> 2781 * 2782 * @return The status. 2783 */ getStatus()2784 public java.lang.String getStatus() { 2785 java.lang.Object ref = status_; 2786 if (!(ref instanceof java.lang.String)) { 2787 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2788 java.lang.String s = bs.toStringUtf8(); 2789 status_ = s; 2790 return s; 2791 } else { 2792 return (java.lang.String) ref; 2793 } 2794 } 2795 /** 2796 * 2797 * 2798 * <pre> 2799 * [Output Only] Status of the region, either UP or DOWN. 2800 * Check the Status enum for the list of possible values. 2801 * </pre> 2802 * 2803 * <code>optional string status = 181260274;</code> 2804 * 2805 * @return The bytes for status. 2806 */ getStatusBytes()2807 public com.google.protobuf.ByteString getStatusBytes() { 2808 java.lang.Object ref = status_; 2809 if (ref instanceof String) { 2810 com.google.protobuf.ByteString b = 2811 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2812 status_ = b; 2813 return b; 2814 } else { 2815 return (com.google.protobuf.ByteString) ref; 2816 } 2817 } 2818 /** 2819 * 2820 * 2821 * <pre> 2822 * [Output Only] Status of the region, either UP or DOWN. 2823 * Check the Status enum for the list of possible values. 2824 * </pre> 2825 * 2826 * <code>optional string status = 181260274;</code> 2827 * 2828 * @param value The status to set. 2829 * @return This builder for chaining. 2830 */ setStatus(java.lang.String value)2831 public Builder setStatus(java.lang.String value) { 2832 if (value == null) { 2833 throw new NullPointerException(); 2834 } 2835 status_ = value; 2836 bitField0_ |= 0x00000100; 2837 onChanged(); 2838 return this; 2839 } 2840 /** 2841 * 2842 * 2843 * <pre> 2844 * [Output Only] Status of the region, either UP or DOWN. 2845 * Check the Status enum for the list of possible values. 2846 * </pre> 2847 * 2848 * <code>optional string status = 181260274;</code> 2849 * 2850 * @return This builder for chaining. 2851 */ clearStatus()2852 public Builder clearStatus() { 2853 status_ = getDefaultInstance().getStatus(); 2854 bitField0_ = (bitField0_ & ~0x00000100); 2855 onChanged(); 2856 return this; 2857 } 2858 /** 2859 * 2860 * 2861 * <pre> 2862 * [Output Only] Status of the region, either UP or DOWN. 2863 * Check the Status enum for the list of possible values. 2864 * </pre> 2865 * 2866 * <code>optional string status = 181260274;</code> 2867 * 2868 * @param value The bytes for status to set. 2869 * @return This builder for chaining. 2870 */ setStatusBytes(com.google.protobuf.ByteString value)2871 public Builder setStatusBytes(com.google.protobuf.ByteString value) { 2872 if (value == null) { 2873 throw new NullPointerException(); 2874 } 2875 checkByteStringIsUtf8(value); 2876 status_ = value; 2877 bitField0_ |= 0x00000100; 2878 onChanged(); 2879 return this; 2880 } 2881 2882 private boolean supportsPzs_; 2883 /** 2884 * 2885 * 2886 * <pre> 2887 * [Output Only] Reserved for future use. 2888 * </pre> 2889 * 2890 * <code>optional bool supports_pzs = 83983214;</code> 2891 * 2892 * @return Whether the supportsPzs field is set. 2893 */ 2894 @java.lang.Override hasSupportsPzs()2895 public boolean hasSupportsPzs() { 2896 return ((bitField0_ & 0x00000200) != 0); 2897 } 2898 /** 2899 * 2900 * 2901 * <pre> 2902 * [Output Only] Reserved for future use. 2903 * </pre> 2904 * 2905 * <code>optional bool supports_pzs = 83983214;</code> 2906 * 2907 * @return The supportsPzs. 2908 */ 2909 @java.lang.Override getSupportsPzs()2910 public boolean getSupportsPzs() { 2911 return supportsPzs_; 2912 } 2913 /** 2914 * 2915 * 2916 * <pre> 2917 * [Output Only] Reserved for future use. 2918 * </pre> 2919 * 2920 * <code>optional bool supports_pzs = 83983214;</code> 2921 * 2922 * @param value The supportsPzs to set. 2923 * @return This builder for chaining. 2924 */ setSupportsPzs(boolean value)2925 public Builder setSupportsPzs(boolean value) { 2926 2927 supportsPzs_ = value; 2928 bitField0_ |= 0x00000200; 2929 onChanged(); 2930 return this; 2931 } 2932 /** 2933 * 2934 * 2935 * <pre> 2936 * [Output Only] Reserved for future use. 2937 * </pre> 2938 * 2939 * <code>optional bool supports_pzs = 83983214;</code> 2940 * 2941 * @return This builder for chaining. 2942 */ clearSupportsPzs()2943 public Builder clearSupportsPzs() { 2944 bitField0_ = (bitField0_ & ~0x00000200); 2945 supportsPzs_ = false; 2946 onChanged(); 2947 return this; 2948 } 2949 2950 private com.google.protobuf.LazyStringList zones_ = 2951 com.google.protobuf.LazyStringArrayList.EMPTY; 2952 ensureZonesIsMutable()2953 private void ensureZonesIsMutable() { 2954 if (!((bitField0_ & 0x00000400) != 0)) { 2955 zones_ = new com.google.protobuf.LazyStringArrayList(zones_); 2956 bitField0_ |= 0x00000400; 2957 } 2958 } 2959 /** 2960 * 2961 * 2962 * <pre> 2963 * [Output Only] A list of zones available in this region, in the form of resource URLs. 2964 * </pre> 2965 * 2966 * <code>repeated string zones = 116085319;</code> 2967 * 2968 * @return A list containing the zones. 2969 */ getZonesList()2970 public com.google.protobuf.ProtocolStringList getZonesList() { 2971 return zones_.getUnmodifiableView(); 2972 } 2973 /** 2974 * 2975 * 2976 * <pre> 2977 * [Output Only] A list of zones available in this region, in the form of resource URLs. 2978 * </pre> 2979 * 2980 * <code>repeated string zones = 116085319;</code> 2981 * 2982 * @return The count of zones. 2983 */ getZonesCount()2984 public int getZonesCount() { 2985 return zones_.size(); 2986 } 2987 /** 2988 * 2989 * 2990 * <pre> 2991 * [Output Only] A list of zones available in this region, in the form of resource URLs. 2992 * </pre> 2993 * 2994 * <code>repeated string zones = 116085319;</code> 2995 * 2996 * @param index The index of the element to return. 2997 * @return The zones at the given index. 2998 */ getZones(int index)2999 public java.lang.String getZones(int index) { 3000 return zones_.get(index); 3001 } 3002 /** 3003 * 3004 * 3005 * <pre> 3006 * [Output Only] A list of zones available in this region, in the form of resource URLs. 3007 * </pre> 3008 * 3009 * <code>repeated string zones = 116085319;</code> 3010 * 3011 * @param index The index of the value to return. 3012 * @return The bytes of the zones at the given index. 3013 */ getZonesBytes(int index)3014 public com.google.protobuf.ByteString getZonesBytes(int index) { 3015 return zones_.getByteString(index); 3016 } 3017 /** 3018 * 3019 * 3020 * <pre> 3021 * [Output Only] A list of zones available in this region, in the form of resource URLs. 3022 * </pre> 3023 * 3024 * <code>repeated string zones = 116085319;</code> 3025 * 3026 * @param index The index to set the value at. 3027 * @param value The zones to set. 3028 * @return This builder for chaining. 3029 */ setZones(int index, java.lang.String value)3030 public Builder setZones(int index, java.lang.String value) { 3031 if (value == null) { 3032 throw new NullPointerException(); 3033 } 3034 ensureZonesIsMutable(); 3035 zones_.set(index, value); 3036 onChanged(); 3037 return this; 3038 } 3039 /** 3040 * 3041 * 3042 * <pre> 3043 * [Output Only] A list of zones available in this region, in the form of resource URLs. 3044 * </pre> 3045 * 3046 * <code>repeated string zones = 116085319;</code> 3047 * 3048 * @param value The zones to add. 3049 * @return This builder for chaining. 3050 */ addZones(java.lang.String value)3051 public Builder addZones(java.lang.String value) { 3052 if (value == null) { 3053 throw new NullPointerException(); 3054 } 3055 ensureZonesIsMutable(); 3056 zones_.add(value); 3057 onChanged(); 3058 return this; 3059 } 3060 /** 3061 * 3062 * 3063 * <pre> 3064 * [Output Only] A list of zones available in this region, in the form of resource URLs. 3065 * </pre> 3066 * 3067 * <code>repeated string zones = 116085319;</code> 3068 * 3069 * @param values The zones to add. 3070 * @return This builder for chaining. 3071 */ addAllZones(java.lang.Iterable<java.lang.String> values)3072 public Builder addAllZones(java.lang.Iterable<java.lang.String> values) { 3073 ensureZonesIsMutable(); 3074 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, zones_); 3075 onChanged(); 3076 return this; 3077 } 3078 /** 3079 * 3080 * 3081 * <pre> 3082 * [Output Only] A list of zones available in this region, in the form of resource URLs. 3083 * </pre> 3084 * 3085 * <code>repeated string zones = 116085319;</code> 3086 * 3087 * @return This builder for chaining. 3088 */ clearZones()3089 public Builder clearZones() { 3090 zones_ = com.google.protobuf.LazyStringArrayList.EMPTY; 3091 bitField0_ = (bitField0_ & ~0x00000400); 3092 onChanged(); 3093 return this; 3094 } 3095 /** 3096 * 3097 * 3098 * <pre> 3099 * [Output Only] A list of zones available in this region, in the form of resource URLs. 3100 * </pre> 3101 * 3102 * <code>repeated string zones = 116085319;</code> 3103 * 3104 * @param value The bytes of the zones to add. 3105 * @return This builder for chaining. 3106 */ addZonesBytes(com.google.protobuf.ByteString value)3107 public Builder addZonesBytes(com.google.protobuf.ByteString value) { 3108 if (value == null) { 3109 throw new NullPointerException(); 3110 } 3111 checkByteStringIsUtf8(value); 3112 ensureZonesIsMutable(); 3113 zones_.add(value); 3114 onChanged(); 3115 return this; 3116 } 3117 3118 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3119 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 3120 return super.setUnknownFields(unknownFields); 3121 } 3122 3123 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3124 public final Builder mergeUnknownFields( 3125 final com.google.protobuf.UnknownFieldSet unknownFields) { 3126 return super.mergeUnknownFields(unknownFields); 3127 } 3128 3129 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.Region) 3130 } 3131 3132 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.Region) 3133 private static final com.google.cloud.compute.v1.Region DEFAULT_INSTANCE; 3134 3135 static { 3136 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.Region(); 3137 } 3138 getDefaultInstance()3139 public static com.google.cloud.compute.v1.Region getDefaultInstance() { 3140 return DEFAULT_INSTANCE; 3141 } 3142 3143 private static final com.google.protobuf.Parser<Region> PARSER = 3144 new com.google.protobuf.AbstractParser<Region>() { 3145 @java.lang.Override 3146 public Region parsePartialFrom( 3147 com.google.protobuf.CodedInputStream input, 3148 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3149 throws com.google.protobuf.InvalidProtocolBufferException { 3150 Builder builder = newBuilder(); 3151 try { 3152 builder.mergeFrom(input, extensionRegistry); 3153 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 3154 throw e.setUnfinishedMessage(builder.buildPartial()); 3155 } catch (com.google.protobuf.UninitializedMessageException e) { 3156 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 3157 } catch (java.io.IOException e) { 3158 throw new com.google.protobuf.InvalidProtocolBufferException(e) 3159 .setUnfinishedMessage(builder.buildPartial()); 3160 } 3161 return builder.buildPartial(); 3162 } 3163 }; 3164 parser()3165 public static com.google.protobuf.Parser<Region> parser() { 3166 return PARSER; 3167 } 3168 3169 @java.lang.Override getParserForType()3170 public com.google.protobuf.Parser<Region> getParserForType() { 3171 return PARSER; 3172 } 3173 3174 @java.lang.Override getDefaultInstanceForType()3175 public com.google.cloud.compute.v1.Region getDefaultInstanceForType() { 3176 return DEFAULT_INSTANCE; 3177 } 3178 } 3179