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

import java.io.IOException;
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;

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

    private NpcExtraInfo() {
    }

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

    @Override
    public NpcExtraInfo copyFrom(final NpcExtraInfo other) {
      cachedSize = other.cachedSize;
      return this;
    }

    @Override
    public NpcExtraInfo mergeFrom(final NpcExtraInfo other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      return this;
    }

    @Override
    public NpcExtraInfo clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      return this;
    }

    @Override
    public NpcExtraInfo clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof NpcExtraInfo)) {
        return false;
      }
      NpcExtraInfo other = (NpcExtraInfo) o;
      return true;
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public NpcExtraInfo mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          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();
      output.endObject();
    }

    @Override
    public NpcExtraInfo mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum NpcExtraInfoFactory implements MessageFactory<NpcExtraInfo> {
      INSTANCE;

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

    /**
     * Contains name constants used for serializing JSON
     */
    static class FieldNames {
    }
  }
}
