{"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.\n// Licensed under the MIT license.\n\nimport {\n    IVoiceJson,\n    PropertyCollection,\n    ResultReason,\n    SynthesisResult,\n    VoiceInfo,\n} from \"./Exports.js\";\n\n/**\n * Defines result of speech synthesis.\n * @class SynthesisVoicesResult\n * Added in version 1.20.0\n */\nexport class SynthesisVoicesResult extends SynthesisResult {\n    private privVoices: VoiceInfo[];\n\n    /**\n     * Creates and initializes an instance of this class.\n     * @constructor\n     * @param requestId - result id for request.\n     * @param json - json payload from endpoint.\n     */\n    public constructor(requestId: string, json: any, errorDetails: string ) {\n        if (Array.isArray(json)) {\n            super(requestId, ResultReason.VoicesListRetrieved, undefined, new PropertyCollection());\n            this.privVoices = [];\n            for (const item of json) {\n                this.privVoices.push(new VoiceInfo(item as IVoiceJson));\n            }\n        } else {\n            super(requestId, ResultReason.Canceled, errorDetails ? errorDetails : \"Error information unavailable\", new PropertyCollection());\n        }\n    }\n\n    /**\n     * The list of voices\n     * @member SynthesisVoicesResult.prototype.voices\n     * @function\n     * @public\n     * @returns {VoiceInfo[]} List of synthesized voices.\n     */\n    public get voices(): VoiceInfo[] {\n        return this.privVoices;\n    }\n}\n"]}