import * as $protobuf from 'protobufjs';

/** Namespace constants. */
declare namespace constants {

    /** Status enum. */
    enum Status {
        Success = 0,
        InvalidSecScheme = 1,
        InvalidProto = 2,
        TooManySessions = 3,
        InvalidArgument = 4,
        InternalError = 5,
        CryptoError = 6,
        InvalidSession = 7
    }

    /** WifiStationState enum. */
    enum WifiStationState {
        Connected = 0,
        Connecting = 1,
        Disconnected = 2,
        ConnectionFailed = 3
    }

    /** WifiConnectFailedReason enum. */
    enum WifiConnectFailedReason {
        AuthError = 0,
        NetworkNotFound = 1
    }

    /** Properties of a WifiAttemptFailed. */
    interface IWifiAttemptFailed {

        /** WifiAttemptFailed attemptsRemaining */
        attemptsRemaining?: (number|null);
    }

    /** Represents a WifiAttemptFailed. */
    class WifiAttemptFailed implements IWifiAttemptFailed {

        /**
         * Constructs a new WifiAttemptFailed.
         * @param [properties] Properties to set
         */
        constructor(properties?: constants.IWifiAttemptFailed);

        /** WifiAttemptFailed attemptsRemaining. */
        public attemptsRemaining: number;

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

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

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

        /**
         * Decodes a WifiAttemptFailed message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns WifiAttemptFailed
         * @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): constants.WifiAttemptFailed;

        /**
         * Decodes a WifiAttemptFailed message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns WifiAttemptFailed
         * @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)): constants.WifiAttemptFailed;

        /**
         * Verifies a WifiAttemptFailed 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 WifiAttemptFailed message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns WifiAttemptFailed
         */
        public static fromObject(object: { [k: string]: any }): constants.WifiAttemptFailed;

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

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

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

    /** WifiAuthMode enum. */
    enum WifiAuthMode {
        Open = 0,
        WEP = 1,
        WPA_PSK = 2,
        WPA2_PSK = 3,
        WPA_WPA2_PSK = 4,
        WPA2_ENTERPRISE = 5,
        WPA3_PSK = 6,
        WPA2_WPA3_PSK = 7
    }

    /** Properties of a WifiConnectedState. */
    interface IWifiConnectedState {

        /** WifiConnectedState ip4Addr */
        ip4Addr?: (string|null);

        /** WifiConnectedState authMode */
        authMode?: (constants.WifiAuthMode|null);

        /** WifiConnectedState ssid */
        ssid?: (Uint8Array|null);

        /** WifiConnectedState bssid */
        bssid?: (Uint8Array|null);

        /** WifiConnectedState channel */
        channel?: (number|null);
    }

    /** Represents a WifiConnectedState. */
    class WifiConnectedState implements IWifiConnectedState {

        /**
         * Constructs a new WifiConnectedState.
         * @param [properties] Properties to set
         */
        constructor(properties?: constants.IWifiConnectedState);

        /** WifiConnectedState ip4Addr. */
        public ip4Addr: string;

        /** WifiConnectedState authMode. */
        public authMode: constants.WifiAuthMode;

        /** WifiConnectedState ssid. */
        public ssid: Uint8Array;

        /** WifiConnectedState bssid. */
        public bssid: Uint8Array;

        /** WifiConnectedState channel. */
        public channel: number;

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

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

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

        /**
         * Decodes a WifiConnectedState message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns WifiConnectedState
         * @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): constants.WifiConnectedState;

        /**
         * Decodes a WifiConnectedState message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns WifiConnectedState
         * @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)): constants.WifiConnectedState;

        /**
         * Verifies a WifiConnectedState 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 WifiConnectedState message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns WifiConnectedState
         */
        public static fromObject(object: { [k: string]: any }): constants.WifiConnectedState;

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

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

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

/** Namespace config. */
declare namespace config {

    /** Properties of a CmdGetStatus. */
    interface ICmdGetStatus {
    }

    /** Represents a CmdGetStatus. */
    class CmdGetStatus implements ICmdGetStatus {

        /**
         * Constructs a new CmdGetStatus.
         * @param [properties] Properties to set
         */
        constructor(properties?: config.ICmdGetStatus);

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

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

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

        /**
         * Decodes a CmdGetStatus message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns CmdGetStatus
         * @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): config.CmdGetStatus;

        /**
         * Decodes a CmdGetStatus message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns CmdGetStatus
         * @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)): config.CmdGetStatus;

        /**
         * Verifies a CmdGetStatus 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 CmdGetStatus message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns CmdGetStatus
         */
        public static fromObject(object: { [k: string]: any }): config.CmdGetStatus;

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

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

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

    /** Properties of a RespGetStatus. */
    interface IRespGetStatus {

        /** RespGetStatus status */
        status?: (constants.Status|null);

        /** RespGetStatus staState */
        staState?: (constants.WifiStationState|null);

        /** RespGetStatus failReason */
        failReason?: (constants.WifiConnectFailedReason|null);

        /** RespGetStatus connected */
        connected?: (constants.IWifiConnectedState|null);

        /** RespGetStatus attemptFailed */
        attemptFailed?: (constants.IWifiAttemptFailed|null);
    }

    /** Represents a RespGetStatus. */
    class RespGetStatus implements IRespGetStatus {

        /**
         * Constructs a new RespGetStatus.
         * @param [properties] Properties to set
         */
        constructor(properties?: config.IRespGetStatus);

        /** RespGetStatus status. */
        public status: constants.Status;

        /** RespGetStatus staState. */
        public staState: constants.WifiStationState;

        /** RespGetStatus failReason. */
        public failReason?: (constants.WifiConnectFailedReason|null);

        /** RespGetStatus connected. */
        public connected?: (constants.IWifiConnectedState|null);

        /** RespGetStatus attemptFailed. */
        public attemptFailed?: (constants.IWifiAttemptFailed|null);

        /** RespGetStatus state. */
        public state?: ("failReason"|"connected"|"attemptFailed");

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

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

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

        /**
         * Decodes a RespGetStatus message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns RespGetStatus
         * @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): config.RespGetStatus;

        /**
         * Decodes a RespGetStatus message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns RespGetStatus
         * @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)): config.RespGetStatus;

        /**
         * Verifies a RespGetStatus 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 RespGetStatus message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns RespGetStatus
         */
        public static fromObject(object: { [k: string]: any }): config.RespGetStatus;

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

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

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

    /** Properties of a CmdSetConfig. */
    interface ICmdSetConfig {

        /** CmdSetConfig ssid */
        ssid?: (Uint8Array|null);

        /** CmdSetConfig passphrase */
        passphrase?: (Uint8Array|null);

        /** CmdSetConfig bssid */
        bssid?: (Uint8Array|null);

        /** CmdSetConfig channel */
        channel?: (number|null);
    }

    /** Represents a CmdSetConfig. */
    class CmdSetConfig implements ICmdSetConfig {

        /**
         * Constructs a new CmdSetConfig.
         * @param [properties] Properties to set
         */
        constructor(properties?: config.ICmdSetConfig);

        /** CmdSetConfig ssid. */
        public ssid: Uint8Array;

        /** CmdSetConfig passphrase. */
        public passphrase: Uint8Array;

        /** CmdSetConfig bssid. */
        public bssid: Uint8Array;

        /** CmdSetConfig channel. */
        public channel: number;

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

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

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

        /**
         * Decodes a CmdSetConfig message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns CmdSetConfig
         * @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): config.CmdSetConfig;

        /**
         * Decodes a CmdSetConfig message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns CmdSetConfig
         * @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)): config.CmdSetConfig;

        /**
         * Verifies a CmdSetConfig 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 CmdSetConfig message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns CmdSetConfig
         */
        public static fromObject(object: { [k: string]: any }): config.CmdSetConfig;

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

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

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

    /** Properties of a RespSetConfig. */
    interface IRespSetConfig {

        /** RespSetConfig status */
        status?: (constants.Status|null);
    }

    /** Represents a RespSetConfig. */
    class RespSetConfig implements IRespSetConfig {

        /**
         * Constructs a new RespSetConfig.
         * @param [properties] Properties to set
         */
        constructor(properties?: config.IRespSetConfig);

        /** RespSetConfig status. */
        public status: constants.Status;

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

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

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

        /**
         * Decodes a RespSetConfig message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns RespSetConfig
         * @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): config.RespSetConfig;

        /**
         * Decodes a RespSetConfig message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns RespSetConfig
         * @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)): config.RespSetConfig;

        /**
         * Verifies a RespSetConfig 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 RespSetConfig message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns RespSetConfig
         */
        public static fromObject(object: { [k: string]: any }): config.RespSetConfig;

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

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

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

    /** Properties of a CmdApplyConfig. */
    interface ICmdApplyConfig {
    }

    /** Represents a CmdApplyConfig. */
    class CmdApplyConfig implements ICmdApplyConfig {

        /**
         * Constructs a new CmdApplyConfig.
         * @param [properties] Properties to set
         */
        constructor(properties?: config.ICmdApplyConfig);

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

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

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

        /**
         * Decodes a CmdApplyConfig message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns CmdApplyConfig
         * @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): config.CmdApplyConfig;

        /**
         * Decodes a CmdApplyConfig message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns CmdApplyConfig
         * @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)): config.CmdApplyConfig;

        /**
         * Verifies a CmdApplyConfig 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 CmdApplyConfig message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns CmdApplyConfig
         */
        public static fromObject(object: { [k: string]: any }): config.CmdApplyConfig;

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

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

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

    /** Properties of a RespApplyConfig. */
    interface IRespApplyConfig {

        /** RespApplyConfig status */
        status?: (constants.Status|null);
    }

    /** Represents a RespApplyConfig. */
    class RespApplyConfig implements IRespApplyConfig {

        /**
         * Constructs a new RespApplyConfig.
         * @param [properties] Properties to set
         */
        constructor(properties?: config.IRespApplyConfig);

        /** RespApplyConfig status. */
        public status: constants.Status;

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

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

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

        /**
         * Decodes a RespApplyConfig message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns RespApplyConfig
         * @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): config.RespApplyConfig;

        /**
         * Decodes a RespApplyConfig message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns RespApplyConfig
         * @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)): config.RespApplyConfig;

        /**
         * Verifies a RespApplyConfig 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 RespApplyConfig message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns RespApplyConfig
         */
        public static fromObject(object: { [k: string]: any }): config.RespApplyConfig;

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

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

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

    /** WiFiConfigMsgType enum. */
    enum WiFiConfigMsgType {
        TypeCmdGetStatus = 0,
        TypeRespGetStatus = 1,
        TypeCmdSetConfig = 2,
        TypeRespSetConfig = 3,
        TypeCmdApplyConfig = 4,
        TypeRespApplyConfig = 5
    }

    /** Properties of a WiFiConfigPayload. */
    interface IWiFiConfigPayload {

        /** WiFiConfigPayload msg */
        msg?: (config.WiFiConfigMsgType|null);

        /** WiFiConfigPayload cmdGetStatus */
        cmdGetStatus?: (config.ICmdGetStatus|null);

        /** WiFiConfigPayload respGetStatus */
        respGetStatus?: (config.IRespGetStatus|null);

        /** WiFiConfigPayload cmdSetConfig */
        cmdSetConfig?: (config.ICmdSetConfig|null);

        /** WiFiConfigPayload respSetConfig */
        respSetConfig?: (config.IRespSetConfig|null);

        /** WiFiConfigPayload cmdApplyConfig */
        cmdApplyConfig?: (config.ICmdApplyConfig|null);

        /** WiFiConfigPayload respApplyConfig */
        respApplyConfig?: (config.IRespApplyConfig|null);
    }

    /** Represents a WiFiConfigPayload. */
    class WiFiConfigPayload implements IWiFiConfigPayload {

        /**
         * Constructs a new WiFiConfigPayload.
         * @param [properties] Properties to set
         */
        constructor(properties?: config.IWiFiConfigPayload);

        /** WiFiConfigPayload msg. */
        public msg: config.WiFiConfigMsgType;

        /** WiFiConfigPayload cmdGetStatus. */
        public cmdGetStatus?: (config.ICmdGetStatus|null);

        /** WiFiConfigPayload respGetStatus. */
        public respGetStatus?: (config.IRespGetStatus|null);

        /** WiFiConfigPayload cmdSetConfig. */
        public cmdSetConfig?: (config.ICmdSetConfig|null);

        /** WiFiConfigPayload respSetConfig. */
        public respSetConfig?: (config.IRespSetConfig|null);

        /** WiFiConfigPayload cmdApplyConfig. */
        public cmdApplyConfig?: (config.ICmdApplyConfig|null);

        /** WiFiConfigPayload respApplyConfig. */
        public respApplyConfig?: (config.IRespApplyConfig|null);

        /** WiFiConfigPayload payload. */
        public payload?: ("cmdGetStatus"|"respGetStatus"|"cmdSetConfig"|"respSetConfig"|"cmdApplyConfig"|"respApplyConfig");

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

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

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

        /**
         * Decodes a WiFiConfigPayload message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns WiFiConfigPayload
         * @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): config.WiFiConfigPayload;

        /**
         * Decodes a WiFiConfigPayload message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns WiFiConfigPayload
         * @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)): config.WiFiConfigPayload;

        /**
         * Verifies a WiFiConfigPayload 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 WiFiConfigPayload message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns WiFiConfigPayload
         */
        public static fromObject(object: { [k: string]: any }): config.WiFiConfigPayload;

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

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

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

/** Namespace scan. */
declare namespace scan {

    /** Properties of a CmdScanStart. */
    interface ICmdScanStart {

        /** CmdScanStart blocking */
        blocking?: (boolean|null);

        /** CmdScanStart passive */
        passive?: (boolean|null);

        /** CmdScanStart groupChannels */
        groupChannels?: (number|null);

        /** CmdScanStart periodMs */
        periodMs?: (number|null);
    }

    /** Represents a CmdScanStart. */
    class CmdScanStart implements ICmdScanStart {

        /**
         * Constructs a new CmdScanStart.
         * @param [properties] Properties to set
         */
        constructor(properties?: scan.ICmdScanStart);

        /** CmdScanStart blocking. */
        public blocking: boolean;

        /** CmdScanStart passive. */
        public passive: boolean;

        /** CmdScanStart groupChannels. */
        public groupChannels: number;

        /** CmdScanStart periodMs. */
        public periodMs: number;

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

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

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

        /**
         * Decodes a CmdScanStart message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns CmdScanStart
         * @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): scan.CmdScanStart;

        /**
         * Decodes a CmdScanStart message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns CmdScanStart
         * @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)): scan.CmdScanStart;

        /**
         * Verifies a CmdScanStart 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 CmdScanStart message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns CmdScanStart
         */
        public static fromObject(object: { [k: string]: any }): scan.CmdScanStart;

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

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

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

    /** Properties of a RespScanStart. */
    interface IRespScanStart {
    }

    /** Represents a RespScanStart. */
    class RespScanStart implements IRespScanStart {

        /**
         * Constructs a new RespScanStart.
         * @param [properties] Properties to set
         */
        constructor(properties?: scan.IRespScanStart);

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

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

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

        /**
         * Decodes a RespScanStart message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns RespScanStart
         * @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): scan.RespScanStart;

        /**
         * Decodes a RespScanStart message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns RespScanStart
         * @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)): scan.RespScanStart;

        /**
         * Verifies a RespScanStart 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 RespScanStart message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns RespScanStart
         */
        public static fromObject(object: { [k: string]: any }): scan.RespScanStart;

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

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

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

    /** Properties of a CmdScanStatus. */
    interface ICmdScanStatus {
    }

    /** Represents a CmdScanStatus. */
    class CmdScanStatus implements ICmdScanStatus {

        /**
         * Constructs a new CmdScanStatus.
         * @param [properties] Properties to set
         */
        constructor(properties?: scan.ICmdScanStatus);

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

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

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

        /**
         * Decodes a CmdScanStatus message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns CmdScanStatus
         * @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): scan.CmdScanStatus;

        /**
         * Decodes a CmdScanStatus message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns CmdScanStatus
         * @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)): scan.CmdScanStatus;

        /**
         * Verifies a CmdScanStatus 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 CmdScanStatus message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns CmdScanStatus
         */
        public static fromObject(object: { [k: string]: any }): scan.CmdScanStatus;

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

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

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

    /** Properties of a RespScanStatus. */
    interface IRespScanStatus {

        /** RespScanStatus scanFinished */
        scanFinished?: (boolean|null);

        /** RespScanStatus resultCount */
        resultCount?: (number|null);
    }

    /** Represents a RespScanStatus. */
    class RespScanStatus implements IRespScanStatus {

        /**
         * Constructs a new RespScanStatus.
         * @param [properties] Properties to set
         */
        constructor(properties?: scan.IRespScanStatus);

        /** RespScanStatus scanFinished. */
        public scanFinished: boolean;

        /** RespScanStatus resultCount. */
        public resultCount: number;

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

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

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

        /**
         * Decodes a RespScanStatus message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns RespScanStatus
         * @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): scan.RespScanStatus;

        /**
         * Decodes a RespScanStatus message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns RespScanStatus
         * @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)): scan.RespScanStatus;

        /**
         * Verifies a RespScanStatus 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 RespScanStatus message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns RespScanStatus
         */
        public static fromObject(object: { [k: string]: any }): scan.RespScanStatus;

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

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

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

    /** Properties of a CmdScanResult. */
    interface ICmdScanResult {

        /** CmdScanResult startIndex */
        startIndex?: (number|null);

        /** CmdScanResult count */
        count?: (number|null);
    }

    /** Represents a CmdScanResult. */
    class CmdScanResult implements ICmdScanResult {

        /**
         * Constructs a new CmdScanResult.
         * @param [properties] Properties to set
         */
        constructor(properties?: scan.ICmdScanResult);

        /** CmdScanResult startIndex. */
        public startIndex: number;

        /** CmdScanResult count. */
        public count: number;

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

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

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

        /**
         * Decodes a CmdScanResult message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns CmdScanResult
         * @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): scan.CmdScanResult;

        /**
         * Decodes a CmdScanResult message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns CmdScanResult
         * @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)): scan.CmdScanResult;

        /**
         * Verifies a CmdScanResult 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 CmdScanResult message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns CmdScanResult
         */
        public static fromObject(object: { [k: string]: any }): scan.CmdScanResult;

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

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

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

    /** Properties of a WiFiScanResult. */
    interface IWiFiScanResult {

        /** WiFiScanResult ssid */
        ssid?: (Uint8Array|null);

        /** WiFiScanResult channel */
        channel?: (number|null);

        /** WiFiScanResult rssi */
        rssi?: (number|null);

        /** WiFiScanResult bssid */
        bssid?: (Uint8Array|null);

        /** WiFiScanResult auth */
        auth?: (constants.WifiAuthMode|null);
    }

    /** Represents a WiFiScanResult. */
    class WiFiScanResult implements IWiFiScanResult {

        /**
         * Constructs a new WiFiScanResult.
         * @param [properties] Properties to set
         */
        constructor(properties?: scan.IWiFiScanResult);

        /** WiFiScanResult ssid. */
        public ssid: Uint8Array;

        /** WiFiScanResult channel. */
        public channel: number;

        /** WiFiScanResult rssi. */
        public rssi: number;

        /** WiFiScanResult bssid. */
        public bssid: Uint8Array;

        /** WiFiScanResult auth. */
        public auth: constants.WifiAuthMode;

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

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

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

        /**
         * Decodes a WiFiScanResult message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns WiFiScanResult
         * @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): scan.WiFiScanResult;

        /**
         * Decodes a WiFiScanResult message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns WiFiScanResult
         * @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)): scan.WiFiScanResult;

        /**
         * Verifies a WiFiScanResult 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 WiFiScanResult message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns WiFiScanResult
         */
        public static fromObject(object: { [k: string]: any }): scan.WiFiScanResult;

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

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

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

    /** Properties of a RespScanResult. */
    interface IRespScanResult {

        /** RespScanResult entries */
        entries?: (scan.IWiFiScanResult[]|null);
    }

    /** Represents a RespScanResult. */
    class RespScanResult implements IRespScanResult {

        /**
         * Constructs a new RespScanResult.
         * @param [properties] Properties to set
         */
        constructor(properties?: scan.IRespScanResult);

        /** RespScanResult entries. */
        public entries: scan.IWiFiScanResult[];

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

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

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

        /**
         * Decodes a RespScanResult message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns RespScanResult
         * @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): scan.RespScanResult;

        /**
         * Decodes a RespScanResult message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns RespScanResult
         * @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)): scan.RespScanResult;

        /**
         * Verifies a RespScanResult 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 RespScanResult message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns RespScanResult
         */
        public static fromObject(object: { [k: string]: any }): scan.RespScanResult;

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

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

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

    /** WiFiScanMsgType enum. */
    enum WiFiScanMsgType {
        TypeCmdScanStart = 0,
        TypeRespScanStart = 1,
        TypeCmdScanStatus = 2,
        TypeRespScanStatus = 3,
        TypeCmdScanResult = 4,
        TypeRespScanResult = 5
    }

    /** Properties of a WiFiScanPayload. */
    interface IWiFiScanPayload {

        /** WiFiScanPayload msg */
        msg?: (scan.WiFiScanMsgType|null);

        /** WiFiScanPayload status */
        status?: (constants.Status|null);

        /** WiFiScanPayload cmdScanStart */
        cmdScanStart?: (scan.ICmdScanStart|null);

        /** WiFiScanPayload respScanStart */
        respScanStart?: (scan.IRespScanStart|null);

        /** WiFiScanPayload cmdScanStatus */
        cmdScanStatus?: (scan.ICmdScanStatus|null);

        /** WiFiScanPayload respScanStatus */
        respScanStatus?: (scan.IRespScanStatus|null);

        /** WiFiScanPayload cmdScanResult */
        cmdScanResult?: (scan.ICmdScanResult|null);

        /** WiFiScanPayload respScanResult */
        respScanResult?: (scan.IRespScanResult|null);
    }

    /** Represents a WiFiScanPayload. */
    class WiFiScanPayload implements IWiFiScanPayload {

        /**
         * Constructs a new WiFiScanPayload.
         * @param [properties] Properties to set
         */
        constructor(properties?: scan.IWiFiScanPayload);

        /** WiFiScanPayload msg. */
        public msg: scan.WiFiScanMsgType;

        /** WiFiScanPayload status. */
        public status: constants.Status;

        /** WiFiScanPayload cmdScanStart. */
        public cmdScanStart?: (scan.ICmdScanStart|null);

        /** WiFiScanPayload respScanStart. */
        public respScanStart?: (scan.IRespScanStart|null);

        /** WiFiScanPayload cmdScanStatus. */
        public cmdScanStatus?: (scan.ICmdScanStatus|null);

        /** WiFiScanPayload respScanStatus. */
        public respScanStatus?: (scan.IRespScanStatus|null);

        /** WiFiScanPayload cmdScanResult. */
        public cmdScanResult?: (scan.ICmdScanResult|null);

        /** WiFiScanPayload respScanResult. */
        public respScanResult?: (scan.IRespScanResult|null);

        /** WiFiScanPayload payload. */
        public payload?: ("cmdScanStart"|"respScanStart"|"cmdScanStatus"|"respScanStatus"|"cmdScanResult"|"respScanResult");

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

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

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

        /**
         * Decodes a WiFiScanPayload message from the specified reader or buffer.
         * @param reader Reader or buffer to decode from
         * @param [length] Message length if known beforehand
         * @returns WiFiScanPayload
         * @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): scan.WiFiScanPayload;

        /**
         * Decodes a WiFiScanPayload message from the specified reader or buffer, length delimited.
         * @param reader Reader or buffer to decode from
         * @returns WiFiScanPayload
         * @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)): scan.WiFiScanPayload;

        /**
         * Verifies a WiFiScanPayload 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 WiFiScanPayload message from a plain object. Also converts values to their respective internal types.
         * @param object Plain object
         * @returns WiFiScanPayload
         */
        public static fromObject(object: { [k: string]: any }): scan.WiFiScanPayload;

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

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

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

declare abstract class Security {
    constructor();
    abstract setup0Request(): Promise<Uint8Array> | Uint8Array;
    abstract setup0Response(response: Uint8Array): void;
    setup1Request?(): Uint8Array;
    setup1Response?(response: Uint8Array): void;
    abstract encrypt(buffer: Uint8Array): Uint8Array;
    abstract decrypt(buffer: Uint8Array): Uint8Array;
}

declare class Security0 extends Security {
    constructor();
    setup0Request(): Uint8Array<ArrayBufferLike>;
    setup0Response(response: Uint8Array): void;
    encrypt(data: Uint8Array): Uint8Array<ArrayBufferLike>;
    decrypt(data: Uint8Array): Uint8Array;
}

interface Security1Options {
    pop?: string;
}
declare class Security1 extends Security {
    private privateKey;
    private publicKeyBuffer;
    private devicePublicKeyBuffer;
    private pop;
    private cipher;
    constructor(options?: Security1Options);
    private generateX25519Key;
    private deriveSharedKey;
    setup0Request(): Promise<Uint8Array<ArrayBufferLike>>;
    setup0Response(response: Uint8Array): Promise<void>;
    setup1Request(): Uint8Array;
    setup1Response(response: Uint8Array): void;
    encrypt(data: Uint8Array): Uint8Array;
    decrypt(data: Uint8Array): Uint8Array;
}

declare class Security2 extends Security {
    constructor();
    setup0Request(): Promise<Uint8Array> | Uint8Array;
    setup0Response(response: Uint8Array): void;
    setup1Request(): Uint8Array;
    setup1Response(response: Uint8Array): void;
    encrypt(buffer: Uint8Array): Uint8Array;
    decrypt(buffer: Uint8Array): Uint8Array;
}

type ICmdScanStart = scan.ICmdScanStart;
type ICmdScanResult = scan.ICmdScanResult;

type ICmdSetConfig = config.ICmdSetConfig;

declare const WifiStationState: typeof constants.WifiStationState;

interface IWiFiScanResult {
    /** WiFiScanResult ssid */
    ssid?: (Uint8Array | null);
    /** WiFiScanResult channel */
    channel?: (number | null);
    /** WiFiScanResult rssi */
    rssi?: (number | null);
    /** WiFiScanResult bssid */
    bssid?: (Uint8Array | null);
    /** WiFiScanResult auth */
    auth?: (constants.WifiAuthMode | null);
}
declare class ProvisionerError extends Error {
    constructor(message: string);
}
interface ESPProvisionerOptions {
    deviceNamePrefix?: string;
    serviceUUID: string;
    security?: Security;
}
declare class ESPProvisioner {
    device: BluetoothDevice | null;
    server: BluetoothRemoteGATTServer | null;
    service: BluetoothRemoteGATTService | null;
    endpoints: Map<string, BluetoothRemoteGATTCharacteristic>;
    private _isConnected;
    deviceNamePrefix: string;
    serviceUUID: string;
    security: Security;
    constructor(options: ESPProvisionerOptions);
    /**
     * Checks if the provisioner is currently connected to a device
     */
    get isConnected(): boolean;
    /**
     * Gets a characteristic by endpoint name
     * @param ep_name Endpoint name
     * @returns Bluetooth characteristic
     */
    getCharacteristic(ep_name: string): BluetoothRemoteGATTCharacteristic;
    /**
     * Writes a value to a characteristic with timeout and retry logic
     * @param ep_name Endpoint name
     * @param data Data to write
     */
    writeValue(ep_name: string, data: Uint8Array): Promise<void>;
    /**
     * Reads a value from a characteristic
     * @param ep_name Endpoint name
     * @returns Read data
     */
    readValue(ep_name: string): Promise<Uint8Array<ArrayBufferLike>>;
    /**
     * Discovers and maps all device characteristics
     */
    private discoverCharacteristics;
    /**
     * Connects to an ESP device
     * @param options Connection options
     * @returns Connected device
     */
    connect(options?: {
        filters: BluetoothLEScanFilter[];
    }): Promise<BluetoothDevice>;
    disconnect(): Promise<void>;
    /**
     * Checks if the provisioner is connected and throws an error if not
     */
    private ensureConnected;
    establishSession(): Promise<void>;
    /**
     * Resets the provisioning state of the device
     */
    ctrlReset(): Promise<void>;
    /**
     * Re-provisions the device
     */
    ctrlReprov(): Promise<void>;
    /**
     * Starts a Wi-Fi scan on the device
     * @param options Scan options
     */
    startScan(options: ICmdScanStart): Promise<void>;
    /**
     * Gets the current scan status
     * @returns Number of networks found
     */
    getScanStatus(): Promise<number>;
    /**
     * Gets scan results from the device
     * @param options Result options
     * @returns Array of Wi-Fi networks
     */
    getScanResults(options: ICmdScanResult): Promise<IWiFiScanResult[]>;
    /**
     * Performs a complete Wi-Fi scan operation
     * @param options Scan options
     * @param timeout Maximum time to wait for scan completion (ms)
     * @returns Array of Wi-Fi networks
     */
    scan(options?: ICmdScanStart): Promise<IWiFiScanResult[]>;
    /**
     * Gets the current Wi-Fi status
     * @returns Wi-Fi status
     */
    getWiFiStatus(): Promise<config.IRespGetStatus>;
    /**
     * Sets Wi-Fi configuration on the device
     * @param options Wi-Fi configuration
     */
    setWiFiConfig(options: ICmdSetConfig): Promise<void>;
    /**
     * Applies the Wi-Fi configuration
     */
    applyWiFiConfig(): Promise<void>;
    /**
     * Waits for Wi-Fi connection status to change
     * @param timeout Maximum time to wait (ms)
     * @returns Wi-Fi status
     */
    waitForWiFiStatus(timeout?: number): Promise<void>;
    /**
     * Complete process to send Wi-Fi credentials and connect
     * @param config Wi-Fi configuration
     * @param timeout Maximum time to wait for connection (ms)
     * @returns Wi-Fi status
     */
    sendCredentials({ ssid, passphrase, bssid, channel }: ICmdSetConfig, timeout?: number): Promise<void>;
    /**
     * Writes a value to a custom endpoint
     * @param ep_name Endpoint name
     * @param value Value to write
     */
    writeValueToEndpoint(ep_name: string, value: Uint8Array): Promise<void>;
    /**
     * Reads a value from a custom endpoint
     * @param ep_name Endpoint name
     * @returns Decrypted value
     */
    readValueFromEndpoint(ep_name: string): Promise<Uint8Array<ArrayBufferLike>>;
}

export { ProvisionerError, Security0, Security1, Security2, WifiStationState, ESPProvisioner as default };
export type { IWiFiScanResult };
