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/resources.proto 18 19 package com.google.cloud.iot.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * The device resource. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.iot.v1.Device} 29 */ 30 public final class Device extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.iot.v1.Device) 33 DeviceOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use Device.newBuilder() to construct. Device(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private Device(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 Device()40 private Device() { 41 id_ = ""; 42 name_ = ""; 43 credentials_ = java.util.Collections.emptyList(); 44 logLevel_ = 0; 45 } 46 47 @java.lang.Override 48 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)49 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 50 return new Device(); 51 } 52 53 @java.lang.Override getUnknownFields()54 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 55 return this.unknownFields; 56 } 57 getDescriptor()58 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 59 return com.google.cloud.iot.v1.ResourcesProto 60 .internal_static_google_cloud_iot_v1_Device_descriptor; 61 } 62 63 @SuppressWarnings({"rawtypes"}) 64 @java.lang.Override internalGetMapField(int number)65 protected com.google.protobuf.MapField internalGetMapField(int number) { 66 switch (number) { 67 case 17: 68 return internalGetMetadata(); 69 default: 70 throw new RuntimeException("Invalid map field number: " + number); 71 } 72 } 73 74 @java.lang.Override 75 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()76 internalGetFieldAccessorTable() { 77 return com.google.cloud.iot.v1.ResourcesProto 78 .internal_static_google_cloud_iot_v1_Device_fieldAccessorTable 79 .ensureFieldAccessorsInitialized( 80 com.google.cloud.iot.v1.Device.class, com.google.cloud.iot.v1.Device.Builder.class); 81 } 82 83 public static final int ID_FIELD_NUMBER = 1; 84 85 @SuppressWarnings("serial") 86 private volatile java.lang.Object id_ = ""; 87 /** 88 * 89 * 90 * <pre> 91 * The user-defined device identifier. The device ID must be unique 92 * within a device registry. 93 * </pre> 94 * 95 * <code>string id = 1;</code> 96 * 97 * @return The id. 98 */ 99 @java.lang.Override getId()100 public java.lang.String getId() { 101 java.lang.Object ref = id_; 102 if (ref instanceof java.lang.String) { 103 return (java.lang.String) ref; 104 } else { 105 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 106 java.lang.String s = bs.toStringUtf8(); 107 id_ = s; 108 return s; 109 } 110 } 111 /** 112 * 113 * 114 * <pre> 115 * The user-defined device identifier. The device ID must be unique 116 * within a device registry. 117 * </pre> 118 * 119 * <code>string id = 1;</code> 120 * 121 * @return The bytes for id. 122 */ 123 @java.lang.Override getIdBytes()124 public com.google.protobuf.ByteString getIdBytes() { 125 java.lang.Object ref = id_; 126 if (ref instanceof java.lang.String) { 127 com.google.protobuf.ByteString b = 128 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 129 id_ = b; 130 return b; 131 } else { 132 return (com.google.protobuf.ByteString) ref; 133 } 134 } 135 136 public static final int NAME_FIELD_NUMBER = 2; 137 138 @SuppressWarnings("serial") 139 private volatile java.lang.Object name_ = ""; 140 /** 141 * 142 * 143 * <pre> 144 * The resource path name. For example, 145 * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or 146 * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. 147 * When `name` is populated as a response from the service, it always ends 148 * in the device numeric ID. 149 * </pre> 150 * 151 * <code>string name = 2;</code> 152 * 153 * @return The name. 154 */ 155 @java.lang.Override getName()156 public java.lang.String getName() { 157 java.lang.Object ref = name_; 158 if (ref instanceof java.lang.String) { 159 return (java.lang.String) ref; 160 } else { 161 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 162 java.lang.String s = bs.toStringUtf8(); 163 name_ = s; 164 return s; 165 } 166 } 167 /** 168 * 169 * 170 * <pre> 171 * The resource path name. For example, 172 * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or 173 * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. 174 * When `name` is populated as a response from the service, it always ends 175 * in the device numeric ID. 176 * </pre> 177 * 178 * <code>string name = 2;</code> 179 * 180 * @return The bytes for name. 181 */ 182 @java.lang.Override getNameBytes()183 public com.google.protobuf.ByteString getNameBytes() { 184 java.lang.Object ref = name_; 185 if (ref instanceof java.lang.String) { 186 com.google.protobuf.ByteString b = 187 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 188 name_ = b; 189 return b; 190 } else { 191 return (com.google.protobuf.ByteString) ref; 192 } 193 } 194 195 public static final int NUM_ID_FIELD_NUMBER = 3; 196 private long numId_ = 0L; 197 /** 198 * 199 * 200 * <pre> 201 * [Output only] A server-defined unique numeric ID for the device. This is a 202 * more compact way to identify devices, and it is globally unique. 203 * </pre> 204 * 205 * <code>uint64 num_id = 3;</code> 206 * 207 * @return The numId. 208 */ 209 @java.lang.Override getNumId()210 public long getNumId() { 211 return numId_; 212 } 213 214 public static final int CREDENTIALS_FIELD_NUMBER = 12; 215 216 @SuppressWarnings("serial") 217 private java.util.List<com.google.cloud.iot.v1.DeviceCredential> credentials_; 218 /** 219 * 220 * 221 * <pre> 222 * The credentials used to authenticate this device. To allow credential 223 * rotation without interruption, multiple device credentials can be bound to 224 * this device. No more than 3 credentials can be bound to a single device at 225 * a time. When new credentials are added to a device, they are verified 226 * against the registry credentials. For details, see the description of the 227 * `DeviceRegistry.credentials` field. 228 * </pre> 229 * 230 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 231 */ 232 @java.lang.Override getCredentialsList()233 public java.util.List<com.google.cloud.iot.v1.DeviceCredential> getCredentialsList() { 234 return credentials_; 235 } 236 /** 237 * 238 * 239 * <pre> 240 * The credentials used to authenticate this device. To allow credential 241 * rotation without interruption, multiple device credentials can be bound to 242 * this device. No more than 3 credentials can be bound to a single device at 243 * a time. When new credentials are added to a device, they are verified 244 * against the registry credentials. For details, see the description of the 245 * `DeviceRegistry.credentials` field. 246 * </pre> 247 * 248 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 249 */ 250 @java.lang.Override 251 public java.util.List<? extends com.google.cloud.iot.v1.DeviceCredentialOrBuilder> getCredentialsOrBuilderList()252 getCredentialsOrBuilderList() { 253 return credentials_; 254 } 255 /** 256 * 257 * 258 * <pre> 259 * The credentials used to authenticate this device. To allow credential 260 * rotation without interruption, multiple device credentials can be bound to 261 * this device. No more than 3 credentials can be bound to a single device at 262 * a time. When new credentials are added to a device, they are verified 263 * against the registry credentials. For details, see the description of the 264 * `DeviceRegistry.credentials` field. 265 * </pre> 266 * 267 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 268 */ 269 @java.lang.Override getCredentialsCount()270 public int getCredentialsCount() { 271 return credentials_.size(); 272 } 273 /** 274 * 275 * 276 * <pre> 277 * The credentials used to authenticate this device. To allow credential 278 * rotation without interruption, multiple device credentials can be bound to 279 * this device. No more than 3 credentials can be bound to a single device at 280 * a time. When new credentials are added to a device, they are verified 281 * against the registry credentials. For details, see the description of the 282 * `DeviceRegistry.credentials` field. 283 * </pre> 284 * 285 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 286 */ 287 @java.lang.Override getCredentials(int index)288 public com.google.cloud.iot.v1.DeviceCredential getCredentials(int index) { 289 return credentials_.get(index); 290 } 291 /** 292 * 293 * 294 * <pre> 295 * The credentials used to authenticate this device. To allow credential 296 * rotation without interruption, multiple device credentials can be bound to 297 * this device. No more than 3 credentials can be bound to a single device at 298 * a time. When new credentials are added to a device, they are verified 299 * against the registry credentials. For details, see the description of the 300 * `DeviceRegistry.credentials` field. 301 * </pre> 302 * 303 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 304 */ 305 @java.lang.Override getCredentialsOrBuilder(int index)306 public com.google.cloud.iot.v1.DeviceCredentialOrBuilder getCredentialsOrBuilder(int index) { 307 return credentials_.get(index); 308 } 309 310 public static final int LAST_HEARTBEAT_TIME_FIELD_NUMBER = 7; 311 private com.google.protobuf.Timestamp lastHeartbeatTime_; 312 /** 313 * 314 * 315 * <pre> 316 * [Output only] The last time an MQTT `PINGREQ` was received. This field 317 * applies only to devices connecting through MQTT. MQTT clients usually only 318 * send `PINGREQ` messages if the connection is idle, and no other messages 319 * have been sent. Timestamps are periodically collected and written to 320 * storage; they may be stale by a few minutes. 321 * </pre> 322 * 323 * <code>.google.protobuf.Timestamp last_heartbeat_time = 7;</code> 324 * 325 * @return Whether the lastHeartbeatTime field is set. 326 */ 327 @java.lang.Override hasLastHeartbeatTime()328 public boolean hasLastHeartbeatTime() { 329 return lastHeartbeatTime_ != null; 330 } 331 /** 332 * 333 * 334 * <pre> 335 * [Output only] The last time an MQTT `PINGREQ` was received. This field 336 * applies only to devices connecting through MQTT. MQTT clients usually only 337 * send `PINGREQ` messages if the connection is idle, and no other messages 338 * have been sent. Timestamps are periodically collected and written to 339 * storage; they may be stale by a few minutes. 340 * </pre> 341 * 342 * <code>.google.protobuf.Timestamp last_heartbeat_time = 7;</code> 343 * 344 * @return The lastHeartbeatTime. 345 */ 346 @java.lang.Override getLastHeartbeatTime()347 public com.google.protobuf.Timestamp getLastHeartbeatTime() { 348 return lastHeartbeatTime_ == null 349 ? com.google.protobuf.Timestamp.getDefaultInstance() 350 : lastHeartbeatTime_; 351 } 352 /** 353 * 354 * 355 * <pre> 356 * [Output only] The last time an MQTT `PINGREQ` was received. This field 357 * applies only to devices connecting through MQTT. MQTT clients usually only 358 * send `PINGREQ` messages if the connection is idle, and no other messages 359 * have been sent. Timestamps are periodically collected and written to 360 * storage; they may be stale by a few minutes. 361 * </pre> 362 * 363 * <code>.google.protobuf.Timestamp last_heartbeat_time = 7;</code> 364 */ 365 @java.lang.Override getLastHeartbeatTimeOrBuilder()366 public com.google.protobuf.TimestampOrBuilder getLastHeartbeatTimeOrBuilder() { 367 return lastHeartbeatTime_ == null 368 ? com.google.protobuf.Timestamp.getDefaultInstance() 369 : lastHeartbeatTime_; 370 } 371 372 public static final int LAST_EVENT_TIME_FIELD_NUMBER = 8; 373 private com.google.protobuf.Timestamp lastEventTime_; 374 /** 375 * 376 * 377 * <pre> 378 * [Output only] The last time a telemetry event was received. Timestamps are 379 * periodically collected and written to storage; they may be stale by a few 380 * minutes. 381 * </pre> 382 * 383 * <code>.google.protobuf.Timestamp last_event_time = 8;</code> 384 * 385 * @return Whether the lastEventTime field is set. 386 */ 387 @java.lang.Override hasLastEventTime()388 public boolean hasLastEventTime() { 389 return lastEventTime_ != null; 390 } 391 /** 392 * 393 * 394 * <pre> 395 * [Output only] The last time a telemetry event was received. Timestamps are 396 * periodically collected and written to storage; they may be stale by a few 397 * minutes. 398 * </pre> 399 * 400 * <code>.google.protobuf.Timestamp last_event_time = 8;</code> 401 * 402 * @return The lastEventTime. 403 */ 404 @java.lang.Override getLastEventTime()405 public com.google.protobuf.Timestamp getLastEventTime() { 406 return lastEventTime_ == null 407 ? com.google.protobuf.Timestamp.getDefaultInstance() 408 : lastEventTime_; 409 } 410 /** 411 * 412 * 413 * <pre> 414 * [Output only] The last time a telemetry event was received. Timestamps are 415 * periodically collected and written to storage; they may be stale by a few 416 * minutes. 417 * </pre> 418 * 419 * <code>.google.protobuf.Timestamp last_event_time = 8;</code> 420 */ 421 @java.lang.Override getLastEventTimeOrBuilder()422 public com.google.protobuf.TimestampOrBuilder getLastEventTimeOrBuilder() { 423 return lastEventTime_ == null 424 ? com.google.protobuf.Timestamp.getDefaultInstance() 425 : lastEventTime_; 426 } 427 428 public static final int LAST_STATE_TIME_FIELD_NUMBER = 20; 429 private com.google.protobuf.Timestamp lastStateTime_; 430 /** 431 * 432 * 433 * <pre> 434 * [Output only] The last time a state event was received. Timestamps are 435 * periodically collected and written to storage; they may be stale by a few 436 * minutes. 437 * </pre> 438 * 439 * <code>.google.protobuf.Timestamp last_state_time = 20;</code> 440 * 441 * @return Whether the lastStateTime field is set. 442 */ 443 @java.lang.Override hasLastStateTime()444 public boolean hasLastStateTime() { 445 return lastStateTime_ != null; 446 } 447 /** 448 * 449 * 450 * <pre> 451 * [Output only] The last time a state event was received. Timestamps are 452 * periodically collected and written to storage; they may be stale by a few 453 * minutes. 454 * </pre> 455 * 456 * <code>.google.protobuf.Timestamp last_state_time = 20;</code> 457 * 458 * @return The lastStateTime. 459 */ 460 @java.lang.Override getLastStateTime()461 public com.google.protobuf.Timestamp getLastStateTime() { 462 return lastStateTime_ == null 463 ? com.google.protobuf.Timestamp.getDefaultInstance() 464 : lastStateTime_; 465 } 466 /** 467 * 468 * 469 * <pre> 470 * [Output only] The last time a state event was received. Timestamps are 471 * periodically collected and written to storage; they may be stale by a few 472 * minutes. 473 * </pre> 474 * 475 * <code>.google.protobuf.Timestamp last_state_time = 20;</code> 476 */ 477 @java.lang.Override getLastStateTimeOrBuilder()478 public com.google.protobuf.TimestampOrBuilder getLastStateTimeOrBuilder() { 479 return lastStateTime_ == null 480 ? com.google.protobuf.Timestamp.getDefaultInstance() 481 : lastStateTime_; 482 } 483 484 public static final int LAST_CONFIG_ACK_TIME_FIELD_NUMBER = 14; 485 private com.google.protobuf.Timestamp lastConfigAckTime_; 486 /** 487 * 488 * 489 * <pre> 490 * [Output only] The last time a cloud-to-device config version acknowledgment 491 * was received from the device. This field is only for configurations 492 * sent through MQTT. 493 * </pre> 494 * 495 * <code>.google.protobuf.Timestamp last_config_ack_time = 14;</code> 496 * 497 * @return Whether the lastConfigAckTime field is set. 498 */ 499 @java.lang.Override hasLastConfigAckTime()500 public boolean hasLastConfigAckTime() { 501 return lastConfigAckTime_ != null; 502 } 503 /** 504 * 505 * 506 * <pre> 507 * [Output only] The last time a cloud-to-device config version acknowledgment 508 * was received from the device. This field is only for configurations 509 * sent through MQTT. 510 * </pre> 511 * 512 * <code>.google.protobuf.Timestamp last_config_ack_time = 14;</code> 513 * 514 * @return The lastConfigAckTime. 515 */ 516 @java.lang.Override getLastConfigAckTime()517 public com.google.protobuf.Timestamp getLastConfigAckTime() { 518 return lastConfigAckTime_ == null 519 ? com.google.protobuf.Timestamp.getDefaultInstance() 520 : lastConfigAckTime_; 521 } 522 /** 523 * 524 * 525 * <pre> 526 * [Output only] The last time a cloud-to-device config version acknowledgment 527 * was received from the device. This field is only for configurations 528 * sent through MQTT. 529 * </pre> 530 * 531 * <code>.google.protobuf.Timestamp last_config_ack_time = 14;</code> 532 */ 533 @java.lang.Override getLastConfigAckTimeOrBuilder()534 public com.google.protobuf.TimestampOrBuilder getLastConfigAckTimeOrBuilder() { 535 return lastConfigAckTime_ == null 536 ? com.google.protobuf.Timestamp.getDefaultInstance() 537 : lastConfigAckTime_; 538 } 539 540 public static final int LAST_CONFIG_SEND_TIME_FIELD_NUMBER = 18; 541 private com.google.protobuf.Timestamp lastConfigSendTime_; 542 /** 543 * 544 * 545 * <pre> 546 * [Output only] The last time a cloud-to-device config version was sent to 547 * the device. 548 * </pre> 549 * 550 * <code>.google.protobuf.Timestamp last_config_send_time = 18;</code> 551 * 552 * @return Whether the lastConfigSendTime field is set. 553 */ 554 @java.lang.Override hasLastConfigSendTime()555 public boolean hasLastConfigSendTime() { 556 return lastConfigSendTime_ != null; 557 } 558 /** 559 * 560 * 561 * <pre> 562 * [Output only] The last time a cloud-to-device config version was sent to 563 * the device. 564 * </pre> 565 * 566 * <code>.google.protobuf.Timestamp last_config_send_time = 18;</code> 567 * 568 * @return The lastConfigSendTime. 569 */ 570 @java.lang.Override getLastConfigSendTime()571 public com.google.protobuf.Timestamp getLastConfigSendTime() { 572 return lastConfigSendTime_ == null 573 ? com.google.protobuf.Timestamp.getDefaultInstance() 574 : lastConfigSendTime_; 575 } 576 /** 577 * 578 * 579 * <pre> 580 * [Output only] The last time a cloud-to-device config version was sent to 581 * the device. 582 * </pre> 583 * 584 * <code>.google.protobuf.Timestamp last_config_send_time = 18;</code> 585 */ 586 @java.lang.Override getLastConfigSendTimeOrBuilder()587 public com.google.protobuf.TimestampOrBuilder getLastConfigSendTimeOrBuilder() { 588 return lastConfigSendTime_ == null 589 ? com.google.protobuf.Timestamp.getDefaultInstance() 590 : lastConfigSendTime_; 591 } 592 593 public static final int BLOCKED_FIELD_NUMBER = 19; 594 private boolean blocked_ = false; 595 /** 596 * 597 * 598 * <pre> 599 * If a device is blocked, connections or requests from this device will fail. 600 * Can be used to temporarily prevent the device from connecting if, for 601 * example, the sensor is generating bad data and needs maintenance. 602 * </pre> 603 * 604 * <code>bool blocked = 19;</code> 605 * 606 * @return The blocked. 607 */ 608 @java.lang.Override getBlocked()609 public boolean getBlocked() { 610 return blocked_; 611 } 612 613 public static final int LAST_ERROR_TIME_FIELD_NUMBER = 10; 614 private com.google.protobuf.Timestamp lastErrorTime_; 615 /** 616 * 617 * 618 * <pre> 619 * [Output only] The time the most recent error occurred, such as a failure to 620 * publish to Cloud Pub/Sub. This field is the timestamp of 621 * 'last_error_status'. 622 * </pre> 623 * 624 * <code>.google.protobuf.Timestamp last_error_time = 10;</code> 625 * 626 * @return Whether the lastErrorTime field is set. 627 */ 628 @java.lang.Override hasLastErrorTime()629 public boolean hasLastErrorTime() { 630 return lastErrorTime_ != null; 631 } 632 /** 633 * 634 * 635 * <pre> 636 * [Output only] The time the most recent error occurred, such as a failure to 637 * publish to Cloud Pub/Sub. This field is the timestamp of 638 * 'last_error_status'. 639 * </pre> 640 * 641 * <code>.google.protobuf.Timestamp last_error_time = 10;</code> 642 * 643 * @return The lastErrorTime. 644 */ 645 @java.lang.Override getLastErrorTime()646 public com.google.protobuf.Timestamp getLastErrorTime() { 647 return lastErrorTime_ == null 648 ? com.google.protobuf.Timestamp.getDefaultInstance() 649 : lastErrorTime_; 650 } 651 /** 652 * 653 * 654 * <pre> 655 * [Output only] The time the most recent error occurred, such as a failure to 656 * publish to Cloud Pub/Sub. This field is the timestamp of 657 * 'last_error_status'. 658 * </pre> 659 * 660 * <code>.google.protobuf.Timestamp last_error_time = 10;</code> 661 */ 662 @java.lang.Override getLastErrorTimeOrBuilder()663 public com.google.protobuf.TimestampOrBuilder getLastErrorTimeOrBuilder() { 664 return lastErrorTime_ == null 665 ? com.google.protobuf.Timestamp.getDefaultInstance() 666 : lastErrorTime_; 667 } 668 669 public static final int LAST_ERROR_STATUS_FIELD_NUMBER = 11; 670 private com.google.rpc.Status lastErrorStatus_; 671 /** 672 * 673 * 674 * <pre> 675 * [Output only] The error message of the most recent error, such as a failure 676 * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this 677 * field. If no errors have occurred, this field has an empty message 678 * and the status code 0 == OK. Otherwise, this field is expected to have a 679 * status code other than OK. 680 * </pre> 681 * 682 * <code>.google.rpc.Status last_error_status = 11;</code> 683 * 684 * @return Whether the lastErrorStatus field is set. 685 */ 686 @java.lang.Override hasLastErrorStatus()687 public boolean hasLastErrorStatus() { 688 return lastErrorStatus_ != null; 689 } 690 /** 691 * 692 * 693 * <pre> 694 * [Output only] The error message of the most recent error, such as a failure 695 * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this 696 * field. If no errors have occurred, this field has an empty message 697 * and the status code 0 == OK. Otherwise, this field is expected to have a 698 * status code other than OK. 699 * </pre> 700 * 701 * <code>.google.rpc.Status last_error_status = 11;</code> 702 * 703 * @return The lastErrorStatus. 704 */ 705 @java.lang.Override getLastErrorStatus()706 public com.google.rpc.Status getLastErrorStatus() { 707 return lastErrorStatus_ == null ? com.google.rpc.Status.getDefaultInstance() : lastErrorStatus_; 708 } 709 /** 710 * 711 * 712 * <pre> 713 * [Output only] The error message of the most recent error, such as a failure 714 * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this 715 * field. If no errors have occurred, this field has an empty message 716 * and the status code 0 == OK. Otherwise, this field is expected to have a 717 * status code other than OK. 718 * </pre> 719 * 720 * <code>.google.rpc.Status last_error_status = 11;</code> 721 */ 722 @java.lang.Override getLastErrorStatusOrBuilder()723 public com.google.rpc.StatusOrBuilder getLastErrorStatusOrBuilder() { 724 return lastErrorStatus_ == null ? com.google.rpc.Status.getDefaultInstance() : lastErrorStatus_; 725 } 726 727 public static final int CONFIG_FIELD_NUMBER = 13; 728 private com.google.cloud.iot.v1.DeviceConfig config_; 729 /** 730 * 731 * 732 * <pre> 733 * The most recent device configuration, which is eventually sent from 734 * Cloud IoT Core to the device. If not present on creation, the 735 * configuration will be initialized with an empty payload and version value 736 * of `1`. To update this field after creation, use the 737 * `DeviceManager.ModifyCloudToDeviceConfig` method. 738 * </pre> 739 * 740 * <code>.google.cloud.iot.v1.DeviceConfig config = 13;</code> 741 * 742 * @return Whether the config field is set. 743 */ 744 @java.lang.Override hasConfig()745 public boolean hasConfig() { 746 return config_ != null; 747 } 748 /** 749 * 750 * 751 * <pre> 752 * The most recent device configuration, which is eventually sent from 753 * Cloud IoT Core to the device. If not present on creation, the 754 * configuration will be initialized with an empty payload and version value 755 * of `1`. To update this field after creation, use the 756 * `DeviceManager.ModifyCloudToDeviceConfig` method. 757 * </pre> 758 * 759 * <code>.google.cloud.iot.v1.DeviceConfig config = 13;</code> 760 * 761 * @return The config. 762 */ 763 @java.lang.Override getConfig()764 public com.google.cloud.iot.v1.DeviceConfig getConfig() { 765 return config_ == null ? com.google.cloud.iot.v1.DeviceConfig.getDefaultInstance() : config_; 766 } 767 /** 768 * 769 * 770 * <pre> 771 * The most recent device configuration, which is eventually sent from 772 * Cloud IoT Core to the device. If not present on creation, the 773 * configuration will be initialized with an empty payload and version value 774 * of `1`. To update this field after creation, use the 775 * `DeviceManager.ModifyCloudToDeviceConfig` method. 776 * </pre> 777 * 778 * <code>.google.cloud.iot.v1.DeviceConfig config = 13;</code> 779 */ 780 @java.lang.Override getConfigOrBuilder()781 public com.google.cloud.iot.v1.DeviceConfigOrBuilder getConfigOrBuilder() { 782 return config_ == null ? com.google.cloud.iot.v1.DeviceConfig.getDefaultInstance() : config_; 783 } 784 785 public static final int STATE_FIELD_NUMBER = 16; 786 private com.google.cloud.iot.v1.DeviceState state_; 787 /** 788 * 789 * 790 * <pre> 791 * [Output only] The state most recently received from the device. If no state 792 * has been reported, this field is not present. 793 * </pre> 794 * 795 * <code>.google.cloud.iot.v1.DeviceState state = 16;</code> 796 * 797 * @return Whether the state field is set. 798 */ 799 @java.lang.Override hasState()800 public boolean hasState() { 801 return state_ != null; 802 } 803 /** 804 * 805 * 806 * <pre> 807 * [Output only] The state most recently received from the device. If no state 808 * has been reported, this field is not present. 809 * </pre> 810 * 811 * <code>.google.cloud.iot.v1.DeviceState state = 16;</code> 812 * 813 * @return The state. 814 */ 815 @java.lang.Override getState()816 public com.google.cloud.iot.v1.DeviceState getState() { 817 return state_ == null ? com.google.cloud.iot.v1.DeviceState.getDefaultInstance() : state_; 818 } 819 /** 820 * 821 * 822 * <pre> 823 * [Output only] The state most recently received from the device. If no state 824 * has been reported, this field is not present. 825 * </pre> 826 * 827 * <code>.google.cloud.iot.v1.DeviceState state = 16;</code> 828 */ 829 @java.lang.Override getStateOrBuilder()830 public com.google.cloud.iot.v1.DeviceStateOrBuilder getStateOrBuilder() { 831 return state_ == null ? com.google.cloud.iot.v1.DeviceState.getDefaultInstance() : state_; 832 } 833 834 public static final int LOG_LEVEL_FIELD_NUMBER = 21; 835 private int logLevel_ = 0; 836 /** 837 * 838 * 839 * <pre> 840 * **Beta Feature** 841 * The logging verbosity for device activity. If unspecified, 842 * DeviceRegistry.log_level will be used. 843 * </pre> 844 * 845 * <code>.google.cloud.iot.v1.LogLevel log_level = 21;</code> 846 * 847 * @return The enum numeric value on the wire for logLevel. 848 */ 849 @java.lang.Override getLogLevelValue()850 public int getLogLevelValue() { 851 return logLevel_; 852 } 853 /** 854 * 855 * 856 * <pre> 857 * **Beta Feature** 858 * The logging verbosity for device activity. If unspecified, 859 * DeviceRegistry.log_level will be used. 860 * </pre> 861 * 862 * <code>.google.cloud.iot.v1.LogLevel log_level = 21;</code> 863 * 864 * @return The logLevel. 865 */ 866 @java.lang.Override getLogLevel()867 public com.google.cloud.iot.v1.LogLevel getLogLevel() { 868 com.google.cloud.iot.v1.LogLevel result = com.google.cloud.iot.v1.LogLevel.forNumber(logLevel_); 869 return result == null ? com.google.cloud.iot.v1.LogLevel.UNRECOGNIZED : result; 870 } 871 872 public static final int METADATA_FIELD_NUMBER = 17; 873 874 private static final class MetadataDefaultEntryHolder { 875 static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry = 876 com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance( 877 com.google.cloud.iot.v1.ResourcesProto 878 .internal_static_google_cloud_iot_v1_Device_MetadataEntry_descriptor, 879 com.google.protobuf.WireFormat.FieldType.STRING, 880 "", 881 com.google.protobuf.WireFormat.FieldType.STRING, 882 ""); 883 } 884 885 @SuppressWarnings("serial") 886 private com.google.protobuf.MapField<java.lang.String, java.lang.String> metadata_; 887 internalGetMetadata()888 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMetadata() { 889 if (metadata_ == null) { 890 return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); 891 } 892 return metadata_; 893 } 894 getMetadataCount()895 public int getMetadataCount() { 896 return internalGetMetadata().getMap().size(); 897 } 898 /** 899 * 900 * 901 * <pre> 902 * The metadata key-value pairs assigned to the device. This metadata is not 903 * interpreted or indexed by Cloud IoT Core. It can be used to add contextual 904 * information for the device. 905 * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and 906 * be less than 128 bytes in length. 907 * Values are free-form strings. Each value must be less than or equal to 32 908 * KB in size. 909 * The total size of all keys and values must be less than 256 KB, and the 910 * maximum number of key-value pairs is 500. 911 * </pre> 912 * 913 * <code>map<string, string> metadata = 17;</code> 914 */ 915 @java.lang.Override containsMetadata(java.lang.String key)916 public boolean containsMetadata(java.lang.String key) { 917 if (key == null) { 918 throw new NullPointerException("map key"); 919 } 920 return internalGetMetadata().getMap().containsKey(key); 921 } 922 /** Use {@link #getMetadataMap()} instead. */ 923 @java.lang.Override 924 @java.lang.Deprecated getMetadata()925 public java.util.Map<java.lang.String, java.lang.String> getMetadata() { 926 return getMetadataMap(); 927 } 928 /** 929 * 930 * 931 * <pre> 932 * The metadata key-value pairs assigned to the device. This metadata is not 933 * interpreted or indexed by Cloud IoT Core. It can be used to add contextual 934 * information for the device. 935 * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and 936 * be less than 128 bytes in length. 937 * Values are free-form strings. Each value must be less than or equal to 32 938 * KB in size. 939 * The total size of all keys and values must be less than 256 KB, and the 940 * maximum number of key-value pairs is 500. 941 * </pre> 942 * 943 * <code>map<string, string> metadata = 17;</code> 944 */ 945 @java.lang.Override getMetadataMap()946 public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() { 947 return internalGetMetadata().getMap(); 948 } 949 /** 950 * 951 * 952 * <pre> 953 * The metadata key-value pairs assigned to the device. This metadata is not 954 * interpreted or indexed by Cloud IoT Core. It can be used to add contextual 955 * information for the device. 956 * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and 957 * be less than 128 bytes in length. 958 * Values are free-form strings. Each value must be less than or equal to 32 959 * KB in size. 960 * The total size of all keys and values must be less than 256 KB, and the 961 * maximum number of key-value pairs is 500. 962 * </pre> 963 * 964 * <code>map<string, string> metadata = 17;</code> 965 */ 966 @java.lang.Override getMetadataOrDefault( java.lang.String key, java.lang.String defaultValue)967 public /* nullable */ java.lang.String getMetadataOrDefault( 968 java.lang.String key, 969 /* nullable */ 970 java.lang.String defaultValue) { 971 if (key == null) { 972 throw new NullPointerException("map key"); 973 } 974 java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); 975 return map.containsKey(key) ? map.get(key) : defaultValue; 976 } 977 /** 978 * 979 * 980 * <pre> 981 * The metadata key-value pairs assigned to the device. This metadata is not 982 * interpreted or indexed by Cloud IoT Core. It can be used to add contextual 983 * information for the device. 984 * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and 985 * be less than 128 bytes in length. 986 * Values are free-form strings. Each value must be less than or equal to 32 987 * KB in size. 988 * The total size of all keys and values must be less than 256 KB, and the 989 * maximum number of key-value pairs is 500. 990 * </pre> 991 * 992 * <code>map<string, string> metadata = 17;</code> 993 */ 994 @java.lang.Override getMetadataOrThrow(java.lang.String key)995 public java.lang.String getMetadataOrThrow(java.lang.String key) { 996 if (key == null) { 997 throw new NullPointerException("map key"); 998 } 999 java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); 1000 if (!map.containsKey(key)) { 1001 throw new java.lang.IllegalArgumentException(); 1002 } 1003 return map.get(key); 1004 } 1005 1006 public static final int GATEWAY_CONFIG_FIELD_NUMBER = 24; 1007 private com.google.cloud.iot.v1.GatewayConfig gatewayConfig_; 1008 /** 1009 * 1010 * 1011 * <pre> 1012 * Gateway-related configuration and state. 1013 * </pre> 1014 * 1015 * <code>.google.cloud.iot.v1.GatewayConfig gateway_config = 24;</code> 1016 * 1017 * @return Whether the gatewayConfig field is set. 1018 */ 1019 @java.lang.Override hasGatewayConfig()1020 public boolean hasGatewayConfig() { 1021 return gatewayConfig_ != null; 1022 } 1023 /** 1024 * 1025 * 1026 * <pre> 1027 * Gateway-related configuration and state. 1028 * </pre> 1029 * 1030 * <code>.google.cloud.iot.v1.GatewayConfig gateway_config = 24;</code> 1031 * 1032 * @return The gatewayConfig. 1033 */ 1034 @java.lang.Override getGatewayConfig()1035 public com.google.cloud.iot.v1.GatewayConfig getGatewayConfig() { 1036 return gatewayConfig_ == null 1037 ? com.google.cloud.iot.v1.GatewayConfig.getDefaultInstance() 1038 : gatewayConfig_; 1039 } 1040 /** 1041 * 1042 * 1043 * <pre> 1044 * Gateway-related configuration and state. 1045 * </pre> 1046 * 1047 * <code>.google.cloud.iot.v1.GatewayConfig gateway_config = 24;</code> 1048 */ 1049 @java.lang.Override getGatewayConfigOrBuilder()1050 public com.google.cloud.iot.v1.GatewayConfigOrBuilder getGatewayConfigOrBuilder() { 1051 return gatewayConfig_ == null 1052 ? com.google.cloud.iot.v1.GatewayConfig.getDefaultInstance() 1053 : gatewayConfig_; 1054 } 1055 1056 private byte memoizedIsInitialized = -1; 1057 1058 @java.lang.Override isInitialized()1059 public final boolean isInitialized() { 1060 byte isInitialized = memoizedIsInitialized; 1061 if (isInitialized == 1) return true; 1062 if (isInitialized == 0) return false; 1063 1064 memoizedIsInitialized = 1; 1065 return true; 1066 } 1067 1068 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)1069 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 1070 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { 1071 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); 1072 } 1073 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 1074 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); 1075 } 1076 if (numId_ != 0L) { 1077 output.writeUInt64(3, numId_); 1078 } 1079 if (lastHeartbeatTime_ != null) { 1080 output.writeMessage(7, getLastHeartbeatTime()); 1081 } 1082 if (lastEventTime_ != null) { 1083 output.writeMessage(8, getLastEventTime()); 1084 } 1085 if (lastErrorTime_ != null) { 1086 output.writeMessage(10, getLastErrorTime()); 1087 } 1088 if (lastErrorStatus_ != null) { 1089 output.writeMessage(11, getLastErrorStatus()); 1090 } 1091 for (int i = 0; i < credentials_.size(); i++) { 1092 output.writeMessage(12, credentials_.get(i)); 1093 } 1094 if (config_ != null) { 1095 output.writeMessage(13, getConfig()); 1096 } 1097 if (lastConfigAckTime_ != null) { 1098 output.writeMessage(14, getLastConfigAckTime()); 1099 } 1100 if (state_ != null) { 1101 output.writeMessage(16, getState()); 1102 } 1103 com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( 1104 output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 17); 1105 if (lastConfigSendTime_ != null) { 1106 output.writeMessage(18, getLastConfigSendTime()); 1107 } 1108 if (blocked_ != false) { 1109 output.writeBool(19, blocked_); 1110 } 1111 if (lastStateTime_ != null) { 1112 output.writeMessage(20, getLastStateTime()); 1113 } 1114 if (logLevel_ != com.google.cloud.iot.v1.LogLevel.LOG_LEVEL_UNSPECIFIED.getNumber()) { 1115 output.writeEnum(21, logLevel_); 1116 } 1117 if (gatewayConfig_ != null) { 1118 output.writeMessage(24, getGatewayConfig()); 1119 } 1120 getUnknownFields().writeTo(output); 1121 } 1122 1123 @java.lang.Override getSerializedSize()1124 public int getSerializedSize() { 1125 int size = memoizedSize; 1126 if (size != -1) return size; 1127 1128 size = 0; 1129 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { 1130 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); 1131 } 1132 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 1133 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); 1134 } 1135 if (numId_ != 0L) { 1136 size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3, numId_); 1137 } 1138 if (lastHeartbeatTime_ != null) { 1139 size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getLastHeartbeatTime()); 1140 } 1141 if (lastEventTime_ != null) { 1142 size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getLastEventTime()); 1143 } 1144 if (lastErrorTime_ != null) { 1145 size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLastErrorTime()); 1146 } 1147 if (lastErrorStatus_ != null) { 1148 size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getLastErrorStatus()); 1149 } 1150 for (int i = 0; i < credentials_.size(); i++) { 1151 size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, credentials_.get(i)); 1152 } 1153 if (config_ != null) { 1154 size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getConfig()); 1155 } 1156 if (lastConfigAckTime_ != null) { 1157 size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getLastConfigAckTime()); 1158 } 1159 if (state_ != null) { 1160 size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getState()); 1161 } 1162 for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : 1163 internalGetMetadata().getMap().entrySet()) { 1164 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> metadata__ = 1165 MetadataDefaultEntryHolder.defaultEntry 1166 .newBuilderForType() 1167 .setKey(entry.getKey()) 1168 .setValue(entry.getValue()) 1169 .build(); 1170 size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, metadata__); 1171 } 1172 if (lastConfigSendTime_ != null) { 1173 size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getLastConfigSendTime()); 1174 } 1175 if (blocked_ != false) { 1176 size += com.google.protobuf.CodedOutputStream.computeBoolSize(19, blocked_); 1177 } 1178 if (lastStateTime_ != null) { 1179 size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getLastStateTime()); 1180 } 1181 if (logLevel_ != com.google.cloud.iot.v1.LogLevel.LOG_LEVEL_UNSPECIFIED.getNumber()) { 1182 size += com.google.protobuf.CodedOutputStream.computeEnumSize(21, logLevel_); 1183 } 1184 if (gatewayConfig_ != null) { 1185 size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getGatewayConfig()); 1186 } 1187 size += getUnknownFields().getSerializedSize(); 1188 memoizedSize = size; 1189 return size; 1190 } 1191 1192 @java.lang.Override equals(final java.lang.Object obj)1193 public boolean equals(final java.lang.Object obj) { 1194 if (obj == this) { 1195 return true; 1196 } 1197 if (!(obj instanceof com.google.cloud.iot.v1.Device)) { 1198 return super.equals(obj); 1199 } 1200 com.google.cloud.iot.v1.Device other = (com.google.cloud.iot.v1.Device) obj; 1201 1202 if (!getId().equals(other.getId())) return false; 1203 if (!getName().equals(other.getName())) return false; 1204 if (getNumId() != other.getNumId()) return false; 1205 if (!getCredentialsList().equals(other.getCredentialsList())) return false; 1206 if (hasLastHeartbeatTime() != other.hasLastHeartbeatTime()) return false; 1207 if (hasLastHeartbeatTime()) { 1208 if (!getLastHeartbeatTime().equals(other.getLastHeartbeatTime())) return false; 1209 } 1210 if (hasLastEventTime() != other.hasLastEventTime()) return false; 1211 if (hasLastEventTime()) { 1212 if (!getLastEventTime().equals(other.getLastEventTime())) return false; 1213 } 1214 if (hasLastStateTime() != other.hasLastStateTime()) return false; 1215 if (hasLastStateTime()) { 1216 if (!getLastStateTime().equals(other.getLastStateTime())) return false; 1217 } 1218 if (hasLastConfigAckTime() != other.hasLastConfigAckTime()) return false; 1219 if (hasLastConfigAckTime()) { 1220 if (!getLastConfigAckTime().equals(other.getLastConfigAckTime())) return false; 1221 } 1222 if (hasLastConfigSendTime() != other.hasLastConfigSendTime()) return false; 1223 if (hasLastConfigSendTime()) { 1224 if (!getLastConfigSendTime().equals(other.getLastConfigSendTime())) return false; 1225 } 1226 if (getBlocked() != other.getBlocked()) return false; 1227 if (hasLastErrorTime() != other.hasLastErrorTime()) return false; 1228 if (hasLastErrorTime()) { 1229 if (!getLastErrorTime().equals(other.getLastErrorTime())) return false; 1230 } 1231 if (hasLastErrorStatus() != other.hasLastErrorStatus()) return false; 1232 if (hasLastErrorStatus()) { 1233 if (!getLastErrorStatus().equals(other.getLastErrorStatus())) return false; 1234 } 1235 if (hasConfig() != other.hasConfig()) return false; 1236 if (hasConfig()) { 1237 if (!getConfig().equals(other.getConfig())) return false; 1238 } 1239 if (hasState() != other.hasState()) return false; 1240 if (hasState()) { 1241 if (!getState().equals(other.getState())) return false; 1242 } 1243 if (logLevel_ != other.logLevel_) return false; 1244 if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; 1245 if (hasGatewayConfig() != other.hasGatewayConfig()) return false; 1246 if (hasGatewayConfig()) { 1247 if (!getGatewayConfig().equals(other.getGatewayConfig())) return false; 1248 } 1249 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1250 return true; 1251 } 1252 1253 @java.lang.Override hashCode()1254 public int hashCode() { 1255 if (memoizedHashCode != 0) { 1256 return memoizedHashCode; 1257 } 1258 int hash = 41; 1259 hash = (19 * hash) + getDescriptor().hashCode(); 1260 hash = (37 * hash) + ID_FIELD_NUMBER; 1261 hash = (53 * hash) + getId().hashCode(); 1262 hash = (37 * hash) + NAME_FIELD_NUMBER; 1263 hash = (53 * hash) + getName().hashCode(); 1264 hash = (37 * hash) + NUM_ID_FIELD_NUMBER; 1265 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getNumId()); 1266 if (getCredentialsCount() > 0) { 1267 hash = (37 * hash) + CREDENTIALS_FIELD_NUMBER; 1268 hash = (53 * hash) + getCredentialsList().hashCode(); 1269 } 1270 if (hasLastHeartbeatTime()) { 1271 hash = (37 * hash) + LAST_HEARTBEAT_TIME_FIELD_NUMBER; 1272 hash = (53 * hash) + getLastHeartbeatTime().hashCode(); 1273 } 1274 if (hasLastEventTime()) { 1275 hash = (37 * hash) + LAST_EVENT_TIME_FIELD_NUMBER; 1276 hash = (53 * hash) + getLastEventTime().hashCode(); 1277 } 1278 if (hasLastStateTime()) { 1279 hash = (37 * hash) + LAST_STATE_TIME_FIELD_NUMBER; 1280 hash = (53 * hash) + getLastStateTime().hashCode(); 1281 } 1282 if (hasLastConfigAckTime()) { 1283 hash = (37 * hash) + LAST_CONFIG_ACK_TIME_FIELD_NUMBER; 1284 hash = (53 * hash) + getLastConfigAckTime().hashCode(); 1285 } 1286 if (hasLastConfigSendTime()) { 1287 hash = (37 * hash) + LAST_CONFIG_SEND_TIME_FIELD_NUMBER; 1288 hash = (53 * hash) + getLastConfigSendTime().hashCode(); 1289 } 1290 hash = (37 * hash) + BLOCKED_FIELD_NUMBER; 1291 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBlocked()); 1292 if (hasLastErrorTime()) { 1293 hash = (37 * hash) + LAST_ERROR_TIME_FIELD_NUMBER; 1294 hash = (53 * hash) + getLastErrorTime().hashCode(); 1295 } 1296 if (hasLastErrorStatus()) { 1297 hash = (37 * hash) + LAST_ERROR_STATUS_FIELD_NUMBER; 1298 hash = (53 * hash) + getLastErrorStatus().hashCode(); 1299 } 1300 if (hasConfig()) { 1301 hash = (37 * hash) + CONFIG_FIELD_NUMBER; 1302 hash = (53 * hash) + getConfig().hashCode(); 1303 } 1304 if (hasState()) { 1305 hash = (37 * hash) + STATE_FIELD_NUMBER; 1306 hash = (53 * hash) + getState().hashCode(); 1307 } 1308 hash = (37 * hash) + LOG_LEVEL_FIELD_NUMBER; 1309 hash = (53 * hash) + logLevel_; 1310 if (!internalGetMetadata().getMap().isEmpty()) { 1311 hash = (37 * hash) + METADATA_FIELD_NUMBER; 1312 hash = (53 * hash) + internalGetMetadata().hashCode(); 1313 } 1314 if (hasGatewayConfig()) { 1315 hash = (37 * hash) + GATEWAY_CONFIG_FIELD_NUMBER; 1316 hash = (53 * hash) + getGatewayConfig().hashCode(); 1317 } 1318 hash = (29 * hash) + getUnknownFields().hashCode(); 1319 memoizedHashCode = hash; 1320 return hash; 1321 } 1322 parseFrom(java.nio.ByteBuffer data)1323 public static com.google.cloud.iot.v1.Device parseFrom(java.nio.ByteBuffer data) 1324 throws com.google.protobuf.InvalidProtocolBufferException { 1325 return PARSER.parseFrom(data); 1326 } 1327 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1328 public static com.google.cloud.iot.v1.Device parseFrom( 1329 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1330 throws com.google.protobuf.InvalidProtocolBufferException { 1331 return PARSER.parseFrom(data, extensionRegistry); 1332 } 1333 parseFrom(com.google.protobuf.ByteString data)1334 public static com.google.cloud.iot.v1.Device parseFrom(com.google.protobuf.ByteString data) 1335 throws com.google.protobuf.InvalidProtocolBufferException { 1336 return PARSER.parseFrom(data); 1337 } 1338 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1339 public static com.google.cloud.iot.v1.Device parseFrom( 1340 com.google.protobuf.ByteString data, 1341 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1342 throws com.google.protobuf.InvalidProtocolBufferException { 1343 return PARSER.parseFrom(data, extensionRegistry); 1344 } 1345 parseFrom(byte[] data)1346 public static com.google.cloud.iot.v1.Device parseFrom(byte[] data) 1347 throws com.google.protobuf.InvalidProtocolBufferException { 1348 return PARSER.parseFrom(data); 1349 } 1350 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1351 public static com.google.cloud.iot.v1.Device parseFrom( 1352 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1353 throws com.google.protobuf.InvalidProtocolBufferException { 1354 return PARSER.parseFrom(data, extensionRegistry); 1355 } 1356 parseFrom(java.io.InputStream input)1357 public static com.google.cloud.iot.v1.Device parseFrom(java.io.InputStream input) 1358 throws java.io.IOException { 1359 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1360 } 1361 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1362 public static com.google.cloud.iot.v1.Device parseFrom( 1363 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1364 throws java.io.IOException { 1365 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1366 PARSER, input, extensionRegistry); 1367 } 1368 parseDelimitedFrom(java.io.InputStream input)1369 public static com.google.cloud.iot.v1.Device parseDelimitedFrom(java.io.InputStream input) 1370 throws java.io.IOException { 1371 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1372 } 1373 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1374 public static com.google.cloud.iot.v1.Device parseDelimitedFrom( 1375 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1376 throws java.io.IOException { 1377 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1378 PARSER, input, extensionRegistry); 1379 } 1380 parseFrom(com.google.protobuf.CodedInputStream input)1381 public static com.google.cloud.iot.v1.Device parseFrom(com.google.protobuf.CodedInputStream input) 1382 throws java.io.IOException { 1383 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1384 } 1385 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1386 public static com.google.cloud.iot.v1.Device parseFrom( 1387 com.google.protobuf.CodedInputStream input, 1388 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1389 throws java.io.IOException { 1390 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1391 PARSER, input, extensionRegistry); 1392 } 1393 1394 @java.lang.Override newBuilderForType()1395 public Builder newBuilderForType() { 1396 return newBuilder(); 1397 } 1398 newBuilder()1399 public static Builder newBuilder() { 1400 return DEFAULT_INSTANCE.toBuilder(); 1401 } 1402 newBuilder(com.google.cloud.iot.v1.Device prototype)1403 public static Builder newBuilder(com.google.cloud.iot.v1.Device prototype) { 1404 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1405 } 1406 1407 @java.lang.Override toBuilder()1408 public Builder toBuilder() { 1409 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1410 } 1411 1412 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1413 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1414 Builder builder = new Builder(parent); 1415 return builder; 1416 } 1417 /** 1418 * 1419 * 1420 * <pre> 1421 * The device resource. 1422 * </pre> 1423 * 1424 * Protobuf type {@code google.cloud.iot.v1.Device} 1425 */ 1426 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1427 implements 1428 // @@protoc_insertion_point(builder_implements:google.cloud.iot.v1.Device) 1429 com.google.cloud.iot.v1.DeviceOrBuilder { getDescriptor()1430 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1431 return com.google.cloud.iot.v1.ResourcesProto 1432 .internal_static_google_cloud_iot_v1_Device_descriptor; 1433 } 1434 1435 @SuppressWarnings({"rawtypes"}) internalGetMapField(int number)1436 protected com.google.protobuf.MapField internalGetMapField(int number) { 1437 switch (number) { 1438 case 17: 1439 return internalGetMetadata(); 1440 default: 1441 throw new RuntimeException("Invalid map field number: " + number); 1442 } 1443 } 1444 1445 @SuppressWarnings({"rawtypes"}) internalGetMutableMapField(int number)1446 protected com.google.protobuf.MapField internalGetMutableMapField(int number) { 1447 switch (number) { 1448 case 17: 1449 return internalGetMutableMetadata(); 1450 default: 1451 throw new RuntimeException("Invalid map field number: " + number); 1452 } 1453 } 1454 1455 @java.lang.Override 1456 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1457 internalGetFieldAccessorTable() { 1458 return com.google.cloud.iot.v1.ResourcesProto 1459 .internal_static_google_cloud_iot_v1_Device_fieldAccessorTable 1460 .ensureFieldAccessorsInitialized( 1461 com.google.cloud.iot.v1.Device.class, com.google.cloud.iot.v1.Device.Builder.class); 1462 } 1463 1464 // Construct using com.google.cloud.iot.v1.Device.newBuilder() Builder()1465 private Builder() {} 1466 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1467 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1468 super(parent); 1469 } 1470 1471 @java.lang.Override clear()1472 public Builder clear() { 1473 super.clear(); 1474 bitField0_ = 0; 1475 id_ = ""; 1476 name_ = ""; 1477 numId_ = 0L; 1478 if (credentialsBuilder_ == null) { 1479 credentials_ = java.util.Collections.emptyList(); 1480 } else { 1481 credentials_ = null; 1482 credentialsBuilder_.clear(); 1483 } 1484 bitField0_ = (bitField0_ & ~0x00000008); 1485 lastHeartbeatTime_ = null; 1486 if (lastHeartbeatTimeBuilder_ != null) { 1487 lastHeartbeatTimeBuilder_.dispose(); 1488 lastHeartbeatTimeBuilder_ = null; 1489 } 1490 lastEventTime_ = null; 1491 if (lastEventTimeBuilder_ != null) { 1492 lastEventTimeBuilder_.dispose(); 1493 lastEventTimeBuilder_ = null; 1494 } 1495 lastStateTime_ = null; 1496 if (lastStateTimeBuilder_ != null) { 1497 lastStateTimeBuilder_.dispose(); 1498 lastStateTimeBuilder_ = null; 1499 } 1500 lastConfigAckTime_ = null; 1501 if (lastConfigAckTimeBuilder_ != null) { 1502 lastConfigAckTimeBuilder_.dispose(); 1503 lastConfigAckTimeBuilder_ = null; 1504 } 1505 lastConfigSendTime_ = null; 1506 if (lastConfigSendTimeBuilder_ != null) { 1507 lastConfigSendTimeBuilder_.dispose(); 1508 lastConfigSendTimeBuilder_ = null; 1509 } 1510 blocked_ = false; 1511 lastErrorTime_ = null; 1512 if (lastErrorTimeBuilder_ != null) { 1513 lastErrorTimeBuilder_.dispose(); 1514 lastErrorTimeBuilder_ = null; 1515 } 1516 lastErrorStatus_ = null; 1517 if (lastErrorStatusBuilder_ != null) { 1518 lastErrorStatusBuilder_.dispose(); 1519 lastErrorStatusBuilder_ = null; 1520 } 1521 config_ = null; 1522 if (configBuilder_ != null) { 1523 configBuilder_.dispose(); 1524 configBuilder_ = null; 1525 } 1526 state_ = null; 1527 if (stateBuilder_ != null) { 1528 stateBuilder_.dispose(); 1529 stateBuilder_ = null; 1530 } 1531 logLevel_ = 0; 1532 internalGetMutableMetadata().clear(); 1533 gatewayConfig_ = null; 1534 if (gatewayConfigBuilder_ != null) { 1535 gatewayConfigBuilder_.dispose(); 1536 gatewayConfigBuilder_ = null; 1537 } 1538 return this; 1539 } 1540 1541 @java.lang.Override getDescriptorForType()1542 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1543 return com.google.cloud.iot.v1.ResourcesProto 1544 .internal_static_google_cloud_iot_v1_Device_descriptor; 1545 } 1546 1547 @java.lang.Override getDefaultInstanceForType()1548 public com.google.cloud.iot.v1.Device getDefaultInstanceForType() { 1549 return com.google.cloud.iot.v1.Device.getDefaultInstance(); 1550 } 1551 1552 @java.lang.Override build()1553 public com.google.cloud.iot.v1.Device build() { 1554 com.google.cloud.iot.v1.Device result = buildPartial(); 1555 if (!result.isInitialized()) { 1556 throw newUninitializedMessageException(result); 1557 } 1558 return result; 1559 } 1560 1561 @java.lang.Override buildPartial()1562 public com.google.cloud.iot.v1.Device buildPartial() { 1563 com.google.cloud.iot.v1.Device result = new com.google.cloud.iot.v1.Device(this); 1564 buildPartialRepeatedFields(result); 1565 if (bitField0_ != 0) { 1566 buildPartial0(result); 1567 } 1568 onBuilt(); 1569 return result; 1570 } 1571 buildPartialRepeatedFields(com.google.cloud.iot.v1.Device result)1572 private void buildPartialRepeatedFields(com.google.cloud.iot.v1.Device result) { 1573 if (credentialsBuilder_ == null) { 1574 if (((bitField0_ & 0x00000008) != 0)) { 1575 credentials_ = java.util.Collections.unmodifiableList(credentials_); 1576 bitField0_ = (bitField0_ & ~0x00000008); 1577 } 1578 result.credentials_ = credentials_; 1579 } else { 1580 result.credentials_ = credentialsBuilder_.build(); 1581 } 1582 } 1583 buildPartial0(com.google.cloud.iot.v1.Device result)1584 private void buildPartial0(com.google.cloud.iot.v1.Device result) { 1585 int from_bitField0_ = bitField0_; 1586 if (((from_bitField0_ & 0x00000001) != 0)) { 1587 result.id_ = id_; 1588 } 1589 if (((from_bitField0_ & 0x00000002) != 0)) { 1590 result.name_ = name_; 1591 } 1592 if (((from_bitField0_ & 0x00000004) != 0)) { 1593 result.numId_ = numId_; 1594 } 1595 if (((from_bitField0_ & 0x00000010) != 0)) { 1596 result.lastHeartbeatTime_ = 1597 lastHeartbeatTimeBuilder_ == null 1598 ? lastHeartbeatTime_ 1599 : lastHeartbeatTimeBuilder_.build(); 1600 } 1601 if (((from_bitField0_ & 0x00000020) != 0)) { 1602 result.lastEventTime_ = 1603 lastEventTimeBuilder_ == null ? lastEventTime_ : lastEventTimeBuilder_.build(); 1604 } 1605 if (((from_bitField0_ & 0x00000040) != 0)) { 1606 result.lastStateTime_ = 1607 lastStateTimeBuilder_ == null ? lastStateTime_ : lastStateTimeBuilder_.build(); 1608 } 1609 if (((from_bitField0_ & 0x00000080) != 0)) { 1610 result.lastConfigAckTime_ = 1611 lastConfigAckTimeBuilder_ == null 1612 ? lastConfigAckTime_ 1613 : lastConfigAckTimeBuilder_.build(); 1614 } 1615 if (((from_bitField0_ & 0x00000100) != 0)) { 1616 result.lastConfigSendTime_ = 1617 lastConfigSendTimeBuilder_ == null 1618 ? lastConfigSendTime_ 1619 : lastConfigSendTimeBuilder_.build(); 1620 } 1621 if (((from_bitField0_ & 0x00000200) != 0)) { 1622 result.blocked_ = blocked_; 1623 } 1624 if (((from_bitField0_ & 0x00000400) != 0)) { 1625 result.lastErrorTime_ = 1626 lastErrorTimeBuilder_ == null ? lastErrorTime_ : lastErrorTimeBuilder_.build(); 1627 } 1628 if (((from_bitField0_ & 0x00000800) != 0)) { 1629 result.lastErrorStatus_ = 1630 lastErrorStatusBuilder_ == null ? lastErrorStatus_ : lastErrorStatusBuilder_.build(); 1631 } 1632 if (((from_bitField0_ & 0x00001000) != 0)) { 1633 result.config_ = configBuilder_ == null ? config_ : configBuilder_.build(); 1634 } 1635 if (((from_bitField0_ & 0x00002000) != 0)) { 1636 result.state_ = stateBuilder_ == null ? state_ : stateBuilder_.build(); 1637 } 1638 if (((from_bitField0_ & 0x00004000) != 0)) { 1639 result.logLevel_ = logLevel_; 1640 } 1641 if (((from_bitField0_ & 0x00008000) != 0)) { 1642 result.metadata_ = internalGetMetadata(); 1643 result.metadata_.makeImmutable(); 1644 } 1645 if (((from_bitField0_ & 0x00010000) != 0)) { 1646 result.gatewayConfig_ = 1647 gatewayConfigBuilder_ == null ? gatewayConfig_ : gatewayConfigBuilder_.build(); 1648 } 1649 } 1650 1651 @java.lang.Override clone()1652 public Builder clone() { 1653 return super.clone(); 1654 } 1655 1656 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1657 public Builder setField( 1658 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1659 return super.setField(field, value); 1660 } 1661 1662 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1663 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1664 return super.clearField(field); 1665 } 1666 1667 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1668 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1669 return super.clearOneof(oneof); 1670 } 1671 1672 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1673 public Builder setRepeatedField( 1674 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1675 return super.setRepeatedField(field, index, value); 1676 } 1677 1678 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1679 public Builder addRepeatedField( 1680 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1681 return super.addRepeatedField(field, value); 1682 } 1683 1684 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1685 public Builder mergeFrom(com.google.protobuf.Message other) { 1686 if (other instanceof com.google.cloud.iot.v1.Device) { 1687 return mergeFrom((com.google.cloud.iot.v1.Device) other); 1688 } else { 1689 super.mergeFrom(other); 1690 return this; 1691 } 1692 } 1693 mergeFrom(com.google.cloud.iot.v1.Device other)1694 public Builder mergeFrom(com.google.cloud.iot.v1.Device other) { 1695 if (other == com.google.cloud.iot.v1.Device.getDefaultInstance()) return this; 1696 if (!other.getId().isEmpty()) { 1697 id_ = other.id_; 1698 bitField0_ |= 0x00000001; 1699 onChanged(); 1700 } 1701 if (!other.getName().isEmpty()) { 1702 name_ = other.name_; 1703 bitField0_ |= 0x00000002; 1704 onChanged(); 1705 } 1706 if (other.getNumId() != 0L) { 1707 setNumId(other.getNumId()); 1708 } 1709 if (credentialsBuilder_ == null) { 1710 if (!other.credentials_.isEmpty()) { 1711 if (credentials_.isEmpty()) { 1712 credentials_ = other.credentials_; 1713 bitField0_ = (bitField0_ & ~0x00000008); 1714 } else { 1715 ensureCredentialsIsMutable(); 1716 credentials_.addAll(other.credentials_); 1717 } 1718 onChanged(); 1719 } 1720 } else { 1721 if (!other.credentials_.isEmpty()) { 1722 if (credentialsBuilder_.isEmpty()) { 1723 credentialsBuilder_.dispose(); 1724 credentialsBuilder_ = null; 1725 credentials_ = other.credentials_; 1726 bitField0_ = (bitField0_ & ~0x00000008); 1727 credentialsBuilder_ = 1728 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1729 ? getCredentialsFieldBuilder() 1730 : null; 1731 } else { 1732 credentialsBuilder_.addAllMessages(other.credentials_); 1733 } 1734 } 1735 } 1736 if (other.hasLastHeartbeatTime()) { 1737 mergeLastHeartbeatTime(other.getLastHeartbeatTime()); 1738 } 1739 if (other.hasLastEventTime()) { 1740 mergeLastEventTime(other.getLastEventTime()); 1741 } 1742 if (other.hasLastStateTime()) { 1743 mergeLastStateTime(other.getLastStateTime()); 1744 } 1745 if (other.hasLastConfigAckTime()) { 1746 mergeLastConfigAckTime(other.getLastConfigAckTime()); 1747 } 1748 if (other.hasLastConfigSendTime()) { 1749 mergeLastConfigSendTime(other.getLastConfigSendTime()); 1750 } 1751 if (other.getBlocked() != false) { 1752 setBlocked(other.getBlocked()); 1753 } 1754 if (other.hasLastErrorTime()) { 1755 mergeLastErrorTime(other.getLastErrorTime()); 1756 } 1757 if (other.hasLastErrorStatus()) { 1758 mergeLastErrorStatus(other.getLastErrorStatus()); 1759 } 1760 if (other.hasConfig()) { 1761 mergeConfig(other.getConfig()); 1762 } 1763 if (other.hasState()) { 1764 mergeState(other.getState()); 1765 } 1766 if (other.logLevel_ != 0) { 1767 setLogLevelValue(other.getLogLevelValue()); 1768 } 1769 internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); 1770 bitField0_ |= 0x00008000; 1771 if (other.hasGatewayConfig()) { 1772 mergeGatewayConfig(other.getGatewayConfig()); 1773 } 1774 this.mergeUnknownFields(other.getUnknownFields()); 1775 onChanged(); 1776 return this; 1777 } 1778 1779 @java.lang.Override isInitialized()1780 public final boolean isInitialized() { 1781 return true; 1782 } 1783 1784 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1785 public Builder mergeFrom( 1786 com.google.protobuf.CodedInputStream input, 1787 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1788 throws java.io.IOException { 1789 if (extensionRegistry == null) { 1790 throw new java.lang.NullPointerException(); 1791 } 1792 try { 1793 boolean done = false; 1794 while (!done) { 1795 int tag = input.readTag(); 1796 switch (tag) { 1797 case 0: 1798 done = true; 1799 break; 1800 case 10: 1801 { 1802 id_ = input.readStringRequireUtf8(); 1803 bitField0_ |= 0x00000001; 1804 break; 1805 } // case 10 1806 case 18: 1807 { 1808 name_ = input.readStringRequireUtf8(); 1809 bitField0_ |= 0x00000002; 1810 break; 1811 } // case 18 1812 case 24: 1813 { 1814 numId_ = input.readUInt64(); 1815 bitField0_ |= 0x00000004; 1816 break; 1817 } // case 24 1818 case 58: 1819 { 1820 input.readMessage( 1821 getLastHeartbeatTimeFieldBuilder().getBuilder(), extensionRegistry); 1822 bitField0_ |= 0x00000010; 1823 break; 1824 } // case 58 1825 case 66: 1826 { 1827 input.readMessage(getLastEventTimeFieldBuilder().getBuilder(), extensionRegistry); 1828 bitField0_ |= 0x00000020; 1829 break; 1830 } // case 66 1831 case 82: 1832 { 1833 input.readMessage(getLastErrorTimeFieldBuilder().getBuilder(), extensionRegistry); 1834 bitField0_ |= 0x00000400; 1835 break; 1836 } // case 82 1837 case 90: 1838 { 1839 input.readMessage(getLastErrorStatusFieldBuilder().getBuilder(), extensionRegistry); 1840 bitField0_ |= 0x00000800; 1841 break; 1842 } // case 90 1843 case 98: 1844 { 1845 com.google.cloud.iot.v1.DeviceCredential m = 1846 input.readMessage( 1847 com.google.cloud.iot.v1.DeviceCredential.parser(), extensionRegistry); 1848 if (credentialsBuilder_ == null) { 1849 ensureCredentialsIsMutable(); 1850 credentials_.add(m); 1851 } else { 1852 credentialsBuilder_.addMessage(m); 1853 } 1854 break; 1855 } // case 98 1856 case 106: 1857 { 1858 input.readMessage(getConfigFieldBuilder().getBuilder(), extensionRegistry); 1859 bitField0_ |= 0x00001000; 1860 break; 1861 } // case 106 1862 case 114: 1863 { 1864 input.readMessage( 1865 getLastConfigAckTimeFieldBuilder().getBuilder(), extensionRegistry); 1866 bitField0_ |= 0x00000080; 1867 break; 1868 } // case 114 1869 case 130: 1870 { 1871 input.readMessage(getStateFieldBuilder().getBuilder(), extensionRegistry); 1872 bitField0_ |= 0x00002000; 1873 break; 1874 } // case 130 1875 case 138: 1876 { 1877 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> metadata__ = 1878 input.readMessage( 1879 MetadataDefaultEntryHolder.defaultEntry.getParserForType(), 1880 extensionRegistry); 1881 internalGetMutableMetadata() 1882 .getMutableMap() 1883 .put(metadata__.getKey(), metadata__.getValue()); 1884 bitField0_ |= 0x00008000; 1885 break; 1886 } // case 138 1887 case 146: 1888 { 1889 input.readMessage( 1890 getLastConfigSendTimeFieldBuilder().getBuilder(), extensionRegistry); 1891 bitField0_ |= 0x00000100; 1892 break; 1893 } // case 146 1894 case 152: 1895 { 1896 blocked_ = input.readBool(); 1897 bitField0_ |= 0x00000200; 1898 break; 1899 } // case 152 1900 case 162: 1901 { 1902 input.readMessage(getLastStateTimeFieldBuilder().getBuilder(), extensionRegistry); 1903 bitField0_ |= 0x00000040; 1904 break; 1905 } // case 162 1906 case 168: 1907 { 1908 logLevel_ = input.readEnum(); 1909 bitField0_ |= 0x00004000; 1910 break; 1911 } // case 168 1912 case 194: 1913 { 1914 input.readMessage(getGatewayConfigFieldBuilder().getBuilder(), extensionRegistry); 1915 bitField0_ |= 0x00010000; 1916 break; 1917 } // case 194 1918 default: 1919 { 1920 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1921 done = true; // was an endgroup tag 1922 } 1923 break; 1924 } // default: 1925 } // switch (tag) 1926 } // while (!done) 1927 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1928 throw e.unwrapIOException(); 1929 } finally { 1930 onChanged(); 1931 } // finally 1932 return this; 1933 } 1934 1935 private int bitField0_; 1936 1937 private java.lang.Object id_ = ""; 1938 /** 1939 * 1940 * 1941 * <pre> 1942 * The user-defined device identifier. The device ID must be unique 1943 * within a device registry. 1944 * </pre> 1945 * 1946 * <code>string id = 1;</code> 1947 * 1948 * @return The id. 1949 */ getId()1950 public java.lang.String getId() { 1951 java.lang.Object ref = id_; 1952 if (!(ref instanceof java.lang.String)) { 1953 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1954 java.lang.String s = bs.toStringUtf8(); 1955 id_ = s; 1956 return s; 1957 } else { 1958 return (java.lang.String) ref; 1959 } 1960 } 1961 /** 1962 * 1963 * 1964 * <pre> 1965 * The user-defined device identifier. The device ID must be unique 1966 * within a device registry. 1967 * </pre> 1968 * 1969 * <code>string id = 1;</code> 1970 * 1971 * @return The bytes for id. 1972 */ getIdBytes()1973 public com.google.protobuf.ByteString getIdBytes() { 1974 java.lang.Object ref = id_; 1975 if (ref instanceof String) { 1976 com.google.protobuf.ByteString b = 1977 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1978 id_ = b; 1979 return b; 1980 } else { 1981 return (com.google.protobuf.ByteString) ref; 1982 } 1983 } 1984 /** 1985 * 1986 * 1987 * <pre> 1988 * The user-defined device identifier. The device ID must be unique 1989 * within a device registry. 1990 * </pre> 1991 * 1992 * <code>string id = 1;</code> 1993 * 1994 * @param value The id to set. 1995 * @return This builder for chaining. 1996 */ setId(java.lang.String value)1997 public Builder setId(java.lang.String value) { 1998 if (value == null) { 1999 throw new NullPointerException(); 2000 } 2001 id_ = value; 2002 bitField0_ |= 0x00000001; 2003 onChanged(); 2004 return this; 2005 } 2006 /** 2007 * 2008 * 2009 * <pre> 2010 * The user-defined device identifier. The device ID must be unique 2011 * within a device registry. 2012 * </pre> 2013 * 2014 * <code>string id = 1;</code> 2015 * 2016 * @return This builder for chaining. 2017 */ clearId()2018 public Builder clearId() { 2019 id_ = getDefaultInstance().getId(); 2020 bitField0_ = (bitField0_ & ~0x00000001); 2021 onChanged(); 2022 return this; 2023 } 2024 /** 2025 * 2026 * 2027 * <pre> 2028 * The user-defined device identifier. The device ID must be unique 2029 * within a device registry. 2030 * </pre> 2031 * 2032 * <code>string id = 1;</code> 2033 * 2034 * @param value The bytes for id to set. 2035 * @return This builder for chaining. 2036 */ setIdBytes(com.google.protobuf.ByteString value)2037 public Builder setIdBytes(com.google.protobuf.ByteString value) { 2038 if (value == null) { 2039 throw new NullPointerException(); 2040 } 2041 checkByteStringIsUtf8(value); 2042 id_ = value; 2043 bitField0_ |= 0x00000001; 2044 onChanged(); 2045 return this; 2046 } 2047 2048 private java.lang.Object name_ = ""; 2049 /** 2050 * 2051 * 2052 * <pre> 2053 * The resource path name. For example, 2054 * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or 2055 * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. 2056 * When `name` is populated as a response from the service, it always ends 2057 * in the device numeric ID. 2058 * </pre> 2059 * 2060 * <code>string name = 2;</code> 2061 * 2062 * @return The name. 2063 */ getName()2064 public java.lang.String getName() { 2065 java.lang.Object ref = name_; 2066 if (!(ref instanceof java.lang.String)) { 2067 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2068 java.lang.String s = bs.toStringUtf8(); 2069 name_ = s; 2070 return s; 2071 } else { 2072 return (java.lang.String) ref; 2073 } 2074 } 2075 /** 2076 * 2077 * 2078 * <pre> 2079 * The resource path name. For example, 2080 * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or 2081 * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. 2082 * When `name` is populated as a response from the service, it always ends 2083 * in the device numeric ID. 2084 * </pre> 2085 * 2086 * <code>string name = 2;</code> 2087 * 2088 * @return The bytes for name. 2089 */ getNameBytes()2090 public com.google.protobuf.ByteString getNameBytes() { 2091 java.lang.Object ref = name_; 2092 if (ref instanceof String) { 2093 com.google.protobuf.ByteString b = 2094 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2095 name_ = b; 2096 return b; 2097 } else { 2098 return (com.google.protobuf.ByteString) ref; 2099 } 2100 } 2101 /** 2102 * 2103 * 2104 * <pre> 2105 * The resource path name. For example, 2106 * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or 2107 * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. 2108 * When `name` is populated as a response from the service, it always ends 2109 * in the device numeric ID. 2110 * </pre> 2111 * 2112 * <code>string name = 2;</code> 2113 * 2114 * @param value The name to set. 2115 * @return This builder for chaining. 2116 */ setName(java.lang.String value)2117 public Builder setName(java.lang.String value) { 2118 if (value == null) { 2119 throw new NullPointerException(); 2120 } 2121 name_ = value; 2122 bitField0_ |= 0x00000002; 2123 onChanged(); 2124 return this; 2125 } 2126 /** 2127 * 2128 * 2129 * <pre> 2130 * The resource path name. For example, 2131 * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or 2132 * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. 2133 * When `name` is populated as a response from the service, it always ends 2134 * in the device numeric ID. 2135 * </pre> 2136 * 2137 * <code>string name = 2;</code> 2138 * 2139 * @return This builder for chaining. 2140 */ clearName()2141 public Builder clearName() { 2142 name_ = getDefaultInstance().getName(); 2143 bitField0_ = (bitField0_ & ~0x00000002); 2144 onChanged(); 2145 return this; 2146 } 2147 /** 2148 * 2149 * 2150 * <pre> 2151 * The resource path name. For example, 2152 * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or 2153 * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. 2154 * When `name` is populated as a response from the service, it always ends 2155 * in the device numeric ID. 2156 * </pre> 2157 * 2158 * <code>string name = 2;</code> 2159 * 2160 * @param value The bytes for name to set. 2161 * @return This builder for chaining. 2162 */ setNameBytes(com.google.protobuf.ByteString value)2163 public Builder setNameBytes(com.google.protobuf.ByteString value) { 2164 if (value == null) { 2165 throw new NullPointerException(); 2166 } 2167 checkByteStringIsUtf8(value); 2168 name_ = value; 2169 bitField0_ |= 0x00000002; 2170 onChanged(); 2171 return this; 2172 } 2173 2174 private long numId_; 2175 /** 2176 * 2177 * 2178 * <pre> 2179 * [Output only] A server-defined unique numeric ID for the device. This is a 2180 * more compact way to identify devices, and it is globally unique. 2181 * </pre> 2182 * 2183 * <code>uint64 num_id = 3;</code> 2184 * 2185 * @return The numId. 2186 */ 2187 @java.lang.Override getNumId()2188 public long getNumId() { 2189 return numId_; 2190 } 2191 /** 2192 * 2193 * 2194 * <pre> 2195 * [Output only] A server-defined unique numeric ID for the device. This is a 2196 * more compact way to identify devices, and it is globally unique. 2197 * </pre> 2198 * 2199 * <code>uint64 num_id = 3;</code> 2200 * 2201 * @param value The numId to set. 2202 * @return This builder for chaining. 2203 */ setNumId(long value)2204 public Builder setNumId(long value) { 2205 2206 numId_ = value; 2207 bitField0_ |= 0x00000004; 2208 onChanged(); 2209 return this; 2210 } 2211 /** 2212 * 2213 * 2214 * <pre> 2215 * [Output only] A server-defined unique numeric ID for the device. This is a 2216 * more compact way to identify devices, and it is globally unique. 2217 * </pre> 2218 * 2219 * <code>uint64 num_id = 3;</code> 2220 * 2221 * @return This builder for chaining. 2222 */ clearNumId()2223 public Builder clearNumId() { 2224 bitField0_ = (bitField0_ & ~0x00000004); 2225 numId_ = 0L; 2226 onChanged(); 2227 return this; 2228 } 2229 2230 private java.util.List<com.google.cloud.iot.v1.DeviceCredential> credentials_ = 2231 java.util.Collections.emptyList(); 2232 ensureCredentialsIsMutable()2233 private void ensureCredentialsIsMutable() { 2234 if (!((bitField0_ & 0x00000008) != 0)) { 2235 credentials_ = 2236 new java.util.ArrayList<com.google.cloud.iot.v1.DeviceCredential>(credentials_); 2237 bitField0_ |= 0x00000008; 2238 } 2239 } 2240 2241 private com.google.protobuf.RepeatedFieldBuilderV3< 2242 com.google.cloud.iot.v1.DeviceCredential, 2243 com.google.cloud.iot.v1.DeviceCredential.Builder, 2244 com.google.cloud.iot.v1.DeviceCredentialOrBuilder> 2245 credentialsBuilder_; 2246 2247 /** 2248 * 2249 * 2250 * <pre> 2251 * The credentials used to authenticate this device. To allow credential 2252 * rotation without interruption, multiple device credentials can be bound to 2253 * this device. No more than 3 credentials can be bound to a single device at 2254 * a time. When new credentials are added to a device, they are verified 2255 * against the registry credentials. For details, see the description of the 2256 * `DeviceRegistry.credentials` field. 2257 * </pre> 2258 * 2259 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2260 */ getCredentialsList()2261 public java.util.List<com.google.cloud.iot.v1.DeviceCredential> getCredentialsList() { 2262 if (credentialsBuilder_ == null) { 2263 return java.util.Collections.unmodifiableList(credentials_); 2264 } else { 2265 return credentialsBuilder_.getMessageList(); 2266 } 2267 } 2268 /** 2269 * 2270 * 2271 * <pre> 2272 * The credentials used to authenticate this device. To allow credential 2273 * rotation without interruption, multiple device credentials can be bound to 2274 * this device. No more than 3 credentials can be bound to a single device at 2275 * a time. When new credentials are added to a device, they are verified 2276 * against the registry credentials. For details, see the description of the 2277 * `DeviceRegistry.credentials` field. 2278 * </pre> 2279 * 2280 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2281 */ getCredentialsCount()2282 public int getCredentialsCount() { 2283 if (credentialsBuilder_ == null) { 2284 return credentials_.size(); 2285 } else { 2286 return credentialsBuilder_.getCount(); 2287 } 2288 } 2289 /** 2290 * 2291 * 2292 * <pre> 2293 * The credentials used to authenticate this device. To allow credential 2294 * rotation without interruption, multiple device credentials can be bound to 2295 * this device. No more than 3 credentials can be bound to a single device at 2296 * a time. When new credentials are added to a device, they are verified 2297 * against the registry credentials. For details, see the description of the 2298 * `DeviceRegistry.credentials` field. 2299 * </pre> 2300 * 2301 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2302 */ getCredentials(int index)2303 public com.google.cloud.iot.v1.DeviceCredential getCredentials(int index) { 2304 if (credentialsBuilder_ == null) { 2305 return credentials_.get(index); 2306 } else { 2307 return credentialsBuilder_.getMessage(index); 2308 } 2309 } 2310 /** 2311 * 2312 * 2313 * <pre> 2314 * The credentials used to authenticate this device. To allow credential 2315 * rotation without interruption, multiple device credentials can be bound to 2316 * this device. No more than 3 credentials can be bound to a single device at 2317 * a time. When new credentials are added to a device, they are verified 2318 * against the registry credentials. For details, see the description of the 2319 * `DeviceRegistry.credentials` field. 2320 * </pre> 2321 * 2322 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2323 */ setCredentials(int index, com.google.cloud.iot.v1.DeviceCredential value)2324 public Builder setCredentials(int index, com.google.cloud.iot.v1.DeviceCredential value) { 2325 if (credentialsBuilder_ == null) { 2326 if (value == null) { 2327 throw new NullPointerException(); 2328 } 2329 ensureCredentialsIsMutable(); 2330 credentials_.set(index, value); 2331 onChanged(); 2332 } else { 2333 credentialsBuilder_.setMessage(index, value); 2334 } 2335 return this; 2336 } 2337 /** 2338 * 2339 * 2340 * <pre> 2341 * The credentials used to authenticate this device. To allow credential 2342 * rotation without interruption, multiple device credentials can be bound to 2343 * this device. No more than 3 credentials can be bound to a single device at 2344 * a time. When new credentials are added to a device, they are verified 2345 * against the registry credentials. For details, see the description of the 2346 * `DeviceRegistry.credentials` field. 2347 * </pre> 2348 * 2349 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2350 */ setCredentials( int index, com.google.cloud.iot.v1.DeviceCredential.Builder builderForValue)2351 public Builder setCredentials( 2352 int index, com.google.cloud.iot.v1.DeviceCredential.Builder builderForValue) { 2353 if (credentialsBuilder_ == null) { 2354 ensureCredentialsIsMutable(); 2355 credentials_.set(index, builderForValue.build()); 2356 onChanged(); 2357 } else { 2358 credentialsBuilder_.setMessage(index, builderForValue.build()); 2359 } 2360 return this; 2361 } 2362 /** 2363 * 2364 * 2365 * <pre> 2366 * The credentials used to authenticate this device. To allow credential 2367 * rotation without interruption, multiple device credentials can be bound to 2368 * this device. No more than 3 credentials can be bound to a single device at 2369 * a time. When new credentials are added to a device, they are verified 2370 * against the registry credentials. For details, see the description of the 2371 * `DeviceRegistry.credentials` field. 2372 * </pre> 2373 * 2374 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2375 */ addCredentials(com.google.cloud.iot.v1.DeviceCredential value)2376 public Builder addCredentials(com.google.cloud.iot.v1.DeviceCredential value) { 2377 if (credentialsBuilder_ == null) { 2378 if (value == null) { 2379 throw new NullPointerException(); 2380 } 2381 ensureCredentialsIsMutable(); 2382 credentials_.add(value); 2383 onChanged(); 2384 } else { 2385 credentialsBuilder_.addMessage(value); 2386 } 2387 return this; 2388 } 2389 /** 2390 * 2391 * 2392 * <pre> 2393 * The credentials used to authenticate this device. To allow credential 2394 * rotation without interruption, multiple device credentials can be bound to 2395 * this device. No more than 3 credentials can be bound to a single device at 2396 * a time. When new credentials are added to a device, they are verified 2397 * against the registry credentials. For details, see the description of the 2398 * `DeviceRegistry.credentials` field. 2399 * </pre> 2400 * 2401 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2402 */ addCredentials(int index, com.google.cloud.iot.v1.DeviceCredential value)2403 public Builder addCredentials(int index, com.google.cloud.iot.v1.DeviceCredential value) { 2404 if (credentialsBuilder_ == null) { 2405 if (value == null) { 2406 throw new NullPointerException(); 2407 } 2408 ensureCredentialsIsMutable(); 2409 credentials_.add(index, value); 2410 onChanged(); 2411 } else { 2412 credentialsBuilder_.addMessage(index, value); 2413 } 2414 return this; 2415 } 2416 /** 2417 * 2418 * 2419 * <pre> 2420 * The credentials used to authenticate this device. To allow credential 2421 * rotation without interruption, multiple device credentials can be bound to 2422 * this device. No more than 3 credentials can be bound to a single device at 2423 * a time. When new credentials are added to a device, they are verified 2424 * against the registry credentials. For details, see the description of the 2425 * `DeviceRegistry.credentials` field. 2426 * </pre> 2427 * 2428 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2429 */ addCredentials( com.google.cloud.iot.v1.DeviceCredential.Builder builderForValue)2430 public Builder addCredentials( 2431 com.google.cloud.iot.v1.DeviceCredential.Builder builderForValue) { 2432 if (credentialsBuilder_ == null) { 2433 ensureCredentialsIsMutable(); 2434 credentials_.add(builderForValue.build()); 2435 onChanged(); 2436 } else { 2437 credentialsBuilder_.addMessage(builderForValue.build()); 2438 } 2439 return this; 2440 } 2441 /** 2442 * 2443 * 2444 * <pre> 2445 * The credentials used to authenticate this device. To allow credential 2446 * rotation without interruption, multiple device credentials can be bound to 2447 * this device. No more than 3 credentials can be bound to a single device at 2448 * a time. When new credentials are added to a device, they are verified 2449 * against the registry credentials. For details, see the description of the 2450 * `DeviceRegistry.credentials` field. 2451 * </pre> 2452 * 2453 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2454 */ addCredentials( int index, com.google.cloud.iot.v1.DeviceCredential.Builder builderForValue)2455 public Builder addCredentials( 2456 int index, com.google.cloud.iot.v1.DeviceCredential.Builder builderForValue) { 2457 if (credentialsBuilder_ == null) { 2458 ensureCredentialsIsMutable(); 2459 credentials_.add(index, builderForValue.build()); 2460 onChanged(); 2461 } else { 2462 credentialsBuilder_.addMessage(index, builderForValue.build()); 2463 } 2464 return this; 2465 } 2466 /** 2467 * 2468 * 2469 * <pre> 2470 * The credentials used to authenticate this device. To allow credential 2471 * rotation without interruption, multiple device credentials can be bound to 2472 * this device. No more than 3 credentials can be bound to a single device at 2473 * a time. When new credentials are added to a device, they are verified 2474 * against the registry credentials. For details, see the description of the 2475 * `DeviceRegistry.credentials` field. 2476 * </pre> 2477 * 2478 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2479 */ addAllCredentials( java.lang.Iterable<? extends com.google.cloud.iot.v1.DeviceCredential> values)2480 public Builder addAllCredentials( 2481 java.lang.Iterable<? extends com.google.cloud.iot.v1.DeviceCredential> values) { 2482 if (credentialsBuilder_ == null) { 2483 ensureCredentialsIsMutable(); 2484 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, credentials_); 2485 onChanged(); 2486 } else { 2487 credentialsBuilder_.addAllMessages(values); 2488 } 2489 return this; 2490 } 2491 /** 2492 * 2493 * 2494 * <pre> 2495 * The credentials used to authenticate this device. To allow credential 2496 * rotation without interruption, multiple device credentials can be bound to 2497 * this device. No more than 3 credentials can be bound to a single device at 2498 * a time. When new credentials are added to a device, they are verified 2499 * against the registry credentials. For details, see the description of the 2500 * `DeviceRegistry.credentials` field. 2501 * </pre> 2502 * 2503 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2504 */ clearCredentials()2505 public Builder clearCredentials() { 2506 if (credentialsBuilder_ == null) { 2507 credentials_ = java.util.Collections.emptyList(); 2508 bitField0_ = (bitField0_ & ~0x00000008); 2509 onChanged(); 2510 } else { 2511 credentialsBuilder_.clear(); 2512 } 2513 return this; 2514 } 2515 /** 2516 * 2517 * 2518 * <pre> 2519 * The credentials used to authenticate this device. To allow credential 2520 * rotation without interruption, multiple device credentials can be bound to 2521 * this device. No more than 3 credentials can be bound to a single device at 2522 * a time. When new credentials are added to a device, they are verified 2523 * against the registry credentials. For details, see the description of the 2524 * `DeviceRegistry.credentials` field. 2525 * </pre> 2526 * 2527 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2528 */ removeCredentials(int index)2529 public Builder removeCredentials(int index) { 2530 if (credentialsBuilder_ == null) { 2531 ensureCredentialsIsMutable(); 2532 credentials_.remove(index); 2533 onChanged(); 2534 } else { 2535 credentialsBuilder_.remove(index); 2536 } 2537 return this; 2538 } 2539 /** 2540 * 2541 * 2542 * <pre> 2543 * The credentials used to authenticate this device. To allow credential 2544 * rotation without interruption, multiple device credentials can be bound to 2545 * this device. No more than 3 credentials can be bound to a single device at 2546 * a time. When new credentials are added to a device, they are verified 2547 * against the registry credentials. For details, see the description of the 2548 * `DeviceRegistry.credentials` field. 2549 * </pre> 2550 * 2551 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2552 */ getCredentialsBuilder(int index)2553 public com.google.cloud.iot.v1.DeviceCredential.Builder getCredentialsBuilder(int index) { 2554 return getCredentialsFieldBuilder().getBuilder(index); 2555 } 2556 /** 2557 * 2558 * 2559 * <pre> 2560 * The credentials used to authenticate this device. To allow credential 2561 * rotation without interruption, multiple device credentials can be bound to 2562 * this device. No more than 3 credentials can be bound to a single device at 2563 * a time. When new credentials are added to a device, they are verified 2564 * against the registry credentials. For details, see the description of the 2565 * `DeviceRegistry.credentials` field. 2566 * </pre> 2567 * 2568 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2569 */ getCredentialsOrBuilder(int index)2570 public com.google.cloud.iot.v1.DeviceCredentialOrBuilder getCredentialsOrBuilder(int index) { 2571 if (credentialsBuilder_ == null) { 2572 return credentials_.get(index); 2573 } else { 2574 return credentialsBuilder_.getMessageOrBuilder(index); 2575 } 2576 } 2577 /** 2578 * 2579 * 2580 * <pre> 2581 * The credentials used to authenticate this device. To allow credential 2582 * rotation without interruption, multiple device credentials can be bound to 2583 * this device. No more than 3 credentials can be bound to a single device at 2584 * a time. When new credentials are added to a device, they are verified 2585 * against the registry credentials. For details, see the description of the 2586 * `DeviceRegistry.credentials` field. 2587 * </pre> 2588 * 2589 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2590 */ 2591 public java.util.List<? extends com.google.cloud.iot.v1.DeviceCredentialOrBuilder> getCredentialsOrBuilderList()2592 getCredentialsOrBuilderList() { 2593 if (credentialsBuilder_ != null) { 2594 return credentialsBuilder_.getMessageOrBuilderList(); 2595 } else { 2596 return java.util.Collections.unmodifiableList(credentials_); 2597 } 2598 } 2599 /** 2600 * 2601 * 2602 * <pre> 2603 * The credentials used to authenticate this device. To allow credential 2604 * rotation without interruption, multiple device credentials can be bound to 2605 * this device. No more than 3 credentials can be bound to a single device at 2606 * a time. When new credentials are added to a device, they are verified 2607 * against the registry credentials. For details, see the description of the 2608 * `DeviceRegistry.credentials` field. 2609 * </pre> 2610 * 2611 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2612 */ addCredentialsBuilder()2613 public com.google.cloud.iot.v1.DeviceCredential.Builder addCredentialsBuilder() { 2614 return getCredentialsFieldBuilder() 2615 .addBuilder(com.google.cloud.iot.v1.DeviceCredential.getDefaultInstance()); 2616 } 2617 /** 2618 * 2619 * 2620 * <pre> 2621 * The credentials used to authenticate this device. To allow credential 2622 * rotation without interruption, multiple device credentials can be bound to 2623 * this device. No more than 3 credentials can be bound to a single device at 2624 * a time. When new credentials are added to a device, they are verified 2625 * against the registry credentials. For details, see the description of the 2626 * `DeviceRegistry.credentials` field. 2627 * </pre> 2628 * 2629 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2630 */ addCredentialsBuilder(int index)2631 public com.google.cloud.iot.v1.DeviceCredential.Builder addCredentialsBuilder(int index) { 2632 return getCredentialsFieldBuilder() 2633 .addBuilder(index, com.google.cloud.iot.v1.DeviceCredential.getDefaultInstance()); 2634 } 2635 /** 2636 * 2637 * 2638 * <pre> 2639 * The credentials used to authenticate this device. To allow credential 2640 * rotation without interruption, multiple device credentials can be bound to 2641 * this device. No more than 3 credentials can be bound to a single device at 2642 * a time. When new credentials are added to a device, they are verified 2643 * against the registry credentials. For details, see the description of the 2644 * `DeviceRegistry.credentials` field. 2645 * </pre> 2646 * 2647 * <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code> 2648 */ 2649 public java.util.List<com.google.cloud.iot.v1.DeviceCredential.Builder> getCredentialsBuilderList()2650 getCredentialsBuilderList() { 2651 return getCredentialsFieldBuilder().getBuilderList(); 2652 } 2653 2654 private com.google.protobuf.RepeatedFieldBuilderV3< 2655 com.google.cloud.iot.v1.DeviceCredential, 2656 com.google.cloud.iot.v1.DeviceCredential.Builder, 2657 com.google.cloud.iot.v1.DeviceCredentialOrBuilder> getCredentialsFieldBuilder()2658 getCredentialsFieldBuilder() { 2659 if (credentialsBuilder_ == null) { 2660 credentialsBuilder_ = 2661 new com.google.protobuf.RepeatedFieldBuilderV3< 2662 com.google.cloud.iot.v1.DeviceCredential, 2663 com.google.cloud.iot.v1.DeviceCredential.Builder, 2664 com.google.cloud.iot.v1.DeviceCredentialOrBuilder>( 2665 credentials_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); 2666 credentials_ = null; 2667 } 2668 return credentialsBuilder_; 2669 } 2670 2671 private com.google.protobuf.Timestamp lastHeartbeatTime_; 2672 private com.google.protobuf.SingleFieldBuilderV3< 2673 com.google.protobuf.Timestamp, 2674 com.google.protobuf.Timestamp.Builder, 2675 com.google.protobuf.TimestampOrBuilder> 2676 lastHeartbeatTimeBuilder_; 2677 /** 2678 * 2679 * 2680 * <pre> 2681 * [Output only] The last time an MQTT `PINGREQ` was received. This field 2682 * applies only to devices connecting through MQTT. MQTT clients usually only 2683 * send `PINGREQ` messages if the connection is idle, and no other messages 2684 * have been sent. Timestamps are periodically collected and written to 2685 * storage; they may be stale by a few minutes. 2686 * </pre> 2687 * 2688 * <code>.google.protobuf.Timestamp last_heartbeat_time = 7;</code> 2689 * 2690 * @return Whether the lastHeartbeatTime field is set. 2691 */ hasLastHeartbeatTime()2692 public boolean hasLastHeartbeatTime() { 2693 return ((bitField0_ & 0x00000010) != 0); 2694 } 2695 /** 2696 * 2697 * 2698 * <pre> 2699 * [Output only] The last time an MQTT `PINGREQ` was received. This field 2700 * applies only to devices connecting through MQTT. MQTT clients usually only 2701 * send `PINGREQ` messages if the connection is idle, and no other messages 2702 * have been sent. Timestamps are periodically collected and written to 2703 * storage; they may be stale by a few minutes. 2704 * </pre> 2705 * 2706 * <code>.google.protobuf.Timestamp last_heartbeat_time = 7;</code> 2707 * 2708 * @return The lastHeartbeatTime. 2709 */ getLastHeartbeatTime()2710 public com.google.protobuf.Timestamp getLastHeartbeatTime() { 2711 if (lastHeartbeatTimeBuilder_ == null) { 2712 return lastHeartbeatTime_ == null 2713 ? com.google.protobuf.Timestamp.getDefaultInstance() 2714 : lastHeartbeatTime_; 2715 } else { 2716 return lastHeartbeatTimeBuilder_.getMessage(); 2717 } 2718 } 2719 /** 2720 * 2721 * 2722 * <pre> 2723 * [Output only] The last time an MQTT `PINGREQ` was received. This field 2724 * applies only to devices connecting through MQTT. MQTT clients usually only 2725 * send `PINGREQ` messages if the connection is idle, and no other messages 2726 * have been sent. Timestamps are periodically collected and written to 2727 * storage; they may be stale by a few minutes. 2728 * </pre> 2729 * 2730 * <code>.google.protobuf.Timestamp last_heartbeat_time = 7;</code> 2731 */ setLastHeartbeatTime(com.google.protobuf.Timestamp value)2732 public Builder setLastHeartbeatTime(com.google.protobuf.Timestamp value) { 2733 if (lastHeartbeatTimeBuilder_ == null) { 2734 if (value == null) { 2735 throw new NullPointerException(); 2736 } 2737 lastHeartbeatTime_ = value; 2738 } else { 2739 lastHeartbeatTimeBuilder_.setMessage(value); 2740 } 2741 bitField0_ |= 0x00000010; 2742 onChanged(); 2743 return this; 2744 } 2745 /** 2746 * 2747 * 2748 * <pre> 2749 * [Output only] The last time an MQTT `PINGREQ` was received. This field 2750 * applies only to devices connecting through MQTT. MQTT clients usually only 2751 * send `PINGREQ` messages if the connection is idle, and no other messages 2752 * have been sent. Timestamps are periodically collected and written to 2753 * storage; they may be stale by a few minutes. 2754 * </pre> 2755 * 2756 * <code>.google.protobuf.Timestamp last_heartbeat_time = 7;</code> 2757 */ setLastHeartbeatTime(com.google.protobuf.Timestamp.Builder builderForValue)2758 public Builder setLastHeartbeatTime(com.google.protobuf.Timestamp.Builder builderForValue) { 2759 if (lastHeartbeatTimeBuilder_ == null) { 2760 lastHeartbeatTime_ = builderForValue.build(); 2761 } else { 2762 lastHeartbeatTimeBuilder_.setMessage(builderForValue.build()); 2763 } 2764 bitField0_ |= 0x00000010; 2765 onChanged(); 2766 return this; 2767 } 2768 /** 2769 * 2770 * 2771 * <pre> 2772 * [Output only] The last time an MQTT `PINGREQ` was received. This field 2773 * applies only to devices connecting through MQTT. MQTT clients usually only 2774 * send `PINGREQ` messages if the connection is idle, and no other messages 2775 * have been sent. Timestamps are periodically collected and written to 2776 * storage; they may be stale by a few minutes. 2777 * </pre> 2778 * 2779 * <code>.google.protobuf.Timestamp last_heartbeat_time = 7;</code> 2780 */ mergeLastHeartbeatTime(com.google.protobuf.Timestamp value)2781 public Builder mergeLastHeartbeatTime(com.google.protobuf.Timestamp value) { 2782 if (lastHeartbeatTimeBuilder_ == null) { 2783 if (((bitField0_ & 0x00000010) != 0) 2784 && lastHeartbeatTime_ != null 2785 && lastHeartbeatTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 2786 getLastHeartbeatTimeBuilder().mergeFrom(value); 2787 } else { 2788 lastHeartbeatTime_ = value; 2789 } 2790 } else { 2791 lastHeartbeatTimeBuilder_.mergeFrom(value); 2792 } 2793 bitField0_ |= 0x00000010; 2794 onChanged(); 2795 return this; 2796 } 2797 /** 2798 * 2799 * 2800 * <pre> 2801 * [Output only] The last time an MQTT `PINGREQ` was received. This field 2802 * applies only to devices connecting through MQTT. MQTT clients usually only 2803 * send `PINGREQ` messages if the connection is idle, and no other messages 2804 * have been sent. Timestamps are periodically collected and written to 2805 * storage; they may be stale by a few minutes. 2806 * </pre> 2807 * 2808 * <code>.google.protobuf.Timestamp last_heartbeat_time = 7;</code> 2809 */ clearLastHeartbeatTime()2810 public Builder clearLastHeartbeatTime() { 2811 bitField0_ = (bitField0_ & ~0x00000010); 2812 lastHeartbeatTime_ = null; 2813 if (lastHeartbeatTimeBuilder_ != null) { 2814 lastHeartbeatTimeBuilder_.dispose(); 2815 lastHeartbeatTimeBuilder_ = null; 2816 } 2817 onChanged(); 2818 return this; 2819 } 2820 /** 2821 * 2822 * 2823 * <pre> 2824 * [Output only] The last time an MQTT `PINGREQ` was received. This field 2825 * applies only to devices connecting through MQTT. MQTT clients usually only 2826 * send `PINGREQ` messages if the connection is idle, and no other messages 2827 * have been sent. Timestamps are periodically collected and written to 2828 * storage; they may be stale by a few minutes. 2829 * </pre> 2830 * 2831 * <code>.google.protobuf.Timestamp last_heartbeat_time = 7;</code> 2832 */ getLastHeartbeatTimeBuilder()2833 public com.google.protobuf.Timestamp.Builder getLastHeartbeatTimeBuilder() { 2834 bitField0_ |= 0x00000010; 2835 onChanged(); 2836 return getLastHeartbeatTimeFieldBuilder().getBuilder(); 2837 } 2838 /** 2839 * 2840 * 2841 * <pre> 2842 * [Output only] The last time an MQTT `PINGREQ` was received. This field 2843 * applies only to devices connecting through MQTT. MQTT clients usually only 2844 * send `PINGREQ` messages if the connection is idle, and no other messages 2845 * have been sent. Timestamps are periodically collected and written to 2846 * storage; they may be stale by a few minutes. 2847 * </pre> 2848 * 2849 * <code>.google.protobuf.Timestamp last_heartbeat_time = 7;</code> 2850 */ getLastHeartbeatTimeOrBuilder()2851 public com.google.protobuf.TimestampOrBuilder getLastHeartbeatTimeOrBuilder() { 2852 if (lastHeartbeatTimeBuilder_ != null) { 2853 return lastHeartbeatTimeBuilder_.getMessageOrBuilder(); 2854 } else { 2855 return lastHeartbeatTime_ == null 2856 ? com.google.protobuf.Timestamp.getDefaultInstance() 2857 : lastHeartbeatTime_; 2858 } 2859 } 2860 /** 2861 * 2862 * 2863 * <pre> 2864 * [Output only] The last time an MQTT `PINGREQ` was received. This field 2865 * applies only to devices connecting through MQTT. MQTT clients usually only 2866 * send `PINGREQ` messages if the connection is idle, and no other messages 2867 * have been sent. Timestamps are periodically collected and written to 2868 * storage; they may be stale by a few minutes. 2869 * </pre> 2870 * 2871 * <code>.google.protobuf.Timestamp last_heartbeat_time = 7;</code> 2872 */ 2873 private com.google.protobuf.SingleFieldBuilderV3< 2874 com.google.protobuf.Timestamp, 2875 com.google.protobuf.Timestamp.Builder, 2876 com.google.protobuf.TimestampOrBuilder> getLastHeartbeatTimeFieldBuilder()2877 getLastHeartbeatTimeFieldBuilder() { 2878 if (lastHeartbeatTimeBuilder_ == null) { 2879 lastHeartbeatTimeBuilder_ = 2880 new com.google.protobuf.SingleFieldBuilderV3< 2881 com.google.protobuf.Timestamp, 2882 com.google.protobuf.Timestamp.Builder, 2883 com.google.protobuf.TimestampOrBuilder>( 2884 getLastHeartbeatTime(), getParentForChildren(), isClean()); 2885 lastHeartbeatTime_ = null; 2886 } 2887 return lastHeartbeatTimeBuilder_; 2888 } 2889 2890 private com.google.protobuf.Timestamp lastEventTime_; 2891 private com.google.protobuf.SingleFieldBuilderV3< 2892 com.google.protobuf.Timestamp, 2893 com.google.protobuf.Timestamp.Builder, 2894 com.google.protobuf.TimestampOrBuilder> 2895 lastEventTimeBuilder_; 2896 /** 2897 * 2898 * 2899 * <pre> 2900 * [Output only] The last time a telemetry event was received. Timestamps are 2901 * periodically collected and written to storage; they may be stale by a few 2902 * minutes. 2903 * </pre> 2904 * 2905 * <code>.google.protobuf.Timestamp last_event_time = 8;</code> 2906 * 2907 * @return Whether the lastEventTime field is set. 2908 */ hasLastEventTime()2909 public boolean hasLastEventTime() { 2910 return ((bitField0_ & 0x00000020) != 0); 2911 } 2912 /** 2913 * 2914 * 2915 * <pre> 2916 * [Output only] The last time a telemetry event was received. Timestamps are 2917 * periodically collected and written to storage; they may be stale by a few 2918 * minutes. 2919 * </pre> 2920 * 2921 * <code>.google.protobuf.Timestamp last_event_time = 8;</code> 2922 * 2923 * @return The lastEventTime. 2924 */ getLastEventTime()2925 public com.google.protobuf.Timestamp getLastEventTime() { 2926 if (lastEventTimeBuilder_ == null) { 2927 return lastEventTime_ == null 2928 ? com.google.protobuf.Timestamp.getDefaultInstance() 2929 : lastEventTime_; 2930 } else { 2931 return lastEventTimeBuilder_.getMessage(); 2932 } 2933 } 2934 /** 2935 * 2936 * 2937 * <pre> 2938 * [Output only] The last time a telemetry event was received. Timestamps are 2939 * periodically collected and written to storage; they may be stale by a few 2940 * minutes. 2941 * </pre> 2942 * 2943 * <code>.google.protobuf.Timestamp last_event_time = 8;</code> 2944 */ setLastEventTime(com.google.protobuf.Timestamp value)2945 public Builder setLastEventTime(com.google.protobuf.Timestamp value) { 2946 if (lastEventTimeBuilder_ == null) { 2947 if (value == null) { 2948 throw new NullPointerException(); 2949 } 2950 lastEventTime_ = value; 2951 } else { 2952 lastEventTimeBuilder_.setMessage(value); 2953 } 2954 bitField0_ |= 0x00000020; 2955 onChanged(); 2956 return this; 2957 } 2958 /** 2959 * 2960 * 2961 * <pre> 2962 * [Output only] The last time a telemetry event was received. Timestamps are 2963 * periodically collected and written to storage; they may be stale by a few 2964 * minutes. 2965 * </pre> 2966 * 2967 * <code>.google.protobuf.Timestamp last_event_time = 8;</code> 2968 */ setLastEventTime(com.google.protobuf.Timestamp.Builder builderForValue)2969 public Builder setLastEventTime(com.google.protobuf.Timestamp.Builder builderForValue) { 2970 if (lastEventTimeBuilder_ == null) { 2971 lastEventTime_ = builderForValue.build(); 2972 } else { 2973 lastEventTimeBuilder_.setMessage(builderForValue.build()); 2974 } 2975 bitField0_ |= 0x00000020; 2976 onChanged(); 2977 return this; 2978 } 2979 /** 2980 * 2981 * 2982 * <pre> 2983 * [Output only] The last time a telemetry event was received. Timestamps are 2984 * periodically collected and written to storage; they may be stale by a few 2985 * minutes. 2986 * </pre> 2987 * 2988 * <code>.google.protobuf.Timestamp last_event_time = 8;</code> 2989 */ mergeLastEventTime(com.google.protobuf.Timestamp value)2990 public Builder mergeLastEventTime(com.google.protobuf.Timestamp value) { 2991 if (lastEventTimeBuilder_ == null) { 2992 if (((bitField0_ & 0x00000020) != 0) 2993 && lastEventTime_ != null 2994 && lastEventTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 2995 getLastEventTimeBuilder().mergeFrom(value); 2996 } else { 2997 lastEventTime_ = value; 2998 } 2999 } else { 3000 lastEventTimeBuilder_.mergeFrom(value); 3001 } 3002 bitField0_ |= 0x00000020; 3003 onChanged(); 3004 return this; 3005 } 3006 /** 3007 * 3008 * 3009 * <pre> 3010 * [Output only] The last time a telemetry event was received. Timestamps are 3011 * periodically collected and written to storage; they may be stale by a few 3012 * minutes. 3013 * </pre> 3014 * 3015 * <code>.google.protobuf.Timestamp last_event_time = 8;</code> 3016 */ clearLastEventTime()3017 public Builder clearLastEventTime() { 3018 bitField0_ = (bitField0_ & ~0x00000020); 3019 lastEventTime_ = null; 3020 if (lastEventTimeBuilder_ != null) { 3021 lastEventTimeBuilder_.dispose(); 3022 lastEventTimeBuilder_ = null; 3023 } 3024 onChanged(); 3025 return this; 3026 } 3027 /** 3028 * 3029 * 3030 * <pre> 3031 * [Output only] The last time a telemetry event was received. Timestamps are 3032 * periodically collected and written to storage; they may be stale by a few 3033 * minutes. 3034 * </pre> 3035 * 3036 * <code>.google.protobuf.Timestamp last_event_time = 8;</code> 3037 */ getLastEventTimeBuilder()3038 public com.google.protobuf.Timestamp.Builder getLastEventTimeBuilder() { 3039 bitField0_ |= 0x00000020; 3040 onChanged(); 3041 return getLastEventTimeFieldBuilder().getBuilder(); 3042 } 3043 /** 3044 * 3045 * 3046 * <pre> 3047 * [Output only] The last time a telemetry event was received. Timestamps are 3048 * periodically collected and written to storage; they may be stale by a few 3049 * minutes. 3050 * </pre> 3051 * 3052 * <code>.google.protobuf.Timestamp last_event_time = 8;</code> 3053 */ getLastEventTimeOrBuilder()3054 public com.google.protobuf.TimestampOrBuilder getLastEventTimeOrBuilder() { 3055 if (lastEventTimeBuilder_ != null) { 3056 return lastEventTimeBuilder_.getMessageOrBuilder(); 3057 } else { 3058 return lastEventTime_ == null 3059 ? com.google.protobuf.Timestamp.getDefaultInstance() 3060 : lastEventTime_; 3061 } 3062 } 3063 /** 3064 * 3065 * 3066 * <pre> 3067 * [Output only] The last time a telemetry event was received. Timestamps are 3068 * periodically collected and written to storage; they may be stale by a few 3069 * minutes. 3070 * </pre> 3071 * 3072 * <code>.google.protobuf.Timestamp last_event_time = 8;</code> 3073 */ 3074 private com.google.protobuf.SingleFieldBuilderV3< 3075 com.google.protobuf.Timestamp, 3076 com.google.protobuf.Timestamp.Builder, 3077 com.google.protobuf.TimestampOrBuilder> getLastEventTimeFieldBuilder()3078 getLastEventTimeFieldBuilder() { 3079 if (lastEventTimeBuilder_ == null) { 3080 lastEventTimeBuilder_ = 3081 new com.google.protobuf.SingleFieldBuilderV3< 3082 com.google.protobuf.Timestamp, 3083 com.google.protobuf.Timestamp.Builder, 3084 com.google.protobuf.TimestampOrBuilder>( 3085 getLastEventTime(), getParentForChildren(), isClean()); 3086 lastEventTime_ = null; 3087 } 3088 return lastEventTimeBuilder_; 3089 } 3090 3091 private com.google.protobuf.Timestamp lastStateTime_; 3092 private com.google.protobuf.SingleFieldBuilderV3< 3093 com.google.protobuf.Timestamp, 3094 com.google.protobuf.Timestamp.Builder, 3095 com.google.protobuf.TimestampOrBuilder> 3096 lastStateTimeBuilder_; 3097 /** 3098 * 3099 * 3100 * <pre> 3101 * [Output only] The last time a state event was received. Timestamps are 3102 * periodically collected and written to storage; they may be stale by a few 3103 * minutes. 3104 * </pre> 3105 * 3106 * <code>.google.protobuf.Timestamp last_state_time = 20;</code> 3107 * 3108 * @return Whether the lastStateTime field is set. 3109 */ hasLastStateTime()3110 public boolean hasLastStateTime() { 3111 return ((bitField0_ & 0x00000040) != 0); 3112 } 3113 /** 3114 * 3115 * 3116 * <pre> 3117 * [Output only] The last time a state event was received. Timestamps are 3118 * periodically collected and written to storage; they may be stale by a few 3119 * minutes. 3120 * </pre> 3121 * 3122 * <code>.google.protobuf.Timestamp last_state_time = 20;</code> 3123 * 3124 * @return The lastStateTime. 3125 */ getLastStateTime()3126 public com.google.protobuf.Timestamp getLastStateTime() { 3127 if (lastStateTimeBuilder_ == null) { 3128 return lastStateTime_ == null 3129 ? com.google.protobuf.Timestamp.getDefaultInstance() 3130 : lastStateTime_; 3131 } else { 3132 return lastStateTimeBuilder_.getMessage(); 3133 } 3134 } 3135 /** 3136 * 3137 * 3138 * <pre> 3139 * [Output only] The last time a state event was received. Timestamps are 3140 * periodically collected and written to storage; they may be stale by a few 3141 * minutes. 3142 * </pre> 3143 * 3144 * <code>.google.protobuf.Timestamp last_state_time = 20;</code> 3145 */ setLastStateTime(com.google.protobuf.Timestamp value)3146 public Builder setLastStateTime(com.google.protobuf.Timestamp value) { 3147 if (lastStateTimeBuilder_ == null) { 3148 if (value == null) { 3149 throw new NullPointerException(); 3150 } 3151 lastStateTime_ = value; 3152 } else { 3153 lastStateTimeBuilder_.setMessage(value); 3154 } 3155 bitField0_ |= 0x00000040; 3156 onChanged(); 3157 return this; 3158 } 3159 /** 3160 * 3161 * 3162 * <pre> 3163 * [Output only] The last time a state event was received. Timestamps are 3164 * periodically collected and written to storage; they may be stale by a few 3165 * minutes. 3166 * </pre> 3167 * 3168 * <code>.google.protobuf.Timestamp last_state_time = 20;</code> 3169 */ setLastStateTime(com.google.protobuf.Timestamp.Builder builderForValue)3170 public Builder setLastStateTime(com.google.protobuf.Timestamp.Builder builderForValue) { 3171 if (lastStateTimeBuilder_ == null) { 3172 lastStateTime_ = builderForValue.build(); 3173 } else { 3174 lastStateTimeBuilder_.setMessage(builderForValue.build()); 3175 } 3176 bitField0_ |= 0x00000040; 3177 onChanged(); 3178 return this; 3179 } 3180 /** 3181 * 3182 * 3183 * <pre> 3184 * [Output only] The last time a state event was received. Timestamps are 3185 * periodically collected and written to storage; they may be stale by a few 3186 * minutes. 3187 * </pre> 3188 * 3189 * <code>.google.protobuf.Timestamp last_state_time = 20;</code> 3190 */ mergeLastStateTime(com.google.protobuf.Timestamp value)3191 public Builder mergeLastStateTime(com.google.protobuf.Timestamp value) { 3192 if (lastStateTimeBuilder_ == null) { 3193 if (((bitField0_ & 0x00000040) != 0) 3194 && lastStateTime_ != null 3195 && lastStateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 3196 getLastStateTimeBuilder().mergeFrom(value); 3197 } else { 3198 lastStateTime_ = value; 3199 } 3200 } else { 3201 lastStateTimeBuilder_.mergeFrom(value); 3202 } 3203 bitField0_ |= 0x00000040; 3204 onChanged(); 3205 return this; 3206 } 3207 /** 3208 * 3209 * 3210 * <pre> 3211 * [Output only] The last time a state event was received. Timestamps are 3212 * periodically collected and written to storage; they may be stale by a few 3213 * minutes. 3214 * </pre> 3215 * 3216 * <code>.google.protobuf.Timestamp last_state_time = 20;</code> 3217 */ clearLastStateTime()3218 public Builder clearLastStateTime() { 3219 bitField0_ = (bitField0_ & ~0x00000040); 3220 lastStateTime_ = null; 3221 if (lastStateTimeBuilder_ != null) { 3222 lastStateTimeBuilder_.dispose(); 3223 lastStateTimeBuilder_ = null; 3224 } 3225 onChanged(); 3226 return this; 3227 } 3228 /** 3229 * 3230 * 3231 * <pre> 3232 * [Output only] The last time a state event was received. Timestamps are 3233 * periodically collected and written to storage; they may be stale by a few 3234 * minutes. 3235 * </pre> 3236 * 3237 * <code>.google.protobuf.Timestamp last_state_time = 20;</code> 3238 */ getLastStateTimeBuilder()3239 public com.google.protobuf.Timestamp.Builder getLastStateTimeBuilder() { 3240 bitField0_ |= 0x00000040; 3241 onChanged(); 3242 return getLastStateTimeFieldBuilder().getBuilder(); 3243 } 3244 /** 3245 * 3246 * 3247 * <pre> 3248 * [Output only] The last time a state event was received. Timestamps are 3249 * periodically collected and written to storage; they may be stale by a few 3250 * minutes. 3251 * </pre> 3252 * 3253 * <code>.google.protobuf.Timestamp last_state_time = 20;</code> 3254 */ getLastStateTimeOrBuilder()3255 public com.google.protobuf.TimestampOrBuilder getLastStateTimeOrBuilder() { 3256 if (lastStateTimeBuilder_ != null) { 3257 return lastStateTimeBuilder_.getMessageOrBuilder(); 3258 } else { 3259 return lastStateTime_ == null 3260 ? com.google.protobuf.Timestamp.getDefaultInstance() 3261 : lastStateTime_; 3262 } 3263 } 3264 /** 3265 * 3266 * 3267 * <pre> 3268 * [Output only] The last time a state event was received. Timestamps are 3269 * periodically collected and written to storage; they may be stale by a few 3270 * minutes. 3271 * </pre> 3272 * 3273 * <code>.google.protobuf.Timestamp last_state_time = 20;</code> 3274 */ 3275 private com.google.protobuf.SingleFieldBuilderV3< 3276 com.google.protobuf.Timestamp, 3277 com.google.protobuf.Timestamp.Builder, 3278 com.google.protobuf.TimestampOrBuilder> getLastStateTimeFieldBuilder()3279 getLastStateTimeFieldBuilder() { 3280 if (lastStateTimeBuilder_ == null) { 3281 lastStateTimeBuilder_ = 3282 new com.google.protobuf.SingleFieldBuilderV3< 3283 com.google.protobuf.Timestamp, 3284 com.google.protobuf.Timestamp.Builder, 3285 com.google.protobuf.TimestampOrBuilder>( 3286 getLastStateTime(), getParentForChildren(), isClean()); 3287 lastStateTime_ = null; 3288 } 3289 return lastStateTimeBuilder_; 3290 } 3291 3292 private com.google.protobuf.Timestamp lastConfigAckTime_; 3293 private com.google.protobuf.SingleFieldBuilderV3< 3294 com.google.protobuf.Timestamp, 3295 com.google.protobuf.Timestamp.Builder, 3296 com.google.protobuf.TimestampOrBuilder> 3297 lastConfigAckTimeBuilder_; 3298 /** 3299 * 3300 * 3301 * <pre> 3302 * [Output only] The last time a cloud-to-device config version acknowledgment 3303 * was received from the device. This field is only for configurations 3304 * sent through MQTT. 3305 * </pre> 3306 * 3307 * <code>.google.protobuf.Timestamp last_config_ack_time = 14;</code> 3308 * 3309 * @return Whether the lastConfigAckTime field is set. 3310 */ hasLastConfigAckTime()3311 public boolean hasLastConfigAckTime() { 3312 return ((bitField0_ & 0x00000080) != 0); 3313 } 3314 /** 3315 * 3316 * 3317 * <pre> 3318 * [Output only] The last time a cloud-to-device config version acknowledgment 3319 * was received from the device. This field is only for configurations 3320 * sent through MQTT. 3321 * </pre> 3322 * 3323 * <code>.google.protobuf.Timestamp last_config_ack_time = 14;</code> 3324 * 3325 * @return The lastConfigAckTime. 3326 */ getLastConfigAckTime()3327 public com.google.protobuf.Timestamp getLastConfigAckTime() { 3328 if (lastConfigAckTimeBuilder_ == null) { 3329 return lastConfigAckTime_ == null 3330 ? com.google.protobuf.Timestamp.getDefaultInstance() 3331 : lastConfigAckTime_; 3332 } else { 3333 return lastConfigAckTimeBuilder_.getMessage(); 3334 } 3335 } 3336 /** 3337 * 3338 * 3339 * <pre> 3340 * [Output only] The last time a cloud-to-device config version acknowledgment 3341 * was received from the device. This field is only for configurations 3342 * sent through MQTT. 3343 * </pre> 3344 * 3345 * <code>.google.protobuf.Timestamp last_config_ack_time = 14;</code> 3346 */ setLastConfigAckTime(com.google.protobuf.Timestamp value)3347 public Builder setLastConfigAckTime(com.google.protobuf.Timestamp value) { 3348 if (lastConfigAckTimeBuilder_ == null) { 3349 if (value == null) { 3350 throw new NullPointerException(); 3351 } 3352 lastConfigAckTime_ = value; 3353 } else { 3354 lastConfigAckTimeBuilder_.setMessage(value); 3355 } 3356 bitField0_ |= 0x00000080; 3357 onChanged(); 3358 return this; 3359 } 3360 /** 3361 * 3362 * 3363 * <pre> 3364 * [Output only] The last time a cloud-to-device config version acknowledgment 3365 * was received from the device. This field is only for configurations 3366 * sent through MQTT. 3367 * </pre> 3368 * 3369 * <code>.google.protobuf.Timestamp last_config_ack_time = 14;</code> 3370 */ setLastConfigAckTime(com.google.protobuf.Timestamp.Builder builderForValue)3371 public Builder setLastConfigAckTime(com.google.protobuf.Timestamp.Builder builderForValue) { 3372 if (lastConfigAckTimeBuilder_ == null) { 3373 lastConfigAckTime_ = builderForValue.build(); 3374 } else { 3375 lastConfigAckTimeBuilder_.setMessage(builderForValue.build()); 3376 } 3377 bitField0_ |= 0x00000080; 3378 onChanged(); 3379 return this; 3380 } 3381 /** 3382 * 3383 * 3384 * <pre> 3385 * [Output only] The last time a cloud-to-device config version acknowledgment 3386 * was received from the device. This field is only for configurations 3387 * sent through MQTT. 3388 * </pre> 3389 * 3390 * <code>.google.protobuf.Timestamp last_config_ack_time = 14;</code> 3391 */ mergeLastConfigAckTime(com.google.protobuf.Timestamp value)3392 public Builder mergeLastConfigAckTime(com.google.protobuf.Timestamp value) { 3393 if (lastConfigAckTimeBuilder_ == null) { 3394 if (((bitField0_ & 0x00000080) != 0) 3395 && lastConfigAckTime_ != null 3396 && lastConfigAckTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 3397 getLastConfigAckTimeBuilder().mergeFrom(value); 3398 } else { 3399 lastConfigAckTime_ = value; 3400 } 3401 } else { 3402 lastConfigAckTimeBuilder_.mergeFrom(value); 3403 } 3404 bitField0_ |= 0x00000080; 3405 onChanged(); 3406 return this; 3407 } 3408 /** 3409 * 3410 * 3411 * <pre> 3412 * [Output only] The last time a cloud-to-device config version acknowledgment 3413 * was received from the device. This field is only for configurations 3414 * sent through MQTT. 3415 * </pre> 3416 * 3417 * <code>.google.protobuf.Timestamp last_config_ack_time = 14;</code> 3418 */ clearLastConfigAckTime()3419 public Builder clearLastConfigAckTime() { 3420 bitField0_ = (bitField0_ & ~0x00000080); 3421 lastConfigAckTime_ = null; 3422 if (lastConfigAckTimeBuilder_ != null) { 3423 lastConfigAckTimeBuilder_.dispose(); 3424 lastConfigAckTimeBuilder_ = null; 3425 } 3426 onChanged(); 3427 return this; 3428 } 3429 /** 3430 * 3431 * 3432 * <pre> 3433 * [Output only] The last time a cloud-to-device config version acknowledgment 3434 * was received from the device. This field is only for configurations 3435 * sent through MQTT. 3436 * </pre> 3437 * 3438 * <code>.google.protobuf.Timestamp last_config_ack_time = 14;</code> 3439 */ getLastConfigAckTimeBuilder()3440 public com.google.protobuf.Timestamp.Builder getLastConfigAckTimeBuilder() { 3441 bitField0_ |= 0x00000080; 3442 onChanged(); 3443 return getLastConfigAckTimeFieldBuilder().getBuilder(); 3444 } 3445 /** 3446 * 3447 * 3448 * <pre> 3449 * [Output only] The last time a cloud-to-device config version acknowledgment 3450 * was received from the device. This field is only for configurations 3451 * sent through MQTT. 3452 * </pre> 3453 * 3454 * <code>.google.protobuf.Timestamp last_config_ack_time = 14;</code> 3455 */ getLastConfigAckTimeOrBuilder()3456 public com.google.protobuf.TimestampOrBuilder getLastConfigAckTimeOrBuilder() { 3457 if (lastConfigAckTimeBuilder_ != null) { 3458 return lastConfigAckTimeBuilder_.getMessageOrBuilder(); 3459 } else { 3460 return lastConfigAckTime_ == null 3461 ? com.google.protobuf.Timestamp.getDefaultInstance() 3462 : lastConfigAckTime_; 3463 } 3464 } 3465 /** 3466 * 3467 * 3468 * <pre> 3469 * [Output only] The last time a cloud-to-device config version acknowledgment 3470 * was received from the device. This field is only for configurations 3471 * sent through MQTT. 3472 * </pre> 3473 * 3474 * <code>.google.protobuf.Timestamp last_config_ack_time = 14;</code> 3475 */ 3476 private com.google.protobuf.SingleFieldBuilderV3< 3477 com.google.protobuf.Timestamp, 3478 com.google.protobuf.Timestamp.Builder, 3479 com.google.protobuf.TimestampOrBuilder> getLastConfigAckTimeFieldBuilder()3480 getLastConfigAckTimeFieldBuilder() { 3481 if (lastConfigAckTimeBuilder_ == null) { 3482 lastConfigAckTimeBuilder_ = 3483 new com.google.protobuf.SingleFieldBuilderV3< 3484 com.google.protobuf.Timestamp, 3485 com.google.protobuf.Timestamp.Builder, 3486 com.google.protobuf.TimestampOrBuilder>( 3487 getLastConfigAckTime(), getParentForChildren(), isClean()); 3488 lastConfigAckTime_ = null; 3489 } 3490 return lastConfigAckTimeBuilder_; 3491 } 3492 3493 private com.google.protobuf.Timestamp lastConfigSendTime_; 3494 private com.google.protobuf.SingleFieldBuilderV3< 3495 com.google.protobuf.Timestamp, 3496 com.google.protobuf.Timestamp.Builder, 3497 com.google.protobuf.TimestampOrBuilder> 3498 lastConfigSendTimeBuilder_; 3499 /** 3500 * 3501 * 3502 * <pre> 3503 * [Output only] The last time a cloud-to-device config version was sent to 3504 * the device. 3505 * </pre> 3506 * 3507 * <code>.google.protobuf.Timestamp last_config_send_time = 18;</code> 3508 * 3509 * @return Whether the lastConfigSendTime field is set. 3510 */ hasLastConfigSendTime()3511 public boolean hasLastConfigSendTime() { 3512 return ((bitField0_ & 0x00000100) != 0); 3513 } 3514 /** 3515 * 3516 * 3517 * <pre> 3518 * [Output only] The last time a cloud-to-device config version was sent to 3519 * the device. 3520 * </pre> 3521 * 3522 * <code>.google.protobuf.Timestamp last_config_send_time = 18;</code> 3523 * 3524 * @return The lastConfigSendTime. 3525 */ getLastConfigSendTime()3526 public com.google.protobuf.Timestamp getLastConfigSendTime() { 3527 if (lastConfigSendTimeBuilder_ == null) { 3528 return lastConfigSendTime_ == null 3529 ? com.google.protobuf.Timestamp.getDefaultInstance() 3530 : lastConfigSendTime_; 3531 } else { 3532 return lastConfigSendTimeBuilder_.getMessage(); 3533 } 3534 } 3535 /** 3536 * 3537 * 3538 * <pre> 3539 * [Output only] The last time a cloud-to-device config version was sent to 3540 * the device. 3541 * </pre> 3542 * 3543 * <code>.google.protobuf.Timestamp last_config_send_time = 18;</code> 3544 */ setLastConfigSendTime(com.google.protobuf.Timestamp value)3545 public Builder setLastConfigSendTime(com.google.protobuf.Timestamp value) { 3546 if (lastConfigSendTimeBuilder_ == null) { 3547 if (value == null) { 3548 throw new NullPointerException(); 3549 } 3550 lastConfigSendTime_ = value; 3551 } else { 3552 lastConfigSendTimeBuilder_.setMessage(value); 3553 } 3554 bitField0_ |= 0x00000100; 3555 onChanged(); 3556 return this; 3557 } 3558 /** 3559 * 3560 * 3561 * <pre> 3562 * [Output only] The last time a cloud-to-device config version was sent to 3563 * the device. 3564 * </pre> 3565 * 3566 * <code>.google.protobuf.Timestamp last_config_send_time = 18;</code> 3567 */ setLastConfigSendTime(com.google.protobuf.Timestamp.Builder builderForValue)3568 public Builder setLastConfigSendTime(com.google.protobuf.Timestamp.Builder builderForValue) { 3569 if (lastConfigSendTimeBuilder_ == null) { 3570 lastConfigSendTime_ = builderForValue.build(); 3571 } else { 3572 lastConfigSendTimeBuilder_.setMessage(builderForValue.build()); 3573 } 3574 bitField0_ |= 0x00000100; 3575 onChanged(); 3576 return this; 3577 } 3578 /** 3579 * 3580 * 3581 * <pre> 3582 * [Output only] The last time a cloud-to-device config version was sent to 3583 * the device. 3584 * </pre> 3585 * 3586 * <code>.google.protobuf.Timestamp last_config_send_time = 18;</code> 3587 */ mergeLastConfigSendTime(com.google.protobuf.Timestamp value)3588 public Builder mergeLastConfigSendTime(com.google.protobuf.Timestamp value) { 3589 if (lastConfigSendTimeBuilder_ == null) { 3590 if (((bitField0_ & 0x00000100) != 0) 3591 && lastConfigSendTime_ != null 3592 && lastConfigSendTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 3593 getLastConfigSendTimeBuilder().mergeFrom(value); 3594 } else { 3595 lastConfigSendTime_ = value; 3596 } 3597 } else { 3598 lastConfigSendTimeBuilder_.mergeFrom(value); 3599 } 3600 bitField0_ |= 0x00000100; 3601 onChanged(); 3602 return this; 3603 } 3604 /** 3605 * 3606 * 3607 * <pre> 3608 * [Output only] The last time a cloud-to-device config version was sent to 3609 * the device. 3610 * </pre> 3611 * 3612 * <code>.google.protobuf.Timestamp last_config_send_time = 18;</code> 3613 */ clearLastConfigSendTime()3614 public Builder clearLastConfigSendTime() { 3615 bitField0_ = (bitField0_ & ~0x00000100); 3616 lastConfigSendTime_ = null; 3617 if (lastConfigSendTimeBuilder_ != null) { 3618 lastConfigSendTimeBuilder_.dispose(); 3619 lastConfigSendTimeBuilder_ = null; 3620 } 3621 onChanged(); 3622 return this; 3623 } 3624 /** 3625 * 3626 * 3627 * <pre> 3628 * [Output only] The last time a cloud-to-device config version was sent to 3629 * the device. 3630 * </pre> 3631 * 3632 * <code>.google.protobuf.Timestamp last_config_send_time = 18;</code> 3633 */ getLastConfigSendTimeBuilder()3634 public com.google.protobuf.Timestamp.Builder getLastConfigSendTimeBuilder() { 3635 bitField0_ |= 0x00000100; 3636 onChanged(); 3637 return getLastConfigSendTimeFieldBuilder().getBuilder(); 3638 } 3639 /** 3640 * 3641 * 3642 * <pre> 3643 * [Output only] The last time a cloud-to-device config version was sent to 3644 * the device. 3645 * </pre> 3646 * 3647 * <code>.google.protobuf.Timestamp last_config_send_time = 18;</code> 3648 */ getLastConfigSendTimeOrBuilder()3649 public com.google.protobuf.TimestampOrBuilder getLastConfigSendTimeOrBuilder() { 3650 if (lastConfigSendTimeBuilder_ != null) { 3651 return lastConfigSendTimeBuilder_.getMessageOrBuilder(); 3652 } else { 3653 return lastConfigSendTime_ == null 3654 ? com.google.protobuf.Timestamp.getDefaultInstance() 3655 : lastConfigSendTime_; 3656 } 3657 } 3658 /** 3659 * 3660 * 3661 * <pre> 3662 * [Output only] The last time a cloud-to-device config version was sent to 3663 * the device. 3664 * </pre> 3665 * 3666 * <code>.google.protobuf.Timestamp last_config_send_time = 18;</code> 3667 */ 3668 private com.google.protobuf.SingleFieldBuilderV3< 3669 com.google.protobuf.Timestamp, 3670 com.google.protobuf.Timestamp.Builder, 3671 com.google.protobuf.TimestampOrBuilder> getLastConfigSendTimeFieldBuilder()3672 getLastConfigSendTimeFieldBuilder() { 3673 if (lastConfigSendTimeBuilder_ == null) { 3674 lastConfigSendTimeBuilder_ = 3675 new com.google.protobuf.SingleFieldBuilderV3< 3676 com.google.protobuf.Timestamp, 3677 com.google.protobuf.Timestamp.Builder, 3678 com.google.protobuf.TimestampOrBuilder>( 3679 getLastConfigSendTime(), getParentForChildren(), isClean()); 3680 lastConfigSendTime_ = null; 3681 } 3682 return lastConfigSendTimeBuilder_; 3683 } 3684 3685 private boolean blocked_; 3686 /** 3687 * 3688 * 3689 * <pre> 3690 * If a device is blocked, connections or requests from this device will fail. 3691 * Can be used to temporarily prevent the device from connecting if, for 3692 * example, the sensor is generating bad data and needs maintenance. 3693 * </pre> 3694 * 3695 * <code>bool blocked = 19;</code> 3696 * 3697 * @return The blocked. 3698 */ 3699 @java.lang.Override getBlocked()3700 public boolean getBlocked() { 3701 return blocked_; 3702 } 3703 /** 3704 * 3705 * 3706 * <pre> 3707 * If a device is blocked, connections or requests from this device will fail. 3708 * Can be used to temporarily prevent the device from connecting if, for 3709 * example, the sensor is generating bad data and needs maintenance. 3710 * </pre> 3711 * 3712 * <code>bool blocked = 19;</code> 3713 * 3714 * @param value The blocked to set. 3715 * @return This builder for chaining. 3716 */ setBlocked(boolean value)3717 public Builder setBlocked(boolean value) { 3718 3719 blocked_ = value; 3720 bitField0_ |= 0x00000200; 3721 onChanged(); 3722 return this; 3723 } 3724 /** 3725 * 3726 * 3727 * <pre> 3728 * If a device is blocked, connections or requests from this device will fail. 3729 * Can be used to temporarily prevent the device from connecting if, for 3730 * example, the sensor is generating bad data and needs maintenance. 3731 * </pre> 3732 * 3733 * <code>bool blocked = 19;</code> 3734 * 3735 * @return This builder for chaining. 3736 */ clearBlocked()3737 public Builder clearBlocked() { 3738 bitField0_ = (bitField0_ & ~0x00000200); 3739 blocked_ = false; 3740 onChanged(); 3741 return this; 3742 } 3743 3744 private com.google.protobuf.Timestamp lastErrorTime_; 3745 private com.google.protobuf.SingleFieldBuilderV3< 3746 com.google.protobuf.Timestamp, 3747 com.google.protobuf.Timestamp.Builder, 3748 com.google.protobuf.TimestampOrBuilder> 3749 lastErrorTimeBuilder_; 3750 /** 3751 * 3752 * 3753 * <pre> 3754 * [Output only] The time the most recent error occurred, such as a failure to 3755 * publish to Cloud Pub/Sub. This field is the timestamp of 3756 * 'last_error_status'. 3757 * </pre> 3758 * 3759 * <code>.google.protobuf.Timestamp last_error_time = 10;</code> 3760 * 3761 * @return Whether the lastErrorTime field is set. 3762 */ hasLastErrorTime()3763 public boolean hasLastErrorTime() { 3764 return ((bitField0_ & 0x00000400) != 0); 3765 } 3766 /** 3767 * 3768 * 3769 * <pre> 3770 * [Output only] The time the most recent error occurred, such as a failure to 3771 * publish to Cloud Pub/Sub. This field is the timestamp of 3772 * 'last_error_status'. 3773 * </pre> 3774 * 3775 * <code>.google.protobuf.Timestamp last_error_time = 10;</code> 3776 * 3777 * @return The lastErrorTime. 3778 */ getLastErrorTime()3779 public com.google.protobuf.Timestamp getLastErrorTime() { 3780 if (lastErrorTimeBuilder_ == null) { 3781 return lastErrorTime_ == null 3782 ? com.google.protobuf.Timestamp.getDefaultInstance() 3783 : lastErrorTime_; 3784 } else { 3785 return lastErrorTimeBuilder_.getMessage(); 3786 } 3787 } 3788 /** 3789 * 3790 * 3791 * <pre> 3792 * [Output only] The time the most recent error occurred, such as a failure to 3793 * publish to Cloud Pub/Sub. This field is the timestamp of 3794 * 'last_error_status'. 3795 * </pre> 3796 * 3797 * <code>.google.protobuf.Timestamp last_error_time = 10;</code> 3798 */ setLastErrorTime(com.google.protobuf.Timestamp value)3799 public Builder setLastErrorTime(com.google.protobuf.Timestamp value) { 3800 if (lastErrorTimeBuilder_ == null) { 3801 if (value == null) { 3802 throw new NullPointerException(); 3803 } 3804 lastErrorTime_ = value; 3805 } else { 3806 lastErrorTimeBuilder_.setMessage(value); 3807 } 3808 bitField0_ |= 0x00000400; 3809 onChanged(); 3810 return this; 3811 } 3812 /** 3813 * 3814 * 3815 * <pre> 3816 * [Output only] The time the most recent error occurred, such as a failure to 3817 * publish to Cloud Pub/Sub. This field is the timestamp of 3818 * 'last_error_status'. 3819 * </pre> 3820 * 3821 * <code>.google.protobuf.Timestamp last_error_time = 10;</code> 3822 */ setLastErrorTime(com.google.protobuf.Timestamp.Builder builderForValue)3823 public Builder setLastErrorTime(com.google.protobuf.Timestamp.Builder builderForValue) { 3824 if (lastErrorTimeBuilder_ == null) { 3825 lastErrorTime_ = builderForValue.build(); 3826 } else { 3827 lastErrorTimeBuilder_.setMessage(builderForValue.build()); 3828 } 3829 bitField0_ |= 0x00000400; 3830 onChanged(); 3831 return this; 3832 } 3833 /** 3834 * 3835 * 3836 * <pre> 3837 * [Output only] The time the most recent error occurred, such as a failure to 3838 * publish to Cloud Pub/Sub. This field is the timestamp of 3839 * 'last_error_status'. 3840 * </pre> 3841 * 3842 * <code>.google.protobuf.Timestamp last_error_time = 10;</code> 3843 */ mergeLastErrorTime(com.google.protobuf.Timestamp value)3844 public Builder mergeLastErrorTime(com.google.protobuf.Timestamp value) { 3845 if (lastErrorTimeBuilder_ == null) { 3846 if (((bitField0_ & 0x00000400) != 0) 3847 && lastErrorTime_ != null 3848 && lastErrorTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 3849 getLastErrorTimeBuilder().mergeFrom(value); 3850 } else { 3851 lastErrorTime_ = value; 3852 } 3853 } else { 3854 lastErrorTimeBuilder_.mergeFrom(value); 3855 } 3856 bitField0_ |= 0x00000400; 3857 onChanged(); 3858 return this; 3859 } 3860 /** 3861 * 3862 * 3863 * <pre> 3864 * [Output only] The time the most recent error occurred, such as a failure to 3865 * publish to Cloud Pub/Sub. This field is the timestamp of 3866 * 'last_error_status'. 3867 * </pre> 3868 * 3869 * <code>.google.protobuf.Timestamp last_error_time = 10;</code> 3870 */ clearLastErrorTime()3871 public Builder clearLastErrorTime() { 3872 bitField0_ = (bitField0_ & ~0x00000400); 3873 lastErrorTime_ = null; 3874 if (lastErrorTimeBuilder_ != null) { 3875 lastErrorTimeBuilder_.dispose(); 3876 lastErrorTimeBuilder_ = null; 3877 } 3878 onChanged(); 3879 return this; 3880 } 3881 /** 3882 * 3883 * 3884 * <pre> 3885 * [Output only] The time the most recent error occurred, such as a failure to 3886 * publish to Cloud Pub/Sub. This field is the timestamp of 3887 * 'last_error_status'. 3888 * </pre> 3889 * 3890 * <code>.google.protobuf.Timestamp last_error_time = 10;</code> 3891 */ getLastErrorTimeBuilder()3892 public com.google.protobuf.Timestamp.Builder getLastErrorTimeBuilder() { 3893 bitField0_ |= 0x00000400; 3894 onChanged(); 3895 return getLastErrorTimeFieldBuilder().getBuilder(); 3896 } 3897 /** 3898 * 3899 * 3900 * <pre> 3901 * [Output only] The time the most recent error occurred, such as a failure to 3902 * publish to Cloud Pub/Sub. This field is the timestamp of 3903 * 'last_error_status'. 3904 * </pre> 3905 * 3906 * <code>.google.protobuf.Timestamp last_error_time = 10;</code> 3907 */ getLastErrorTimeOrBuilder()3908 public com.google.protobuf.TimestampOrBuilder getLastErrorTimeOrBuilder() { 3909 if (lastErrorTimeBuilder_ != null) { 3910 return lastErrorTimeBuilder_.getMessageOrBuilder(); 3911 } else { 3912 return lastErrorTime_ == null 3913 ? com.google.protobuf.Timestamp.getDefaultInstance() 3914 : lastErrorTime_; 3915 } 3916 } 3917 /** 3918 * 3919 * 3920 * <pre> 3921 * [Output only] The time the most recent error occurred, such as a failure to 3922 * publish to Cloud Pub/Sub. This field is the timestamp of 3923 * 'last_error_status'. 3924 * </pre> 3925 * 3926 * <code>.google.protobuf.Timestamp last_error_time = 10;</code> 3927 */ 3928 private com.google.protobuf.SingleFieldBuilderV3< 3929 com.google.protobuf.Timestamp, 3930 com.google.protobuf.Timestamp.Builder, 3931 com.google.protobuf.TimestampOrBuilder> getLastErrorTimeFieldBuilder()3932 getLastErrorTimeFieldBuilder() { 3933 if (lastErrorTimeBuilder_ == null) { 3934 lastErrorTimeBuilder_ = 3935 new com.google.protobuf.SingleFieldBuilderV3< 3936 com.google.protobuf.Timestamp, 3937 com.google.protobuf.Timestamp.Builder, 3938 com.google.protobuf.TimestampOrBuilder>( 3939 getLastErrorTime(), getParentForChildren(), isClean()); 3940 lastErrorTime_ = null; 3941 } 3942 return lastErrorTimeBuilder_; 3943 } 3944 3945 private com.google.rpc.Status lastErrorStatus_; 3946 private com.google.protobuf.SingleFieldBuilderV3< 3947 com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> 3948 lastErrorStatusBuilder_; 3949 /** 3950 * 3951 * 3952 * <pre> 3953 * [Output only] The error message of the most recent error, such as a failure 3954 * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this 3955 * field. If no errors have occurred, this field has an empty message 3956 * and the status code 0 == OK. Otherwise, this field is expected to have a 3957 * status code other than OK. 3958 * </pre> 3959 * 3960 * <code>.google.rpc.Status last_error_status = 11;</code> 3961 * 3962 * @return Whether the lastErrorStatus field is set. 3963 */ hasLastErrorStatus()3964 public boolean hasLastErrorStatus() { 3965 return ((bitField0_ & 0x00000800) != 0); 3966 } 3967 /** 3968 * 3969 * 3970 * <pre> 3971 * [Output only] The error message of the most recent error, such as a failure 3972 * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this 3973 * field. If no errors have occurred, this field has an empty message 3974 * and the status code 0 == OK. Otherwise, this field is expected to have a 3975 * status code other than OK. 3976 * </pre> 3977 * 3978 * <code>.google.rpc.Status last_error_status = 11;</code> 3979 * 3980 * @return The lastErrorStatus. 3981 */ getLastErrorStatus()3982 public com.google.rpc.Status getLastErrorStatus() { 3983 if (lastErrorStatusBuilder_ == null) { 3984 return lastErrorStatus_ == null 3985 ? com.google.rpc.Status.getDefaultInstance() 3986 : lastErrorStatus_; 3987 } else { 3988 return lastErrorStatusBuilder_.getMessage(); 3989 } 3990 } 3991 /** 3992 * 3993 * 3994 * <pre> 3995 * [Output only] The error message of the most recent error, such as a failure 3996 * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this 3997 * field. If no errors have occurred, this field has an empty message 3998 * and the status code 0 == OK. Otherwise, this field is expected to have a 3999 * status code other than OK. 4000 * </pre> 4001 * 4002 * <code>.google.rpc.Status last_error_status = 11;</code> 4003 */ setLastErrorStatus(com.google.rpc.Status value)4004 public Builder setLastErrorStatus(com.google.rpc.Status value) { 4005 if (lastErrorStatusBuilder_ == null) { 4006 if (value == null) { 4007 throw new NullPointerException(); 4008 } 4009 lastErrorStatus_ = value; 4010 } else { 4011 lastErrorStatusBuilder_.setMessage(value); 4012 } 4013 bitField0_ |= 0x00000800; 4014 onChanged(); 4015 return this; 4016 } 4017 /** 4018 * 4019 * 4020 * <pre> 4021 * [Output only] The error message of the most recent error, such as a failure 4022 * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this 4023 * field. If no errors have occurred, this field has an empty message 4024 * and the status code 0 == OK. Otherwise, this field is expected to have a 4025 * status code other than OK. 4026 * </pre> 4027 * 4028 * <code>.google.rpc.Status last_error_status = 11;</code> 4029 */ setLastErrorStatus(com.google.rpc.Status.Builder builderForValue)4030 public Builder setLastErrorStatus(com.google.rpc.Status.Builder builderForValue) { 4031 if (lastErrorStatusBuilder_ == null) { 4032 lastErrorStatus_ = builderForValue.build(); 4033 } else { 4034 lastErrorStatusBuilder_.setMessage(builderForValue.build()); 4035 } 4036 bitField0_ |= 0x00000800; 4037 onChanged(); 4038 return this; 4039 } 4040 /** 4041 * 4042 * 4043 * <pre> 4044 * [Output only] The error message of the most recent error, such as a failure 4045 * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this 4046 * field. If no errors have occurred, this field has an empty message 4047 * and the status code 0 == OK. Otherwise, this field is expected to have a 4048 * status code other than OK. 4049 * </pre> 4050 * 4051 * <code>.google.rpc.Status last_error_status = 11;</code> 4052 */ mergeLastErrorStatus(com.google.rpc.Status value)4053 public Builder mergeLastErrorStatus(com.google.rpc.Status value) { 4054 if (lastErrorStatusBuilder_ == null) { 4055 if (((bitField0_ & 0x00000800) != 0) 4056 && lastErrorStatus_ != null 4057 && lastErrorStatus_ != com.google.rpc.Status.getDefaultInstance()) { 4058 getLastErrorStatusBuilder().mergeFrom(value); 4059 } else { 4060 lastErrorStatus_ = value; 4061 } 4062 } else { 4063 lastErrorStatusBuilder_.mergeFrom(value); 4064 } 4065 bitField0_ |= 0x00000800; 4066 onChanged(); 4067 return this; 4068 } 4069 /** 4070 * 4071 * 4072 * <pre> 4073 * [Output only] The error message of the most recent error, such as a failure 4074 * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this 4075 * field. If no errors have occurred, this field has an empty message 4076 * and the status code 0 == OK. Otherwise, this field is expected to have a 4077 * status code other than OK. 4078 * </pre> 4079 * 4080 * <code>.google.rpc.Status last_error_status = 11;</code> 4081 */ clearLastErrorStatus()4082 public Builder clearLastErrorStatus() { 4083 bitField0_ = (bitField0_ & ~0x00000800); 4084 lastErrorStatus_ = null; 4085 if (lastErrorStatusBuilder_ != null) { 4086 lastErrorStatusBuilder_.dispose(); 4087 lastErrorStatusBuilder_ = null; 4088 } 4089 onChanged(); 4090 return this; 4091 } 4092 /** 4093 * 4094 * 4095 * <pre> 4096 * [Output only] The error message of the most recent error, such as a failure 4097 * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this 4098 * field. If no errors have occurred, this field has an empty message 4099 * and the status code 0 == OK. Otherwise, this field is expected to have a 4100 * status code other than OK. 4101 * </pre> 4102 * 4103 * <code>.google.rpc.Status last_error_status = 11;</code> 4104 */ getLastErrorStatusBuilder()4105 public com.google.rpc.Status.Builder getLastErrorStatusBuilder() { 4106 bitField0_ |= 0x00000800; 4107 onChanged(); 4108 return getLastErrorStatusFieldBuilder().getBuilder(); 4109 } 4110 /** 4111 * 4112 * 4113 * <pre> 4114 * [Output only] The error message of the most recent error, such as a failure 4115 * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this 4116 * field. If no errors have occurred, this field has an empty message 4117 * and the status code 0 == OK. Otherwise, this field is expected to have a 4118 * status code other than OK. 4119 * </pre> 4120 * 4121 * <code>.google.rpc.Status last_error_status = 11;</code> 4122 */ getLastErrorStatusOrBuilder()4123 public com.google.rpc.StatusOrBuilder getLastErrorStatusOrBuilder() { 4124 if (lastErrorStatusBuilder_ != null) { 4125 return lastErrorStatusBuilder_.getMessageOrBuilder(); 4126 } else { 4127 return lastErrorStatus_ == null 4128 ? com.google.rpc.Status.getDefaultInstance() 4129 : lastErrorStatus_; 4130 } 4131 } 4132 /** 4133 * 4134 * 4135 * <pre> 4136 * [Output only] The error message of the most recent error, such as a failure 4137 * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this 4138 * field. If no errors have occurred, this field has an empty message 4139 * and the status code 0 == OK. Otherwise, this field is expected to have a 4140 * status code other than OK. 4141 * </pre> 4142 * 4143 * <code>.google.rpc.Status last_error_status = 11;</code> 4144 */ 4145 private com.google.protobuf.SingleFieldBuilderV3< 4146 com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> getLastErrorStatusFieldBuilder()4147 getLastErrorStatusFieldBuilder() { 4148 if (lastErrorStatusBuilder_ == null) { 4149 lastErrorStatusBuilder_ = 4150 new com.google.protobuf.SingleFieldBuilderV3< 4151 com.google.rpc.Status, 4152 com.google.rpc.Status.Builder, 4153 com.google.rpc.StatusOrBuilder>( 4154 getLastErrorStatus(), getParentForChildren(), isClean()); 4155 lastErrorStatus_ = null; 4156 } 4157 return lastErrorStatusBuilder_; 4158 } 4159 4160 private com.google.cloud.iot.v1.DeviceConfig config_; 4161 private com.google.protobuf.SingleFieldBuilderV3< 4162 com.google.cloud.iot.v1.DeviceConfig, 4163 com.google.cloud.iot.v1.DeviceConfig.Builder, 4164 com.google.cloud.iot.v1.DeviceConfigOrBuilder> 4165 configBuilder_; 4166 /** 4167 * 4168 * 4169 * <pre> 4170 * The most recent device configuration, which is eventually sent from 4171 * Cloud IoT Core to the device. If not present on creation, the 4172 * configuration will be initialized with an empty payload and version value 4173 * of `1`. To update this field after creation, use the 4174 * `DeviceManager.ModifyCloudToDeviceConfig` method. 4175 * </pre> 4176 * 4177 * <code>.google.cloud.iot.v1.DeviceConfig config = 13;</code> 4178 * 4179 * @return Whether the config field is set. 4180 */ hasConfig()4181 public boolean hasConfig() { 4182 return ((bitField0_ & 0x00001000) != 0); 4183 } 4184 /** 4185 * 4186 * 4187 * <pre> 4188 * The most recent device configuration, which is eventually sent from 4189 * Cloud IoT Core to the device. If not present on creation, the 4190 * configuration will be initialized with an empty payload and version value 4191 * of `1`. To update this field after creation, use the 4192 * `DeviceManager.ModifyCloudToDeviceConfig` method. 4193 * </pre> 4194 * 4195 * <code>.google.cloud.iot.v1.DeviceConfig config = 13;</code> 4196 * 4197 * @return The config. 4198 */ getConfig()4199 public com.google.cloud.iot.v1.DeviceConfig getConfig() { 4200 if (configBuilder_ == null) { 4201 return config_ == null 4202 ? com.google.cloud.iot.v1.DeviceConfig.getDefaultInstance() 4203 : config_; 4204 } else { 4205 return configBuilder_.getMessage(); 4206 } 4207 } 4208 /** 4209 * 4210 * 4211 * <pre> 4212 * The most recent device configuration, which is eventually sent from 4213 * Cloud IoT Core to the device. If not present on creation, the 4214 * configuration will be initialized with an empty payload and version value 4215 * of `1`. To update this field after creation, use the 4216 * `DeviceManager.ModifyCloudToDeviceConfig` method. 4217 * </pre> 4218 * 4219 * <code>.google.cloud.iot.v1.DeviceConfig config = 13;</code> 4220 */ setConfig(com.google.cloud.iot.v1.DeviceConfig value)4221 public Builder setConfig(com.google.cloud.iot.v1.DeviceConfig value) { 4222 if (configBuilder_ == null) { 4223 if (value == null) { 4224 throw new NullPointerException(); 4225 } 4226 config_ = value; 4227 } else { 4228 configBuilder_.setMessage(value); 4229 } 4230 bitField0_ |= 0x00001000; 4231 onChanged(); 4232 return this; 4233 } 4234 /** 4235 * 4236 * 4237 * <pre> 4238 * The most recent device configuration, which is eventually sent from 4239 * Cloud IoT Core to the device. If not present on creation, the 4240 * configuration will be initialized with an empty payload and version value 4241 * of `1`. To update this field after creation, use the 4242 * `DeviceManager.ModifyCloudToDeviceConfig` method. 4243 * </pre> 4244 * 4245 * <code>.google.cloud.iot.v1.DeviceConfig config = 13;</code> 4246 */ setConfig(com.google.cloud.iot.v1.DeviceConfig.Builder builderForValue)4247 public Builder setConfig(com.google.cloud.iot.v1.DeviceConfig.Builder builderForValue) { 4248 if (configBuilder_ == null) { 4249 config_ = builderForValue.build(); 4250 } else { 4251 configBuilder_.setMessage(builderForValue.build()); 4252 } 4253 bitField0_ |= 0x00001000; 4254 onChanged(); 4255 return this; 4256 } 4257 /** 4258 * 4259 * 4260 * <pre> 4261 * The most recent device configuration, which is eventually sent from 4262 * Cloud IoT Core to the device. If not present on creation, the 4263 * configuration will be initialized with an empty payload and version value 4264 * of `1`. To update this field after creation, use the 4265 * `DeviceManager.ModifyCloudToDeviceConfig` method. 4266 * </pre> 4267 * 4268 * <code>.google.cloud.iot.v1.DeviceConfig config = 13;</code> 4269 */ mergeConfig(com.google.cloud.iot.v1.DeviceConfig value)4270 public Builder mergeConfig(com.google.cloud.iot.v1.DeviceConfig value) { 4271 if (configBuilder_ == null) { 4272 if (((bitField0_ & 0x00001000) != 0) 4273 && config_ != null 4274 && config_ != com.google.cloud.iot.v1.DeviceConfig.getDefaultInstance()) { 4275 getConfigBuilder().mergeFrom(value); 4276 } else { 4277 config_ = value; 4278 } 4279 } else { 4280 configBuilder_.mergeFrom(value); 4281 } 4282 bitField0_ |= 0x00001000; 4283 onChanged(); 4284 return this; 4285 } 4286 /** 4287 * 4288 * 4289 * <pre> 4290 * The most recent device configuration, which is eventually sent from 4291 * Cloud IoT Core to the device. If not present on creation, the 4292 * configuration will be initialized with an empty payload and version value 4293 * of `1`. To update this field after creation, use the 4294 * `DeviceManager.ModifyCloudToDeviceConfig` method. 4295 * </pre> 4296 * 4297 * <code>.google.cloud.iot.v1.DeviceConfig config = 13;</code> 4298 */ clearConfig()4299 public Builder clearConfig() { 4300 bitField0_ = (bitField0_ & ~0x00001000); 4301 config_ = null; 4302 if (configBuilder_ != null) { 4303 configBuilder_.dispose(); 4304 configBuilder_ = null; 4305 } 4306 onChanged(); 4307 return this; 4308 } 4309 /** 4310 * 4311 * 4312 * <pre> 4313 * The most recent device configuration, which is eventually sent from 4314 * Cloud IoT Core to the device. If not present on creation, the 4315 * configuration will be initialized with an empty payload and version value 4316 * of `1`. To update this field after creation, use the 4317 * `DeviceManager.ModifyCloudToDeviceConfig` method. 4318 * </pre> 4319 * 4320 * <code>.google.cloud.iot.v1.DeviceConfig config = 13;</code> 4321 */ getConfigBuilder()4322 public com.google.cloud.iot.v1.DeviceConfig.Builder getConfigBuilder() { 4323 bitField0_ |= 0x00001000; 4324 onChanged(); 4325 return getConfigFieldBuilder().getBuilder(); 4326 } 4327 /** 4328 * 4329 * 4330 * <pre> 4331 * The most recent device configuration, which is eventually sent from 4332 * Cloud IoT Core to the device. If not present on creation, the 4333 * configuration will be initialized with an empty payload and version value 4334 * of `1`. To update this field after creation, use the 4335 * `DeviceManager.ModifyCloudToDeviceConfig` method. 4336 * </pre> 4337 * 4338 * <code>.google.cloud.iot.v1.DeviceConfig config = 13;</code> 4339 */ getConfigOrBuilder()4340 public com.google.cloud.iot.v1.DeviceConfigOrBuilder getConfigOrBuilder() { 4341 if (configBuilder_ != null) { 4342 return configBuilder_.getMessageOrBuilder(); 4343 } else { 4344 return config_ == null 4345 ? com.google.cloud.iot.v1.DeviceConfig.getDefaultInstance() 4346 : config_; 4347 } 4348 } 4349 /** 4350 * 4351 * 4352 * <pre> 4353 * The most recent device configuration, which is eventually sent from 4354 * Cloud IoT Core to the device. If not present on creation, the 4355 * configuration will be initialized with an empty payload and version value 4356 * of `1`. To update this field after creation, use the 4357 * `DeviceManager.ModifyCloudToDeviceConfig` method. 4358 * </pre> 4359 * 4360 * <code>.google.cloud.iot.v1.DeviceConfig config = 13;</code> 4361 */ 4362 private com.google.protobuf.SingleFieldBuilderV3< 4363 com.google.cloud.iot.v1.DeviceConfig, 4364 com.google.cloud.iot.v1.DeviceConfig.Builder, 4365 com.google.cloud.iot.v1.DeviceConfigOrBuilder> getConfigFieldBuilder()4366 getConfigFieldBuilder() { 4367 if (configBuilder_ == null) { 4368 configBuilder_ = 4369 new com.google.protobuf.SingleFieldBuilderV3< 4370 com.google.cloud.iot.v1.DeviceConfig, 4371 com.google.cloud.iot.v1.DeviceConfig.Builder, 4372 com.google.cloud.iot.v1.DeviceConfigOrBuilder>( 4373 getConfig(), getParentForChildren(), isClean()); 4374 config_ = null; 4375 } 4376 return configBuilder_; 4377 } 4378 4379 private com.google.cloud.iot.v1.DeviceState state_; 4380 private com.google.protobuf.SingleFieldBuilderV3< 4381 com.google.cloud.iot.v1.DeviceState, 4382 com.google.cloud.iot.v1.DeviceState.Builder, 4383 com.google.cloud.iot.v1.DeviceStateOrBuilder> 4384 stateBuilder_; 4385 /** 4386 * 4387 * 4388 * <pre> 4389 * [Output only] The state most recently received from the device. If no state 4390 * has been reported, this field is not present. 4391 * </pre> 4392 * 4393 * <code>.google.cloud.iot.v1.DeviceState state = 16;</code> 4394 * 4395 * @return Whether the state field is set. 4396 */ hasState()4397 public boolean hasState() { 4398 return ((bitField0_ & 0x00002000) != 0); 4399 } 4400 /** 4401 * 4402 * 4403 * <pre> 4404 * [Output only] The state most recently received from the device. If no state 4405 * has been reported, this field is not present. 4406 * </pre> 4407 * 4408 * <code>.google.cloud.iot.v1.DeviceState state = 16;</code> 4409 * 4410 * @return The state. 4411 */ getState()4412 public com.google.cloud.iot.v1.DeviceState getState() { 4413 if (stateBuilder_ == null) { 4414 return state_ == null ? com.google.cloud.iot.v1.DeviceState.getDefaultInstance() : state_; 4415 } else { 4416 return stateBuilder_.getMessage(); 4417 } 4418 } 4419 /** 4420 * 4421 * 4422 * <pre> 4423 * [Output only] The state most recently received from the device. If no state 4424 * has been reported, this field is not present. 4425 * </pre> 4426 * 4427 * <code>.google.cloud.iot.v1.DeviceState state = 16;</code> 4428 */ setState(com.google.cloud.iot.v1.DeviceState value)4429 public Builder setState(com.google.cloud.iot.v1.DeviceState value) { 4430 if (stateBuilder_ == null) { 4431 if (value == null) { 4432 throw new NullPointerException(); 4433 } 4434 state_ = value; 4435 } else { 4436 stateBuilder_.setMessage(value); 4437 } 4438 bitField0_ |= 0x00002000; 4439 onChanged(); 4440 return this; 4441 } 4442 /** 4443 * 4444 * 4445 * <pre> 4446 * [Output only] The state most recently received from the device. If no state 4447 * has been reported, this field is not present. 4448 * </pre> 4449 * 4450 * <code>.google.cloud.iot.v1.DeviceState state = 16;</code> 4451 */ setState(com.google.cloud.iot.v1.DeviceState.Builder builderForValue)4452 public Builder setState(com.google.cloud.iot.v1.DeviceState.Builder builderForValue) { 4453 if (stateBuilder_ == null) { 4454 state_ = builderForValue.build(); 4455 } else { 4456 stateBuilder_.setMessage(builderForValue.build()); 4457 } 4458 bitField0_ |= 0x00002000; 4459 onChanged(); 4460 return this; 4461 } 4462 /** 4463 * 4464 * 4465 * <pre> 4466 * [Output only] The state most recently received from the device. If no state 4467 * has been reported, this field is not present. 4468 * </pre> 4469 * 4470 * <code>.google.cloud.iot.v1.DeviceState state = 16;</code> 4471 */ mergeState(com.google.cloud.iot.v1.DeviceState value)4472 public Builder mergeState(com.google.cloud.iot.v1.DeviceState value) { 4473 if (stateBuilder_ == null) { 4474 if (((bitField0_ & 0x00002000) != 0) 4475 && state_ != null 4476 && state_ != com.google.cloud.iot.v1.DeviceState.getDefaultInstance()) { 4477 getStateBuilder().mergeFrom(value); 4478 } else { 4479 state_ = value; 4480 } 4481 } else { 4482 stateBuilder_.mergeFrom(value); 4483 } 4484 bitField0_ |= 0x00002000; 4485 onChanged(); 4486 return this; 4487 } 4488 /** 4489 * 4490 * 4491 * <pre> 4492 * [Output only] The state most recently received from the device. If no state 4493 * has been reported, this field is not present. 4494 * </pre> 4495 * 4496 * <code>.google.cloud.iot.v1.DeviceState state = 16;</code> 4497 */ clearState()4498 public Builder clearState() { 4499 bitField0_ = (bitField0_ & ~0x00002000); 4500 state_ = null; 4501 if (stateBuilder_ != null) { 4502 stateBuilder_.dispose(); 4503 stateBuilder_ = null; 4504 } 4505 onChanged(); 4506 return this; 4507 } 4508 /** 4509 * 4510 * 4511 * <pre> 4512 * [Output only] The state most recently received from the device. If no state 4513 * has been reported, this field is not present. 4514 * </pre> 4515 * 4516 * <code>.google.cloud.iot.v1.DeviceState state = 16;</code> 4517 */ getStateBuilder()4518 public com.google.cloud.iot.v1.DeviceState.Builder getStateBuilder() { 4519 bitField0_ |= 0x00002000; 4520 onChanged(); 4521 return getStateFieldBuilder().getBuilder(); 4522 } 4523 /** 4524 * 4525 * 4526 * <pre> 4527 * [Output only] The state most recently received from the device. If no state 4528 * has been reported, this field is not present. 4529 * </pre> 4530 * 4531 * <code>.google.cloud.iot.v1.DeviceState state = 16;</code> 4532 */ getStateOrBuilder()4533 public com.google.cloud.iot.v1.DeviceStateOrBuilder getStateOrBuilder() { 4534 if (stateBuilder_ != null) { 4535 return stateBuilder_.getMessageOrBuilder(); 4536 } else { 4537 return state_ == null ? com.google.cloud.iot.v1.DeviceState.getDefaultInstance() : state_; 4538 } 4539 } 4540 /** 4541 * 4542 * 4543 * <pre> 4544 * [Output only] The state most recently received from the device. If no state 4545 * has been reported, this field is not present. 4546 * </pre> 4547 * 4548 * <code>.google.cloud.iot.v1.DeviceState state = 16;</code> 4549 */ 4550 private com.google.protobuf.SingleFieldBuilderV3< 4551 com.google.cloud.iot.v1.DeviceState, 4552 com.google.cloud.iot.v1.DeviceState.Builder, 4553 com.google.cloud.iot.v1.DeviceStateOrBuilder> getStateFieldBuilder()4554 getStateFieldBuilder() { 4555 if (stateBuilder_ == null) { 4556 stateBuilder_ = 4557 new com.google.protobuf.SingleFieldBuilderV3< 4558 com.google.cloud.iot.v1.DeviceState, 4559 com.google.cloud.iot.v1.DeviceState.Builder, 4560 com.google.cloud.iot.v1.DeviceStateOrBuilder>( 4561 getState(), getParentForChildren(), isClean()); 4562 state_ = null; 4563 } 4564 return stateBuilder_; 4565 } 4566 4567 private int logLevel_ = 0; 4568 /** 4569 * 4570 * 4571 * <pre> 4572 * **Beta Feature** 4573 * The logging verbosity for device activity. If unspecified, 4574 * DeviceRegistry.log_level will be used. 4575 * </pre> 4576 * 4577 * <code>.google.cloud.iot.v1.LogLevel log_level = 21;</code> 4578 * 4579 * @return The enum numeric value on the wire for logLevel. 4580 */ 4581 @java.lang.Override getLogLevelValue()4582 public int getLogLevelValue() { 4583 return logLevel_; 4584 } 4585 /** 4586 * 4587 * 4588 * <pre> 4589 * **Beta Feature** 4590 * The logging verbosity for device activity. If unspecified, 4591 * DeviceRegistry.log_level will be used. 4592 * </pre> 4593 * 4594 * <code>.google.cloud.iot.v1.LogLevel log_level = 21;</code> 4595 * 4596 * @param value The enum numeric value on the wire for logLevel to set. 4597 * @return This builder for chaining. 4598 */ setLogLevelValue(int value)4599 public Builder setLogLevelValue(int value) { 4600 logLevel_ = value; 4601 bitField0_ |= 0x00004000; 4602 onChanged(); 4603 return this; 4604 } 4605 /** 4606 * 4607 * 4608 * <pre> 4609 * **Beta Feature** 4610 * The logging verbosity for device activity. If unspecified, 4611 * DeviceRegistry.log_level will be used. 4612 * </pre> 4613 * 4614 * <code>.google.cloud.iot.v1.LogLevel log_level = 21;</code> 4615 * 4616 * @return The logLevel. 4617 */ 4618 @java.lang.Override getLogLevel()4619 public com.google.cloud.iot.v1.LogLevel getLogLevel() { 4620 com.google.cloud.iot.v1.LogLevel result = 4621 com.google.cloud.iot.v1.LogLevel.forNumber(logLevel_); 4622 return result == null ? com.google.cloud.iot.v1.LogLevel.UNRECOGNIZED : result; 4623 } 4624 /** 4625 * 4626 * 4627 * <pre> 4628 * **Beta Feature** 4629 * The logging verbosity for device activity. If unspecified, 4630 * DeviceRegistry.log_level will be used. 4631 * </pre> 4632 * 4633 * <code>.google.cloud.iot.v1.LogLevel log_level = 21;</code> 4634 * 4635 * @param value The logLevel to set. 4636 * @return This builder for chaining. 4637 */ setLogLevel(com.google.cloud.iot.v1.LogLevel value)4638 public Builder setLogLevel(com.google.cloud.iot.v1.LogLevel value) { 4639 if (value == null) { 4640 throw new NullPointerException(); 4641 } 4642 bitField0_ |= 0x00004000; 4643 logLevel_ = value.getNumber(); 4644 onChanged(); 4645 return this; 4646 } 4647 /** 4648 * 4649 * 4650 * <pre> 4651 * **Beta Feature** 4652 * The logging verbosity for device activity. If unspecified, 4653 * DeviceRegistry.log_level will be used. 4654 * </pre> 4655 * 4656 * <code>.google.cloud.iot.v1.LogLevel log_level = 21;</code> 4657 * 4658 * @return This builder for chaining. 4659 */ clearLogLevel()4660 public Builder clearLogLevel() { 4661 bitField0_ = (bitField0_ & ~0x00004000); 4662 logLevel_ = 0; 4663 onChanged(); 4664 return this; 4665 } 4666 4667 private com.google.protobuf.MapField<java.lang.String, java.lang.String> metadata_; 4668 internalGetMetadata()4669 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMetadata() { 4670 if (metadata_ == null) { 4671 return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); 4672 } 4673 return metadata_; 4674 } 4675 4676 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableMetadata()4677 internalGetMutableMetadata() { 4678 if (metadata_ == null) { 4679 metadata_ = 4680 com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry); 4681 } 4682 if (!metadata_.isMutable()) { 4683 metadata_ = metadata_.copy(); 4684 } 4685 bitField0_ |= 0x00008000; 4686 onChanged(); 4687 return metadata_; 4688 } 4689 getMetadataCount()4690 public int getMetadataCount() { 4691 return internalGetMetadata().getMap().size(); 4692 } 4693 /** 4694 * 4695 * 4696 * <pre> 4697 * The metadata key-value pairs assigned to the device. This metadata is not 4698 * interpreted or indexed by Cloud IoT Core. It can be used to add contextual 4699 * information for the device. 4700 * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and 4701 * be less than 128 bytes in length. 4702 * Values are free-form strings. Each value must be less than or equal to 32 4703 * KB in size. 4704 * The total size of all keys and values must be less than 256 KB, and the 4705 * maximum number of key-value pairs is 500. 4706 * </pre> 4707 * 4708 * <code>map<string, string> metadata = 17;</code> 4709 */ 4710 @java.lang.Override containsMetadata(java.lang.String key)4711 public boolean containsMetadata(java.lang.String key) { 4712 if (key == null) { 4713 throw new NullPointerException("map key"); 4714 } 4715 return internalGetMetadata().getMap().containsKey(key); 4716 } 4717 /** Use {@link #getMetadataMap()} instead. */ 4718 @java.lang.Override 4719 @java.lang.Deprecated getMetadata()4720 public java.util.Map<java.lang.String, java.lang.String> getMetadata() { 4721 return getMetadataMap(); 4722 } 4723 /** 4724 * 4725 * 4726 * <pre> 4727 * The metadata key-value pairs assigned to the device. This metadata is not 4728 * interpreted or indexed by Cloud IoT Core. It can be used to add contextual 4729 * information for the device. 4730 * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and 4731 * be less than 128 bytes in length. 4732 * Values are free-form strings. Each value must be less than or equal to 32 4733 * KB in size. 4734 * The total size of all keys and values must be less than 256 KB, and the 4735 * maximum number of key-value pairs is 500. 4736 * </pre> 4737 * 4738 * <code>map<string, string> metadata = 17;</code> 4739 */ 4740 @java.lang.Override getMetadataMap()4741 public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() { 4742 return internalGetMetadata().getMap(); 4743 } 4744 /** 4745 * 4746 * 4747 * <pre> 4748 * The metadata key-value pairs assigned to the device. This metadata is not 4749 * interpreted or indexed by Cloud IoT Core. It can be used to add contextual 4750 * information for the device. 4751 * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and 4752 * be less than 128 bytes in length. 4753 * Values are free-form strings. Each value must be less than or equal to 32 4754 * KB in size. 4755 * The total size of all keys and values must be less than 256 KB, and the 4756 * maximum number of key-value pairs is 500. 4757 * </pre> 4758 * 4759 * <code>map<string, string> metadata = 17;</code> 4760 */ 4761 @java.lang.Override getMetadataOrDefault( java.lang.String key, java.lang.String defaultValue)4762 public /* nullable */ java.lang.String getMetadataOrDefault( 4763 java.lang.String key, 4764 /* nullable */ 4765 java.lang.String defaultValue) { 4766 if (key == null) { 4767 throw new NullPointerException("map key"); 4768 } 4769 java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); 4770 return map.containsKey(key) ? map.get(key) : defaultValue; 4771 } 4772 /** 4773 * 4774 * 4775 * <pre> 4776 * The metadata key-value pairs assigned to the device. This metadata is not 4777 * interpreted or indexed by Cloud IoT Core. It can be used to add contextual 4778 * information for the device. 4779 * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and 4780 * be less than 128 bytes in length. 4781 * Values are free-form strings. Each value must be less than or equal to 32 4782 * KB in size. 4783 * The total size of all keys and values must be less than 256 KB, and the 4784 * maximum number of key-value pairs is 500. 4785 * </pre> 4786 * 4787 * <code>map<string, string> metadata = 17;</code> 4788 */ 4789 @java.lang.Override getMetadataOrThrow(java.lang.String key)4790 public java.lang.String getMetadataOrThrow(java.lang.String key) { 4791 if (key == null) { 4792 throw new NullPointerException("map key"); 4793 } 4794 java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); 4795 if (!map.containsKey(key)) { 4796 throw new java.lang.IllegalArgumentException(); 4797 } 4798 return map.get(key); 4799 } 4800 clearMetadata()4801 public Builder clearMetadata() { 4802 bitField0_ = (bitField0_ & ~0x00008000); 4803 internalGetMutableMetadata().getMutableMap().clear(); 4804 return this; 4805 } 4806 /** 4807 * 4808 * 4809 * <pre> 4810 * The metadata key-value pairs assigned to the device. This metadata is not 4811 * interpreted or indexed by Cloud IoT Core. It can be used to add contextual 4812 * information for the device. 4813 * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and 4814 * be less than 128 bytes in length. 4815 * Values are free-form strings. Each value must be less than or equal to 32 4816 * KB in size. 4817 * The total size of all keys and values must be less than 256 KB, and the 4818 * maximum number of key-value pairs is 500. 4819 * </pre> 4820 * 4821 * <code>map<string, string> metadata = 17;</code> 4822 */ removeMetadata(java.lang.String key)4823 public Builder removeMetadata(java.lang.String key) { 4824 if (key == null) { 4825 throw new NullPointerException("map key"); 4826 } 4827 internalGetMutableMetadata().getMutableMap().remove(key); 4828 return this; 4829 } 4830 /** Use alternate mutation accessors instead. */ 4831 @java.lang.Deprecated getMutableMetadata()4832 public java.util.Map<java.lang.String, java.lang.String> getMutableMetadata() { 4833 bitField0_ |= 0x00008000; 4834 return internalGetMutableMetadata().getMutableMap(); 4835 } 4836 /** 4837 * 4838 * 4839 * <pre> 4840 * The metadata key-value pairs assigned to the device. This metadata is not 4841 * interpreted or indexed by Cloud IoT Core. It can be used to add contextual 4842 * information for the device. 4843 * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and 4844 * be less than 128 bytes in length. 4845 * Values are free-form strings. Each value must be less than or equal to 32 4846 * KB in size. 4847 * The total size of all keys and values must be less than 256 KB, and the 4848 * maximum number of key-value pairs is 500. 4849 * </pre> 4850 * 4851 * <code>map<string, string> metadata = 17;</code> 4852 */ putMetadata(java.lang.String key, java.lang.String value)4853 public Builder putMetadata(java.lang.String key, java.lang.String value) { 4854 if (key == null) { 4855 throw new NullPointerException("map key"); 4856 } 4857 if (value == null) { 4858 throw new NullPointerException("map value"); 4859 } 4860 internalGetMutableMetadata().getMutableMap().put(key, value); 4861 bitField0_ |= 0x00008000; 4862 return this; 4863 } 4864 /** 4865 * 4866 * 4867 * <pre> 4868 * The metadata key-value pairs assigned to the device. This metadata is not 4869 * interpreted or indexed by Cloud IoT Core. It can be used to add contextual 4870 * information for the device. 4871 * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and 4872 * be less than 128 bytes in length. 4873 * Values are free-form strings. Each value must be less than or equal to 32 4874 * KB in size. 4875 * The total size of all keys and values must be less than 256 KB, and the 4876 * maximum number of key-value pairs is 500. 4877 * </pre> 4878 * 4879 * <code>map<string, string> metadata = 17;</code> 4880 */ putAllMetadata(java.util.Map<java.lang.String, java.lang.String> values)4881 public Builder putAllMetadata(java.util.Map<java.lang.String, java.lang.String> values) { 4882 internalGetMutableMetadata().getMutableMap().putAll(values); 4883 bitField0_ |= 0x00008000; 4884 return this; 4885 } 4886 4887 private com.google.cloud.iot.v1.GatewayConfig gatewayConfig_; 4888 private com.google.protobuf.SingleFieldBuilderV3< 4889 com.google.cloud.iot.v1.GatewayConfig, 4890 com.google.cloud.iot.v1.GatewayConfig.Builder, 4891 com.google.cloud.iot.v1.GatewayConfigOrBuilder> 4892 gatewayConfigBuilder_; 4893 /** 4894 * 4895 * 4896 * <pre> 4897 * Gateway-related configuration and state. 4898 * </pre> 4899 * 4900 * <code>.google.cloud.iot.v1.GatewayConfig gateway_config = 24;</code> 4901 * 4902 * @return Whether the gatewayConfig field is set. 4903 */ hasGatewayConfig()4904 public boolean hasGatewayConfig() { 4905 return ((bitField0_ & 0x00010000) != 0); 4906 } 4907 /** 4908 * 4909 * 4910 * <pre> 4911 * Gateway-related configuration and state. 4912 * </pre> 4913 * 4914 * <code>.google.cloud.iot.v1.GatewayConfig gateway_config = 24;</code> 4915 * 4916 * @return The gatewayConfig. 4917 */ getGatewayConfig()4918 public com.google.cloud.iot.v1.GatewayConfig getGatewayConfig() { 4919 if (gatewayConfigBuilder_ == null) { 4920 return gatewayConfig_ == null 4921 ? com.google.cloud.iot.v1.GatewayConfig.getDefaultInstance() 4922 : gatewayConfig_; 4923 } else { 4924 return gatewayConfigBuilder_.getMessage(); 4925 } 4926 } 4927 /** 4928 * 4929 * 4930 * <pre> 4931 * Gateway-related configuration and state. 4932 * </pre> 4933 * 4934 * <code>.google.cloud.iot.v1.GatewayConfig gateway_config = 24;</code> 4935 */ setGatewayConfig(com.google.cloud.iot.v1.GatewayConfig value)4936 public Builder setGatewayConfig(com.google.cloud.iot.v1.GatewayConfig value) { 4937 if (gatewayConfigBuilder_ == null) { 4938 if (value == null) { 4939 throw new NullPointerException(); 4940 } 4941 gatewayConfig_ = value; 4942 } else { 4943 gatewayConfigBuilder_.setMessage(value); 4944 } 4945 bitField0_ |= 0x00010000; 4946 onChanged(); 4947 return this; 4948 } 4949 /** 4950 * 4951 * 4952 * <pre> 4953 * Gateway-related configuration and state. 4954 * </pre> 4955 * 4956 * <code>.google.cloud.iot.v1.GatewayConfig gateway_config = 24;</code> 4957 */ setGatewayConfig(com.google.cloud.iot.v1.GatewayConfig.Builder builderForValue)4958 public Builder setGatewayConfig(com.google.cloud.iot.v1.GatewayConfig.Builder builderForValue) { 4959 if (gatewayConfigBuilder_ == null) { 4960 gatewayConfig_ = builderForValue.build(); 4961 } else { 4962 gatewayConfigBuilder_.setMessage(builderForValue.build()); 4963 } 4964 bitField0_ |= 0x00010000; 4965 onChanged(); 4966 return this; 4967 } 4968 /** 4969 * 4970 * 4971 * <pre> 4972 * Gateway-related configuration and state. 4973 * </pre> 4974 * 4975 * <code>.google.cloud.iot.v1.GatewayConfig gateway_config = 24;</code> 4976 */ mergeGatewayConfig(com.google.cloud.iot.v1.GatewayConfig value)4977 public Builder mergeGatewayConfig(com.google.cloud.iot.v1.GatewayConfig value) { 4978 if (gatewayConfigBuilder_ == null) { 4979 if (((bitField0_ & 0x00010000) != 0) 4980 && gatewayConfig_ != null 4981 && gatewayConfig_ != com.google.cloud.iot.v1.GatewayConfig.getDefaultInstance()) { 4982 getGatewayConfigBuilder().mergeFrom(value); 4983 } else { 4984 gatewayConfig_ = value; 4985 } 4986 } else { 4987 gatewayConfigBuilder_.mergeFrom(value); 4988 } 4989 bitField0_ |= 0x00010000; 4990 onChanged(); 4991 return this; 4992 } 4993 /** 4994 * 4995 * 4996 * <pre> 4997 * Gateway-related configuration and state. 4998 * </pre> 4999 * 5000 * <code>.google.cloud.iot.v1.GatewayConfig gateway_config = 24;</code> 5001 */ clearGatewayConfig()5002 public Builder clearGatewayConfig() { 5003 bitField0_ = (bitField0_ & ~0x00010000); 5004 gatewayConfig_ = null; 5005 if (gatewayConfigBuilder_ != null) { 5006 gatewayConfigBuilder_.dispose(); 5007 gatewayConfigBuilder_ = null; 5008 } 5009 onChanged(); 5010 return this; 5011 } 5012 /** 5013 * 5014 * 5015 * <pre> 5016 * Gateway-related configuration and state. 5017 * </pre> 5018 * 5019 * <code>.google.cloud.iot.v1.GatewayConfig gateway_config = 24;</code> 5020 */ getGatewayConfigBuilder()5021 public com.google.cloud.iot.v1.GatewayConfig.Builder getGatewayConfigBuilder() { 5022 bitField0_ |= 0x00010000; 5023 onChanged(); 5024 return getGatewayConfigFieldBuilder().getBuilder(); 5025 } 5026 /** 5027 * 5028 * 5029 * <pre> 5030 * Gateway-related configuration and state. 5031 * </pre> 5032 * 5033 * <code>.google.cloud.iot.v1.GatewayConfig gateway_config = 24;</code> 5034 */ getGatewayConfigOrBuilder()5035 public com.google.cloud.iot.v1.GatewayConfigOrBuilder getGatewayConfigOrBuilder() { 5036 if (gatewayConfigBuilder_ != null) { 5037 return gatewayConfigBuilder_.getMessageOrBuilder(); 5038 } else { 5039 return gatewayConfig_ == null 5040 ? com.google.cloud.iot.v1.GatewayConfig.getDefaultInstance() 5041 : gatewayConfig_; 5042 } 5043 } 5044 /** 5045 * 5046 * 5047 * <pre> 5048 * Gateway-related configuration and state. 5049 * </pre> 5050 * 5051 * <code>.google.cloud.iot.v1.GatewayConfig gateway_config = 24;</code> 5052 */ 5053 private com.google.protobuf.SingleFieldBuilderV3< 5054 com.google.cloud.iot.v1.GatewayConfig, 5055 com.google.cloud.iot.v1.GatewayConfig.Builder, 5056 com.google.cloud.iot.v1.GatewayConfigOrBuilder> getGatewayConfigFieldBuilder()5057 getGatewayConfigFieldBuilder() { 5058 if (gatewayConfigBuilder_ == null) { 5059 gatewayConfigBuilder_ = 5060 new com.google.protobuf.SingleFieldBuilderV3< 5061 com.google.cloud.iot.v1.GatewayConfig, 5062 com.google.cloud.iot.v1.GatewayConfig.Builder, 5063 com.google.cloud.iot.v1.GatewayConfigOrBuilder>( 5064 getGatewayConfig(), getParentForChildren(), isClean()); 5065 gatewayConfig_ = null; 5066 } 5067 return gatewayConfigBuilder_; 5068 } 5069 5070 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)5071 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 5072 return super.setUnknownFields(unknownFields); 5073 } 5074 5075 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)5076 public final Builder mergeUnknownFields( 5077 final com.google.protobuf.UnknownFieldSet unknownFields) { 5078 return super.mergeUnknownFields(unknownFields); 5079 } 5080 5081 // @@protoc_insertion_point(builder_scope:google.cloud.iot.v1.Device) 5082 } 5083 5084 // @@protoc_insertion_point(class_scope:google.cloud.iot.v1.Device) 5085 private static final com.google.cloud.iot.v1.Device DEFAULT_INSTANCE; 5086 5087 static { 5088 DEFAULT_INSTANCE = new com.google.cloud.iot.v1.Device(); 5089 } 5090 getDefaultInstance()5091 public static com.google.cloud.iot.v1.Device getDefaultInstance() { 5092 return DEFAULT_INSTANCE; 5093 } 5094 5095 private static final com.google.protobuf.Parser<Device> PARSER = 5096 new com.google.protobuf.AbstractParser<Device>() { 5097 @java.lang.Override 5098 public Device parsePartialFrom( 5099 com.google.protobuf.CodedInputStream input, 5100 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5101 throws com.google.protobuf.InvalidProtocolBufferException { 5102 Builder builder = newBuilder(); 5103 try { 5104 builder.mergeFrom(input, extensionRegistry); 5105 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 5106 throw e.setUnfinishedMessage(builder.buildPartial()); 5107 } catch (com.google.protobuf.UninitializedMessageException e) { 5108 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 5109 } catch (java.io.IOException e) { 5110 throw new com.google.protobuf.InvalidProtocolBufferException(e) 5111 .setUnfinishedMessage(builder.buildPartial()); 5112 } 5113 return builder.buildPartial(); 5114 } 5115 }; 5116 parser()5117 public static com.google.protobuf.Parser<Device> parser() { 5118 return PARSER; 5119 } 5120 5121 @java.lang.Override getParserForType()5122 public com.google.protobuf.Parser<Device> getParserForType() { 5123 return PARSER; 5124 } 5125 5126 @java.lang.Override getDefaultInstanceForType()5127 public com.google.cloud.iot.v1.Device getDefaultInstanceForType() { 5128 return DEFAULT_INSTANCE; 5129 } 5130 } 5131