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 * A container for a group of devices. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.iot.v1.DeviceRegistry} 29 */ 30 public final class DeviceRegistry extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.iot.v1.DeviceRegistry) 33 DeviceRegistryOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use DeviceRegistry.newBuilder() to construct. DeviceRegistry(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private DeviceRegistry(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 DeviceRegistry()40 private DeviceRegistry() { 41 id_ = ""; 42 name_ = ""; 43 eventNotificationConfigs_ = java.util.Collections.emptyList(); 44 logLevel_ = 0; 45 credentials_ = java.util.Collections.emptyList(); 46 } 47 48 @java.lang.Override 49 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)50 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 51 return new DeviceRegistry(); 52 } 53 54 @java.lang.Override getUnknownFields()55 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 56 return this.unknownFields; 57 } 58 getDescriptor()59 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 60 return com.google.cloud.iot.v1.ResourcesProto 61 .internal_static_google_cloud_iot_v1_DeviceRegistry_descriptor; 62 } 63 64 @java.lang.Override 65 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()66 internalGetFieldAccessorTable() { 67 return com.google.cloud.iot.v1.ResourcesProto 68 .internal_static_google_cloud_iot_v1_DeviceRegistry_fieldAccessorTable 69 .ensureFieldAccessorsInitialized( 70 com.google.cloud.iot.v1.DeviceRegistry.class, 71 com.google.cloud.iot.v1.DeviceRegistry.Builder.class); 72 } 73 74 public static final int ID_FIELD_NUMBER = 1; 75 76 @SuppressWarnings("serial") 77 private volatile java.lang.Object id_ = ""; 78 /** 79 * 80 * 81 * <pre> 82 * The identifier of this device registry. For example, `myRegistry`. 83 * </pre> 84 * 85 * <code>string id = 1;</code> 86 * 87 * @return The id. 88 */ 89 @java.lang.Override getId()90 public java.lang.String getId() { 91 java.lang.Object ref = id_; 92 if (ref instanceof java.lang.String) { 93 return (java.lang.String) ref; 94 } else { 95 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 96 java.lang.String s = bs.toStringUtf8(); 97 id_ = s; 98 return s; 99 } 100 } 101 /** 102 * 103 * 104 * <pre> 105 * The identifier of this device registry. For example, `myRegistry`. 106 * </pre> 107 * 108 * <code>string id = 1;</code> 109 * 110 * @return The bytes for id. 111 */ 112 @java.lang.Override getIdBytes()113 public com.google.protobuf.ByteString getIdBytes() { 114 java.lang.Object ref = id_; 115 if (ref instanceof java.lang.String) { 116 com.google.protobuf.ByteString b = 117 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 118 id_ = b; 119 return b; 120 } else { 121 return (com.google.protobuf.ByteString) ref; 122 } 123 } 124 125 public static final int NAME_FIELD_NUMBER = 2; 126 127 @SuppressWarnings("serial") 128 private volatile java.lang.Object name_ = ""; 129 /** 130 * 131 * 132 * <pre> 133 * The resource path name. For example, 134 * `projects/example-project/locations/us-central1/registries/my-registry`. 135 * </pre> 136 * 137 * <code>string name = 2;</code> 138 * 139 * @return The name. 140 */ 141 @java.lang.Override getName()142 public java.lang.String getName() { 143 java.lang.Object ref = name_; 144 if (ref instanceof java.lang.String) { 145 return (java.lang.String) ref; 146 } else { 147 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 148 java.lang.String s = bs.toStringUtf8(); 149 name_ = s; 150 return s; 151 } 152 } 153 /** 154 * 155 * 156 * <pre> 157 * The resource path name. For example, 158 * `projects/example-project/locations/us-central1/registries/my-registry`. 159 * </pre> 160 * 161 * <code>string name = 2;</code> 162 * 163 * @return The bytes for name. 164 */ 165 @java.lang.Override getNameBytes()166 public com.google.protobuf.ByteString getNameBytes() { 167 java.lang.Object ref = name_; 168 if (ref instanceof java.lang.String) { 169 com.google.protobuf.ByteString b = 170 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 171 name_ = b; 172 return b; 173 } else { 174 return (com.google.protobuf.ByteString) ref; 175 } 176 } 177 178 public static final int EVENT_NOTIFICATION_CONFIGS_FIELD_NUMBER = 10; 179 180 @SuppressWarnings("serial") 181 private java.util.List<com.google.cloud.iot.v1.EventNotificationConfig> eventNotificationConfigs_; 182 /** 183 * 184 * 185 * <pre> 186 * The configuration for notification of telemetry events received from the 187 * device. All telemetry events that were successfully published by the 188 * device and acknowledged by Cloud IoT Core are guaranteed to be 189 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 190 * only the first matching configuration is used. If you try to publish a 191 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 192 * for the device's registry, the connection closes automatically. If you try 193 * to do so using an HTTP connection, an error is returned. Up to 10 194 * configurations may be provided. 195 * </pre> 196 * 197 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 198 * </code> 199 */ 200 @java.lang.Override 201 public java.util.List<com.google.cloud.iot.v1.EventNotificationConfig> getEventNotificationConfigsList()202 getEventNotificationConfigsList() { 203 return eventNotificationConfigs_; 204 } 205 /** 206 * 207 * 208 * <pre> 209 * The configuration for notification of telemetry events received from the 210 * device. All telemetry events that were successfully published by the 211 * device and acknowledged by Cloud IoT Core are guaranteed to be 212 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 213 * only the first matching configuration is used. If you try to publish a 214 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 215 * for the device's registry, the connection closes automatically. If you try 216 * to do so using an HTTP connection, an error is returned. Up to 10 217 * configurations may be provided. 218 * </pre> 219 * 220 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 221 * </code> 222 */ 223 @java.lang.Override 224 public java.util.List<? extends com.google.cloud.iot.v1.EventNotificationConfigOrBuilder> getEventNotificationConfigsOrBuilderList()225 getEventNotificationConfigsOrBuilderList() { 226 return eventNotificationConfigs_; 227 } 228 /** 229 * 230 * 231 * <pre> 232 * The configuration for notification of telemetry events received from the 233 * device. All telemetry events that were successfully published by the 234 * device and acknowledged by Cloud IoT Core are guaranteed to be 235 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 236 * only the first matching configuration is used. If you try to publish a 237 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 238 * for the device's registry, the connection closes automatically. If you try 239 * to do so using an HTTP connection, an error is returned. Up to 10 240 * configurations may be provided. 241 * </pre> 242 * 243 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 244 * </code> 245 */ 246 @java.lang.Override getEventNotificationConfigsCount()247 public int getEventNotificationConfigsCount() { 248 return eventNotificationConfigs_.size(); 249 } 250 /** 251 * 252 * 253 * <pre> 254 * The configuration for notification of telemetry events received from the 255 * device. All telemetry events that were successfully published by the 256 * device and acknowledged by Cloud IoT Core are guaranteed to be 257 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 258 * only the first matching configuration is used. If you try to publish a 259 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 260 * for the device's registry, the connection closes automatically. If you try 261 * to do so using an HTTP connection, an error is returned. Up to 10 262 * configurations may be provided. 263 * </pre> 264 * 265 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 266 * </code> 267 */ 268 @java.lang.Override getEventNotificationConfigs(int index)269 public com.google.cloud.iot.v1.EventNotificationConfig getEventNotificationConfigs(int index) { 270 return eventNotificationConfigs_.get(index); 271 } 272 /** 273 * 274 * 275 * <pre> 276 * The configuration for notification of telemetry events received from the 277 * device. All telemetry events that were successfully published by the 278 * device and acknowledged by Cloud IoT Core are guaranteed to be 279 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 280 * only the first matching configuration is used. If you try to publish a 281 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 282 * for the device's registry, the connection closes automatically. If you try 283 * to do so using an HTTP connection, an error is returned. Up to 10 284 * configurations may be provided. 285 * </pre> 286 * 287 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 288 * </code> 289 */ 290 @java.lang.Override 291 public com.google.cloud.iot.v1.EventNotificationConfigOrBuilder getEventNotificationConfigsOrBuilder(int index)292 getEventNotificationConfigsOrBuilder(int index) { 293 return eventNotificationConfigs_.get(index); 294 } 295 296 public static final int STATE_NOTIFICATION_CONFIG_FIELD_NUMBER = 7; 297 private com.google.cloud.iot.v1.StateNotificationConfig stateNotificationConfig_; 298 /** 299 * 300 * 301 * <pre> 302 * The configuration for notification of new states received from the device. 303 * State updates are guaranteed to be stored in the state history, but 304 * notifications to Cloud Pub/Sub are not guaranteed. For example, if 305 * permissions are misconfigured or the specified topic doesn't exist, no 306 * notification will be published but the state will still be stored in Cloud 307 * IoT Core. 308 * </pre> 309 * 310 * <code>.google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7;</code> 311 * 312 * @return Whether the stateNotificationConfig field is set. 313 */ 314 @java.lang.Override hasStateNotificationConfig()315 public boolean hasStateNotificationConfig() { 316 return stateNotificationConfig_ != null; 317 } 318 /** 319 * 320 * 321 * <pre> 322 * The configuration for notification of new states received from the device. 323 * State updates are guaranteed to be stored in the state history, but 324 * notifications to Cloud Pub/Sub are not guaranteed. For example, if 325 * permissions are misconfigured or the specified topic doesn't exist, no 326 * notification will be published but the state will still be stored in Cloud 327 * IoT Core. 328 * </pre> 329 * 330 * <code>.google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7;</code> 331 * 332 * @return The stateNotificationConfig. 333 */ 334 @java.lang.Override getStateNotificationConfig()335 public com.google.cloud.iot.v1.StateNotificationConfig getStateNotificationConfig() { 336 return stateNotificationConfig_ == null 337 ? com.google.cloud.iot.v1.StateNotificationConfig.getDefaultInstance() 338 : stateNotificationConfig_; 339 } 340 /** 341 * 342 * 343 * <pre> 344 * The configuration for notification of new states received from the device. 345 * State updates are guaranteed to be stored in the state history, but 346 * notifications to Cloud Pub/Sub are not guaranteed. For example, if 347 * permissions are misconfigured or the specified topic doesn't exist, no 348 * notification will be published but the state will still be stored in Cloud 349 * IoT Core. 350 * </pre> 351 * 352 * <code>.google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7;</code> 353 */ 354 @java.lang.Override 355 public com.google.cloud.iot.v1.StateNotificationConfigOrBuilder getStateNotificationConfigOrBuilder()356 getStateNotificationConfigOrBuilder() { 357 return stateNotificationConfig_ == null 358 ? com.google.cloud.iot.v1.StateNotificationConfig.getDefaultInstance() 359 : stateNotificationConfig_; 360 } 361 362 public static final int MQTT_CONFIG_FIELD_NUMBER = 4; 363 private com.google.cloud.iot.v1.MqttConfig mqttConfig_; 364 /** 365 * 366 * 367 * <pre> 368 * The MQTT configuration for this device registry. 369 * </pre> 370 * 371 * <code>.google.cloud.iot.v1.MqttConfig mqtt_config = 4;</code> 372 * 373 * @return Whether the mqttConfig field is set. 374 */ 375 @java.lang.Override hasMqttConfig()376 public boolean hasMqttConfig() { 377 return mqttConfig_ != null; 378 } 379 /** 380 * 381 * 382 * <pre> 383 * The MQTT configuration for this device registry. 384 * </pre> 385 * 386 * <code>.google.cloud.iot.v1.MqttConfig mqtt_config = 4;</code> 387 * 388 * @return The mqttConfig. 389 */ 390 @java.lang.Override getMqttConfig()391 public com.google.cloud.iot.v1.MqttConfig getMqttConfig() { 392 return mqttConfig_ == null 393 ? com.google.cloud.iot.v1.MqttConfig.getDefaultInstance() 394 : mqttConfig_; 395 } 396 /** 397 * 398 * 399 * <pre> 400 * The MQTT configuration for this device registry. 401 * </pre> 402 * 403 * <code>.google.cloud.iot.v1.MqttConfig mqtt_config = 4;</code> 404 */ 405 @java.lang.Override getMqttConfigOrBuilder()406 public com.google.cloud.iot.v1.MqttConfigOrBuilder getMqttConfigOrBuilder() { 407 return mqttConfig_ == null 408 ? com.google.cloud.iot.v1.MqttConfig.getDefaultInstance() 409 : mqttConfig_; 410 } 411 412 public static final int HTTP_CONFIG_FIELD_NUMBER = 9; 413 private com.google.cloud.iot.v1.HttpConfig httpConfig_; 414 /** 415 * 416 * 417 * <pre> 418 * The DeviceService (HTTP) configuration for this device registry. 419 * </pre> 420 * 421 * <code>.google.cloud.iot.v1.HttpConfig http_config = 9;</code> 422 * 423 * @return Whether the httpConfig field is set. 424 */ 425 @java.lang.Override hasHttpConfig()426 public boolean hasHttpConfig() { 427 return httpConfig_ != null; 428 } 429 /** 430 * 431 * 432 * <pre> 433 * The DeviceService (HTTP) configuration for this device registry. 434 * </pre> 435 * 436 * <code>.google.cloud.iot.v1.HttpConfig http_config = 9;</code> 437 * 438 * @return The httpConfig. 439 */ 440 @java.lang.Override getHttpConfig()441 public com.google.cloud.iot.v1.HttpConfig getHttpConfig() { 442 return httpConfig_ == null 443 ? com.google.cloud.iot.v1.HttpConfig.getDefaultInstance() 444 : httpConfig_; 445 } 446 /** 447 * 448 * 449 * <pre> 450 * The DeviceService (HTTP) configuration for this device registry. 451 * </pre> 452 * 453 * <code>.google.cloud.iot.v1.HttpConfig http_config = 9;</code> 454 */ 455 @java.lang.Override getHttpConfigOrBuilder()456 public com.google.cloud.iot.v1.HttpConfigOrBuilder getHttpConfigOrBuilder() { 457 return httpConfig_ == null 458 ? com.google.cloud.iot.v1.HttpConfig.getDefaultInstance() 459 : httpConfig_; 460 } 461 462 public static final int LOG_LEVEL_FIELD_NUMBER = 11; 463 private int logLevel_ = 0; 464 /** 465 * 466 * 467 * <pre> 468 * **Beta Feature** 469 * The default logging verbosity for activity from devices in this registry. 470 * The verbosity level can be overridden by Device.log_level. 471 * </pre> 472 * 473 * <code>.google.cloud.iot.v1.LogLevel log_level = 11;</code> 474 * 475 * @return The enum numeric value on the wire for logLevel. 476 */ 477 @java.lang.Override getLogLevelValue()478 public int getLogLevelValue() { 479 return logLevel_; 480 } 481 /** 482 * 483 * 484 * <pre> 485 * **Beta Feature** 486 * The default logging verbosity for activity from devices in this registry. 487 * The verbosity level can be overridden by Device.log_level. 488 * </pre> 489 * 490 * <code>.google.cloud.iot.v1.LogLevel log_level = 11;</code> 491 * 492 * @return The logLevel. 493 */ 494 @java.lang.Override getLogLevel()495 public com.google.cloud.iot.v1.LogLevel getLogLevel() { 496 com.google.cloud.iot.v1.LogLevel result = com.google.cloud.iot.v1.LogLevel.forNumber(logLevel_); 497 return result == null ? com.google.cloud.iot.v1.LogLevel.UNRECOGNIZED : result; 498 } 499 500 public static final int CREDENTIALS_FIELD_NUMBER = 8; 501 502 @SuppressWarnings("serial") 503 private java.util.List<com.google.cloud.iot.v1.RegistryCredential> credentials_; 504 /** 505 * 506 * 507 * <pre> 508 * The credentials used to verify the device credentials. No more than 10 509 * credentials can be bound to a single registry at a time. The verification 510 * process occurs at the time of device creation or update. If this field is 511 * empty, no verification is performed. Otherwise, the credentials of a newly 512 * created device or added credentials of an updated device should be signed 513 * with one of these registry credentials. 514 * Note, however, that existing devices will never be affected by 515 * modifications to this list of credentials: after a device has been 516 * successfully created in a registry, it should be able to connect even if 517 * its registry credentials are revoked, deleted, or modified. 518 * </pre> 519 * 520 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 521 */ 522 @java.lang.Override getCredentialsList()523 public java.util.List<com.google.cloud.iot.v1.RegistryCredential> getCredentialsList() { 524 return credentials_; 525 } 526 /** 527 * 528 * 529 * <pre> 530 * The credentials used to verify the device credentials. No more than 10 531 * credentials can be bound to a single registry at a time. The verification 532 * process occurs at the time of device creation or update. If this field is 533 * empty, no verification is performed. Otherwise, the credentials of a newly 534 * created device or added credentials of an updated device should be signed 535 * with one of these registry credentials. 536 * Note, however, that existing devices will never be affected by 537 * modifications to this list of credentials: after a device has been 538 * successfully created in a registry, it should be able to connect even if 539 * its registry credentials are revoked, deleted, or modified. 540 * </pre> 541 * 542 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 543 */ 544 @java.lang.Override 545 public java.util.List<? extends com.google.cloud.iot.v1.RegistryCredentialOrBuilder> getCredentialsOrBuilderList()546 getCredentialsOrBuilderList() { 547 return credentials_; 548 } 549 /** 550 * 551 * 552 * <pre> 553 * The credentials used to verify the device credentials. No more than 10 554 * credentials can be bound to a single registry at a time. The verification 555 * process occurs at the time of device creation or update. If this field is 556 * empty, no verification is performed. Otherwise, the credentials of a newly 557 * created device or added credentials of an updated device should be signed 558 * with one of these registry credentials. 559 * Note, however, that existing devices will never be affected by 560 * modifications to this list of credentials: after a device has been 561 * successfully created in a registry, it should be able to connect even if 562 * its registry credentials are revoked, deleted, or modified. 563 * </pre> 564 * 565 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 566 */ 567 @java.lang.Override getCredentialsCount()568 public int getCredentialsCount() { 569 return credentials_.size(); 570 } 571 /** 572 * 573 * 574 * <pre> 575 * The credentials used to verify the device credentials. No more than 10 576 * credentials can be bound to a single registry at a time. The verification 577 * process occurs at the time of device creation or update. If this field is 578 * empty, no verification is performed. Otherwise, the credentials of a newly 579 * created device or added credentials of an updated device should be signed 580 * with one of these registry credentials. 581 * Note, however, that existing devices will never be affected by 582 * modifications to this list of credentials: after a device has been 583 * successfully created in a registry, it should be able to connect even if 584 * its registry credentials are revoked, deleted, or modified. 585 * </pre> 586 * 587 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 588 */ 589 @java.lang.Override getCredentials(int index)590 public com.google.cloud.iot.v1.RegistryCredential getCredentials(int index) { 591 return credentials_.get(index); 592 } 593 /** 594 * 595 * 596 * <pre> 597 * The credentials used to verify the device credentials. No more than 10 598 * credentials can be bound to a single registry at a time. The verification 599 * process occurs at the time of device creation or update. If this field is 600 * empty, no verification is performed. Otherwise, the credentials of a newly 601 * created device or added credentials of an updated device should be signed 602 * with one of these registry credentials. 603 * Note, however, that existing devices will never be affected by 604 * modifications to this list of credentials: after a device has been 605 * successfully created in a registry, it should be able to connect even if 606 * its registry credentials are revoked, deleted, or modified. 607 * </pre> 608 * 609 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 610 */ 611 @java.lang.Override getCredentialsOrBuilder(int index)612 public com.google.cloud.iot.v1.RegistryCredentialOrBuilder getCredentialsOrBuilder(int index) { 613 return credentials_.get(index); 614 } 615 616 private byte memoizedIsInitialized = -1; 617 618 @java.lang.Override isInitialized()619 public final boolean isInitialized() { 620 byte isInitialized = memoizedIsInitialized; 621 if (isInitialized == 1) return true; 622 if (isInitialized == 0) return false; 623 624 memoizedIsInitialized = 1; 625 return true; 626 } 627 628 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)629 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 630 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { 631 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); 632 } 633 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 634 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); 635 } 636 if (mqttConfig_ != null) { 637 output.writeMessage(4, getMqttConfig()); 638 } 639 if (stateNotificationConfig_ != null) { 640 output.writeMessage(7, getStateNotificationConfig()); 641 } 642 for (int i = 0; i < credentials_.size(); i++) { 643 output.writeMessage(8, credentials_.get(i)); 644 } 645 if (httpConfig_ != null) { 646 output.writeMessage(9, getHttpConfig()); 647 } 648 for (int i = 0; i < eventNotificationConfigs_.size(); i++) { 649 output.writeMessage(10, eventNotificationConfigs_.get(i)); 650 } 651 if (logLevel_ != com.google.cloud.iot.v1.LogLevel.LOG_LEVEL_UNSPECIFIED.getNumber()) { 652 output.writeEnum(11, logLevel_); 653 } 654 getUnknownFields().writeTo(output); 655 } 656 657 @java.lang.Override getSerializedSize()658 public int getSerializedSize() { 659 int size = memoizedSize; 660 if (size != -1) return size; 661 662 size = 0; 663 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { 664 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); 665 } 666 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 667 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); 668 } 669 if (mqttConfig_ != null) { 670 size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getMqttConfig()); 671 } 672 if (stateNotificationConfig_ != null) { 673 size += 674 com.google.protobuf.CodedOutputStream.computeMessageSize(7, getStateNotificationConfig()); 675 } 676 for (int i = 0; i < credentials_.size(); i++) { 677 size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, credentials_.get(i)); 678 } 679 if (httpConfig_ != null) { 680 size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getHttpConfig()); 681 } 682 for (int i = 0; i < eventNotificationConfigs_.size(); i++) { 683 size += 684 com.google.protobuf.CodedOutputStream.computeMessageSize( 685 10, eventNotificationConfigs_.get(i)); 686 } 687 if (logLevel_ != com.google.cloud.iot.v1.LogLevel.LOG_LEVEL_UNSPECIFIED.getNumber()) { 688 size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, logLevel_); 689 } 690 size += getUnknownFields().getSerializedSize(); 691 memoizedSize = size; 692 return size; 693 } 694 695 @java.lang.Override equals(final java.lang.Object obj)696 public boolean equals(final java.lang.Object obj) { 697 if (obj == this) { 698 return true; 699 } 700 if (!(obj instanceof com.google.cloud.iot.v1.DeviceRegistry)) { 701 return super.equals(obj); 702 } 703 com.google.cloud.iot.v1.DeviceRegistry other = (com.google.cloud.iot.v1.DeviceRegistry) obj; 704 705 if (!getId().equals(other.getId())) return false; 706 if (!getName().equals(other.getName())) return false; 707 if (!getEventNotificationConfigsList().equals(other.getEventNotificationConfigsList())) 708 return false; 709 if (hasStateNotificationConfig() != other.hasStateNotificationConfig()) return false; 710 if (hasStateNotificationConfig()) { 711 if (!getStateNotificationConfig().equals(other.getStateNotificationConfig())) return false; 712 } 713 if (hasMqttConfig() != other.hasMqttConfig()) return false; 714 if (hasMqttConfig()) { 715 if (!getMqttConfig().equals(other.getMqttConfig())) return false; 716 } 717 if (hasHttpConfig() != other.hasHttpConfig()) return false; 718 if (hasHttpConfig()) { 719 if (!getHttpConfig().equals(other.getHttpConfig())) return false; 720 } 721 if (logLevel_ != other.logLevel_) return false; 722 if (!getCredentialsList().equals(other.getCredentialsList())) return false; 723 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 724 return true; 725 } 726 727 @java.lang.Override hashCode()728 public int hashCode() { 729 if (memoizedHashCode != 0) { 730 return memoizedHashCode; 731 } 732 int hash = 41; 733 hash = (19 * hash) + getDescriptor().hashCode(); 734 hash = (37 * hash) + ID_FIELD_NUMBER; 735 hash = (53 * hash) + getId().hashCode(); 736 hash = (37 * hash) + NAME_FIELD_NUMBER; 737 hash = (53 * hash) + getName().hashCode(); 738 if (getEventNotificationConfigsCount() > 0) { 739 hash = (37 * hash) + EVENT_NOTIFICATION_CONFIGS_FIELD_NUMBER; 740 hash = (53 * hash) + getEventNotificationConfigsList().hashCode(); 741 } 742 if (hasStateNotificationConfig()) { 743 hash = (37 * hash) + STATE_NOTIFICATION_CONFIG_FIELD_NUMBER; 744 hash = (53 * hash) + getStateNotificationConfig().hashCode(); 745 } 746 if (hasMqttConfig()) { 747 hash = (37 * hash) + MQTT_CONFIG_FIELD_NUMBER; 748 hash = (53 * hash) + getMqttConfig().hashCode(); 749 } 750 if (hasHttpConfig()) { 751 hash = (37 * hash) + HTTP_CONFIG_FIELD_NUMBER; 752 hash = (53 * hash) + getHttpConfig().hashCode(); 753 } 754 hash = (37 * hash) + LOG_LEVEL_FIELD_NUMBER; 755 hash = (53 * hash) + logLevel_; 756 if (getCredentialsCount() > 0) { 757 hash = (37 * hash) + CREDENTIALS_FIELD_NUMBER; 758 hash = (53 * hash) + getCredentialsList().hashCode(); 759 } 760 hash = (29 * hash) + getUnknownFields().hashCode(); 761 memoizedHashCode = hash; 762 return hash; 763 } 764 parseFrom(java.nio.ByteBuffer data)765 public static com.google.cloud.iot.v1.DeviceRegistry parseFrom(java.nio.ByteBuffer data) 766 throws com.google.protobuf.InvalidProtocolBufferException { 767 return PARSER.parseFrom(data); 768 } 769 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)770 public static com.google.cloud.iot.v1.DeviceRegistry parseFrom( 771 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 772 throws com.google.protobuf.InvalidProtocolBufferException { 773 return PARSER.parseFrom(data, extensionRegistry); 774 } 775 parseFrom( com.google.protobuf.ByteString data)776 public static com.google.cloud.iot.v1.DeviceRegistry parseFrom( 777 com.google.protobuf.ByteString data) 778 throws com.google.protobuf.InvalidProtocolBufferException { 779 return PARSER.parseFrom(data); 780 } 781 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)782 public static com.google.cloud.iot.v1.DeviceRegistry parseFrom( 783 com.google.protobuf.ByteString data, 784 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 785 throws com.google.protobuf.InvalidProtocolBufferException { 786 return PARSER.parseFrom(data, extensionRegistry); 787 } 788 parseFrom(byte[] data)789 public static com.google.cloud.iot.v1.DeviceRegistry parseFrom(byte[] data) 790 throws com.google.protobuf.InvalidProtocolBufferException { 791 return PARSER.parseFrom(data); 792 } 793 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)794 public static com.google.cloud.iot.v1.DeviceRegistry parseFrom( 795 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 796 throws com.google.protobuf.InvalidProtocolBufferException { 797 return PARSER.parseFrom(data, extensionRegistry); 798 } 799 parseFrom(java.io.InputStream input)800 public static com.google.cloud.iot.v1.DeviceRegistry parseFrom(java.io.InputStream input) 801 throws java.io.IOException { 802 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 803 } 804 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)805 public static com.google.cloud.iot.v1.DeviceRegistry parseFrom( 806 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 807 throws java.io.IOException { 808 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 809 PARSER, input, extensionRegistry); 810 } 811 parseDelimitedFrom(java.io.InputStream input)812 public static com.google.cloud.iot.v1.DeviceRegistry parseDelimitedFrom(java.io.InputStream input) 813 throws java.io.IOException { 814 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 815 } 816 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)817 public static com.google.cloud.iot.v1.DeviceRegistry parseDelimitedFrom( 818 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 819 throws java.io.IOException { 820 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 821 PARSER, input, extensionRegistry); 822 } 823 parseFrom( com.google.protobuf.CodedInputStream input)824 public static com.google.cloud.iot.v1.DeviceRegistry parseFrom( 825 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 826 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 827 } 828 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)829 public static com.google.cloud.iot.v1.DeviceRegistry parseFrom( 830 com.google.protobuf.CodedInputStream input, 831 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 832 throws java.io.IOException { 833 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 834 PARSER, input, extensionRegistry); 835 } 836 837 @java.lang.Override newBuilderForType()838 public Builder newBuilderForType() { 839 return newBuilder(); 840 } 841 newBuilder()842 public static Builder newBuilder() { 843 return DEFAULT_INSTANCE.toBuilder(); 844 } 845 newBuilder(com.google.cloud.iot.v1.DeviceRegistry prototype)846 public static Builder newBuilder(com.google.cloud.iot.v1.DeviceRegistry prototype) { 847 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 848 } 849 850 @java.lang.Override toBuilder()851 public Builder toBuilder() { 852 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 853 } 854 855 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)856 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 857 Builder builder = new Builder(parent); 858 return builder; 859 } 860 /** 861 * 862 * 863 * <pre> 864 * A container for a group of devices. 865 * </pre> 866 * 867 * Protobuf type {@code google.cloud.iot.v1.DeviceRegistry} 868 */ 869 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 870 implements 871 // @@protoc_insertion_point(builder_implements:google.cloud.iot.v1.DeviceRegistry) 872 com.google.cloud.iot.v1.DeviceRegistryOrBuilder { getDescriptor()873 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 874 return com.google.cloud.iot.v1.ResourcesProto 875 .internal_static_google_cloud_iot_v1_DeviceRegistry_descriptor; 876 } 877 878 @java.lang.Override 879 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()880 internalGetFieldAccessorTable() { 881 return com.google.cloud.iot.v1.ResourcesProto 882 .internal_static_google_cloud_iot_v1_DeviceRegistry_fieldAccessorTable 883 .ensureFieldAccessorsInitialized( 884 com.google.cloud.iot.v1.DeviceRegistry.class, 885 com.google.cloud.iot.v1.DeviceRegistry.Builder.class); 886 } 887 888 // Construct using com.google.cloud.iot.v1.DeviceRegistry.newBuilder() Builder()889 private Builder() {} 890 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)891 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 892 super(parent); 893 } 894 895 @java.lang.Override clear()896 public Builder clear() { 897 super.clear(); 898 bitField0_ = 0; 899 id_ = ""; 900 name_ = ""; 901 if (eventNotificationConfigsBuilder_ == null) { 902 eventNotificationConfigs_ = java.util.Collections.emptyList(); 903 } else { 904 eventNotificationConfigs_ = null; 905 eventNotificationConfigsBuilder_.clear(); 906 } 907 bitField0_ = (bitField0_ & ~0x00000004); 908 stateNotificationConfig_ = null; 909 if (stateNotificationConfigBuilder_ != null) { 910 stateNotificationConfigBuilder_.dispose(); 911 stateNotificationConfigBuilder_ = null; 912 } 913 mqttConfig_ = null; 914 if (mqttConfigBuilder_ != null) { 915 mqttConfigBuilder_.dispose(); 916 mqttConfigBuilder_ = null; 917 } 918 httpConfig_ = null; 919 if (httpConfigBuilder_ != null) { 920 httpConfigBuilder_.dispose(); 921 httpConfigBuilder_ = null; 922 } 923 logLevel_ = 0; 924 if (credentialsBuilder_ == null) { 925 credentials_ = java.util.Collections.emptyList(); 926 } else { 927 credentials_ = null; 928 credentialsBuilder_.clear(); 929 } 930 bitField0_ = (bitField0_ & ~0x00000080); 931 return this; 932 } 933 934 @java.lang.Override getDescriptorForType()935 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 936 return com.google.cloud.iot.v1.ResourcesProto 937 .internal_static_google_cloud_iot_v1_DeviceRegistry_descriptor; 938 } 939 940 @java.lang.Override getDefaultInstanceForType()941 public com.google.cloud.iot.v1.DeviceRegistry getDefaultInstanceForType() { 942 return com.google.cloud.iot.v1.DeviceRegistry.getDefaultInstance(); 943 } 944 945 @java.lang.Override build()946 public com.google.cloud.iot.v1.DeviceRegistry build() { 947 com.google.cloud.iot.v1.DeviceRegistry result = buildPartial(); 948 if (!result.isInitialized()) { 949 throw newUninitializedMessageException(result); 950 } 951 return result; 952 } 953 954 @java.lang.Override buildPartial()955 public com.google.cloud.iot.v1.DeviceRegistry buildPartial() { 956 com.google.cloud.iot.v1.DeviceRegistry result = 957 new com.google.cloud.iot.v1.DeviceRegistry(this); 958 buildPartialRepeatedFields(result); 959 if (bitField0_ != 0) { 960 buildPartial0(result); 961 } 962 onBuilt(); 963 return result; 964 } 965 buildPartialRepeatedFields(com.google.cloud.iot.v1.DeviceRegistry result)966 private void buildPartialRepeatedFields(com.google.cloud.iot.v1.DeviceRegistry result) { 967 if (eventNotificationConfigsBuilder_ == null) { 968 if (((bitField0_ & 0x00000004) != 0)) { 969 eventNotificationConfigs_ = 970 java.util.Collections.unmodifiableList(eventNotificationConfigs_); 971 bitField0_ = (bitField0_ & ~0x00000004); 972 } 973 result.eventNotificationConfigs_ = eventNotificationConfigs_; 974 } else { 975 result.eventNotificationConfigs_ = eventNotificationConfigsBuilder_.build(); 976 } 977 if (credentialsBuilder_ == null) { 978 if (((bitField0_ & 0x00000080) != 0)) { 979 credentials_ = java.util.Collections.unmodifiableList(credentials_); 980 bitField0_ = (bitField0_ & ~0x00000080); 981 } 982 result.credentials_ = credentials_; 983 } else { 984 result.credentials_ = credentialsBuilder_.build(); 985 } 986 } 987 buildPartial0(com.google.cloud.iot.v1.DeviceRegistry result)988 private void buildPartial0(com.google.cloud.iot.v1.DeviceRegistry result) { 989 int from_bitField0_ = bitField0_; 990 if (((from_bitField0_ & 0x00000001) != 0)) { 991 result.id_ = id_; 992 } 993 if (((from_bitField0_ & 0x00000002) != 0)) { 994 result.name_ = name_; 995 } 996 if (((from_bitField0_ & 0x00000008) != 0)) { 997 result.stateNotificationConfig_ = 998 stateNotificationConfigBuilder_ == null 999 ? stateNotificationConfig_ 1000 : stateNotificationConfigBuilder_.build(); 1001 } 1002 if (((from_bitField0_ & 0x00000010) != 0)) { 1003 result.mqttConfig_ = mqttConfigBuilder_ == null ? mqttConfig_ : mqttConfigBuilder_.build(); 1004 } 1005 if (((from_bitField0_ & 0x00000020) != 0)) { 1006 result.httpConfig_ = httpConfigBuilder_ == null ? httpConfig_ : httpConfigBuilder_.build(); 1007 } 1008 if (((from_bitField0_ & 0x00000040) != 0)) { 1009 result.logLevel_ = logLevel_; 1010 } 1011 } 1012 1013 @java.lang.Override clone()1014 public Builder clone() { 1015 return super.clone(); 1016 } 1017 1018 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1019 public Builder setField( 1020 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1021 return super.setField(field, value); 1022 } 1023 1024 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1025 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1026 return super.clearField(field); 1027 } 1028 1029 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1030 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1031 return super.clearOneof(oneof); 1032 } 1033 1034 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1035 public Builder setRepeatedField( 1036 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1037 return super.setRepeatedField(field, index, value); 1038 } 1039 1040 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1041 public Builder addRepeatedField( 1042 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1043 return super.addRepeatedField(field, value); 1044 } 1045 1046 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1047 public Builder mergeFrom(com.google.protobuf.Message other) { 1048 if (other instanceof com.google.cloud.iot.v1.DeviceRegistry) { 1049 return mergeFrom((com.google.cloud.iot.v1.DeviceRegistry) other); 1050 } else { 1051 super.mergeFrom(other); 1052 return this; 1053 } 1054 } 1055 mergeFrom(com.google.cloud.iot.v1.DeviceRegistry other)1056 public Builder mergeFrom(com.google.cloud.iot.v1.DeviceRegistry other) { 1057 if (other == com.google.cloud.iot.v1.DeviceRegistry.getDefaultInstance()) return this; 1058 if (!other.getId().isEmpty()) { 1059 id_ = other.id_; 1060 bitField0_ |= 0x00000001; 1061 onChanged(); 1062 } 1063 if (!other.getName().isEmpty()) { 1064 name_ = other.name_; 1065 bitField0_ |= 0x00000002; 1066 onChanged(); 1067 } 1068 if (eventNotificationConfigsBuilder_ == null) { 1069 if (!other.eventNotificationConfigs_.isEmpty()) { 1070 if (eventNotificationConfigs_.isEmpty()) { 1071 eventNotificationConfigs_ = other.eventNotificationConfigs_; 1072 bitField0_ = (bitField0_ & ~0x00000004); 1073 } else { 1074 ensureEventNotificationConfigsIsMutable(); 1075 eventNotificationConfigs_.addAll(other.eventNotificationConfigs_); 1076 } 1077 onChanged(); 1078 } 1079 } else { 1080 if (!other.eventNotificationConfigs_.isEmpty()) { 1081 if (eventNotificationConfigsBuilder_.isEmpty()) { 1082 eventNotificationConfigsBuilder_.dispose(); 1083 eventNotificationConfigsBuilder_ = null; 1084 eventNotificationConfigs_ = other.eventNotificationConfigs_; 1085 bitField0_ = (bitField0_ & ~0x00000004); 1086 eventNotificationConfigsBuilder_ = 1087 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1088 ? getEventNotificationConfigsFieldBuilder() 1089 : null; 1090 } else { 1091 eventNotificationConfigsBuilder_.addAllMessages(other.eventNotificationConfigs_); 1092 } 1093 } 1094 } 1095 if (other.hasStateNotificationConfig()) { 1096 mergeStateNotificationConfig(other.getStateNotificationConfig()); 1097 } 1098 if (other.hasMqttConfig()) { 1099 mergeMqttConfig(other.getMqttConfig()); 1100 } 1101 if (other.hasHttpConfig()) { 1102 mergeHttpConfig(other.getHttpConfig()); 1103 } 1104 if (other.logLevel_ != 0) { 1105 setLogLevelValue(other.getLogLevelValue()); 1106 } 1107 if (credentialsBuilder_ == null) { 1108 if (!other.credentials_.isEmpty()) { 1109 if (credentials_.isEmpty()) { 1110 credentials_ = other.credentials_; 1111 bitField0_ = (bitField0_ & ~0x00000080); 1112 } else { 1113 ensureCredentialsIsMutable(); 1114 credentials_.addAll(other.credentials_); 1115 } 1116 onChanged(); 1117 } 1118 } else { 1119 if (!other.credentials_.isEmpty()) { 1120 if (credentialsBuilder_.isEmpty()) { 1121 credentialsBuilder_.dispose(); 1122 credentialsBuilder_ = null; 1123 credentials_ = other.credentials_; 1124 bitField0_ = (bitField0_ & ~0x00000080); 1125 credentialsBuilder_ = 1126 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1127 ? getCredentialsFieldBuilder() 1128 : null; 1129 } else { 1130 credentialsBuilder_.addAllMessages(other.credentials_); 1131 } 1132 } 1133 } 1134 this.mergeUnknownFields(other.getUnknownFields()); 1135 onChanged(); 1136 return this; 1137 } 1138 1139 @java.lang.Override isInitialized()1140 public final boolean isInitialized() { 1141 return true; 1142 } 1143 1144 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1145 public Builder mergeFrom( 1146 com.google.protobuf.CodedInputStream input, 1147 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1148 throws java.io.IOException { 1149 if (extensionRegistry == null) { 1150 throw new java.lang.NullPointerException(); 1151 } 1152 try { 1153 boolean done = false; 1154 while (!done) { 1155 int tag = input.readTag(); 1156 switch (tag) { 1157 case 0: 1158 done = true; 1159 break; 1160 case 10: 1161 { 1162 id_ = input.readStringRequireUtf8(); 1163 bitField0_ |= 0x00000001; 1164 break; 1165 } // case 10 1166 case 18: 1167 { 1168 name_ = input.readStringRequireUtf8(); 1169 bitField0_ |= 0x00000002; 1170 break; 1171 } // case 18 1172 case 34: 1173 { 1174 input.readMessage(getMqttConfigFieldBuilder().getBuilder(), extensionRegistry); 1175 bitField0_ |= 0x00000010; 1176 break; 1177 } // case 34 1178 case 58: 1179 { 1180 input.readMessage( 1181 getStateNotificationConfigFieldBuilder().getBuilder(), extensionRegistry); 1182 bitField0_ |= 0x00000008; 1183 break; 1184 } // case 58 1185 case 66: 1186 { 1187 com.google.cloud.iot.v1.RegistryCredential m = 1188 input.readMessage( 1189 com.google.cloud.iot.v1.RegistryCredential.parser(), extensionRegistry); 1190 if (credentialsBuilder_ == null) { 1191 ensureCredentialsIsMutable(); 1192 credentials_.add(m); 1193 } else { 1194 credentialsBuilder_.addMessage(m); 1195 } 1196 break; 1197 } // case 66 1198 case 74: 1199 { 1200 input.readMessage(getHttpConfigFieldBuilder().getBuilder(), extensionRegistry); 1201 bitField0_ |= 0x00000020; 1202 break; 1203 } // case 74 1204 case 82: 1205 { 1206 com.google.cloud.iot.v1.EventNotificationConfig m = 1207 input.readMessage( 1208 com.google.cloud.iot.v1.EventNotificationConfig.parser(), 1209 extensionRegistry); 1210 if (eventNotificationConfigsBuilder_ == null) { 1211 ensureEventNotificationConfigsIsMutable(); 1212 eventNotificationConfigs_.add(m); 1213 } else { 1214 eventNotificationConfigsBuilder_.addMessage(m); 1215 } 1216 break; 1217 } // case 82 1218 case 88: 1219 { 1220 logLevel_ = input.readEnum(); 1221 bitField0_ |= 0x00000040; 1222 break; 1223 } // case 88 1224 default: 1225 { 1226 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1227 done = true; // was an endgroup tag 1228 } 1229 break; 1230 } // default: 1231 } // switch (tag) 1232 } // while (!done) 1233 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1234 throw e.unwrapIOException(); 1235 } finally { 1236 onChanged(); 1237 } // finally 1238 return this; 1239 } 1240 1241 private int bitField0_; 1242 1243 private java.lang.Object id_ = ""; 1244 /** 1245 * 1246 * 1247 * <pre> 1248 * The identifier of this device registry. For example, `myRegistry`. 1249 * </pre> 1250 * 1251 * <code>string id = 1;</code> 1252 * 1253 * @return The id. 1254 */ getId()1255 public java.lang.String getId() { 1256 java.lang.Object ref = id_; 1257 if (!(ref instanceof java.lang.String)) { 1258 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1259 java.lang.String s = bs.toStringUtf8(); 1260 id_ = s; 1261 return s; 1262 } else { 1263 return (java.lang.String) ref; 1264 } 1265 } 1266 /** 1267 * 1268 * 1269 * <pre> 1270 * The identifier of this device registry. For example, `myRegistry`. 1271 * </pre> 1272 * 1273 * <code>string id = 1;</code> 1274 * 1275 * @return The bytes for id. 1276 */ getIdBytes()1277 public com.google.protobuf.ByteString getIdBytes() { 1278 java.lang.Object ref = id_; 1279 if (ref instanceof String) { 1280 com.google.protobuf.ByteString b = 1281 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1282 id_ = b; 1283 return b; 1284 } else { 1285 return (com.google.protobuf.ByteString) ref; 1286 } 1287 } 1288 /** 1289 * 1290 * 1291 * <pre> 1292 * The identifier of this device registry. For example, `myRegistry`. 1293 * </pre> 1294 * 1295 * <code>string id = 1;</code> 1296 * 1297 * @param value The id to set. 1298 * @return This builder for chaining. 1299 */ setId(java.lang.String value)1300 public Builder setId(java.lang.String value) { 1301 if (value == null) { 1302 throw new NullPointerException(); 1303 } 1304 id_ = value; 1305 bitField0_ |= 0x00000001; 1306 onChanged(); 1307 return this; 1308 } 1309 /** 1310 * 1311 * 1312 * <pre> 1313 * The identifier of this device registry. For example, `myRegistry`. 1314 * </pre> 1315 * 1316 * <code>string id = 1;</code> 1317 * 1318 * @return This builder for chaining. 1319 */ clearId()1320 public Builder clearId() { 1321 id_ = getDefaultInstance().getId(); 1322 bitField0_ = (bitField0_ & ~0x00000001); 1323 onChanged(); 1324 return this; 1325 } 1326 /** 1327 * 1328 * 1329 * <pre> 1330 * The identifier of this device registry. For example, `myRegistry`. 1331 * </pre> 1332 * 1333 * <code>string id = 1;</code> 1334 * 1335 * @param value The bytes for id to set. 1336 * @return This builder for chaining. 1337 */ setIdBytes(com.google.protobuf.ByteString value)1338 public Builder setIdBytes(com.google.protobuf.ByteString value) { 1339 if (value == null) { 1340 throw new NullPointerException(); 1341 } 1342 checkByteStringIsUtf8(value); 1343 id_ = value; 1344 bitField0_ |= 0x00000001; 1345 onChanged(); 1346 return this; 1347 } 1348 1349 private java.lang.Object name_ = ""; 1350 /** 1351 * 1352 * 1353 * <pre> 1354 * The resource path name. For example, 1355 * `projects/example-project/locations/us-central1/registries/my-registry`. 1356 * </pre> 1357 * 1358 * <code>string name = 2;</code> 1359 * 1360 * @return The name. 1361 */ getName()1362 public java.lang.String getName() { 1363 java.lang.Object ref = name_; 1364 if (!(ref instanceof java.lang.String)) { 1365 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1366 java.lang.String s = bs.toStringUtf8(); 1367 name_ = s; 1368 return s; 1369 } else { 1370 return (java.lang.String) ref; 1371 } 1372 } 1373 /** 1374 * 1375 * 1376 * <pre> 1377 * The resource path name. For example, 1378 * `projects/example-project/locations/us-central1/registries/my-registry`. 1379 * </pre> 1380 * 1381 * <code>string name = 2;</code> 1382 * 1383 * @return The bytes for name. 1384 */ getNameBytes()1385 public com.google.protobuf.ByteString getNameBytes() { 1386 java.lang.Object ref = name_; 1387 if (ref instanceof String) { 1388 com.google.protobuf.ByteString b = 1389 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1390 name_ = b; 1391 return b; 1392 } else { 1393 return (com.google.protobuf.ByteString) ref; 1394 } 1395 } 1396 /** 1397 * 1398 * 1399 * <pre> 1400 * The resource path name. For example, 1401 * `projects/example-project/locations/us-central1/registries/my-registry`. 1402 * </pre> 1403 * 1404 * <code>string name = 2;</code> 1405 * 1406 * @param value The name to set. 1407 * @return This builder for chaining. 1408 */ setName(java.lang.String value)1409 public Builder setName(java.lang.String value) { 1410 if (value == null) { 1411 throw new NullPointerException(); 1412 } 1413 name_ = value; 1414 bitField0_ |= 0x00000002; 1415 onChanged(); 1416 return this; 1417 } 1418 /** 1419 * 1420 * 1421 * <pre> 1422 * The resource path name. For example, 1423 * `projects/example-project/locations/us-central1/registries/my-registry`. 1424 * </pre> 1425 * 1426 * <code>string name = 2;</code> 1427 * 1428 * @return This builder for chaining. 1429 */ clearName()1430 public Builder clearName() { 1431 name_ = getDefaultInstance().getName(); 1432 bitField0_ = (bitField0_ & ~0x00000002); 1433 onChanged(); 1434 return this; 1435 } 1436 /** 1437 * 1438 * 1439 * <pre> 1440 * The resource path name. For example, 1441 * `projects/example-project/locations/us-central1/registries/my-registry`. 1442 * </pre> 1443 * 1444 * <code>string name = 2;</code> 1445 * 1446 * @param value The bytes for name to set. 1447 * @return This builder for chaining. 1448 */ setNameBytes(com.google.protobuf.ByteString value)1449 public Builder setNameBytes(com.google.protobuf.ByteString value) { 1450 if (value == null) { 1451 throw new NullPointerException(); 1452 } 1453 checkByteStringIsUtf8(value); 1454 name_ = value; 1455 bitField0_ |= 0x00000002; 1456 onChanged(); 1457 return this; 1458 } 1459 1460 private java.util.List<com.google.cloud.iot.v1.EventNotificationConfig> 1461 eventNotificationConfigs_ = java.util.Collections.emptyList(); 1462 ensureEventNotificationConfigsIsMutable()1463 private void ensureEventNotificationConfigsIsMutable() { 1464 if (!((bitField0_ & 0x00000004) != 0)) { 1465 eventNotificationConfigs_ = 1466 new java.util.ArrayList<com.google.cloud.iot.v1.EventNotificationConfig>( 1467 eventNotificationConfigs_); 1468 bitField0_ |= 0x00000004; 1469 } 1470 } 1471 1472 private com.google.protobuf.RepeatedFieldBuilderV3< 1473 com.google.cloud.iot.v1.EventNotificationConfig, 1474 com.google.cloud.iot.v1.EventNotificationConfig.Builder, 1475 com.google.cloud.iot.v1.EventNotificationConfigOrBuilder> 1476 eventNotificationConfigsBuilder_; 1477 1478 /** 1479 * 1480 * 1481 * <pre> 1482 * The configuration for notification of telemetry events received from the 1483 * device. All telemetry events that were successfully published by the 1484 * device and acknowledged by Cloud IoT Core are guaranteed to be 1485 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1486 * only the first matching configuration is used. If you try to publish a 1487 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1488 * for the device's registry, the connection closes automatically. If you try 1489 * to do so using an HTTP connection, an error is returned. Up to 10 1490 * configurations may be provided. 1491 * </pre> 1492 * 1493 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1494 * </code> 1495 */ 1496 public java.util.List<com.google.cloud.iot.v1.EventNotificationConfig> getEventNotificationConfigsList()1497 getEventNotificationConfigsList() { 1498 if (eventNotificationConfigsBuilder_ == null) { 1499 return java.util.Collections.unmodifiableList(eventNotificationConfigs_); 1500 } else { 1501 return eventNotificationConfigsBuilder_.getMessageList(); 1502 } 1503 } 1504 /** 1505 * 1506 * 1507 * <pre> 1508 * The configuration for notification of telemetry events received from the 1509 * device. All telemetry events that were successfully published by the 1510 * device and acknowledged by Cloud IoT Core are guaranteed to be 1511 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1512 * only the first matching configuration is used. If you try to publish a 1513 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1514 * for the device's registry, the connection closes automatically. If you try 1515 * to do so using an HTTP connection, an error is returned. Up to 10 1516 * configurations may be provided. 1517 * </pre> 1518 * 1519 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1520 * </code> 1521 */ getEventNotificationConfigsCount()1522 public int getEventNotificationConfigsCount() { 1523 if (eventNotificationConfigsBuilder_ == null) { 1524 return eventNotificationConfigs_.size(); 1525 } else { 1526 return eventNotificationConfigsBuilder_.getCount(); 1527 } 1528 } 1529 /** 1530 * 1531 * 1532 * <pre> 1533 * The configuration for notification of telemetry events received from the 1534 * device. All telemetry events that were successfully published by the 1535 * device and acknowledged by Cloud IoT Core are guaranteed to be 1536 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1537 * only the first matching configuration is used. If you try to publish a 1538 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1539 * for the device's registry, the connection closes automatically. If you try 1540 * to do so using an HTTP connection, an error is returned. Up to 10 1541 * configurations may be provided. 1542 * </pre> 1543 * 1544 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1545 * </code> 1546 */ getEventNotificationConfigs(int index)1547 public com.google.cloud.iot.v1.EventNotificationConfig getEventNotificationConfigs(int index) { 1548 if (eventNotificationConfigsBuilder_ == null) { 1549 return eventNotificationConfigs_.get(index); 1550 } else { 1551 return eventNotificationConfigsBuilder_.getMessage(index); 1552 } 1553 } 1554 /** 1555 * 1556 * 1557 * <pre> 1558 * The configuration for notification of telemetry events received from the 1559 * device. All telemetry events that were successfully published by the 1560 * device and acknowledged by Cloud IoT Core are guaranteed to be 1561 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1562 * only the first matching configuration is used. If you try to publish a 1563 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1564 * for the device's registry, the connection closes automatically. If you try 1565 * to do so using an HTTP connection, an error is returned. Up to 10 1566 * configurations may be provided. 1567 * </pre> 1568 * 1569 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1570 * </code> 1571 */ setEventNotificationConfigs( int index, com.google.cloud.iot.v1.EventNotificationConfig value)1572 public Builder setEventNotificationConfigs( 1573 int index, com.google.cloud.iot.v1.EventNotificationConfig value) { 1574 if (eventNotificationConfigsBuilder_ == null) { 1575 if (value == null) { 1576 throw new NullPointerException(); 1577 } 1578 ensureEventNotificationConfigsIsMutable(); 1579 eventNotificationConfigs_.set(index, value); 1580 onChanged(); 1581 } else { 1582 eventNotificationConfigsBuilder_.setMessage(index, value); 1583 } 1584 return this; 1585 } 1586 /** 1587 * 1588 * 1589 * <pre> 1590 * The configuration for notification of telemetry events received from the 1591 * device. All telemetry events that were successfully published by the 1592 * device and acknowledged by Cloud IoT Core are guaranteed to be 1593 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1594 * only the first matching configuration is used. If you try to publish a 1595 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1596 * for the device's registry, the connection closes automatically. If you try 1597 * to do so using an HTTP connection, an error is returned. Up to 10 1598 * configurations may be provided. 1599 * </pre> 1600 * 1601 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1602 * </code> 1603 */ setEventNotificationConfigs( int index, com.google.cloud.iot.v1.EventNotificationConfig.Builder builderForValue)1604 public Builder setEventNotificationConfigs( 1605 int index, com.google.cloud.iot.v1.EventNotificationConfig.Builder builderForValue) { 1606 if (eventNotificationConfigsBuilder_ == null) { 1607 ensureEventNotificationConfigsIsMutable(); 1608 eventNotificationConfigs_.set(index, builderForValue.build()); 1609 onChanged(); 1610 } else { 1611 eventNotificationConfigsBuilder_.setMessage(index, builderForValue.build()); 1612 } 1613 return this; 1614 } 1615 /** 1616 * 1617 * 1618 * <pre> 1619 * The configuration for notification of telemetry events received from the 1620 * device. All telemetry events that were successfully published by the 1621 * device and acknowledged by Cloud IoT Core are guaranteed to be 1622 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1623 * only the first matching configuration is used. If you try to publish a 1624 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1625 * for the device's registry, the connection closes automatically. If you try 1626 * to do so using an HTTP connection, an error is returned. Up to 10 1627 * configurations may be provided. 1628 * </pre> 1629 * 1630 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1631 * </code> 1632 */ addEventNotificationConfigs( com.google.cloud.iot.v1.EventNotificationConfig value)1633 public Builder addEventNotificationConfigs( 1634 com.google.cloud.iot.v1.EventNotificationConfig value) { 1635 if (eventNotificationConfigsBuilder_ == null) { 1636 if (value == null) { 1637 throw new NullPointerException(); 1638 } 1639 ensureEventNotificationConfigsIsMutable(); 1640 eventNotificationConfigs_.add(value); 1641 onChanged(); 1642 } else { 1643 eventNotificationConfigsBuilder_.addMessage(value); 1644 } 1645 return this; 1646 } 1647 /** 1648 * 1649 * 1650 * <pre> 1651 * The configuration for notification of telemetry events received from the 1652 * device. All telemetry events that were successfully published by the 1653 * device and acknowledged by Cloud IoT Core are guaranteed to be 1654 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1655 * only the first matching configuration is used. If you try to publish a 1656 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1657 * for the device's registry, the connection closes automatically. If you try 1658 * to do so using an HTTP connection, an error is returned. Up to 10 1659 * configurations may be provided. 1660 * </pre> 1661 * 1662 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1663 * </code> 1664 */ addEventNotificationConfigs( int index, com.google.cloud.iot.v1.EventNotificationConfig value)1665 public Builder addEventNotificationConfigs( 1666 int index, com.google.cloud.iot.v1.EventNotificationConfig value) { 1667 if (eventNotificationConfigsBuilder_ == null) { 1668 if (value == null) { 1669 throw new NullPointerException(); 1670 } 1671 ensureEventNotificationConfigsIsMutable(); 1672 eventNotificationConfigs_.add(index, value); 1673 onChanged(); 1674 } else { 1675 eventNotificationConfigsBuilder_.addMessage(index, value); 1676 } 1677 return this; 1678 } 1679 /** 1680 * 1681 * 1682 * <pre> 1683 * The configuration for notification of telemetry events received from the 1684 * device. All telemetry events that were successfully published by the 1685 * device and acknowledged by Cloud IoT Core are guaranteed to be 1686 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1687 * only the first matching configuration is used. If you try to publish a 1688 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1689 * for the device's registry, the connection closes automatically. If you try 1690 * to do so using an HTTP connection, an error is returned. Up to 10 1691 * configurations may be provided. 1692 * </pre> 1693 * 1694 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1695 * </code> 1696 */ addEventNotificationConfigs( com.google.cloud.iot.v1.EventNotificationConfig.Builder builderForValue)1697 public Builder addEventNotificationConfigs( 1698 com.google.cloud.iot.v1.EventNotificationConfig.Builder builderForValue) { 1699 if (eventNotificationConfigsBuilder_ == null) { 1700 ensureEventNotificationConfigsIsMutable(); 1701 eventNotificationConfigs_.add(builderForValue.build()); 1702 onChanged(); 1703 } else { 1704 eventNotificationConfigsBuilder_.addMessage(builderForValue.build()); 1705 } 1706 return this; 1707 } 1708 /** 1709 * 1710 * 1711 * <pre> 1712 * The configuration for notification of telemetry events received from the 1713 * device. All telemetry events that were successfully published by the 1714 * device and acknowledged by Cloud IoT Core are guaranteed to be 1715 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1716 * only the first matching configuration is used. If you try to publish a 1717 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1718 * for the device's registry, the connection closes automatically. If you try 1719 * to do so using an HTTP connection, an error is returned. Up to 10 1720 * configurations may be provided. 1721 * </pre> 1722 * 1723 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1724 * </code> 1725 */ addEventNotificationConfigs( int index, com.google.cloud.iot.v1.EventNotificationConfig.Builder builderForValue)1726 public Builder addEventNotificationConfigs( 1727 int index, com.google.cloud.iot.v1.EventNotificationConfig.Builder builderForValue) { 1728 if (eventNotificationConfigsBuilder_ == null) { 1729 ensureEventNotificationConfigsIsMutable(); 1730 eventNotificationConfigs_.add(index, builderForValue.build()); 1731 onChanged(); 1732 } else { 1733 eventNotificationConfigsBuilder_.addMessage(index, builderForValue.build()); 1734 } 1735 return this; 1736 } 1737 /** 1738 * 1739 * 1740 * <pre> 1741 * The configuration for notification of telemetry events received from the 1742 * device. All telemetry events that were successfully published by the 1743 * device and acknowledged by Cloud IoT Core are guaranteed to be 1744 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1745 * only the first matching configuration is used. If you try to publish a 1746 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1747 * for the device's registry, the connection closes automatically. If you try 1748 * to do so using an HTTP connection, an error is returned. Up to 10 1749 * configurations may be provided. 1750 * </pre> 1751 * 1752 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1753 * </code> 1754 */ addAllEventNotificationConfigs( java.lang.Iterable<? extends com.google.cloud.iot.v1.EventNotificationConfig> values)1755 public Builder addAllEventNotificationConfigs( 1756 java.lang.Iterable<? extends com.google.cloud.iot.v1.EventNotificationConfig> values) { 1757 if (eventNotificationConfigsBuilder_ == null) { 1758 ensureEventNotificationConfigsIsMutable(); 1759 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, eventNotificationConfigs_); 1760 onChanged(); 1761 } else { 1762 eventNotificationConfigsBuilder_.addAllMessages(values); 1763 } 1764 return this; 1765 } 1766 /** 1767 * 1768 * 1769 * <pre> 1770 * The configuration for notification of telemetry events received from the 1771 * device. All telemetry events that were successfully published by the 1772 * device and acknowledged by Cloud IoT Core are guaranteed to be 1773 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1774 * only the first matching configuration is used. If you try to publish a 1775 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1776 * for the device's registry, the connection closes automatically. If you try 1777 * to do so using an HTTP connection, an error is returned. Up to 10 1778 * configurations may be provided. 1779 * </pre> 1780 * 1781 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1782 * </code> 1783 */ clearEventNotificationConfigs()1784 public Builder clearEventNotificationConfigs() { 1785 if (eventNotificationConfigsBuilder_ == null) { 1786 eventNotificationConfigs_ = java.util.Collections.emptyList(); 1787 bitField0_ = (bitField0_ & ~0x00000004); 1788 onChanged(); 1789 } else { 1790 eventNotificationConfigsBuilder_.clear(); 1791 } 1792 return this; 1793 } 1794 /** 1795 * 1796 * 1797 * <pre> 1798 * The configuration for notification of telemetry events received from the 1799 * device. All telemetry events that were successfully published by the 1800 * device and acknowledged by Cloud IoT Core are guaranteed to be 1801 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1802 * only the first matching configuration is used. If you try to publish a 1803 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1804 * for the device's registry, the connection closes automatically. If you try 1805 * to do so using an HTTP connection, an error is returned. Up to 10 1806 * configurations may be provided. 1807 * </pre> 1808 * 1809 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1810 * </code> 1811 */ removeEventNotificationConfigs(int index)1812 public Builder removeEventNotificationConfigs(int index) { 1813 if (eventNotificationConfigsBuilder_ == null) { 1814 ensureEventNotificationConfigsIsMutable(); 1815 eventNotificationConfigs_.remove(index); 1816 onChanged(); 1817 } else { 1818 eventNotificationConfigsBuilder_.remove(index); 1819 } 1820 return this; 1821 } 1822 /** 1823 * 1824 * 1825 * <pre> 1826 * The configuration for notification of telemetry events received from the 1827 * device. All telemetry events that were successfully published by the 1828 * device and acknowledged by Cloud IoT Core are guaranteed to be 1829 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1830 * only the first matching configuration is used. If you try to publish a 1831 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1832 * for the device's registry, the connection closes automatically. If you try 1833 * to do so using an HTTP connection, an error is returned. Up to 10 1834 * configurations may be provided. 1835 * </pre> 1836 * 1837 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1838 * </code> 1839 */ 1840 public com.google.cloud.iot.v1.EventNotificationConfig.Builder getEventNotificationConfigsBuilder(int index)1841 getEventNotificationConfigsBuilder(int index) { 1842 return getEventNotificationConfigsFieldBuilder().getBuilder(index); 1843 } 1844 /** 1845 * 1846 * 1847 * <pre> 1848 * The configuration for notification of telemetry events received from the 1849 * device. All telemetry events that were successfully published by the 1850 * device and acknowledged by Cloud IoT Core are guaranteed to be 1851 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1852 * only the first matching configuration is used. If you try to publish a 1853 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1854 * for the device's registry, the connection closes automatically. If you try 1855 * to do so using an HTTP connection, an error is returned. Up to 10 1856 * configurations may be provided. 1857 * </pre> 1858 * 1859 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1860 * </code> 1861 */ 1862 public com.google.cloud.iot.v1.EventNotificationConfigOrBuilder getEventNotificationConfigsOrBuilder(int index)1863 getEventNotificationConfigsOrBuilder(int index) { 1864 if (eventNotificationConfigsBuilder_ == null) { 1865 return eventNotificationConfigs_.get(index); 1866 } else { 1867 return eventNotificationConfigsBuilder_.getMessageOrBuilder(index); 1868 } 1869 } 1870 /** 1871 * 1872 * 1873 * <pre> 1874 * The configuration for notification of telemetry events received from the 1875 * device. All telemetry events that were successfully published by the 1876 * device and acknowledged by Cloud IoT Core are guaranteed to be 1877 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1878 * only the first matching configuration is used. If you try to publish a 1879 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1880 * for the device's registry, the connection closes automatically. If you try 1881 * to do so using an HTTP connection, an error is returned. Up to 10 1882 * configurations may be provided. 1883 * </pre> 1884 * 1885 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1886 * </code> 1887 */ 1888 public java.util.List<? extends com.google.cloud.iot.v1.EventNotificationConfigOrBuilder> getEventNotificationConfigsOrBuilderList()1889 getEventNotificationConfigsOrBuilderList() { 1890 if (eventNotificationConfigsBuilder_ != null) { 1891 return eventNotificationConfigsBuilder_.getMessageOrBuilderList(); 1892 } else { 1893 return java.util.Collections.unmodifiableList(eventNotificationConfigs_); 1894 } 1895 } 1896 /** 1897 * 1898 * 1899 * <pre> 1900 * The configuration for notification of telemetry events received from the 1901 * device. All telemetry events that were successfully published by the 1902 * device and acknowledged by Cloud IoT Core are guaranteed to be 1903 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1904 * only the first matching configuration is used. If you try to publish a 1905 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1906 * for the device's registry, the connection closes automatically. If you try 1907 * to do so using an HTTP connection, an error is returned. Up to 10 1908 * configurations may be provided. 1909 * </pre> 1910 * 1911 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1912 * </code> 1913 */ 1914 public com.google.cloud.iot.v1.EventNotificationConfig.Builder addEventNotificationConfigsBuilder()1915 addEventNotificationConfigsBuilder() { 1916 return getEventNotificationConfigsFieldBuilder() 1917 .addBuilder(com.google.cloud.iot.v1.EventNotificationConfig.getDefaultInstance()); 1918 } 1919 /** 1920 * 1921 * 1922 * <pre> 1923 * The configuration for notification of telemetry events received from the 1924 * device. All telemetry events that were successfully published by the 1925 * device and acknowledged by Cloud IoT Core are guaranteed to be 1926 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1927 * only the first matching configuration is used. If you try to publish a 1928 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1929 * for the device's registry, the connection closes automatically. If you try 1930 * to do so using an HTTP connection, an error is returned. Up to 10 1931 * configurations may be provided. 1932 * </pre> 1933 * 1934 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1935 * </code> 1936 */ 1937 public com.google.cloud.iot.v1.EventNotificationConfig.Builder addEventNotificationConfigsBuilder(int index)1938 addEventNotificationConfigsBuilder(int index) { 1939 return getEventNotificationConfigsFieldBuilder() 1940 .addBuilder(index, com.google.cloud.iot.v1.EventNotificationConfig.getDefaultInstance()); 1941 } 1942 /** 1943 * 1944 * 1945 * <pre> 1946 * The configuration for notification of telemetry events received from the 1947 * device. All telemetry events that were successfully published by the 1948 * device and acknowledged by Cloud IoT Core are guaranteed to be 1949 * delivered to Cloud Pub/Sub. If multiple configurations match a message, 1950 * only the first matching configuration is used. If you try to publish a 1951 * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic 1952 * for the device's registry, the connection closes automatically. If you try 1953 * to do so using an HTTP connection, an error is returned. Up to 10 1954 * configurations may be provided. 1955 * </pre> 1956 * 1957 * <code>repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; 1958 * </code> 1959 */ 1960 public java.util.List<com.google.cloud.iot.v1.EventNotificationConfig.Builder> getEventNotificationConfigsBuilderList()1961 getEventNotificationConfigsBuilderList() { 1962 return getEventNotificationConfigsFieldBuilder().getBuilderList(); 1963 } 1964 1965 private com.google.protobuf.RepeatedFieldBuilderV3< 1966 com.google.cloud.iot.v1.EventNotificationConfig, 1967 com.google.cloud.iot.v1.EventNotificationConfig.Builder, 1968 com.google.cloud.iot.v1.EventNotificationConfigOrBuilder> getEventNotificationConfigsFieldBuilder()1969 getEventNotificationConfigsFieldBuilder() { 1970 if (eventNotificationConfigsBuilder_ == null) { 1971 eventNotificationConfigsBuilder_ = 1972 new com.google.protobuf.RepeatedFieldBuilderV3< 1973 com.google.cloud.iot.v1.EventNotificationConfig, 1974 com.google.cloud.iot.v1.EventNotificationConfig.Builder, 1975 com.google.cloud.iot.v1.EventNotificationConfigOrBuilder>( 1976 eventNotificationConfigs_, 1977 ((bitField0_ & 0x00000004) != 0), 1978 getParentForChildren(), 1979 isClean()); 1980 eventNotificationConfigs_ = null; 1981 } 1982 return eventNotificationConfigsBuilder_; 1983 } 1984 1985 private com.google.cloud.iot.v1.StateNotificationConfig stateNotificationConfig_; 1986 private com.google.protobuf.SingleFieldBuilderV3< 1987 com.google.cloud.iot.v1.StateNotificationConfig, 1988 com.google.cloud.iot.v1.StateNotificationConfig.Builder, 1989 com.google.cloud.iot.v1.StateNotificationConfigOrBuilder> 1990 stateNotificationConfigBuilder_; 1991 /** 1992 * 1993 * 1994 * <pre> 1995 * The configuration for notification of new states received from the device. 1996 * State updates are guaranteed to be stored in the state history, but 1997 * notifications to Cloud Pub/Sub are not guaranteed. For example, if 1998 * permissions are misconfigured or the specified topic doesn't exist, no 1999 * notification will be published but the state will still be stored in Cloud 2000 * IoT Core. 2001 * </pre> 2002 * 2003 * <code>.google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7;</code> 2004 * 2005 * @return Whether the stateNotificationConfig field is set. 2006 */ hasStateNotificationConfig()2007 public boolean hasStateNotificationConfig() { 2008 return ((bitField0_ & 0x00000008) != 0); 2009 } 2010 /** 2011 * 2012 * 2013 * <pre> 2014 * The configuration for notification of new states received from the device. 2015 * State updates are guaranteed to be stored in the state history, but 2016 * notifications to Cloud Pub/Sub are not guaranteed. For example, if 2017 * permissions are misconfigured or the specified topic doesn't exist, no 2018 * notification will be published but the state will still be stored in Cloud 2019 * IoT Core. 2020 * </pre> 2021 * 2022 * <code>.google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7;</code> 2023 * 2024 * @return The stateNotificationConfig. 2025 */ getStateNotificationConfig()2026 public com.google.cloud.iot.v1.StateNotificationConfig getStateNotificationConfig() { 2027 if (stateNotificationConfigBuilder_ == null) { 2028 return stateNotificationConfig_ == null 2029 ? com.google.cloud.iot.v1.StateNotificationConfig.getDefaultInstance() 2030 : stateNotificationConfig_; 2031 } else { 2032 return stateNotificationConfigBuilder_.getMessage(); 2033 } 2034 } 2035 /** 2036 * 2037 * 2038 * <pre> 2039 * The configuration for notification of new states received from the device. 2040 * State updates are guaranteed to be stored in the state history, but 2041 * notifications to Cloud Pub/Sub are not guaranteed. For example, if 2042 * permissions are misconfigured or the specified topic doesn't exist, no 2043 * notification will be published but the state will still be stored in Cloud 2044 * IoT Core. 2045 * </pre> 2046 * 2047 * <code>.google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7;</code> 2048 */ setStateNotificationConfig( com.google.cloud.iot.v1.StateNotificationConfig value)2049 public Builder setStateNotificationConfig( 2050 com.google.cloud.iot.v1.StateNotificationConfig value) { 2051 if (stateNotificationConfigBuilder_ == null) { 2052 if (value == null) { 2053 throw new NullPointerException(); 2054 } 2055 stateNotificationConfig_ = value; 2056 } else { 2057 stateNotificationConfigBuilder_.setMessage(value); 2058 } 2059 bitField0_ |= 0x00000008; 2060 onChanged(); 2061 return this; 2062 } 2063 /** 2064 * 2065 * 2066 * <pre> 2067 * The configuration for notification of new states received from the device. 2068 * State updates are guaranteed to be stored in the state history, but 2069 * notifications to Cloud Pub/Sub are not guaranteed. For example, if 2070 * permissions are misconfigured or the specified topic doesn't exist, no 2071 * notification will be published but the state will still be stored in Cloud 2072 * IoT Core. 2073 * </pre> 2074 * 2075 * <code>.google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7;</code> 2076 */ setStateNotificationConfig( com.google.cloud.iot.v1.StateNotificationConfig.Builder builderForValue)2077 public Builder setStateNotificationConfig( 2078 com.google.cloud.iot.v1.StateNotificationConfig.Builder builderForValue) { 2079 if (stateNotificationConfigBuilder_ == null) { 2080 stateNotificationConfig_ = builderForValue.build(); 2081 } else { 2082 stateNotificationConfigBuilder_.setMessage(builderForValue.build()); 2083 } 2084 bitField0_ |= 0x00000008; 2085 onChanged(); 2086 return this; 2087 } 2088 /** 2089 * 2090 * 2091 * <pre> 2092 * The configuration for notification of new states received from the device. 2093 * State updates are guaranteed to be stored in the state history, but 2094 * notifications to Cloud Pub/Sub are not guaranteed. For example, if 2095 * permissions are misconfigured or the specified topic doesn't exist, no 2096 * notification will be published but the state will still be stored in Cloud 2097 * IoT Core. 2098 * </pre> 2099 * 2100 * <code>.google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7;</code> 2101 */ mergeStateNotificationConfig( com.google.cloud.iot.v1.StateNotificationConfig value)2102 public Builder mergeStateNotificationConfig( 2103 com.google.cloud.iot.v1.StateNotificationConfig value) { 2104 if (stateNotificationConfigBuilder_ == null) { 2105 if (((bitField0_ & 0x00000008) != 0) 2106 && stateNotificationConfig_ != null 2107 && stateNotificationConfig_ 2108 != com.google.cloud.iot.v1.StateNotificationConfig.getDefaultInstance()) { 2109 getStateNotificationConfigBuilder().mergeFrom(value); 2110 } else { 2111 stateNotificationConfig_ = value; 2112 } 2113 } else { 2114 stateNotificationConfigBuilder_.mergeFrom(value); 2115 } 2116 bitField0_ |= 0x00000008; 2117 onChanged(); 2118 return this; 2119 } 2120 /** 2121 * 2122 * 2123 * <pre> 2124 * The configuration for notification of new states received from the device. 2125 * State updates are guaranteed to be stored in the state history, but 2126 * notifications to Cloud Pub/Sub are not guaranteed. For example, if 2127 * permissions are misconfigured or the specified topic doesn't exist, no 2128 * notification will be published but the state will still be stored in Cloud 2129 * IoT Core. 2130 * </pre> 2131 * 2132 * <code>.google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7;</code> 2133 */ clearStateNotificationConfig()2134 public Builder clearStateNotificationConfig() { 2135 bitField0_ = (bitField0_ & ~0x00000008); 2136 stateNotificationConfig_ = null; 2137 if (stateNotificationConfigBuilder_ != null) { 2138 stateNotificationConfigBuilder_.dispose(); 2139 stateNotificationConfigBuilder_ = null; 2140 } 2141 onChanged(); 2142 return this; 2143 } 2144 /** 2145 * 2146 * 2147 * <pre> 2148 * The configuration for notification of new states received from the device. 2149 * State updates are guaranteed to be stored in the state history, but 2150 * notifications to Cloud Pub/Sub are not guaranteed. For example, if 2151 * permissions are misconfigured or the specified topic doesn't exist, no 2152 * notification will be published but the state will still be stored in Cloud 2153 * IoT Core. 2154 * </pre> 2155 * 2156 * <code>.google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7;</code> 2157 */ 2158 public com.google.cloud.iot.v1.StateNotificationConfig.Builder getStateNotificationConfigBuilder()2159 getStateNotificationConfigBuilder() { 2160 bitField0_ |= 0x00000008; 2161 onChanged(); 2162 return getStateNotificationConfigFieldBuilder().getBuilder(); 2163 } 2164 /** 2165 * 2166 * 2167 * <pre> 2168 * The configuration for notification of new states received from the device. 2169 * State updates are guaranteed to be stored in the state history, but 2170 * notifications to Cloud Pub/Sub are not guaranteed. For example, if 2171 * permissions are misconfigured or the specified topic doesn't exist, no 2172 * notification will be published but the state will still be stored in Cloud 2173 * IoT Core. 2174 * </pre> 2175 * 2176 * <code>.google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7;</code> 2177 */ 2178 public com.google.cloud.iot.v1.StateNotificationConfigOrBuilder getStateNotificationConfigOrBuilder()2179 getStateNotificationConfigOrBuilder() { 2180 if (stateNotificationConfigBuilder_ != null) { 2181 return stateNotificationConfigBuilder_.getMessageOrBuilder(); 2182 } else { 2183 return stateNotificationConfig_ == null 2184 ? com.google.cloud.iot.v1.StateNotificationConfig.getDefaultInstance() 2185 : stateNotificationConfig_; 2186 } 2187 } 2188 /** 2189 * 2190 * 2191 * <pre> 2192 * The configuration for notification of new states received from the device. 2193 * State updates are guaranteed to be stored in the state history, but 2194 * notifications to Cloud Pub/Sub are not guaranteed. For example, if 2195 * permissions are misconfigured or the specified topic doesn't exist, no 2196 * notification will be published but the state will still be stored in Cloud 2197 * IoT Core. 2198 * </pre> 2199 * 2200 * <code>.google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7;</code> 2201 */ 2202 private com.google.protobuf.SingleFieldBuilderV3< 2203 com.google.cloud.iot.v1.StateNotificationConfig, 2204 com.google.cloud.iot.v1.StateNotificationConfig.Builder, 2205 com.google.cloud.iot.v1.StateNotificationConfigOrBuilder> getStateNotificationConfigFieldBuilder()2206 getStateNotificationConfigFieldBuilder() { 2207 if (stateNotificationConfigBuilder_ == null) { 2208 stateNotificationConfigBuilder_ = 2209 new com.google.protobuf.SingleFieldBuilderV3< 2210 com.google.cloud.iot.v1.StateNotificationConfig, 2211 com.google.cloud.iot.v1.StateNotificationConfig.Builder, 2212 com.google.cloud.iot.v1.StateNotificationConfigOrBuilder>( 2213 getStateNotificationConfig(), getParentForChildren(), isClean()); 2214 stateNotificationConfig_ = null; 2215 } 2216 return stateNotificationConfigBuilder_; 2217 } 2218 2219 private com.google.cloud.iot.v1.MqttConfig mqttConfig_; 2220 private com.google.protobuf.SingleFieldBuilderV3< 2221 com.google.cloud.iot.v1.MqttConfig, 2222 com.google.cloud.iot.v1.MqttConfig.Builder, 2223 com.google.cloud.iot.v1.MqttConfigOrBuilder> 2224 mqttConfigBuilder_; 2225 /** 2226 * 2227 * 2228 * <pre> 2229 * The MQTT configuration for this device registry. 2230 * </pre> 2231 * 2232 * <code>.google.cloud.iot.v1.MqttConfig mqtt_config = 4;</code> 2233 * 2234 * @return Whether the mqttConfig field is set. 2235 */ hasMqttConfig()2236 public boolean hasMqttConfig() { 2237 return ((bitField0_ & 0x00000010) != 0); 2238 } 2239 /** 2240 * 2241 * 2242 * <pre> 2243 * The MQTT configuration for this device registry. 2244 * </pre> 2245 * 2246 * <code>.google.cloud.iot.v1.MqttConfig mqtt_config = 4;</code> 2247 * 2248 * @return The mqttConfig. 2249 */ getMqttConfig()2250 public com.google.cloud.iot.v1.MqttConfig getMqttConfig() { 2251 if (mqttConfigBuilder_ == null) { 2252 return mqttConfig_ == null 2253 ? com.google.cloud.iot.v1.MqttConfig.getDefaultInstance() 2254 : mqttConfig_; 2255 } else { 2256 return mqttConfigBuilder_.getMessage(); 2257 } 2258 } 2259 /** 2260 * 2261 * 2262 * <pre> 2263 * The MQTT configuration for this device registry. 2264 * </pre> 2265 * 2266 * <code>.google.cloud.iot.v1.MqttConfig mqtt_config = 4;</code> 2267 */ setMqttConfig(com.google.cloud.iot.v1.MqttConfig value)2268 public Builder setMqttConfig(com.google.cloud.iot.v1.MqttConfig value) { 2269 if (mqttConfigBuilder_ == null) { 2270 if (value == null) { 2271 throw new NullPointerException(); 2272 } 2273 mqttConfig_ = value; 2274 } else { 2275 mqttConfigBuilder_.setMessage(value); 2276 } 2277 bitField0_ |= 0x00000010; 2278 onChanged(); 2279 return this; 2280 } 2281 /** 2282 * 2283 * 2284 * <pre> 2285 * The MQTT configuration for this device registry. 2286 * </pre> 2287 * 2288 * <code>.google.cloud.iot.v1.MqttConfig mqtt_config = 4;</code> 2289 */ setMqttConfig(com.google.cloud.iot.v1.MqttConfig.Builder builderForValue)2290 public Builder setMqttConfig(com.google.cloud.iot.v1.MqttConfig.Builder builderForValue) { 2291 if (mqttConfigBuilder_ == null) { 2292 mqttConfig_ = builderForValue.build(); 2293 } else { 2294 mqttConfigBuilder_.setMessage(builderForValue.build()); 2295 } 2296 bitField0_ |= 0x00000010; 2297 onChanged(); 2298 return this; 2299 } 2300 /** 2301 * 2302 * 2303 * <pre> 2304 * The MQTT configuration for this device registry. 2305 * </pre> 2306 * 2307 * <code>.google.cloud.iot.v1.MqttConfig mqtt_config = 4;</code> 2308 */ mergeMqttConfig(com.google.cloud.iot.v1.MqttConfig value)2309 public Builder mergeMqttConfig(com.google.cloud.iot.v1.MqttConfig value) { 2310 if (mqttConfigBuilder_ == null) { 2311 if (((bitField0_ & 0x00000010) != 0) 2312 && mqttConfig_ != null 2313 && mqttConfig_ != com.google.cloud.iot.v1.MqttConfig.getDefaultInstance()) { 2314 getMqttConfigBuilder().mergeFrom(value); 2315 } else { 2316 mqttConfig_ = value; 2317 } 2318 } else { 2319 mqttConfigBuilder_.mergeFrom(value); 2320 } 2321 bitField0_ |= 0x00000010; 2322 onChanged(); 2323 return this; 2324 } 2325 /** 2326 * 2327 * 2328 * <pre> 2329 * The MQTT configuration for this device registry. 2330 * </pre> 2331 * 2332 * <code>.google.cloud.iot.v1.MqttConfig mqtt_config = 4;</code> 2333 */ clearMqttConfig()2334 public Builder clearMqttConfig() { 2335 bitField0_ = (bitField0_ & ~0x00000010); 2336 mqttConfig_ = null; 2337 if (mqttConfigBuilder_ != null) { 2338 mqttConfigBuilder_.dispose(); 2339 mqttConfigBuilder_ = null; 2340 } 2341 onChanged(); 2342 return this; 2343 } 2344 /** 2345 * 2346 * 2347 * <pre> 2348 * The MQTT configuration for this device registry. 2349 * </pre> 2350 * 2351 * <code>.google.cloud.iot.v1.MqttConfig mqtt_config = 4;</code> 2352 */ getMqttConfigBuilder()2353 public com.google.cloud.iot.v1.MqttConfig.Builder getMqttConfigBuilder() { 2354 bitField0_ |= 0x00000010; 2355 onChanged(); 2356 return getMqttConfigFieldBuilder().getBuilder(); 2357 } 2358 /** 2359 * 2360 * 2361 * <pre> 2362 * The MQTT configuration for this device registry. 2363 * </pre> 2364 * 2365 * <code>.google.cloud.iot.v1.MqttConfig mqtt_config = 4;</code> 2366 */ getMqttConfigOrBuilder()2367 public com.google.cloud.iot.v1.MqttConfigOrBuilder getMqttConfigOrBuilder() { 2368 if (mqttConfigBuilder_ != null) { 2369 return mqttConfigBuilder_.getMessageOrBuilder(); 2370 } else { 2371 return mqttConfig_ == null 2372 ? com.google.cloud.iot.v1.MqttConfig.getDefaultInstance() 2373 : mqttConfig_; 2374 } 2375 } 2376 /** 2377 * 2378 * 2379 * <pre> 2380 * The MQTT configuration for this device registry. 2381 * </pre> 2382 * 2383 * <code>.google.cloud.iot.v1.MqttConfig mqtt_config = 4;</code> 2384 */ 2385 private com.google.protobuf.SingleFieldBuilderV3< 2386 com.google.cloud.iot.v1.MqttConfig, 2387 com.google.cloud.iot.v1.MqttConfig.Builder, 2388 com.google.cloud.iot.v1.MqttConfigOrBuilder> getMqttConfigFieldBuilder()2389 getMqttConfigFieldBuilder() { 2390 if (mqttConfigBuilder_ == null) { 2391 mqttConfigBuilder_ = 2392 new com.google.protobuf.SingleFieldBuilderV3< 2393 com.google.cloud.iot.v1.MqttConfig, 2394 com.google.cloud.iot.v1.MqttConfig.Builder, 2395 com.google.cloud.iot.v1.MqttConfigOrBuilder>( 2396 getMqttConfig(), getParentForChildren(), isClean()); 2397 mqttConfig_ = null; 2398 } 2399 return mqttConfigBuilder_; 2400 } 2401 2402 private com.google.cloud.iot.v1.HttpConfig httpConfig_; 2403 private com.google.protobuf.SingleFieldBuilderV3< 2404 com.google.cloud.iot.v1.HttpConfig, 2405 com.google.cloud.iot.v1.HttpConfig.Builder, 2406 com.google.cloud.iot.v1.HttpConfigOrBuilder> 2407 httpConfigBuilder_; 2408 /** 2409 * 2410 * 2411 * <pre> 2412 * The DeviceService (HTTP) configuration for this device registry. 2413 * </pre> 2414 * 2415 * <code>.google.cloud.iot.v1.HttpConfig http_config = 9;</code> 2416 * 2417 * @return Whether the httpConfig field is set. 2418 */ hasHttpConfig()2419 public boolean hasHttpConfig() { 2420 return ((bitField0_ & 0x00000020) != 0); 2421 } 2422 /** 2423 * 2424 * 2425 * <pre> 2426 * The DeviceService (HTTP) configuration for this device registry. 2427 * </pre> 2428 * 2429 * <code>.google.cloud.iot.v1.HttpConfig http_config = 9;</code> 2430 * 2431 * @return The httpConfig. 2432 */ getHttpConfig()2433 public com.google.cloud.iot.v1.HttpConfig getHttpConfig() { 2434 if (httpConfigBuilder_ == null) { 2435 return httpConfig_ == null 2436 ? com.google.cloud.iot.v1.HttpConfig.getDefaultInstance() 2437 : httpConfig_; 2438 } else { 2439 return httpConfigBuilder_.getMessage(); 2440 } 2441 } 2442 /** 2443 * 2444 * 2445 * <pre> 2446 * The DeviceService (HTTP) configuration for this device registry. 2447 * </pre> 2448 * 2449 * <code>.google.cloud.iot.v1.HttpConfig http_config = 9;</code> 2450 */ setHttpConfig(com.google.cloud.iot.v1.HttpConfig value)2451 public Builder setHttpConfig(com.google.cloud.iot.v1.HttpConfig value) { 2452 if (httpConfigBuilder_ == null) { 2453 if (value == null) { 2454 throw new NullPointerException(); 2455 } 2456 httpConfig_ = value; 2457 } else { 2458 httpConfigBuilder_.setMessage(value); 2459 } 2460 bitField0_ |= 0x00000020; 2461 onChanged(); 2462 return this; 2463 } 2464 /** 2465 * 2466 * 2467 * <pre> 2468 * The DeviceService (HTTP) configuration for this device registry. 2469 * </pre> 2470 * 2471 * <code>.google.cloud.iot.v1.HttpConfig http_config = 9;</code> 2472 */ setHttpConfig(com.google.cloud.iot.v1.HttpConfig.Builder builderForValue)2473 public Builder setHttpConfig(com.google.cloud.iot.v1.HttpConfig.Builder builderForValue) { 2474 if (httpConfigBuilder_ == null) { 2475 httpConfig_ = builderForValue.build(); 2476 } else { 2477 httpConfigBuilder_.setMessage(builderForValue.build()); 2478 } 2479 bitField0_ |= 0x00000020; 2480 onChanged(); 2481 return this; 2482 } 2483 /** 2484 * 2485 * 2486 * <pre> 2487 * The DeviceService (HTTP) configuration for this device registry. 2488 * </pre> 2489 * 2490 * <code>.google.cloud.iot.v1.HttpConfig http_config = 9;</code> 2491 */ mergeHttpConfig(com.google.cloud.iot.v1.HttpConfig value)2492 public Builder mergeHttpConfig(com.google.cloud.iot.v1.HttpConfig value) { 2493 if (httpConfigBuilder_ == null) { 2494 if (((bitField0_ & 0x00000020) != 0) 2495 && httpConfig_ != null 2496 && httpConfig_ != com.google.cloud.iot.v1.HttpConfig.getDefaultInstance()) { 2497 getHttpConfigBuilder().mergeFrom(value); 2498 } else { 2499 httpConfig_ = value; 2500 } 2501 } else { 2502 httpConfigBuilder_.mergeFrom(value); 2503 } 2504 bitField0_ |= 0x00000020; 2505 onChanged(); 2506 return this; 2507 } 2508 /** 2509 * 2510 * 2511 * <pre> 2512 * The DeviceService (HTTP) configuration for this device registry. 2513 * </pre> 2514 * 2515 * <code>.google.cloud.iot.v1.HttpConfig http_config = 9;</code> 2516 */ clearHttpConfig()2517 public Builder clearHttpConfig() { 2518 bitField0_ = (bitField0_ & ~0x00000020); 2519 httpConfig_ = null; 2520 if (httpConfigBuilder_ != null) { 2521 httpConfigBuilder_.dispose(); 2522 httpConfigBuilder_ = null; 2523 } 2524 onChanged(); 2525 return this; 2526 } 2527 /** 2528 * 2529 * 2530 * <pre> 2531 * The DeviceService (HTTP) configuration for this device registry. 2532 * </pre> 2533 * 2534 * <code>.google.cloud.iot.v1.HttpConfig http_config = 9;</code> 2535 */ getHttpConfigBuilder()2536 public com.google.cloud.iot.v1.HttpConfig.Builder getHttpConfigBuilder() { 2537 bitField0_ |= 0x00000020; 2538 onChanged(); 2539 return getHttpConfigFieldBuilder().getBuilder(); 2540 } 2541 /** 2542 * 2543 * 2544 * <pre> 2545 * The DeviceService (HTTP) configuration for this device registry. 2546 * </pre> 2547 * 2548 * <code>.google.cloud.iot.v1.HttpConfig http_config = 9;</code> 2549 */ getHttpConfigOrBuilder()2550 public com.google.cloud.iot.v1.HttpConfigOrBuilder getHttpConfigOrBuilder() { 2551 if (httpConfigBuilder_ != null) { 2552 return httpConfigBuilder_.getMessageOrBuilder(); 2553 } else { 2554 return httpConfig_ == null 2555 ? com.google.cloud.iot.v1.HttpConfig.getDefaultInstance() 2556 : httpConfig_; 2557 } 2558 } 2559 /** 2560 * 2561 * 2562 * <pre> 2563 * The DeviceService (HTTP) configuration for this device registry. 2564 * </pre> 2565 * 2566 * <code>.google.cloud.iot.v1.HttpConfig http_config = 9;</code> 2567 */ 2568 private com.google.protobuf.SingleFieldBuilderV3< 2569 com.google.cloud.iot.v1.HttpConfig, 2570 com.google.cloud.iot.v1.HttpConfig.Builder, 2571 com.google.cloud.iot.v1.HttpConfigOrBuilder> getHttpConfigFieldBuilder()2572 getHttpConfigFieldBuilder() { 2573 if (httpConfigBuilder_ == null) { 2574 httpConfigBuilder_ = 2575 new com.google.protobuf.SingleFieldBuilderV3< 2576 com.google.cloud.iot.v1.HttpConfig, 2577 com.google.cloud.iot.v1.HttpConfig.Builder, 2578 com.google.cloud.iot.v1.HttpConfigOrBuilder>( 2579 getHttpConfig(), getParentForChildren(), isClean()); 2580 httpConfig_ = null; 2581 } 2582 return httpConfigBuilder_; 2583 } 2584 2585 private int logLevel_ = 0; 2586 /** 2587 * 2588 * 2589 * <pre> 2590 * **Beta Feature** 2591 * The default logging verbosity for activity from devices in this registry. 2592 * The verbosity level can be overridden by Device.log_level. 2593 * </pre> 2594 * 2595 * <code>.google.cloud.iot.v1.LogLevel log_level = 11;</code> 2596 * 2597 * @return The enum numeric value on the wire for logLevel. 2598 */ 2599 @java.lang.Override getLogLevelValue()2600 public int getLogLevelValue() { 2601 return logLevel_; 2602 } 2603 /** 2604 * 2605 * 2606 * <pre> 2607 * **Beta Feature** 2608 * The default logging verbosity for activity from devices in this registry. 2609 * The verbosity level can be overridden by Device.log_level. 2610 * </pre> 2611 * 2612 * <code>.google.cloud.iot.v1.LogLevel log_level = 11;</code> 2613 * 2614 * @param value The enum numeric value on the wire for logLevel to set. 2615 * @return This builder for chaining. 2616 */ setLogLevelValue(int value)2617 public Builder setLogLevelValue(int value) { 2618 logLevel_ = value; 2619 bitField0_ |= 0x00000040; 2620 onChanged(); 2621 return this; 2622 } 2623 /** 2624 * 2625 * 2626 * <pre> 2627 * **Beta Feature** 2628 * The default logging verbosity for activity from devices in this registry. 2629 * The verbosity level can be overridden by Device.log_level. 2630 * </pre> 2631 * 2632 * <code>.google.cloud.iot.v1.LogLevel log_level = 11;</code> 2633 * 2634 * @return The logLevel. 2635 */ 2636 @java.lang.Override getLogLevel()2637 public com.google.cloud.iot.v1.LogLevel getLogLevel() { 2638 com.google.cloud.iot.v1.LogLevel result = 2639 com.google.cloud.iot.v1.LogLevel.forNumber(logLevel_); 2640 return result == null ? com.google.cloud.iot.v1.LogLevel.UNRECOGNIZED : result; 2641 } 2642 /** 2643 * 2644 * 2645 * <pre> 2646 * **Beta Feature** 2647 * The default logging verbosity for activity from devices in this registry. 2648 * The verbosity level can be overridden by Device.log_level. 2649 * </pre> 2650 * 2651 * <code>.google.cloud.iot.v1.LogLevel log_level = 11;</code> 2652 * 2653 * @param value The logLevel to set. 2654 * @return This builder for chaining. 2655 */ setLogLevel(com.google.cloud.iot.v1.LogLevel value)2656 public Builder setLogLevel(com.google.cloud.iot.v1.LogLevel value) { 2657 if (value == null) { 2658 throw new NullPointerException(); 2659 } 2660 bitField0_ |= 0x00000040; 2661 logLevel_ = value.getNumber(); 2662 onChanged(); 2663 return this; 2664 } 2665 /** 2666 * 2667 * 2668 * <pre> 2669 * **Beta Feature** 2670 * The default logging verbosity for activity from devices in this registry. 2671 * The verbosity level can be overridden by Device.log_level. 2672 * </pre> 2673 * 2674 * <code>.google.cloud.iot.v1.LogLevel log_level = 11;</code> 2675 * 2676 * @return This builder for chaining. 2677 */ clearLogLevel()2678 public Builder clearLogLevel() { 2679 bitField0_ = (bitField0_ & ~0x00000040); 2680 logLevel_ = 0; 2681 onChanged(); 2682 return this; 2683 } 2684 2685 private java.util.List<com.google.cloud.iot.v1.RegistryCredential> credentials_ = 2686 java.util.Collections.emptyList(); 2687 ensureCredentialsIsMutable()2688 private void ensureCredentialsIsMutable() { 2689 if (!((bitField0_ & 0x00000080) != 0)) { 2690 credentials_ = 2691 new java.util.ArrayList<com.google.cloud.iot.v1.RegistryCredential>(credentials_); 2692 bitField0_ |= 0x00000080; 2693 } 2694 } 2695 2696 private com.google.protobuf.RepeatedFieldBuilderV3< 2697 com.google.cloud.iot.v1.RegistryCredential, 2698 com.google.cloud.iot.v1.RegistryCredential.Builder, 2699 com.google.cloud.iot.v1.RegistryCredentialOrBuilder> 2700 credentialsBuilder_; 2701 2702 /** 2703 * 2704 * 2705 * <pre> 2706 * The credentials used to verify the device credentials. No more than 10 2707 * credentials can be bound to a single registry at a time. The verification 2708 * process occurs at the time of device creation or update. If this field is 2709 * empty, no verification is performed. Otherwise, the credentials of a newly 2710 * created device or added credentials of an updated device should be signed 2711 * with one of these registry credentials. 2712 * Note, however, that existing devices will never be affected by 2713 * modifications to this list of credentials: after a device has been 2714 * successfully created in a registry, it should be able to connect even if 2715 * its registry credentials are revoked, deleted, or modified. 2716 * </pre> 2717 * 2718 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 2719 */ getCredentialsList()2720 public java.util.List<com.google.cloud.iot.v1.RegistryCredential> getCredentialsList() { 2721 if (credentialsBuilder_ == null) { 2722 return java.util.Collections.unmodifiableList(credentials_); 2723 } else { 2724 return credentialsBuilder_.getMessageList(); 2725 } 2726 } 2727 /** 2728 * 2729 * 2730 * <pre> 2731 * The credentials used to verify the device credentials. No more than 10 2732 * credentials can be bound to a single registry at a time. The verification 2733 * process occurs at the time of device creation or update. If this field is 2734 * empty, no verification is performed. Otherwise, the credentials of a newly 2735 * created device or added credentials of an updated device should be signed 2736 * with one of these registry credentials. 2737 * Note, however, that existing devices will never be affected by 2738 * modifications to this list of credentials: after a device has been 2739 * successfully created in a registry, it should be able to connect even if 2740 * its registry credentials are revoked, deleted, or modified. 2741 * </pre> 2742 * 2743 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 2744 */ getCredentialsCount()2745 public int getCredentialsCount() { 2746 if (credentialsBuilder_ == null) { 2747 return credentials_.size(); 2748 } else { 2749 return credentialsBuilder_.getCount(); 2750 } 2751 } 2752 /** 2753 * 2754 * 2755 * <pre> 2756 * The credentials used to verify the device credentials. No more than 10 2757 * credentials can be bound to a single registry at a time. The verification 2758 * process occurs at the time of device creation or update. If this field is 2759 * empty, no verification is performed. Otherwise, the credentials of a newly 2760 * created device or added credentials of an updated device should be signed 2761 * with one of these registry credentials. 2762 * Note, however, that existing devices will never be affected by 2763 * modifications to this list of credentials: after a device has been 2764 * successfully created in a registry, it should be able to connect even if 2765 * its registry credentials are revoked, deleted, or modified. 2766 * </pre> 2767 * 2768 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 2769 */ getCredentials(int index)2770 public com.google.cloud.iot.v1.RegistryCredential getCredentials(int index) { 2771 if (credentialsBuilder_ == null) { 2772 return credentials_.get(index); 2773 } else { 2774 return credentialsBuilder_.getMessage(index); 2775 } 2776 } 2777 /** 2778 * 2779 * 2780 * <pre> 2781 * The credentials used to verify the device credentials. No more than 10 2782 * credentials can be bound to a single registry at a time. The verification 2783 * process occurs at the time of device creation or update. If this field is 2784 * empty, no verification is performed. Otherwise, the credentials of a newly 2785 * created device or added credentials of an updated device should be signed 2786 * with one of these registry credentials. 2787 * Note, however, that existing devices will never be affected by 2788 * modifications to this list of credentials: after a device has been 2789 * successfully created in a registry, it should be able to connect even if 2790 * its registry credentials are revoked, deleted, or modified. 2791 * </pre> 2792 * 2793 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 2794 */ setCredentials(int index, com.google.cloud.iot.v1.RegistryCredential value)2795 public Builder setCredentials(int index, com.google.cloud.iot.v1.RegistryCredential value) { 2796 if (credentialsBuilder_ == null) { 2797 if (value == null) { 2798 throw new NullPointerException(); 2799 } 2800 ensureCredentialsIsMutable(); 2801 credentials_.set(index, value); 2802 onChanged(); 2803 } else { 2804 credentialsBuilder_.setMessage(index, value); 2805 } 2806 return this; 2807 } 2808 /** 2809 * 2810 * 2811 * <pre> 2812 * The credentials used to verify the device credentials. No more than 10 2813 * credentials can be bound to a single registry at a time. The verification 2814 * process occurs at the time of device creation or update. If this field is 2815 * empty, no verification is performed. Otherwise, the credentials of a newly 2816 * created device or added credentials of an updated device should be signed 2817 * with one of these registry credentials. 2818 * Note, however, that existing devices will never be affected by 2819 * modifications to this list of credentials: after a device has been 2820 * successfully created in a registry, it should be able to connect even if 2821 * its registry credentials are revoked, deleted, or modified. 2822 * </pre> 2823 * 2824 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 2825 */ setCredentials( int index, com.google.cloud.iot.v1.RegistryCredential.Builder builderForValue)2826 public Builder setCredentials( 2827 int index, com.google.cloud.iot.v1.RegistryCredential.Builder builderForValue) { 2828 if (credentialsBuilder_ == null) { 2829 ensureCredentialsIsMutable(); 2830 credentials_.set(index, builderForValue.build()); 2831 onChanged(); 2832 } else { 2833 credentialsBuilder_.setMessage(index, builderForValue.build()); 2834 } 2835 return this; 2836 } 2837 /** 2838 * 2839 * 2840 * <pre> 2841 * The credentials used to verify the device credentials. No more than 10 2842 * credentials can be bound to a single registry at a time. The verification 2843 * process occurs at the time of device creation or update. If this field is 2844 * empty, no verification is performed. Otherwise, the credentials of a newly 2845 * created device or added credentials of an updated device should be signed 2846 * with one of these registry credentials. 2847 * Note, however, that existing devices will never be affected by 2848 * modifications to this list of credentials: after a device has been 2849 * successfully created in a registry, it should be able to connect even if 2850 * its registry credentials are revoked, deleted, or modified. 2851 * </pre> 2852 * 2853 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 2854 */ addCredentials(com.google.cloud.iot.v1.RegistryCredential value)2855 public Builder addCredentials(com.google.cloud.iot.v1.RegistryCredential value) { 2856 if (credentialsBuilder_ == null) { 2857 if (value == null) { 2858 throw new NullPointerException(); 2859 } 2860 ensureCredentialsIsMutable(); 2861 credentials_.add(value); 2862 onChanged(); 2863 } else { 2864 credentialsBuilder_.addMessage(value); 2865 } 2866 return this; 2867 } 2868 /** 2869 * 2870 * 2871 * <pre> 2872 * The credentials used to verify the device credentials. No more than 10 2873 * credentials can be bound to a single registry at a time. The verification 2874 * process occurs at the time of device creation or update. If this field is 2875 * empty, no verification is performed. Otherwise, the credentials of a newly 2876 * created device or added credentials of an updated device should be signed 2877 * with one of these registry credentials. 2878 * Note, however, that existing devices will never be affected by 2879 * modifications to this list of credentials: after a device has been 2880 * successfully created in a registry, it should be able to connect even if 2881 * its registry credentials are revoked, deleted, or modified. 2882 * </pre> 2883 * 2884 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 2885 */ addCredentials(int index, com.google.cloud.iot.v1.RegistryCredential value)2886 public Builder addCredentials(int index, com.google.cloud.iot.v1.RegistryCredential value) { 2887 if (credentialsBuilder_ == null) { 2888 if (value == null) { 2889 throw new NullPointerException(); 2890 } 2891 ensureCredentialsIsMutable(); 2892 credentials_.add(index, value); 2893 onChanged(); 2894 } else { 2895 credentialsBuilder_.addMessage(index, value); 2896 } 2897 return this; 2898 } 2899 /** 2900 * 2901 * 2902 * <pre> 2903 * The credentials used to verify the device credentials. No more than 10 2904 * credentials can be bound to a single registry at a time. The verification 2905 * process occurs at the time of device creation or update. If this field is 2906 * empty, no verification is performed. Otherwise, the credentials of a newly 2907 * created device or added credentials of an updated device should be signed 2908 * with one of these registry credentials. 2909 * Note, however, that existing devices will never be affected by 2910 * modifications to this list of credentials: after a device has been 2911 * successfully created in a registry, it should be able to connect even if 2912 * its registry credentials are revoked, deleted, or modified. 2913 * </pre> 2914 * 2915 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 2916 */ addCredentials( com.google.cloud.iot.v1.RegistryCredential.Builder builderForValue)2917 public Builder addCredentials( 2918 com.google.cloud.iot.v1.RegistryCredential.Builder builderForValue) { 2919 if (credentialsBuilder_ == null) { 2920 ensureCredentialsIsMutable(); 2921 credentials_.add(builderForValue.build()); 2922 onChanged(); 2923 } else { 2924 credentialsBuilder_.addMessage(builderForValue.build()); 2925 } 2926 return this; 2927 } 2928 /** 2929 * 2930 * 2931 * <pre> 2932 * The credentials used to verify the device credentials. No more than 10 2933 * credentials can be bound to a single registry at a time. The verification 2934 * process occurs at the time of device creation or update. If this field is 2935 * empty, no verification is performed. Otherwise, the credentials of a newly 2936 * created device or added credentials of an updated device should be signed 2937 * with one of these registry credentials. 2938 * Note, however, that existing devices will never be affected by 2939 * modifications to this list of credentials: after a device has been 2940 * successfully created in a registry, it should be able to connect even if 2941 * its registry credentials are revoked, deleted, or modified. 2942 * </pre> 2943 * 2944 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 2945 */ addCredentials( int index, com.google.cloud.iot.v1.RegistryCredential.Builder builderForValue)2946 public Builder addCredentials( 2947 int index, com.google.cloud.iot.v1.RegistryCredential.Builder builderForValue) { 2948 if (credentialsBuilder_ == null) { 2949 ensureCredentialsIsMutable(); 2950 credentials_.add(index, builderForValue.build()); 2951 onChanged(); 2952 } else { 2953 credentialsBuilder_.addMessage(index, builderForValue.build()); 2954 } 2955 return this; 2956 } 2957 /** 2958 * 2959 * 2960 * <pre> 2961 * The credentials used to verify the device credentials. No more than 10 2962 * credentials can be bound to a single registry at a time. The verification 2963 * process occurs at the time of device creation or update. If this field is 2964 * empty, no verification is performed. Otherwise, the credentials of a newly 2965 * created device or added credentials of an updated device should be signed 2966 * with one of these registry credentials. 2967 * Note, however, that existing devices will never be affected by 2968 * modifications to this list of credentials: after a device has been 2969 * successfully created in a registry, it should be able to connect even if 2970 * its registry credentials are revoked, deleted, or modified. 2971 * </pre> 2972 * 2973 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 2974 */ addAllCredentials( java.lang.Iterable<? extends com.google.cloud.iot.v1.RegistryCredential> values)2975 public Builder addAllCredentials( 2976 java.lang.Iterable<? extends com.google.cloud.iot.v1.RegistryCredential> values) { 2977 if (credentialsBuilder_ == null) { 2978 ensureCredentialsIsMutable(); 2979 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, credentials_); 2980 onChanged(); 2981 } else { 2982 credentialsBuilder_.addAllMessages(values); 2983 } 2984 return this; 2985 } 2986 /** 2987 * 2988 * 2989 * <pre> 2990 * The credentials used to verify the device credentials. No more than 10 2991 * credentials can be bound to a single registry at a time. The verification 2992 * process occurs at the time of device creation or update. If this field is 2993 * empty, no verification is performed. Otherwise, the credentials of a newly 2994 * created device or added credentials of an updated device should be signed 2995 * with one of these registry credentials. 2996 * Note, however, that existing devices will never be affected by 2997 * modifications to this list of credentials: after a device has been 2998 * successfully created in a registry, it should be able to connect even if 2999 * its registry credentials are revoked, deleted, or modified. 3000 * </pre> 3001 * 3002 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 3003 */ clearCredentials()3004 public Builder clearCredentials() { 3005 if (credentialsBuilder_ == null) { 3006 credentials_ = java.util.Collections.emptyList(); 3007 bitField0_ = (bitField0_ & ~0x00000080); 3008 onChanged(); 3009 } else { 3010 credentialsBuilder_.clear(); 3011 } 3012 return this; 3013 } 3014 /** 3015 * 3016 * 3017 * <pre> 3018 * The credentials used to verify the device credentials. No more than 10 3019 * credentials can be bound to a single registry at a time. The verification 3020 * process occurs at the time of device creation or update. If this field is 3021 * empty, no verification is performed. Otherwise, the credentials of a newly 3022 * created device or added credentials of an updated device should be signed 3023 * with one of these registry credentials. 3024 * Note, however, that existing devices will never be affected by 3025 * modifications to this list of credentials: after a device has been 3026 * successfully created in a registry, it should be able to connect even if 3027 * its registry credentials are revoked, deleted, or modified. 3028 * </pre> 3029 * 3030 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 3031 */ removeCredentials(int index)3032 public Builder removeCredentials(int index) { 3033 if (credentialsBuilder_ == null) { 3034 ensureCredentialsIsMutable(); 3035 credentials_.remove(index); 3036 onChanged(); 3037 } else { 3038 credentialsBuilder_.remove(index); 3039 } 3040 return this; 3041 } 3042 /** 3043 * 3044 * 3045 * <pre> 3046 * The credentials used to verify the device credentials. No more than 10 3047 * credentials can be bound to a single registry at a time. The verification 3048 * process occurs at the time of device creation or update. If this field is 3049 * empty, no verification is performed. Otherwise, the credentials of a newly 3050 * created device or added credentials of an updated device should be signed 3051 * with one of these registry credentials. 3052 * Note, however, that existing devices will never be affected by 3053 * modifications to this list of credentials: after a device has been 3054 * successfully created in a registry, it should be able to connect even if 3055 * its registry credentials are revoked, deleted, or modified. 3056 * </pre> 3057 * 3058 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 3059 */ getCredentialsBuilder(int index)3060 public com.google.cloud.iot.v1.RegistryCredential.Builder getCredentialsBuilder(int index) { 3061 return getCredentialsFieldBuilder().getBuilder(index); 3062 } 3063 /** 3064 * 3065 * 3066 * <pre> 3067 * The credentials used to verify the device credentials. No more than 10 3068 * credentials can be bound to a single registry at a time. The verification 3069 * process occurs at the time of device creation or update. If this field is 3070 * empty, no verification is performed. Otherwise, the credentials of a newly 3071 * created device or added credentials of an updated device should be signed 3072 * with one of these registry credentials. 3073 * Note, however, that existing devices will never be affected by 3074 * modifications to this list of credentials: after a device has been 3075 * successfully created in a registry, it should be able to connect even if 3076 * its registry credentials are revoked, deleted, or modified. 3077 * </pre> 3078 * 3079 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 3080 */ getCredentialsOrBuilder(int index)3081 public com.google.cloud.iot.v1.RegistryCredentialOrBuilder getCredentialsOrBuilder(int index) { 3082 if (credentialsBuilder_ == null) { 3083 return credentials_.get(index); 3084 } else { 3085 return credentialsBuilder_.getMessageOrBuilder(index); 3086 } 3087 } 3088 /** 3089 * 3090 * 3091 * <pre> 3092 * The credentials used to verify the device credentials. No more than 10 3093 * credentials can be bound to a single registry at a time. The verification 3094 * process occurs at the time of device creation or update. If this field is 3095 * empty, no verification is performed. Otherwise, the credentials of a newly 3096 * created device or added credentials of an updated device should be signed 3097 * with one of these registry credentials. 3098 * Note, however, that existing devices will never be affected by 3099 * modifications to this list of credentials: after a device has been 3100 * successfully created in a registry, it should be able to connect even if 3101 * its registry credentials are revoked, deleted, or modified. 3102 * </pre> 3103 * 3104 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 3105 */ 3106 public java.util.List<? extends com.google.cloud.iot.v1.RegistryCredentialOrBuilder> getCredentialsOrBuilderList()3107 getCredentialsOrBuilderList() { 3108 if (credentialsBuilder_ != null) { 3109 return credentialsBuilder_.getMessageOrBuilderList(); 3110 } else { 3111 return java.util.Collections.unmodifiableList(credentials_); 3112 } 3113 } 3114 /** 3115 * 3116 * 3117 * <pre> 3118 * The credentials used to verify the device credentials. No more than 10 3119 * credentials can be bound to a single registry at a time. The verification 3120 * process occurs at the time of device creation or update. If this field is 3121 * empty, no verification is performed. Otherwise, the credentials of a newly 3122 * created device or added credentials of an updated device should be signed 3123 * with one of these registry credentials. 3124 * Note, however, that existing devices will never be affected by 3125 * modifications to this list of credentials: after a device has been 3126 * successfully created in a registry, it should be able to connect even if 3127 * its registry credentials are revoked, deleted, or modified. 3128 * </pre> 3129 * 3130 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 3131 */ addCredentialsBuilder()3132 public com.google.cloud.iot.v1.RegistryCredential.Builder addCredentialsBuilder() { 3133 return getCredentialsFieldBuilder() 3134 .addBuilder(com.google.cloud.iot.v1.RegistryCredential.getDefaultInstance()); 3135 } 3136 /** 3137 * 3138 * 3139 * <pre> 3140 * The credentials used to verify the device credentials. No more than 10 3141 * credentials can be bound to a single registry at a time. The verification 3142 * process occurs at the time of device creation or update. If this field is 3143 * empty, no verification is performed. Otherwise, the credentials of a newly 3144 * created device or added credentials of an updated device should be signed 3145 * with one of these registry credentials. 3146 * Note, however, that existing devices will never be affected by 3147 * modifications to this list of credentials: after a device has been 3148 * successfully created in a registry, it should be able to connect even if 3149 * its registry credentials are revoked, deleted, or modified. 3150 * </pre> 3151 * 3152 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 3153 */ addCredentialsBuilder(int index)3154 public com.google.cloud.iot.v1.RegistryCredential.Builder addCredentialsBuilder(int index) { 3155 return getCredentialsFieldBuilder() 3156 .addBuilder(index, com.google.cloud.iot.v1.RegistryCredential.getDefaultInstance()); 3157 } 3158 /** 3159 * 3160 * 3161 * <pre> 3162 * The credentials used to verify the device credentials. No more than 10 3163 * credentials can be bound to a single registry at a time. The verification 3164 * process occurs at the time of device creation or update. If this field is 3165 * empty, no verification is performed. Otherwise, the credentials of a newly 3166 * created device or added credentials of an updated device should be signed 3167 * with one of these registry credentials. 3168 * Note, however, that existing devices will never be affected by 3169 * modifications to this list of credentials: after a device has been 3170 * successfully created in a registry, it should be able to connect even if 3171 * its registry credentials are revoked, deleted, or modified. 3172 * </pre> 3173 * 3174 * <code>repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;</code> 3175 */ 3176 public java.util.List<com.google.cloud.iot.v1.RegistryCredential.Builder> getCredentialsBuilderList()3177 getCredentialsBuilderList() { 3178 return getCredentialsFieldBuilder().getBuilderList(); 3179 } 3180 3181 private com.google.protobuf.RepeatedFieldBuilderV3< 3182 com.google.cloud.iot.v1.RegistryCredential, 3183 com.google.cloud.iot.v1.RegistryCredential.Builder, 3184 com.google.cloud.iot.v1.RegistryCredentialOrBuilder> getCredentialsFieldBuilder()3185 getCredentialsFieldBuilder() { 3186 if (credentialsBuilder_ == null) { 3187 credentialsBuilder_ = 3188 new com.google.protobuf.RepeatedFieldBuilderV3< 3189 com.google.cloud.iot.v1.RegistryCredential, 3190 com.google.cloud.iot.v1.RegistryCredential.Builder, 3191 com.google.cloud.iot.v1.RegistryCredentialOrBuilder>( 3192 credentials_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); 3193 credentials_ = null; 3194 } 3195 return credentialsBuilder_; 3196 } 3197 3198 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3199 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 3200 return super.setUnknownFields(unknownFields); 3201 } 3202 3203 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3204 public final Builder mergeUnknownFields( 3205 final com.google.protobuf.UnknownFieldSet unknownFields) { 3206 return super.mergeUnknownFields(unknownFields); 3207 } 3208 3209 // @@protoc_insertion_point(builder_scope:google.cloud.iot.v1.DeviceRegistry) 3210 } 3211 3212 // @@protoc_insertion_point(class_scope:google.cloud.iot.v1.DeviceRegistry) 3213 private static final com.google.cloud.iot.v1.DeviceRegistry DEFAULT_INSTANCE; 3214 3215 static { 3216 DEFAULT_INSTANCE = new com.google.cloud.iot.v1.DeviceRegistry(); 3217 } 3218 getDefaultInstance()3219 public static com.google.cloud.iot.v1.DeviceRegistry getDefaultInstance() { 3220 return DEFAULT_INSTANCE; 3221 } 3222 3223 private static final com.google.protobuf.Parser<DeviceRegistry> PARSER = 3224 new com.google.protobuf.AbstractParser<DeviceRegistry>() { 3225 @java.lang.Override 3226 public DeviceRegistry parsePartialFrom( 3227 com.google.protobuf.CodedInputStream input, 3228 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3229 throws com.google.protobuf.InvalidProtocolBufferException { 3230 Builder builder = newBuilder(); 3231 try { 3232 builder.mergeFrom(input, extensionRegistry); 3233 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 3234 throw e.setUnfinishedMessage(builder.buildPartial()); 3235 } catch (com.google.protobuf.UninitializedMessageException e) { 3236 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 3237 } catch (java.io.IOException e) { 3238 throw new com.google.protobuf.InvalidProtocolBufferException(e) 3239 .setUnfinishedMessage(builder.buildPartial()); 3240 } 3241 return builder.buildPartial(); 3242 } 3243 }; 3244 parser()3245 public static com.google.protobuf.Parser<DeviceRegistry> parser() { 3246 return PARSER; 3247 } 3248 3249 @java.lang.Override getParserForType()3250 public com.google.protobuf.Parser<DeviceRegistry> getParserForType() { 3251 return PARSER; 3252 } 3253 3254 @java.lang.Override getDefaultInstanceForType()3255 public com.google.cloud.iot.v1.DeviceRegistry getDefaultInstanceForType() { 3256 return DEFAULT_INSTANCE; 3257 } 3258 } 3259