001// Generated by the protocol buffer compiler. DO NOT EDIT! 002// source: mqtt3_auth_types.proto 003 004package com.baidu.bifromq.plugin.authprovider.type; 005 006/** 007 * Protobuf type {@code mqtt3authtypes.MQTT3AuthData} 008 */ 009public final class MQTT3AuthData extends 010 com.google.protobuf.GeneratedMessageV3 implements 011 // @@protoc_insertion_point(message_implements:mqtt3authtypes.MQTT3AuthData) 012 MQTT3AuthDataOrBuilder { 013private static final long serialVersionUID = 0L; 014 // Use MQTT3AuthData.newBuilder() to construct. 015 private MQTT3AuthData(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 016 super(builder); 017 } 018 private MQTT3AuthData() { 019 username_ = ""; 020 password_ = com.google.protobuf.ByteString.EMPTY; 021 cert_ = com.google.protobuf.ByteString.EMPTY; 022 clientId_ = ""; 023 remoteAddr_ = ""; 024 channelId_ = ""; 025 } 026 027 @java.lang.Override 028 @SuppressWarnings({"unused"}) 029 protected java.lang.Object newInstance( 030 UnusedPrivateParameter unused) { 031 return new MQTT3AuthData(); 032 } 033 034 @java.lang.Override 035 public final com.google.protobuf.UnknownFieldSet 036 getUnknownFields() { 037 return this.unknownFields; 038 } 039 public static final com.google.protobuf.Descriptors.Descriptor 040 getDescriptor() { 041 return com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthTypesProto.internal_static_mqtt3authtypes_MQTT3AuthData_descriptor; 042 } 043 044 @java.lang.Override 045 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 046 internalGetFieldAccessorTable() { 047 return com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthTypesProto.internal_static_mqtt3authtypes_MQTT3AuthData_fieldAccessorTable 048 .ensureFieldAccessorsInitialized( 049 com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData.class, com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData.Builder.class); 050 } 051 052 private int bitField0_; 053 public static final int ISMQISDP_FIELD_NUMBER = 1; 054 private boolean isMQIsdp_ = false; 055 /** 056 * <pre> 057 * MQIsdp is MQTT 3.1 058 * </pre> 059 * 060 * <code>bool isMQIsdp = 1;</code> 061 * @return The isMQIsdp. 062 */ 063 @java.lang.Override 064 public boolean getIsMQIsdp() { 065 return isMQIsdp_; 066 } 067 068 public static final int USERNAME_FIELD_NUMBER = 2; 069 @SuppressWarnings("serial") 070 private volatile java.lang.Object username_ = ""; 071 /** 072 * <code>optional string username = 2;</code> 073 * @return Whether the username field is set. 074 */ 075 @java.lang.Override 076 public boolean hasUsername() { 077 return ((bitField0_ & 0x00000001) != 0); 078 } 079 /** 080 * <code>optional string username = 2;</code> 081 * @return The username. 082 */ 083 @java.lang.Override 084 public java.lang.String getUsername() { 085 java.lang.Object ref = username_; 086 if (ref instanceof java.lang.String) { 087 return (java.lang.String) ref; 088 } else { 089 com.google.protobuf.ByteString bs = 090 (com.google.protobuf.ByteString) ref; 091 java.lang.String s = bs.toStringUtf8(); 092 username_ = s; 093 return s; 094 } 095 } 096 /** 097 * <code>optional string username = 2;</code> 098 * @return The bytes for username. 099 */ 100 @java.lang.Override 101 public com.google.protobuf.ByteString 102 getUsernameBytes() { 103 java.lang.Object ref = username_; 104 if (ref instanceof java.lang.String) { 105 com.google.protobuf.ByteString b = 106 com.google.protobuf.ByteString.copyFromUtf8( 107 (java.lang.String) ref); 108 username_ = b; 109 return b; 110 } else { 111 return (com.google.protobuf.ByteString) ref; 112 } 113 } 114 115 public static final int PASSWORD_FIELD_NUMBER = 3; 116 private com.google.protobuf.ByteString password_ = com.google.protobuf.ByteString.EMPTY; 117 /** 118 * <code>optional bytes password = 3;</code> 119 * @return Whether the password field is set. 120 */ 121 @java.lang.Override 122 public boolean hasPassword() { 123 return ((bitField0_ & 0x00000002) != 0); 124 } 125 /** 126 * <code>optional bytes password = 3;</code> 127 * @return The password. 128 */ 129 @java.lang.Override 130 public com.google.protobuf.ByteString getPassword() { 131 return password_; 132 } 133 134 public static final int CERT_FIELD_NUMBER = 4; 135 private com.google.protobuf.ByteString cert_ = com.google.protobuf.ByteString.EMPTY; 136 /** 137 * <code>optional bytes cert = 4;</code> 138 * @return Whether the cert field is set. 139 */ 140 @java.lang.Override 141 public boolean hasCert() { 142 return ((bitField0_ & 0x00000004) != 0); 143 } 144 /** 145 * <code>optional bytes cert = 4;</code> 146 * @return The cert. 147 */ 148 @java.lang.Override 149 public com.google.protobuf.ByteString getCert() { 150 return cert_; 151 } 152 153 public static final int CLIENTID_FIELD_NUMBER = 5; 154 @SuppressWarnings("serial") 155 private volatile java.lang.Object clientId_ = ""; 156 /** 157 * <code>optional string clientId = 5;</code> 158 * @return Whether the clientId field is set. 159 */ 160 @java.lang.Override 161 public boolean hasClientId() { 162 return ((bitField0_ & 0x00000008) != 0); 163 } 164 /** 165 * <code>optional string clientId = 5;</code> 166 * @return The clientId. 167 */ 168 @java.lang.Override 169 public java.lang.String getClientId() { 170 java.lang.Object ref = clientId_; 171 if (ref instanceof java.lang.String) { 172 return (java.lang.String) ref; 173 } else { 174 com.google.protobuf.ByteString bs = 175 (com.google.protobuf.ByteString) ref; 176 java.lang.String s = bs.toStringUtf8(); 177 clientId_ = s; 178 return s; 179 } 180 } 181 /** 182 * <code>optional string clientId = 5;</code> 183 * @return The bytes for clientId. 184 */ 185 @java.lang.Override 186 public com.google.protobuf.ByteString 187 getClientIdBytes() { 188 java.lang.Object ref = clientId_; 189 if (ref instanceof java.lang.String) { 190 com.google.protobuf.ByteString b = 191 com.google.protobuf.ByteString.copyFromUtf8( 192 (java.lang.String) ref); 193 clientId_ = b; 194 return b; 195 } else { 196 return (com.google.protobuf.ByteString) ref; 197 } 198 } 199 200 public static final int REMOTEADDR_FIELD_NUMBER = 6; 201 @SuppressWarnings("serial") 202 private volatile java.lang.Object remoteAddr_ = ""; 203 /** 204 * <code>string remoteAddr = 6;</code> 205 * @return The remoteAddr. 206 */ 207 @java.lang.Override 208 public java.lang.String getRemoteAddr() { 209 java.lang.Object ref = remoteAddr_; 210 if (ref instanceof java.lang.String) { 211 return (java.lang.String) ref; 212 } else { 213 com.google.protobuf.ByteString bs = 214 (com.google.protobuf.ByteString) ref; 215 java.lang.String s = bs.toStringUtf8(); 216 remoteAddr_ = s; 217 return s; 218 } 219 } 220 /** 221 * <code>string remoteAddr = 6;</code> 222 * @return The bytes for remoteAddr. 223 */ 224 @java.lang.Override 225 public com.google.protobuf.ByteString 226 getRemoteAddrBytes() { 227 java.lang.Object ref = remoteAddr_; 228 if (ref instanceof java.lang.String) { 229 com.google.protobuf.ByteString b = 230 com.google.protobuf.ByteString.copyFromUtf8( 231 (java.lang.String) ref); 232 remoteAddr_ = b; 233 return b; 234 } else { 235 return (com.google.protobuf.ByteString) ref; 236 } 237 } 238 239 public static final int REMOTEPORT_FIELD_NUMBER = 7; 240 private int remotePort_ = 0; 241 /** 242 * <code>uint32 remotePort = 7;</code> 243 * @return The remotePort. 244 */ 245 @java.lang.Override 246 public int getRemotePort() { 247 return remotePort_; 248 } 249 250 public static final int CHANNELID_FIELD_NUMBER = 8; 251 @SuppressWarnings("serial") 252 private volatile java.lang.Object channelId_ = ""; 253 /** 254 * <code>string channelId = 8;</code> 255 * @return The channelId. 256 */ 257 @java.lang.Override 258 public java.lang.String getChannelId() { 259 java.lang.Object ref = channelId_; 260 if (ref instanceof java.lang.String) { 261 return (java.lang.String) ref; 262 } else { 263 com.google.protobuf.ByteString bs = 264 (com.google.protobuf.ByteString) ref; 265 java.lang.String s = bs.toStringUtf8(); 266 channelId_ = s; 267 return s; 268 } 269 } 270 /** 271 * <code>string channelId = 8;</code> 272 * @return The bytes for channelId. 273 */ 274 @java.lang.Override 275 public com.google.protobuf.ByteString 276 getChannelIdBytes() { 277 java.lang.Object ref = channelId_; 278 if (ref instanceof java.lang.String) { 279 com.google.protobuf.ByteString b = 280 com.google.protobuf.ByteString.copyFromUtf8( 281 (java.lang.String) ref); 282 channelId_ = b; 283 return b; 284 } else { 285 return (com.google.protobuf.ByteString) ref; 286 } 287 } 288 289 private byte memoizedIsInitialized = -1; 290 @java.lang.Override 291 public final boolean isInitialized() { 292 byte isInitialized = memoizedIsInitialized; 293 if (isInitialized == 1) return true; 294 if (isInitialized == 0) return false; 295 296 memoizedIsInitialized = 1; 297 return true; 298 } 299 300 @java.lang.Override 301 public void writeTo(com.google.protobuf.CodedOutputStream output) 302 throws java.io.IOException { 303 if (isMQIsdp_ != false) { 304 output.writeBool(1, isMQIsdp_); 305 } 306 if (((bitField0_ & 0x00000001) != 0)) { 307 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, username_); 308 } 309 if (((bitField0_ & 0x00000002) != 0)) { 310 output.writeBytes(3, password_); 311 } 312 if (((bitField0_ & 0x00000004) != 0)) { 313 output.writeBytes(4, cert_); 314 } 315 if (((bitField0_ & 0x00000008) != 0)) { 316 com.google.protobuf.GeneratedMessageV3.writeString(output, 5, clientId_); 317 } 318 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remoteAddr_)) { 319 com.google.protobuf.GeneratedMessageV3.writeString(output, 6, remoteAddr_); 320 } 321 if (remotePort_ != 0) { 322 output.writeUInt32(7, remotePort_); 323 } 324 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { 325 com.google.protobuf.GeneratedMessageV3.writeString(output, 8, channelId_); 326 } 327 getUnknownFields().writeTo(output); 328 } 329 330 @java.lang.Override 331 public int getSerializedSize() { 332 int size = memoizedSize; 333 if (size != -1) return size; 334 335 size = 0; 336 if (isMQIsdp_ != false) { 337 size += com.google.protobuf.CodedOutputStream 338 .computeBoolSize(1, isMQIsdp_); 339 } 340 if (((bitField0_ & 0x00000001) != 0)) { 341 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, username_); 342 } 343 if (((bitField0_ & 0x00000002) != 0)) { 344 size += com.google.protobuf.CodedOutputStream 345 .computeBytesSize(3, password_); 346 } 347 if (((bitField0_ & 0x00000004) != 0)) { 348 size += com.google.protobuf.CodedOutputStream 349 .computeBytesSize(4, cert_); 350 } 351 if (((bitField0_ & 0x00000008) != 0)) { 352 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, clientId_); 353 } 354 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remoteAddr_)) { 355 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, remoteAddr_); 356 } 357 if (remotePort_ != 0) { 358 size += com.google.protobuf.CodedOutputStream 359 .computeUInt32Size(7, remotePort_); 360 } 361 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { 362 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, channelId_); 363 } 364 size += getUnknownFields().getSerializedSize(); 365 memoizedSize = size; 366 return size; 367 } 368 369 @java.lang.Override 370 public boolean equals(final java.lang.Object obj) { 371 if (obj == this) { 372 return true; 373 } 374 if (!(obj instanceof com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData)) { 375 return super.equals(obj); 376 } 377 com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData other = (com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData) obj; 378 379 if (getIsMQIsdp() 380 != other.getIsMQIsdp()) return false; 381 if (hasUsername() != other.hasUsername()) return false; 382 if (hasUsername()) { 383 if (!getUsername() 384 .equals(other.getUsername())) return false; 385 } 386 if (hasPassword() != other.hasPassword()) return false; 387 if (hasPassword()) { 388 if (!getPassword() 389 .equals(other.getPassword())) return false; 390 } 391 if (hasCert() != other.hasCert()) return false; 392 if (hasCert()) { 393 if (!getCert() 394 .equals(other.getCert())) return false; 395 } 396 if (hasClientId() != other.hasClientId()) return false; 397 if (hasClientId()) { 398 if (!getClientId() 399 .equals(other.getClientId())) return false; 400 } 401 if (!getRemoteAddr() 402 .equals(other.getRemoteAddr())) return false; 403 if (getRemotePort() 404 != other.getRemotePort()) return false; 405 if (!getChannelId() 406 .equals(other.getChannelId())) return false; 407 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 408 return true; 409 } 410 411 @java.lang.Override 412 public int hashCode() { 413 if (memoizedHashCode != 0) { 414 return memoizedHashCode; 415 } 416 int hash = 41; 417 hash = (19 * hash) + getDescriptor().hashCode(); 418 hash = (37 * hash) + ISMQISDP_FIELD_NUMBER; 419 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( 420 getIsMQIsdp()); 421 if (hasUsername()) { 422 hash = (37 * hash) + USERNAME_FIELD_NUMBER; 423 hash = (53 * hash) + getUsername().hashCode(); 424 } 425 if (hasPassword()) { 426 hash = (37 * hash) + PASSWORD_FIELD_NUMBER; 427 hash = (53 * hash) + getPassword().hashCode(); 428 } 429 if (hasCert()) { 430 hash = (37 * hash) + CERT_FIELD_NUMBER; 431 hash = (53 * hash) + getCert().hashCode(); 432 } 433 if (hasClientId()) { 434 hash = (37 * hash) + CLIENTID_FIELD_NUMBER; 435 hash = (53 * hash) + getClientId().hashCode(); 436 } 437 hash = (37 * hash) + REMOTEADDR_FIELD_NUMBER; 438 hash = (53 * hash) + getRemoteAddr().hashCode(); 439 hash = (37 * hash) + REMOTEPORT_FIELD_NUMBER; 440 hash = (53 * hash) + getRemotePort(); 441 hash = (37 * hash) + CHANNELID_FIELD_NUMBER; 442 hash = (53 * hash) + getChannelId().hashCode(); 443 hash = (29 * hash) + getUnknownFields().hashCode(); 444 memoizedHashCode = hash; 445 return hash; 446 } 447 448 public static com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData parseFrom( 449 java.nio.ByteBuffer data) 450 throws com.google.protobuf.InvalidProtocolBufferException { 451 return PARSER.parseFrom(data); 452 } 453 public static com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData parseFrom( 454 java.nio.ByteBuffer data, 455 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 456 throws com.google.protobuf.InvalidProtocolBufferException { 457 return PARSER.parseFrom(data, extensionRegistry); 458 } 459 public static com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData parseFrom( 460 com.google.protobuf.ByteString data) 461 throws com.google.protobuf.InvalidProtocolBufferException { 462 return PARSER.parseFrom(data); 463 } 464 public static com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData parseFrom( 465 com.google.protobuf.ByteString data, 466 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 467 throws com.google.protobuf.InvalidProtocolBufferException { 468 return PARSER.parseFrom(data, extensionRegistry); 469 } 470 public static com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData parseFrom(byte[] data) 471 throws com.google.protobuf.InvalidProtocolBufferException { 472 return PARSER.parseFrom(data); 473 } 474 public static com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData parseFrom( 475 byte[] data, 476 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 477 throws com.google.protobuf.InvalidProtocolBufferException { 478 return PARSER.parseFrom(data, extensionRegistry); 479 } 480 public static com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData parseFrom(java.io.InputStream input) 481 throws java.io.IOException { 482 return com.google.protobuf.GeneratedMessageV3 483 .parseWithIOException(PARSER, input); 484 } 485 public static com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData parseFrom( 486 java.io.InputStream input, 487 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 488 throws java.io.IOException { 489 return com.google.protobuf.GeneratedMessageV3 490 .parseWithIOException(PARSER, input, extensionRegistry); 491 } 492 public static com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData parseDelimitedFrom(java.io.InputStream input) 493 throws java.io.IOException { 494 return com.google.protobuf.GeneratedMessageV3 495 .parseDelimitedWithIOException(PARSER, input); 496 } 497 public static com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData parseDelimitedFrom( 498 java.io.InputStream input, 499 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 500 throws java.io.IOException { 501 return com.google.protobuf.GeneratedMessageV3 502 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); 503 } 504 public static com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData parseFrom( 505 com.google.protobuf.CodedInputStream input) 506 throws java.io.IOException { 507 return com.google.protobuf.GeneratedMessageV3 508 .parseWithIOException(PARSER, input); 509 } 510 public static com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData parseFrom( 511 com.google.protobuf.CodedInputStream input, 512 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 513 throws java.io.IOException { 514 return com.google.protobuf.GeneratedMessageV3 515 .parseWithIOException(PARSER, input, extensionRegistry); 516 } 517 518 @java.lang.Override 519 public Builder newBuilderForType() { return newBuilder(); } 520 public static Builder newBuilder() { 521 return DEFAULT_INSTANCE.toBuilder(); 522 } 523 public static Builder newBuilder(com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData prototype) { 524 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 525 } 526 @java.lang.Override 527 public Builder toBuilder() { 528 return this == DEFAULT_INSTANCE 529 ? new Builder() : new Builder().mergeFrom(this); 530 } 531 532 @java.lang.Override 533 protected Builder newBuilderForType( 534 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 535 Builder builder = new Builder(parent); 536 return builder; 537 } 538 /** 539 * Protobuf type {@code mqtt3authtypes.MQTT3AuthData} 540 */ 541 public static final class Builder extends 542 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements 543 // @@protoc_insertion_point(builder_implements:mqtt3authtypes.MQTT3AuthData) 544 com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthDataOrBuilder { 545 public static final com.google.protobuf.Descriptors.Descriptor 546 getDescriptor() { 547 return com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthTypesProto.internal_static_mqtt3authtypes_MQTT3AuthData_descriptor; 548 } 549 550 @java.lang.Override 551 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 552 internalGetFieldAccessorTable() { 553 return com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthTypesProto.internal_static_mqtt3authtypes_MQTT3AuthData_fieldAccessorTable 554 .ensureFieldAccessorsInitialized( 555 com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData.class, com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData.Builder.class); 556 } 557 558 // Construct using com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData.newBuilder() 559 private Builder() { 560 561 } 562 563 private Builder( 564 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 565 super(parent); 566 567 } 568 @java.lang.Override 569 public Builder clear() { 570 super.clear(); 571 bitField0_ = 0; 572 isMQIsdp_ = false; 573 username_ = ""; 574 password_ = com.google.protobuf.ByteString.EMPTY; 575 cert_ = com.google.protobuf.ByteString.EMPTY; 576 clientId_ = ""; 577 remoteAddr_ = ""; 578 remotePort_ = 0; 579 channelId_ = ""; 580 return this; 581 } 582 583 @java.lang.Override 584 public com.google.protobuf.Descriptors.Descriptor 585 getDescriptorForType() { 586 return com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthTypesProto.internal_static_mqtt3authtypes_MQTT3AuthData_descriptor; 587 } 588 589 @java.lang.Override 590 public com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData getDefaultInstanceForType() { 591 return com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData.getDefaultInstance(); 592 } 593 594 @java.lang.Override 595 public com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData build() { 596 com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData result = buildPartial(); 597 if (!result.isInitialized()) { 598 throw newUninitializedMessageException(result); 599 } 600 return result; 601 } 602 603 @java.lang.Override 604 public com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData buildPartial() { 605 com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData result = new com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData(this); 606 if (bitField0_ != 0) { buildPartial0(result); } 607 onBuilt(); 608 return result; 609 } 610 611 private void buildPartial0(com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData result) { 612 int from_bitField0_ = bitField0_; 613 if (((from_bitField0_ & 0x00000001) != 0)) { 614 result.isMQIsdp_ = isMQIsdp_; 615 } 616 int to_bitField0_ = 0; 617 if (((from_bitField0_ & 0x00000002) != 0)) { 618 result.username_ = username_; 619 to_bitField0_ |= 0x00000001; 620 } 621 if (((from_bitField0_ & 0x00000004) != 0)) { 622 result.password_ = password_; 623 to_bitField0_ |= 0x00000002; 624 } 625 if (((from_bitField0_ & 0x00000008) != 0)) { 626 result.cert_ = cert_; 627 to_bitField0_ |= 0x00000004; 628 } 629 if (((from_bitField0_ & 0x00000010) != 0)) { 630 result.clientId_ = clientId_; 631 to_bitField0_ |= 0x00000008; 632 } 633 if (((from_bitField0_ & 0x00000020) != 0)) { 634 result.remoteAddr_ = remoteAddr_; 635 } 636 if (((from_bitField0_ & 0x00000040) != 0)) { 637 result.remotePort_ = remotePort_; 638 } 639 if (((from_bitField0_ & 0x00000080) != 0)) { 640 result.channelId_ = channelId_; 641 } 642 result.bitField0_ |= to_bitField0_; 643 } 644 645 @java.lang.Override 646 public Builder clone() { 647 return super.clone(); 648 } 649 @java.lang.Override 650 public Builder setField( 651 com.google.protobuf.Descriptors.FieldDescriptor field, 652 java.lang.Object value) { 653 return super.setField(field, value); 654 } 655 @java.lang.Override 656 public Builder clearField( 657 com.google.protobuf.Descriptors.FieldDescriptor field) { 658 return super.clearField(field); 659 } 660 @java.lang.Override 661 public Builder clearOneof( 662 com.google.protobuf.Descriptors.OneofDescriptor oneof) { 663 return super.clearOneof(oneof); 664 } 665 @java.lang.Override 666 public Builder setRepeatedField( 667 com.google.protobuf.Descriptors.FieldDescriptor field, 668 int index, java.lang.Object value) { 669 return super.setRepeatedField(field, index, value); 670 } 671 @java.lang.Override 672 public Builder addRepeatedField( 673 com.google.protobuf.Descriptors.FieldDescriptor field, 674 java.lang.Object value) { 675 return super.addRepeatedField(field, value); 676 } 677 @java.lang.Override 678 public Builder mergeFrom(com.google.protobuf.Message other) { 679 if (other instanceof com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData) { 680 return mergeFrom((com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData)other); 681 } else { 682 super.mergeFrom(other); 683 return this; 684 } 685 } 686 687 public Builder mergeFrom(com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData other) { 688 if (other == com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData.getDefaultInstance()) return this; 689 if (other.getIsMQIsdp() != false) { 690 setIsMQIsdp(other.getIsMQIsdp()); 691 } 692 if (other.hasUsername()) { 693 username_ = other.username_; 694 bitField0_ |= 0x00000002; 695 onChanged(); 696 } 697 if (other.hasPassword()) { 698 setPassword(other.getPassword()); 699 } 700 if (other.hasCert()) { 701 setCert(other.getCert()); 702 } 703 if (other.hasClientId()) { 704 clientId_ = other.clientId_; 705 bitField0_ |= 0x00000010; 706 onChanged(); 707 } 708 if (!other.getRemoteAddr().isEmpty()) { 709 remoteAddr_ = other.remoteAddr_; 710 bitField0_ |= 0x00000020; 711 onChanged(); 712 } 713 if (other.getRemotePort() != 0) { 714 setRemotePort(other.getRemotePort()); 715 } 716 if (!other.getChannelId().isEmpty()) { 717 channelId_ = other.channelId_; 718 bitField0_ |= 0x00000080; 719 onChanged(); 720 } 721 this.mergeUnknownFields(other.getUnknownFields()); 722 onChanged(); 723 return this; 724 } 725 726 @java.lang.Override 727 public final boolean isInitialized() { 728 return true; 729 } 730 731 @java.lang.Override 732 public Builder mergeFrom( 733 com.google.protobuf.CodedInputStream input, 734 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 735 throws java.io.IOException { 736 if (extensionRegistry == null) { 737 throw new java.lang.NullPointerException(); 738 } 739 try { 740 boolean done = false; 741 while (!done) { 742 int tag = input.readTag(); 743 switch (tag) { 744 case 0: 745 done = true; 746 break; 747 case 8: { 748 isMQIsdp_ = input.readBool(); 749 bitField0_ |= 0x00000001; 750 break; 751 } // case 8 752 case 18: { 753 username_ = input.readStringRequireUtf8(); 754 bitField0_ |= 0x00000002; 755 break; 756 } // case 18 757 case 26: { 758 password_ = input.readBytes(); 759 bitField0_ |= 0x00000004; 760 break; 761 } // case 26 762 case 34: { 763 cert_ = input.readBytes(); 764 bitField0_ |= 0x00000008; 765 break; 766 } // case 34 767 case 42: { 768 clientId_ = input.readStringRequireUtf8(); 769 bitField0_ |= 0x00000010; 770 break; 771 } // case 42 772 case 50: { 773 remoteAddr_ = input.readStringRequireUtf8(); 774 bitField0_ |= 0x00000020; 775 break; 776 } // case 50 777 case 56: { 778 remotePort_ = input.readUInt32(); 779 bitField0_ |= 0x00000040; 780 break; 781 } // case 56 782 case 66: { 783 channelId_ = input.readStringRequireUtf8(); 784 bitField0_ |= 0x00000080; 785 break; 786 } // case 66 787 default: { 788 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 789 done = true; // was an endgroup tag 790 } 791 break; 792 } // default: 793 } // switch (tag) 794 } // while (!done) 795 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 796 throw e.unwrapIOException(); 797 } finally { 798 onChanged(); 799 } // finally 800 return this; 801 } 802 private int bitField0_; 803 804 private boolean isMQIsdp_ ; 805 /** 806 * <pre> 807 * MQIsdp is MQTT 3.1 808 * </pre> 809 * 810 * <code>bool isMQIsdp = 1;</code> 811 * @return The isMQIsdp. 812 */ 813 @java.lang.Override 814 public boolean getIsMQIsdp() { 815 return isMQIsdp_; 816 } 817 /** 818 * <pre> 819 * MQIsdp is MQTT 3.1 820 * </pre> 821 * 822 * <code>bool isMQIsdp = 1;</code> 823 * @param value The isMQIsdp to set. 824 * @return This builder for chaining. 825 */ 826 public Builder setIsMQIsdp(boolean value) { 827 828 isMQIsdp_ = value; 829 bitField0_ |= 0x00000001; 830 onChanged(); 831 return this; 832 } 833 /** 834 * <pre> 835 * MQIsdp is MQTT 3.1 836 * </pre> 837 * 838 * <code>bool isMQIsdp = 1;</code> 839 * @return This builder for chaining. 840 */ 841 public Builder clearIsMQIsdp() { 842 bitField0_ = (bitField0_ & ~0x00000001); 843 isMQIsdp_ = false; 844 onChanged(); 845 return this; 846 } 847 848 private java.lang.Object username_ = ""; 849 /** 850 * <code>optional string username = 2;</code> 851 * @return Whether the username field is set. 852 */ 853 public boolean hasUsername() { 854 return ((bitField0_ & 0x00000002) != 0); 855 } 856 /** 857 * <code>optional string username = 2;</code> 858 * @return The username. 859 */ 860 public java.lang.String getUsername() { 861 java.lang.Object ref = username_; 862 if (!(ref instanceof java.lang.String)) { 863 com.google.protobuf.ByteString bs = 864 (com.google.protobuf.ByteString) ref; 865 java.lang.String s = bs.toStringUtf8(); 866 username_ = s; 867 return s; 868 } else { 869 return (java.lang.String) ref; 870 } 871 } 872 /** 873 * <code>optional string username = 2;</code> 874 * @return The bytes for username. 875 */ 876 public com.google.protobuf.ByteString 877 getUsernameBytes() { 878 java.lang.Object ref = username_; 879 if (ref instanceof String) { 880 com.google.protobuf.ByteString b = 881 com.google.protobuf.ByteString.copyFromUtf8( 882 (java.lang.String) ref); 883 username_ = b; 884 return b; 885 } else { 886 return (com.google.protobuf.ByteString) ref; 887 } 888 } 889 /** 890 * <code>optional string username = 2;</code> 891 * @param value The username to set. 892 * @return This builder for chaining. 893 */ 894 public Builder setUsername( 895 java.lang.String value) { 896 if (value == null) { throw new NullPointerException(); } 897 username_ = value; 898 bitField0_ |= 0x00000002; 899 onChanged(); 900 return this; 901 } 902 /** 903 * <code>optional string username = 2;</code> 904 * @return This builder for chaining. 905 */ 906 public Builder clearUsername() { 907 username_ = getDefaultInstance().getUsername(); 908 bitField0_ = (bitField0_ & ~0x00000002); 909 onChanged(); 910 return this; 911 } 912 /** 913 * <code>optional string username = 2;</code> 914 * @param value The bytes for username to set. 915 * @return This builder for chaining. 916 */ 917 public Builder setUsernameBytes( 918 com.google.protobuf.ByteString value) { 919 if (value == null) { throw new NullPointerException(); } 920 checkByteStringIsUtf8(value); 921 username_ = value; 922 bitField0_ |= 0x00000002; 923 onChanged(); 924 return this; 925 } 926 927 private com.google.protobuf.ByteString password_ = com.google.protobuf.ByteString.EMPTY; 928 /** 929 * <code>optional bytes password = 3;</code> 930 * @return Whether the password field is set. 931 */ 932 @java.lang.Override 933 public boolean hasPassword() { 934 return ((bitField0_ & 0x00000004) != 0); 935 } 936 /** 937 * <code>optional bytes password = 3;</code> 938 * @return The password. 939 */ 940 @java.lang.Override 941 public com.google.protobuf.ByteString getPassword() { 942 return password_; 943 } 944 /** 945 * <code>optional bytes password = 3;</code> 946 * @param value The password to set. 947 * @return This builder for chaining. 948 */ 949 public Builder setPassword(com.google.protobuf.ByteString value) { 950 if (value == null) { throw new NullPointerException(); } 951 password_ = value; 952 bitField0_ |= 0x00000004; 953 onChanged(); 954 return this; 955 } 956 /** 957 * <code>optional bytes password = 3;</code> 958 * @return This builder for chaining. 959 */ 960 public Builder clearPassword() { 961 bitField0_ = (bitField0_ & ~0x00000004); 962 password_ = getDefaultInstance().getPassword(); 963 onChanged(); 964 return this; 965 } 966 967 private com.google.protobuf.ByteString cert_ = com.google.protobuf.ByteString.EMPTY; 968 /** 969 * <code>optional bytes cert = 4;</code> 970 * @return Whether the cert field is set. 971 */ 972 @java.lang.Override 973 public boolean hasCert() { 974 return ((bitField0_ & 0x00000008) != 0); 975 } 976 /** 977 * <code>optional bytes cert = 4;</code> 978 * @return The cert. 979 */ 980 @java.lang.Override 981 public com.google.protobuf.ByteString getCert() { 982 return cert_; 983 } 984 /** 985 * <code>optional bytes cert = 4;</code> 986 * @param value The cert to set. 987 * @return This builder for chaining. 988 */ 989 public Builder setCert(com.google.protobuf.ByteString value) { 990 if (value == null) { throw new NullPointerException(); } 991 cert_ = value; 992 bitField0_ |= 0x00000008; 993 onChanged(); 994 return this; 995 } 996 /** 997 * <code>optional bytes cert = 4;</code> 998 * @return This builder for chaining. 999 */ 1000 public Builder clearCert() { 1001 bitField0_ = (bitField0_ & ~0x00000008); 1002 cert_ = getDefaultInstance().getCert(); 1003 onChanged(); 1004 return this; 1005 } 1006 1007 private java.lang.Object clientId_ = ""; 1008 /** 1009 * <code>optional string clientId = 5;</code> 1010 * @return Whether the clientId field is set. 1011 */ 1012 public boolean hasClientId() { 1013 return ((bitField0_ & 0x00000010) != 0); 1014 } 1015 /** 1016 * <code>optional string clientId = 5;</code> 1017 * @return The clientId. 1018 */ 1019 public java.lang.String getClientId() { 1020 java.lang.Object ref = clientId_; 1021 if (!(ref instanceof java.lang.String)) { 1022 com.google.protobuf.ByteString bs = 1023 (com.google.protobuf.ByteString) ref; 1024 java.lang.String s = bs.toStringUtf8(); 1025 clientId_ = s; 1026 return s; 1027 } else { 1028 return (java.lang.String) ref; 1029 } 1030 } 1031 /** 1032 * <code>optional string clientId = 5;</code> 1033 * @return The bytes for clientId. 1034 */ 1035 public com.google.protobuf.ByteString 1036 getClientIdBytes() { 1037 java.lang.Object ref = clientId_; 1038 if (ref instanceof String) { 1039 com.google.protobuf.ByteString b = 1040 com.google.protobuf.ByteString.copyFromUtf8( 1041 (java.lang.String) ref); 1042 clientId_ = b; 1043 return b; 1044 } else { 1045 return (com.google.protobuf.ByteString) ref; 1046 } 1047 } 1048 /** 1049 * <code>optional string clientId = 5;</code> 1050 * @param value The clientId to set. 1051 * @return This builder for chaining. 1052 */ 1053 public Builder setClientId( 1054 java.lang.String value) { 1055 if (value == null) { throw new NullPointerException(); } 1056 clientId_ = value; 1057 bitField0_ |= 0x00000010; 1058 onChanged(); 1059 return this; 1060 } 1061 /** 1062 * <code>optional string clientId = 5;</code> 1063 * @return This builder for chaining. 1064 */ 1065 public Builder clearClientId() { 1066 clientId_ = getDefaultInstance().getClientId(); 1067 bitField0_ = (bitField0_ & ~0x00000010); 1068 onChanged(); 1069 return this; 1070 } 1071 /** 1072 * <code>optional string clientId = 5;</code> 1073 * @param value The bytes for clientId to set. 1074 * @return This builder for chaining. 1075 */ 1076 public Builder setClientIdBytes( 1077 com.google.protobuf.ByteString value) { 1078 if (value == null) { throw new NullPointerException(); } 1079 checkByteStringIsUtf8(value); 1080 clientId_ = value; 1081 bitField0_ |= 0x00000010; 1082 onChanged(); 1083 return this; 1084 } 1085 1086 private java.lang.Object remoteAddr_ = ""; 1087 /** 1088 * <code>string remoteAddr = 6;</code> 1089 * @return The remoteAddr. 1090 */ 1091 public java.lang.String getRemoteAddr() { 1092 java.lang.Object ref = remoteAddr_; 1093 if (!(ref instanceof java.lang.String)) { 1094 com.google.protobuf.ByteString bs = 1095 (com.google.protobuf.ByteString) ref; 1096 java.lang.String s = bs.toStringUtf8(); 1097 remoteAddr_ = s; 1098 return s; 1099 } else { 1100 return (java.lang.String) ref; 1101 } 1102 } 1103 /** 1104 * <code>string remoteAddr = 6;</code> 1105 * @return The bytes for remoteAddr. 1106 */ 1107 public com.google.protobuf.ByteString 1108 getRemoteAddrBytes() { 1109 java.lang.Object ref = remoteAddr_; 1110 if (ref instanceof String) { 1111 com.google.protobuf.ByteString b = 1112 com.google.protobuf.ByteString.copyFromUtf8( 1113 (java.lang.String) ref); 1114 remoteAddr_ = b; 1115 return b; 1116 } else { 1117 return (com.google.protobuf.ByteString) ref; 1118 } 1119 } 1120 /** 1121 * <code>string remoteAddr = 6;</code> 1122 * @param value The remoteAddr to set. 1123 * @return This builder for chaining. 1124 */ 1125 public Builder setRemoteAddr( 1126 java.lang.String value) { 1127 if (value == null) { throw new NullPointerException(); } 1128 remoteAddr_ = value; 1129 bitField0_ |= 0x00000020; 1130 onChanged(); 1131 return this; 1132 } 1133 /** 1134 * <code>string remoteAddr = 6;</code> 1135 * @return This builder for chaining. 1136 */ 1137 public Builder clearRemoteAddr() { 1138 remoteAddr_ = getDefaultInstance().getRemoteAddr(); 1139 bitField0_ = (bitField0_ & ~0x00000020); 1140 onChanged(); 1141 return this; 1142 } 1143 /** 1144 * <code>string remoteAddr = 6;</code> 1145 * @param value The bytes for remoteAddr to set. 1146 * @return This builder for chaining. 1147 */ 1148 public Builder setRemoteAddrBytes( 1149 com.google.protobuf.ByteString value) { 1150 if (value == null) { throw new NullPointerException(); } 1151 checkByteStringIsUtf8(value); 1152 remoteAddr_ = value; 1153 bitField0_ |= 0x00000020; 1154 onChanged(); 1155 return this; 1156 } 1157 1158 private int remotePort_ ; 1159 /** 1160 * <code>uint32 remotePort = 7;</code> 1161 * @return The remotePort. 1162 */ 1163 @java.lang.Override 1164 public int getRemotePort() { 1165 return remotePort_; 1166 } 1167 /** 1168 * <code>uint32 remotePort = 7;</code> 1169 * @param value The remotePort to set. 1170 * @return This builder for chaining. 1171 */ 1172 public Builder setRemotePort(int value) { 1173 1174 remotePort_ = value; 1175 bitField0_ |= 0x00000040; 1176 onChanged(); 1177 return this; 1178 } 1179 /** 1180 * <code>uint32 remotePort = 7;</code> 1181 * @return This builder for chaining. 1182 */ 1183 public Builder clearRemotePort() { 1184 bitField0_ = (bitField0_ & ~0x00000040); 1185 remotePort_ = 0; 1186 onChanged(); 1187 return this; 1188 } 1189 1190 private java.lang.Object channelId_ = ""; 1191 /** 1192 * <code>string channelId = 8;</code> 1193 * @return The channelId. 1194 */ 1195 public java.lang.String getChannelId() { 1196 java.lang.Object ref = channelId_; 1197 if (!(ref instanceof java.lang.String)) { 1198 com.google.protobuf.ByteString bs = 1199 (com.google.protobuf.ByteString) ref; 1200 java.lang.String s = bs.toStringUtf8(); 1201 channelId_ = s; 1202 return s; 1203 } else { 1204 return (java.lang.String) ref; 1205 } 1206 } 1207 /** 1208 * <code>string channelId = 8;</code> 1209 * @return The bytes for channelId. 1210 */ 1211 public com.google.protobuf.ByteString 1212 getChannelIdBytes() { 1213 java.lang.Object ref = channelId_; 1214 if (ref instanceof String) { 1215 com.google.protobuf.ByteString b = 1216 com.google.protobuf.ByteString.copyFromUtf8( 1217 (java.lang.String) ref); 1218 channelId_ = b; 1219 return b; 1220 } else { 1221 return (com.google.protobuf.ByteString) ref; 1222 } 1223 } 1224 /** 1225 * <code>string channelId = 8;</code> 1226 * @param value The channelId to set. 1227 * @return This builder for chaining. 1228 */ 1229 public Builder setChannelId( 1230 java.lang.String value) { 1231 if (value == null) { throw new NullPointerException(); } 1232 channelId_ = value; 1233 bitField0_ |= 0x00000080; 1234 onChanged(); 1235 return this; 1236 } 1237 /** 1238 * <code>string channelId = 8;</code> 1239 * @return This builder for chaining. 1240 */ 1241 public Builder clearChannelId() { 1242 channelId_ = getDefaultInstance().getChannelId(); 1243 bitField0_ = (bitField0_ & ~0x00000080); 1244 onChanged(); 1245 return this; 1246 } 1247 /** 1248 * <code>string channelId = 8;</code> 1249 * @param value The bytes for channelId to set. 1250 * @return This builder for chaining. 1251 */ 1252 public Builder setChannelIdBytes( 1253 com.google.protobuf.ByteString value) { 1254 if (value == null) { throw new NullPointerException(); } 1255 checkByteStringIsUtf8(value); 1256 channelId_ = value; 1257 bitField0_ |= 0x00000080; 1258 onChanged(); 1259 return this; 1260 } 1261 @java.lang.Override 1262 public final Builder setUnknownFields( 1263 final com.google.protobuf.UnknownFieldSet unknownFields) { 1264 return super.setUnknownFields(unknownFields); 1265 } 1266 1267 @java.lang.Override 1268 public final Builder mergeUnknownFields( 1269 final com.google.protobuf.UnknownFieldSet unknownFields) { 1270 return super.mergeUnknownFields(unknownFields); 1271 } 1272 1273 1274 // @@protoc_insertion_point(builder_scope:mqtt3authtypes.MQTT3AuthData) 1275 } 1276 1277 // @@protoc_insertion_point(class_scope:mqtt3authtypes.MQTT3AuthData) 1278 private static final com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData DEFAULT_INSTANCE; 1279 static { 1280 DEFAULT_INSTANCE = new com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData(); 1281 } 1282 1283 public static com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData getDefaultInstance() { 1284 return DEFAULT_INSTANCE; 1285 } 1286 1287 private static final com.google.protobuf.Parser<MQTT3AuthData> 1288 PARSER = new com.google.protobuf.AbstractParser<MQTT3AuthData>() { 1289 @java.lang.Override 1290 public MQTT3AuthData parsePartialFrom( 1291 com.google.protobuf.CodedInputStream input, 1292 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1293 throws com.google.protobuf.InvalidProtocolBufferException { 1294 Builder builder = newBuilder(); 1295 try { 1296 builder.mergeFrom(input, extensionRegistry); 1297 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1298 throw e.setUnfinishedMessage(builder.buildPartial()); 1299 } catch (com.google.protobuf.UninitializedMessageException e) { 1300 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1301 } catch (java.io.IOException e) { 1302 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1303 .setUnfinishedMessage(builder.buildPartial()); 1304 } 1305 return builder.buildPartial(); 1306 } 1307 }; 1308 1309 public static com.google.protobuf.Parser<MQTT3AuthData> parser() { 1310 return PARSER; 1311 } 1312 1313 @java.lang.Override 1314 public com.google.protobuf.Parser<MQTT3AuthData> getParserForType() { 1315 return PARSER; 1316 } 1317 1318 @java.lang.Override 1319 public com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthData getDefaultInstanceForType() { 1320 return DEFAULT_INSTANCE; 1321 } 1322 1323} 1324