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.Reject}
008 */
009public final class Reject extends
010    com.google.protobuf.GeneratedMessageV3 implements
011    // @@protoc_insertion_point(message_implements:mqtt3authtypes.Reject)
012    RejectOrBuilder {
013private static final long serialVersionUID = 0L;
014  // Use Reject.newBuilder() to construct.
015  private Reject(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
016    super(builder);
017  }
018  private Reject() {
019    code_ = 0;
020    reason_ = "";
021  }
022
023  @java.lang.Override
024  @SuppressWarnings({"unused"})
025  protected java.lang.Object newInstance(
026      UnusedPrivateParameter unused) {
027    return new Reject();
028  }
029
030  @java.lang.Override
031  public final com.google.protobuf.UnknownFieldSet
032  getUnknownFields() {
033    return this.unknownFields;
034  }
035  public static final com.google.protobuf.Descriptors.Descriptor
036      getDescriptor() {
037    return com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthTypesProto.internal_static_mqtt3authtypes_Reject_descriptor;
038  }
039
040  @java.lang.Override
041  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
042      internalGetFieldAccessorTable() {
043    return com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthTypesProto.internal_static_mqtt3authtypes_Reject_fieldAccessorTable
044        .ensureFieldAccessorsInitialized(
045            com.baidu.bifromq.plugin.authprovider.type.Reject.class, com.baidu.bifromq.plugin.authprovider.type.Reject.Builder.class);
046  }
047
048  /**
049   * Protobuf enum {@code mqtt3authtypes.Reject.Code}
050   */
051  public enum Code
052      implements com.google.protobuf.ProtocolMessageEnum {
053    /**
054     * <code>BadPass = 0;</code>
055     */
056    BadPass(0),
057    /**
058     * <code>NotAuthorized = 1;</code>
059     */
060    NotAuthorized(1),
061    /**
062     * <code>Error = 2;</code>
063     */
064    Error(2),
065    UNRECOGNIZED(-1),
066    ;
067
068    /**
069     * <code>BadPass = 0;</code>
070     */
071    public static final int BadPass_VALUE = 0;
072    /**
073     * <code>NotAuthorized = 1;</code>
074     */
075    public static final int NotAuthorized_VALUE = 1;
076    /**
077     * <code>Error = 2;</code>
078     */
079    public static final int Error_VALUE = 2;
080
081
082    public final int getNumber() {
083      if (this == UNRECOGNIZED) {
084        throw new java.lang.IllegalArgumentException(
085            "Can't get the number of an unknown enum value.");
086      }
087      return value;
088    }
089
090    /**
091     * @param value The numeric wire value of the corresponding enum entry.
092     * @return The enum associated with the given numeric wire value.
093     * @deprecated Use {@link #forNumber(int)} instead.
094     */
095    @java.lang.Deprecated
096    public static Code valueOf(int value) {
097      return forNumber(value);
098    }
099
100    /**
101     * @param value The numeric wire value of the corresponding enum entry.
102     * @return The enum associated with the given numeric wire value.
103     */
104    public static Code forNumber(int value) {
105      switch (value) {
106        case 0: return BadPass;
107        case 1: return NotAuthorized;
108        case 2: return Error;
109        default: return null;
110      }
111    }
112
113    public static com.google.protobuf.Internal.EnumLiteMap<Code>
114        internalGetValueMap() {
115      return internalValueMap;
116    }
117    private static final com.google.protobuf.Internal.EnumLiteMap<
118        Code> internalValueMap =
119          new com.google.protobuf.Internal.EnumLiteMap<Code>() {
120            public Code findValueByNumber(int number) {
121              return Code.forNumber(number);
122            }
123          };
124
125    public final com.google.protobuf.Descriptors.EnumValueDescriptor
126        getValueDescriptor() {
127      if (this == UNRECOGNIZED) {
128        throw new java.lang.IllegalStateException(
129            "Can't get the descriptor of an unrecognized enum value.");
130      }
131      return getDescriptor().getValues().get(ordinal());
132    }
133    public final com.google.protobuf.Descriptors.EnumDescriptor
134        getDescriptorForType() {
135      return getDescriptor();
136    }
137    public static final com.google.protobuf.Descriptors.EnumDescriptor
138        getDescriptor() {
139      return com.baidu.bifromq.plugin.authprovider.type.Reject.getDescriptor().getEnumTypes().get(0);
140    }
141
142    private static final Code[] VALUES = values();
143
144    public static Code valueOf(
145        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
146      if (desc.getType() != getDescriptor()) {
147        throw new java.lang.IllegalArgumentException(
148          "EnumValueDescriptor is not for this type.");
149      }
150      if (desc.getIndex() == -1) {
151        return UNRECOGNIZED;
152      }
153      return VALUES[desc.getIndex()];
154    }
155
156    private final int value;
157
158    private Code(int value) {
159      this.value = value;
160    }
161
162    // @@protoc_insertion_point(enum_scope:mqtt3authtypes.Reject.Code)
163  }
164
165  private int bitField0_;
166  public static final int CODE_FIELD_NUMBER = 1;
167  private int code_ = 0;
168  /**
169   * <code>.mqtt3authtypes.Reject.Code code = 1;</code>
170   * @return The enum numeric value on the wire for code.
171   */
172  @java.lang.Override public int getCodeValue() {
173    return code_;
174  }
175  /**
176   * <code>.mqtt3authtypes.Reject.Code code = 1;</code>
177   * @return The code.
178   */
179  @java.lang.Override public com.baidu.bifromq.plugin.authprovider.type.Reject.Code getCode() {
180    com.baidu.bifromq.plugin.authprovider.type.Reject.Code result = com.baidu.bifromq.plugin.authprovider.type.Reject.Code.forNumber(code_);
181    return result == null ? com.baidu.bifromq.plugin.authprovider.type.Reject.Code.UNRECOGNIZED : result;
182  }
183
184  public static final int REASON_FIELD_NUMBER = 2;
185  @SuppressWarnings("serial")
186  private volatile java.lang.Object reason_ = "";
187  /**
188   * <pre>
189   * optional description
190   * </pre>
191   *
192   * <code>optional string reason = 2;</code>
193   * @return Whether the reason field is set.
194   */
195  @java.lang.Override
196  public boolean hasReason() {
197    return ((bitField0_ & 0x00000001) != 0);
198  }
199  /**
200   * <pre>
201   * optional description
202   * </pre>
203   *
204   * <code>optional string reason = 2;</code>
205   * @return The reason.
206   */
207  @java.lang.Override
208  public java.lang.String getReason() {
209    java.lang.Object ref = reason_;
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      reason_ = s;
217      return s;
218    }
219  }
220  /**
221   * <pre>
222   * optional description
223   * </pre>
224   *
225   * <code>optional string reason = 2;</code>
226   * @return The bytes for reason.
227   */
228  @java.lang.Override
229  public com.google.protobuf.ByteString
230      getReasonBytes() {
231    java.lang.Object ref = reason_;
232    if (ref instanceof java.lang.String) {
233      com.google.protobuf.ByteString b = 
234          com.google.protobuf.ByteString.copyFromUtf8(
235              (java.lang.String) ref);
236      reason_ = b;
237      return b;
238    } else {
239      return (com.google.protobuf.ByteString) ref;
240    }
241  }
242
243  private byte memoizedIsInitialized = -1;
244  @java.lang.Override
245  public final boolean isInitialized() {
246    byte isInitialized = memoizedIsInitialized;
247    if (isInitialized == 1) return true;
248    if (isInitialized == 0) return false;
249
250    memoizedIsInitialized = 1;
251    return true;
252  }
253
254  @java.lang.Override
255  public void writeTo(com.google.protobuf.CodedOutputStream output)
256                      throws java.io.IOException {
257    if (code_ != com.baidu.bifromq.plugin.authprovider.type.Reject.Code.BadPass.getNumber()) {
258      output.writeEnum(1, code_);
259    }
260    if (((bitField0_ & 0x00000001) != 0)) {
261      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, reason_);
262    }
263    getUnknownFields().writeTo(output);
264  }
265
266  @java.lang.Override
267  public int getSerializedSize() {
268    int size = memoizedSize;
269    if (size != -1) return size;
270
271    size = 0;
272    if (code_ != com.baidu.bifromq.plugin.authprovider.type.Reject.Code.BadPass.getNumber()) {
273      size += com.google.protobuf.CodedOutputStream
274        .computeEnumSize(1, code_);
275    }
276    if (((bitField0_ & 0x00000001) != 0)) {
277      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, reason_);
278    }
279    size += getUnknownFields().getSerializedSize();
280    memoizedSize = size;
281    return size;
282  }
283
284  @java.lang.Override
285  public boolean equals(final java.lang.Object obj) {
286    if (obj == this) {
287     return true;
288    }
289    if (!(obj instanceof com.baidu.bifromq.plugin.authprovider.type.Reject)) {
290      return super.equals(obj);
291    }
292    com.baidu.bifromq.plugin.authprovider.type.Reject other = (com.baidu.bifromq.plugin.authprovider.type.Reject) obj;
293
294    if (code_ != other.code_) return false;
295    if (hasReason() != other.hasReason()) return false;
296    if (hasReason()) {
297      if (!getReason()
298          .equals(other.getReason())) return false;
299    }
300    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
301    return true;
302  }
303
304  @java.lang.Override
305  public int hashCode() {
306    if (memoizedHashCode != 0) {
307      return memoizedHashCode;
308    }
309    int hash = 41;
310    hash = (19 * hash) + getDescriptor().hashCode();
311    hash = (37 * hash) + CODE_FIELD_NUMBER;
312    hash = (53 * hash) + code_;
313    if (hasReason()) {
314      hash = (37 * hash) + REASON_FIELD_NUMBER;
315      hash = (53 * hash) + getReason().hashCode();
316    }
317    hash = (29 * hash) + getUnknownFields().hashCode();
318    memoizedHashCode = hash;
319    return hash;
320  }
321
322  public static com.baidu.bifromq.plugin.authprovider.type.Reject parseFrom(
323      java.nio.ByteBuffer data)
324      throws com.google.protobuf.InvalidProtocolBufferException {
325    return PARSER.parseFrom(data);
326  }
327  public static com.baidu.bifromq.plugin.authprovider.type.Reject parseFrom(
328      java.nio.ByteBuffer data,
329      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
330      throws com.google.protobuf.InvalidProtocolBufferException {
331    return PARSER.parseFrom(data, extensionRegistry);
332  }
333  public static com.baidu.bifromq.plugin.authprovider.type.Reject parseFrom(
334      com.google.protobuf.ByteString data)
335      throws com.google.protobuf.InvalidProtocolBufferException {
336    return PARSER.parseFrom(data);
337  }
338  public static com.baidu.bifromq.plugin.authprovider.type.Reject parseFrom(
339      com.google.protobuf.ByteString data,
340      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
341      throws com.google.protobuf.InvalidProtocolBufferException {
342    return PARSER.parseFrom(data, extensionRegistry);
343  }
344  public static com.baidu.bifromq.plugin.authprovider.type.Reject parseFrom(byte[] data)
345      throws com.google.protobuf.InvalidProtocolBufferException {
346    return PARSER.parseFrom(data);
347  }
348  public static com.baidu.bifromq.plugin.authprovider.type.Reject parseFrom(
349      byte[] data,
350      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
351      throws com.google.protobuf.InvalidProtocolBufferException {
352    return PARSER.parseFrom(data, extensionRegistry);
353  }
354  public static com.baidu.bifromq.plugin.authprovider.type.Reject parseFrom(java.io.InputStream input)
355      throws java.io.IOException {
356    return com.google.protobuf.GeneratedMessageV3
357        .parseWithIOException(PARSER, input);
358  }
359  public static com.baidu.bifromq.plugin.authprovider.type.Reject parseFrom(
360      java.io.InputStream input,
361      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
362      throws java.io.IOException {
363    return com.google.protobuf.GeneratedMessageV3
364        .parseWithIOException(PARSER, input, extensionRegistry);
365  }
366  public static com.baidu.bifromq.plugin.authprovider.type.Reject parseDelimitedFrom(java.io.InputStream input)
367      throws java.io.IOException {
368    return com.google.protobuf.GeneratedMessageV3
369        .parseDelimitedWithIOException(PARSER, input);
370  }
371  public static com.baidu.bifromq.plugin.authprovider.type.Reject parseDelimitedFrom(
372      java.io.InputStream input,
373      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
374      throws java.io.IOException {
375    return com.google.protobuf.GeneratedMessageV3
376        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
377  }
378  public static com.baidu.bifromq.plugin.authprovider.type.Reject parseFrom(
379      com.google.protobuf.CodedInputStream input)
380      throws java.io.IOException {
381    return com.google.protobuf.GeneratedMessageV3
382        .parseWithIOException(PARSER, input);
383  }
384  public static com.baidu.bifromq.plugin.authprovider.type.Reject parseFrom(
385      com.google.protobuf.CodedInputStream input,
386      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
387      throws java.io.IOException {
388    return com.google.protobuf.GeneratedMessageV3
389        .parseWithIOException(PARSER, input, extensionRegistry);
390  }
391
392  @java.lang.Override
393  public Builder newBuilderForType() { return newBuilder(); }
394  public static Builder newBuilder() {
395    return DEFAULT_INSTANCE.toBuilder();
396  }
397  public static Builder newBuilder(com.baidu.bifromq.plugin.authprovider.type.Reject prototype) {
398    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
399  }
400  @java.lang.Override
401  public Builder toBuilder() {
402    return this == DEFAULT_INSTANCE
403        ? new Builder() : new Builder().mergeFrom(this);
404  }
405
406  @java.lang.Override
407  protected Builder newBuilderForType(
408      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
409    Builder builder = new Builder(parent);
410    return builder;
411  }
412  /**
413   * Protobuf type {@code mqtt3authtypes.Reject}
414   */
415  public static final class Builder extends
416      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
417      // @@protoc_insertion_point(builder_implements:mqtt3authtypes.Reject)
418      com.baidu.bifromq.plugin.authprovider.type.RejectOrBuilder {
419    public static final com.google.protobuf.Descriptors.Descriptor
420        getDescriptor() {
421      return com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthTypesProto.internal_static_mqtt3authtypes_Reject_descriptor;
422    }
423
424    @java.lang.Override
425    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
426        internalGetFieldAccessorTable() {
427      return com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthTypesProto.internal_static_mqtt3authtypes_Reject_fieldAccessorTable
428          .ensureFieldAccessorsInitialized(
429              com.baidu.bifromq.plugin.authprovider.type.Reject.class, com.baidu.bifromq.plugin.authprovider.type.Reject.Builder.class);
430    }
431
432    // Construct using com.baidu.bifromq.plugin.authprovider.type.Reject.newBuilder()
433    private Builder() {
434
435    }
436
437    private Builder(
438        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
439      super(parent);
440
441    }
442    @java.lang.Override
443    public Builder clear() {
444      super.clear();
445      bitField0_ = 0;
446      code_ = 0;
447      reason_ = "";
448      return this;
449    }
450
451    @java.lang.Override
452    public com.google.protobuf.Descriptors.Descriptor
453        getDescriptorForType() {
454      return com.baidu.bifromq.plugin.authprovider.type.MQTT3AuthTypesProto.internal_static_mqtt3authtypes_Reject_descriptor;
455    }
456
457    @java.lang.Override
458    public com.baidu.bifromq.plugin.authprovider.type.Reject getDefaultInstanceForType() {
459      return com.baidu.bifromq.plugin.authprovider.type.Reject.getDefaultInstance();
460    }
461
462    @java.lang.Override
463    public com.baidu.bifromq.plugin.authprovider.type.Reject build() {
464      com.baidu.bifromq.plugin.authprovider.type.Reject result = buildPartial();
465      if (!result.isInitialized()) {
466        throw newUninitializedMessageException(result);
467      }
468      return result;
469    }
470
471    @java.lang.Override
472    public com.baidu.bifromq.plugin.authprovider.type.Reject buildPartial() {
473      com.baidu.bifromq.plugin.authprovider.type.Reject result = new com.baidu.bifromq.plugin.authprovider.type.Reject(this);
474      if (bitField0_ != 0) { buildPartial0(result); }
475      onBuilt();
476      return result;
477    }
478
479    private void buildPartial0(com.baidu.bifromq.plugin.authprovider.type.Reject result) {
480      int from_bitField0_ = bitField0_;
481      if (((from_bitField0_ & 0x00000001) != 0)) {
482        result.code_ = code_;
483      }
484      int to_bitField0_ = 0;
485      if (((from_bitField0_ & 0x00000002) != 0)) {
486        result.reason_ = reason_;
487        to_bitField0_ |= 0x00000001;
488      }
489      result.bitField0_ |= to_bitField0_;
490    }
491
492    @java.lang.Override
493    public Builder clone() {
494      return super.clone();
495    }
496    @java.lang.Override
497    public Builder setField(
498        com.google.protobuf.Descriptors.FieldDescriptor field,
499        java.lang.Object value) {
500      return super.setField(field, value);
501    }
502    @java.lang.Override
503    public Builder clearField(
504        com.google.protobuf.Descriptors.FieldDescriptor field) {
505      return super.clearField(field);
506    }
507    @java.lang.Override
508    public Builder clearOneof(
509        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
510      return super.clearOneof(oneof);
511    }
512    @java.lang.Override
513    public Builder setRepeatedField(
514        com.google.protobuf.Descriptors.FieldDescriptor field,
515        int index, java.lang.Object value) {
516      return super.setRepeatedField(field, index, value);
517    }
518    @java.lang.Override
519    public Builder addRepeatedField(
520        com.google.protobuf.Descriptors.FieldDescriptor field,
521        java.lang.Object value) {
522      return super.addRepeatedField(field, value);
523    }
524    @java.lang.Override
525    public Builder mergeFrom(com.google.protobuf.Message other) {
526      if (other instanceof com.baidu.bifromq.plugin.authprovider.type.Reject) {
527        return mergeFrom((com.baidu.bifromq.plugin.authprovider.type.Reject)other);
528      } else {
529        super.mergeFrom(other);
530        return this;
531      }
532    }
533
534    public Builder mergeFrom(com.baidu.bifromq.plugin.authprovider.type.Reject other) {
535      if (other == com.baidu.bifromq.plugin.authprovider.type.Reject.getDefaultInstance()) return this;
536      if (other.code_ != 0) {
537        setCodeValue(other.getCodeValue());
538      }
539      if (other.hasReason()) {
540        reason_ = other.reason_;
541        bitField0_ |= 0x00000002;
542        onChanged();
543      }
544      this.mergeUnknownFields(other.getUnknownFields());
545      onChanged();
546      return this;
547    }
548
549    @java.lang.Override
550    public final boolean isInitialized() {
551      return true;
552    }
553
554    @java.lang.Override
555    public Builder mergeFrom(
556        com.google.protobuf.CodedInputStream input,
557        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
558        throws java.io.IOException {
559      if (extensionRegistry == null) {
560        throw new java.lang.NullPointerException();
561      }
562      try {
563        boolean done = false;
564        while (!done) {
565          int tag = input.readTag();
566          switch (tag) {
567            case 0:
568              done = true;
569              break;
570            case 8: {
571              code_ = input.readEnum();
572              bitField0_ |= 0x00000001;
573              break;
574            } // case 8
575            case 18: {
576              reason_ = input.readStringRequireUtf8();
577              bitField0_ |= 0x00000002;
578              break;
579            } // case 18
580            default: {
581              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
582                done = true; // was an endgroup tag
583              }
584              break;
585            } // default:
586          } // switch (tag)
587        } // while (!done)
588      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
589        throw e.unwrapIOException();
590      } finally {
591        onChanged();
592      } // finally
593      return this;
594    }
595    private int bitField0_;
596
597    private int code_ = 0;
598    /**
599     * <code>.mqtt3authtypes.Reject.Code code = 1;</code>
600     * @return The enum numeric value on the wire for code.
601     */
602    @java.lang.Override public int getCodeValue() {
603      return code_;
604    }
605    /**
606     * <code>.mqtt3authtypes.Reject.Code code = 1;</code>
607     * @param value The enum numeric value on the wire for code to set.
608     * @return This builder for chaining.
609     */
610    public Builder setCodeValue(int value) {
611      code_ = value;
612      bitField0_ |= 0x00000001;
613      onChanged();
614      return this;
615    }
616    /**
617     * <code>.mqtt3authtypes.Reject.Code code = 1;</code>
618     * @return The code.
619     */
620    @java.lang.Override
621    public com.baidu.bifromq.plugin.authprovider.type.Reject.Code getCode() {
622      com.baidu.bifromq.plugin.authprovider.type.Reject.Code result = com.baidu.bifromq.plugin.authprovider.type.Reject.Code.forNumber(code_);
623      return result == null ? com.baidu.bifromq.plugin.authprovider.type.Reject.Code.UNRECOGNIZED : result;
624    }
625    /**
626     * <code>.mqtt3authtypes.Reject.Code code = 1;</code>
627     * @param value The code to set.
628     * @return This builder for chaining.
629     */
630    public Builder setCode(com.baidu.bifromq.plugin.authprovider.type.Reject.Code value) {
631      if (value == null) {
632        throw new NullPointerException();
633      }
634      bitField0_ |= 0x00000001;
635      code_ = value.getNumber();
636      onChanged();
637      return this;
638    }
639    /**
640     * <code>.mqtt3authtypes.Reject.Code code = 1;</code>
641     * @return This builder for chaining.
642     */
643    public Builder clearCode() {
644      bitField0_ = (bitField0_ & ~0x00000001);
645      code_ = 0;
646      onChanged();
647      return this;
648    }
649
650    private java.lang.Object reason_ = "";
651    /**
652     * <pre>
653     * optional description
654     * </pre>
655     *
656     * <code>optional string reason = 2;</code>
657     * @return Whether the reason field is set.
658     */
659    public boolean hasReason() {
660      return ((bitField0_ & 0x00000002) != 0);
661    }
662    /**
663     * <pre>
664     * optional description
665     * </pre>
666     *
667     * <code>optional string reason = 2;</code>
668     * @return The reason.
669     */
670    public java.lang.String getReason() {
671      java.lang.Object ref = reason_;
672      if (!(ref instanceof java.lang.String)) {
673        com.google.protobuf.ByteString bs =
674            (com.google.protobuf.ByteString) ref;
675        java.lang.String s = bs.toStringUtf8();
676        reason_ = s;
677        return s;
678      } else {
679        return (java.lang.String) ref;
680      }
681    }
682    /**
683     * <pre>
684     * optional description
685     * </pre>
686     *
687     * <code>optional string reason = 2;</code>
688     * @return The bytes for reason.
689     */
690    public com.google.protobuf.ByteString
691        getReasonBytes() {
692      java.lang.Object ref = reason_;
693      if (ref instanceof String) {
694        com.google.protobuf.ByteString b = 
695            com.google.protobuf.ByteString.copyFromUtf8(
696                (java.lang.String) ref);
697        reason_ = b;
698        return b;
699      } else {
700        return (com.google.protobuf.ByteString) ref;
701      }
702    }
703    /**
704     * <pre>
705     * optional description
706     * </pre>
707     *
708     * <code>optional string reason = 2;</code>
709     * @param value The reason to set.
710     * @return This builder for chaining.
711     */
712    public Builder setReason(
713        java.lang.String value) {
714      if (value == null) { throw new NullPointerException(); }
715      reason_ = value;
716      bitField0_ |= 0x00000002;
717      onChanged();
718      return this;
719    }
720    /**
721     * <pre>
722     * optional description
723     * </pre>
724     *
725     * <code>optional string reason = 2;</code>
726     * @return This builder for chaining.
727     */
728    public Builder clearReason() {
729      reason_ = getDefaultInstance().getReason();
730      bitField0_ = (bitField0_ & ~0x00000002);
731      onChanged();
732      return this;
733    }
734    /**
735     * <pre>
736     * optional description
737     * </pre>
738     *
739     * <code>optional string reason = 2;</code>
740     * @param value The bytes for reason to set.
741     * @return This builder for chaining.
742     */
743    public Builder setReasonBytes(
744        com.google.protobuf.ByteString value) {
745      if (value == null) { throw new NullPointerException(); }
746      checkByteStringIsUtf8(value);
747      reason_ = value;
748      bitField0_ |= 0x00000002;
749      onChanged();
750      return this;
751    }
752    @java.lang.Override
753    public final Builder setUnknownFields(
754        final com.google.protobuf.UnknownFieldSet unknownFields) {
755      return super.setUnknownFields(unknownFields);
756    }
757
758    @java.lang.Override
759    public final Builder mergeUnknownFields(
760        final com.google.protobuf.UnknownFieldSet unknownFields) {
761      return super.mergeUnknownFields(unknownFields);
762    }
763
764
765    // @@protoc_insertion_point(builder_scope:mqtt3authtypes.Reject)
766  }
767
768  // @@protoc_insertion_point(class_scope:mqtt3authtypes.Reject)
769  private static final com.baidu.bifromq.plugin.authprovider.type.Reject DEFAULT_INSTANCE;
770  static {
771    DEFAULT_INSTANCE = new com.baidu.bifromq.plugin.authprovider.type.Reject();
772  }
773
774  public static com.baidu.bifromq.plugin.authprovider.type.Reject getDefaultInstance() {
775    return DEFAULT_INSTANCE;
776  }
777
778  private static final com.google.protobuf.Parser<Reject>
779      PARSER = new com.google.protobuf.AbstractParser<Reject>() {
780    @java.lang.Override
781    public Reject parsePartialFrom(
782        com.google.protobuf.CodedInputStream input,
783        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
784        throws com.google.protobuf.InvalidProtocolBufferException {
785      Builder builder = newBuilder();
786      try {
787        builder.mergeFrom(input, extensionRegistry);
788      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
789        throw e.setUnfinishedMessage(builder.buildPartial());
790      } catch (com.google.protobuf.UninitializedMessageException e) {
791        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
792      } catch (java.io.IOException e) {
793        throw new com.google.protobuf.InvalidProtocolBufferException(e)
794            .setUnfinishedMessage(builder.buildPartial());
795      }
796      return builder.buildPartial();
797    }
798  };
799
800  public static com.google.protobuf.Parser<Reject> parser() {
801    return PARSER;
802  }
803
804  @java.lang.Override
805  public com.google.protobuf.Parser<Reject> getParserForType() {
806    return PARSER;
807  }
808
809  @java.lang.Override
810  public com.baidu.bifromq.plugin.authprovider.type.Reject getDefaultInstanceForType() {
811    return DEFAULT_INSTANCE;
812  }
813
814}
815