microsoft-cognitiveservices-speech-sdk
Version:
Microsoft Cognitive Services Speech SDK for JavaScript
1 lines • 2.59 kB
Source Map (JSON)
{"version":3,"sources":["src/sdk/CancellationDetailsBase.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,qBAAqB,EACrB,kBAAkB,EACrB,MAAM,cAAc,CAAC;AAEtB;;;GAGG;AACH,qBAAa,uBAAuB;IAChC,OAAO,CAAC,UAAU,CAAqB;IACvC,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,aAAa,CAAwB;IAE7C;;;;;OAKG;IACH,SAAS,aAAa,MAAM,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,qBAAqB;IAMxG;;;;;;OAMG;IACH,IAAW,MAAM,IAAI,kBAAkB,CAEtC;IAED;;;;;;OAMG;IACH,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED;;;;OAIG;IACH,IAAW,SAAS,IAAI,qBAAqB,CAE5C;CAEJ","file":"CancellationDetailsBase.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT license.\r\n\r\nimport {\r\n CancellationErrorCode,\r\n CancellationReason,\r\n} from \"./Exports.js\";\r\n\r\n/**\r\n * Contains detailed information about why a result was canceled.\r\n * @class CancellationDetailsBase\r\n */\r\nexport class CancellationDetailsBase {\r\n private privReason: CancellationReason;\r\n private privErrorDetails: string;\r\n private privErrorCode: CancellationErrorCode;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {CancellationReason} reason - The cancellation reason.\r\n * @param {string} errorDetails - The error details, if provided.\r\n */\r\n protected constructor(reason: CancellationReason, errorDetails: string, errorCode: CancellationErrorCode) {\r\n this.privReason = reason;\r\n this.privErrorDetails = errorDetails;\r\n this.privErrorCode = errorCode;\r\n }\r\n\r\n /**\r\n * The reason the recognition was canceled.\r\n * @member CancellationDetailsBase.prototype.reason\r\n * @function\r\n * @public\r\n * @returns {CancellationReason} Specifies the reason canceled.\r\n */\r\n public get reason(): CancellationReason {\r\n return this.privReason;\r\n }\r\n\r\n /**\r\n * In case of an unsuccessful recognition, provides details of the occurred error.\r\n * @member CancellationDetailsBase.prototype.errorDetails\r\n * @function\r\n * @public\r\n * @returns {string} A String that represents the error details.\r\n */\r\n public get errorDetails(): string {\r\n return this.privErrorDetails;\r\n }\r\n\r\n /**\r\n * The error code in case of an unsuccessful recognition.\r\n * Added in version 1.1.0.\r\n * @return An error code that represents the error reason.\r\n */\r\n public get ErrorCode(): CancellationErrorCode {\r\n return this.privErrorCode;\r\n }\r\n\r\n}\r\n"]}