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