import * as $protobuf from "protobufjs";
import Long = require("long");
/** Namespace common_protocol. */
export namespace common_protocol {

    /** Properties of a PlayerConnect. */
    interface IPlayerConnect {

        /** PlayerConnect account */
        account?: (string|null);

        /** PlayerConnect token */
        token?: (string|null);

        /** PlayerConnect sign */
        sign?: (string|null);

        /** PlayerConnect platform */
        platform?: (string|null);

        /** PlayerConnect payPlatform */
        payPlatform?: (string|null);

        /** PlayerConnect channel */
        channel?: (string|null);
    }

    /** Represents a PlayerConnect. */
    class PlayerConnect implements IPlayerConnect {

        /**
         * Constructs a new PlayerConnect.
         * @param [properties] Properties to set
         */
        constructor(properties?: common_protocol.IPlayerConnect);

        /** PlayerConnect account. */
        public account: string;

        /** PlayerConnect token. */
        public token: string;

        /** PlayerConnect sign. */
        public sign: string;

        /** PlayerConnect platform. */
        public platform: string;

        /** PlayerConnect payPlatform. */
        public payPlatform: string;

        /** PlayerConnect channel. */
        public channel: string;

        /**
         * Creates a new PlayerConnect instance using the specified properties.
         * @param [properties] Properties to set
         * @returns PlayerConnect instance
         */
        public static create(properties?: common_protocol.IPlayerConnect): common_protocol.PlayerConnect;

        /**
         * Encodes the specified PlayerConnect message. Does not implicitly {@link common_protocol.PlayerConnect.verify|verify} messages.
         * @param message PlayerConnect message or plain object to encode
         * @param [writer] Writer to encode to
         * @returns Writer
         */
        public static encode(message: common_protocol.IPlayerConnect, writer?: $protobuf.Writer): $protobuf.Writer;

        /**
         * Encodes the specified PlayerConnect message, length delimited. Does not implicitly {@link common_protocol.PlayerConnect.verify|verify} messages.
         * @param message PlayerConnect message or plain object to encode
         * @param [writer] Writer to encode to
         * @returns Writer
         */
        public static encodeDelimited(message: common_protocol.IPlayerConnect, writer?: $protobuf.Writer): $protobuf.Writer;

        /**
         * Decodes a PlayerConnect message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns PlayerConnect
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): common_protocol.PlayerConnect;

        /**
         * Decodes a PlayerConnect message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns PlayerConnect
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): common_protocol.PlayerConnect;

        /**
         * Verifies a PlayerConnect message.
         * @param message Plain object to verify
         * @returns `null` if valid, otherwise the reason why it is not
         */
        public static verify(message: { [k: string]: any }): (string|null);

        /**
         * Creates a PlayerConnect message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns PlayerConnect
         */
        public static fromObject(object: { [k: string]: any }): common_protocol.PlayerConnect;

        /**
         * Creates a plain object from a PlayerConnect message. Also converts values to other types if specified.
         * @param message PlayerConnect
         * @param [options] Conversion options
         * @returns Plain object
         */
        public static toObject(message: common_protocol.PlayerConnect, options?: $protobuf.IConversionOptions): { [k: string]: any };

        /**
         * Converts this PlayerConnect to JSON.
         * @returns JSON object
         */
        public toJSON(): { [k: string]: any };

        /**
         * Gets the default type url for PlayerConnect
         * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns The default type url
         */
        public static getTypeUrl(typeUrlPrefix?: string): string;
    }

    /** Properties of a PlayerConnectResult. */
    interface IPlayerConnectResult {

        /** PlayerConnectResult servertime */
        servertime?: (number|null);

        /** PlayerConnectResult gaming */
        gaming?: (number|null);

        /** PlayerConnectResult ver */
        ver?: (string|null);

        /** PlayerConnectResult result */
        result?: (number|null);
    }

    /** Represents a PlayerConnectResult. */
    class PlayerConnectResult implements IPlayerConnectResult {

        /**
         * Constructs a new PlayerConnectResult.
         * @param [properties] Properties to set
         */
        constructor(properties?: common_protocol.IPlayerConnectResult);

        /** PlayerConnectResult servertime. */
        public servertime: number;

        /** PlayerConnectResult gaming. */
        public gaming: number;

        /** PlayerConnectResult ver. */
        public ver: string;

        /** PlayerConnectResult result. */
        public result: number;

        /**
         * Creates a new PlayerConnectResult instance using the specified properties.
         * @param [properties] Properties to set
         * @returns PlayerConnectResult instance
         */
        public static create(properties?: common_protocol.IPlayerConnectResult): common_protocol.PlayerConnectResult;

        /**
         * Encodes the specified PlayerConnectResult message. Does not implicitly {@link common_protocol.PlayerConnectResult.verify|verify} messages.
         * @param message PlayerConnectResult message or plain object to encode
         * @param [writer] Writer to encode to
         * @returns Writer
         */
        public static encode(message: common_protocol.IPlayerConnectResult, writer?: $protobuf.Writer): $protobuf.Writer;

        /**
         * Encodes the specified PlayerConnectResult message, length delimited. Does not implicitly {@link common_protocol.PlayerConnectResult.verify|verify} messages.
         * @param message PlayerConnectResult message or plain object to encode
         * @param [writer] Writer to encode to
         * @returns Writer
         */
        public static encodeDelimited(message: common_protocol.IPlayerConnectResult, writer?: $protobuf.Writer): $protobuf.Writer;

        /**
         * Decodes a PlayerConnectResult message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns PlayerConnectResult
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): common_protocol.PlayerConnectResult;

        /**
         * Decodes a PlayerConnectResult message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns PlayerConnectResult
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): common_protocol.PlayerConnectResult;

        /**
         * Verifies a PlayerConnectResult message.
         * @param message Plain object to verify
         * @returns `null` if valid, otherwise the reason why it is not
         */
        public static verify(message: { [k: string]: any }): (string|null);

        /**
         * Creates a PlayerConnectResult message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns PlayerConnectResult
         */
        public static fromObject(object: { [k: string]: any }): common_protocol.PlayerConnectResult;

        /**
         * Creates a plain object from a PlayerConnectResult message. Also converts values to other types if specified.
         * @param message PlayerConnectResult
         * @param [options] Conversion options
         * @returns Plain object
         */
        public static toObject(message: common_protocol.PlayerConnectResult, options?: $protobuf.IConversionOptions): { [k: string]: any };

        /**
         * Converts this PlayerConnectResult to JSON.
         * @returns JSON object
         */
        public toJSON(): { [k: string]: any };

        /**
         * Gets the default type url for PlayerConnectResult
         * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns The default type url
         */
        public static getTypeUrl(typeUrlPrefix?: string): string;
    }
}
