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/iot/v1/device_manager.proto 18 19 package com.google.cloud.iot.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Response for `ListDeviceRegistries`. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.iot.v1.ListDeviceRegistriesResponse} 29 */ 30 public final class ListDeviceRegistriesResponse extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.iot.v1.ListDeviceRegistriesResponse) 33 ListDeviceRegistriesResponseOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use ListDeviceRegistriesResponse.newBuilder() to construct. ListDeviceRegistriesResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private ListDeviceRegistriesResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 ListDeviceRegistriesResponse()40 private ListDeviceRegistriesResponse() { 41 deviceRegistries_ = java.util.Collections.emptyList(); 42 nextPageToken_ = ""; 43 } 44 45 @java.lang.Override 46 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)47 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 48 return new ListDeviceRegistriesResponse(); 49 } 50 51 @java.lang.Override getUnknownFields()52 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 53 return this.unknownFields; 54 } 55 getDescriptor()56 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 57 return com.google.cloud.iot.v1.DeviceManagerProto 58 .internal_static_google_cloud_iot_v1_ListDeviceRegistriesResponse_descriptor; 59 } 60 61 @java.lang.Override 62 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()63 internalGetFieldAccessorTable() { 64 return com.google.cloud.iot.v1.DeviceManagerProto 65 .internal_static_google_cloud_iot_v1_ListDeviceRegistriesResponse_fieldAccessorTable 66 .ensureFieldAccessorsInitialized( 67 com.google.cloud.iot.v1.ListDeviceRegistriesResponse.class, 68 com.google.cloud.iot.v1.ListDeviceRegistriesResponse.Builder.class); 69 } 70 71 public static final int DEVICE_REGISTRIES_FIELD_NUMBER = 1; 72 73 @SuppressWarnings("serial") 74 private java.util.List<com.google.cloud.iot.v1.DeviceRegistry> deviceRegistries_; 75 /** 76 * 77 * 78 * <pre> 79 * The registries that matched the query. 80 * </pre> 81 * 82 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 83 */ 84 @java.lang.Override getDeviceRegistriesList()85 public java.util.List<com.google.cloud.iot.v1.DeviceRegistry> getDeviceRegistriesList() { 86 return deviceRegistries_; 87 } 88 /** 89 * 90 * 91 * <pre> 92 * The registries that matched the query. 93 * </pre> 94 * 95 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 96 */ 97 @java.lang.Override 98 public java.util.List<? extends com.google.cloud.iot.v1.DeviceRegistryOrBuilder> getDeviceRegistriesOrBuilderList()99 getDeviceRegistriesOrBuilderList() { 100 return deviceRegistries_; 101 } 102 /** 103 * 104 * 105 * <pre> 106 * The registries that matched the query. 107 * </pre> 108 * 109 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 110 */ 111 @java.lang.Override getDeviceRegistriesCount()112 public int getDeviceRegistriesCount() { 113 return deviceRegistries_.size(); 114 } 115 /** 116 * 117 * 118 * <pre> 119 * The registries that matched the query. 120 * </pre> 121 * 122 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 123 */ 124 @java.lang.Override getDeviceRegistries(int index)125 public com.google.cloud.iot.v1.DeviceRegistry getDeviceRegistries(int index) { 126 return deviceRegistries_.get(index); 127 } 128 /** 129 * 130 * 131 * <pre> 132 * The registries that matched the query. 133 * </pre> 134 * 135 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 136 */ 137 @java.lang.Override getDeviceRegistriesOrBuilder(int index)138 public com.google.cloud.iot.v1.DeviceRegistryOrBuilder getDeviceRegistriesOrBuilder(int index) { 139 return deviceRegistries_.get(index); 140 } 141 142 public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; 143 144 @SuppressWarnings("serial") 145 private volatile java.lang.Object nextPageToken_ = ""; 146 /** 147 * 148 * 149 * <pre> 150 * If not empty, indicates that there may be more registries that match the 151 * request; this value should be passed in a new 152 * `ListDeviceRegistriesRequest`. 153 * </pre> 154 * 155 * <code>string next_page_token = 2;</code> 156 * 157 * @return The nextPageToken. 158 */ 159 @java.lang.Override getNextPageToken()160 public java.lang.String getNextPageToken() { 161 java.lang.Object ref = nextPageToken_; 162 if (ref instanceof java.lang.String) { 163 return (java.lang.String) ref; 164 } else { 165 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 166 java.lang.String s = bs.toStringUtf8(); 167 nextPageToken_ = s; 168 return s; 169 } 170 } 171 /** 172 * 173 * 174 * <pre> 175 * If not empty, indicates that there may be more registries that match the 176 * request; this value should be passed in a new 177 * `ListDeviceRegistriesRequest`. 178 * </pre> 179 * 180 * <code>string next_page_token = 2;</code> 181 * 182 * @return The bytes for nextPageToken. 183 */ 184 @java.lang.Override getNextPageTokenBytes()185 public com.google.protobuf.ByteString getNextPageTokenBytes() { 186 java.lang.Object ref = nextPageToken_; 187 if (ref instanceof java.lang.String) { 188 com.google.protobuf.ByteString b = 189 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 190 nextPageToken_ = b; 191 return b; 192 } else { 193 return (com.google.protobuf.ByteString) ref; 194 } 195 } 196 197 private byte memoizedIsInitialized = -1; 198 199 @java.lang.Override isInitialized()200 public final boolean isInitialized() { 201 byte isInitialized = memoizedIsInitialized; 202 if (isInitialized == 1) return true; 203 if (isInitialized == 0) return false; 204 205 memoizedIsInitialized = 1; 206 return true; 207 } 208 209 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)210 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 211 for (int i = 0; i < deviceRegistries_.size(); i++) { 212 output.writeMessage(1, deviceRegistries_.get(i)); 213 } 214 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { 215 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); 216 } 217 getUnknownFields().writeTo(output); 218 } 219 220 @java.lang.Override getSerializedSize()221 public int getSerializedSize() { 222 int size = memoizedSize; 223 if (size != -1) return size; 224 225 size = 0; 226 for (int i = 0; i < deviceRegistries_.size(); i++) { 227 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, deviceRegistries_.get(i)); 228 } 229 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { 230 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); 231 } 232 size += getUnknownFields().getSerializedSize(); 233 memoizedSize = size; 234 return size; 235 } 236 237 @java.lang.Override equals(final java.lang.Object obj)238 public boolean equals(final java.lang.Object obj) { 239 if (obj == this) { 240 return true; 241 } 242 if (!(obj instanceof com.google.cloud.iot.v1.ListDeviceRegistriesResponse)) { 243 return super.equals(obj); 244 } 245 com.google.cloud.iot.v1.ListDeviceRegistriesResponse other = 246 (com.google.cloud.iot.v1.ListDeviceRegistriesResponse) obj; 247 248 if (!getDeviceRegistriesList().equals(other.getDeviceRegistriesList())) return false; 249 if (!getNextPageToken().equals(other.getNextPageToken())) return false; 250 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 251 return true; 252 } 253 254 @java.lang.Override hashCode()255 public int hashCode() { 256 if (memoizedHashCode != 0) { 257 return memoizedHashCode; 258 } 259 int hash = 41; 260 hash = (19 * hash) + getDescriptor().hashCode(); 261 if (getDeviceRegistriesCount() > 0) { 262 hash = (37 * hash) + DEVICE_REGISTRIES_FIELD_NUMBER; 263 hash = (53 * hash) + getDeviceRegistriesList().hashCode(); 264 } 265 hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; 266 hash = (53 * hash) + getNextPageToken().hashCode(); 267 hash = (29 * hash) + getUnknownFields().hashCode(); 268 memoizedHashCode = hash; 269 return hash; 270 } 271 parseFrom( java.nio.ByteBuffer data)272 public static com.google.cloud.iot.v1.ListDeviceRegistriesResponse parseFrom( 273 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 274 return PARSER.parseFrom(data); 275 } 276 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)277 public static com.google.cloud.iot.v1.ListDeviceRegistriesResponse parseFrom( 278 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 279 throws com.google.protobuf.InvalidProtocolBufferException { 280 return PARSER.parseFrom(data, extensionRegistry); 281 } 282 parseFrom( com.google.protobuf.ByteString data)283 public static com.google.cloud.iot.v1.ListDeviceRegistriesResponse parseFrom( 284 com.google.protobuf.ByteString data) 285 throws com.google.protobuf.InvalidProtocolBufferException { 286 return PARSER.parseFrom(data); 287 } 288 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)289 public static com.google.cloud.iot.v1.ListDeviceRegistriesResponse parseFrom( 290 com.google.protobuf.ByteString data, 291 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 292 throws com.google.protobuf.InvalidProtocolBufferException { 293 return PARSER.parseFrom(data, extensionRegistry); 294 } 295 parseFrom(byte[] data)296 public static com.google.cloud.iot.v1.ListDeviceRegistriesResponse parseFrom(byte[] data) 297 throws com.google.protobuf.InvalidProtocolBufferException { 298 return PARSER.parseFrom(data); 299 } 300 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)301 public static com.google.cloud.iot.v1.ListDeviceRegistriesResponse parseFrom( 302 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 303 throws com.google.protobuf.InvalidProtocolBufferException { 304 return PARSER.parseFrom(data, extensionRegistry); 305 } 306 parseFrom( java.io.InputStream input)307 public static com.google.cloud.iot.v1.ListDeviceRegistriesResponse parseFrom( 308 java.io.InputStream input) throws java.io.IOException { 309 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 310 } 311 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)312 public static com.google.cloud.iot.v1.ListDeviceRegistriesResponse parseFrom( 313 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 314 throws java.io.IOException { 315 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 316 PARSER, input, extensionRegistry); 317 } 318 parseDelimitedFrom( java.io.InputStream input)319 public static com.google.cloud.iot.v1.ListDeviceRegistriesResponse parseDelimitedFrom( 320 java.io.InputStream input) throws java.io.IOException { 321 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 322 } 323 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)324 public static com.google.cloud.iot.v1.ListDeviceRegistriesResponse parseDelimitedFrom( 325 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 326 throws java.io.IOException { 327 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 328 PARSER, input, extensionRegistry); 329 } 330 parseFrom( com.google.protobuf.CodedInputStream input)331 public static com.google.cloud.iot.v1.ListDeviceRegistriesResponse parseFrom( 332 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 333 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 334 } 335 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)336 public static com.google.cloud.iot.v1.ListDeviceRegistriesResponse parseFrom( 337 com.google.protobuf.CodedInputStream input, 338 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 339 throws java.io.IOException { 340 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 341 PARSER, input, extensionRegistry); 342 } 343 344 @java.lang.Override newBuilderForType()345 public Builder newBuilderForType() { 346 return newBuilder(); 347 } 348 newBuilder()349 public static Builder newBuilder() { 350 return DEFAULT_INSTANCE.toBuilder(); 351 } 352 newBuilder(com.google.cloud.iot.v1.ListDeviceRegistriesResponse prototype)353 public static Builder newBuilder(com.google.cloud.iot.v1.ListDeviceRegistriesResponse prototype) { 354 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 355 } 356 357 @java.lang.Override toBuilder()358 public Builder toBuilder() { 359 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 360 } 361 362 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)363 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 364 Builder builder = new Builder(parent); 365 return builder; 366 } 367 /** 368 * 369 * 370 * <pre> 371 * Response for `ListDeviceRegistries`. 372 * </pre> 373 * 374 * Protobuf type {@code google.cloud.iot.v1.ListDeviceRegistriesResponse} 375 */ 376 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 377 implements 378 // @@protoc_insertion_point(builder_implements:google.cloud.iot.v1.ListDeviceRegistriesResponse) 379 com.google.cloud.iot.v1.ListDeviceRegistriesResponseOrBuilder { getDescriptor()380 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 381 return com.google.cloud.iot.v1.DeviceManagerProto 382 .internal_static_google_cloud_iot_v1_ListDeviceRegistriesResponse_descriptor; 383 } 384 385 @java.lang.Override 386 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()387 internalGetFieldAccessorTable() { 388 return com.google.cloud.iot.v1.DeviceManagerProto 389 .internal_static_google_cloud_iot_v1_ListDeviceRegistriesResponse_fieldAccessorTable 390 .ensureFieldAccessorsInitialized( 391 com.google.cloud.iot.v1.ListDeviceRegistriesResponse.class, 392 com.google.cloud.iot.v1.ListDeviceRegistriesResponse.Builder.class); 393 } 394 395 // Construct using com.google.cloud.iot.v1.ListDeviceRegistriesResponse.newBuilder() Builder()396 private Builder() {} 397 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)398 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 399 super(parent); 400 } 401 402 @java.lang.Override clear()403 public Builder clear() { 404 super.clear(); 405 bitField0_ = 0; 406 if (deviceRegistriesBuilder_ == null) { 407 deviceRegistries_ = java.util.Collections.emptyList(); 408 } else { 409 deviceRegistries_ = null; 410 deviceRegistriesBuilder_.clear(); 411 } 412 bitField0_ = (bitField0_ & ~0x00000001); 413 nextPageToken_ = ""; 414 return this; 415 } 416 417 @java.lang.Override getDescriptorForType()418 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 419 return com.google.cloud.iot.v1.DeviceManagerProto 420 .internal_static_google_cloud_iot_v1_ListDeviceRegistriesResponse_descriptor; 421 } 422 423 @java.lang.Override getDefaultInstanceForType()424 public com.google.cloud.iot.v1.ListDeviceRegistriesResponse getDefaultInstanceForType() { 425 return com.google.cloud.iot.v1.ListDeviceRegistriesResponse.getDefaultInstance(); 426 } 427 428 @java.lang.Override build()429 public com.google.cloud.iot.v1.ListDeviceRegistriesResponse build() { 430 com.google.cloud.iot.v1.ListDeviceRegistriesResponse result = buildPartial(); 431 if (!result.isInitialized()) { 432 throw newUninitializedMessageException(result); 433 } 434 return result; 435 } 436 437 @java.lang.Override buildPartial()438 public com.google.cloud.iot.v1.ListDeviceRegistriesResponse buildPartial() { 439 com.google.cloud.iot.v1.ListDeviceRegistriesResponse result = 440 new com.google.cloud.iot.v1.ListDeviceRegistriesResponse(this); 441 buildPartialRepeatedFields(result); 442 if (bitField0_ != 0) { 443 buildPartial0(result); 444 } 445 onBuilt(); 446 return result; 447 } 448 buildPartialRepeatedFields( com.google.cloud.iot.v1.ListDeviceRegistriesResponse result)449 private void buildPartialRepeatedFields( 450 com.google.cloud.iot.v1.ListDeviceRegistriesResponse result) { 451 if (deviceRegistriesBuilder_ == null) { 452 if (((bitField0_ & 0x00000001) != 0)) { 453 deviceRegistries_ = java.util.Collections.unmodifiableList(deviceRegistries_); 454 bitField0_ = (bitField0_ & ~0x00000001); 455 } 456 result.deviceRegistries_ = deviceRegistries_; 457 } else { 458 result.deviceRegistries_ = deviceRegistriesBuilder_.build(); 459 } 460 } 461 buildPartial0(com.google.cloud.iot.v1.ListDeviceRegistriesResponse result)462 private void buildPartial0(com.google.cloud.iot.v1.ListDeviceRegistriesResponse result) { 463 int from_bitField0_ = bitField0_; 464 if (((from_bitField0_ & 0x00000002) != 0)) { 465 result.nextPageToken_ = nextPageToken_; 466 } 467 } 468 469 @java.lang.Override clone()470 public Builder clone() { 471 return super.clone(); 472 } 473 474 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)475 public Builder setField( 476 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 477 return super.setField(field, value); 478 } 479 480 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)481 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 482 return super.clearField(field); 483 } 484 485 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)486 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 487 return super.clearOneof(oneof); 488 } 489 490 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)491 public Builder setRepeatedField( 492 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 493 return super.setRepeatedField(field, index, value); 494 } 495 496 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)497 public Builder addRepeatedField( 498 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 499 return super.addRepeatedField(field, value); 500 } 501 502 @java.lang.Override mergeFrom(com.google.protobuf.Message other)503 public Builder mergeFrom(com.google.protobuf.Message other) { 504 if (other instanceof com.google.cloud.iot.v1.ListDeviceRegistriesResponse) { 505 return mergeFrom((com.google.cloud.iot.v1.ListDeviceRegistriesResponse) other); 506 } else { 507 super.mergeFrom(other); 508 return this; 509 } 510 } 511 mergeFrom(com.google.cloud.iot.v1.ListDeviceRegistriesResponse other)512 public Builder mergeFrom(com.google.cloud.iot.v1.ListDeviceRegistriesResponse other) { 513 if (other == com.google.cloud.iot.v1.ListDeviceRegistriesResponse.getDefaultInstance()) 514 return this; 515 if (deviceRegistriesBuilder_ == null) { 516 if (!other.deviceRegistries_.isEmpty()) { 517 if (deviceRegistries_.isEmpty()) { 518 deviceRegistries_ = other.deviceRegistries_; 519 bitField0_ = (bitField0_ & ~0x00000001); 520 } else { 521 ensureDeviceRegistriesIsMutable(); 522 deviceRegistries_.addAll(other.deviceRegistries_); 523 } 524 onChanged(); 525 } 526 } else { 527 if (!other.deviceRegistries_.isEmpty()) { 528 if (deviceRegistriesBuilder_.isEmpty()) { 529 deviceRegistriesBuilder_.dispose(); 530 deviceRegistriesBuilder_ = null; 531 deviceRegistries_ = other.deviceRegistries_; 532 bitField0_ = (bitField0_ & ~0x00000001); 533 deviceRegistriesBuilder_ = 534 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 535 ? getDeviceRegistriesFieldBuilder() 536 : null; 537 } else { 538 deviceRegistriesBuilder_.addAllMessages(other.deviceRegistries_); 539 } 540 } 541 } 542 if (!other.getNextPageToken().isEmpty()) { 543 nextPageToken_ = other.nextPageToken_; 544 bitField0_ |= 0x00000002; 545 onChanged(); 546 } 547 this.mergeUnknownFields(other.getUnknownFields()); 548 onChanged(); 549 return this; 550 } 551 552 @java.lang.Override isInitialized()553 public final boolean isInitialized() { 554 return true; 555 } 556 557 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)558 public Builder mergeFrom( 559 com.google.protobuf.CodedInputStream input, 560 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 561 throws java.io.IOException { 562 if (extensionRegistry == null) { 563 throw new java.lang.NullPointerException(); 564 } 565 try { 566 boolean done = false; 567 while (!done) { 568 int tag = input.readTag(); 569 switch (tag) { 570 case 0: 571 done = true; 572 break; 573 case 10: 574 { 575 com.google.cloud.iot.v1.DeviceRegistry m = 576 input.readMessage( 577 com.google.cloud.iot.v1.DeviceRegistry.parser(), extensionRegistry); 578 if (deviceRegistriesBuilder_ == null) { 579 ensureDeviceRegistriesIsMutable(); 580 deviceRegistries_.add(m); 581 } else { 582 deviceRegistriesBuilder_.addMessage(m); 583 } 584 break; 585 } // case 10 586 case 18: 587 { 588 nextPageToken_ = input.readStringRequireUtf8(); 589 bitField0_ |= 0x00000002; 590 break; 591 } // case 18 592 default: 593 { 594 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 595 done = true; // was an endgroup tag 596 } 597 break; 598 } // default: 599 } // switch (tag) 600 } // while (!done) 601 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 602 throw e.unwrapIOException(); 603 } finally { 604 onChanged(); 605 } // finally 606 return this; 607 } 608 609 private int bitField0_; 610 611 private java.util.List<com.google.cloud.iot.v1.DeviceRegistry> deviceRegistries_ = 612 java.util.Collections.emptyList(); 613 ensureDeviceRegistriesIsMutable()614 private void ensureDeviceRegistriesIsMutable() { 615 if (!((bitField0_ & 0x00000001) != 0)) { 616 deviceRegistries_ = 617 new java.util.ArrayList<com.google.cloud.iot.v1.DeviceRegistry>(deviceRegistries_); 618 bitField0_ |= 0x00000001; 619 } 620 } 621 622 private com.google.protobuf.RepeatedFieldBuilderV3< 623 com.google.cloud.iot.v1.DeviceRegistry, 624 com.google.cloud.iot.v1.DeviceRegistry.Builder, 625 com.google.cloud.iot.v1.DeviceRegistryOrBuilder> 626 deviceRegistriesBuilder_; 627 628 /** 629 * 630 * 631 * <pre> 632 * The registries that matched the query. 633 * </pre> 634 * 635 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 636 */ getDeviceRegistriesList()637 public java.util.List<com.google.cloud.iot.v1.DeviceRegistry> getDeviceRegistriesList() { 638 if (deviceRegistriesBuilder_ == null) { 639 return java.util.Collections.unmodifiableList(deviceRegistries_); 640 } else { 641 return deviceRegistriesBuilder_.getMessageList(); 642 } 643 } 644 /** 645 * 646 * 647 * <pre> 648 * The registries that matched the query. 649 * </pre> 650 * 651 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 652 */ getDeviceRegistriesCount()653 public int getDeviceRegistriesCount() { 654 if (deviceRegistriesBuilder_ == null) { 655 return deviceRegistries_.size(); 656 } else { 657 return deviceRegistriesBuilder_.getCount(); 658 } 659 } 660 /** 661 * 662 * 663 * <pre> 664 * The registries that matched the query. 665 * </pre> 666 * 667 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 668 */ getDeviceRegistries(int index)669 public com.google.cloud.iot.v1.DeviceRegistry getDeviceRegistries(int index) { 670 if (deviceRegistriesBuilder_ == null) { 671 return deviceRegistries_.get(index); 672 } else { 673 return deviceRegistriesBuilder_.getMessage(index); 674 } 675 } 676 /** 677 * 678 * 679 * <pre> 680 * The registries that matched the query. 681 * </pre> 682 * 683 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 684 */ setDeviceRegistries(int index, com.google.cloud.iot.v1.DeviceRegistry value)685 public Builder setDeviceRegistries(int index, com.google.cloud.iot.v1.DeviceRegistry value) { 686 if (deviceRegistriesBuilder_ == null) { 687 if (value == null) { 688 throw new NullPointerException(); 689 } 690 ensureDeviceRegistriesIsMutable(); 691 deviceRegistries_.set(index, value); 692 onChanged(); 693 } else { 694 deviceRegistriesBuilder_.setMessage(index, value); 695 } 696 return this; 697 } 698 /** 699 * 700 * 701 * <pre> 702 * The registries that matched the query. 703 * </pre> 704 * 705 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 706 */ setDeviceRegistries( int index, com.google.cloud.iot.v1.DeviceRegistry.Builder builderForValue)707 public Builder setDeviceRegistries( 708 int index, com.google.cloud.iot.v1.DeviceRegistry.Builder builderForValue) { 709 if (deviceRegistriesBuilder_ == null) { 710 ensureDeviceRegistriesIsMutable(); 711 deviceRegistries_.set(index, builderForValue.build()); 712 onChanged(); 713 } else { 714 deviceRegistriesBuilder_.setMessage(index, builderForValue.build()); 715 } 716 return this; 717 } 718 /** 719 * 720 * 721 * <pre> 722 * The registries that matched the query. 723 * </pre> 724 * 725 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 726 */ addDeviceRegistries(com.google.cloud.iot.v1.DeviceRegistry value)727 public Builder addDeviceRegistries(com.google.cloud.iot.v1.DeviceRegistry value) { 728 if (deviceRegistriesBuilder_ == null) { 729 if (value == null) { 730 throw new NullPointerException(); 731 } 732 ensureDeviceRegistriesIsMutable(); 733 deviceRegistries_.add(value); 734 onChanged(); 735 } else { 736 deviceRegistriesBuilder_.addMessage(value); 737 } 738 return this; 739 } 740 /** 741 * 742 * 743 * <pre> 744 * The registries that matched the query. 745 * </pre> 746 * 747 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 748 */ addDeviceRegistries(int index, com.google.cloud.iot.v1.DeviceRegistry value)749 public Builder addDeviceRegistries(int index, com.google.cloud.iot.v1.DeviceRegistry value) { 750 if (deviceRegistriesBuilder_ == null) { 751 if (value == null) { 752 throw new NullPointerException(); 753 } 754 ensureDeviceRegistriesIsMutable(); 755 deviceRegistries_.add(index, value); 756 onChanged(); 757 } else { 758 deviceRegistriesBuilder_.addMessage(index, value); 759 } 760 return this; 761 } 762 /** 763 * 764 * 765 * <pre> 766 * The registries that matched the query. 767 * </pre> 768 * 769 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 770 */ addDeviceRegistries( com.google.cloud.iot.v1.DeviceRegistry.Builder builderForValue)771 public Builder addDeviceRegistries( 772 com.google.cloud.iot.v1.DeviceRegistry.Builder builderForValue) { 773 if (deviceRegistriesBuilder_ == null) { 774 ensureDeviceRegistriesIsMutable(); 775 deviceRegistries_.add(builderForValue.build()); 776 onChanged(); 777 } else { 778 deviceRegistriesBuilder_.addMessage(builderForValue.build()); 779 } 780 return this; 781 } 782 /** 783 * 784 * 785 * <pre> 786 * The registries that matched the query. 787 * </pre> 788 * 789 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 790 */ addDeviceRegistries( int index, com.google.cloud.iot.v1.DeviceRegistry.Builder builderForValue)791 public Builder addDeviceRegistries( 792 int index, com.google.cloud.iot.v1.DeviceRegistry.Builder builderForValue) { 793 if (deviceRegistriesBuilder_ == null) { 794 ensureDeviceRegistriesIsMutable(); 795 deviceRegistries_.add(index, builderForValue.build()); 796 onChanged(); 797 } else { 798 deviceRegistriesBuilder_.addMessage(index, builderForValue.build()); 799 } 800 return this; 801 } 802 /** 803 * 804 * 805 * <pre> 806 * The registries that matched the query. 807 * </pre> 808 * 809 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 810 */ addAllDeviceRegistries( java.lang.Iterable<? extends com.google.cloud.iot.v1.DeviceRegistry> values)811 public Builder addAllDeviceRegistries( 812 java.lang.Iterable<? extends com.google.cloud.iot.v1.DeviceRegistry> values) { 813 if (deviceRegistriesBuilder_ == null) { 814 ensureDeviceRegistriesIsMutable(); 815 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deviceRegistries_); 816 onChanged(); 817 } else { 818 deviceRegistriesBuilder_.addAllMessages(values); 819 } 820 return this; 821 } 822 /** 823 * 824 * 825 * <pre> 826 * The registries that matched the query. 827 * </pre> 828 * 829 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 830 */ clearDeviceRegistries()831 public Builder clearDeviceRegistries() { 832 if (deviceRegistriesBuilder_ == null) { 833 deviceRegistries_ = java.util.Collections.emptyList(); 834 bitField0_ = (bitField0_ & ~0x00000001); 835 onChanged(); 836 } else { 837 deviceRegistriesBuilder_.clear(); 838 } 839 return this; 840 } 841 /** 842 * 843 * 844 * <pre> 845 * The registries that matched the query. 846 * </pre> 847 * 848 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 849 */ removeDeviceRegistries(int index)850 public Builder removeDeviceRegistries(int index) { 851 if (deviceRegistriesBuilder_ == null) { 852 ensureDeviceRegistriesIsMutable(); 853 deviceRegistries_.remove(index); 854 onChanged(); 855 } else { 856 deviceRegistriesBuilder_.remove(index); 857 } 858 return this; 859 } 860 /** 861 * 862 * 863 * <pre> 864 * The registries that matched the query. 865 * </pre> 866 * 867 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 868 */ getDeviceRegistriesBuilder(int index)869 public com.google.cloud.iot.v1.DeviceRegistry.Builder getDeviceRegistriesBuilder(int index) { 870 return getDeviceRegistriesFieldBuilder().getBuilder(index); 871 } 872 /** 873 * 874 * 875 * <pre> 876 * The registries that matched the query. 877 * </pre> 878 * 879 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 880 */ getDeviceRegistriesOrBuilder(int index)881 public com.google.cloud.iot.v1.DeviceRegistryOrBuilder getDeviceRegistriesOrBuilder(int index) { 882 if (deviceRegistriesBuilder_ == null) { 883 return deviceRegistries_.get(index); 884 } else { 885 return deviceRegistriesBuilder_.getMessageOrBuilder(index); 886 } 887 } 888 /** 889 * 890 * 891 * <pre> 892 * The registries that matched the query. 893 * </pre> 894 * 895 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 896 */ 897 public java.util.List<? extends com.google.cloud.iot.v1.DeviceRegistryOrBuilder> getDeviceRegistriesOrBuilderList()898 getDeviceRegistriesOrBuilderList() { 899 if (deviceRegistriesBuilder_ != null) { 900 return deviceRegistriesBuilder_.getMessageOrBuilderList(); 901 } else { 902 return java.util.Collections.unmodifiableList(deviceRegistries_); 903 } 904 } 905 /** 906 * 907 * 908 * <pre> 909 * The registries that matched the query. 910 * </pre> 911 * 912 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 913 */ addDeviceRegistriesBuilder()914 public com.google.cloud.iot.v1.DeviceRegistry.Builder addDeviceRegistriesBuilder() { 915 return getDeviceRegistriesFieldBuilder() 916 .addBuilder(com.google.cloud.iot.v1.DeviceRegistry.getDefaultInstance()); 917 } 918 /** 919 * 920 * 921 * <pre> 922 * The registries that matched the query. 923 * </pre> 924 * 925 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 926 */ addDeviceRegistriesBuilder(int index)927 public com.google.cloud.iot.v1.DeviceRegistry.Builder addDeviceRegistriesBuilder(int index) { 928 return getDeviceRegistriesFieldBuilder() 929 .addBuilder(index, com.google.cloud.iot.v1.DeviceRegistry.getDefaultInstance()); 930 } 931 /** 932 * 933 * 934 * <pre> 935 * The registries that matched the query. 936 * </pre> 937 * 938 * <code>repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1;</code> 939 */ 940 public java.util.List<com.google.cloud.iot.v1.DeviceRegistry.Builder> getDeviceRegistriesBuilderList()941 getDeviceRegistriesBuilderList() { 942 return getDeviceRegistriesFieldBuilder().getBuilderList(); 943 } 944 945 private com.google.protobuf.RepeatedFieldBuilderV3< 946 com.google.cloud.iot.v1.DeviceRegistry, 947 com.google.cloud.iot.v1.DeviceRegistry.Builder, 948 com.google.cloud.iot.v1.DeviceRegistryOrBuilder> getDeviceRegistriesFieldBuilder()949 getDeviceRegistriesFieldBuilder() { 950 if (deviceRegistriesBuilder_ == null) { 951 deviceRegistriesBuilder_ = 952 new com.google.protobuf.RepeatedFieldBuilderV3< 953 com.google.cloud.iot.v1.DeviceRegistry, 954 com.google.cloud.iot.v1.DeviceRegistry.Builder, 955 com.google.cloud.iot.v1.DeviceRegistryOrBuilder>( 956 deviceRegistries_, 957 ((bitField0_ & 0x00000001) != 0), 958 getParentForChildren(), 959 isClean()); 960 deviceRegistries_ = null; 961 } 962 return deviceRegistriesBuilder_; 963 } 964 965 private java.lang.Object nextPageToken_ = ""; 966 /** 967 * 968 * 969 * <pre> 970 * If not empty, indicates that there may be more registries that match the 971 * request; this value should be passed in a new 972 * `ListDeviceRegistriesRequest`. 973 * </pre> 974 * 975 * <code>string next_page_token = 2;</code> 976 * 977 * @return The nextPageToken. 978 */ getNextPageToken()979 public java.lang.String getNextPageToken() { 980 java.lang.Object ref = nextPageToken_; 981 if (!(ref instanceof java.lang.String)) { 982 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 983 java.lang.String s = bs.toStringUtf8(); 984 nextPageToken_ = s; 985 return s; 986 } else { 987 return (java.lang.String) ref; 988 } 989 } 990 /** 991 * 992 * 993 * <pre> 994 * If not empty, indicates that there may be more registries that match the 995 * request; this value should be passed in a new 996 * `ListDeviceRegistriesRequest`. 997 * </pre> 998 * 999 * <code>string next_page_token = 2;</code> 1000 * 1001 * @return The bytes for nextPageToken. 1002 */ getNextPageTokenBytes()1003 public com.google.protobuf.ByteString getNextPageTokenBytes() { 1004 java.lang.Object ref = nextPageToken_; 1005 if (ref instanceof String) { 1006 com.google.protobuf.ByteString b = 1007 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1008 nextPageToken_ = b; 1009 return b; 1010 } else { 1011 return (com.google.protobuf.ByteString) ref; 1012 } 1013 } 1014 /** 1015 * 1016 * 1017 * <pre> 1018 * If not empty, indicates that there may be more registries that match the 1019 * request; this value should be passed in a new 1020 * `ListDeviceRegistriesRequest`. 1021 * </pre> 1022 * 1023 * <code>string next_page_token = 2;</code> 1024 * 1025 * @param value The nextPageToken to set. 1026 * @return This builder for chaining. 1027 */ setNextPageToken(java.lang.String value)1028 public Builder setNextPageToken(java.lang.String value) { 1029 if (value == null) { 1030 throw new NullPointerException(); 1031 } 1032 nextPageToken_ = value; 1033 bitField0_ |= 0x00000002; 1034 onChanged(); 1035 return this; 1036 } 1037 /** 1038 * 1039 * 1040 * <pre> 1041 * If not empty, indicates that there may be more registries that match the 1042 * request; this value should be passed in a new 1043 * `ListDeviceRegistriesRequest`. 1044 * </pre> 1045 * 1046 * <code>string next_page_token = 2;</code> 1047 * 1048 * @return This builder for chaining. 1049 */ clearNextPageToken()1050 public Builder clearNextPageToken() { 1051 nextPageToken_ = getDefaultInstance().getNextPageToken(); 1052 bitField0_ = (bitField0_ & ~0x00000002); 1053 onChanged(); 1054 return this; 1055 } 1056 /** 1057 * 1058 * 1059 * <pre> 1060 * If not empty, indicates that there may be more registries that match the 1061 * request; this value should be passed in a new 1062 * `ListDeviceRegistriesRequest`. 1063 * </pre> 1064 * 1065 * <code>string next_page_token = 2;</code> 1066 * 1067 * @param value The bytes for nextPageToken to set. 1068 * @return This builder for chaining. 1069 */ setNextPageTokenBytes(com.google.protobuf.ByteString value)1070 public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { 1071 if (value == null) { 1072 throw new NullPointerException(); 1073 } 1074 checkByteStringIsUtf8(value); 1075 nextPageToken_ = value; 1076 bitField0_ |= 0x00000002; 1077 onChanged(); 1078 return this; 1079 } 1080 1081 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1082 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1083 return super.setUnknownFields(unknownFields); 1084 } 1085 1086 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1087 public final Builder mergeUnknownFields( 1088 final com.google.protobuf.UnknownFieldSet unknownFields) { 1089 return super.mergeUnknownFields(unknownFields); 1090 } 1091 1092 // @@protoc_insertion_point(builder_scope:google.cloud.iot.v1.ListDeviceRegistriesResponse) 1093 } 1094 1095 // @@protoc_insertion_point(class_scope:google.cloud.iot.v1.ListDeviceRegistriesResponse) 1096 private static final com.google.cloud.iot.v1.ListDeviceRegistriesResponse DEFAULT_INSTANCE; 1097 1098 static { 1099 DEFAULT_INSTANCE = new com.google.cloud.iot.v1.ListDeviceRegistriesResponse(); 1100 } 1101 getDefaultInstance()1102 public static com.google.cloud.iot.v1.ListDeviceRegistriesResponse getDefaultInstance() { 1103 return DEFAULT_INSTANCE; 1104 } 1105 1106 private static final com.google.protobuf.Parser<ListDeviceRegistriesResponse> PARSER = 1107 new com.google.protobuf.AbstractParser<ListDeviceRegistriesResponse>() { 1108 @java.lang.Override 1109 public ListDeviceRegistriesResponse parsePartialFrom( 1110 com.google.protobuf.CodedInputStream input, 1111 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1112 throws com.google.protobuf.InvalidProtocolBufferException { 1113 Builder builder = newBuilder(); 1114 try { 1115 builder.mergeFrom(input, extensionRegistry); 1116 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1117 throw e.setUnfinishedMessage(builder.buildPartial()); 1118 } catch (com.google.protobuf.UninitializedMessageException e) { 1119 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1120 } catch (java.io.IOException e) { 1121 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1122 .setUnfinishedMessage(builder.buildPartial()); 1123 } 1124 return builder.buildPartial(); 1125 } 1126 }; 1127 parser()1128 public static com.google.protobuf.Parser<ListDeviceRegistriesResponse> parser() { 1129 return PARSER; 1130 } 1131 1132 @java.lang.Override getParserForType()1133 public com.google.protobuf.Parser<ListDeviceRegistriesResponse> getParserForType() { 1134 return PARSER; 1135 } 1136 1137 @java.lang.Override getDefaultInstanceForType()1138 public com.google.cloud.iot.v1.ListDeviceRegistriesResponse getDefaultInstanceForType() { 1139 return DEFAULT_INSTANCE; 1140 } 1141 } 1142