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