{"version":3,"sources":["src/sdk/SynthesisVoicesResult.ts"],"names":[],"mappings":"AAGA,OAAO,EAIH,eAAe,EACf,SAAS,EACZ,MAAM,cAAc,CAAC;AAEtB;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,eAAe;IACtD,OAAO,CAAC,UAAU,CAAc;IAEhC;;;;;OAKG;gBACgB,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM;IAYrE;;;;;;OAMG;IACH,IAAW,MAAM,IAAI,SAAS,EAAE,CAE/B;CACJ","file":"SynthesisVoicesResult.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT license.\r\n\r\nimport {\r\n    IVoiceJson,\r\n    PropertyCollection,\r\n    ResultReason,\r\n    SynthesisResult,\r\n    VoiceInfo,\r\n} from \"./Exports.js\";\r\n\r\n/**\r\n * Defines result of speech synthesis.\r\n * @class SynthesisVoicesResult\r\n * Added in version 1.20.0\r\n */\r\nexport class SynthesisVoicesResult extends SynthesisResult {\r\n    private privVoices: VoiceInfo[];\r\n\r\n    /**\r\n     * Creates and initializes an instance of this class.\r\n     * @constructor\r\n     * @param requestId - result id for request.\r\n     * @param json - json payload from endpoint.\r\n     */\r\n    public constructor(requestId: string, json: any, errorDetails: string ) {\r\n        if (Array.isArray(json)) {\r\n            super(requestId, ResultReason.VoicesListRetrieved, undefined, new PropertyCollection());\r\n            this.privVoices = [];\r\n            for (const item of json) {\r\n                this.privVoices.push(new VoiceInfo(item as IVoiceJson));\r\n            }\r\n        } else {\r\n            super(requestId, ResultReason.Canceled, errorDetails ? errorDetails : \"Error information unavailable\", new PropertyCollection());\r\n        }\r\n    }\r\n\r\n    /**\r\n     * The list of voices\r\n     * @member SynthesisVoicesResult.prototype.voices\r\n     * @function\r\n     * @public\r\n     * @returns {VoiceInfo[]} List of synthesized voices.\r\n     */\r\n    public get voices(): VoiceInfo[] {\r\n        return this.privVoices;\r\n    }\r\n}\r\n"]}