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 * Request for `ListDeviceRegistries`. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.iot.v1.ListDeviceRegistriesRequest} 29 */ 30 public final class ListDeviceRegistriesRequest extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.iot.v1.ListDeviceRegistriesRequest) 33 ListDeviceRegistriesRequestOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use ListDeviceRegistriesRequest.newBuilder() to construct. ListDeviceRegistriesRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private ListDeviceRegistriesRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 ListDeviceRegistriesRequest()40 private ListDeviceRegistriesRequest() { 41 parent_ = ""; 42 pageToken_ = ""; 43 } 44 45 @java.lang.Override 46 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)47 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 48 return new ListDeviceRegistriesRequest(); 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_ListDeviceRegistriesRequest_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_ListDeviceRegistriesRequest_fieldAccessorTable 66 .ensureFieldAccessorsInitialized( 67 com.google.cloud.iot.v1.ListDeviceRegistriesRequest.class, 68 com.google.cloud.iot.v1.ListDeviceRegistriesRequest.Builder.class); 69 } 70 71 public static final int PARENT_FIELD_NUMBER = 1; 72 73 @SuppressWarnings("serial") 74 private volatile java.lang.Object parent_ = ""; 75 /** 76 * 77 * 78 * <pre> 79 * Required. The project and cloud region path. For example, 80 * `projects/example-project/locations/us-central1`. 81 * </pre> 82 * 83 * <code> 84 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 85 * </code> 86 * 87 * @return The parent. 88 */ 89 @java.lang.Override getParent()90 public java.lang.String getParent() { 91 java.lang.Object ref = parent_; 92 if (ref instanceof java.lang.String) { 93 return (java.lang.String) ref; 94 } else { 95 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 96 java.lang.String s = bs.toStringUtf8(); 97 parent_ = s; 98 return s; 99 } 100 } 101 /** 102 * 103 * 104 * <pre> 105 * Required. The project and cloud region path. For example, 106 * `projects/example-project/locations/us-central1`. 107 * </pre> 108 * 109 * <code> 110 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 111 * </code> 112 * 113 * @return The bytes for parent. 114 */ 115 @java.lang.Override getParentBytes()116 public com.google.protobuf.ByteString getParentBytes() { 117 java.lang.Object ref = parent_; 118 if (ref instanceof java.lang.String) { 119 com.google.protobuf.ByteString b = 120 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 121 parent_ = b; 122 return b; 123 } else { 124 return (com.google.protobuf.ByteString) ref; 125 } 126 } 127 128 public static final int PAGE_SIZE_FIELD_NUMBER = 2; 129 private int pageSize_ = 0; 130 /** 131 * 132 * 133 * <pre> 134 * The maximum number of registries to return in the response. If this value 135 * is zero, the service will select a default size. A call may return fewer 136 * objects than requested. A non-empty `next_page_token` in the response 137 * indicates that more data is available. 138 * </pre> 139 * 140 * <code>int32 page_size = 2;</code> 141 * 142 * @return The pageSize. 143 */ 144 @java.lang.Override getPageSize()145 public int getPageSize() { 146 return pageSize_; 147 } 148 149 public static final int PAGE_TOKEN_FIELD_NUMBER = 3; 150 151 @SuppressWarnings("serial") 152 private volatile java.lang.Object pageToken_ = ""; 153 /** 154 * 155 * 156 * <pre> 157 * The value returned by the last `ListDeviceRegistriesResponse`; indicates 158 * that this is a continuation of a prior `ListDeviceRegistries` call and 159 * the system should return the next page of data. 160 * </pre> 161 * 162 * <code>string page_token = 3;</code> 163 * 164 * @return The pageToken. 165 */ 166 @java.lang.Override getPageToken()167 public java.lang.String getPageToken() { 168 java.lang.Object ref = pageToken_; 169 if (ref instanceof java.lang.String) { 170 return (java.lang.String) ref; 171 } else { 172 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 173 java.lang.String s = bs.toStringUtf8(); 174 pageToken_ = s; 175 return s; 176 } 177 } 178 /** 179 * 180 * 181 * <pre> 182 * The value returned by the last `ListDeviceRegistriesResponse`; indicates 183 * that this is a continuation of a prior `ListDeviceRegistries` call and 184 * the system should return the next page of data. 185 * </pre> 186 * 187 * <code>string page_token = 3;</code> 188 * 189 * @return The bytes for pageToken. 190 */ 191 @java.lang.Override getPageTokenBytes()192 public com.google.protobuf.ByteString getPageTokenBytes() { 193 java.lang.Object ref = pageToken_; 194 if (ref instanceof java.lang.String) { 195 com.google.protobuf.ByteString b = 196 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 197 pageToken_ = b; 198 return b; 199 } else { 200 return (com.google.protobuf.ByteString) ref; 201 } 202 } 203 204 private byte memoizedIsInitialized = -1; 205 206 @java.lang.Override isInitialized()207 public final boolean isInitialized() { 208 byte isInitialized = memoizedIsInitialized; 209 if (isInitialized == 1) return true; 210 if (isInitialized == 0) return false; 211 212 memoizedIsInitialized = 1; 213 return true; 214 } 215 216 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)217 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 218 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { 219 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); 220 } 221 if (pageSize_ != 0) { 222 output.writeInt32(2, pageSize_); 223 } 224 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { 225 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); 226 } 227 getUnknownFields().writeTo(output); 228 } 229 230 @java.lang.Override getSerializedSize()231 public int getSerializedSize() { 232 int size = memoizedSize; 233 if (size != -1) return size; 234 235 size = 0; 236 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { 237 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); 238 } 239 if (pageSize_ != 0) { 240 size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); 241 } 242 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { 243 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); 244 } 245 size += getUnknownFields().getSerializedSize(); 246 memoizedSize = size; 247 return size; 248 } 249 250 @java.lang.Override equals(final java.lang.Object obj)251 public boolean equals(final java.lang.Object obj) { 252 if (obj == this) { 253 return true; 254 } 255 if (!(obj instanceof com.google.cloud.iot.v1.ListDeviceRegistriesRequest)) { 256 return super.equals(obj); 257 } 258 com.google.cloud.iot.v1.ListDeviceRegistriesRequest other = 259 (com.google.cloud.iot.v1.ListDeviceRegistriesRequest) obj; 260 261 if (!getParent().equals(other.getParent())) return false; 262 if (getPageSize() != other.getPageSize()) return false; 263 if (!getPageToken().equals(other.getPageToken())) return false; 264 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 265 return true; 266 } 267 268 @java.lang.Override hashCode()269 public int hashCode() { 270 if (memoizedHashCode != 0) { 271 return memoizedHashCode; 272 } 273 int hash = 41; 274 hash = (19 * hash) + getDescriptor().hashCode(); 275 hash = (37 * hash) + PARENT_FIELD_NUMBER; 276 hash = (53 * hash) + getParent().hashCode(); 277 hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; 278 hash = (53 * hash) + getPageSize(); 279 hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; 280 hash = (53 * hash) + getPageToken().hashCode(); 281 hash = (29 * hash) + getUnknownFields().hashCode(); 282 memoizedHashCode = hash; 283 return hash; 284 } 285 parseFrom( java.nio.ByteBuffer data)286 public static com.google.cloud.iot.v1.ListDeviceRegistriesRequest parseFrom( 287 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 288 return PARSER.parseFrom(data); 289 } 290 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)291 public static com.google.cloud.iot.v1.ListDeviceRegistriesRequest parseFrom( 292 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 293 throws com.google.protobuf.InvalidProtocolBufferException { 294 return PARSER.parseFrom(data, extensionRegistry); 295 } 296 parseFrom( com.google.protobuf.ByteString data)297 public static com.google.cloud.iot.v1.ListDeviceRegistriesRequest parseFrom( 298 com.google.protobuf.ByteString data) 299 throws com.google.protobuf.InvalidProtocolBufferException { 300 return PARSER.parseFrom(data); 301 } 302 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)303 public static com.google.cloud.iot.v1.ListDeviceRegistriesRequest parseFrom( 304 com.google.protobuf.ByteString data, 305 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 306 throws com.google.protobuf.InvalidProtocolBufferException { 307 return PARSER.parseFrom(data, extensionRegistry); 308 } 309 parseFrom(byte[] data)310 public static com.google.cloud.iot.v1.ListDeviceRegistriesRequest parseFrom(byte[] data) 311 throws com.google.protobuf.InvalidProtocolBufferException { 312 return PARSER.parseFrom(data); 313 } 314 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)315 public static com.google.cloud.iot.v1.ListDeviceRegistriesRequest parseFrom( 316 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 317 throws com.google.protobuf.InvalidProtocolBufferException { 318 return PARSER.parseFrom(data, extensionRegistry); 319 } 320 parseFrom( java.io.InputStream input)321 public static com.google.cloud.iot.v1.ListDeviceRegistriesRequest parseFrom( 322 java.io.InputStream input) throws java.io.IOException { 323 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 324 } 325 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)326 public static com.google.cloud.iot.v1.ListDeviceRegistriesRequest parseFrom( 327 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 328 throws java.io.IOException { 329 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 330 PARSER, input, extensionRegistry); 331 } 332 parseDelimitedFrom( java.io.InputStream input)333 public static com.google.cloud.iot.v1.ListDeviceRegistriesRequest parseDelimitedFrom( 334 java.io.InputStream input) throws java.io.IOException { 335 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 336 } 337 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)338 public static com.google.cloud.iot.v1.ListDeviceRegistriesRequest parseDelimitedFrom( 339 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 340 throws java.io.IOException { 341 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 342 PARSER, input, extensionRegistry); 343 } 344 parseFrom( com.google.protobuf.CodedInputStream input)345 public static com.google.cloud.iot.v1.ListDeviceRegistriesRequest parseFrom( 346 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 347 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 348 } 349 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)350 public static com.google.cloud.iot.v1.ListDeviceRegistriesRequest parseFrom( 351 com.google.protobuf.CodedInputStream input, 352 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 353 throws java.io.IOException { 354 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 355 PARSER, input, extensionRegistry); 356 } 357 358 @java.lang.Override newBuilderForType()359 public Builder newBuilderForType() { 360 return newBuilder(); 361 } 362 newBuilder()363 public static Builder newBuilder() { 364 return DEFAULT_INSTANCE.toBuilder(); 365 } 366 newBuilder(com.google.cloud.iot.v1.ListDeviceRegistriesRequest prototype)367 public static Builder newBuilder(com.google.cloud.iot.v1.ListDeviceRegistriesRequest prototype) { 368 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 369 } 370 371 @java.lang.Override toBuilder()372 public Builder toBuilder() { 373 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 374 } 375 376 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)377 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 378 Builder builder = new Builder(parent); 379 return builder; 380 } 381 /** 382 * 383 * 384 * <pre> 385 * Request for `ListDeviceRegistries`. 386 * </pre> 387 * 388 * Protobuf type {@code google.cloud.iot.v1.ListDeviceRegistriesRequest} 389 */ 390 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 391 implements 392 // @@protoc_insertion_point(builder_implements:google.cloud.iot.v1.ListDeviceRegistriesRequest) 393 com.google.cloud.iot.v1.ListDeviceRegistriesRequestOrBuilder { getDescriptor()394 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 395 return com.google.cloud.iot.v1.DeviceManagerProto 396 .internal_static_google_cloud_iot_v1_ListDeviceRegistriesRequest_descriptor; 397 } 398 399 @java.lang.Override 400 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()401 internalGetFieldAccessorTable() { 402 return com.google.cloud.iot.v1.DeviceManagerProto 403 .internal_static_google_cloud_iot_v1_ListDeviceRegistriesRequest_fieldAccessorTable 404 .ensureFieldAccessorsInitialized( 405 com.google.cloud.iot.v1.ListDeviceRegistriesRequest.class, 406 com.google.cloud.iot.v1.ListDeviceRegistriesRequest.Builder.class); 407 } 408 409 // Construct using com.google.cloud.iot.v1.ListDeviceRegistriesRequest.newBuilder() Builder()410 private Builder() {} 411 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)412 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 413 super(parent); 414 } 415 416 @java.lang.Override clear()417 public Builder clear() { 418 super.clear(); 419 bitField0_ = 0; 420 parent_ = ""; 421 pageSize_ = 0; 422 pageToken_ = ""; 423 return this; 424 } 425 426 @java.lang.Override getDescriptorForType()427 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 428 return com.google.cloud.iot.v1.DeviceManagerProto 429 .internal_static_google_cloud_iot_v1_ListDeviceRegistriesRequest_descriptor; 430 } 431 432 @java.lang.Override getDefaultInstanceForType()433 public com.google.cloud.iot.v1.ListDeviceRegistriesRequest getDefaultInstanceForType() { 434 return com.google.cloud.iot.v1.ListDeviceRegistriesRequest.getDefaultInstance(); 435 } 436 437 @java.lang.Override build()438 public com.google.cloud.iot.v1.ListDeviceRegistriesRequest build() { 439 com.google.cloud.iot.v1.ListDeviceRegistriesRequest result = buildPartial(); 440 if (!result.isInitialized()) { 441 throw newUninitializedMessageException(result); 442 } 443 return result; 444 } 445 446 @java.lang.Override buildPartial()447 public com.google.cloud.iot.v1.ListDeviceRegistriesRequest buildPartial() { 448 com.google.cloud.iot.v1.ListDeviceRegistriesRequest result = 449 new com.google.cloud.iot.v1.ListDeviceRegistriesRequest(this); 450 if (bitField0_ != 0) { 451 buildPartial0(result); 452 } 453 onBuilt(); 454 return result; 455 } 456 buildPartial0(com.google.cloud.iot.v1.ListDeviceRegistriesRequest result)457 private void buildPartial0(com.google.cloud.iot.v1.ListDeviceRegistriesRequest result) { 458 int from_bitField0_ = bitField0_; 459 if (((from_bitField0_ & 0x00000001) != 0)) { 460 result.parent_ = parent_; 461 } 462 if (((from_bitField0_ & 0x00000002) != 0)) { 463 result.pageSize_ = pageSize_; 464 } 465 if (((from_bitField0_ & 0x00000004) != 0)) { 466 result.pageToken_ = pageToken_; 467 } 468 } 469 470 @java.lang.Override clone()471 public Builder clone() { 472 return super.clone(); 473 } 474 475 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)476 public Builder setField( 477 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 478 return super.setField(field, value); 479 } 480 481 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)482 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 483 return super.clearField(field); 484 } 485 486 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)487 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 488 return super.clearOneof(oneof); 489 } 490 491 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)492 public Builder setRepeatedField( 493 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 494 return super.setRepeatedField(field, index, value); 495 } 496 497 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)498 public Builder addRepeatedField( 499 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 500 return super.addRepeatedField(field, value); 501 } 502 503 @java.lang.Override mergeFrom(com.google.protobuf.Message other)504 public Builder mergeFrom(com.google.protobuf.Message other) { 505 if (other instanceof com.google.cloud.iot.v1.ListDeviceRegistriesRequest) { 506 return mergeFrom((com.google.cloud.iot.v1.ListDeviceRegistriesRequest) other); 507 } else { 508 super.mergeFrom(other); 509 return this; 510 } 511 } 512 mergeFrom(com.google.cloud.iot.v1.ListDeviceRegistriesRequest other)513 public Builder mergeFrom(com.google.cloud.iot.v1.ListDeviceRegistriesRequest other) { 514 if (other == com.google.cloud.iot.v1.ListDeviceRegistriesRequest.getDefaultInstance()) 515 return this; 516 if (!other.getParent().isEmpty()) { 517 parent_ = other.parent_; 518 bitField0_ |= 0x00000001; 519 onChanged(); 520 } 521 if (other.getPageSize() != 0) { 522 setPageSize(other.getPageSize()); 523 } 524 if (!other.getPageToken().isEmpty()) { 525 pageToken_ = other.pageToken_; 526 bitField0_ |= 0x00000004; 527 onChanged(); 528 } 529 this.mergeUnknownFields(other.getUnknownFields()); 530 onChanged(); 531 return this; 532 } 533 534 @java.lang.Override isInitialized()535 public final boolean isInitialized() { 536 return true; 537 } 538 539 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)540 public Builder mergeFrom( 541 com.google.protobuf.CodedInputStream input, 542 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 543 throws java.io.IOException { 544 if (extensionRegistry == null) { 545 throw new java.lang.NullPointerException(); 546 } 547 try { 548 boolean done = false; 549 while (!done) { 550 int tag = input.readTag(); 551 switch (tag) { 552 case 0: 553 done = true; 554 break; 555 case 10: 556 { 557 parent_ = input.readStringRequireUtf8(); 558 bitField0_ |= 0x00000001; 559 break; 560 } // case 10 561 case 16: 562 { 563 pageSize_ = input.readInt32(); 564 bitField0_ |= 0x00000002; 565 break; 566 } // case 16 567 case 26: 568 { 569 pageToken_ = input.readStringRequireUtf8(); 570 bitField0_ |= 0x00000004; 571 break; 572 } // case 26 573 default: 574 { 575 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 576 done = true; // was an endgroup tag 577 } 578 break; 579 } // default: 580 } // switch (tag) 581 } // while (!done) 582 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 583 throw e.unwrapIOException(); 584 } finally { 585 onChanged(); 586 } // finally 587 return this; 588 } 589 590 private int bitField0_; 591 592 private java.lang.Object parent_ = ""; 593 /** 594 * 595 * 596 * <pre> 597 * Required. The project and cloud region path. For example, 598 * `projects/example-project/locations/us-central1`. 599 * </pre> 600 * 601 * <code> 602 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 603 * </code> 604 * 605 * @return The parent. 606 */ getParent()607 public java.lang.String getParent() { 608 java.lang.Object ref = parent_; 609 if (!(ref instanceof java.lang.String)) { 610 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 611 java.lang.String s = bs.toStringUtf8(); 612 parent_ = s; 613 return s; 614 } else { 615 return (java.lang.String) ref; 616 } 617 } 618 /** 619 * 620 * 621 * <pre> 622 * Required. The project and cloud region path. For example, 623 * `projects/example-project/locations/us-central1`. 624 * </pre> 625 * 626 * <code> 627 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 628 * </code> 629 * 630 * @return The bytes for parent. 631 */ getParentBytes()632 public com.google.protobuf.ByteString getParentBytes() { 633 java.lang.Object ref = parent_; 634 if (ref instanceof String) { 635 com.google.protobuf.ByteString b = 636 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 637 parent_ = b; 638 return b; 639 } else { 640 return (com.google.protobuf.ByteString) ref; 641 } 642 } 643 /** 644 * 645 * 646 * <pre> 647 * Required. The project and cloud region path. For example, 648 * `projects/example-project/locations/us-central1`. 649 * </pre> 650 * 651 * <code> 652 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 653 * </code> 654 * 655 * @param value The parent to set. 656 * @return This builder for chaining. 657 */ setParent(java.lang.String value)658 public Builder setParent(java.lang.String value) { 659 if (value == null) { 660 throw new NullPointerException(); 661 } 662 parent_ = value; 663 bitField0_ |= 0x00000001; 664 onChanged(); 665 return this; 666 } 667 /** 668 * 669 * 670 * <pre> 671 * Required. The project and cloud region path. For example, 672 * `projects/example-project/locations/us-central1`. 673 * </pre> 674 * 675 * <code> 676 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 677 * </code> 678 * 679 * @return This builder for chaining. 680 */ clearParent()681 public Builder clearParent() { 682 parent_ = getDefaultInstance().getParent(); 683 bitField0_ = (bitField0_ & ~0x00000001); 684 onChanged(); 685 return this; 686 } 687 /** 688 * 689 * 690 * <pre> 691 * Required. The project and cloud region path. For example, 692 * `projects/example-project/locations/us-central1`. 693 * </pre> 694 * 695 * <code> 696 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 697 * </code> 698 * 699 * @param value The bytes for parent to set. 700 * @return This builder for chaining. 701 */ setParentBytes(com.google.protobuf.ByteString value)702 public Builder setParentBytes(com.google.protobuf.ByteString value) { 703 if (value == null) { 704 throw new NullPointerException(); 705 } 706 checkByteStringIsUtf8(value); 707 parent_ = value; 708 bitField0_ |= 0x00000001; 709 onChanged(); 710 return this; 711 } 712 713 private int pageSize_; 714 /** 715 * 716 * 717 * <pre> 718 * The maximum number of registries to return in the response. If this value 719 * is zero, the service will select a default size. A call may return fewer 720 * objects than requested. A non-empty `next_page_token` in the response 721 * indicates that more data is available. 722 * </pre> 723 * 724 * <code>int32 page_size = 2;</code> 725 * 726 * @return The pageSize. 727 */ 728 @java.lang.Override getPageSize()729 public int getPageSize() { 730 return pageSize_; 731 } 732 /** 733 * 734 * 735 * <pre> 736 * The maximum number of registries to return in the response. If this value 737 * is zero, the service will select a default size. A call may return fewer 738 * objects than requested. A non-empty `next_page_token` in the response 739 * indicates that more data is available. 740 * </pre> 741 * 742 * <code>int32 page_size = 2;</code> 743 * 744 * @param value The pageSize to set. 745 * @return This builder for chaining. 746 */ setPageSize(int value)747 public Builder setPageSize(int value) { 748 749 pageSize_ = value; 750 bitField0_ |= 0x00000002; 751 onChanged(); 752 return this; 753 } 754 /** 755 * 756 * 757 * <pre> 758 * The maximum number of registries to return in the response. If this value 759 * is zero, the service will select a default size. A call may return fewer 760 * objects than requested. A non-empty `next_page_token` in the response 761 * indicates that more data is available. 762 * </pre> 763 * 764 * <code>int32 page_size = 2;</code> 765 * 766 * @return This builder for chaining. 767 */ clearPageSize()768 public Builder clearPageSize() { 769 bitField0_ = (bitField0_ & ~0x00000002); 770 pageSize_ = 0; 771 onChanged(); 772 return this; 773 } 774 775 private java.lang.Object pageToken_ = ""; 776 /** 777 * 778 * 779 * <pre> 780 * The value returned by the last `ListDeviceRegistriesResponse`; indicates 781 * that this is a continuation of a prior `ListDeviceRegistries` call and 782 * the system should return the next page of data. 783 * </pre> 784 * 785 * <code>string page_token = 3;</code> 786 * 787 * @return The pageToken. 788 */ getPageToken()789 public java.lang.String getPageToken() { 790 java.lang.Object ref = pageToken_; 791 if (!(ref instanceof java.lang.String)) { 792 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 793 java.lang.String s = bs.toStringUtf8(); 794 pageToken_ = s; 795 return s; 796 } else { 797 return (java.lang.String) ref; 798 } 799 } 800 /** 801 * 802 * 803 * <pre> 804 * The value returned by the last `ListDeviceRegistriesResponse`; indicates 805 * that this is a continuation of a prior `ListDeviceRegistries` call and 806 * the system should return the next page of data. 807 * </pre> 808 * 809 * <code>string page_token = 3;</code> 810 * 811 * @return The bytes for pageToken. 812 */ getPageTokenBytes()813 public com.google.protobuf.ByteString getPageTokenBytes() { 814 java.lang.Object ref = pageToken_; 815 if (ref instanceof String) { 816 com.google.protobuf.ByteString b = 817 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 818 pageToken_ = b; 819 return b; 820 } else { 821 return (com.google.protobuf.ByteString) ref; 822 } 823 } 824 /** 825 * 826 * 827 * <pre> 828 * The value returned by the last `ListDeviceRegistriesResponse`; indicates 829 * that this is a continuation of a prior `ListDeviceRegistries` call and 830 * the system should return the next page of data. 831 * </pre> 832 * 833 * <code>string page_token = 3;</code> 834 * 835 * @param value The pageToken to set. 836 * @return This builder for chaining. 837 */ setPageToken(java.lang.String value)838 public Builder setPageToken(java.lang.String value) { 839 if (value == null) { 840 throw new NullPointerException(); 841 } 842 pageToken_ = value; 843 bitField0_ |= 0x00000004; 844 onChanged(); 845 return this; 846 } 847 /** 848 * 849 * 850 * <pre> 851 * The value returned by the last `ListDeviceRegistriesResponse`; indicates 852 * that this is a continuation of a prior `ListDeviceRegistries` call and 853 * the system should return the next page of data. 854 * </pre> 855 * 856 * <code>string page_token = 3;</code> 857 * 858 * @return This builder for chaining. 859 */ clearPageToken()860 public Builder clearPageToken() { 861 pageToken_ = getDefaultInstance().getPageToken(); 862 bitField0_ = (bitField0_ & ~0x00000004); 863 onChanged(); 864 return this; 865 } 866 /** 867 * 868 * 869 * <pre> 870 * The value returned by the last `ListDeviceRegistriesResponse`; indicates 871 * that this is a continuation of a prior `ListDeviceRegistries` call and 872 * the system should return the next page of data. 873 * </pre> 874 * 875 * <code>string page_token = 3;</code> 876 * 877 * @param value The bytes for pageToken to set. 878 * @return This builder for chaining. 879 */ setPageTokenBytes(com.google.protobuf.ByteString value)880 public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 881 if (value == null) { 882 throw new NullPointerException(); 883 } 884 checkByteStringIsUtf8(value); 885 pageToken_ = value; 886 bitField0_ |= 0x00000004; 887 onChanged(); 888 return this; 889 } 890 891 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)892 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 893 return super.setUnknownFields(unknownFields); 894 } 895 896 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)897 public final Builder mergeUnknownFields( 898 final com.google.protobuf.UnknownFieldSet unknownFields) { 899 return super.mergeUnknownFields(unknownFields); 900 } 901 902 // @@protoc_insertion_point(builder_scope:google.cloud.iot.v1.ListDeviceRegistriesRequest) 903 } 904 905 // @@protoc_insertion_point(class_scope:google.cloud.iot.v1.ListDeviceRegistriesRequest) 906 private static final com.google.cloud.iot.v1.ListDeviceRegistriesRequest DEFAULT_INSTANCE; 907 908 static { 909 DEFAULT_INSTANCE = new com.google.cloud.iot.v1.ListDeviceRegistriesRequest(); 910 } 911 getDefaultInstance()912 public static com.google.cloud.iot.v1.ListDeviceRegistriesRequest getDefaultInstance() { 913 return DEFAULT_INSTANCE; 914 } 915 916 private static final com.google.protobuf.Parser<ListDeviceRegistriesRequest> PARSER = 917 new com.google.protobuf.AbstractParser<ListDeviceRegistriesRequest>() { 918 @java.lang.Override 919 public ListDeviceRegistriesRequest parsePartialFrom( 920 com.google.protobuf.CodedInputStream input, 921 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 922 throws com.google.protobuf.InvalidProtocolBufferException { 923 Builder builder = newBuilder(); 924 try { 925 builder.mergeFrom(input, extensionRegistry); 926 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 927 throw e.setUnfinishedMessage(builder.buildPartial()); 928 } catch (com.google.protobuf.UninitializedMessageException e) { 929 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 930 } catch (java.io.IOException e) { 931 throw new com.google.protobuf.InvalidProtocolBufferException(e) 932 .setUnfinishedMessage(builder.buildPartial()); 933 } 934 return builder.buildPartial(); 935 } 936 }; 937 parser()938 public static com.google.protobuf.Parser<ListDeviceRegistriesRequest> parser() { 939 return PARSER; 940 } 941 942 @java.lang.Override getParserForType()943 public com.google.protobuf.Parser<ListDeviceRegistriesRequest> getParserForType() { 944 return PARSER; 945 } 946 947 @java.lang.Override getDefaultInstanceForType()948 public com.google.cloud.iot.v1.ListDeviceRegistriesRequest getDefaultInstanceForType() { 949 return DEFAULT_INSTANCE; 950 } 951 } 952