// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;

import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.Utf8String;

public final class UpdateGroupPropertyScRspOuterClass {
  /**
   * Protobuf type {@code UpdateGroupPropertyScRsp}
   */
  public static final class UpdateGroupPropertyScRsp extends ProtoMessage<UpdateGroupPropertyScRsp> implements Cloneable {
    private static final long serialVersionUID = 0L;

    /**
     * <code>optional uint32 retcode = 10;</code>
     */
    private int retcode;

    /**
     * <code>optional uint32 PJMIHPLBCEM = 11;</code>
     */
    private int pJMIHPLBCEM;

    /**
     * <pre>
     *  MOAJOOLLPLH
     * </pre>
     *
     * <code>optional uint32 floor_id = 13;</code>
     */
    private int floorId;

    /**
     * <code>optional uint32 group_id = 15;</code>
     */
    private int groupId;

    /**
     * <code>optional sint32 cur_property_value = 6;</code>
     */
    private int curPropertyValue;

    /**
     * <code>optional sint32 BNINLHOKICO = 7;</code>
     */
    private int bNINLHOKICO;

    /**
     * <pre>
     *  GCJKIDIBJHJ
     * </pre>
     *
     * <code>optional string property_name = 4;</code>
     */
    private final Utf8String propertyName = Utf8String.newEmptyInstance();

    private UpdateGroupPropertyScRsp() {
    }

    /**
     * @return a new empty instance of {@code UpdateGroupPropertyScRsp}
     */
    public static UpdateGroupPropertyScRsp newInstance() {
      return new UpdateGroupPropertyScRsp();
    }

    /**
     * <code>optional uint32 retcode = 10;</code>
     * @return whether the retcode field is set
     */
    public boolean hasRetcode() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional uint32 retcode = 10;</code>
     * @return this
     */
    public UpdateGroupPropertyScRsp clearRetcode() {
      bitField0_ &= ~0x00000001;
      retcode = 0;
      return this;
    }

    /**
     * <code>optional uint32 retcode = 10;</code>
     * @return the retcode
     */
    public int getRetcode() {
      return retcode;
    }

    /**
     * <code>optional uint32 retcode = 10;</code>
     * @param value the retcode to set
     * @return this
     */
    public UpdateGroupPropertyScRsp setRetcode(final int value) {
      bitField0_ |= 0x00000001;
      retcode = value;
      return this;
    }

    /**
     * <code>optional uint32 PJMIHPLBCEM = 11;</code>
     * @return whether the pJMIHPLBCEM field is set
     */
    public boolean hasPJMIHPLBCEM() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional uint32 PJMIHPLBCEM = 11;</code>
     * @return this
     */
    public UpdateGroupPropertyScRsp clearPJMIHPLBCEM() {
      bitField0_ &= ~0x00000002;
      pJMIHPLBCEM = 0;
      return this;
    }

    /**
     * <code>optional uint32 PJMIHPLBCEM = 11;</code>
     * @return the pJMIHPLBCEM
     */
    public int getPJMIHPLBCEM() {
      return pJMIHPLBCEM;
    }

    /**
     * <code>optional uint32 PJMIHPLBCEM = 11;</code>
     * @param value the pJMIHPLBCEM to set
     * @return this
     */
    public UpdateGroupPropertyScRsp setPJMIHPLBCEM(final int value) {
      bitField0_ |= 0x00000002;
      pJMIHPLBCEM = value;
      return this;
    }

    /**
     * <pre>
     *  MOAJOOLLPLH
     * </pre>
     *
     * <code>optional uint32 floor_id = 13;</code>
     * @return whether the floorId field is set
     */
    public boolean hasFloorId() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <pre>
     *  MOAJOOLLPLH
     * </pre>
     *
     * <code>optional uint32 floor_id = 13;</code>
     * @return this
     */
    public UpdateGroupPropertyScRsp clearFloorId() {
      bitField0_ &= ~0x00000004;
      floorId = 0;
      return this;
    }

    /**
     * <pre>
     *  MOAJOOLLPLH
     * </pre>
     *
     * <code>optional uint32 floor_id = 13;</code>
     * @return the floorId
     */
    public int getFloorId() {
      return floorId;
    }

    /**
     * <pre>
     *  MOAJOOLLPLH
     * </pre>
     *
     * <code>optional uint32 floor_id = 13;</code>
     * @param value the floorId to set
     * @return this
     */
    public UpdateGroupPropertyScRsp setFloorId(final int value) {
      bitField0_ |= 0x00000004;
      floorId = value;
      return this;
    }

    /**
     * <code>optional uint32 group_id = 15;</code>
     * @return whether the groupId field is set
     */
    public boolean hasGroupId() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional uint32 group_id = 15;</code>
     * @return this
     */
    public UpdateGroupPropertyScRsp clearGroupId() {
      bitField0_ &= ~0x00000008;
      groupId = 0;
      return this;
    }

    /**
     * <code>optional uint32 group_id = 15;</code>
     * @return the groupId
     */
    public int getGroupId() {
      return groupId;
    }

    /**
     * <code>optional uint32 group_id = 15;</code>
     * @param value the groupId to set
     * @return this
     */
    public UpdateGroupPropertyScRsp setGroupId(final int value) {
      bitField0_ |= 0x00000008;
      groupId = value;
      return this;
    }

    /**
     * <code>optional sint32 cur_property_value = 6;</code>
     * @return whether the curPropertyValue field is set
     */
    public boolean hasCurPropertyValue() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>optional sint32 cur_property_value = 6;</code>
     * @return this
     */
    public UpdateGroupPropertyScRsp clearCurPropertyValue() {
      bitField0_ &= ~0x00000010;
      curPropertyValue = 0;
      return this;
    }

    /**
     * <code>optional sint32 cur_property_value = 6;</code>
     * @return the curPropertyValue
     */
    public int getCurPropertyValue() {
      return curPropertyValue;
    }

    /**
     * <code>optional sint32 cur_property_value = 6;</code>
     * @param value the curPropertyValue to set
     * @return this
     */
    public UpdateGroupPropertyScRsp setCurPropertyValue(final int value) {
      bitField0_ |= 0x00000010;
      curPropertyValue = value;
      return this;
    }

    /**
     * <code>optional sint32 BNINLHOKICO = 7;</code>
     * @return whether the bNINLHOKICO field is set
     */
    public boolean hasBNINLHOKICO() {
      return (bitField0_ & 0x00000020) != 0;
    }

    /**
     * <code>optional sint32 BNINLHOKICO = 7;</code>
     * @return this
     */
    public UpdateGroupPropertyScRsp clearBNINLHOKICO() {
      bitField0_ &= ~0x00000020;
      bNINLHOKICO = 0;
      return this;
    }

    /**
     * <code>optional sint32 BNINLHOKICO = 7;</code>
     * @return the bNINLHOKICO
     */
    public int getBNINLHOKICO() {
      return bNINLHOKICO;
    }

    /**
     * <code>optional sint32 BNINLHOKICO = 7;</code>
     * @param value the bNINLHOKICO to set
     * @return this
     */
    public UpdateGroupPropertyScRsp setBNINLHOKICO(final int value) {
      bitField0_ |= 0x00000020;
      bNINLHOKICO = value;
      return this;
    }

    /**
     * <pre>
     *  GCJKIDIBJHJ
     * </pre>
     *
     * <code>optional string property_name = 4;</code>
     * @return whether the propertyName field is set
     */
    public boolean hasPropertyName() {
      return (bitField0_ & 0x00000040) != 0;
    }

    /**
     * <pre>
     *  GCJKIDIBJHJ
     * </pre>
     *
     * <code>optional string property_name = 4;</code>
     * @return this
     */
    public UpdateGroupPropertyScRsp clearPropertyName() {
      bitField0_ &= ~0x00000040;
      propertyName.clear();
      return this;
    }

    /**
     * <pre>
     *  GCJKIDIBJHJ
     * </pre>
     *
     * <code>optional string property_name = 4;</code>
     * @return the propertyName
     */
    public String getPropertyName() {
      return propertyName.getString();
    }

    /**
     * <pre>
     *  GCJKIDIBJHJ
     * </pre>
     *
     * <code>optional string property_name = 4;</code>
     * @return internal {@code Utf8String} representation of propertyName for reading
     */
    public Utf8String getPropertyNameBytes() {
      return this.propertyName;
    }

    /**
     * <pre>
     *  GCJKIDIBJHJ
     * </pre>
     *
     * <code>optional string property_name = 4;</code>
     * @return internal {@code Utf8String} representation of propertyName for modifications
     */
    public Utf8String getMutablePropertyNameBytes() {
      bitField0_ |= 0x00000040;
      return this.propertyName;
    }

    /**
     * <pre>
     *  GCJKIDIBJHJ
     * </pre>
     *
     * <code>optional string property_name = 4;</code>
     * @param value the propertyName to set
     * @return this
     */
    public UpdateGroupPropertyScRsp setPropertyName(final CharSequence value) {
      bitField0_ |= 0x00000040;
      propertyName.copyFrom(value);
      return this;
    }

    /**
     * <pre>
     *  GCJKIDIBJHJ
     * </pre>
     *
     * <code>optional string property_name = 4;</code>
     * @param value the propertyName to set
     * @return this
     */
    public UpdateGroupPropertyScRsp setPropertyName(final Utf8String value) {
      bitField0_ |= 0x00000040;
      propertyName.copyFrom(value);
      return this;
    }

    @Override
    public UpdateGroupPropertyScRsp copyFrom(final UpdateGroupPropertyScRsp other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        retcode = other.retcode;
        pJMIHPLBCEM = other.pJMIHPLBCEM;
        floorId = other.floorId;
        groupId = other.groupId;
        curPropertyValue = other.curPropertyValue;
        bNINLHOKICO = other.bNINLHOKICO;
        propertyName.copyFrom(other.propertyName);
      }
      return this;
    }

    @Override
    public UpdateGroupPropertyScRsp mergeFrom(final UpdateGroupPropertyScRsp other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasRetcode()) {
        setRetcode(other.retcode);
      }
      if (other.hasPJMIHPLBCEM()) {
        setPJMIHPLBCEM(other.pJMIHPLBCEM);
      }
      if (other.hasFloorId()) {
        setFloorId(other.floorId);
      }
      if (other.hasGroupId()) {
        setGroupId(other.groupId);
      }
      if (other.hasCurPropertyValue()) {
        setCurPropertyValue(other.curPropertyValue);
      }
      if (other.hasBNINLHOKICO()) {
        setBNINLHOKICO(other.bNINLHOKICO);
      }
      if (other.hasPropertyName()) {
        getMutablePropertyNameBytes().copyFrom(other.propertyName);
      }
      return this;
    }

    @Override
    public UpdateGroupPropertyScRsp clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      retcode = 0;
      pJMIHPLBCEM = 0;
      floorId = 0;
      groupId = 0;
      curPropertyValue = 0;
      bNINLHOKICO = 0;
      propertyName.clear();
      return this;
    }

    @Override
    public UpdateGroupPropertyScRsp clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      propertyName.clear();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof UpdateGroupPropertyScRsp)) {
        return false;
      }
      UpdateGroupPropertyScRsp other = (UpdateGroupPropertyScRsp) o;
      return bitField0_ == other.bitField0_
        && (!hasRetcode() || retcode == other.retcode)
        && (!hasPJMIHPLBCEM() || pJMIHPLBCEM == other.pJMIHPLBCEM)
        && (!hasFloorId() || floorId == other.floorId)
        && (!hasGroupId() || groupId == other.groupId)
        && (!hasCurPropertyValue() || curPropertyValue == other.curPropertyValue)
        && (!hasBNINLHOKICO() || bNINLHOKICO == other.bNINLHOKICO)
        && (!hasPropertyName() || propertyName.equals(other.propertyName));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 80);
        output.writeUInt32NoTag(retcode);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 88);
        output.writeUInt32NoTag(pJMIHPLBCEM);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 104);
        output.writeUInt32NoTag(floorId);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 120);
        output.writeUInt32NoTag(groupId);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRawByte((byte) 48);
        output.writeSInt32NoTag(curPropertyValue);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRawByte((byte) 56);
        output.writeSInt32NoTag(bNINLHOKICO);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeRawByte((byte) 34);
        output.writeStringNoTag(propertyName);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(pJMIHPLBCEM);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(floorId);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(groupId);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += 1 + ProtoSink.computeSInt32SizeNoTag(curPropertyValue);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        size += 1 + ProtoSink.computeSInt32SizeNoTag(bNINLHOKICO);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(propertyName);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public UpdateGroupPropertyScRsp mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 80: {
            // retcode
            retcode = input.readUInt32();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 88) {
              break;
            }
          }
          case 88: {
            // pJMIHPLBCEM
            pJMIHPLBCEM = input.readUInt32();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 104) {
              break;
            }
          }
          case 104: {
            // floorId
            floorId = input.readUInt32();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 120) {
              break;
            }
          }
          case 120: {
            // groupId
            groupId = input.readUInt32();
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 48) {
              break;
            }
          }
          case 48: {
            // curPropertyValue
            curPropertyValue = input.readSInt32();
            bitField0_ |= 0x00000010;
            tag = input.readTag();
            if (tag != 56) {
              break;
            }
          }
          case 56: {
            // bNINLHOKICO
            bNINLHOKICO = input.readSInt32();
            bitField0_ |= 0x00000020;
            tag = input.readTag();
            if (tag != 34) {
              break;
            }
          }
          case 34: {
            // propertyName
            input.readString(propertyName);
            bitField0_ |= 0x00000040;
            tag = input.readTag();
            if (tag != 0) {
              break;
            }
          }
          case 0: {
            return this;
          }
          default: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
        }
      }
    }

    @Override
    public void writeTo(final JsonSink output) throws IOException {
      output.beginObject();
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeUInt32(FieldNames.retcode, retcode);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeUInt32(FieldNames.pJMIHPLBCEM, pJMIHPLBCEM);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeUInt32(FieldNames.floorId, floorId);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeUInt32(FieldNames.groupId, groupId);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeSInt32(FieldNames.curPropertyValue, curPropertyValue);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeSInt32(FieldNames.bNINLHOKICO, bNINLHOKICO);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeString(FieldNames.propertyName, propertyName);
      }
      output.endObject();
    }

    @Override
    public UpdateGroupPropertyScRsp mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 1097936398: {
            if (input.isAtField(FieldNames.retcode)) {
              if (!input.trySkipNullValue()) {
                retcode = input.readUInt32();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -904914665: {
            if (input.isAtField(FieldNames.pJMIHPLBCEM)) {
              if (!input.trySkipNullValue()) {
                pJMIHPLBCEM = input.readUInt32();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -766027193:
          case 2022982190: {
            if (input.isAtField(FieldNames.floorId)) {
              if (!input.trySkipNullValue()) {
                floorId = input.readUInt32();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 293428218:
          case 506361563: {
            if (input.isAtField(FieldNames.groupId)) {
              if (!input.trySkipNullValue()) {
                groupId = input.readUInt32();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -741771716:
          case 1375371878: {
            if (input.isAtField(FieldNames.curPropertyValue)) {
              if (!input.trySkipNullValue()) {
                curPropertyValue = input.readSInt32();
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -215427188: {
            if (input.isAtField(FieldNames.bNINLHOKICO)) {
              if (!input.trySkipNullValue()) {
                bNINLHOKICO = input.readSInt32();
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -864691712:
          case -1019563339: {
            if (input.isAtField(FieldNames.propertyName)) {
              if (!input.trySkipNullValue()) {
                input.readString(propertyName);
                bitField0_ |= 0x00000040;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

    @Override
    public UpdateGroupPropertyScRsp clone() {
      return new UpdateGroupPropertyScRsp().copyFrom(this);
    }

    @Override
    public boolean isEmpty() {
      return ((bitField0_) == 0);
    }

    public static UpdateGroupPropertyScRsp parseFrom(final byte[] data) throws
        InvalidProtocolBufferException {
      return ProtoMessage.mergeFrom(new UpdateGroupPropertyScRsp(), data).checkInitialized();
    }

    public static UpdateGroupPropertyScRsp parseFrom(final ProtoSource input) throws IOException {
      return ProtoMessage.mergeFrom(new UpdateGroupPropertyScRsp(), input).checkInitialized();
    }

    public static UpdateGroupPropertyScRsp parseFrom(final JsonSource input) throws IOException {
      return ProtoMessage.mergeFrom(new UpdateGroupPropertyScRsp(), input).checkInitialized();
    }

    /**
     * @return factory for creating UpdateGroupPropertyScRsp messages
     */
    public static MessageFactory<UpdateGroupPropertyScRsp> getFactory() {
      return UpdateGroupPropertyScRspFactory.INSTANCE;
    }

    private enum UpdateGroupPropertyScRspFactory implements MessageFactory<UpdateGroupPropertyScRsp> {
      INSTANCE;

      @Override
      public UpdateGroupPropertyScRsp create() {
        return UpdateGroupPropertyScRsp.newInstance();
      }
    }

    /**
     * Contains name constants used for serializing JSON
     */
    static class FieldNames {
      static final FieldName retcode = FieldName.forField("retcode");

      static final FieldName pJMIHPLBCEM = FieldName.forField("PJMIHPLBCEM");

      static final FieldName floorId = FieldName.forField("floorId", "floor_id");

      static final FieldName groupId = FieldName.forField("groupId", "group_id");

      static final FieldName curPropertyValue = FieldName.forField("curPropertyValue", "cur_property_value");

      static final FieldName bNINLHOKICO = FieldName.forField("BNINLHOKICO");

      static final FieldName propertyName = FieldName.forField("propertyName", "property_name");
    }
  }
}
