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/container/v1/cluster_service.proto 18 19 package com.google.container.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * ClusterAutoscaling contains global, per-cluster information 26 * required by Cluster Autoscaler to automatically adjust 27 * the size of the cluster and create/delete 28 * node pools based on the current needs. 29 * </pre> 30 * 31 * Protobuf type {@code google.container.v1.ClusterAutoscaling} 32 */ 33 public final class ClusterAutoscaling extends com.google.protobuf.GeneratedMessageV3 34 implements 35 // @@protoc_insertion_point(message_implements:google.container.v1.ClusterAutoscaling) 36 ClusterAutoscalingOrBuilder { 37 private static final long serialVersionUID = 0L; 38 // Use ClusterAutoscaling.newBuilder() to construct. ClusterAutoscaling(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)39 private ClusterAutoscaling(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 40 super(builder); 41 } 42 ClusterAutoscaling()43 private ClusterAutoscaling() { 44 resourceLimits_ = java.util.Collections.emptyList(); 45 autoscalingProfile_ = 0; 46 autoprovisioningLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; 47 } 48 49 @java.lang.Override 50 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)51 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 52 return new ClusterAutoscaling(); 53 } 54 55 @java.lang.Override getUnknownFields()56 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 57 return this.unknownFields; 58 } 59 getDescriptor()60 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 61 return com.google.container.v1.ClusterServiceProto 62 .internal_static_google_container_v1_ClusterAutoscaling_descriptor; 63 } 64 65 @java.lang.Override 66 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()67 internalGetFieldAccessorTable() { 68 return com.google.container.v1.ClusterServiceProto 69 .internal_static_google_container_v1_ClusterAutoscaling_fieldAccessorTable 70 .ensureFieldAccessorsInitialized( 71 com.google.container.v1.ClusterAutoscaling.class, 72 com.google.container.v1.ClusterAutoscaling.Builder.class); 73 } 74 75 /** 76 * 77 * 78 * <pre> 79 * Defines possible options for autoscaling_profile field. 80 * </pre> 81 * 82 * Protobuf enum {@code google.container.v1.ClusterAutoscaling.AutoscalingProfile} 83 */ 84 public enum AutoscalingProfile implements com.google.protobuf.ProtocolMessageEnum { 85 /** 86 * 87 * 88 * <pre> 89 * No change to autoscaling configuration. 90 * </pre> 91 * 92 * <code>PROFILE_UNSPECIFIED = 0;</code> 93 */ 94 PROFILE_UNSPECIFIED(0), 95 /** 96 * 97 * 98 * <pre> 99 * Prioritize optimizing utilization of resources. 100 * </pre> 101 * 102 * <code>OPTIMIZE_UTILIZATION = 1;</code> 103 */ 104 OPTIMIZE_UTILIZATION(1), 105 /** 106 * 107 * 108 * <pre> 109 * Use default (balanced) autoscaling configuration. 110 * </pre> 111 * 112 * <code>BALANCED = 2;</code> 113 */ 114 BALANCED(2), 115 UNRECOGNIZED(-1), 116 ; 117 118 /** 119 * 120 * 121 * <pre> 122 * No change to autoscaling configuration. 123 * </pre> 124 * 125 * <code>PROFILE_UNSPECIFIED = 0;</code> 126 */ 127 public static final int PROFILE_UNSPECIFIED_VALUE = 0; 128 /** 129 * 130 * 131 * <pre> 132 * Prioritize optimizing utilization of resources. 133 * </pre> 134 * 135 * <code>OPTIMIZE_UTILIZATION = 1;</code> 136 */ 137 public static final int OPTIMIZE_UTILIZATION_VALUE = 1; 138 /** 139 * 140 * 141 * <pre> 142 * Use default (balanced) autoscaling configuration. 143 * </pre> 144 * 145 * <code>BALANCED = 2;</code> 146 */ 147 public static final int BALANCED_VALUE = 2; 148 getNumber()149 public final int getNumber() { 150 if (this == UNRECOGNIZED) { 151 throw new java.lang.IllegalArgumentException( 152 "Can't get the number of an unknown enum value."); 153 } 154 return value; 155 } 156 157 /** 158 * @param value The numeric wire value of the corresponding enum entry. 159 * @return The enum associated with the given numeric wire value. 160 * @deprecated Use {@link #forNumber(int)} instead. 161 */ 162 @java.lang.Deprecated valueOf(int value)163 public static AutoscalingProfile valueOf(int value) { 164 return forNumber(value); 165 } 166 167 /** 168 * @param value The numeric wire value of the corresponding enum entry. 169 * @return The enum associated with the given numeric wire value. 170 */ forNumber(int value)171 public static AutoscalingProfile forNumber(int value) { 172 switch (value) { 173 case 0: 174 return PROFILE_UNSPECIFIED; 175 case 1: 176 return OPTIMIZE_UTILIZATION; 177 case 2: 178 return BALANCED; 179 default: 180 return null; 181 } 182 } 183 184 public static com.google.protobuf.Internal.EnumLiteMap<AutoscalingProfile> internalGetValueMap()185 internalGetValueMap() { 186 return internalValueMap; 187 } 188 189 private static final com.google.protobuf.Internal.EnumLiteMap<AutoscalingProfile> 190 internalValueMap = 191 new com.google.protobuf.Internal.EnumLiteMap<AutoscalingProfile>() { 192 public AutoscalingProfile findValueByNumber(int number) { 193 return AutoscalingProfile.forNumber(number); 194 } 195 }; 196 getValueDescriptor()197 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 198 if (this == UNRECOGNIZED) { 199 throw new java.lang.IllegalStateException( 200 "Can't get the descriptor of an unrecognized enum value."); 201 } 202 return getDescriptor().getValues().get(ordinal()); 203 } 204 getDescriptorForType()205 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 206 return getDescriptor(); 207 } 208 getDescriptor()209 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 210 return com.google.container.v1.ClusterAutoscaling.getDescriptor().getEnumTypes().get(0); 211 } 212 213 private static final AutoscalingProfile[] VALUES = values(); 214 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)215 public static AutoscalingProfile valueOf( 216 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 217 if (desc.getType() != getDescriptor()) { 218 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 219 } 220 if (desc.getIndex() == -1) { 221 return UNRECOGNIZED; 222 } 223 return VALUES[desc.getIndex()]; 224 } 225 226 private final int value; 227 AutoscalingProfile(int value)228 private AutoscalingProfile(int value) { 229 this.value = value; 230 } 231 232 // @@protoc_insertion_point(enum_scope:google.container.v1.ClusterAutoscaling.AutoscalingProfile) 233 } 234 235 public static final int ENABLE_NODE_AUTOPROVISIONING_FIELD_NUMBER = 1; 236 private boolean enableNodeAutoprovisioning_ = false; 237 /** 238 * 239 * 240 * <pre> 241 * Enables automatic node pool creation and deletion. 242 * </pre> 243 * 244 * <code>bool enable_node_autoprovisioning = 1;</code> 245 * 246 * @return The enableNodeAutoprovisioning. 247 */ 248 @java.lang.Override getEnableNodeAutoprovisioning()249 public boolean getEnableNodeAutoprovisioning() { 250 return enableNodeAutoprovisioning_; 251 } 252 253 public static final int RESOURCE_LIMITS_FIELD_NUMBER = 2; 254 255 @SuppressWarnings("serial") 256 private java.util.List<com.google.container.v1.ResourceLimit> resourceLimits_; 257 /** 258 * 259 * 260 * <pre> 261 * Contains global constraints regarding minimum and maximum 262 * amount of resources in the cluster. 263 * </pre> 264 * 265 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 266 */ 267 @java.lang.Override getResourceLimitsList()268 public java.util.List<com.google.container.v1.ResourceLimit> getResourceLimitsList() { 269 return resourceLimits_; 270 } 271 /** 272 * 273 * 274 * <pre> 275 * Contains global constraints regarding minimum and maximum 276 * amount of resources in the cluster. 277 * </pre> 278 * 279 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 280 */ 281 @java.lang.Override 282 public java.util.List<? extends com.google.container.v1.ResourceLimitOrBuilder> getResourceLimitsOrBuilderList()283 getResourceLimitsOrBuilderList() { 284 return resourceLimits_; 285 } 286 /** 287 * 288 * 289 * <pre> 290 * Contains global constraints regarding minimum and maximum 291 * amount of resources in the cluster. 292 * </pre> 293 * 294 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 295 */ 296 @java.lang.Override getResourceLimitsCount()297 public int getResourceLimitsCount() { 298 return resourceLimits_.size(); 299 } 300 /** 301 * 302 * 303 * <pre> 304 * Contains global constraints regarding minimum and maximum 305 * amount of resources in the cluster. 306 * </pre> 307 * 308 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 309 */ 310 @java.lang.Override getResourceLimits(int index)311 public com.google.container.v1.ResourceLimit getResourceLimits(int index) { 312 return resourceLimits_.get(index); 313 } 314 /** 315 * 316 * 317 * <pre> 318 * Contains global constraints regarding minimum and maximum 319 * amount of resources in the cluster. 320 * </pre> 321 * 322 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 323 */ 324 @java.lang.Override getResourceLimitsOrBuilder(int index)325 public com.google.container.v1.ResourceLimitOrBuilder getResourceLimitsOrBuilder(int index) { 326 return resourceLimits_.get(index); 327 } 328 329 public static final int AUTOSCALING_PROFILE_FIELD_NUMBER = 3; 330 private int autoscalingProfile_ = 0; 331 /** 332 * 333 * 334 * <pre> 335 * Defines autoscaling behaviour. 336 * </pre> 337 * 338 * <code>.google.container.v1.ClusterAutoscaling.AutoscalingProfile autoscaling_profile = 3; 339 * </code> 340 * 341 * @return The enum numeric value on the wire for autoscalingProfile. 342 */ 343 @java.lang.Override getAutoscalingProfileValue()344 public int getAutoscalingProfileValue() { 345 return autoscalingProfile_; 346 } 347 /** 348 * 349 * 350 * <pre> 351 * Defines autoscaling behaviour. 352 * </pre> 353 * 354 * <code>.google.container.v1.ClusterAutoscaling.AutoscalingProfile autoscaling_profile = 3; 355 * </code> 356 * 357 * @return The autoscalingProfile. 358 */ 359 @java.lang.Override getAutoscalingProfile()360 public com.google.container.v1.ClusterAutoscaling.AutoscalingProfile getAutoscalingProfile() { 361 com.google.container.v1.ClusterAutoscaling.AutoscalingProfile result = 362 com.google.container.v1.ClusterAutoscaling.AutoscalingProfile.forNumber( 363 autoscalingProfile_); 364 return result == null 365 ? com.google.container.v1.ClusterAutoscaling.AutoscalingProfile.UNRECOGNIZED 366 : result; 367 } 368 369 public static final int AUTOPROVISIONING_NODE_POOL_DEFAULTS_FIELD_NUMBER = 4; 370 private com.google.container.v1.AutoprovisioningNodePoolDefaults 371 autoprovisioningNodePoolDefaults_; 372 /** 373 * 374 * 375 * <pre> 376 * AutoprovisioningNodePoolDefaults contains defaults for a node pool 377 * created by NAP. 378 * </pre> 379 * 380 * <code> 381 * .google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; 382 * </code> 383 * 384 * @return Whether the autoprovisioningNodePoolDefaults field is set. 385 */ 386 @java.lang.Override hasAutoprovisioningNodePoolDefaults()387 public boolean hasAutoprovisioningNodePoolDefaults() { 388 return autoprovisioningNodePoolDefaults_ != null; 389 } 390 /** 391 * 392 * 393 * <pre> 394 * AutoprovisioningNodePoolDefaults contains defaults for a node pool 395 * created by NAP. 396 * </pre> 397 * 398 * <code> 399 * .google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; 400 * </code> 401 * 402 * @return The autoprovisioningNodePoolDefaults. 403 */ 404 @java.lang.Override 405 public com.google.container.v1.AutoprovisioningNodePoolDefaults getAutoprovisioningNodePoolDefaults()406 getAutoprovisioningNodePoolDefaults() { 407 return autoprovisioningNodePoolDefaults_ == null 408 ? com.google.container.v1.AutoprovisioningNodePoolDefaults.getDefaultInstance() 409 : autoprovisioningNodePoolDefaults_; 410 } 411 /** 412 * 413 * 414 * <pre> 415 * AutoprovisioningNodePoolDefaults contains defaults for a node pool 416 * created by NAP. 417 * </pre> 418 * 419 * <code> 420 * .google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; 421 * </code> 422 */ 423 @java.lang.Override 424 public com.google.container.v1.AutoprovisioningNodePoolDefaultsOrBuilder getAutoprovisioningNodePoolDefaultsOrBuilder()425 getAutoprovisioningNodePoolDefaultsOrBuilder() { 426 return autoprovisioningNodePoolDefaults_ == null 427 ? com.google.container.v1.AutoprovisioningNodePoolDefaults.getDefaultInstance() 428 : autoprovisioningNodePoolDefaults_; 429 } 430 431 public static final int AUTOPROVISIONING_LOCATIONS_FIELD_NUMBER = 5; 432 433 @SuppressWarnings("serial") 434 private com.google.protobuf.LazyStringList autoprovisioningLocations_; 435 /** 436 * 437 * 438 * <pre> 439 * The list of Google Compute Engine 440 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 441 * NodePool's nodes can be created by NAP. 442 * </pre> 443 * 444 * <code>repeated string autoprovisioning_locations = 5;</code> 445 * 446 * @return A list containing the autoprovisioningLocations. 447 */ getAutoprovisioningLocationsList()448 public com.google.protobuf.ProtocolStringList getAutoprovisioningLocationsList() { 449 return autoprovisioningLocations_; 450 } 451 /** 452 * 453 * 454 * <pre> 455 * The list of Google Compute Engine 456 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 457 * NodePool's nodes can be created by NAP. 458 * </pre> 459 * 460 * <code>repeated string autoprovisioning_locations = 5;</code> 461 * 462 * @return The count of autoprovisioningLocations. 463 */ getAutoprovisioningLocationsCount()464 public int getAutoprovisioningLocationsCount() { 465 return autoprovisioningLocations_.size(); 466 } 467 /** 468 * 469 * 470 * <pre> 471 * The list of Google Compute Engine 472 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 473 * NodePool's nodes can be created by NAP. 474 * </pre> 475 * 476 * <code>repeated string autoprovisioning_locations = 5;</code> 477 * 478 * @param index The index of the element to return. 479 * @return The autoprovisioningLocations at the given index. 480 */ getAutoprovisioningLocations(int index)481 public java.lang.String getAutoprovisioningLocations(int index) { 482 return autoprovisioningLocations_.get(index); 483 } 484 /** 485 * 486 * 487 * <pre> 488 * The list of Google Compute Engine 489 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 490 * NodePool's nodes can be created by NAP. 491 * </pre> 492 * 493 * <code>repeated string autoprovisioning_locations = 5;</code> 494 * 495 * @param index The index of the value to return. 496 * @return The bytes of the autoprovisioningLocations at the given index. 497 */ getAutoprovisioningLocationsBytes(int index)498 public com.google.protobuf.ByteString getAutoprovisioningLocationsBytes(int index) { 499 return autoprovisioningLocations_.getByteString(index); 500 } 501 502 private byte memoizedIsInitialized = -1; 503 504 @java.lang.Override isInitialized()505 public final boolean isInitialized() { 506 byte isInitialized = memoizedIsInitialized; 507 if (isInitialized == 1) return true; 508 if (isInitialized == 0) return false; 509 510 memoizedIsInitialized = 1; 511 return true; 512 } 513 514 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)515 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 516 if (enableNodeAutoprovisioning_ != false) { 517 output.writeBool(1, enableNodeAutoprovisioning_); 518 } 519 for (int i = 0; i < resourceLimits_.size(); i++) { 520 output.writeMessage(2, resourceLimits_.get(i)); 521 } 522 if (autoscalingProfile_ 523 != com.google.container.v1.ClusterAutoscaling.AutoscalingProfile.PROFILE_UNSPECIFIED 524 .getNumber()) { 525 output.writeEnum(3, autoscalingProfile_); 526 } 527 if (autoprovisioningNodePoolDefaults_ != null) { 528 output.writeMessage(4, getAutoprovisioningNodePoolDefaults()); 529 } 530 for (int i = 0; i < autoprovisioningLocations_.size(); i++) { 531 com.google.protobuf.GeneratedMessageV3.writeString( 532 output, 5, autoprovisioningLocations_.getRaw(i)); 533 } 534 getUnknownFields().writeTo(output); 535 } 536 537 @java.lang.Override getSerializedSize()538 public int getSerializedSize() { 539 int size = memoizedSize; 540 if (size != -1) return size; 541 542 size = 0; 543 if (enableNodeAutoprovisioning_ != false) { 544 size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableNodeAutoprovisioning_); 545 } 546 for (int i = 0; i < resourceLimits_.size(); i++) { 547 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, resourceLimits_.get(i)); 548 } 549 if (autoscalingProfile_ 550 != com.google.container.v1.ClusterAutoscaling.AutoscalingProfile.PROFILE_UNSPECIFIED 551 .getNumber()) { 552 size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, autoscalingProfile_); 553 } 554 if (autoprovisioningNodePoolDefaults_ != null) { 555 size += 556 com.google.protobuf.CodedOutputStream.computeMessageSize( 557 4, getAutoprovisioningNodePoolDefaults()); 558 } 559 { 560 int dataSize = 0; 561 for (int i = 0; i < autoprovisioningLocations_.size(); i++) { 562 dataSize += computeStringSizeNoTag(autoprovisioningLocations_.getRaw(i)); 563 } 564 size += dataSize; 565 size += 1 * getAutoprovisioningLocationsList().size(); 566 } 567 size += getUnknownFields().getSerializedSize(); 568 memoizedSize = size; 569 return size; 570 } 571 572 @java.lang.Override equals(final java.lang.Object obj)573 public boolean equals(final java.lang.Object obj) { 574 if (obj == this) { 575 return true; 576 } 577 if (!(obj instanceof com.google.container.v1.ClusterAutoscaling)) { 578 return super.equals(obj); 579 } 580 com.google.container.v1.ClusterAutoscaling other = 581 (com.google.container.v1.ClusterAutoscaling) obj; 582 583 if (getEnableNodeAutoprovisioning() != other.getEnableNodeAutoprovisioning()) return false; 584 if (!getResourceLimitsList().equals(other.getResourceLimitsList())) return false; 585 if (autoscalingProfile_ != other.autoscalingProfile_) return false; 586 if (hasAutoprovisioningNodePoolDefaults() != other.hasAutoprovisioningNodePoolDefaults()) 587 return false; 588 if (hasAutoprovisioningNodePoolDefaults()) { 589 if (!getAutoprovisioningNodePoolDefaults() 590 .equals(other.getAutoprovisioningNodePoolDefaults())) return false; 591 } 592 if (!getAutoprovisioningLocationsList().equals(other.getAutoprovisioningLocationsList())) 593 return false; 594 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 595 return true; 596 } 597 598 @java.lang.Override hashCode()599 public int hashCode() { 600 if (memoizedHashCode != 0) { 601 return memoizedHashCode; 602 } 603 int hash = 41; 604 hash = (19 * hash) + getDescriptor().hashCode(); 605 hash = (37 * hash) + ENABLE_NODE_AUTOPROVISIONING_FIELD_NUMBER; 606 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableNodeAutoprovisioning()); 607 if (getResourceLimitsCount() > 0) { 608 hash = (37 * hash) + RESOURCE_LIMITS_FIELD_NUMBER; 609 hash = (53 * hash) + getResourceLimitsList().hashCode(); 610 } 611 hash = (37 * hash) + AUTOSCALING_PROFILE_FIELD_NUMBER; 612 hash = (53 * hash) + autoscalingProfile_; 613 if (hasAutoprovisioningNodePoolDefaults()) { 614 hash = (37 * hash) + AUTOPROVISIONING_NODE_POOL_DEFAULTS_FIELD_NUMBER; 615 hash = (53 * hash) + getAutoprovisioningNodePoolDefaults().hashCode(); 616 } 617 if (getAutoprovisioningLocationsCount() > 0) { 618 hash = (37 * hash) + AUTOPROVISIONING_LOCATIONS_FIELD_NUMBER; 619 hash = (53 * hash) + getAutoprovisioningLocationsList().hashCode(); 620 } 621 hash = (29 * hash) + getUnknownFields().hashCode(); 622 memoizedHashCode = hash; 623 return hash; 624 } 625 parseFrom(java.nio.ByteBuffer data)626 public static com.google.container.v1.ClusterAutoscaling parseFrom(java.nio.ByteBuffer data) 627 throws com.google.protobuf.InvalidProtocolBufferException { 628 return PARSER.parseFrom(data); 629 } 630 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)631 public static com.google.container.v1.ClusterAutoscaling parseFrom( 632 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 633 throws com.google.protobuf.InvalidProtocolBufferException { 634 return PARSER.parseFrom(data, extensionRegistry); 635 } 636 parseFrom( com.google.protobuf.ByteString data)637 public static com.google.container.v1.ClusterAutoscaling parseFrom( 638 com.google.protobuf.ByteString data) 639 throws com.google.protobuf.InvalidProtocolBufferException { 640 return PARSER.parseFrom(data); 641 } 642 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)643 public static com.google.container.v1.ClusterAutoscaling parseFrom( 644 com.google.protobuf.ByteString data, 645 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 646 throws com.google.protobuf.InvalidProtocolBufferException { 647 return PARSER.parseFrom(data, extensionRegistry); 648 } 649 parseFrom(byte[] data)650 public static com.google.container.v1.ClusterAutoscaling parseFrom(byte[] data) 651 throws com.google.protobuf.InvalidProtocolBufferException { 652 return PARSER.parseFrom(data); 653 } 654 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)655 public static com.google.container.v1.ClusterAutoscaling parseFrom( 656 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 657 throws com.google.protobuf.InvalidProtocolBufferException { 658 return PARSER.parseFrom(data, extensionRegistry); 659 } 660 parseFrom(java.io.InputStream input)661 public static com.google.container.v1.ClusterAutoscaling parseFrom(java.io.InputStream input) 662 throws java.io.IOException { 663 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 664 } 665 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)666 public static com.google.container.v1.ClusterAutoscaling parseFrom( 667 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 668 throws java.io.IOException { 669 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 670 PARSER, input, extensionRegistry); 671 } 672 parseDelimitedFrom( java.io.InputStream input)673 public static com.google.container.v1.ClusterAutoscaling parseDelimitedFrom( 674 java.io.InputStream input) throws java.io.IOException { 675 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 676 } 677 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)678 public static com.google.container.v1.ClusterAutoscaling parseDelimitedFrom( 679 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 680 throws java.io.IOException { 681 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 682 PARSER, input, extensionRegistry); 683 } 684 parseFrom( com.google.protobuf.CodedInputStream input)685 public static com.google.container.v1.ClusterAutoscaling parseFrom( 686 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 687 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 688 } 689 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)690 public static com.google.container.v1.ClusterAutoscaling parseFrom( 691 com.google.protobuf.CodedInputStream input, 692 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 693 throws java.io.IOException { 694 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 695 PARSER, input, extensionRegistry); 696 } 697 698 @java.lang.Override newBuilderForType()699 public Builder newBuilderForType() { 700 return newBuilder(); 701 } 702 newBuilder()703 public static Builder newBuilder() { 704 return DEFAULT_INSTANCE.toBuilder(); 705 } 706 newBuilder(com.google.container.v1.ClusterAutoscaling prototype)707 public static Builder newBuilder(com.google.container.v1.ClusterAutoscaling prototype) { 708 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 709 } 710 711 @java.lang.Override toBuilder()712 public Builder toBuilder() { 713 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 714 } 715 716 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)717 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 718 Builder builder = new Builder(parent); 719 return builder; 720 } 721 /** 722 * 723 * 724 * <pre> 725 * ClusterAutoscaling contains global, per-cluster information 726 * required by Cluster Autoscaler to automatically adjust 727 * the size of the cluster and create/delete 728 * node pools based on the current needs. 729 * </pre> 730 * 731 * Protobuf type {@code google.container.v1.ClusterAutoscaling} 732 */ 733 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 734 implements 735 // @@protoc_insertion_point(builder_implements:google.container.v1.ClusterAutoscaling) 736 com.google.container.v1.ClusterAutoscalingOrBuilder { getDescriptor()737 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 738 return com.google.container.v1.ClusterServiceProto 739 .internal_static_google_container_v1_ClusterAutoscaling_descriptor; 740 } 741 742 @java.lang.Override 743 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()744 internalGetFieldAccessorTable() { 745 return com.google.container.v1.ClusterServiceProto 746 .internal_static_google_container_v1_ClusterAutoscaling_fieldAccessorTable 747 .ensureFieldAccessorsInitialized( 748 com.google.container.v1.ClusterAutoscaling.class, 749 com.google.container.v1.ClusterAutoscaling.Builder.class); 750 } 751 752 // Construct using com.google.container.v1.ClusterAutoscaling.newBuilder() Builder()753 private Builder() {} 754 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)755 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 756 super(parent); 757 } 758 759 @java.lang.Override clear()760 public Builder clear() { 761 super.clear(); 762 bitField0_ = 0; 763 enableNodeAutoprovisioning_ = false; 764 if (resourceLimitsBuilder_ == null) { 765 resourceLimits_ = java.util.Collections.emptyList(); 766 } else { 767 resourceLimits_ = null; 768 resourceLimitsBuilder_.clear(); 769 } 770 bitField0_ = (bitField0_ & ~0x00000002); 771 autoscalingProfile_ = 0; 772 autoprovisioningNodePoolDefaults_ = null; 773 if (autoprovisioningNodePoolDefaultsBuilder_ != null) { 774 autoprovisioningNodePoolDefaultsBuilder_.dispose(); 775 autoprovisioningNodePoolDefaultsBuilder_ = null; 776 } 777 autoprovisioningLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; 778 bitField0_ = (bitField0_ & ~0x00000010); 779 return this; 780 } 781 782 @java.lang.Override getDescriptorForType()783 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 784 return com.google.container.v1.ClusterServiceProto 785 .internal_static_google_container_v1_ClusterAutoscaling_descriptor; 786 } 787 788 @java.lang.Override getDefaultInstanceForType()789 public com.google.container.v1.ClusterAutoscaling getDefaultInstanceForType() { 790 return com.google.container.v1.ClusterAutoscaling.getDefaultInstance(); 791 } 792 793 @java.lang.Override build()794 public com.google.container.v1.ClusterAutoscaling build() { 795 com.google.container.v1.ClusterAutoscaling result = buildPartial(); 796 if (!result.isInitialized()) { 797 throw newUninitializedMessageException(result); 798 } 799 return result; 800 } 801 802 @java.lang.Override buildPartial()803 public com.google.container.v1.ClusterAutoscaling buildPartial() { 804 com.google.container.v1.ClusterAutoscaling result = 805 new com.google.container.v1.ClusterAutoscaling(this); 806 buildPartialRepeatedFields(result); 807 if (bitField0_ != 0) { 808 buildPartial0(result); 809 } 810 onBuilt(); 811 return result; 812 } 813 buildPartialRepeatedFields(com.google.container.v1.ClusterAutoscaling result)814 private void buildPartialRepeatedFields(com.google.container.v1.ClusterAutoscaling result) { 815 if (resourceLimitsBuilder_ == null) { 816 if (((bitField0_ & 0x00000002) != 0)) { 817 resourceLimits_ = java.util.Collections.unmodifiableList(resourceLimits_); 818 bitField0_ = (bitField0_ & ~0x00000002); 819 } 820 result.resourceLimits_ = resourceLimits_; 821 } else { 822 result.resourceLimits_ = resourceLimitsBuilder_.build(); 823 } 824 if (((bitField0_ & 0x00000010) != 0)) { 825 autoprovisioningLocations_ = autoprovisioningLocations_.getUnmodifiableView(); 826 bitField0_ = (bitField0_ & ~0x00000010); 827 } 828 result.autoprovisioningLocations_ = autoprovisioningLocations_; 829 } 830 buildPartial0(com.google.container.v1.ClusterAutoscaling result)831 private void buildPartial0(com.google.container.v1.ClusterAutoscaling result) { 832 int from_bitField0_ = bitField0_; 833 if (((from_bitField0_ & 0x00000001) != 0)) { 834 result.enableNodeAutoprovisioning_ = enableNodeAutoprovisioning_; 835 } 836 if (((from_bitField0_ & 0x00000004) != 0)) { 837 result.autoscalingProfile_ = autoscalingProfile_; 838 } 839 if (((from_bitField0_ & 0x00000008) != 0)) { 840 result.autoprovisioningNodePoolDefaults_ = 841 autoprovisioningNodePoolDefaultsBuilder_ == null 842 ? autoprovisioningNodePoolDefaults_ 843 : autoprovisioningNodePoolDefaultsBuilder_.build(); 844 } 845 } 846 847 @java.lang.Override clone()848 public Builder clone() { 849 return super.clone(); 850 } 851 852 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)853 public Builder setField( 854 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 855 return super.setField(field, value); 856 } 857 858 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)859 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 860 return super.clearField(field); 861 } 862 863 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)864 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 865 return super.clearOneof(oneof); 866 } 867 868 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)869 public Builder setRepeatedField( 870 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 871 return super.setRepeatedField(field, index, value); 872 } 873 874 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)875 public Builder addRepeatedField( 876 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 877 return super.addRepeatedField(field, value); 878 } 879 880 @java.lang.Override mergeFrom(com.google.protobuf.Message other)881 public Builder mergeFrom(com.google.protobuf.Message other) { 882 if (other instanceof com.google.container.v1.ClusterAutoscaling) { 883 return mergeFrom((com.google.container.v1.ClusterAutoscaling) other); 884 } else { 885 super.mergeFrom(other); 886 return this; 887 } 888 } 889 mergeFrom(com.google.container.v1.ClusterAutoscaling other)890 public Builder mergeFrom(com.google.container.v1.ClusterAutoscaling other) { 891 if (other == com.google.container.v1.ClusterAutoscaling.getDefaultInstance()) return this; 892 if (other.getEnableNodeAutoprovisioning() != false) { 893 setEnableNodeAutoprovisioning(other.getEnableNodeAutoprovisioning()); 894 } 895 if (resourceLimitsBuilder_ == null) { 896 if (!other.resourceLimits_.isEmpty()) { 897 if (resourceLimits_.isEmpty()) { 898 resourceLimits_ = other.resourceLimits_; 899 bitField0_ = (bitField0_ & ~0x00000002); 900 } else { 901 ensureResourceLimitsIsMutable(); 902 resourceLimits_.addAll(other.resourceLimits_); 903 } 904 onChanged(); 905 } 906 } else { 907 if (!other.resourceLimits_.isEmpty()) { 908 if (resourceLimitsBuilder_.isEmpty()) { 909 resourceLimitsBuilder_.dispose(); 910 resourceLimitsBuilder_ = null; 911 resourceLimits_ = other.resourceLimits_; 912 bitField0_ = (bitField0_ & ~0x00000002); 913 resourceLimitsBuilder_ = 914 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 915 ? getResourceLimitsFieldBuilder() 916 : null; 917 } else { 918 resourceLimitsBuilder_.addAllMessages(other.resourceLimits_); 919 } 920 } 921 } 922 if (other.autoscalingProfile_ != 0) { 923 setAutoscalingProfileValue(other.getAutoscalingProfileValue()); 924 } 925 if (other.hasAutoprovisioningNodePoolDefaults()) { 926 mergeAutoprovisioningNodePoolDefaults(other.getAutoprovisioningNodePoolDefaults()); 927 } 928 if (!other.autoprovisioningLocations_.isEmpty()) { 929 if (autoprovisioningLocations_.isEmpty()) { 930 autoprovisioningLocations_ = other.autoprovisioningLocations_; 931 bitField0_ = (bitField0_ & ~0x00000010); 932 } else { 933 ensureAutoprovisioningLocationsIsMutable(); 934 autoprovisioningLocations_.addAll(other.autoprovisioningLocations_); 935 } 936 onChanged(); 937 } 938 this.mergeUnknownFields(other.getUnknownFields()); 939 onChanged(); 940 return this; 941 } 942 943 @java.lang.Override isInitialized()944 public final boolean isInitialized() { 945 return true; 946 } 947 948 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)949 public Builder mergeFrom( 950 com.google.protobuf.CodedInputStream input, 951 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 952 throws java.io.IOException { 953 if (extensionRegistry == null) { 954 throw new java.lang.NullPointerException(); 955 } 956 try { 957 boolean done = false; 958 while (!done) { 959 int tag = input.readTag(); 960 switch (tag) { 961 case 0: 962 done = true; 963 break; 964 case 8: 965 { 966 enableNodeAutoprovisioning_ = input.readBool(); 967 bitField0_ |= 0x00000001; 968 break; 969 } // case 8 970 case 18: 971 { 972 com.google.container.v1.ResourceLimit m = 973 input.readMessage( 974 com.google.container.v1.ResourceLimit.parser(), extensionRegistry); 975 if (resourceLimitsBuilder_ == null) { 976 ensureResourceLimitsIsMutable(); 977 resourceLimits_.add(m); 978 } else { 979 resourceLimitsBuilder_.addMessage(m); 980 } 981 break; 982 } // case 18 983 case 24: 984 { 985 autoscalingProfile_ = input.readEnum(); 986 bitField0_ |= 0x00000004; 987 break; 988 } // case 24 989 case 34: 990 { 991 input.readMessage( 992 getAutoprovisioningNodePoolDefaultsFieldBuilder().getBuilder(), 993 extensionRegistry); 994 bitField0_ |= 0x00000008; 995 break; 996 } // case 34 997 case 42: 998 { 999 java.lang.String s = input.readStringRequireUtf8(); 1000 ensureAutoprovisioningLocationsIsMutable(); 1001 autoprovisioningLocations_.add(s); 1002 break; 1003 } // case 42 1004 default: 1005 { 1006 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1007 done = true; // was an endgroup tag 1008 } 1009 break; 1010 } // default: 1011 } // switch (tag) 1012 } // while (!done) 1013 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1014 throw e.unwrapIOException(); 1015 } finally { 1016 onChanged(); 1017 } // finally 1018 return this; 1019 } 1020 1021 private int bitField0_; 1022 1023 private boolean enableNodeAutoprovisioning_; 1024 /** 1025 * 1026 * 1027 * <pre> 1028 * Enables automatic node pool creation and deletion. 1029 * </pre> 1030 * 1031 * <code>bool enable_node_autoprovisioning = 1;</code> 1032 * 1033 * @return The enableNodeAutoprovisioning. 1034 */ 1035 @java.lang.Override getEnableNodeAutoprovisioning()1036 public boolean getEnableNodeAutoprovisioning() { 1037 return enableNodeAutoprovisioning_; 1038 } 1039 /** 1040 * 1041 * 1042 * <pre> 1043 * Enables automatic node pool creation and deletion. 1044 * </pre> 1045 * 1046 * <code>bool enable_node_autoprovisioning = 1;</code> 1047 * 1048 * @param value The enableNodeAutoprovisioning to set. 1049 * @return This builder for chaining. 1050 */ setEnableNodeAutoprovisioning(boolean value)1051 public Builder setEnableNodeAutoprovisioning(boolean value) { 1052 1053 enableNodeAutoprovisioning_ = value; 1054 bitField0_ |= 0x00000001; 1055 onChanged(); 1056 return this; 1057 } 1058 /** 1059 * 1060 * 1061 * <pre> 1062 * Enables automatic node pool creation and deletion. 1063 * </pre> 1064 * 1065 * <code>bool enable_node_autoprovisioning = 1;</code> 1066 * 1067 * @return This builder for chaining. 1068 */ clearEnableNodeAutoprovisioning()1069 public Builder clearEnableNodeAutoprovisioning() { 1070 bitField0_ = (bitField0_ & ~0x00000001); 1071 enableNodeAutoprovisioning_ = false; 1072 onChanged(); 1073 return this; 1074 } 1075 1076 private java.util.List<com.google.container.v1.ResourceLimit> resourceLimits_ = 1077 java.util.Collections.emptyList(); 1078 ensureResourceLimitsIsMutable()1079 private void ensureResourceLimitsIsMutable() { 1080 if (!((bitField0_ & 0x00000002) != 0)) { 1081 resourceLimits_ = 1082 new java.util.ArrayList<com.google.container.v1.ResourceLimit>(resourceLimits_); 1083 bitField0_ |= 0x00000002; 1084 } 1085 } 1086 1087 private com.google.protobuf.RepeatedFieldBuilderV3< 1088 com.google.container.v1.ResourceLimit, 1089 com.google.container.v1.ResourceLimit.Builder, 1090 com.google.container.v1.ResourceLimitOrBuilder> 1091 resourceLimitsBuilder_; 1092 1093 /** 1094 * 1095 * 1096 * <pre> 1097 * Contains global constraints regarding minimum and maximum 1098 * amount of resources in the cluster. 1099 * </pre> 1100 * 1101 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1102 */ getResourceLimitsList()1103 public java.util.List<com.google.container.v1.ResourceLimit> getResourceLimitsList() { 1104 if (resourceLimitsBuilder_ == null) { 1105 return java.util.Collections.unmodifiableList(resourceLimits_); 1106 } else { 1107 return resourceLimitsBuilder_.getMessageList(); 1108 } 1109 } 1110 /** 1111 * 1112 * 1113 * <pre> 1114 * Contains global constraints regarding minimum and maximum 1115 * amount of resources in the cluster. 1116 * </pre> 1117 * 1118 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1119 */ getResourceLimitsCount()1120 public int getResourceLimitsCount() { 1121 if (resourceLimitsBuilder_ == null) { 1122 return resourceLimits_.size(); 1123 } else { 1124 return resourceLimitsBuilder_.getCount(); 1125 } 1126 } 1127 /** 1128 * 1129 * 1130 * <pre> 1131 * Contains global constraints regarding minimum and maximum 1132 * amount of resources in the cluster. 1133 * </pre> 1134 * 1135 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1136 */ getResourceLimits(int index)1137 public com.google.container.v1.ResourceLimit getResourceLimits(int index) { 1138 if (resourceLimitsBuilder_ == null) { 1139 return resourceLimits_.get(index); 1140 } else { 1141 return resourceLimitsBuilder_.getMessage(index); 1142 } 1143 } 1144 /** 1145 * 1146 * 1147 * <pre> 1148 * Contains global constraints regarding minimum and maximum 1149 * amount of resources in the cluster. 1150 * </pre> 1151 * 1152 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1153 */ setResourceLimits(int index, com.google.container.v1.ResourceLimit value)1154 public Builder setResourceLimits(int index, com.google.container.v1.ResourceLimit value) { 1155 if (resourceLimitsBuilder_ == null) { 1156 if (value == null) { 1157 throw new NullPointerException(); 1158 } 1159 ensureResourceLimitsIsMutable(); 1160 resourceLimits_.set(index, value); 1161 onChanged(); 1162 } else { 1163 resourceLimitsBuilder_.setMessage(index, value); 1164 } 1165 return this; 1166 } 1167 /** 1168 * 1169 * 1170 * <pre> 1171 * Contains global constraints regarding minimum and maximum 1172 * amount of resources in the cluster. 1173 * </pre> 1174 * 1175 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1176 */ setResourceLimits( int index, com.google.container.v1.ResourceLimit.Builder builderForValue)1177 public Builder setResourceLimits( 1178 int index, com.google.container.v1.ResourceLimit.Builder builderForValue) { 1179 if (resourceLimitsBuilder_ == null) { 1180 ensureResourceLimitsIsMutable(); 1181 resourceLimits_.set(index, builderForValue.build()); 1182 onChanged(); 1183 } else { 1184 resourceLimitsBuilder_.setMessage(index, builderForValue.build()); 1185 } 1186 return this; 1187 } 1188 /** 1189 * 1190 * 1191 * <pre> 1192 * Contains global constraints regarding minimum and maximum 1193 * amount of resources in the cluster. 1194 * </pre> 1195 * 1196 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1197 */ addResourceLimits(com.google.container.v1.ResourceLimit value)1198 public Builder addResourceLimits(com.google.container.v1.ResourceLimit value) { 1199 if (resourceLimitsBuilder_ == null) { 1200 if (value == null) { 1201 throw new NullPointerException(); 1202 } 1203 ensureResourceLimitsIsMutable(); 1204 resourceLimits_.add(value); 1205 onChanged(); 1206 } else { 1207 resourceLimitsBuilder_.addMessage(value); 1208 } 1209 return this; 1210 } 1211 /** 1212 * 1213 * 1214 * <pre> 1215 * Contains global constraints regarding minimum and maximum 1216 * amount of resources in the cluster. 1217 * </pre> 1218 * 1219 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1220 */ addResourceLimits(int index, com.google.container.v1.ResourceLimit value)1221 public Builder addResourceLimits(int index, com.google.container.v1.ResourceLimit value) { 1222 if (resourceLimitsBuilder_ == null) { 1223 if (value == null) { 1224 throw new NullPointerException(); 1225 } 1226 ensureResourceLimitsIsMutable(); 1227 resourceLimits_.add(index, value); 1228 onChanged(); 1229 } else { 1230 resourceLimitsBuilder_.addMessage(index, value); 1231 } 1232 return this; 1233 } 1234 /** 1235 * 1236 * 1237 * <pre> 1238 * Contains global constraints regarding minimum and maximum 1239 * amount of resources in the cluster. 1240 * </pre> 1241 * 1242 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1243 */ addResourceLimits( com.google.container.v1.ResourceLimit.Builder builderForValue)1244 public Builder addResourceLimits( 1245 com.google.container.v1.ResourceLimit.Builder builderForValue) { 1246 if (resourceLimitsBuilder_ == null) { 1247 ensureResourceLimitsIsMutable(); 1248 resourceLimits_.add(builderForValue.build()); 1249 onChanged(); 1250 } else { 1251 resourceLimitsBuilder_.addMessage(builderForValue.build()); 1252 } 1253 return this; 1254 } 1255 /** 1256 * 1257 * 1258 * <pre> 1259 * Contains global constraints regarding minimum and maximum 1260 * amount of resources in the cluster. 1261 * </pre> 1262 * 1263 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1264 */ addResourceLimits( int index, com.google.container.v1.ResourceLimit.Builder builderForValue)1265 public Builder addResourceLimits( 1266 int index, com.google.container.v1.ResourceLimit.Builder builderForValue) { 1267 if (resourceLimitsBuilder_ == null) { 1268 ensureResourceLimitsIsMutable(); 1269 resourceLimits_.add(index, builderForValue.build()); 1270 onChanged(); 1271 } else { 1272 resourceLimitsBuilder_.addMessage(index, builderForValue.build()); 1273 } 1274 return this; 1275 } 1276 /** 1277 * 1278 * 1279 * <pre> 1280 * Contains global constraints regarding minimum and maximum 1281 * amount of resources in the cluster. 1282 * </pre> 1283 * 1284 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1285 */ addAllResourceLimits( java.lang.Iterable<? extends com.google.container.v1.ResourceLimit> values)1286 public Builder addAllResourceLimits( 1287 java.lang.Iterable<? extends com.google.container.v1.ResourceLimit> values) { 1288 if (resourceLimitsBuilder_ == null) { 1289 ensureResourceLimitsIsMutable(); 1290 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourceLimits_); 1291 onChanged(); 1292 } else { 1293 resourceLimitsBuilder_.addAllMessages(values); 1294 } 1295 return this; 1296 } 1297 /** 1298 * 1299 * 1300 * <pre> 1301 * Contains global constraints regarding minimum and maximum 1302 * amount of resources in the cluster. 1303 * </pre> 1304 * 1305 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1306 */ clearResourceLimits()1307 public Builder clearResourceLimits() { 1308 if (resourceLimitsBuilder_ == null) { 1309 resourceLimits_ = java.util.Collections.emptyList(); 1310 bitField0_ = (bitField0_ & ~0x00000002); 1311 onChanged(); 1312 } else { 1313 resourceLimitsBuilder_.clear(); 1314 } 1315 return this; 1316 } 1317 /** 1318 * 1319 * 1320 * <pre> 1321 * Contains global constraints regarding minimum and maximum 1322 * amount of resources in the cluster. 1323 * </pre> 1324 * 1325 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1326 */ removeResourceLimits(int index)1327 public Builder removeResourceLimits(int index) { 1328 if (resourceLimitsBuilder_ == null) { 1329 ensureResourceLimitsIsMutable(); 1330 resourceLimits_.remove(index); 1331 onChanged(); 1332 } else { 1333 resourceLimitsBuilder_.remove(index); 1334 } 1335 return this; 1336 } 1337 /** 1338 * 1339 * 1340 * <pre> 1341 * Contains global constraints regarding minimum and maximum 1342 * amount of resources in the cluster. 1343 * </pre> 1344 * 1345 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1346 */ getResourceLimitsBuilder(int index)1347 public com.google.container.v1.ResourceLimit.Builder getResourceLimitsBuilder(int index) { 1348 return getResourceLimitsFieldBuilder().getBuilder(index); 1349 } 1350 /** 1351 * 1352 * 1353 * <pre> 1354 * Contains global constraints regarding minimum and maximum 1355 * amount of resources in the cluster. 1356 * </pre> 1357 * 1358 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1359 */ getResourceLimitsOrBuilder(int index)1360 public com.google.container.v1.ResourceLimitOrBuilder getResourceLimitsOrBuilder(int index) { 1361 if (resourceLimitsBuilder_ == null) { 1362 return resourceLimits_.get(index); 1363 } else { 1364 return resourceLimitsBuilder_.getMessageOrBuilder(index); 1365 } 1366 } 1367 /** 1368 * 1369 * 1370 * <pre> 1371 * Contains global constraints regarding minimum and maximum 1372 * amount of resources in the cluster. 1373 * </pre> 1374 * 1375 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1376 */ 1377 public java.util.List<? extends com.google.container.v1.ResourceLimitOrBuilder> getResourceLimitsOrBuilderList()1378 getResourceLimitsOrBuilderList() { 1379 if (resourceLimitsBuilder_ != null) { 1380 return resourceLimitsBuilder_.getMessageOrBuilderList(); 1381 } else { 1382 return java.util.Collections.unmodifiableList(resourceLimits_); 1383 } 1384 } 1385 /** 1386 * 1387 * 1388 * <pre> 1389 * Contains global constraints regarding minimum and maximum 1390 * amount of resources in the cluster. 1391 * </pre> 1392 * 1393 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1394 */ addResourceLimitsBuilder()1395 public com.google.container.v1.ResourceLimit.Builder addResourceLimitsBuilder() { 1396 return getResourceLimitsFieldBuilder() 1397 .addBuilder(com.google.container.v1.ResourceLimit.getDefaultInstance()); 1398 } 1399 /** 1400 * 1401 * 1402 * <pre> 1403 * Contains global constraints regarding minimum and maximum 1404 * amount of resources in the cluster. 1405 * </pre> 1406 * 1407 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1408 */ addResourceLimitsBuilder(int index)1409 public com.google.container.v1.ResourceLimit.Builder addResourceLimitsBuilder(int index) { 1410 return getResourceLimitsFieldBuilder() 1411 .addBuilder(index, com.google.container.v1.ResourceLimit.getDefaultInstance()); 1412 } 1413 /** 1414 * 1415 * 1416 * <pre> 1417 * Contains global constraints regarding minimum and maximum 1418 * amount of resources in the cluster. 1419 * </pre> 1420 * 1421 * <code>repeated .google.container.v1.ResourceLimit resource_limits = 2;</code> 1422 */ 1423 public java.util.List<com.google.container.v1.ResourceLimit.Builder> getResourceLimitsBuilderList()1424 getResourceLimitsBuilderList() { 1425 return getResourceLimitsFieldBuilder().getBuilderList(); 1426 } 1427 1428 private com.google.protobuf.RepeatedFieldBuilderV3< 1429 com.google.container.v1.ResourceLimit, 1430 com.google.container.v1.ResourceLimit.Builder, 1431 com.google.container.v1.ResourceLimitOrBuilder> getResourceLimitsFieldBuilder()1432 getResourceLimitsFieldBuilder() { 1433 if (resourceLimitsBuilder_ == null) { 1434 resourceLimitsBuilder_ = 1435 new com.google.protobuf.RepeatedFieldBuilderV3< 1436 com.google.container.v1.ResourceLimit, 1437 com.google.container.v1.ResourceLimit.Builder, 1438 com.google.container.v1.ResourceLimitOrBuilder>( 1439 resourceLimits_, 1440 ((bitField0_ & 0x00000002) != 0), 1441 getParentForChildren(), 1442 isClean()); 1443 resourceLimits_ = null; 1444 } 1445 return resourceLimitsBuilder_; 1446 } 1447 1448 private int autoscalingProfile_ = 0; 1449 /** 1450 * 1451 * 1452 * <pre> 1453 * Defines autoscaling behaviour. 1454 * </pre> 1455 * 1456 * <code>.google.container.v1.ClusterAutoscaling.AutoscalingProfile autoscaling_profile = 3; 1457 * </code> 1458 * 1459 * @return The enum numeric value on the wire for autoscalingProfile. 1460 */ 1461 @java.lang.Override getAutoscalingProfileValue()1462 public int getAutoscalingProfileValue() { 1463 return autoscalingProfile_; 1464 } 1465 /** 1466 * 1467 * 1468 * <pre> 1469 * Defines autoscaling behaviour. 1470 * </pre> 1471 * 1472 * <code>.google.container.v1.ClusterAutoscaling.AutoscalingProfile autoscaling_profile = 3; 1473 * </code> 1474 * 1475 * @param value The enum numeric value on the wire for autoscalingProfile to set. 1476 * @return This builder for chaining. 1477 */ setAutoscalingProfileValue(int value)1478 public Builder setAutoscalingProfileValue(int value) { 1479 autoscalingProfile_ = value; 1480 bitField0_ |= 0x00000004; 1481 onChanged(); 1482 return this; 1483 } 1484 /** 1485 * 1486 * 1487 * <pre> 1488 * Defines autoscaling behaviour. 1489 * </pre> 1490 * 1491 * <code>.google.container.v1.ClusterAutoscaling.AutoscalingProfile autoscaling_profile = 3; 1492 * </code> 1493 * 1494 * @return The autoscalingProfile. 1495 */ 1496 @java.lang.Override getAutoscalingProfile()1497 public com.google.container.v1.ClusterAutoscaling.AutoscalingProfile getAutoscalingProfile() { 1498 com.google.container.v1.ClusterAutoscaling.AutoscalingProfile result = 1499 com.google.container.v1.ClusterAutoscaling.AutoscalingProfile.forNumber( 1500 autoscalingProfile_); 1501 return result == null 1502 ? com.google.container.v1.ClusterAutoscaling.AutoscalingProfile.UNRECOGNIZED 1503 : result; 1504 } 1505 /** 1506 * 1507 * 1508 * <pre> 1509 * Defines autoscaling behaviour. 1510 * </pre> 1511 * 1512 * <code>.google.container.v1.ClusterAutoscaling.AutoscalingProfile autoscaling_profile = 3; 1513 * </code> 1514 * 1515 * @param value The autoscalingProfile to set. 1516 * @return This builder for chaining. 1517 */ setAutoscalingProfile( com.google.container.v1.ClusterAutoscaling.AutoscalingProfile value)1518 public Builder setAutoscalingProfile( 1519 com.google.container.v1.ClusterAutoscaling.AutoscalingProfile value) { 1520 if (value == null) { 1521 throw new NullPointerException(); 1522 } 1523 bitField0_ |= 0x00000004; 1524 autoscalingProfile_ = value.getNumber(); 1525 onChanged(); 1526 return this; 1527 } 1528 /** 1529 * 1530 * 1531 * <pre> 1532 * Defines autoscaling behaviour. 1533 * </pre> 1534 * 1535 * <code>.google.container.v1.ClusterAutoscaling.AutoscalingProfile autoscaling_profile = 3; 1536 * </code> 1537 * 1538 * @return This builder for chaining. 1539 */ clearAutoscalingProfile()1540 public Builder clearAutoscalingProfile() { 1541 bitField0_ = (bitField0_ & ~0x00000004); 1542 autoscalingProfile_ = 0; 1543 onChanged(); 1544 return this; 1545 } 1546 1547 private com.google.container.v1.AutoprovisioningNodePoolDefaults 1548 autoprovisioningNodePoolDefaults_; 1549 private com.google.protobuf.SingleFieldBuilderV3< 1550 com.google.container.v1.AutoprovisioningNodePoolDefaults, 1551 com.google.container.v1.AutoprovisioningNodePoolDefaults.Builder, 1552 com.google.container.v1.AutoprovisioningNodePoolDefaultsOrBuilder> 1553 autoprovisioningNodePoolDefaultsBuilder_; 1554 /** 1555 * 1556 * 1557 * <pre> 1558 * AutoprovisioningNodePoolDefaults contains defaults for a node pool 1559 * created by NAP. 1560 * </pre> 1561 * 1562 * <code> 1563 * .google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; 1564 * </code> 1565 * 1566 * @return Whether the autoprovisioningNodePoolDefaults field is set. 1567 */ hasAutoprovisioningNodePoolDefaults()1568 public boolean hasAutoprovisioningNodePoolDefaults() { 1569 return ((bitField0_ & 0x00000008) != 0); 1570 } 1571 /** 1572 * 1573 * 1574 * <pre> 1575 * AutoprovisioningNodePoolDefaults contains defaults for a node pool 1576 * created by NAP. 1577 * </pre> 1578 * 1579 * <code> 1580 * .google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; 1581 * </code> 1582 * 1583 * @return The autoprovisioningNodePoolDefaults. 1584 */ 1585 public com.google.container.v1.AutoprovisioningNodePoolDefaults getAutoprovisioningNodePoolDefaults()1586 getAutoprovisioningNodePoolDefaults() { 1587 if (autoprovisioningNodePoolDefaultsBuilder_ == null) { 1588 return autoprovisioningNodePoolDefaults_ == null 1589 ? com.google.container.v1.AutoprovisioningNodePoolDefaults.getDefaultInstance() 1590 : autoprovisioningNodePoolDefaults_; 1591 } else { 1592 return autoprovisioningNodePoolDefaultsBuilder_.getMessage(); 1593 } 1594 } 1595 /** 1596 * 1597 * 1598 * <pre> 1599 * AutoprovisioningNodePoolDefaults contains defaults for a node pool 1600 * created by NAP. 1601 * </pre> 1602 * 1603 * <code> 1604 * .google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; 1605 * </code> 1606 */ setAutoprovisioningNodePoolDefaults( com.google.container.v1.AutoprovisioningNodePoolDefaults value)1607 public Builder setAutoprovisioningNodePoolDefaults( 1608 com.google.container.v1.AutoprovisioningNodePoolDefaults value) { 1609 if (autoprovisioningNodePoolDefaultsBuilder_ == null) { 1610 if (value == null) { 1611 throw new NullPointerException(); 1612 } 1613 autoprovisioningNodePoolDefaults_ = value; 1614 } else { 1615 autoprovisioningNodePoolDefaultsBuilder_.setMessage(value); 1616 } 1617 bitField0_ |= 0x00000008; 1618 onChanged(); 1619 return this; 1620 } 1621 /** 1622 * 1623 * 1624 * <pre> 1625 * AutoprovisioningNodePoolDefaults contains defaults for a node pool 1626 * created by NAP. 1627 * </pre> 1628 * 1629 * <code> 1630 * .google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; 1631 * </code> 1632 */ setAutoprovisioningNodePoolDefaults( com.google.container.v1.AutoprovisioningNodePoolDefaults.Builder builderForValue)1633 public Builder setAutoprovisioningNodePoolDefaults( 1634 com.google.container.v1.AutoprovisioningNodePoolDefaults.Builder builderForValue) { 1635 if (autoprovisioningNodePoolDefaultsBuilder_ == null) { 1636 autoprovisioningNodePoolDefaults_ = builderForValue.build(); 1637 } else { 1638 autoprovisioningNodePoolDefaultsBuilder_.setMessage(builderForValue.build()); 1639 } 1640 bitField0_ |= 0x00000008; 1641 onChanged(); 1642 return this; 1643 } 1644 /** 1645 * 1646 * 1647 * <pre> 1648 * AutoprovisioningNodePoolDefaults contains defaults for a node pool 1649 * created by NAP. 1650 * </pre> 1651 * 1652 * <code> 1653 * .google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; 1654 * </code> 1655 */ mergeAutoprovisioningNodePoolDefaults( com.google.container.v1.AutoprovisioningNodePoolDefaults value)1656 public Builder mergeAutoprovisioningNodePoolDefaults( 1657 com.google.container.v1.AutoprovisioningNodePoolDefaults value) { 1658 if (autoprovisioningNodePoolDefaultsBuilder_ == null) { 1659 if (((bitField0_ & 0x00000008) != 0) 1660 && autoprovisioningNodePoolDefaults_ != null 1661 && autoprovisioningNodePoolDefaults_ 1662 != com.google.container.v1.AutoprovisioningNodePoolDefaults.getDefaultInstance()) { 1663 getAutoprovisioningNodePoolDefaultsBuilder().mergeFrom(value); 1664 } else { 1665 autoprovisioningNodePoolDefaults_ = value; 1666 } 1667 } else { 1668 autoprovisioningNodePoolDefaultsBuilder_.mergeFrom(value); 1669 } 1670 bitField0_ |= 0x00000008; 1671 onChanged(); 1672 return this; 1673 } 1674 /** 1675 * 1676 * 1677 * <pre> 1678 * AutoprovisioningNodePoolDefaults contains defaults for a node pool 1679 * created by NAP. 1680 * </pre> 1681 * 1682 * <code> 1683 * .google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; 1684 * </code> 1685 */ clearAutoprovisioningNodePoolDefaults()1686 public Builder clearAutoprovisioningNodePoolDefaults() { 1687 bitField0_ = (bitField0_ & ~0x00000008); 1688 autoprovisioningNodePoolDefaults_ = null; 1689 if (autoprovisioningNodePoolDefaultsBuilder_ != null) { 1690 autoprovisioningNodePoolDefaultsBuilder_.dispose(); 1691 autoprovisioningNodePoolDefaultsBuilder_ = null; 1692 } 1693 onChanged(); 1694 return this; 1695 } 1696 /** 1697 * 1698 * 1699 * <pre> 1700 * AutoprovisioningNodePoolDefaults contains defaults for a node pool 1701 * created by NAP. 1702 * </pre> 1703 * 1704 * <code> 1705 * .google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; 1706 * </code> 1707 */ 1708 public com.google.container.v1.AutoprovisioningNodePoolDefaults.Builder getAutoprovisioningNodePoolDefaultsBuilder()1709 getAutoprovisioningNodePoolDefaultsBuilder() { 1710 bitField0_ |= 0x00000008; 1711 onChanged(); 1712 return getAutoprovisioningNodePoolDefaultsFieldBuilder().getBuilder(); 1713 } 1714 /** 1715 * 1716 * 1717 * <pre> 1718 * AutoprovisioningNodePoolDefaults contains defaults for a node pool 1719 * created by NAP. 1720 * </pre> 1721 * 1722 * <code> 1723 * .google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; 1724 * </code> 1725 */ 1726 public com.google.container.v1.AutoprovisioningNodePoolDefaultsOrBuilder getAutoprovisioningNodePoolDefaultsOrBuilder()1727 getAutoprovisioningNodePoolDefaultsOrBuilder() { 1728 if (autoprovisioningNodePoolDefaultsBuilder_ != null) { 1729 return autoprovisioningNodePoolDefaultsBuilder_.getMessageOrBuilder(); 1730 } else { 1731 return autoprovisioningNodePoolDefaults_ == null 1732 ? com.google.container.v1.AutoprovisioningNodePoolDefaults.getDefaultInstance() 1733 : autoprovisioningNodePoolDefaults_; 1734 } 1735 } 1736 /** 1737 * 1738 * 1739 * <pre> 1740 * AutoprovisioningNodePoolDefaults contains defaults for a node pool 1741 * created by NAP. 1742 * </pre> 1743 * 1744 * <code> 1745 * .google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; 1746 * </code> 1747 */ 1748 private com.google.protobuf.SingleFieldBuilderV3< 1749 com.google.container.v1.AutoprovisioningNodePoolDefaults, 1750 com.google.container.v1.AutoprovisioningNodePoolDefaults.Builder, 1751 com.google.container.v1.AutoprovisioningNodePoolDefaultsOrBuilder> getAutoprovisioningNodePoolDefaultsFieldBuilder()1752 getAutoprovisioningNodePoolDefaultsFieldBuilder() { 1753 if (autoprovisioningNodePoolDefaultsBuilder_ == null) { 1754 autoprovisioningNodePoolDefaultsBuilder_ = 1755 new com.google.protobuf.SingleFieldBuilderV3< 1756 com.google.container.v1.AutoprovisioningNodePoolDefaults, 1757 com.google.container.v1.AutoprovisioningNodePoolDefaults.Builder, 1758 com.google.container.v1.AutoprovisioningNodePoolDefaultsOrBuilder>( 1759 getAutoprovisioningNodePoolDefaults(), getParentForChildren(), isClean()); 1760 autoprovisioningNodePoolDefaults_ = null; 1761 } 1762 return autoprovisioningNodePoolDefaultsBuilder_; 1763 } 1764 1765 private com.google.protobuf.LazyStringList autoprovisioningLocations_ = 1766 com.google.protobuf.LazyStringArrayList.EMPTY; 1767 ensureAutoprovisioningLocationsIsMutable()1768 private void ensureAutoprovisioningLocationsIsMutable() { 1769 if (!((bitField0_ & 0x00000010) != 0)) { 1770 autoprovisioningLocations_ = 1771 new com.google.protobuf.LazyStringArrayList(autoprovisioningLocations_); 1772 bitField0_ |= 0x00000010; 1773 } 1774 } 1775 /** 1776 * 1777 * 1778 * <pre> 1779 * The list of Google Compute Engine 1780 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1781 * NodePool's nodes can be created by NAP. 1782 * </pre> 1783 * 1784 * <code>repeated string autoprovisioning_locations = 5;</code> 1785 * 1786 * @return A list containing the autoprovisioningLocations. 1787 */ getAutoprovisioningLocationsList()1788 public com.google.protobuf.ProtocolStringList getAutoprovisioningLocationsList() { 1789 return autoprovisioningLocations_.getUnmodifiableView(); 1790 } 1791 /** 1792 * 1793 * 1794 * <pre> 1795 * The list of Google Compute Engine 1796 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1797 * NodePool's nodes can be created by NAP. 1798 * </pre> 1799 * 1800 * <code>repeated string autoprovisioning_locations = 5;</code> 1801 * 1802 * @return The count of autoprovisioningLocations. 1803 */ getAutoprovisioningLocationsCount()1804 public int getAutoprovisioningLocationsCount() { 1805 return autoprovisioningLocations_.size(); 1806 } 1807 /** 1808 * 1809 * 1810 * <pre> 1811 * The list of Google Compute Engine 1812 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1813 * NodePool's nodes can be created by NAP. 1814 * </pre> 1815 * 1816 * <code>repeated string autoprovisioning_locations = 5;</code> 1817 * 1818 * @param index The index of the element to return. 1819 * @return The autoprovisioningLocations at the given index. 1820 */ getAutoprovisioningLocations(int index)1821 public java.lang.String getAutoprovisioningLocations(int index) { 1822 return autoprovisioningLocations_.get(index); 1823 } 1824 /** 1825 * 1826 * 1827 * <pre> 1828 * The list of Google Compute Engine 1829 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1830 * NodePool's nodes can be created by NAP. 1831 * </pre> 1832 * 1833 * <code>repeated string autoprovisioning_locations = 5;</code> 1834 * 1835 * @param index The index of the value to return. 1836 * @return The bytes of the autoprovisioningLocations at the given index. 1837 */ getAutoprovisioningLocationsBytes(int index)1838 public com.google.protobuf.ByteString getAutoprovisioningLocationsBytes(int index) { 1839 return autoprovisioningLocations_.getByteString(index); 1840 } 1841 /** 1842 * 1843 * 1844 * <pre> 1845 * The list of Google Compute Engine 1846 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1847 * NodePool's nodes can be created by NAP. 1848 * </pre> 1849 * 1850 * <code>repeated string autoprovisioning_locations = 5;</code> 1851 * 1852 * @param index The index to set the value at. 1853 * @param value The autoprovisioningLocations to set. 1854 * @return This builder for chaining. 1855 */ setAutoprovisioningLocations(int index, java.lang.String value)1856 public Builder setAutoprovisioningLocations(int index, java.lang.String value) { 1857 if (value == null) { 1858 throw new NullPointerException(); 1859 } 1860 ensureAutoprovisioningLocationsIsMutable(); 1861 autoprovisioningLocations_.set(index, value); 1862 onChanged(); 1863 return this; 1864 } 1865 /** 1866 * 1867 * 1868 * <pre> 1869 * The list of Google Compute Engine 1870 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1871 * NodePool's nodes can be created by NAP. 1872 * </pre> 1873 * 1874 * <code>repeated string autoprovisioning_locations = 5;</code> 1875 * 1876 * @param value The autoprovisioningLocations to add. 1877 * @return This builder for chaining. 1878 */ addAutoprovisioningLocations(java.lang.String value)1879 public Builder addAutoprovisioningLocations(java.lang.String value) { 1880 if (value == null) { 1881 throw new NullPointerException(); 1882 } 1883 ensureAutoprovisioningLocationsIsMutable(); 1884 autoprovisioningLocations_.add(value); 1885 onChanged(); 1886 return this; 1887 } 1888 /** 1889 * 1890 * 1891 * <pre> 1892 * The list of Google Compute Engine 1893 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1894 * NodePool's nodes can be created by NAP. 1895 * </pre> 1896 * 1897 * <code>repeated string autoprovisioning_locations = 5;</code> 1898 * 1899 * @param values The autoprovisioningLocations to add. 1900 * @return This builder for chaining. 1901 */ addAllAutoprovisioningLocations(java.lang.Iterable<java.lang.String> values)1902 public Builder addAllAutoprovisioningLocations(java.lang.Iterable<java.lang.String> values) { 1903 ensureAutoprovisioningLocationsIsMutable(); 1904 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, autoprovisioningLocations_); 1905 onChanged(); 1906 return this; 1907 } 1908 /** 1909 * 1910 * 1911 * <pre> 1912 * The list of Google Compute Engine 1913 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1914 * NodePool's nodes can be created by NAP. 1915 * </pre> 1916 * 1917 * <code>repeated string autoprovisioning_locations = 5;</code> 1918 * 1919 * @return This builder for chaining. 1920 */ clearAutoprovisioningLocations()1921 public Builder clearAutoprovisioningLocations() { 1922 autoprovisioningLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1923 bitField0_ = (bitField0_ & ~0x00000010); 1924 onChanged(); 1925 return this; 1926 } 1927 /** 1928 * 1929 * 1930 * <pre> 1931 * The list of Google Compute Engine 1932 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1933 * NodePool's nodes can be created by NAP. 1934 * </pre> 1935 * 1936 * <code>repeated string autoprovisioning_locations = 5;</code> 1937 * 1938 * @param value The bytes of the autoprovisioningLocations to add. 1939 * @return This builder for chaining. 1940 */ addAutoprovisioningLocationsBytes(com.google.protobuf.ByteString value)1941 public Builder addAutoprovisioningLocationsBytes(com.google.protobuf.ByteString value) { 1942 if (value == null) { 1943 throw new NullPointerException(); 1944 } 1945 checkByteStringIsUtf8(value); 1946 ensureAutoprovisioningLocationsIsMutable(); 1947 autoprovisioningLocations_.add(value); 1948 onChanged(); 1949 return this; 1950 } 1951 1952 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1953 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1954 return super.setUnknownFields(unknownFields); 1955 } 1956 1957 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1958 public final Builder mergeUnknownFields( 1959 final com.google.protobuf.UnknownFieldSet unknownFields) { 1960 return super.mergeUnknownFields(unknownFields); 1961 } 1962 1963 // @@protoc_insertion_point(builder_scope:google.container.v1.ClusterAutoscaling) 1964 } 1965 1966 // @@protoc_insertion_point(class_scope:google.container.v1.ClusterAutoscaling) 1967 private static final com.google.container.v1.ClusterAutoscaling DEFAULT_INSTANCE; 1968 1969 static { 1970 DEFAULT_INSTANCE = new com.google.container.v1.ClusterAutoscaling(); 1971 } 1972 getDefaultInstance()1973 public static com.google.container.v1.ClusterAutoscaling getDefaultInstance() { 1974 return DEFAULT_INSTANCE; 1975 } 1976 1977 private static final com.google.protobuf.Parser<ClusterAutoscaling> PARSER = 1978 new com.google.protobuf.AbstractParser<ClusterAutoscaling>() { 1979 @java.lang.Override 1980 public ClusterAutoscaling parsePartialFrom( 1981 com.google.protobuf.CodedInputStream input, 1982 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1983 throws com.google.protobuf.InvalidProtocolBufferException { 1984 Builder builder = newBuilder(); 1985 try { 1986 builder.mergeFrom(input, extensionRegistry); 1987 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1988 throw e.setUnfinishedMessage(builder.buildPartial()); 1989 } catch (com.google.protobuf.UninitializedMessageException e) { 1990 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1991 } catch (java.io.IOException e) { 1992 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1993 .setUnfinishedMessage(builder.buildPartial()); 1994 } 1995 return builder.buildPartial(); 1996 } 1997 }; 1998 parser()1999 public static com.google.protobuf.Parser<ClusterAutoscaling> parser() { 2000 return PARSER; 2001 } 2002 2003 @java.lang.Override getParserForType()2004 public com.google.protobuf.Parser<ClusterAutoscaling> getParserForType() { 2005 return PARSER; 2006 } 2007 2008 @java.lang.Override getDefaultInstanceForType()2009 public com.google.container.v1.ClusterAutoscaling getDefaultInstanceForType() { 2010 return DEFAULT_INSTANCE; 2011 } 2012 } 2013