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 * SetLocationsRequest sets the locations of the cluster. 26 * </pre> 27 * 28 * Protobuf type {@code google.container.v1.SetLocationsRequest} 29 */ 30 public final class SetLocationsRequest extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.container.v1.SetLocationsRequest) 33 SetLocationsRequestOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use SetLocationsRequest.newBuilder() to construct. SetLocationsRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private SetLocationsRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 SetLocationsRequest()40 private SetLocationsRequest() { 41 projectId_ = ""; 42 zone_ = ""; 43 clusterId_ = ""; 44 locations_ = com.google.protobuf.LazyStringArrayList.EMPTY; 45 name_ = ""; 46 } 47 48 @java.lang.Override 49 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)50 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 51 return new SetLocationsRequest(); 52 } 53 54 @java.lang.Override getUnknownFields()55 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 56 return this.unknownFields; 57 } 58 getDescriptor()59 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 60 return com.google.container.v1.ClusterServiceProto 61 .internal_static_google_container_v1_SetLocationsRequest_descriptor; 62 } 63 64 @java.lang.Override 65 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()66 internalGetFieldAccessorTable() { 67 return com.google.container.v1.ClusterServiceProto 68 .internal_static_google_container_v1_SetLocationsRequest_fieldAccessorTable 69 .ensureFieldAccessorsInitialized( 70 com.google.container.v1.SetLocationsRequest.class, 71 com.google.container.v1.SetLocationsRequest.Builder.class); 72 } 73 74 public static final int PROJECT_ID_FIELD_NUMBER = 1; 75 76 @SuppressWarnings("serial") 77 private volatile java.lang.Object projectId_ = ""; 78 /** 79 * 80 * 81 * <pre> 82 * Deprecated. The Google Developers Console [project ID or project 83 * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). 84 * This field has been deprecated and replaced by the name field. 85 * </pre> 86 * 87 * <code>string project_id = 1 [deprecated = true];</code> 88 * 89 * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See 90 * google/container/v1/cluster_service.proto;l=2655 91 * @return The projectId. 92 */ 93 @java.lang.Override 94 @java.lang.Deprecated getProjectId()95 public java.lang.String getProjectId() { 96 java.lang.Object ref = projectId_; 97 if (ref instanceof java.lang.String) { 98 return (java.lang.String) ref; 99 } else { 100 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 101 java.lang.String s = bs.toStringUtf8(); 102 projectId_ = s; 103 return s; 104 } 105 } 106 /** 107 * 108 * 109 * <pre> 110 * Deprecated. The Google Developers Console [project ID or project 111 * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). 112 * This field has been deprecated and replaced by the name field. 113 * </pre> 114 * 115 * <code>string project_id = 1 [deprecated = true];</code> 116 * 117 * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See 118 * google/container/v1/cluster_service.proto;l=2655 119 * @return The bytes for projectId. 120 */ 121 @java.lang.Override 122 @java.lang.Deprecated getProjectIdBytes()123 public com.google.protobuf.ByteString getProjectIdBytes() { 124 java.lang.Object ref = projectId_; 125 if (ref instanceof java.lang.String) { 126 com.google.protobuf.ByteString b = 127 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 128 projectId_ = b; 129 return b; 130 } else { 131 return (com.google.protobuf.ByteString) ref; 132 } 133 } 134 135 public static final int ZONE_FIELD_NUMBER = 2; 136 137 @SuppressWarnings("serial") 138 private volatile java.lang.Object zone_ = ""; 139 /** 140 * 141 * 142 * <pre> 143 * Deprecated. The name of the Google Compute Engine 144 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the 145 * cluster resides. This field has been deprecated and replaced by the name 146 * field. 147 * </pre> 148 * 149 * <code>string zone = 2 [deprecated = true];</code> 150 * 151 * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See 152 * google/container/v1/cluster_service.proto;l=2661 153 * @return The zone. 154 */ 155 @java.lang.Override 156 @java.lang.Deprecated getZone()157 public java.lang.String getZone() { 158 java.lang.Object ref = zone_; 159 if (ref instanceof java.lang.String) { 160 return (java.lang.String) ref; 161 } else { 162 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 163 java.lang.String s = bs.toStringUtf8(); 164 zone_ = s; 165 return s; 166 } 167 } 168 /** 169 * 170 * 171 * <pre> 172 * Deprecated. The name of the Google Compute Engine 173 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the 174 * cluster resides. This field has been deprecated and replaced by the name 175 * field. 176 * </pre> 177 * 178 * <code>string zone = 2 [deprecated = true];</code> 179 * 180 * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See 181 * google/container/v1/cluster_service.proto;l=2661 182 * @return The bytes for zone. 183 */ 184 @java.lang.Override 185 @java.lang.Deprecated getZoneBytes()186 public com.google.protobuf.ByteString getZoneBytes() { 187 java.lang.Object ref = zone_; 188 if (ref instanceof java.lang.String) { 189 com.google.protobuf.ByteString b = 190 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 191 zone_ = b; 192 return b; 193 } else { 194 return (com.google.protobuf.ByteString) ref; 195 } 196 } 197 198 public static final int CLUSTER_ID_FIELD_NUMBER = 3; 199 200 @SuppressWarnings("serial") 201 private volatile java.lang.Object clusterId_ = ""; 202 /** 203 * 204 * 205 * <pre> 206 * Deprecated. The name of the cluster to upgrade. 207 * This field has been deprecated and replaced by the name field. 208 * </pre> 209 * 210 * <code>string cluster_id = 3 [deprecated = true];</code> 211 * 212 * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See 213 * google/container/v1/cluster_service.proto;l=2665 214 * @return The clusterId. 215 */ 216 @java.lang.Override 217 @java.lang.Deprecated getClusterId()218 public java.lang.String getClusterId() { 219 java.lang.Object ref = clusterId_; 220 if (ref instanceof java.lang.String) { 221 return (java.lang.String) ref; 222 } else { 223 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 224 java.lang.String s = bs.toStringUtf8(); 225 clusterId_ = s; 226 return s; 227 } 228 } 229 /** 230 * 231 * 232 * <pre> 233 * Deprecated. The name of the cluster to upgrade. 234 * This field has been deprecated and replaced by the name field. 235 * </pre> 236 * 237 * <code>string cluster_id = 3 [deprecated = true];</code> 238 * 239 * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See 240 * google/container/v1/cluster_service.proto;l=2665 241 * @return The bytes for clusterId. 242 */ 243 @java.lang.Override 244 @java.lang.Deprecated getClusterIdBytes()245 public com.google.protobuf.ByteString getClusterIdBytes() { 246 java.lang.Object ref = clusterId_; 247 if (ref instanceof java.lang.String) { 248 com.google.protobuf.ByteString b = 249 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 250 clusterId_ = b; 251 return b; 252 } else { 253 return (com.google.protobuf.ByteString) ref; 254 } 255 } 256 257 public static final int LOCATIONS_FIELD_NUMBER = 4; 258 259 @SuppressWarnings("serial") 260 private com.google.protobuf.LazyStringList locations_; 261 /** 262 * 263 * 264 * <pre> 265 * Required. The desired list of Google Compute Engine 266 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 267 * cluster's nodes should be located. Changing the locations a cluster is in 268 * will result in nodes being either created or removed from the cluster, 269 * depending on whether locations are being added or removed. 270 * This list must always include the cluster's primary zone. 271 * </pre> 272 * 273 * <code>repeated string locations = 4 [(.google.api.field_behavior) = REQUIRED];</code> 274 * 275 * @return A list containing the locations. 276 */ getLocationsList()277 public com.google.protobuf.ProtocolStringList getLocationsList() { 278 return locations_; 279 } 280 /** 281 * 282 * 283 * <pre> 284 * Required. The desired list of Google Compute Engine 285 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 286 * cluster's nodes should be located. Changing the locations a cluster is in 287 * will result in nodes being either created or removed from the cluster, 288 * depending on whether locations are being added or removed. 289 * This list must always include the cluster's primary zone. 290 * </pre> 291 * 292 * <code>repeated string locations = 4 [(.google.api.field_behavior) = REQUIRED];</code> 293 * 294 * @return The count of locations. 295 */ getLocationsCount()296 public int getLocationsCount() { 297 return locations_.size(); 298 } 299 /** 300 * 301 * 302 * <pre> 303 * Required. The desired list of Google Compute Engine 304 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 305 * cluster's nodes should be located. Changing the locations a cluster is in 306 * will result in nodes being either created or removed from the cluster, 307 * depending on whether locations are being added or removed. 308 * This list must always include the cluster's primary zone. 309 * </pre> 310 * 311 * <code>repeated string locations = 4 [(.google.api.field_behavior) = REQUIRED];</code> 312 * 313 * @param index The index of the element to return. 314 * @return The locations at the given index. 315 */ getLocations(int index)316 public java.lang.String getLocations(int index) { 317 return locations_.get(index); 318 } 319 /** 320 * 321 * 322 * <pre> 323 * Required. The desired list of Google Compute Engine 324 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 325 * cluster's nodes should be located. Changing the locations a cluster is in 326 * will result in nodes being either created or removed from the cluster, 327 * depending on whether locations are being added or removed. 328 * This list must always include the cluster's primary zone. 329 * </pre> 330 * 331 * <code>repeated string locations = 4 [(.google.api.field_behavior) = REQUIRED];</code> 332 * 333 * @param index The index of the value to return. 334 * @return The bytes of the locations at the given index. 335 */ getLocationsBytes(int index)336 public com.google.protobuf.ByteString getLocationsBytes(int index) { 337 return locations_.getByteString(index); 338 } 339 340 public static final int NAME_FIELD_NUMBER = 6; 341 342 @SuppressWarnings("serial") 343 private volatile java.lang.Object name_ = ""; 344 /** 345 * 346 * 347 * <pre> 348 * The name (project, location, cluster) of the cluster to set locations. 349 * Specified in the format `projects/*/locations/*/clusters/*`. 350 * </pre> 351 * 352 * <code>string name = 6;</code> 353 * 354 * @return The name. 355 */ 356 @java.lang.Override getName()357 public java.lang.String getName() { 358 java.lang.Object ref = name_; 359 if (ref instanceof java.lang.String) { 360 return (java.lang.String) ref; 361 } else { 362 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 363 java.lang.String s = bs.toStringUtf8(); 364 name_ = s; 365 return s; 366 } 367 } 368 /** 369 * 370 * 371 * <pre> 372 * The name (project, location, cluster) of the cluster to set locations. 373 * Specified in the format `projects/*/locations/*/clusters/*`. 374 * </pre> 375 * 376 * <code>string name = 6;</code> 377 * 378 * @return The bytes for name. 379 */ 380 @java.lang.Override getNameBytes()381 public com.google.protobuf.ByteString getNameBytes() { 382 java.lang.Object ref = name_; 383 if (ref instanceof java.lang.String) { 384 com.google.protobuf.ByteString b = 385 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 386 name_ = b; 387 return b; 388 } else { 389 return (com.google.protobuf.ByteString) ref; 390 } 391 } 392 393 private byte memoizedIsInitialized = -1; 394 395 @java.lang.Override isInitialized()396 public final boolean isInitialized() { 397 byte isInitialized = memoizedIsInitialized; 398 if (isInitialized == 1) return true; 399 if (isInitialized == 0) return false; 400 401 memoizedIsInitialized = 1; 402 return true; 403 } 404 405 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)406 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 407 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { 408 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); 409 } 410 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { 411 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, zone_); 412 } 413 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) { 414 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, clusterId_); 415 } 416 for (int i = 0; i < locations_.size(); i++) { 417 com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locations_.getRaw(i)); 418 } 419 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 420 com.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_); 421 } 422 getUnknownFields().writeTo(output); 423 } 424 425 @java.lang.Override getSerializedSize()426 public int getSerializedSize() { 427 int size = memoizedSize; 428 if (size != -1) return size; 429 430 size = 0; 431 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { 432 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); 433 } 434 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { 435 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, zone_); 436 } 437 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) { 438 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, clusterId_); 439 } 440 { 441 int dataSize = 0; 442 for (int i = 0; i < locations_.size(); i++) { 443 dataSize += computeStringSizeNoTag(locations_.getRaw(i)); 444 } 445 size += dataSize; 446 size += 1 * getLocationsList().size(); 447 } 448 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 449 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, name_); 450 } 451 size += getUnknownFields().getSerializedSize(); 452 memoizedSize = size; 453 return size; 454 } 455 456 @java.lang.Override equals(final java.lang.Object obj)457 public boolean equals(final java.lang.Object obj) { 458 if (obj == this) { 459 return true; 460 } 461 if (!(obj instanceof com.google.container.v1.SetLocationsRequest)) { 462 return super.equals(obj); 463 } 464 com.google.container.v1.SetLocationsRequest other = 465 (com.google.container.v1.SetLocationsRequest) obj; 466 467 if (!getProjectId().equals(other.getProjectId())) return false; 468 if (!getZone().equals(other.getZone())) return false; 469 if (!getClusterId().equals(other.getClusterId())) return false; 470 if (!getLocationsList().equals(other.getLocationsList())) return false; 471 if (!getName().equals(other.getName())) return false; 472 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 473 return true; 474 } 475 476 @java.lang.Override hashCode()477 public int hashCode() { 478 if (memoizedHashCode != 0) { 479 return memoizedHashCode; 480 } 481 int hash = 41; 482 hash = (19 * hash) + getDescriptor().hashCode(); 483 hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; 484 hash = (53 * hash) + getProjectId().hashCode(); 485 hash = (37 * hash) + ZONE_FIELD_NUMBER; 486 hash = (53 * hash) + getZone().hashCode(); 487 hash = (37 * hash) + CLUSTER_ID_FIELD_NUMBER; 488 hash = (53 * hash) + getClusterId().hashCode(); 489 if (getLocationsCount() > 0) { 490 hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; 491 hash = (53 * hash) + getLocationsList().hashCode(); 492 } 493 hash = (37 * hash) + NAME_FIELD_NUMBER; 494 hash = (53 * hash) + getName().hashCode(); 495 hash = (29 * hash) + getUnknownFields().hashCode(); 496 memoizedHashCode = hash; 497 return hash; 498 } 499 parseFrom(java.nio.ByteBuffer data)500 public static com.google.container.v1.SetLocationsRequest parseFrom(java.nio.ByteBuffer data) 501 throws com.google.protobuf.InvalidProtocolBufferException { 502 return PARSER.parseFrom(data); 503 } 504 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)505 public static com.google.container.v1.SetLocationsRequest parseFrom( 506 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 507 throws com.google.protobuf.InvalidProtocolBufferException { 508 return PARSER.parseFrom(data, extensionRegistry); 509 } 510 parseFrom( com.google.protobuf.ByteString data)511 public static com.google.container.v1.SetLocationsRequest parseFrom( 512 com.google.protobuf.ByteString data) 513 throws com.google.protobuf.InvalidProtocolBufferException { 514 return PARSER.parseFrom(data); 515 } 516 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)517 public static com.google.container.v1.SetLocationsRequest parseFrom( 518 com.google.protobuf.ByteString data, 519 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 520 throws com.google.protobuf.InvalidProtocolBufferException { 521 return PARSER.parseFrom(data, extensionRegistry); 522 } 523 parseFrom(byte[] data)524 public static com.google.container.v1.SetLocationsRequest parseFrom(byte[] data) 525 throws com.google.protobuf.InvalidProtocolBufferException { 526 return PARSER.parseFrom(data); 527 } 528 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)529 public static com.google.container.v1.SetLocationsRequest parseFrom( 530 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 531 throws com.google.protobuf.InvalidProtocolBufferException { 532 return PARSER.parseFrom(data, extensionRegistry); 533 } 534 parseFrom(java.io.InputStream input)535 public static com.google.container.v1.SetLocationsRequest parseFrom(java.io.InputStream input) 536 throws java.io.IOException { 537 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 538 } 539 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)540 public static com.google.container.v1.SetLocationsRequest parseFrom( 541 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 542 throws java.io.IOException { 543 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 544 PARSER, input, extensionRegistry); 545 } 546 parseDelimitedFrom( java.io.InputStream input)547 public static com.google.container.v1.SetLocationsRequest parseDelimitedFrom( 548 java.io.InputStream input) throws java.io.IOException { 549 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 550 } 551 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)552 public static com.google.container.v1.SetLocationsRequest parseDelimitedFrom( 553 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 554 throws java.io.IOException { 555 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 556 PARSER, input, extensionRegistry); 557 } 558 parseFrom( com.google.protobuf.CodedInputStream input)559 public static com.google.container.v1.SetLocationsRequest parseFrom( 560 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 561 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 562 } 563 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)564 public static com.google.container.v1.SetLocationsRequest parseFrom( 565 com.google.protobuf.CodedInputStream input, 566 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 567 throws java.io.IOException { 568 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 569 PARSER, input, extensionRegistry); 570 } 571 572 @java.lang.Override newBuilderForType()573 public Builder newBuilderForType() { 574 return newBuilder(); 575 } 576 newBuilder()577 public static Builder newBuilder() { 578 return DEFAULT_INSTANCE.toBuilder(); 579 } 580 newBuilder(com.google.container.v1.SetLocationsRequest prototype)581 public static Builder newBuilder(com.google.container.v1.SetLocationsRequest prototype) { 582 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 583 } 584 585 @java.lang.Override toBuilder()586 public Builder toBuilder() { 587 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 588 } 589 590 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)591 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 592 Builder builder = new Builder(parent); 593 return builder; 594 } 595 /** 596 * 597 * 598 * <pre> 599 * SetLocationsRequest sets the locations of the cluster. 600 * </pre> 601 * 602 * Protobuf type {@code google.container.v1.SetLocationsRequest} 603 */ 604 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 605 implements 606 // @@protoc_insertion_point(builder_implements:google.container.v1.SetLocationsRequest) 607 com.google.container.v1.SetLocationsRequestOrBuilder { getDescriptor()608 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 609 return com.google.container.v1.ClusterServiceProto 610 .internal_static_google_container_v1_SetLocationsRequest_descriptor; 611 } 612 613 @java.lang.Override 614 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()615 internalGetFieldAccessorTable() { 616 return com.google.container.v1.ClusterServiceProto 617 .internal_static_google_container_v1_SetLocationsRequest_fieldAccessorTable 618 .ensureFieldAccessorsInitialized( 619 com.google.container.v1.SetLocationsRequest.class, 620 com.google.container.v1.SetLocationsRequest.Builder.class); 621 } 622 623 // Construct using com.google.container.v1.SetLocationsRequest.newBuilder() Builder()624 private Builder() {} 625 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)626 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 627 super(parent); 628 } 629 630 @java.lang.Override clear()631 public Builder clear() { 632 super.clear(); 633 bitField0_ = 0; 634 projectId_ = ""; 635 zone_ = ""; 636 clusterId_ = ""; 637 locations_ = com.google.protobuf.LazyStringArrayList.EMPTY; 638 bitField0_ = (bitField0_ & ~0x00000008); 639 name_ = ""; 640 return this; 641 } 642 643 @java.lang.Override getDescriptorForType()644 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 645 return com.google.container.v1.ClusterServiceProto 646 .internal_static_google_container_v1_SetLocationsRequest_descriptor; 647 } 648 649 @java.lang.Override getDefaultInstanceForType()650 public com.google.container.v1.SetLocationsRequest getDefaultInstanceForType() { 651 return com.google.container.v1.SetLocationsRequest.getDefaultInstance(); 652 } 653 654 @java.lang.Override build()655 public com.google.container.v1.SetLocationsRequest build() { 656 com.google.container.v1.SetLocationsRequest result = buildPartial(); 657 if (!result.isInitialized()) { 658 throw newUninitializedMessageException(result); 659 } 660 return result; 661 } 662 663 @java.lang.Override buildPartial()664 public com.google.container.v1.SetLocationsRequest buildPartial() { 665 com.google.container.v1.SetLocationsRequest result = 666 new com.google.container.v1.SetLocationsRequest(this); 667 buildPartialRepeatedFields(result); 668 if (bitField0_ != 0) { 669 buildPartial0(result); 670 } 671 onBuilt(); 672 return result; 673 } 674 buildPartialRepeatedFields(com.google.container.v1.SetLocationsRequest result)675 private void buildPartialRepeatedFields(com.google.container.v1.SetLocationsRequest result) { 676 if (((bitField0_ & 0x00000008) != 0)) { 677 locations_ = locations_.getUnmodifiableView(); 678 bitField0_ = (bitField0_ & ~0x00000008); 679 } 680 result.locations_ = locations_; 681 } 682 buildPartial0(com.google.container.v1.SetLocationsRequest result)683 private void buildPartial0(com.google.container.v1.SetLocationsRequest result) { 684 int from_bitField0_ = bitField0_; 685 if (((from_bitField0_ & 0x00000001) != 0)) { 686 result.projectId_ = projectId_; 687 } 688 if (((from_bitField0_ & 0x00000002) != 0)) { 689 result.zone_ = zone_; 690 } 691 if (((from_bitField0_ & 0x00000004) != 0)) { 692 result.clusterId_ = clusterId_; 693 } 694 if (((from_bitField0_ & 0x00000010) != 0)) { 695 result.name_ = name_; 696 } 697 } 698 699 @java.lang.Override clone()700 public Builder clone() { 701 return super.clone(); 702 } 703 704 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)705 public Builder setField( 706 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 707 return super.setField(field, value); 708 } 709 710 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)711 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 712 return super.clearField(field); 713 } 714 715 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)716 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 717 return super.clearOneof(oneof); 718 } 719 720 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)721 public Builder setRepeatedField( 722 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 723 return super.setRepeatedField(field, index, value); 724 } 725 726 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)727 public Builder addRepeatedField( 728 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 729 return super.addRepeatedField(field, value); 730 } 731 732 @java.lang.Override mergeFrom(com.google.protobuf.Message other)733 public Builder mergeFrom(com.google.protobuf.Message other) { 734 if (other instanceof com.google.container.v1.SetLocationsRequest) { 735 return mergeFrom((com.google.container.v1.SetLocationsRequest) other); 736 } else { 737 super.mergeFrom(other); 738 return this; 739 } 740 } 741 mergeFrom(com.google.container.v1.SetLocationsRequest other)742 public Builder mergeFrom(com.google.container.v1.SetLocationsRequest other) { 743 if (other == com.google.container.v1.SetLocationsRequest.getDefaultInstance()) return this; 744 if (!other.getProjectId().isEmpty()) { 745 projectId_ = other.projectId_; 746 bitField0_ |= 0x00000001; 747 onChanged(); 748 } 749 if (!other.getZone().isEmpty()) { 750 zone_ = other.zone_; 751 bitField0_ |= 0x00000002; 752 onChanged(); 753 } 754 if (!other.getClusterId().isEmpty()) { 755 clusterId_ = other.clusterId_; 756 bitField0_ |= 0x00000004; 757 onChanged(); 758 } 759 if (!other.locations_.isEmpty()) { 760 if (locations_.isEmpty()) { 761 locations_ = other.locations_; 762 bitField0_ = (bitField0_ & ~0x00000008); 763 } else { 764 ensureLocationsIsMutable(); 765 locations_.addAll(other.locations_); 766 } 767 onChanged(); 768 } 769 if (!other.getName().isEmpty()) { 770 name_ = other.name_; 771 bitField0_ |= 0x00000010; 772 onChanged(); 773 } 774 this.mergeUnknownFields(other.getUnknownFields()); 775 onChanged(); 776 return this; 777 } 778 779 @java.lang.Override isInitialized()780 public final boolean isInitialized() { 781 return true; 782 } 783 784 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)785 public Builder mergeFrom( 786 com.google.protobuf.CodedInputStream input, 787 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 788 throws java.io.IOException { 789 if (extensionRegistry == null) { 790 throw new java.lang.NullPointerException(); 791 } 792 try { 793 boolean done = false; 794 while (!done) { 795 int tag = input.readTag(); 796 switch (tag) { 797 case 0: 798 done = true; 799 break; 800 case 10: 801 { 802 projectId_ = input.readStringRequireUtf8(); 803 bitField0_ |= 0x00000001; 804 break; 805 } // case 10 806 case 18: 807 { 808 zone_ = input.readStringRequireUtf8(); 809 bitField0_ |= 0x00000002; 810 break; 811 } // case 18 812 case 26: 813 { 814 clusterId_ = input.readStringRequireUtf8(); 815 bitField0_ |= 0x00000004; 816 break; 817 } // case 26 818 case 34: 819 { 820 java.lang.String s = input.readStringRequireUtf8(); 821 ensureLocationsIsMutable(); 822 locations_.add(s); 823 break; 824 } // case 34 825 case 50: 826 { 827 name_ = input.readStringRequireUtf8(); 828 bitField0_ |= 0x00000010; 829 break; 830 } // case 50 831 default: 832 { 833 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 834 done = true; // was an endgroup tag 835 } 836 break; 837 } // default: 838 } // switch (tag) 839 } // while (!done) 840 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 841 throw e.unwrapIOException(); 842 } finally { 843 onChanged(); 844 } // finally 845 return this; 846 } 847 848 private int bitField0_; 849 850 private java.lang.Object projectId_ = ""; 851 /** 852 * 853 * 854 * <pre> 855 * Deprecated. The Google Developers Console [project ID or project 856 * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). 857 * This field has been deprecated and replaced by the name field. 858 * </pre> 859 * 860 * <code>string project_id = 1 [deprecated = true];</code> 861 * 862 * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See 863 * google/container/v1/cluster_service.proto;l=2655 864 * @return The projectId. 865 */ 866 @java.lang.Deprecated getProjectId()867 public java.lang.String getProjectId() { 868 java.lang.Object ref = projectId_; 869 if (!(ref instanceof java.lang.String)) { 870 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 871 java.lang.String s = bs.toStringUtf8(); 872 projectId_ = s; 873 return s; 874 } else { 875 return (java.lang.String) ref; 876 } 877 } 878 /** 879 * 880 * 881 * <pre> 882 * Deprecated. The Google Developers Console [project ID or project 883 * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). 884 * This field has been deprecated and replaced by the name field. 885 * </pre> 886 * 887 * <code>string project_id = 1 [deprecated = true];</code> 888 * 889 * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See 890 * google/container/v1/cluster_service.proto;l=2655 891 * @return The bytes for projectId. 892 */ 893 @java.lang.Deprecated getProjectIdBytes()894 public com.google.protobuf.ByteString getProjectIdBytes() { 895 java.lang.Object ref = projectId_; 896 if (ref instanceof String) { 897 com.google.protobuf.ByteString b = 898 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 899 projectId_ = b; 900 return b; 901 } else { 902 return (com.google.protobuf.ByteString) ref; 903 } 904 } 905 /** 906 * 907 * 908 * <pre> 909 * Deprecated. The Google Developers Console [project ID or project 910 * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). 911 * This field has been deprecated and replaced by the name field. 912 * </pre> 913 * 914 * <code>string project_id = 1 [deprecated = true];</code> 915 * 916 * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See 917 * google/container/v1/cluster_service.proto;l=2655 918 * @param value The projectId to set. 919 * @return This builder for chaining. 920 */ 921 @java.lang.Deprecated setProjectId(java.lang.String value)922 public Builder setProjectId(java.lang.String value) { 923 if (value == null) { 924 throw new NullPointerException(); 925 } 926 projectId_ = value; 927 bitField0_ |= 0x00000001; 928 onChanged(); 929 return this; 930 } 931 /** 932 * 933 * 934 * <pre> 935 * Deprecated. The Google Developers Console [project ID or project 936 * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). 937 * This field has been deprecated and replaced by the name field. 938 * </pre> 939 * 940 * <code>string project_id = 1 [deprecated = true];</code> 941 * 942 * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See 943 * google/container/v1/cluster_service.proto;l=2655 944 * @return This builder for chaining. 945 */ 946 @java.lang.Deprecated clearProjectId()947 public Builder clearProjectId() { 948 projectId_ = getDefaultInstance().getProjectId(); 949 bitField0_ = (bitField0_ & ~0x00000001); 950 onChanged(); 951 return this; 952 } 953 /** 954 * 955 * 956 * <pre> 957 * Deprecated. The Google Developers Console [project ID or project 958 * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). 959 * This field has been deprecated and replaced by the name field. 960 * </pre> 961 * 962 * <code>string project_id = 1 [deprecated = true];</code> 963 * 964 * @deprecated google.container.v1.SetLocationsRequest.project_id is deprecated. See 965 * google/container/v1/cluster_service.proto;l=2655 966 * @param value The bytes for projectId to set. 967 * @return This builder for chaining. 968 */ 969 @java.lang.Deprecated setProjectIdBytes(com.google.protobuf.ByteString value)970 public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { 971 if (value == null) { 972 throw new NullPointerException(); 973 } 974 checkByteStringIsUtf8(value); 975 projectId_ = value; 976 bitField0_ |= 0x00000001; 977 onChanged(); 978 return this; 979 } 980 981 private java.lang.Object zone_ = ""; 982 /** 983 * 984 * 985 * <pre> 986 * Deprecated. The name of the Google Compute Engine 987 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the 988 * cluster resides. This field has been deprecated and replaced by the name 989 * field. 990 * </pre> 991 * 992 * <code>string zone = 2 [deprecated = true];</code> 993 * 994 * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See 995 * google/container/v1/cluster_service.proto;l=2661 996 * @return The zone. 997 */ 998 @java.lang.Deprecated getZone()999 public java.lang.String getZone() { 1000 java.lang.Object ref = zone_; 1001 if (!(ref instanceof java.lang.String)) { 1002 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1003 java.lang.String s = bs.toStringUtf8(); 1004 zone_ = s; 1005 return s; 1006 } else { 1007 return (java.lang.String) ref; 1008 } 1009 } 1010 /** 1011 * 1012 * 1013 * <pre> 1014 * Deprecated. The name of the Google Compute Engine 1015 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the 1016 * cluster resides. This field has been deprecated and replaced by the name 1017 * field. 1018 * </pre> 1019 * 1020 * <code>string zone = 2 [deprecated = true];</code> 1021 * 1022 * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See 1023 * google/container/v1/cluster_service.proto;l=2661 1024 * @return The bytes for zone. 1025 */ 1026 @java.lang.Deprecated getZoneBytes()1027 public com.google.protobuf.ByteString getZoneBytes() { 1028 java.lang.Object ref = zone_; 1029 if (ref instanceof String) { 1030 com.google.protobuf.ByteString b = 1031 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1032 zone_ = b; 1033 return b; 1034 } else { 1035 return (com.google.protobuf.ByteString) ref; 1036 } 1037 } 1038 /** 1039 * 1040 * 1041 * <pre> 1042 * Deprecated. The name of the Google Compute Engine 1043 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the 1044 * cluster resides. This field has been deprecated and replaced by the name 1045 * field. 1046 * </pre> 1047 * 1048 * <code>string zone = 2 [deprecated = true];</code> 1049 * 1050 * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See 1051 * google/container/v1/cluster_service.proto;l=2661 1052 * @param value The zone to set. 1053 * @return This builder for chaining. 1054 */ 1055 @java.lang.Deprecated setZone(java.lang.String value)1056 public Builder setZone(java.lang.String value) { 1057 if (value == null) { 1058 throw new NullPointerException(); 1059 } 1060 zone_ = value; 1061 bitField0_ |= 0x00000002; 1062 onChanged(); 1063 return this; 1064 } 1065 /** 1066 * 1067 * 1068 * <pre> 1069 * Deprecated. The name of the Google Compute Engine 1070 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the 1071 * cluster resides. This field has been deprecated and replaced by the name 1072 * field. 1073 * </pre> 1074 * 1075 * <code>string zone = 2 [deprecated = true];</code> 1076 * 1077 * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See 1078 * google/container/v1/cluster_service.proto;l=2661 1079 * @return This builder for chaining. 1080 */ 1081 @java.lang.Deprecated clearZone()1082 public Builder clearZone() { 1083 zone_ = getDefaultInstance().getZone(); 1084 bitField0_ = (bitField0_ & ~0x00000002); 1085 onChanged(); 1086 return this; 1087 } 1088 /** 1089 * 1090 * 1091 * <pre> 1092 * Deprecated. The name of the Google Compute Engine 1093 * [zone](https://cloud.google.com/compute/docs/zones#available) in which the 1094 * cluster resides. This field has been deprecated and replaced by the name 1095 * field. 1096 * </pre> 1097 * 1098 * <code>string zone = 2 [deprecated = true];</code> 1099 * 1100 * @deprecated google.container.v1.SetLocationsRequest.zone is deprecated. See 1101 * google/container/v1/cluster_service.proto;l=2661 1102 * @param value The bytes for zone to set. 1103 * @return This builder for chaining. 1104 */ 1105 @java.lang.Deprecated setZoneBytes(com.google.protobuf.ByteString value)1106 public Builder setZoneBytes(com.google.protobuf.ByteString value) { 1107 if (value == null) { 1108 throw new NullPointerException(); 1109 } 1110 checkByteStringIsUtf8(value); 1111 zone_ = value; 1112 bitField0_ |= 0x00000002; 1113 onChanged(); 1114 return this; 1115 } 1116 1117 private java.lang.Object clusterId_ = ""; 1118 /** 1119 * 1120 * 1121 * <pre> 1122 * Deprecated. The name of the cluster to upgrade. 1123 * This field has been deprecated and replaced by the name field. 1124 * </pre> 1125 * 1126 * <code>string cluster_id = 3 [deprecated = true];</code> 1127 * 1128 * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See 1129 * google/container/v1/cluster_service.proto;l=2665 1130 * @return The clusterId. 1131 */ 1132 @java.lang.Deprecated getClusterId()1133 public java.lang.String getClusterId() { 1134 java.lang.Object ref = clusterId_; 1135 if (!(ref instanceof java.lang.String)) { 1136 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1137 java.lang.String s = bs.toStringUtf8(); 1138 clusterId_ = s; 1139 return s; 1140 } else { 1141 return (java.lang.String) ref; 1142 } 1143 } 1144 /** 1145 * 1146 * 1147 * <pre> 1148 * Deprecated. The name of the cluster to upgrade. 1149 * This field has been deprecated and replaced by the name field. 1150 * </pre> 1151 * 1152 * <code>string cluster_id = 3 [deprecated = true];</code> 1153 * 1154 * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See 1155 * google/container/v1/cluster_service.proto;l=2665 1156 * @return The bytes for clusterId. 1157 */ 1158 @java.lang.Deprecated getClusterIdBytes()1159 public com.google.protobuf.ByteString getClusterIdBytes() { 1160 java.lang.Object ref = clusterId_; 1161 if (ref instanceof String) { 1162 com.google.protobuf.ByteString b = 1163 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1164 clusterId_ = b; 1165 return b; 1166 } else { 1167 return (com.google.protobuf.ByteString) ref; 1168 } 1169 } 1170 /** 1171 * 1172 * 1173 * <pre> 1174 * Deprecated. The name of the cluster to upgrade. 1175 * This field has been deprecated and replaced by the name field. 1176 * </pre> 1177 * 1178 * <code>string cluster_id = 3 [deprecated = true];</code> 1179 * 1180 * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See 1181 * google/container/v1/cluster_service.proto;l=2665 1182 * @param value The clusterId to set. 1183 * @return This builder for chaining. 1184 */ 1185 @java.lang.Deprecated setClusterId(java.lang.String value)1186 public Builder setClusterId(java.lang.String value) { 1187 if (value == null) { 1188 throw new NullPointerException(); 1189 } 1190 clusterId_ = value; 1191 bitField0_ |= 0x00000004; 1192 onChanged(); 1193 return this; 1194 } 1195 /** 1196 * 1197 * 1198 * <pre> 1199 * Deprecated. The name of the cluster to upgrade. 1200 * This field has been deprecated and replaced by the name field. 1201 * </pre> 1202 * 1203 * <code>string cluster_id = 3 [deprecated = true];</code> 1204 * 1205 * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See 1206 * google/container/v1/cluster_service.proto;l=2665 1207 * @return This builder for chaining. 1208 */ 1209 @java.lang.Deprecated clearClusterId()1210 public Builder clearClusterId() { 1211 clusterId_ = getDefaultInstance().getClusterId(); 1212 bitField0_ = (bitField0_ & ~0x00000004); 1213 onChanged(); 1214 return this; 1215 } 1216 /** 1217 * 1218 * 1219 * <pre> 1220 * Deprecated. The name of the cluster to upgrade. 1221 * This field has been deprecated and replaced by the name field. 1222 * </pre> 1223 * 1224 * <code>string cluster_id = 3 [deprecated = true];</code> 1225 * 1226 * @deprecated google.container.v1.SetLocationsRequest.cluster_id is deprecated. See 1227 * google/container/v1/cluster_service.proto;l=2665 1228 * @param value The bytes for clusterId to set. 1229 * @return This builder for chaining. 1230 */ 1231 @java.lang.Deprecated setClusterIdBytes(com.google.protobuf.ByteString value)1232 public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { 1233 if (value == null) { 1234 throw new NullPointerException(); 1235 } 1236 checkByteStringIsUtf8(value); 1237 clusterId_ = value; 1238 bitField0_ |= 0x00000004; 1239 onChanged(); 1240 return this; 1241 } 1242 1243 private com.google.protobuf.LazyStringList locations_ = 1244 com.google.protobuf.LazyStringArrayList.EMPTY; 1245 ensureLocationsIsMutable()1246 private void ensureLocationsIsMutable() { 1247 if (!((bitField0_ & 0x00000008) != 0)) { 1248 locations_ = new com.google.protobuf.LazyStringArrayList(locations_); 1249 bitField0_ |= 0x00000008; 1250 } 1251 } 1252 /** 1253 * 1254 * 1255 * <pre> 1256 * Required. The desired list of Google Compute Engine 1257 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1258 * cluster's nodes should be located. Changing the locations a cluster is in 1259 * will result in nodes being either created or removed from the cluster, 1260 * depending on whether locations are being added or removed. 1261 * This list must always include the cluster's primary zone. 1262 * </pre> 1263 * 1264 * <code>repeated string locations = 4 [(.google.api.field_behavior) = REQUIRED];</code> 1265 * 1266 * @return A list containing the locations. 1267 */ getLocationsList()1268 public com.google.protobuf.ProtocolStringList getLocationsList() { 1269 return locations_.getUnmodifiableView(); 1270 } 1271 /** 1272 * 1273 * 1274 * <pre> 1275 * Required. The desired list of Google Compute Engine 1276 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1277 * cluster's nodes should be located. Changing the locations a cluster is in 1278 * will result in nodes being either created or removed from the cluster, 1279 * depending on whether locations are being added or removed. 1280 * This list must always include the cluster's primary zone. 1281 * </pre> 1282 * 1283 * <code>repeated string locations = 4 [(.google.api.field_behavior) = REQUIRED];</code> 1284 * 1285 * @return The count of locations. 1286 */ getLocationsCount()1287 public int getLocationsCount() { 1288 return locations_.size(); 1289 } 1290 /** 1291 * 1292 * 1293 * <pre> 1294 * Required. The desired list of Google Compute Engine 1295 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1296 * cluster's nodes should be located. Changing the locations a cluster is in 1297 * will result in nodes being either created or removed from the cluster, 1298 * depending on whether locations are being added or removed. 1299 * This list must always include the cluster's primary zone. 1300 * </pre> 1301 * 1302 * <code>repeated string locations = 4 [(.google.api.field_behavior) = REQUIRED];</code> 1303 * 1304 * @param index The index of the element to return. 1305 * @return The locations at the given index. 1306 */ getLocations(int index)1307 public java.lang.String getLocations(int index) { 1308 return locations_.get(index); 1309 } 1310 /** 1311 * 1312 * 1313 * <pre> 1314 * Required. The desired list of Google Compute Engine 1315 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1316 * cluster's nodes should be located. Changing the locations a cluster is in 1317 * will result in nodes being either created or removed from the cluster, 1318 * depending on whether locations are being added or removed. 1319 * This list must always include the cluster's primary zone. 1320 * </pre> 1321 * 1322 * <code>repeated string locations = 4 [(.google.api.field_behavior) = REQUIRED];</code> 1323 * 1324 * @param index The index of the value to return. 1325 * @return The bytes of the locations at the given index. 1326 */ getLocationsBytes(int index)1327 public com.google.protobuf.ByteString getLocationsBytes(int index) { 1328 return locations_.getByteString(index); 1329 } 1330 /** 1331 * 1332 * 1333 * <pre> 1334 * Required. The desired list of Google Compute Engine 1335 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1336 * cluster's nodes should be located. Changing the locations a cluster is in 1337 * will result in nodes being either created or removed from the cluster, 1338 * depending on whether locations are being added or removed. 1339 * This list must always include the cluster's primary zone. 1340 * </pre> 1341 * 1342 * <code>repeated string locations = 4 [(.google.api.field_behavior) = REQUIRED];</code> 1343 * 1344 * @param index The index to set the value at. 1345 * @param value The locations to set. 1346 * @return This builder for chaining. 1347 */ setLocations(int index, java.lang.String value)1348 public Builder setLocations(int index, java.lang.String value) { 1349 if (value == null) { 1350 throw new NullPointerException(); 1351 } 1352 ensureLocationsIsMutable(); 1353 locations_.set(index, value); 1354 onChanged(); 1355 return this; 1356 } 1357 /** 1358 * 1359 * 1360 * <pre> 1361 * Required. The desired list of Google Compute Engine 1362 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1363 * cluster's nodes should be located. Changing the locations a cluster is in 1364 * will result in nodes being either created or removed from the cluster, 1365 * depending on whether locations are being added or removed. 1366 * This list must always include the cluster's primary zone. 1367 * </pre> 1368 * 1369 * <code>repeated string locations = 4 [(.google.api.field_behavior) = REQUIRED];</code> 1370 * 1371 * @param value The locations to add. 1372 * @return This builder for chaining. 1373 */ addLocations(java.lang.String value)1374 public Builder addLocations(java.lang.String value) { 1375 if (value == null) { 1376 throw new NullPointerException(); 1377 } 1378 ensureLocationsIsMutable(); 1379 locations_.add(value); 1380 onChanged(); 1381 return this; 1382 } 1383 /** 1384 * 1385 * 1386 * <pre> 1387 * Required. The desired list of Google Compute Engine 1388 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1389 * cluster's nodes should be located. Changing the locations a cluster is in 1390 * will result in nodes being either created or removed from the cluster, 1391 * depending on whether locations are being added or removed. 1392 * This list must always include the cluster's primary zone. 1393 * </pre> 1394 * 1395 * <code>repeated string locations = 4 [(.google.api.field_behavior) = REQUIRED];</code> 1396 * 1397 * @param values The locations to add. 1398 * @return This builder for chaining. 1399 */ addAllLocations(java.lang.Iterable<java.lang.String> values)1400 public Builder addAllLocations(java.lang.Iterable<java.lang.String> values) { 1401 ensureLocationsIsMutable(); 1402 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, locations_); 1403 onChanged(); 1404 return this; 1405 } 1406 /** 1407 * 1408 * 1409 * <pre> 1410 * Required. The desired list of Google Compute Engine 1411 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1412 * cluster's nodes should be located. Changing the locations a cluster is in 1413 * will result in nodes being either created or removed from the cluster, 1414 * depending on whether locations are being added or removed. 1415 * This list must always include the cluster's primary zone. 1416 * </pre> 1417 * 1418 * <code>repeated string locations = 4 [(.google.api.field_behavior) = REQUIRED];</code> 1419 * 1420 * @return This builder for chaining. 1421 */ clearLocations()1422 public Builder clearLocations() { 1423 locations_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1424 bitField0_ = (bitField0_ & ~0x00000008); 1425 onChanged(); 1426 return this; 1427 } 1428 /** 1429 * 1430 * 1431 * <pre> 1432 * Required. The desired list of Google Compute Engine 1433 * [zones](https://cloud.google.com/compute/docs/zones#available) in which the 1434 * cluster's nodes should be located. Changing the locations a cluster is in 1435 * will result in nodes being either created or removed from the cluster, 1436 * depending on whether locations are being added or removed. 1437 * This list must always include the cluster's primary zone. 1438 * </pre> 1439 * 1440 * <code>repeated string locations = 4 [(.google.api.field_behavior) = REQUIRED];</code> 1441 * 1442 * @param value The bytes of the locations to add. 1443 * @return This builder for chaining. 1444 */ addLocationsBytes(com.google.protobuf.ByteString value)1445 public Builder addLocationsBytes(com.google.protobuf.ByteString value) { 1446 if (value == null) { 1447 throw new NullPointerException(); 1448 } 1449 checkByteStringIsUtf8(value); 1450 ensureLocationsIsMutable(); 1451 locations_.add(value); 1452 onChanged(); 1453 return this; 1454 } 1455 1456 private java.lang.Object name_ = ""; 1457 /** 1458 * 1459 * 1460 * <pre> 1461 * The name (project, location, cluster) of the cluster to set locations. 1462 * Specified in the format `projects/*/locations/*/clusters/*`. 1463 * </pre> 1464 * 1465 * <code>string name = 6;</code> 1466 * 1467 * @return The name. 1468 */ getName()1469 public java.lang.String getName() { 1470 java.lang.Object ref = name_; 1471 if (!(ref instanceof java.lang.String)) { 1472 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1473 java.lang.String s = bs.toStringUtf8(); 1474 name_ = s; 1475 return s; 1476 } else { 1477 return (java.lang.String) ref; 1478 } 1479 } 1480 /** 1481 * 1482 * 1483 * <pre> 1484 * The name (project, location, cluster) of the cluster to set locations. 1485 * Specified in the format `projects/*/locations/*/clusters/*`. 1486 * </pre> 1487 * 1488 * <code>string name = 6;</code> 1489 * 1490 * @return The bytes for name. 1491 */ getNameBytes()1492 public com.google.protobuf.ByteString getNameBytes() { 1493 java.lang.Object ref = name_; 1494 if (ref instanceof String) { 1495 com.google.protobuf.ByteString b = 1496 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1497 name_ = b; 1498 return b; 1499 } else { 1500 return (com.google.protobuf.ByteString) ref; 1501 } 1502 } 1503 /** 1504 * 1505 * 1506 * <pre> 1507 * The name (project, location, cluster) of the cluster to set locations. 1508 * Specified in the format `projects/*/locations/*/clusters/*`. 1509 * </pre> 1510 * 1511 * <code>string name = 6;</code> 1512 * 1513 * @param value The name to set. 1514 * @return This builder for chaining. 1515 */ setName(java.lang.String value)1516 public Builder setName(java.lang.String value) { 1517 if (value == null) { 1518 throw new NullPointerException(); 1519 } 1520 name_ = value; 1521 bitField0_ |= 0x00000010; 1522 onChanged(); 1523 return this; 1524 } 1525 /** 1526 * 1527 * 1528 * <pre> 1529 * The name (project, location, cluster) of the cluster to set locations. 1530 * Specified in the format `projects/*/locations/*/clusters/*`. 1531 * </pre> 1532 * 1533 * <code>string name = 6;</code> 1534 * 1535 * @return This builder for chaining. 1536 */ clearName()1537 public Builder clearName() { 1538 name_ = getDefaultInstance().getName(); 1539 bitField0_ = (bitField0_ & ~0x00000010); 1540 onChanged(); 1541 return this; 1542 } 1543 /** 1544 * 1545 * 1546 * <pre> 1547 * The name (project, location, cluster) of the cluster to set locations. 1548 * Specified in the format `projects/*/locations/*/clusters/*`. 1549 * </pre> 1550 * 1551 * <code>string name = 6;</code> 1552 * 1553 * @param value The bytes for name to set. 1554 * @return This builder for chaining. 1555 */ setNameBytes(com.google.protobuf.ByteString value)1556 public Builder setNameBytes(com.google.protobuf.ByteString value) { 1557 if (value == null) { 1558 throw new NullPointerException(); 1559 } 1560 checkByteStringIsUtf8(value); 1561 name_ = value; 1562 bitField0_ |= 0x00000010; 1563 onChanged(); 1564 return this; 1565 } 1566 1567 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1568 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1569 return super.setUnknownFields(unknownFields); 1570 } 1571 1572 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1573 public final Builder mergeUnknownFields( 1574 final com.google.protobuf.UnknownFieldSet unknownFields) { 1575 return super.mergeUnknownFields(unknownFields); 1576 } 1577 1578 // @@protoc_insertion_point(builder_scope:google.container.v1.SetLocationsRequest) 1579 } 1580 1581 // @@protoc_insertion_point(class_scope:google.container.v1.SetLocationsRequest) 1582 private static final com.google.container.v1.SetLocationsRequest DEFAULT_INSTANCE; 1583 1584 static { 1585 DEFAULT_INSTANCE = new com.google.container.v1.SetLocationsRequest(); 1586 } 1587 getDefaultInstance()1588 public static com.google.container.v1.SetLocationsRequest getDefaultInstance() { 1589 return DEFAULT_INSTANCE; 1590 } 1591 1592 private static final com.google.protobuf.Parser<SetLocationsRequest> PARSER = 1593 new com.google.protobuf.AbstractParser<SetLocationsRequest>() { 1594 @java.lang.Override 1595 public SetLocationsRequest parsePartialFrom( 1596 com.google.protobuf.CodedInputStream input, 1597 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1598 throws com.google.protobuf.InvalidProtocolBufferException { 1599 Builder builder = newBuilder(); 1600 try { 1601 builder.mergeFrom(input, extensionRegistry); 1602 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1603 throw e.setUnfinishedMessage(builder.buildPartial()); 1604 } catch (com.google.protobuf.UninitializedMessageException e) { 1605 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1606 } catch (java.io.IOException e) { 1607 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1608 .setUnfinishedMessage(builder.buildPartial()); 1609 } 1610 return builder.buildPartial(); 1611 } 1612 }; 1613 parser()1614 public static com.google.protobuf.Parser<SetLocationsRequest> parser() { 1615 return PARSER; 1616 } 1617 1618 @java.lang.Override getParserForType()1619 public com.google.protobuf.Parser<SetLocationsRequest> getParserForType() { 1620 return PARSER; 1621 } 1622 1623 @java.lang.Override getDefaultInstanceForType()1624 public com.google.container.v1.SetLocationsRequest getDefaultInstanceForType() { 1625 return DEFAULT_INSTANCE; 1626 } 1627 } 1628