// 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 GateserverOuterClass {
  /**
   * Protobuf type {@code Gateserver}
   */
  public static final class Gateserver extends ProtoMessage<Gateserver> implements Cloneable {
    private static final long serialVersionUID = 0L;

    /**
     * <code>optional uint32 port = 7;</code>
     */
    private int port;

    /**
     * <code>optional bool unk1 = 9;</code>
     */
    private boolean unk1;

    /**
     * <code>optional bool unk2 = 12;</code>
     */
    private boolean unk2;

    /**
     * <code>optional bool unk5 = 678;</code>
     */
    private boolean unk5;

    /**
     * <code>optional bool unk3 = 1461;</code>
     */
    private boolean unk3;

    /**
     * <code>optional bool unk6 = 1727;</code>
     */
    private boolean unk6;

    /**
     * <code>optional bool unk4 = 1764;</code>
     */
    private boolean unk4;

    /**
     * <code>optional string region_name = 2;</code>
     */
    private final Utf8String regionName = Utf8String.newEmptyInstance();

    /**
     * <code>optional string lua_url = 5;</code>
     */
    private final Utf8String luaUrl = Utf8String.newEmptyInstance();

    /**
     * <code>optional string ex_resource_url = 8;</code>
     */
    private final Utf8String exResourceUrl = Utf8String.newEmptyInstance();

    /**
     * <code>optional string asset_bundle_url = 11;</code>
     */
    private final Utf8String assetBundleUrl = Utf8String.newEmptyInstance();

    /**
     * <code>optional string ip = 13;</code>
     */
    private final Utf8String ip = Utf8String.newEmptyInstance();

    /**
     * <code>optional string ifix_url = 1088;</code>
     */
    private final Utf8String ifixUrl = Utf8String.newEmptyInstance();

    /**
     * <code>optional string client_secret_key = 1200;</code>
     */
    private final Utf8String clientSecretKey = Utf8String.newEmptyInstance();

    /**
     * <pre>
     *  lua versionf
     * </pre>
     *
     * <code>optional string mdk_res_version = 1213;</code>
     */
    private final Utf8String mdkResVersion = Utf8String.newEmptyInstance();

    /**
     * <pre>
     *  ifix version
     * </pre>
     *
     * <code>optional string ifix_version = 1268;</code>
     */
    private final Utf8String ifixVersion = Utf8String.newEmptyInstance();

    /**
     * <code>optional string msg = 1550;</code>
     */
    private final Utf8String msg = Utf8String.newEmptyInstance();

    private Gateserver() {
    }

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

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

    /**
     * <code>optional uint32 port = 7;</code>
     * @return this
     */
    public Gateserver clearPort() {
      bitField0_ &= ~0x00000001;
      port = 0;
      return this;
    }

    /**
     * <code>optional uint32 port = 7;</code>
     * @return the port
     */
    public int getPort() {
      return port;
    }

    /**
     * <code>optional uint32 port = 7;</code>
     * @param value the port to set
     * @return this
     */
    public Gateserver setPort(final int value) {
      bitField0_ |= 0x00000001;
      port = value;
      return this;
    }

    /**
     * <code>optional bool unk1 = 9;</code>
     * @return whether the unk1 field is set
     */
    public boolean hasUnk1() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional bool unk1 = 9;</code>
     * @return this
     */
    public Gateserver clearUnk1() {
      bitField0_ &= ~0x00000002;
      unk1 = false;
      return this;
    }

    /**
     * <code>optional bool unk1 = 9;</code>
     * @return the unk1
     */
    public boolean getUnk1() {
      return unk1;
    }

    /**
     * <code>optional bool unk1 = 9;</code>
     * @param value the unk1 to set
     * @return this
     */
    public Gateserver setUnk1(final boolean value) {
      bitField0_ |= 0x00000002;
      unk1 = value;
      return this;
    }

    /**
     * <code>optional bool unk2 = 12;</code>
     * @return whether the unk2 field is set
     */
    public boolean hasUnk2() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional bool unk2 = 12;</code>
     * @return this
     */
    public Gateserver clearUnk2() {
      bitField0_ &= ~0x00000004;
      unk2 = false;
      return this;
    }

    /**
     * <code>optional bool unk2 = 12;</code>
     * @return the unk2
     */
    public boolean getUnk2() {
      return unk2;
    }

    /**
     * <code>optional bool unk2 = 12;</code>
     * @param value the unk2 to set
     * @return this
     */
    public Gateserver setUnk2(final boolean value) {
      bitField0_ |= 0x00000004;
      unk2 = value;
      return this;
    }

    /**
     * <code>optional bool unk5 = 678;</code>
     * @return whether the unk5 field is set
     */
    public boolean hasUnk5() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional bool unk5 = 678;</code>
     * @return this
     */
    public Gateserver clearUnk5() {
      bitField0_ &= ~0x00000008;
      unk5 = false;
      return this;
    }

    /**
     * <code>optional bool unk5 = 678;</code>
     * @return the unk5
     */
    public boolean getUnk5() {
      return unk5;
    }

    /**
     * <code>optional bool unk5 = 678;</code>
     * @param value the unk5 to set
     * @return this
     */
    public Gateserver setUnk5(final boolean value) {
      bitField0_ |= 0x00000008;
      unk5 = value;
      return this;
    }

    /**
     * <code>optional bool unk3 = 1461;</code>
     * @return whether the unk3 field is set
     */
    public boolean hasUnk3() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>optional bool unk3 = 1461;</code>
     * @return this
     */
    public Gateserver clearUnk3() {
      bitField0_ &= ~0x00000010;
      unk3 = false;
      return this;
    }

    /**
     * <code>optional bool unk3 = 1461;</code>
     * @return the unk3
     */
    public boolean getUnk3() {
      return unk3;
    }

    /**
     * <code>optional bool unk3 = 1461;</code>
     * @param value the unk3 to set
     * @return this
     */
    public Gateserver setUnk3(final boolean value) {
      bitField0_ |= 0x00000010;
      unk3 = value;
      return this;
    }

    /**
     * <code>optional bool unk6 = 1727;</code>
     * @return whether the unk6 field is set
     */
    public boolean hasUnk6() {
      return (bitField0_ & 0x00000020) != 0;
    }

    /**
     * <code>optional bool unk6 = 1727;</code>
     * @return this
     */
    public Gateserver clearUnk6() {
      bitField0_ &= ~0x00000020;
      unk6 = false;
      return this;
    }

    /**
     * <code>optional bool unk6 = 1727;</code>
     * @return the unk6
     */
    public boolean getUnk6() {
      return unk6;
    }

    /**
     * <code>optional bool unk6 = 1727;</code>
     * @param value the unk6 to set
     * @return this
     */
    public Gateserver setUnk6(final boolean value) {
      bitField0_ |= 0x00000020;
      unk6 = value;
      return this;
    }

    /**
     * <code>optional bool unk4 = 1764;</code>
     * @return whether the unk4 field is set
     */
    public boolean hasUnk4() {
      return (bitField0_ & 0x00000040) != 0;
    }

    /**
     * <code>optional bool unk4 = 1764;</code>
     * @return this
     */
    public Gateserver clearUnk4() {
      bitField0_ &= ~0x00000040;
      unk4 = false;
      return this;
    }

    /**
     * <code>optional bool unk4 = 1764;</code>
     * @return the unk4
     */
    public boolean getUnk4() {
      return unk4;
    }

    /**
     * <code>optional bool unk4 = 1764;</code>
     * @param value the unk4 to set
     * @return this
     */
    public Gateserver setUnk4(final boolean value) {
      bitField0_ |= 0x00000040;
      unk4 = value;
      return this;
    }

    /**
     * <code>optional string region_name = 2;</code>
     * @return whether the regionName field is set
     */
    public boolean hasRegionName() {
      return (bitField0_ & 0x00000080) != 0;
    }

    /**
     * <code>optional string region_name = 2;</code>
     * @return this
     */
    public Gateserver clearRegionName() {
      bitField0_ &= ~0x00000080;
      regionName.clear();
      return this;
    }

    /**
     * <code>optional string region_name = 2;</code>
     * @return the regionName
     */
    public String getRegionName() {
      return regionName.getString();
    }

    /**
     * <code>optional string region_name = 2;</code>
     * @return internal {@code Utf8String} representation of regionName for reading
     */
    public Utf8String getRegionNameBytes() {
      return this.regionName;
    }

    /**
     * <code>optional string region_name = 2;</code>
     * @return internal {@code Utf8String} representation of regionName for modifications
     */
    public Utf8String getMutableRegionNameBytes() {
      bitField0_ |= 0x00000080;
      return this.regionName;
    }

    /**
     * <code>optional string region_name = 2;</code>
     * @param value the regionName to set
     * @return this
     */
    public Gateserver setRegionName(final CharSequence value) {
      bitField0_ |= 0x00000080;
      regionName.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string region_name = 2;</code>
     * @param value the regionName to set
     * @return this
     */
    public Gateserver setRegionName(final Utf8String value) {
      bitField0_ |= 0x00000080;
      regionName.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string lua_url = 5;</code>
     * @return whether the luaUrl field is set
     */
    public boolean hasLuaUrl() {
      return (bitField0_ & 0x00000100) != 0;
    }

    /**
     * <code>optional string lua_url = 5;</code>
     * @return this
     */
    public Gateserver clearLuaUrl() {
      bitField0_ &= ~0x00000100;
      luaUrl.clear();
      return this;
    }

    /**
     * <code>optional string lua_url = 5;</code>
     * @return the luaUrl
     */
    public String getLuaUrl() {
      return luaUrl.getString();
    }

    /**
     * <code>optional string lua_url = 5;</code>
     * @return internal {@code Utf8String} representation of luaUrl for reading
     */
    public Utf8String getLuaUrlBytes() {
      return this.luaUrl;
    }

    /**
     * <code>optional string lua_url = 5;</code>
     * @return internal {@code Utf8String} representation of luaUrl for modifications
     */
    public Utf8String getMutableLuaUrlBytes() {
      bitField0_ |= 0x00000100;
      return this.luaUrl;
    }

    /**
     * <code>optional string lua_url = 5;</code>
     * @param value the luaUrl to set
     * @return this
     */
    public Gateserver setLuaUrl(final CharSequence value) {
      bitField0_ |= 0x00000100;
      luaUrl.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string lua_url = 5;</code>
     * @param value the luaUrl to set
     * @return this
     */
    public Gateserver setLuaUrl(final Utf8String value) {
      bitField0_ |= 0x00000100;
      luaUrl.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string ex_resource_url = 8;</code>
     * @return whether the exResourceUrl field is set
     */
    public boolean hasExResourceUrl() {
      return (bitField0_ & 0x00000200) != 0;
    }

    /**
     * <code>optional string ex_resource_url = 8;</code>
     * @return this
     */
    public Gateserver clearExResourceUrl() {
      bitField0_ &= ~0x00000200;
      exResourceUrl.clear();
      return this;
    }

    /**
     * <code>optional string ex_resource_url = 8;</code>
     * @return the exResourceUrl
     */
    public String getExResourceUrl() {
      return exResourceUrl.getString();
    }

    /**
     * <code>optional string ex_resource_url = 8;</code>
     * @return internal {@code Utf8String} representation of exResourceUrl for reading
     */
    public Utf8String getExResourceUrlBytes() {
      return this.exResourceUrl;
    }

    /**
     * <code>optional string ex_resource_url = 8;</code>
     * @return internal {@code Utf8String} representation of exResourceUrl for modifications
     */
    public Utf8String getMutableExResourceUrlBytes() {
      bitField0_ |= 0x00000200;
      return this.exResourceUrl;
    }

    /**
     * <code>optional string ex_resource_url = 8;</code>
     * @param value the exResourceUrl to set
     * @return this
     */
    public Gateserver setExResourceUrl(final CharSequence value) {
      bitField0_ |= 0x00000200;
      exResourceUrl.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string ex_resource_url = 8;</code>
     * @param value the exResourceUrl to set
     * @return this
     */
    public Gateserver setExResourceUrl(final Utf8String value) {
      bitField0_ |= 0x00000200;
      exResourceUrl.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string asset_bundle_url = 11;</code>
     * @return whether the assetBundleUrl field is set
     */
    public boolean hasAssetBundleUrl() {
      return (bitField0_ & 0x00000400) != 0;
    }

    /**
     * <code>optional string asset_bundle_url = 11;</code>
     * @return this
     */
    public Gateserver clearAssetBundleUrl() {
      bitField0_ &= ~0x00000400;
      assetBundleUrl.clear();
      return this;
    }

    /**
     * <code>optional string asset_bundle_url = 11;</code>
     * @return the assetBundleUrl
     */
    public String getAssetBundleUrl() {
      return assetBundleUrl.getString();
    }

    /**
     * <code>optional string asset_bundle_url = 11;</code>
     * @return internal {@code Utf8String} representation of assetBundleUrl for reading
     */
    public Utf8String getAssetBundleUrlBytes() {
      return this.assetBundleUrl;
    }

    /**
     * <code>optional string asset_bundle_url = 11;</code>
     * @return internal {@code Utf8String} representation of assetBundleUrl for modifications
     */
    public Utf8String getMutableAssetBundleUrlBytes() {
      bitField0_ |= 0x00000400;
      return this.assetBundleUrl;
    }

    /**
     * <code>optional string asset_bundle_url = 11;</code>
     * @param value the assetBundleUrl to set
     * @return this
     */
    public Gateserver setAssetBundleUrl(final CharSequence value) {
      bitField0_ |= 0x00000400;
      assetBundleUrl.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string asset_bundle_url = 11;</code>
     * @param value the assetBundleUrl to set
     * @return this
     */
    public Gateserver setAssetBundleUrl(final Utf8String value) {
      bitField0_ |= 0x00000400;
      assetBundleUrl.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string ip = 13;</code>
     * @return whether the ip field is set
     */
    public boolean hasIp() {
      return (bitField0_ & 0x00000800) != 0;
    }

    /**
     * <code>optional string ip = 13;</code>
     * @return this
     */
    public Gateserver clearIp() {
      bitField0_ &= ~0x00000800;
      ip.clear();
      return this;
    }

    /**
     * <code>optional string ip = 13;</code>
     * @return the ip
     */
    public String getIp() {
      return ip.getString();
    }

    /**
     * <code>optional string ip = 13;</code>
     * @return internal {@code Utf8String} representation of ip for reading
     */
    public Utf8String getIpBytes() {
      return this.ip;
    }

    /**
     * <code>optional string ip = 13;</code>
     * @return internal {@code Utf8String} representation of ip for modifications
     */
    public Utf8String getMutableIpBytes() {
      bitField0_ |= 0x00000800;
      return this.ip;
    }

    /**
     * <code>optional string ip = 13;</code>
     * @param value the ip to set
     * @return this
     */
    public Gateserver setIp(final CharSequence value) {
      bitField0_ |= 0x00000800;
      ip.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string ip = 13;</code>
     * @param value the ip to set
     * @return this
     */
    public Gateserver setIp(final Utf8String value) {
      bitField0_ |= 0x00000800;
      ip.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string ifix_url = 1088;</code>
     * @return whether the ifixUrl field is set
     */
    public boolean hasIfixUrl() {
      return (bitField0_ & 0x00001000) != 0;
    }

    /**
     * <code>optional string ifix_url = 1088;</code>
     * @return this
     */
    public Gateserver clearIfixUrl() {
      bitField0_ &= ~0x00001000;
      ifixUrl.clear();
      return this;
    }

    /**
     * <code>optional string ifix_url = 1088;</code>
     * @return the ifixUrl
     */
    public String getIfixUrl() {
      return ifixUrl.getString();
    }

    /**
     * <code>optional string ifix_url = 1088;</code>
     * @return internal {@code Utf8String} representation of ifixUrl for reading
     */
    public Utf8String getIfixUrlBytes() {
      return this.ifixUrl;
    }

    /**
     * <code>optional string ifix_url = 1088;</code>
     * @return internal {@code Utf8String} representation of ifixUrl for modifications
     */
    public Utf8String getMutableIfixUrlBytes() {
      bitField0_ |= 0x00001000;
      return this.ifixUrl;
    }

    /**
     * <code>optional string ifix_url = 1088;</code>
     * @param value the ifixUrl to set
     * @return this
     */
    public Gateserver setIfixUrl(final CharSequence value) {
      bitField0_ |= 0x00001000;
      ifixUrl.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string ifix_url = 1088;</code>
     * @param value the ifixUrl to set
     * @return this
     */
    public Gateserver setIfixUrl(final Utf8String value) {
      bitField0_ |= 0x00001000;
      ifixUrl.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string client_secret_key = 1200;</code>
     * @return whether the clientSecretKey field is set
     */
    public boolean hasClientSecretKey() {
      return (bitField0_ & 0x00002000) != 0;
    }

    /**
     * <code>optional string client_secret_key = 1200;</code>
     * @return this
     */
    public Gateserver clearClientSecretKey() {
      bitField0_ &= ~0x00002000;
      clientSecretKey.clear();
      return this;
    }

    /**
     * <code>optional string client_secret_key = 1200;</code>
     * @return the clientSecretKey
     */
    public String getClientSecretKey() {
      return clientSecretKey.getString();
    }

    /**
     * <code>optional string client_secret_key = 1200;</code>
     * @return internal {@code Utf8String} representation of clientSecretKey for reading
     */
    public Utf8String getClientSecretKeyBytes() {
      return this.clientSecretKey;
    }

    /**
     * <code>optional string client_secret_key = 1200;</code>
     * @return internal {@code Utf8String} representation of clientSecretKey for modifications
     */
    public Utf8String getMutableClientSecretKeyBytes() {
      bitField0_ |= 0x00002000;
      return this.clientSecretKey;
    }

    /**
     * <code>optional string client_secret_key = 1200;</code>
     * @param value the clientSecretKey to set
     * @return this
     */
    public Gateserver setClientSecretKey(final CharSequence value) {
      bitField0_ |= 0x00002000;
      clientSecretKey.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string client_secret_key = 1200;</code>
     * @param value the clientSecretKey to set
     * @return this
     */
    public Gateserver setClientSecretKey(final Utf8String value) {
      bitField0_ |= 0x00002000;
      clientSecretKey.copyFrom(value);
      return this;
    }

    /**
     * <pre>
     *  lua versionf
     * </pre>
     *
     * <code>optional string mdk_res_version = 1213;</code>
     * @return whether the mdkResVersion field is set
     */
    public boolean hasMdkResVersion() {
      return (bitField0_ & 0x00004000) != 0;
    }

    /**
     * <pre>
     *  lua versionf
     * </pre>
     *
     * <code>optional string mdk_res_version = 1213;</code>
     * @return this
     */
    public Gateserver clearMdkResVersion() {
      bitField0_ &= ~0x00004000;
      mdkResVersion.clear();
      return this;
    }

    /**
     * <pre>
     *  lua versionf
     * </pre>
     *
     * <code>optional string mdk_res_version = 1213;</code>
     * @return the mdkResVersion
     */
    public String getMdkResVersion() {
      return mdkResVersion.getString();
    }

    /**
     * <pre>
     *  lua versionf
     * </pre>
     *
     * <code>optional string mdk_res_version = 1213;</code>
     * @return internal {@code Utf8String} representation of mdkResVersion for reading
     */
    public Utf8String getMdkResVersionBytes() {
      return this.mdkResVersion;
    }

    /**
     * <pre>
     *  lua versionf
     * </pre>
     *
     * <code>optional string mdk_res_version = 1213;</code>
     * @return internal {@code Utf8String} representation of mdkResVersion for modifications
     */
    public Utf8String getMutableMdkResVersionBytes() {
      bitField0_ |= 0x00004000;
      return this.mdkResVersion;
    }

    /**
     * <pre>
     *  lua versionf
     * </pre>
     *
     * <code>optional string mdk_res_version = 1213;</code>
     * @param value the mdkResVersion to set
     * @return this
     */
    public Gateserver setMdkResVersion(final CharSequence value) {
      bitField0_ |= 0x00004000;
      mdkResVersion.copyFrom(value);
      return this;
    }

    /**
     * <pre>
     *  lua versionf
     * </pre>
     *
     * <code>optional string mdk_res_version = 1213;</code>
     * @param value the mdkResVersion to set
     * @return this
     */
    public Gateserver setMdkResVersion(final Utf8String value) {
      bitField0_ |= 0x00004000;
      mdkResVersion.copyFrom(value);
      return this;
    }

    /**
     * <pre>
     *  ifix version
     * </pre>
     *
     * <code>optional string ifix_version = 1268;</code>
     * @return whether the ifixVersion field is set
     */
    public boolean hasIfixVersion() {
      return (bitField0_ & 0x00008000) != 0;
    }

    /**
     * <pre>
     *  ifix version
     * </pre>
     *
     * <code>optional string ifix_version = 1268;</code>
     * @return this
     */
    public Gateserver clearIfixVersion() {
      bitField0_ &= ~0x00008000;
      ifixVersion.clear();
      return this;
    }

    /**
     * <pre>
     *  ifix version
     * </pre>
     *
     * <code>optional string ifix_version = 1268;</code>
     * @return the ifixVersion
     */
    public String getIfixVersion() {
      return ifixVersion.getString();
    }

    /**
     * <pre>
     *  ifix version
     * </pre>
     *
     * <code>optional string ifix_version = 1268;</code>
     * @return internal {@code Utf8String} representation of ifixVersion for reading
     */
    public Utf8String getIfixVersionBytes() {
      return this.ifixVersion;
    }

    /**
     * <pre>
     *  ifix version
     * </pre>
     *
     * <code>optional string ifix_version = 1268;</code>
     * @return internal {@code Utf8String} representation of ifixVersion for modifications
     */
    public Utf8String getMutableIfixVersionBytes() {
      bitField0_ |= 0x00008000;
      return this.ifixVersion;
    }

    /**
     * <pre>
     *  ifix version
     * </pre>
     *
     * <code>optional string ifix_version = 1268;</code>
     * @param value the ifixVersion to set
     * @return this
     */
    public Gateserver setIfixVersion(final CharSequence value) {
      bitField0_ |= 0x00008000;
      ifixVersion.copyFrom(value);
      return this;
    }

    /**
     * <pre>
     *  ifix version
     * </pre>
     *
     * <code>optional string ifix_version = 1268;</code>
     * @param value the ifixVersion to set
     * @return this
     */
    public Gateserver setIfixVersion(final Utf8String value) {
      bitField0_ |= 0x00008000;
      ifixVersion.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string msg = 1550;</code>
     * @return whether the msg field is set
     */
    public boolean hasMsg() {
      return (bitField0_ & 0x00010000) != 0;
    }

    /**
     * <code>optional string msg = 1550;</code>
     * @return this
     */
    public Gateserver clearMsg() {
      bitField0_ &= ~0x00010000;
      msg.clear();
      return this;
    }

    /**
     * <code>optional string msg = 1550;</code>
     * @return the msg
     */
    public String getMsg() {
      return msg.getString();
    }

    /**
     * <code>optional string msg = 1550;</code>
     * @return internal {@code Utf8String} representation of msg for reading
     */
    public Utf8String getMsgBytes() {
      return this.msg;
    }

    /**
     * <code>optional string msg = 1550;</code>
     * @return internal {@code Utf8String} representation of msg for modifications
     */
    public Utf8String getMutableMsgBytes() {
      bitField0_ |= 0x00010000;
      return this.msg;
    }

    /**
     * <code>optional string msg = 1550;</code>
     * @param value the msg to set
     * @return this
     */
    public Gateserver setMsg(final CharSequence value) {
      bitField0_ |= 0x00010000;
      msg.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string msg = 1550;</code>
     * @param value the msg to set
     * @return this
     */
    public Gateserver setMsg(final Utf8String value) {
      bitField0_ |= 0x00010000;
      msg.copyFrom(value);
      return this;
    }

    @Override
    public Gateserver copyFrom(final Gateserver other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        port = other.port;
        unk1 = other.unk1;
        unk2 = other.unk2;
        unk5 = other.unk5;
        unk3 = other.unk3;
        unk6 = other.unk6;
        unk4 = other.unk4;
        regionName.copyFrom(other.regionName);
        luaUrl.copyFrom(other.luaUrl);
        exResourceUrl.copyFrom(other.exResourceUrl);
        assetBundleUrl.copyFrom(other.assetBundleUrl);
        ip.copyFrom(other.ip);
        ifixUrl.copyFrom(other.ifixUrl);
        clientSecretKey.copyFrom(other.clientSecretKey);
        mdkResVersion.copyFrom(other.mdkResVersion);
        ifixVersion.copyFrom(other.ifixVersion);
        msg.copyFrom(other.msg);
      }
      return this;
    }

    @Override
    public Gateserver mergeFrom(final Gateserver other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasPort()) {
        setPort(other.port);
      }
      if (other.hasUnk1()) {
        setUnk1(other.unk1);
      }
      if (other.hasUnk2()) {
        setUnk2(other.unk2);
      }
      if (other.hasUnk5()) {
        setUnk5(other.unk5);
      }
      if (other.hasUnk3()) {
        setUnk3(other.unk3);
      }
      if (other.hasUnk6()) {
        setUnk6(other.unk6);
      }
      if (other.hasUnk4()) {
        setUnk4(other.unk4);
      }
      if (other.hasRegionName()) {
        getMutableRegionNameBytes().copyFrom(other.regionName);
      }
      if (other.hasLuaUrl()) {
        getMutableLuaUrlBytes().copyFrom(other.luaUrl);
      }
      if (other.hasExResourceUrl()) {
        getMutableExResourceUrlBytes().copyFrom(other.exResourceUrl);
      }
      if (other.hasAssetBundleUrl()) {
        getMutableAssetBundleUrlBytes().copyFrom(other.assetBundleUrl);
      }
      if (other.hasIp()) {
        getMutableIpBytes().copyFrom(other.ip);
      }
      if (other.hasIfixUrl()) {
        getMutableIfixUrlBytes().copyFrom(other.ifixUrl);
      }
      if (other.hasClientSecretKey()) {
        getMutableClientSecretKeyBytes().copyFrom(other.clientSecretKey);
      }
      if (other.hasMdkResVersion()) {
        getMutableMdkResVersionBytes().copyFrom(other.mdkResVersion);
      }
      if (other.hasIfixVersion()) {
        getMutableIfixVersionBytes().copyFrom(other.ifixVersion);
      }
      if (other.hasMsg()) {
        getMutableMsgBytes().copyFrom(other.msg);
      }
      return this;
    }

    @Override
    public Gateserver clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      port = 0;
      unk1 = false;
      unk2 = false;
      unk5 = false;
      unk3 = false;
      unk6 = false;
      unk4 = false;
      regionName.clear();
      luaUrl.clear();
      exResourceUrl.clear();
      assetBundleUrl.clear();
      ip.clear();
      ifixUrl.clear();
      clientSecretKey.clear();
      mdkResVersion.clear();
      ifixVersion.clear();
      msg.clear();
      return this;
    }

    @Override
    public Gateserver clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      regionName.clear();
      luaUrl.clear();
      exResourceUrl.clear();
      assetBundleUrl.clear();
      ip.clear();
      ifixUrl.clear();
      clientSecretKey.clear();
      mdkResVersion.clear();
      ifixVersion.clear();
      msg.clear();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof Gateserver)) {
        return false;
      }
      Gateserver other = (Gateserver) o;
      return bitField0_ == other.bitField0_
        && (!hasPort() || port == other.port)
        && (!hasUnk1() || unk1 == other.unk1)
        && (!hasUnk2() || unk2 == other.unk2)
        && (!hasUnk5() || unk5 == other.unk5)
        && (!hasUnk3() || unk3 == other.unk3)
        && (!hasUnk6() || unk6 == other.unk6)
        && (!hasUnk4() || unk4 == other.unk4)
        && (!hasRegionName() || regionName.equals(other.regionName))
        && (!hasLuaUrl() || luaUrl.equals(other.luaUrl))
        && (!hasExResourceUrl() || exResourceUrl.equals(other.exResourceUrl))
        && (!hasAssetBundleUrl() || assetBundleUrl.equals(other.assetBundleUrl))
        && (!hasIp() || ip.equals(other.ip))
        && (!hasIfixUrl() || ifixUrl.equals(other.ifixUrl))
        && (!hasClientSecretKey() || clientSecretKey.equals(other.clientSecretKey))
        && (!hasMdkResVersion() || mdkResVersion.equals(other.mdkResVersion))
        && (!hasIfixVersion() || ifixVersion.equals(other.ifixVersion))
        && (!hasMsg() || msg.equals(other.msg));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 56);
        output.writeUInt32NoTag(port);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 72);
        output.writeBoolNoTag(unk1);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 96);
        output.writeBoolNoTag(unk2);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawLittleEndian16((short) 10928);
        output.writeBoolNoTag(unk5);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRawLittleEndian16((short) 23464);
        output.writeBoolNoTag(unk3);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRawLittleEndian16((short) 27640);
        output.writeBoolNoTag(unk6);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeRawLittleEndian16((short) 28320);
        output.writeBoolNoTag(unk4);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeRawByte((byte) 18);
        output.writeStringNoTag(regionName);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeRawByte((byte) 42);
        output.writeStringNoTag(luaUrl);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeRawByte((byte) 66);
        output.writeStringNoTag(exResourceUrl);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        output.writeRawByte((byte) 90);
        output.writeStringNoTag(assetBundleUrl);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        output.writeRawByte((byte) 106);
        output.writeStringNoTag(ip);
      }
      if ((bitField0_ & 0x00001000) != 0) {
        output.writeRawLittleEndian16((short) 17538);
        output.writeStringNoTag(ifixUrl);
      }
      if ((bitField0_ & 0x00002000) != 0) {
        output.writeRawLittleEndian16((short) 19330);
        output.writeStringNoTag(clientSecretKey);
      }
      if ((bitField0_ & 0x00004000) != 0) {
        output.writeRawLittleEndian16((short) 19434);
        output.writeStringNoTag(mdkResVersion);
      }
      if ((bitField0_ & 0x00008000) != 0) {
        output.writeRawLittleEndian16((short) 20386);
        output.writeStringNoTag(ifixVersion);
      }
      if ((bitField0_ & 0x00010000) != 0) {
        output.writeRawLittleEndian16((short) 24818);
        output.writeStringNoTag(msg);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeUInt32SizeNoTag(port);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 2;
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 2;
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 3;
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += 3;
      }
      if ((bitField0_ & 0x00000020) != 0) {
        size += 3;
      }
      if ((bitField0_ & 0x00000040) != 0) {
        size += 3;
      }
      if ((bitField0_ & 0x00000080) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(regionName);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(luaUrl);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(exResourceUrl);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(assetBundleUrl);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(ip);
      }
      if ((bitField0_ & 0x00001000) != 0) {
        size += 2 + ProtoSink.computeStringSizeNoTag(ifixUrl);
      }
      if ((bitField0_ & 0x00002000) != 0) {
        size += 2 + ProtoSink.computeStringSizeNoTag(clientSecretKey);
      }
      if ((bitField0_ & 0x00004000) != 0) {
        size += 2 + ProtoSink.computeStringSizeNoTag(mdkResVersion);
      }
      if ((bitField0_ & 0x00008000) != 0) {
        size += 2 + ProtoSink.computeStringSizeNoTag(ifixVersion);
      }
      if ((bitField0_ & 0x00010000) != 0) {
        size += 2 + ProtoSink.computeStringSizeNoTag(msg);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public Gateserver mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 56: {
            // port
            port = input.readUInt32();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 72) {
              break;
            }
          }
          case 72: {
            // unk1
            unk1 = input.readBool();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 96) {
              break;
            }
          }
          case 96: {
            // unk2
            unk2 = input.readBool();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 5424) {
              break;
            }
          }
          case 5424: {
            // unk5
            unk5 = input.readBool();
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 11688) {
              break;
            }
          }
          case 11688: {
            // unk3
            unk3 = input.readBool();
            bitField0_ |= 0x00000010;
            tag = input.readTag();
            if (tag != 13816) {
              break;
            }
          }
          case 13816: {
            // unk6
            unk6 = input.readBool();
            bitField0_ |= 0x00000020;
            tag = input.readTag();
            if (tag != 14112) {
              break;
            }
          }
          case 14112: {
            // unk4
            unk4 = input.readBool();
            bitField0_ |= 0x00000040;
            tag = input.readTag();
            if (tag != 18) {
              break;
            }
          }
          case 18: {
            // regionName
            input.readString(regionName);
            bitField0_ |= 0x00000080;
            tag = input.readTag();
            if (tag != 42) {
              break;
            }
          }
          case 42: {
            // luaUrl
            input.readString(luaUrl);
            bitField0_ |= 0x00000100;
            tag = input.readTag();
            if (tag != 66) {
              break;
            }
          }
          case 66: {
            // exResourceUrl
            input.readString(exResourceUrl);
            bitField0_ |= 0x00000200;
            tag = input.readTag();
            if (tag != 90) {
              break;
            }
          }
          case 90: {
            // assetBundleUrl
            input.readString(assetBundleUrl);
            bitField0_ |= 0x00000400;
            tag = input.readTag();
            if (tag != 106) {
              break;
            }
          }
          case 106: {
            // ip
            input.readString(ip);
            bitField0_ |= 0x00000800;
            tag = input.readTag();
            if (tag != 8706) {
              break;
            }
          }
          case 8706: {
            // ifixUrl
            input.readString(ifixUrl);
            bitField0_ |= 0x00001000;
            tag = input.readTag();
            if (tag != 9602) {
              break;
            }
          }
          case 9602: {
            // clientSecretKey
            input.readString(clientSecretKey);
            bitField0_ |= 0x00002000;
            tag = input.readTag();
            if (tag != 9706) {
              break;
            }
          }
          case 9706: {
            // mdkResVersion
            input.readString(mdkResVersion);
            bitField0_ |= 0x00004000;
            tag = input.readTag();
            if (tag != 10146) {
              break;
            }
          }
          case 10146: {
            // ifixVersion
            input.readString(ifixVersion);
            bitField0_ |= 0x00008000;
            tag = input.readTag();
            if (tag != 12402) {
              break;
            }
          }
          case 12402: {
            // msg
            input.readString(msg);
            bitField0_ |= 0x00010000;
            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.port, port);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeBool(FieldNames.unk1, unk1);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeBool(FieldNames.unk2, unk2);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeBool(FieldNames.unk5, unk5);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeBool(FieldNames.unk3, unk3);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeBool(FieldNames.unk6, unk6);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeBool(FieldNames.unk4, unk4);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeString(FieldNames.regionName, regionName);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeString(FieldNames.luaUrl, luaUrl);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeString(FieldNames.exResourceUrl, exResourceUrl);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        output.writeString(FieldNames.assetBundleUrl, assetBundleUrl);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        output.writeString(FieldNames.ip, ip);
      }
      if ((bitField0_ & 0x00001000) != 0) {
        output.writeString(FieldNames.ifixUrl, ifixUrl);
      }
      if ((bitField0_ & 0x00002000) != 0) {
        output.writeString(FieldNames.clientSecretKey, clientSecretKey);
      }
      if ((bitField0_ & 0x00004000) != 0) {
        output.writeString(FieldNames.mdkResVersion, mdkResVersion);
      }
      if ((bitField0_ & 0x00008000) != 0) {
        output.writeString(FieldNames.ifixVersion, ifixVersion);
      }
      if ((bitField0_ & 0x00010000) != 0) {
        output.writeString(FieldNames.msg, msg);
      }
      output.endObject();
    }

    @Override
    public Gateserver mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 3446913: {
            if (input.isAtField(FieldNames.port)) {
              if (!input.trySkipNullValue()) {
                port = input.readUInt32();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3594623: {
            if (input.isAtField(FieldNames.unk1)) {
              if (!input.trySkipNullValue()) {
                unk1 = input.readBool();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3594624: {
            if (input.isAtField(FieldNames.unk2)) {
              if (!input.trySkipNullValue()) {
                unk2 = input.readBool();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3594627: {
            if (input.isAtField(FieldNames.unk5)) {
              if (!input.trySkipNullValue()) {
                unk5 = input.readBool();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3594625: {
            if (input.isAtField(FieldNames.unk3)) {
              if (!input.trySkipNullValue()) {
                unk3 = input.readBool();
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3594628: {
            if (input.isAtField(FieldNames.unk6)) {
              if (!input.trySkipNullValue()) {
                unk6 = input.readBool();
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3594626: {
            if (input.isAtField(FieldNames.unk4)) {
              if (!input.trySkipNullValue()) {
                unk4 = input.readBool();
                bitField0_ |= 0x00000040;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1990689889:
          case -1565768458: {
            if (input.isAtField(FieldNames.regionName)) {
              if (!input.trySkipNullValue()) {
                input.readString(regionName);
                bitField0_ |= 0x00000080;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1091991977:
          case 508288168: {
            if (input.isAtField(FieldNames.luaUrl)) {
              if (!input.trySkipNullValue()) {
                input.readString(luaUrl);
                bitField0_ |= 0x00000100;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1643520974:
          case -1086137910: {
            if (input.isAtField(FieldNames.exResourceUrl)) {
              if (!input.trySkipNullValue()) {
                input.readString(exResourceUrl);
                bitField0_ |= 0x00000200;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1116358531:
          case 1973569761: {
            if (input.isAtField(FieldNames.assetBundleUrl)) {
              if (!input.trySkipNullValue()) {
                input.readString(assetBundleUrl);
                bitField0_ |= 0x00000400;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3367: {
            if (input.isAtField(FieldNames.ip)) {
              if (!input.trySkipNullValue()) {
                input.readString(ip);
                bitField0_ |= 0x00000800;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1719409347:
          case 1762383292: {
            if (input.isAtField(FieldNames.ifixUrl)) {
              if (!input.trySkipNullValue()) {
                input.readString(ifixUrl);
                bitField0_ |= 0x00001000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -584558076:
          case 904194372: {
            if (input.isAtField(FieldNames.clientSecretKey)) {
              if (!input.trySkipNullValue()) {
                input.readString(clientSecretKey);
                bitField0_ |= 0x00002000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1415579412:
          case -204279250: {
            if (input.isAtField(FieldNames.mdkResVersion)) {
              if (!input.trySkipNullValue()) {
                input.readString(mdkResVersion);
                bitField0_ |= 0x00004000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1625073708:
          case -827048283: {
            if (input.isAtField(FieldNames.ifixVersion)) {
              if (!input.trySkipNullValue()) {
                input.readString(ifixVersion);
                bitField0_ |= 0x00008000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 108417: {
            if (input.isAtField(FieldNames.msg)) {
              if (!input.trySkipNullValue()) {
                input.readString(msg);
                bitField0_ |= 0x00010000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

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

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

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

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

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

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

    private enum GateserverFactory implements MessageFactory<Gateserver> {
      INSTANCE;

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

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

      static final FieldName unk1 = FieldName.forField("unk1");

      static final FieldName unk2 = FieldName.forField("unk2");

      static final FieldName unk5 = FieldName.forField("unk5");

      static final FieldName unk3 = FieldName.forField("unk3");

      static final FieldName unk6 = FieldName.forField("unk6");

      static final FieldName unk4 = FieldName.forField("unk4");

      static final FieldName regionName = FieldName.forField("regionName", "region_name");

      static final FieldName luaUrl = FieldName.forField("luaUrl", "lua_url");

      static final FieldName exResourceUrl = FieldName.forField("exResourceUrl", "ex_resource_url");

      static final FieldName assetBundleUrl = FieldName.forField("assetBundleUrl", "asset_bundle_url");

      static final FieldName ip = FieldName.forField("ip");

      static final FieldName ifixUrl = FieldName.forField("ifixUrl", "ifix_url");

      static final FieldName clientSecretKey = FieldName.forField("clientSecretKey", "client_secret_key");

      static final FieldName mdkResVersion = FieldName.forField("mdkResVersion", "mdk_res_version");

      static final FieldName ifixVersion = FieldName.forField("ifixVersion", "ifix_version");

      static final FieldName msg = FieldName.forField("msg");
    }
  }
}
