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 * </pre> 26 * 27 * Protobuf type {@code google.cloud.compute.v1.DistributionPolicy} 28 */ 29 public final class DistributionPolicy extends com.google.protobuf.GeneratedMessageV3 30 implements 31 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.DistributionPolicy) 32 DistributionPolicyOrBuilder { 33 private static final long serialVersionUID = 0L; 34 // Use DistributionPolicy.newBuilder() to construct. DistributionPolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)35 private DistributionPolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 36 super(builder); 37 } 38 DistributionPolicy()39 private DistributionPolicy() { 40 targetShape_ = ""; 41 zones_ = java.util.Collections.emptyList(); 42 } 43 44 @java.lang.Override 45 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)46 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 47 return new DistributionPolicy(); 48 } 49 50 @java.lang.Override getUnknownFields()51 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 52 return this.unknownFields; 53 } 54 getDescriptor()55 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 56 return com.google.cloud.compute.v1.Compute 57 .internal_static_google_cloud_compute_v1_DistributionPolicy_descriptor; 58 } 59 60 @java.lang.Override 61 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()62 internalGetFieldAccessorTable() { 63 return com.google.cloud.compute.v1.Compute 64 .internal_static_google_cloud_compute_v1_DistributionPolicy_fieldAccessorTable 65 .ensureFieldAccessorsInitialized( 66 com.google.cloud.compute.v1.DistributionPolicy.class, 67 com.google.cloud.compute.v1.DistributionPolicy.Builder.class); 68 } 69 70 /** 71 * 72 * 73 * <pre> 74 * The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). 75 * </pre> 76 * 77 * Protobuf enum {@code google.cloud.compute.v1.DistributionPolicy.TargetShape} 78 */ 79 public enum TargetShape implements com.google.protobuf.ProtocolMessageEnum { 80 /** 81 * 82 * 83 * <pre> 84 * A value indicating that the enum field is not set. 85 * </pre> 86 * 87 * <code>UNDEFINED_TARGET_SHAPE = 0;</code> 88 */ 89 UNDEFINED_TARGET_SHAPE(0), 90 /** 91 * 92 * 93 * <pre> 94 * The group picks zones for creating VM instances to fulfill the requested number of VMs within present resource constraints and to maximize utilization of unused zonal reservations. Recommended for batch workloads that do not require high availability. 95 * </pre> 96 * 97 * <code>ANY = 64972;</code> 98 */ 99 ANY(64972), 100 /** 101 * 102 * 103 * <pre> 104 * The group prioritizes acquisition of resources, scheduling VMs in zones where resources are available while distributing VMs as evenly as possible across selected zones to minimize the impact of zonal failure. Recommended for highly available serving workloads. 105 * </pre> 106 * 107 * <code>BALANCED = 468409608;</code> 108 */ 109 BALANCED(468409608), 110 /** 111 * 112 * 113 * <pre> 114 * The group schedules VM instance creation and deletion to achieve and maintain an even number of managed instances across the selected zones. The distribution is even when the number of managed instances does not differ by more than 1 between any two zones. Recommended for highly available serving workloads. 115 * </pre> 116 * 117 * <code>EVEN = 2140442;</code> 118 */ 119 EVEN(2140442), 120 UNRECOGNIZED(-1), 121 ; 122 123 /** 124 * 125 * 126 * <pre> 127 * A value indicating that the enum field is not set. 128 * </pre> 129 * 130 * <code>UNDEFINED_TARGET_SHAPE = 0;</code> 131 */ 132 public static final int UNDEFINED_TARGET_SHAPE_VALUE = 0; 133 /** 134 * 135 * 136 * <pre> 137 * The group picks zones for creating VM instances to fulfill the requested number of VMs within present resource constraints and to maximize utilization of unused zonal reservations. Recommended for batch workloads that do not require high availability. 138 * </pre> 139 * 140 * <code>ANY = 64972;</code> 141 */ 142 public static final int ANY_VALUE = 64972; 143 /** 144 * 145 * 146 * <pre> 147 * The group prioritizes acquisition of resources, scheduling VMs in zones where resources are available while distributing VMs as evenly as possible across selected zones to minimize the impact of zonal failure. Recommended for highly available serving workloads. 148 * </pre> 149 * 150 * <code>BALANCED = 468409608;</code> 151 */ 152 public static final int BALANCED_VALUE = 468409608; 153 /** 154 * 155 * 156 * <pre> 157 * The group schedules VM instance creation and deletion to achieve and maintain an even number of managed instances across the selected zones. The distribution is even when the number of managed instances does not differ by more than 1 between any two zones. Recommended for highly available serving workloads. 158 * </pre> 159 * 160 * <code>EVEN = 2140442;</code> 161 */ 162 public static final int EVEN_VALUE = 2140442; 163 getNumber()164 public final int getNumber() { 165 if (this == UNRECOGNIZED) { 166 throw new java.lang.IllegalArgumentException( 167 "Can't get the number of an unknown enum value."); 168 } 169 return value; 170 } 171 172 /** 173 * @param value The numeric wire value of the corresponding enum entry. 174 * @return The enum associated with the given numeric wire value. 175 * @deprecated Use {@link #forNumber(int)} instead. 176 */ 177 @java.lang.Deprecated valueOf(int value)178 public static TargetShape valueOf(int value) { 179 return forNumber(value); 180 } 181 182 /** 183 * @param value The numeric wire value of the corresponding enum entry. 184 * @return The enum associated with the given numeric wire value. 185 */ forNumber(int value)186 public static TargetShape forNumber(int value) { 187 switch (value) { 188 case 0: 189 return UNDEFINED_TARGET_SHAPE; 190 case 64972: 191 return ANY; 192 case 468409608: 193 return BALANCED; 194 case 2140442: 195 return EVEN; 196 default: 197 return null; 198 } 199 } 200 internalGetValueMap()201 public static com.google.protobuf.Internal.EnumLiteMap<TargetShape> internalGetValueMap() { 202 return internalValueMap; 203 } 204 205 private static final com.google.protobuf.Internal.EnumLiteMap<TargetShape> internalValueMap = 206 new com.google.protobuf.Internal.EnumLiteMap<TargetShape>() { 207 public TargetShape findValueByNumber(int number) { 208 return TargetShape.forNumber(number); 209 } 210 }; 211 getValueDescriptor()212 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 213 if (this == UNRECOGNIZED) { 214 throw new java.lang.IllegalStateException( 215 "Can't get the descriptor of an unrecognized enum value."); 216 } 217 return getDescriptor().getValues().get(ordinal()); 218 } 219 getDescriptorForType()220 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 221 return getDescriptor(); 222 } 223 getDescriptor()224 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 225 return com.google.cloud.compute.v1.DistributionPolicy.getDescriptor().getEnumTypes().get(0); 226 } 227 228 private static final TargetShape[] VALUES = values(); 229 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)230 public static TargetShape valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 231 if (desc.getType() != getDescriptor()) { 232 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 233 } 234 if (desc.getIndex() == -1) { 235 return UNRECOGNIZED; 236 } 237 return VALUES[desc.getIndex()]; 238 } 239 240 private final int value; 241 TargetShape(int value)242 private TargetShape(int value) { 243 this.value = value; 244 } 245 246 // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.DistributionPolicy.TargetShape) 247 } 248 249 private int bitField0_; 250 public static final int TARGET_SHAPE_FIELD_NUMBER = 338621299; 251 252 @SuppressWarnings("serial") 253 private volatile java.lang.Object targetShape_ = ""; 254 /** 255 * 256 * 257 * <pre> 258 * The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). 259 * Check the TargetShape enum for the list of possible values. 260 * </pre> 261 * 262 * <code>optional string target_shape = 338621299;</code> 263 * 264 * @return Whether the targetShape field is set. 265 */ 266 @java.lang.Override hasTargetShape()267 public boolean hasTargetShape() { 268 return ((bitField0_ & 0x00000001) != 0); 269 } 270 /** 271 * 272 * 273 * <pre> 274 * The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). 275 * Check the TargetShape enum for the list of possible values. 276 * </pre> 277 * 278 * <code>optional string target_shape = 338621299;</code> 279 * 280 * @return The targetShape. 281 */ 282 @java.lang.Override getTargetShape()283 public java.lang.String getTargetShape() { 284 java.lang.Object ref = targetShape_; 285 if (ref instanceof java.lang.String) { 286 return (java.lang.String) ref; 287 } else { 288 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 289 java.lang.String s = bs.toStringUtf8(); 290 targetShape_ = s; 291 return s; 292 } 293 } 294 /** 295 * 296 * 297 * <pre> 298 * The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). 299 * Check the TargetShape enum for the list of possible values. 300 * </pre> 301 * 302 * <code>optional string target_shape = 338621299;</code> 303 * 304 * @return The bytes for targetShape. 305 */ 306 @java.lang.Override getTargetShapeBytes()307 public com.google.protobuf.ByteString getTargetShapeBytes() { 308 java.lang.Object ref = targetShape_; 309 if (ref instanceof java.lang.String) { 310 com.google.protobuf.ByteString b = 311 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 312 targetShape_ = b; 313 return b; 314 } else { 315 return (com.google.protobuf.ByteString) ref; 316 } 317 } 318 319 public static final int ZONES_FIELD_NUMBER = 116085319; 320 321 @SuppressWarnings("serial") 322 private java.util.List<com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration> zones_; 323 /** 324 * 325 * 326 * <pre> 327 * Zones where the regional managed instance group will create and manage its instances. 328 * </pre> 329 * 330 * <code>repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 331 * </code> 332 */ 333 @java.lang.Override 334 public java.util.List<com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration> getZonesList()335 getZonesList() { 336 return zones_; 337 } 338 /** 339 * 340 * 341 * <pre> 342 * Zones where the regional managed instance group will create and manage its instances. 343 * </pre> 344 * 345 * <code>repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 346 * </code> 347 */ 348 @java.lang.Override 349 public java.util.List< 350 ? extends com.google.cloud.compute.v1.DistributionPolicyZoneConfigurationOrBuilder> getZonesOrBuilderList()351 getZonesOrBuilderList() { 352 return zones_; 353 } 354 /** 355 * 356 * 357 * <pre> 358 * Zones where the regional managed instance group will create and manage its instances. 359 * </pre> 360 * 361 * <code>repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 362 * </code> 363 */ 364 @java.lang.Override getZonesCount()365 public int getZonesCount() { 366 return zones_.size(); 367 } 368 /** 369 * 370 * 371 * <pre> 372 * Zones where the regional managed instance group will create and manage its instances. 373 * </pre> 374 * 375 * <code>repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 376 * </code> 377 */ 378 @java.lang.Override getZones(int index)379 public com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration getZones(int index) { 380 return zones_.get(index); 381 } 382 /** 383 * 384 * 385 * <pre> 386 * Zones where the regional managed instance group will create and manage its instances. 387 * </pre> 388 * 389 * <code>repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 390 * </code> 391 */ 392 @java.lang.Override getZonesOrBuilder( int index)393 public com.google.cloud.compute.v1.DistributionPolicyZoneConfigurationOrBuilder getZonesOrBuilder( 394 int index) { 395 return zones_.get(index); 396 } 397 398 private byte memoizedIsInitialized = -1; 399 400 @java.lang.Override isInitialized()401 public final boolean isInitialized() { 402 byte isInitialized = memoizedIsInitialized; 403 if (isInitialized == 1) return true; 404 if (isInitialized == 0) return false; 405 406 memoizedIsInitialized = 1; 407 return true; 408 } 409 410 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)411 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 412 for (int i = 0; i < zones_.size(); i++) { 413 output.writeMessage(116085319, zones_.get(i)); 414 } 415 if (((bitField0_ & 0x00000001) != 0)) { 416 com.google.protobuf.GeneratedMessageV3.writeString(output, 338621299, targetShape_); 417 } 418 getUnknownFields().writeTo(output); 419 } 420 421 @java.lang.Override getSerializedSize()422 public int getSerializedSize() { 423 int size = memoizedSize; 424 if (size != -1) return size; 425 426 size = 0; 427 for (int i = 0; i < zones_.size(); i++) { 428 size += com.google.protobuf.CodedOutputStream.computeMessageSize(116085319, zones_.get(i)); 429 } 430 if (((bitField0_ & 0x00000001) != 0)) { 431 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(338621299, targetShape_); 432 } 433 size += getUnknownFields().getSerializedSize(); 434 memoizedSize = size; 435 return size; 436 } 437 438 @java.lang.Override equals(final java.lang.Object obj)439 public boolean equals(final java.lang.Object obj) { 440 if (obj == this) { 441 return true; 442 } 443 if (!(obj instanceof com.google.cloud.compute.v1.DistributionPolicy)) { 444 return super.equals(obj); 445 } 446 com.google.cloud.compute.v1.DistributionPolicy other = 447 (com.google.cloud.compute.v1.DistributionPolicy) obj; 448 449 if (hasTargetShape() != other.hasTargetShape()) return false; 450 if (hasTargetShape()) { 451 if (!getTargetShape().equals(other.getTargetShape())) return false; 452 } 453 if (!getZonesList().equals(other.getZonesList())) return false; 454 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 455 return true; 456 } 457 458 @java.lang.Override hashCode()459 public int hashCode() { 460 if (memoizedHashCode != 0) { 461 return memoizedHashCode; 462 } 463 int hash = 41; 464 hash = (19 * hash) + getDescriptor().hashCode(); 465 if (hasTargetShape()) { 466 hash = (37 * hash) + TARGET_SHAPE_FIELD_NUMBER; 467 hash = (53 * hash) + getTargetShape().hashCode(); 468 } 469 if (getZonesCount() > 0) { 470 hash = (37 * hash) + ZONES_FIELD_NUMBER; 471 hash = (53 * hash) + getZonesList().hashCode(); 472 } 473 hash = (29 * hash) + getUnknownFields().hashCode(); 474 memoizedHashCode = hash; 475 return hash; 476 } 477 parseFrom(java.nio.ByteBuffer data)478 public static com.google.cloud.compute.v1.DistributionPolicy parseFrom(java.nio.ByteBuffer data) 479 throws com.google.protobuf.InvalidProtocolBufferException { 480 return PARSER.parseFrom(data); 481 } 482 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)483 public static com.google.cloud.compute.v1.DistributionPolicy parseFrom( 484 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 485 throws com.google.protobuf.InvalidProtocolBufferException { 486 return PARSER.parseFrom(data, extensionRegistry); 487 } 488 parseFrom( com.google.protobuf.ByteString data)489 public static com.google.cloud.compute.v1.DistributionPolicy parseFrom( 490 com.google.protobuf.ByteString data) 491 throws com.google.protobuf.InvalidProtocolBufferException { 492 return PARSER.parseFrom(data); 493 } 494 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)495 public static com.google.cloud.compute.v1.DistributionPolicy parseFrom( 496 com.google.protobuf.ByteString data, 497 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 498 throws com.google.protobuf.InvalidProtocolBufferException { 499 return PARSER.parseFrom(data, extensionRegistry); 500 } 501 parseFrom(byte[] data)502 public static com.google.cloud.compute.v1.DistributionPolicy parseFrom(byte[] data) 503 throws com.google.protobuf.InvalidProtocolBufferException { 504 return PARSER.parseFrom(data); 505 } 506 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)507 public static com.google.cloud.compute.v1.DistributionPolicy parseFrom( 508 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 509 throws com.google.protobuf.InvalidProtocolBufferException { 510 return PARSER.parseFrom(data, extensionRegistry); 511 } 512 parseFrom(java.io.InputStream input)513 public static com.google.cloud.compute.v1.DistributionPolicy parseFrom(java.io.InputStream input) 514 throws java.io.IOException { 515 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 516 } 517 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)518 public static com.google.cloud.compute.v1.DistributionPolicy parseFrom( 519 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 520 throws java.io.IOException { 521 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 522 PARSER, input, extensionRegistry); 523 } 524 parseDelimitedFrom( java.io.InputStream input)525 public static com.google.cloud.compute.v1.DistributionPolicy parseDelimitedFrom( 526 java.io.InputStream input) throws java.io.IOException { 527 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 528 } 529 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)530 public static com.google.cloud.compute.v1.DistributionPolicy parseDelimitedFrom( 531 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 532 throws java.io.IOException { 533 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 534 PARSER, input, extensionRegistry); 535 } 536 parseFrom( com.google.protobuf.CodedInputStream input)537 public static com.google.cloud.compute.v1.DistributionPolicy parseFrom( 538 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 539 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 540 } 541 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)542 public static com.google.cloud.compute.v1.DistributionPolicy parseFrom( 543 com.google.protobuf.CodedInputStream input, 544 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 545 throws java.io.IOException { 546 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 547 PARSER, input, extensionRegistry); 548 } 549 550 @java.lang.Override newBuilderForType()551 public Builder newBuilderForType() { 552 return newBuilder(); 553 } 554 newBuilder()555 public static Builder newBuilder() { 556 return DEFAULT_INSTANCE.toBuilder(); 557 } 558 newBuilder(com.google.cloud.compute.v1.DistributionPolicy prototype)559 public static Builder newBuilder(com.google.cloud.compute.v1.DistributionPolicy prototype) { 560 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 561 } 562 563 @java.lang.Override toBuilder()564 public Builder toBuilder() { 565 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 566 } 567 568 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)569 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 570 Builder builder = new Builder(parent); 571 return builder; 572 } 573 /** 574 * 575 * 576 * <pre> 577 * </pre> 578 * 579 * Protobuf type {@code google.cloud.compute.v1.DistributionPolicy} 580 */ 581 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 582 implements 583 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.DistributionPolicy) 584 com.google.cloud.compute.v1.DistributionPolicyOrBuilder { getDescriptor()585 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 586 return com.google.cloud.compute.v1.Compute 587 .internal_static_google_cloud_compute_v1_DistributionPolicy_descriptor; 588 } 589 590 @java.lang.Override 591 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()592 internalGetFieldAccessorTable() { 593 return com.google.cloud.compute.v1.Compute 594 .internal_static_google_cloud_compute_v1_DistributionPolicy_fieldAccessorTable 595 .ensureFieldAccessorsInitialized( 596 com.google.cloud.compute.v1.DistributionPolicy.class, 597 com.google.cloud.compute.v1.DistributionPolicy.Builder.class); 598 } 599 600 // Construct using com.google.cloud.compute.v1.DistributionPolicy.newBuilder() Builder()601 private Builder() {} 602 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)603 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 604 super(parent); 605 } 606 607 @java.lang.Override clear()608 public Builder clear() { 609 super.clear(); 610 bitField0_ = 0; 611 targetShape_ = ""; 612 if (zonesBuilder_ == null) { 613 zones_ = java.util.Collections.emptyList(); 614 } else { 615 zones_ = null; 616 zonesBuilder_.clear(); 617 } 618 bitField0_ = (bitField0_ & ~0x00000002); 619 return this; 620 } 621 622 @java.lang.Override getDescriptorForType()623 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 624 return com.google.cloud.compute.v1.Compute 625 .internal_static_google_cloud_compute_v1_DistributionPolicy_descriptor; 626 } 627 628 @java.lang.Override getDefaultInstanceForType()629 public com.google.cloud.compute.v1.DistributionPolicy getDefaultInstanceForType() { 630 return com.google.cloud.compute.v1.DistributionPolicy.getDefaultInstance(); 631 } 632 633 @java.lang.Override build()634 public com.google.cloud.compute.v1.DistributionPolicy build() { 635 com.google.cloud.compute.v1.DistributionPolicy result = buildPartial(); 636 if (!result.isInitialized()) { 637 throw newUninitializedMessageException(result); 638 } 639 return result; 640 } 641 642 @java.lang.Override buildPartial()643 public com.google.cloud.compute.v1.DistributionPolicy buildPartial() { 644 com.google.cloud.compute.v1.DistributionPolicy result = 645 new com.google.cloud.compute.v1.DistributionPolicy(this); 646 buildPartialRepeatedFields(result); 647 if (bitField0_ != 0) { 648 buildPartial0(result); 649 } 650 onBuilt(); 651 return result; 652 } 653 buildPartialRepeatedFields(com.google.cloud.compute.v1.DistributionPolicy result)654 private void buildPartialRepeatedFields(com.google.cloud.compute.v1.DistributionPolicy result) { 655 if (zonesBuilder_ == null) { 656 if (((bitField0_ & 0x00000002) != 0)) { 657 zones_ = java.util.Collections.unmodifiableList(zones_); 658 bitField0_ = (bitField0_ & ~0x00000002); 659 } 660 result.zones_ = zones_; 661 } else { 662 result.zones_ = zonesBuilder_.build(); 663 } 664 } 665 buildPartial0(com.google.cloud.compute.v1.DistributionPolicy result)666 private void buildPartial0(com.google.cloud.compute.v1.DistributionPolicy result) { 667 int from_bitField0_ = bitField0_; 668 int to_bitField0_ = 0; 669 if (((from_bitField0_ & 0x00000001) != 0)) { 670 result.targetShape_ = targetShape_; 671 to_bitField0_ |= 0x00000001; 672 } 673 result.bitField0_ |= to_bitField0_; 674 } 675 676 @java.lang.Override clone()677 public Builder clone() { 678 return super.clone(); 679 } 680 681 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)682 public Builder setField( 683 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 684 return super.setField(field, value); 685 } 686 687 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)688 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 689 return super.clearField(field); 690 } 691 692 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)693 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 694 return super.clearOneof(oneof); 695 } 696 697 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)698 public Builder setRepeatedField( 699 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 700 return super.setRepeatedField(field, index, value); 701 } 702 703 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)704 public Builder addRepeatedField( 705 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 706 return super.addRepeatedField(field, value); 707 } 708 709 @java.lang.Override mergeFrom(com.google.protobuf.Message other)710 public Builder mergeFrom(com.google.protobuf.Message other) { 711 if (other instanceof com.google.cloud.compute.v1.DistributionPolicy) { 712 return mergeFrom((com.google.cloud.compute.v1.DistributionPolicy) other); 713 } else { 714 super.mergeFrom(other); 715 return this; 716 } 717 } 718 mergeFrom(com.google.cloud.compute.v1.DistributionPolicy other)719 public Builder mergeFrom(com.google.cloud.compute.v1.DistributionPolicy other) { 720 if (other == com.google.cloud.compute.v1.DistributionPolicy.getDefaultInstance()) return this; 721 if (other.hasTargetShape()) { 722 targetShape_ = other.targetShape_; 723 bitField0_ |= 0x00000001; 724 onChanged(); 725 } 726 if (zonesBuilder_ == null) { 727 if (!other.zones_.isEmpty()) { 728 if (zones_.isEmpty()) { 729 zones_ = other.zones_; 730 bitField0_ = (bitField0_ & ~0x00000002); 731 } else { 732 ensureZonesIsMutable(); 733 zones_.addAll(other.zones_); 734 } 735 onChanged(); 736 } 737 } else { 738 if (!other.zones_.isEmpty()) { 739 if (zonesBuilder_.isEmpty()) { 740 zonesBuilder_.dispose(); 741 zonesBuilder_ = null; 742 zones_ = other.zones_; 743 bitField0_ = (bitField0_ & ~0x00000002); 744 zonesBuilder_ = 745 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 746 ? getZonesFieldBuilder() 747 : null; 748 } else { 749 zonesBuilder_.addAllMessages(other.zones_); 750 } 751 } 752 } 753 this.mergeUnknownFields(other.getUnknownFields()); 754 onChanged(); 755 return this; 756 } 757 758 @java.lang.Override isInitialized()759 public final boolean isInitialized() { 760 return true; 761 } 762 763 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)764 public Builder mergeFrom( 765 com.google.protobuf.CodedInputStream input, 766 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 767 throws java.io.IOException { 768 if (extensionRegistry == null) { 769 throw new java.lang.NullPointerException(); 770 } 771 try { 772 boolean done = false; 773 while (!done) { 774 int tag = input.readTag(); 775 switch (tag) { 776 case 0: 777 done = true; 778 break; 779 case 928682554: 780 { 781 com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration m = 782 input.readMessage( 783 com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.parser(), 784 extensionRegistry); 785 if (zonesBuilder_ == null) { 786 ensureZonesIsMutable(); 787 zones_.add(m); 788 } else { 789 zonesBuilder_.addMessage(m); 790 } 791 break; 792 } // case 928682554 793 case -1585996902: 794 { 795 targetShape_ = input.readStringRequireUtf8(); 796 bitField0_ |= 0x00000001; 797 break; 798 } // case -1585996902 799 default: 800 { 801 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 802 done = true; // was an endgroup tag 803 } 804 break; 805 } // default: 806 } // switch (tag) 807 } // while (!done) 808 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 809 throw e.unwrapIOException(); 810 } finally { 811 onChanged(); 812 } // finally 813 return this; 814 } 815 816 private int bitField0_; 817 818 private java.lang.Object targetShape_ = ""; 819 /** 820 * 821 * 822 * <pre> 823 * The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). 824 * Check the TargetShape enum for the list of possible values. 825 * </pre> 826 * 827 * <code>optional string target_shape = 338621299;</code> 828 * 829 * @return Whether the targetShape field is set. 830 */ hasTargetShape()831 public boolean hasTargetShape() { 832 return ((bitField0_ & 0x00000001) != 0); 833 } 834 /** 835 * 836 * 837 * <pre> 838 * The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). 839 * Check the TargetShape enum for the list of possible values. 840 * </pre> 841 * 842 * <code>optional string target_shape = 338621299;</code> 843 * 844 * @return The targetShape. 845 */ getTargetShape()846 public java.lang.String getTargetShape() { 847 java.lang.Object ref = targetShape_; 848 if (!(ref instanceof java.lang.String)) { 849 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 850 java.lang.String s = bs.toStringUtf8(); 851 targetShape_ = s; 852 return s; 853 } else { 854 return (java.lang.String) ref; 855 } 856 } 857 /** 858 * 859 * 860 * <pre> 861 * The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). 862 * Check the TargetShape enum for the list of possible values. 863 * </pre> 864 * 865 * <code>optional string target_shape = 338621299;</code> 866 * 867 * @return The bytes for targetShape. 868 */ getTargetShapeBytes()869 public com.google.protobuf.ByteString getTargetShapeBytes() { 870 java.lang.Object ref = targetShape_; 871 if (ref instanceof String) { 872 com.google.protobuf.ByteString b = 873 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 874 targetShape_ = b; 875 return b; 876 } else { 877 return (com.google.protobuf.ByteString) ref; 878 } 879 } 880 /** 881 * 882 * 883 * <pre> 884 * The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). 885 * Check the TargetShape enum for the list of possible values. 886 * </pre> 887 * 888 * <code>optional string target_shape = 338621299;</code> 889 * 890 * @param value The targetShape to set. 891 * @return This builder for chaining. 892 */ setTargetShape(java.lang.String value)893 public Builder setTargetShape(java.lang.String value) { 894 if (value == null) { 895 throw new NullPointerException(); 896 } 897 targetShape_ = value; 898 bitField0_ |= 0x00000001; 899 onChanged(); 900 return this; 901 } 902 /** 903 * 904 * 905 * <pre> 906 * The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). 907 * Check the TargetShape enum for the list of possible values. 908 * </pre> 909 * 910 * <code>optional string target_shape = 338621299;</code> 911 * 912 * @return This builder for chaining. 913 */ clearTargetShape()914 public Builder clearTargetShape() { 915 targetShape_ = getDefaultInstance().getTargetShape(); 916 bitField0_ = (bitField0_ & ~0x00000001); 917 onChanged(); 918 return this; 919 } 920 /** 921 * 922 * 923 * <pre> 924 * The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). 925 * Check the TargetShape enum for the list of possible values. 926 * </pre> 927 * 928 * <code>optional string target_shape = 338621299;</code> 929 * 930 * @param value The bytes for targetShape to set. 931 * @return This builder for chaining. 932 */ setTargetShapeBytes(com.google.protobuf.ByteString value)933 public Builder setTargetShapeBytes(com.google.protobuf.ByteString value) { 934 if (value == null) { 935 throw new NullPointerException(); 936 } 937 checkByteStringIsUtf8(value); 938 targetShape_ = value; 939 bitField0_ |= 0x00000001; 940 onChanged(); 941 return this; 942 } 943 944 private java.util.List<com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration> zones_ = 945 java.util.Collections.emptyList(); 946 ensureZonesIsMutable()947 private void ensureZonesIsMutable() { 948 if (!((bitField0_ & 0x00000002) != 0)) { 949 zones_ = 950 new java.util.ArrayList< 951 com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration>(zones_); 952 bitField0_ |= 0x00000002; 953 } 954 } 955 956 private com.google.protobuf.RepeatedFieldBuilderV3< 957 com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration, 958 com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.Builder, 959 com.google.cloud.compute.v1.DistributionPolicyZoneConfigurationOrBuilder> 960 zonesBuilder_; 961 962 /** 963 * 964 * 965 * <pre> 966 * Zones where the regional managed instance group will create and manage its instances. 967 * </pre> 968 * 969 * <code> 970 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 971 * </code> 972 */ 973 public java.util.List<com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration> getZonesList()974 getZonesList() { 975 if (zonesBuilder_ == null) { 976 return java.util.Collections.unmodifiableList(zones_); 977 } else { 978 return zonesBuilder_.getMessageList(); 979 } 980 } 981 /** 982 * 983 * 984 * <pre> 985 * Zones where the regional managed instance group will create and manage its instances. 986 * </pre> 987 * 988 * <code> 989 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 990 * </code> 991 */ getZonesCount()992 public int getZonesCount() { 993 if (zonesBuilder_ == null) { 994 return zones_.size(); 995 } else { 996 return zonesBuilder_.getCount(); 997 } 998 } 999 /** 1000 * 1001 * 1002 * <pre> 1003 * Zones where the regional managed instance group will create and manage its instances. 1004 * </pre> 1005 * 1006 * <code> 1007 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1008 * </code> 1009 */ getZones(int index)1010 public com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration getZones(int index) { 1011 if (zonesBuilder_ == null) { 1012 return zones_.get(index); 1013 } else { 1014 return zonesBuilder_.getMessage(index); 1015 } 1016 } 1017 /** 1018 * 1019 * 1020 * <pre> 1021 * Zones where the regional managed instance group will create and manage its instances. 1022 * </pre> 1023 * 1024 * <code> 1025 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1026 * </code> 1027 */ setZones( int index, com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration value)1028 public Builder setZones( 1029 int index, com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration value) { 1030 if (zonesBuilder_ == null) { 1031 if (value == null) { 1032 throw new NullPointerException(); 1033 } 1034 ensureZonesIsMutable(); 1035 zones_.set(index, value); 1036 onChanged(); 1037 } else { 1038 zonesBuilder_.setMessage(index, value); 1039 } 1040 return this; 1041 } 1042 /** 1043 * 1044 * 1045 * <pre> 1046 * Zones where the regional managed instance group will create and manage its instances. 1047 * </pre> 1048 * 1049 * <code> 1050 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1051 * </code> 1052 */ setZones( int index, com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.Builder builderForValue)1053 public Builder setZones( 1054 int index, 1055 com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.Builder builderForValue) { 1056 if (zonesBuilder_ == null) { 1057 ensureZonesIsMutable(); 1058 zones_.set(index, builderForValue.build()); 1059 onChanged(); 1060 } else { 1061 zonesBuilder_.setMessage(index, builderForValue.build()); 1062 } 1063 return this; 1064 } 1065 /** 1066 * 1067 * 1068 * <pre> 1069 * Zones where the regional managed instance group will create and manage its instances. 1070 * </pre> 1071 * 1072 * <code> 1073 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1074 * </code> 1075 */ addZones(com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration value)1076 public Builder addZones(com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration value) { 1077 if (zonesBuilder_ == null) { 1078 if (value == null) { 1079 throw new NullPointerException(); 1080 } 1081 ensureZonesIsMutable(); 1082 zones_.add(value); 1083 onChanged(); 1084 } else { 1085 zonesBuilder_.addMessage(value); 1086 } 1087 return this; 1088 } 1089 /** 1090 * 1091 * 1092 * <pre> 1093 * Zones where the regional managed instance group will create and manage its instances. 1094 * </pre> 1095 * 1096 * <code> 1097 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1098 * </code> 1099 */ addZones( int index, com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration value)1100 public Builder addZones( 1101 int index, com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration value) { 1102 if (zonesBuilder_ == null) { 1103 if (value == null) { 1104 throw new NullPointerException(); 1105 } 1106 ensureZonesIsMutable(); 1107 zones_.add(index, value); 1108 onChanged(); 1109 } else { 1110 zonesBuilder_.addMessage(index, value); 1111 } 1112 return this; 1113 } 1114 /** 1115 * 1116 * 1117 * <pre> 1118 * Zones where the regional managed instance group will create and manage its instances. 1119 * </pre> 1120 * 1121 * <code> 1122 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1123 * </code> 1124 */ addZones( com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.Builder builderForValue)1125 public Builder addZones( 1126 com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.Builder builderForValue) { 1127 if (zonesBuilder_ == null) { 1128 ensureZonesIsMutable(); 1129 zones_.add(builderForValue.build()); 1130 onChanged(); 1131 } else { 1132 zonesBuilder_.addMessage(builderForValue.build()); 1133 } 1134 return this; 1135 } 1136 /** 1137 * 1138 * 1139 * <pre> 1140 * Zones where the regional managed instance group will create and manage its instances. 1141 * </pre> 1142 * 1143 * <code> 1144 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1145 * </code> 1146 */ addZones( int index, com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.Builder builderForValue)1147 public Builder addZones( 1148 int index, 1149 com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.Builder builderForValue) { 1150 if (zonesBuilder_ == null) { 1151 ensureZonesIsMutable(); 1152 zones_.add(index, builderForValue.build()); 1153 onChanged(); 1154 } else { 1155 zonesBuilder_.addMessage(index, builderForValue.build()); 1156 } 1157 return this; 1158 } 1159 /** 1160 * 1161 * 1162 * <pre> 1163 * Zones where the regional managed instance group will create and manage its instances. 1164 * </pre> 1165 * 1166 * <code> 1167 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1168 * </code> 1169 */ addAllZones( java.lang.Iterable< ? extends com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration> values)1170 public Builder addAllZones( 1171 java.lang.Iterable< 1172 ? extends com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration> 1173 values) { 1174 if (zonesBuilder_ == null) { 1175 ensureZonesIsMutable(); 1176 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, zones_); 1177 onChanged(); 1178 } else { 1179 zonesBuilder_.addAllMessages(values); 1180 } 1181 return this; 1182 } 1183 /** 1184 * 1185 * 1186 * <pre> 1187 * Zones where the regional managed instance group will create and manage its instances. 1188 * </pre> 1189 * 1190 * <code> 1191 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1192 * </code> 1193 */ clearZones()1194 public Builder clearZones() { 1195 if (zonesBuilder_ == null) { 1196 zones_ = java.util.Collections.emptyList(); 1197 bitField0_ = (bitField0_ & ~0x00000002); 1198 onChanged(); 1199 } else { 1200 zonesBuilder_.clear(); 1201 } 1202 return this; 1203 } 1204 /** 1205 * 1206 * 1207 * <pre> 1208 * Zones where the regional managed instance group will create and manage its instances. 1209 * </pre> 1210 * 1211 * <code> 1212 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1213 * </code> 1214 */ removeZones(int index)1215 public Builder removeZones(int index) { 1216 if (zonesBuilder_ == null) { 1217 ensureZonesIsMutable(); 1218 zones_.remove(index); 1219 onChanged(); 1220 } else { 1221 zonesBuilder_.remove(index); 1222 } 1223 return this; 1224 } 1225 /** 1226 * 1227 * 1228 * <pre> 1229 * Zones where the regional managed instance group will create and manage its instances. 1230 * </pre> 1231 * 1232 * <code> 1233 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1234 * </code> 1235 */ getZonesBuilder( int index)1236 public com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.Builder getZonesBuilder( 1237 int index) { 1238 return getZonesFieldBuilder().getBuilder(index); 1239 } 1240 /** 1241 * 1242 * 1243 * <pre> 1244 * Zones where the regional managed instance group will create and manage its instances. 1245 * </pre> 1246 * 1247 * <code> 1248 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1249 * </code> 1250 */ 1251 public com.google.cloud.compute.v1.DistributionPolicyZoneConfigurationOrBuilder getZonesOrBuilder(int index)1252 getZonesOrBuilder(int index) { 1253 if (zonesBuilder_ == null) { 1254 return zones_.get(index); 1255 } else { 1256 return zonesBuilder_.getMessageOrBuilder(index); 1257 } 1258 } 1259 /** 1260 * 1261 * 1262 * <pre> 1263 * Zones where the regional managed instance group will create and manage its instances. 1264 * </pre> 1265 * 1266 * <code> 1267 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1268 * </code> 1269 */ 1270 public java.util.List< 1271 ? extends com.google.cloud.compute.v1.DistributionPolicyZoneConfigurationOrBuilder> getZonesOrBuilderList()1272 getZonesOrBuilderList() { 1273 if (zonesBuilder_ != null) { 1274 return zonesBuilder_.getMessageOrBuilderList(); 1275 } else { 1276 return java.util.Collections.unmodifiableList(zones_); 1277 } 1278 } 1279 /** 1280 * 1281 * 1282 * <pre> 1283 * Zones where the regional managed instance group will create and manage its instances. 1284 * </pre> 1285 * 1286 * <code> 1287 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1288 * </code> 1289 */ 1290 public com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.Builder addZonesBuilder()1291 addZonesBuilder() { 1292 return getZonesFieldBuilder() 1293 .addBuilder( 1294 com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.getDefaultInstance()); 1295 } 1296 /** 1297 * 1298 * 1299 * <pre> 1300 * Zones where the regional managed instance group will create and manage its instances. 1301 * </pre> 1302 * 1303 * <code> 1304 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1305 * </code> 1306 */ addZonesBuilder( int index)1307 public com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.Builder addZonesBuilder( 1308 int index) { 1309 return getZonesFieldBuilder() 1310 .addBuilder( 1311 index, 1312 com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.getDefaultInstance()); 1313 } 1314 /** 1315 * 1316 * 1317 * <pre> 1318 * Zones where the regional managed instance group will create and manage its instances. 1319 * </pre> 1320 * 1321 * <code> 1322 * repeated .google.cloud.compute.v1.DistributionPolicyZoneConfiguration zones = 116085319; 1323 * </code> 1324 */ 1325 public java.util.List<com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.Builder> getZonesBuilderList()1326 getZonesBuilderList() { 1327 return getZonesFieldBuilder().getBuilderList(); 1328 } 1329 1330 private com.google.protobuf.RepeatedFieldBuilderV3< 1331 com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration, 1332 com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.Builder, 1333 com.google.cloud.compute.v1.DistributionPolicyZoneConfigurationOrBuilder> getZonesFieldBuilder()1334 getZonesFieldBuilder() { 1335 if (zonesBuilder_ == null) { 1336 zonesBuilder_ = 1337 new com.google.protobuf.RepeatedFieldBuilderV3< 1338 com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration, 1339 com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.Builder, 1340 com.google.cloud.compute.v1.DistributionPolicyZoneConfigurationOrBuilder>( 1341 zones_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); 1342 zones_ = null; 1343 } 1344 return zonesBuilder_; 1345 } 1346 1347 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1348 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1349 return super.setUnknownFields(unknownFields); 1350 } 1351 1352 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1353 public final Builder mergeUnknownFields( 1354 final com.google.protobuf.UnknownFieldSet unknownFields) { 1355 return super.mergeUnknownFields(unknownFields); 1356 } 1357 1358 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.DistributionPolicy) 1359 } 1360 1361 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.DistributionPolicy) 1362 private static final com.google.cloud.compute.v1.DistributionPolicy DEFAULT_INSTANCE; 1363 1364 static { 1365 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.DistributionPolicy(); 1366 } 1367 getDefaultInstance()1368 public static com.google.cloud.compute.v1.DistributionPolicy getDefaultInstance() { 1369 return DEFAULT_INSTANCE; 1370 } 1371 1372 private static final com.google.protobuf.Parser<DistributionPolicy> PARSER = 1373 new com.google.protobuf.AbstractParser<DistributionPolicy>() { 1374 @java.lang.Override 1375 public DistributionPolicy parsePartialFrom( 1376 com.google.protobuf.CodedInputStream input, 1377 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1378 throws com.google.protobuf.InvalidProtocolBufferException { 1379 Builder builder = newBuilder(); 1380 try { 1381 builder.mergeFrom(input, extensionRegistry); 1382 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1383 throw e.setUnfinishedMessage(builder.buildPartial()); 1384 } catch (com.google.protobuf.UninitializedMessageException e) { 1385 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1386 } catch (java.io.IOException e) { 1387 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1388 .setUnfinishedMessage(builder.buildPartial()); 1389 } 1390 return builder.buildPartial(); 1391 } 1392 }; 1393 parser()1394 public static com.google.protobuf.Parser<DistributionPolicy> parser() { 1395 return PARSER; 1396 } 1397 1398 @java.lang.Override getParserForType()1399 public com.google.protobuf.Parser<DistributionPolicy> getParserForType() { 1400 return PARSER; 1401 } 1402 1403 @java.lang.Override getDefaultInstanceForType()1404 public com.google.cloud.compute.v1.DistributionPolicy getDefaultInstanceForType() { 1405 return DEFAULT_INSTANCE; 1406 } 1407 } 1408