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