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AW,UAAU,IAAI,kBAAkB,CAE1C;IAED;;;;;OAKG;IACH,IAAW,yBAAyB,IAAI,MAAM,CAE7C;IAED;;;;;;OAMG;IACH,IAAW,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAGjD;IAED,IAAW,YAAY,IAAI,YAAY,CAEtC;IAED,IAAW,YAAY,CAAC,KAAK,EAAE,YAAY,EAE1C;IAED;;;;;;;OAOG;IACI,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAIlE;;;;;;;;OAQG;IACI,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM;IAKnE;;;;;;;;OAQG;IACI,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAWxG,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,GAAG,IAAI;IAK7F;;;;;OAKG;IACI,KAAK,IAAI,IAAI;CAGvB","file":"DialogServiceConfig.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n\n/* eslint-disable max-classes-per-file */\nimport { Contracts } from \"./Contracts.js\";\nimport { PropertyCollection, PropertyId, ServicePropertyChannel, SpeechConfigImpl } from \"./Exports.js\";\nimport { OutputFormat } from \"./OutputFormat.js\";\n\n/**\n * Class that defines base configurations for dialog service connector\n * @class DialogServiceConfig\n */\nexport abstract class DialogServiceConfig {\n\n    /**\n     * Creates an instance of DialogService config.\n     * @constructor\n     */\n    protected constructor() {\n        return;\n    }\n\n    /**\n     * Sets an arbitrary property.\n     * @member DialogServiceConfig.prototype.setProperty\n     * @function\n     * @public\n     * @param {string} name - The name of the property to set.\n     * @param {string} value - The new value of the property.\n     */\n    public abstract setProperty(name: string | PropertyId, value: string): void;\n\n    /**\n     * Returns the current value of an arbitrary property.\n     * @member DialogServiceConfig.prototype.getProperty\n     * @function\n     * @public\n     * @param {string} name - The name of the property to query.\n     * @param {string} def - The value to return in case the property is not known.\n     * @returns {string} The current value, or provided default, of the given property.\n     */\n    public abstract getProperty(name: string | PropertyId, def?: string): string;\n\n    /**\n     * @member DialogServiceConfig.prototype.setServiceProperty\n     * @function\n     * @public\n     * @param {name} The name of the property.\n     * @param {value} Value to set.\n     * @param {channel} The channel used to pass the specified property to service.\n     * @summary Sets a property value that will be passed to service using the specified channel.\n     */\n    public abstract setServiceProperty(name: string, value: string, channel: ServicePropertyChannel): void;\n\n    /**\n     * Sets the proxy configuration.\n     * Only relevant in Node.js environments.\n     * Added in version 1.4.0.\n     * @param proxyHostName The host name of the proxy server.\n     * @param proxyPort The port number of the proxy server.\n     */\n    public abstract setProxy(proxyHostName: string, proxyPort: number): void;\n\n    /**\n     * Sets the proxy configuration.\n     * Only relevant in Node.js environments.\n     * Added in version 1.4.0.\n     * @param proxyHostName The host name of the proxy server, without the protocol scheme (http://)\n     * @param porxyPort The port number of the proxy server.\n     * @param proxyUserName The user name of the proxy server.\n     * @param proxyPassword The password of the proxy server.\n     */\n    public abstract setProxy(proxyHostName: string, proxyPort: number, proxyUserName: string, proxyPassword: string): void;\n\n    /**\n     * Returns the configured language.\n     * @member DialogServiceConfig.prototype.speechRecognitionLanguage\n     * @function\n     * @public\n     */\n    public abstract get speechRecognitionLanguage(): string;\n\n    /**\n     * Gets/Sets the input language.\n     * @member DialogServiceConfig.prototype.speechRecognitionLanguage\n     * @function\n     * @public\n     * @param {string} value - The language to use for recognition.\n     */\n    public abstract set speechRecognitionLanguage(value: string);\n\n    /**\n     * Sets the corresponding backend application identifier.\n     * @member DialogServiceConfig.prototype.Conversation_ApplicationId\n     * @function\n     * @public\n     * @param {string} value - The application identifier to set.\n     */\n    // eslint-disable-next-line @typescript-eslint/no-empty-function\n    public set applicationId(value: string) { }\n\n    public static get DialogTypes(): { BotFramework: string; CustomCommands: string } {\n        return {\n            BotFramework: \"bot_framework\",\n            CustomCommands: \"custom_commands\"\n        };\n    }\n}\n\n/**\n * Dialog Service configuration.\n * @class DialogServiceConfigImpl\n */\nexport class DialogServiceConfigImpl extends DialogServiceConfig {\n\n    private privSpeechConfig: SpeechConfigImpl;\n\n    /**\n     * Creates an instance of dialogService config.\n     */\n    public constructor() {\n        super();\n        this.privSpeechConfig = new SpeechConfigImpl();\n    }\n\n    /**\n     * Provides access to custom properties.\n     * @member DialogServiceConfigImpl.prototype.properties\n     * @function\n     * @public\n     * @returns {PropertyCollection} The properties.\n     */\n    public get properties(): PropertyCollection {\n        return this.privSpeechConfig.properties;\n    }\n\n    /**\n     * Gets the speech recognition language.\n     * @member DialogServiceConfigImpl.prototype.speechRecognitionLanguage\n     * @function\n     * @public\n     */\n    public get speechRecognitionLanguage(): string {\n        return this.privSpeechConfig.speechRecognitionLanguage;\n    }\n\n    /**\n     * Sets the speech recognition language.\n     * @member DialogServiceConfigImpl.prototype.speechRecognitionLanguage\n     * @function\n     * @public\n     * @param {string} value - The language to set.\n     */\n    public set speechRecognitionLanguage(value: string) {\n        Contracts.throwIfNullOrWhitespace(value, \"value\");\n        this.privSpeechConfig.speechRecognitionLanguage = value;\n    }\n\n    public get outputFormat(): OutputFormat {\n        return this.privSpeechConfig.outputFormat;\n    }\n\n    public set outputFormat(value: OutputFormat) {\n        this.privSpeechConfig.outputFormat = value;\n    }\n\n    /**\n     * Sets a named property as value\n     * @member DialogServiceConfigImpl.prototype.setProperty\n     * @function\n     * @public\n     * @param {PropertyId | string} name - The property to set.\n     * @param {string} value - The value.\n     */\n    public setProperty(name: string | PropertyId, value: string): void {\n        this.privSpeechConfig.setProperty(name, value);\n    }\n\n    /**\n     * Sets a named property as value\n     * @member DialogServiceConfigImpl.prototype.getProperty\n     * @function\n     * @public\n     * @param {PropertyId | string} name - The property to get.\n     * @param {string} def - The default value to return in case the property is not known.\n     * @returns {string} The current value, or provided default, of the given property.\n     */\n    public getProperty(name: string | PropertyId, def?: string): string {\n        void def;\n        return this.privSpeechConfig.getProperty(name);\n    }\n\n    /**\n     * Sets the proxy configuration.\n     * Only relevant in Node.js environments.\n     * Added in version 1.4.0.\n     * @param proxyHostName The host name of the proxy server, without the protocol scheme (http://)\n     * @param proxyPort The port number of the proxy server.\n     * @param proxyUserName The user name of the proxy server.\n     * @param proxyPassword The password of the proxy server.\n     */\n    public setProxy(proxyHostName: string, proxyPort: number, proxyUserName?: string, proxyPassword?: string): void {\n        this.setProperty(PropertyId.SpeechServiceConnection_ProxyHostName, proxyHostName);\n        this.setProperty(PropertyId.SpeechServiceConnection_ProxyPort, `${proxyPort}`);\n        if (proxyUserName) {\n            this.setProperty(PropertyId.SpeechServiceConnection_ProxyUserName, proxyUserName);\n        }\n        if (proxyPassword) {\n            this.setProperty(PropertyId.SpeechServiceConnection_ProxyPassword, proxyPassword);\n        }\n    }\n\n    public setServiceProperty(name: string, value: string, channel: ServicePropertyChannel): void {\n        void channel;\n        this.privSpeechConfig.setServiceProperty(name, value);\n    }\n\n    /**\n     * Dispose of associated resources.\n     * @member DialogServiceConfigImpl.prototype.close\n     * @function\n     * @public\n     */\n    public close(): void {\n        return;\n    }\n}\n"]}