// 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 = 10;</code>
     */
    private boolean unk1;

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

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

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

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

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

    /**
     * <code>optional bool unk7 = 235;</code>
     */
    private boolean unk7;

    /**
     * <code>optional bool unk8 = 454;</code>
     */
    private boolean unk8;

    /**
     * <code>optional bool unk9 = 529;</code>
     */
    private boolean unk9;

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

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

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

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

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

    /**
     * <code>optional string login_white_msg = 43;</code>
     */
    private final Utf8String loginWhiteMsg = Utf8String.newEmptyInstance();

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

    /**
     * <code>optional string ifix_version = 1178;</code>
     */
    private final Utf8String ifixVersion = Utf8String.newEmptyInstance();

    /**
     * <code>optional string mdk_res_version = 1238;</code>
     */
    private final Utf8String mdkResVersion = Utf8String.newEmptyInstance();

    /**
     * <code>optional string asset_bundle_url_2 = 1417;</code>
     */
    private final Utf8String assetBundleUrl2 = Utf8String.newEmptyInstance();

    /**
     * <code>optional string ifix_url = 1488;</code>
     */
    private final Utf8String ifixUrl = 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 = 10;</code>
     * @return whether the unk1 field is set
     */
    public boolean hasUnk1() {
      return (bitField0_ & 0x00000002) != 0;
    }

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

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

    /**
     * <code>optional bool unk1 = 10;</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 = 15;</code>
     * @return whether the unk2 field is set
     */
    public boolean hasUnk2() {
      return (bitField0_ & 0x00000004) != 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * <code>optional bool unk7 = 235;</code>
     * @return whether the unk7 field is set
     */
    public boolean hasUnk7() {
      return (bitField0_ & 0x00000080) != 0;
    }

    /**
     * <code>optional bool unk7 = 235;</code>
     * @return this
     */
    public Gateserver clearUnk7() {
      bitField0_ &= ~0x00000080;
      unk7 = false;
      return this;
    }

    /**
     * <code>optional bool unk7 = 235;</code>
     * @return the unk7
     */
    public boolean getUnk7() {
      return unk7;
    }

    /**
     * <code>optional bool unk7 = 235;</code>
     * @param value the unk7 to set
     * @return this
     */
    public Gateserver setUnk7(final boolean value) {
      bitField0_ |= 0x00000080;
      unk7 = value;
      return this;
    }

    /**
     * <code>optional bool unk8 = 454;</code>
     * @return whether the unk8 field is set
     */
    public boolean hasUnk8() {
      return (bitField0_ & 0x00000100) != 0;
    }

    /**
     * <code>optional bool unk8 = 454;</code>
     * @return this
     */
    public Gateserver clearUnk8() {
      bitField0_ &= ~0x00000100;
      unk8 = false;
      return this;
    }

    /**
     * <code>optional bool unk8 = 454;</code>
     * @return the unk8
     */
    public boolean getUnk8() {
      return unk8;
    }

    /**
     * <code>optional bool unk8 = 454;</code>
     * @param value the unk8 to set
     * @return this
     */
    public Gateserver setUnk8(final boolean value) {
      bitField0_ |= 0x00000100;
      unk8 = value;
      return this;
    }

    /**
     * <code>optional bool unk9 = 529;</code>
     * @return whether the unk9 field is set
     */
    public boolean hasUnk9() {
      return (bitField0_ & 0x00000200) != 0;
    }

    /**
     * <code>optional bool unk9 = 529;</code>
     * @return this
     */
    public Gateserver clearUnk9() {
      bitField0_ &= ~0x00000200;
      unk9 = false;
      return this;
    }

    /**
     * <code>optional bool unk9 = 529;</code>
     * @return the unk9
     */
    public boolean getUnk9() {
      return unk9;
    }

    /**
     * <code>optional bool unk9 = 529;</code>
     * @param value the unk9 to set
     * @return this
     */
    public Gateserver setUnk9(final boolean value) {
      bitField0_ |= 0x00000200;
      unk9 = value;
      return this;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * <code>optional string login_white_msg = 43;</code>
     * @return whether the loginWhiteMsg field is set
     */
    public boolean hasLoginWhiteMsg() {
      return (bitField0_ & 0x00008000) != 0;
    }

    /**
     * <code>optional string login_white_msg = 43;</code>
     * @return this
     */
    public Gateserver clearLoginWhiteMsg() {
      bitField0_ &= ~0x00008000;
      loginWhiteMsg.clear();
      return this;
    }

    /**
     * <code>optional string login_white_msg = 43;</code>
     * @return the loginWhiteMsg
     */
    public String getLoginWhiteMsg() {
      return loginWhiteMsg.getString();
    }

    /**
     * <code>optional string login_white_msg = 43;</code>
     * @return internal {@code Utf8String} representation of loginWhiteMsg for reading
     */
    public Utf8String getLoginWhiteMsgBytes() {
      return this.loginWhiteMsg;
    }

    /**
     * <code>optional string login_white_msg = 43;</code>
     * @return internal {@code Utf8String} representation of loginWhiteMsg for modifications
     */
    public Utf8String getMutableLoginWhiteMsgBytes() {
      bitField0_ |= 0x00008000;
      return this.loginWhiteMsg;
    }

    /**
     * <code>optional string login_white_msg = 43;</code>
     * @param value the loginWhiteMsg to set
     * @return this
     */
    public Gateserver setLoginWhiteMsg(final CharSequence value) {
      bitField0_ |= 0x00008000;
      loginWhiteMsg.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string login_white_msg = 43;</code>
     * @param value the loginWhiteMsg to set
     * @return this
     */
    public Gateserver setLoginWhiteMsg(final Utf8String value) {
      bitField0_ |= 0x00008000;
      loginWhiteMsg.copyFrom(value);
      return this;
    }

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

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

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

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

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

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

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

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

    /**
     * <code>optional string ifix_version = 1178;</code>
     * @return this
     */
    public Gateserver clearIfixVersion() {
      bitField0_ &= ~0x00020000;
      ifixVersion.clear();
      return this;
    }

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

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

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

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

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

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

    /**
     * <code>optional string mdk_res_version = 1238;</code>
     * @return this
     */
    public Gateserver clearMdkResVersion() {
      bitField0_ &= ~0x00040000;
      mdkResVersion.clear();
      return this;
    }

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

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

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

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

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

    /**
     * <code>optional string asset_bundle_url_2 = 1417;</code>
     * @return whether the assetBundleUrl2 field is set
     */
    public boolean hasAssetBundleUrl2() {
      return (bitField0_ & 0x00080000) != 0;
    }

    /**
     * <code>optional string asset_bundle_url_2 = 1417;</code>
     * @return this
     */
    public Gateserver clearAssetBundleUrl2() {
      bitField0_ &= ~0x00080000;
      assetBundleUrl2.clear();
      return this;
    }

    /**
     * <code>optional string asset_bundle_url_2 = 1417;</code>
     * @return the assetBundleUrl2
     */
    public String getAssetBundleUrl2() {
      return assetBundleUrl2.getString();
    }

    /**
     * <code>optional string asset_bundle_url_2 = 1417;</code>
     * @return internal {@code Utf8String} representation of assetBundleUrl2 for reading
     */
    public Utf8String getAssetBundleUrl2Bytes() {
      return this.assetBundleUrl2;
    }

    /**
     * <code>optional string asset_bundle_url_2 = 1417;</code>
     * @return internal {@code Utf8String} representation of assetBundleUrl2 for modifications
     */
    public Utf8String getMutableAssetBundleUrl2Bytes() {
      bitField0_ |= 0x00080000;
      return this.assetBundleUrl2;
    }

    /**
     * <code>optional string asset_bundle_url_2 = 1417;</code>
     * @param value the assetBundleUrl2 to set
     * @return this
     */
    public Gateserver setAssetBundleUrl2(final CharSequence value) {
      bitField0_ |= 0x00080000;
      assetBundleUrl2.copyFrom(value);
      return this;
    }

    /**
     * <code>optional string asset_bundle_url_2 = 1417;</code>
     * @param value the assetBundleUrl2 to set
     * @return this
     */
    public Gateserver setAssetBundleUrl2(final Utf8String value) {
      bitField0_ |= 0x00080000;
      assetBundleUrl2.copyFrom(value);
      return this;
    }

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

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

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

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

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

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

    /**
     * <code>optional string ifix_url = 1488;</code>
     * @param value the ifixUrl to set
     * @return this
     */
    public Gateserver setIfixUrl(final Utf8String value) {
      bitField0_ |= 0x00100000;
      ifixUrl.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;
        unk3 = other.unk3;
        unk4 = other.unk4;
        unk5 = other.unk5;
        unk6 = other.unk6;
        unk7 = other.unk7;
        unk8 = other.unk8;
        unk9 = other.unk9;
        ip.copyFrom(other.ip);
        luaUrl.copyFrom(other.luaUrl);
        regionName.copyFrom(other.regionName);
        exResourceUrl.copyFrom(other.exResourceUrl);
        assetBundleUrl.copyFrom(other.assetBundleUrl);
        loginWhiteMsg.copyFrom(other.loginWhiteMsg);
        clientSecretKey.copyFrom(other.clientSecretKey);
        ifixVersion.copyFrom(other.ifixVersion);
        mdkResVersion.copyFrom(other.mdkResVersion);
        assetBundleUrl2.copyFrom(other.assetBundleUrl2);
        ifixUrl.copyFrom(other.ifixUrl);
      }
      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.hasUnk3()) {
        setUnk3(other.unk3);
      }
      if (other.hasUnk4()) {
        setUnk4(other.unk4);
      }
      if (other.hasUnk5()) {
        setUnk5(other.unk5);
      }
      if (other.hasUnk6()) {
        setUnk6(other.unk6);
      }
      if (other.hasUnk7()) {
        setUnk7(other.unk7);
      }
      if (other.hasUnk8()) {
        setUnk8(other.unk8);
      }
      if (other.hasUnk9()) {
        setUnk9(other.unk9);
      }
      if (other.hasIp()) {
        getMutableIpBytes().copyFrom(other.ip);
      }
      if (other.hasLuaUrl()) {
        getMutableLuaUrlBytes().copyFrom(other.luaUrl);
      }
      if (other.hasRegionName()) {
        getMutableRegionNameBytes().copyFrom(other.regionName);
      }
      if (other.hasExResourceUrl()) {
        getMutableExResourceUrlBytes().copyFrom(other.exResourceUrl);
      }
      if (other.hasAssetBundleUrl()) {
        getMutableAssetBundleUrlBytes().copyFrom(other.assetBundleUrl);
      }
      if (other.hasLoginWhiteMsg()) {
        getMutableLoginWhiteMsgBytes().copyFrom(other.loginWhiteMsg);
      }
      if (other.hasClientSecretKey()) {
        getMutableClientSecretKeyBytes().copyFrom(other.clientSecretKey);
      }
      if (other.hasIfixVersion()) {
        getMutableIfixVersionBytes().copyFrom(other.ifixVersion);
      }
      if (other.hasMdkResVersion()) {
        getMutableMdkResVersionBytes().copyFrom(other.mdkResVersion);
      }
      if (other.hasAssetBundleUrl2()) {
        getMutableAssetBundleUrl2Bytes().copyFrom(other.assetBundleUrl2);
      }
      if (other.hasIfixUrl()) {
        getMutableIfixUrlBytes().copyFrom(other.ifixUrl);
      }
      return this;
    }

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

    @Override
    public Gateserver clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      ip.clear();
      luaUrl.clear();
      regionName.clear();
      exResourceUrl.clear();
      assetBundleUrl.clear();
      loginWhiteMsg.clear();
      clientSecretKey.clear();
      ifixVersion.clear();
      mdkResVersion.clear();
      assetBundleUrl2.clear();
      ifixUrl.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)
        && (!hasUnk3() || unk3 == other.unk3)
        && (!hasUnk4() || unk4 == other.unk4)
        && (!hasUnk5() || unk5 == other.unk5)
        && (!hasUnk6() || unk6 == other.unk6)
        && (!hasUnk7() || unk7 == other.unk7)
        && (!hasUnk8() || unk8 == other.unk8)
        && (!hasUnk9() || unk9 == other.unk9)
        && (!hasIp() || ip.equals(other.ip))
        && (!hasLuaUrl() || luaUrl.equals(other.luaUrl))
        && (!hasRegionName() || regionName.equals(other.regionName))
        && (!hasExResourceUrl() || exResourceUrl.equals(other.exResourceUrl))
        && (!hasAssetBundleUrl() || assetBundleUrl.equals(other.assetBundleUrl))
        && (!hasLoginWhiteMsg() || loginWhiteMsg.equals(other.loginWhiteMsg))
        && (!hasClientSecretKey() || clientSecretKey.equals(other.clientSecretKey))
        && (!hasIfixVersion() || ifixVersion.equals(other.ifixVersion))
        && (!hasMdkResVersion() || mdkResVersion.equals(other.mdkResVersion))
        && (!hasAssetBundleUrl2() || assetBundleUrl2.equals(other.assetBundleUrl2))
        && (!hasIfixUrl() || ifixUrl.equals(other.ifixUrl));
    }

    @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) 80);
        output.writeBoolNoTag(unk1);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 120);
        output.writeBoolNoTag(unk2);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawLittleEndian16((short) 1176);
        output.writeBoolNoTag(unk3);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRawLittleEndian16((short) 1272);
        output.writeBoolNoTag(unk4);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRawLittleEndian16((short) 3008);
        output.writeBoolNoTag(unk5);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeRawLittleEndian16((short) 3264);
        output.writeBoolNoTag(unk6);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeRawLittleEndian16((short) 3800);
        output.writeBoolNoTag(unk7);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeRawLittleEndian16((short) 7344);
        output.writeBoolNoTag(unk8);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeRawLittleEndian16((short) 8584);
        output.writeBoolNoTag(unk9);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        output.writeRawByte((byte) 26);
        output.writeStringNoTag(ip);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        output.writeRawByte((byte) 50);
        output.writeStringNoTag(luaUrl);
      }
      if ((bitField0_ & 0x00001000) != 0) {
        output.writeRawByte((byte) 74);
        output.writeStringNoTag(regionName);
      }
      if ((bitField0_ & 0x00002000) != 0) {
        output.writeRawByte((byte) 90);
        output.writeStringNoTag(exResourceUrl);
      }
      if ((bitField0_ & 0x00004000) != 0) {
        output.writeRawByte((byte) 98);
        output.writeStringNoTag(assetBundleUrl);
      }
      if ((bitField0_ & 0x00008000) != 0) {
        output.writeRawLittleEndian16((short) 730);
        output.writeStringNoTag(loginWhiteMsg);
      }
      if ((bitField0_ & 0x00010000) != 0) {
        output.writeRawLittleEndian16((short) 11658);
        output.writeStringNoTag(clientSecretKey);
      }
      if ((bitField0_ & 0x00020000) != 0) {
        output.writeRawLittleEndian16((short) 18898);
        output.writeStringNoTag(ifixVersion);
      }
      if ((bitField0_ & 0x00040000) != 0) {
        output.writeRawLittleEndian16((short) 19890);
        output.writeStringNoTag(mdkResVersion);
      }
      if ((bitField0_ & 0x00080000) != 0) {
        output.writeRawLittleEndian16((short) 22730);
        output.writeStringNoTag(assetBundleUrl2);
      }
      if ((bitField0_ & 0x00100000) != 0) {
        output.writeRawLittleEndian16((short) 23938);
        output.writeStringNoTag(ifixUrl);
      }
    }

    @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 += 3;
      }
      if ((bitField0_ & 0x00000100) != 0) {
        size += 3;
      }
      if ((bitField0_ & 0x00000200) != 0) {
        size += 3;
      }
      if ((bitField0_ & 0x00000400) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(ip);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(luaUrl);
      }
      if ((bitField0_ & 0x00001000) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(regionName);
      }
      if ((bitField0_ & 0x00002000) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(exResourceUrl);
      }
      if ((bitField0_ & 0x00004000) != 0) {
        size += 1 + ProtoSink.computeStringSizeNoTag(assetBundleUrl);
      }
      if ((bitField0_ & 0x00008000) != 0) {
        size += 2 + ProtoSink.computeStringSizeNoTag(loginWhiteMsg);
      }
      if ((bitField0_ & 0x00010000) != 0) {
        size += 2 + ProtoSink.computeStringSizeNoTag(clientSecretKey);
      }
      if ((bitField0_ & 0x00020000) != 0) {
        size += 2 + ProtoSink.computeStringSizeNoTag(ifixVersion);
      }
      if ((bitField0_ & 0x00040000) != 0) {
        size += 2 + ProtoSink.computeStringSizeNoTag(mdkResVersion);
      }
      if ((bitField0_ & 0x00080000) != 0) {
        size += 2 + ProtoSink.computeStringSizeNoTag(assetBundleUrl2);
      }
      if ((bitField0_ & 0x00100000) != 0) {
        size += 2 + ProtoSink.computeStringSizeNoTag(ifixUrl);
      }
      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 != 80) {
              break;
            }
          }
          case 80: {
            // unk1
            unk1 = input.readBool();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 120) {
              break;
            }
          }
          case 120: {
            // unk2
            unk2 = input.readBool();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 536) {
              break;
            }
          }
          case 536: {
            // unk3
            unk3 = input.readBool();
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 632) {
              break;
            }
          }
          case 632: {
            // unk4
            unk4 = input.readBool();
            bitField0_ |= 0x00000010;
            tag = input.readTag();
            if (tag != 1472) {
              break;
            }
          }
          case 1472: {
            // unk5
            unk5 = input.readBool();
            bitField0_ |= 0x00000020;
            tag = input.readTag();
            if (tag != 1600) {
              break;
            }
          }
          case 1600: {
            // unk6
            unk6 = input.readBool();
            bitField0_ |= 0x00000040;
            tag = input.readTag();
            if (tag != 1880) {
              break;
            }
          }
          case 1880: {
            // unk7
            unk7 = input.readBool();
            bitField0_ |= 0x00000080;
            tag = input.readTag();
            if (tag != 3632) {
              break;
            }
          }
          case 3632: {
            // unk8
            unk8 = input.readBool();
            bitField0_ |= 0x00000100;
            tag = input.readTag();
            if (tag != 4232) {
              break;
            }
          }
          case 4232: {
            // unk9
            unk9 = input.readBool();
            bitField0_ |= 0x00000200;
            tag = input.readTag();
            if (tag != 26) {
              break;
            }
          }
          case 26: {
            // ip
            input.readString(ip);
            bitField0_ |= 0x00000400;
            tag = input.readTag();
            if (tag != 50) {
              break;
            }
          }
          case 50: {
            // luaUrl
            input.readString(luaUrl);
            bitField0_ |= 0x00000800;
            tag = input.readTag();
            if (tag != 74) {
              break;
            }
          }
          case 74: {
            // regionName
            input.readString(regionName);
            bitField0_ |= 0x00001000;
            tag = input.readTag();
            if (tag != 90) {
              break;
            }
          }
          case 90: {
            // exResourceUrl
            input.readString(exResourceUrl);
            bitField0_ |= 0x00002000;
            tag = input.readTag();
            if (tag != 98) {
              break;
            }
          }
          case 98: {
            // assetBundleUrl
            input.readString(assetBundleUrl);
            bitField0_ |= 0x00004000;
            tag = input.readTag();
            if (tag != 346) {
              break;
            }
          }
          case 346: {
            // loginWhiteMsg
            input.readString(loginWhiteMsg);
            bitField0_ |= 0x00008000;
            tag = input.readTag();
            if (tag != 5770) {
              break;
            }
          }
          case 5770: {
            // clientSecretKey
            input.readString(clientSecretKey);
            bitField0_ |= 0x00010000;
            tag = input.readTag();
            if (tag != 9426) {
              break;
            }
          }
          case 9426: {
            // ifixVersion
            input.readString(ifixVersion);
            bitField0_ |= 0x00020000;
            tag = input.readTag();
            if (tag != 9906) {
              break;
            }
          }
          case 9906: {
            // mdkResVersion
            input.readString(mdkResVersion);
            bitField0_ |= 0x00040000;
            tag = input.readTag();
            if (tag != 11338) {
              break;
            }
          }
          case 11338: {
            // assetBundleUrl2
            input.readString(assetBundleUrl2);
            bitField0_ |= 0x00080000;
            tag = input.readTag();
            if (tag != 11906) {
              break;
            }
          }
          case 11906: {
            // ifixUrl
            input.readString(ifixUrl);
            bitField0_ |= 0x00100000;
            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.unk3, unk3);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeBool(FieldNames.unk4, unk4);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeBool(FieldNames.unk5, unk5);
      }
      if ((bitField0_ & 0x00000040) != 0) {
        output.writeBool(FieldNames.unk6, unk6);
      }
      if ((bitField0_ & 0x00000080) != 0) {
        output.writeBool(FieldNames.unk7, unk7);
      }
      if ((bitField0_ & 0x00000100) != 0) {
        output.writeBool(FieldNames.unk8, unk8);
      }
      if ((bitField0_ & 0x00000200) != 0) {
        output.writeBool(FieldNames.unk9, unk9);
      }
      if ((bitField0_ & 0x00000400) != 0) {
        output.writeString(FieldNames.ip, ip);
      }
      if ((bitField0_ & 0x00000800) != 0) {
        output.writeString(FieldNames.luaUrl, luaUrl);
      }
      if ((bitField0_ & 0x00001000) != 0) {
        output.writeString(FieldNames.regionName, regionName);
      }
      if ((bitField0_ & 0x00002000) != 0) {
        output.writeString(FieldNames.exResourceUrl, exResourceUrl);
      }
      if ((bitField0_ & 0x00004000) != 0) {
        output.writeString(FieldNames.assetBundleUrl, assetBundleUrl);
      }
      if ((bitField0_ & 0x00008000) != 0) {
        output.writeString(FieldNames.loginWhiteMsg, loginWhiteMsg);
      }
      if ((bitField0_ & 0x00010000) != 0) {
        output.writeString(FieldNames.clientSecretKey, clientSecretKey);
      }
      if ((bitField0_ & 0x00020000) != 0) {
        output.writeString(FieldNames.ifixVersion, ifixVersion);
      }
      if ((bitField0_ & 0x00040000) != 0) {
        output.writeString(FieldNames.mdkResVersion, mdkResVersion);
      }
      if ((bitField0_ & 0x00080000) != 0) {
        output.writeString(FieldNames.assetBundleUrl2, assetBundleUrl2);
      }
      if ((bitField0_ & 0x00100000) != 0) {
        output.writeString(FieldNames.ifixUrl, ifixUrl);
      }
      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 3594625: {
            if (input.isAtField(FieldNames.unk3)) {
              if (!input.trySkipNullValue()) {
                unk3 = input.readBool();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3594626: {
            if (input.isAtField(FieldNames.unk4)) {
              if (!input.trySkipNullValue()) {
                unk4 = input.readBool();
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3594627: {
            if (input.isAtField(FieldNames.unk5)) {
              if (!input.trySkipNullValue()) {
                unk5 = input.readBool();
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3594628: {
            if (input.isAtField(FieldNames.unk6)) {
              if (!input.trySkipNullValue()) {
                unk6 = input.readBool();
                bitField0_ |= 0x00000040;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3594629: {
            if (input.isAtField(FieldNames.unk7)) {
              if (!input.trySkipNullValue()) {
                unk7 = input.readBool();
                bitField0_ |= 0x00000080;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3594630: {
            if (input.isAtField(FieldNames.unk8)) {
              if (!input.trySkipNullValue()) {
                unk8 = input.readBool();
                bitField0_ |= 0x00000100;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3594631: {
            if (input.isAtField(FieldNames.unk9)) {
              if (!input.trySkipNullValue()) {
                unk9 = input.readBool();
                bitField0_ |= 0x00000200;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3367: {
            if (input.isAtField(FieldNames.ip)) {
              if (!input.trySkipNullValue()) {
                input.readString(ip);
                bitField0_ |= 0x00000400;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1091991977:
          case 508288168: {
            if (input.isAtField(FieldNames.luaUrl)) {
              if (!input.trySkipNullValue()) {
                input.readString(luaUrl);
                bitField0_ |= 0x00000800;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1990689889:
          case -1565768458: {
            if (input.isAtField(FieldNames.regionName)) {
              if (!input.trySkipNullValue()) {
                input.readString(regionName);
                bitField0_ |= 0x00001000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1643520974:
          case -1086137910: {
            if (input.isAtField(FieldNames.exResourceUrl)) {
              if (!input.trySkipNullValue()) {
                input.readString(exResourceUrl);
                bitField0_ |= 0x00002000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1116358531:
          case 1973569761: {
            if (input.isAtField(FieldNames.assetBundleUrl)) {
              if (!input.trySkipNullValue()) {
                input.readString(assetBundleUrl);
                bitField0_ |= 0x00004000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1235575073:
          case 893116693: {
            if (input.isAtField(FieldNames.loginWhiteMsg)) {
              if (!input.trySkipNullValue()) {
                input.readString(loginWhiteMsg);
                bitField0_ |= 0x00008000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -584558076:
          case 904194372: {
            if (input.isAtField(FieldNames.clientSecretKey)) {
              if (!input.trySkipNullValue()) {
                input.readString(clientSecretKey);
                bitField0_ |= 0x00010000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1625073708:
          case -827048283: {
            if (input.isAtField(FieldNames.ifixVersion)) {
              if (!input.trySkipNullValue()) {
                input.readString(ifixVersion);
                bitField0_ |= 0x00020000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -1415579412:
          case -204279250: {
            if (input.isAtField(FieldNames.mdkResVersion)) {
              if (!input.trySkipNullValue()) {
                input.readString(mdkResVersion);
                bitField0_ |= 0x00040000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -247376043:
          case -1775001516: {
            if (input.isAtField(FieldNames.assetBundleUrl2)) {
              if (!input.trySkipNullValue()) {
                input.readString(assetBundleUrl2);
                bitField0_ |= 0x00080000;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 1719409347:
          case 1762383292: {
            if (input.isAtField(FieldNames.ifixUrl)) {
              if (!input.trySkipNullValue()) {
                input.readString(ifixUrl);
                bitField0_ |= 0x00100000;
              }
            } 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 unk3 = FieldName.forField("unk3");

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

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

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

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

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

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

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

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

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

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

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

      static final FieldName loginWhiteMsg = FieldName.forField("loginWhiteMsg", "login_white_msg");

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

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

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

      static final FieldName assetBundleUrl2 = FieldName.forField("assetBundleUrl2", "asset_bundle_url_2");

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