UNPKG

sinch-rtc

Version:

RTC JavaScript/Web SDK

101 lines 5.89 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Ocra (REST API for Sinch RTC clients) * REST API for Sinch RTC clients. * * The version of the OpenAPI document: 0.11.0 * Contact: rtc@sinch.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ExtendedCallReportFromJSON = ExtendedCallReportFromJSON; exports.ExtendedCallReportFromJSONTyped = ExtendedCallReportFromJSONTyped; exports.ExtendedCallReportToJSON = ExtendedCallReportToJSON; const runtime_1 = require("../runtime"); const _1 = require("./"); function ExtendedCallReportFromJSON(json) { return ExtendedCallReportFromJSONTyped(json, false); } function ExtendedCallReportFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'callId': json['callId'], 'reportId': json['reportId'], 'instance': (0, _1.CallReportInstanceFromJSON)(json['instance']), 'userId': json['userId'], 'from': !(0, runtime_1.exists)(json, 'from') ? undefined : (0, _1.OriginFromJSON)(json['from']), 'to': !(0, runtime_1.exists)(json, 'to') ? undefined : (0, _1.DestinationFromJSON)(json['to']), 'direction': (0, _1.DirectionFromJSON)(json['direction']), 'publicCallHeaders': !(0, runtime_1.exists)(json, 'publicCallHeaders') ? undefined : json['publicCallHeaders'], 'startTime': (new Date(json['startTime'])), 'duration': json['duration'], 'setupDuration': !(0, runtime_1.exists)(json, 'setupDuration') ? undefined : json['setupDuration'], 'result': (0, _1.CallResultFromJSON)(json['result']), 'localDomain': (0, _1.DomainFromJSON)(json['localDomain']), 'remoteDomain': !(0, runtime_1.exists)(json, 'remoteDomain') ? undefined : (0, _1.DomainFromJSON)(json['remoteDomain']), 'requestedAudio': json['requestedAudio'], 'requestedVideo': json['requestedVideo'], 'hadAudioStreams': json['hadAudioStreams'], 'hadVideoStreams': json['hadVideoStreams'], 'primaryMediaTransportType': !(0, runtime_1.exists)(json, 'primaryMediaTransportType') ? undefined : (0, _1.PrimaryMediaTransportTypeFromJSON)(json['primaryMediaTransportType']), 'primaryIpProtocolVersion': !(0, runtime_1.exists)(json, 'primaryIpProtocolVersion') ? undefined : (0, _1.IpProtocolVersionFromJSON)(json['primaryIpProtocolVersion']), 'connectionInfo': !(0, runtime_1.exists)(json, 'connectionInfo') ? undefined : (json['connectionInfo'].map(_1.ConnectionInfoV2FromJSON)), 'errors': !(0, runtime_1.exists)(json, 'errors') ? undefined : (json['errors'].map(_1.ClientErrorFromJSON)), 'pinnedPop': !(0, runtime_1.exists)(json, 'pinnedPop') ? undefined : json['pinnedPop'], 'sdpSemantics': !(0, runtime_1.exists)(json, 'sdpSemantics') ? undefined : (0, _1.SdpSemanticsFromJSON)(json['sdpSemantics']), 'rtcStatisticsReport': json['rtcStatisticsReport'], 'mxpEventLog': !(0, runtime_1.exists)(json, 'mxpEventLog') ? undefined : json['mxpEventLog'], 'callQuality': !(0, runtime_1.exists)(json, 'callQuality') ? undefined : (0, _1.CallQualityFromJSON)(json['callQuality']), 'audioRouteEventLog': !(0, runtime_1.exists)(json, 'audioRouteEventLog') ? undefined : (0, _1.AudioRouteEventLogFromJSON)(json['audioRouteEventLog']), 'pushProvider': !(0, runtime_1.exists)(json, 'pushProvider') ? undefined : (0, _1.PushProviderFromJSON)(json['pushProvider']), 'clientEvents': !(0, runtime_1.exists)(json, 'clientEvents') ? undefined : (0, _1.ClientEventsFromJSON)(json['clientEvents']), }; } function ExtendedCallReportToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'callId': value.callId, 'reportId': value.reportId, 'instance': (0, _1.CallReportInstanceToJSON)(value.instance), 'userId': value.userId, 'from': (0, _1.OriginToJSON)(value.from), 'to': (0, _1.DestinationToJSON)(value.to), 'direction': (0, _1.DirectionToJSON)(value.direction), 'publicCallHeaders': value.publicCallHeaders, 'startTime': (value.startTime.toISOString()), 'duration': value.duration, 'setupDuration': value.setupDuration, 'result': (0, _1.CallResultToJSON)(value.result), 'localDomain': (0, _1.DomainToJSON)(value.localDomain), 'remoteDomain': (0, _1.DomainToJSON)(value.remoteDomain), 'requestedAudio': value.requestedAudio, 'requestedVideo': value.requestedVideo, 'hadAudioStreams': value.hadAudioStreams, 'hadVideoStreams': value.hadVideoStreams, 'primaryMediaTransportType': (0, _1.PrimaryMediaTransportTypeToJSON)(value.primaryMediaTransportType), 'primaryIpProtocolVersion': (0, _1.IpProtocolVersionToJSON)(value.primaryIpProtocolVersion), 'connectionInfo': value.connectionInfo === undefined ? undefined : (value.connectionInfo.map(_1.ConnectionInfoV2ToJSON)), 'errors': value.errors === undefined ? undefined : (value.errors.map(_1.ClientErrorToJSON)), 'pinnedPop': value.pinnedPop, 'sdpSemantics': (0, _1.SdpSemanticsToJSON)(value.sdpSemantics), 'rtcStatisticsReport': value.rtcStatisticsReport, 'mxpEventLog': value.mxpEventLog, 'callQuality': (0, _1.CallQualityToJSON)(value.callQuality), 'audioRouteEventLog': (0, _1.AudioRouteEventLogToJSON)(value.audioRouteEventLog), 'pushProvider': (0, _1.PushProviderToJSON)(value.pushProvider), 'clientEvents': (0, _1.ClientEventsToJSON)(value.clientEvents), }; } //# sourceMappingURL=ExtendedCallReport.js.map