UNPKG

sinch-rtc

Version:

RTC JavaScript/Web SDK

109 lines 6.4 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.CallReportFromJSON = CallReportFromJSON; exports.CallReportFromJSONTyped = CallReportFromJSONTyped; exports.CallReportToJSON = CallReportToJSON; const runtime_1 = require("../runtime"); const _1 = require("./"); function CallReportFromJSON(json) { return CallReportFromJSONTyped(json, false); } function CallReportFromJSONTyped(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'], 'notifyingDuration': !(0, runtime_1.exists)(json, 'notifyingDuration') ? undefined : json['notifyingDuration'], 'ringingDuration': !(0, runtime_1.exists)(json, 'ringingDuration') ? undefined : json['ringingDuration'], 'connectingDuration': !(0, runtime_1.exists)(json, 'connectingDuration') ? undefined : json['connectingDuration'], 'acceptingDuration': !(0, runtime_1.exists)(json, 'acceptingDuration') ? undefined : json['acceptingDuration'], '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'], 'isPendingCall': !(0, runtime_1.exists)(json, 'isPendingCall') ? undefined : json['isPendingCall'], 'primaryRemoteIceCandidate': !(0, runtime_1.exists)(json, 'primaryRemoteIceCandidate') ? undefined : (0, _1.IceCandidateFromJSON)(json['primaryRemoteIceCandidate']), 'primaryLocalIceCandidate': !(0, runtime_1.exists)(json, 'primaryLocalIceCandidate') ? undefined : (0, _1.IceCandidateFromJSON)(json['primaryLocalIceCandidate']), 'connectionInfo': !(0, runtime_1.exists)(json, 'connectionInfo') ? undefined : (json['connectionInfo'].map(_1.ConnectionInfoFromJSON)), 'errors': !(0, runtime_1.exists)(json, 'errors') ? undefined : (json['errors'].map(_1.ClientErrorFromJSON)), 'pinnedPop': !(0, runtime_1.exists)(json, 'pinnedPop') ? undefined : json['pinnedPop'], 'rtcStatisticsReport': json['rtcStatisticsReport'], 'mxpEventLog': !(0, runtime_1.exists)(json, 'mxpEventLog') ? undefined : json['mxpEventLog'], 'audioRouteEventLog': !(0, runtime_1.exists)(json, 'audioRouteEventLog') ? undefined : (0, _1.AudioRouteEventLogFromJSON)(json['audioRouteEventLog']), 'callQuality': !(0, runtime_1.exists)(json, 'callQuality') ? undefined : (0, _1.CallQualityFromJSON)(json['callQuality']), '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 CallReportToJSON(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, 'notifyingDuration': value.notifyingDuration, 'ringingDuration': value.ringingDuration, 'connectingDuration': value.connectingDuration, 'acceptingDuration': value.acceptingDuration, '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, 'isPendingCall': value.isPendingCall, 'primaryRemoteIceCandidate': (0, _1.IceCandidateToJSON)(value.primaryRemoteIceCandidate), 'primaryLocalIceCandidate': (0, _1.IceCandidateToJSON)(value.primaryLocalIceCandidate), 'connectionInfo': value.connectionInfo === undefined ? undefined : (value.connectionInfo.map(_1.ConnectionInfoToJSON)), 'errors': value.errors === undefined ? undefined : (value.errors.map(_1.ClientErrorToJSON)), 'pinnedPop': value.pinnedPop, 'rtcStatisticsReport': value.rtcStatisticsReport, 'mxpEventLog': value.mxpEventLog, 'audioRouteEventLog': (0, _1.AudioRouteEventLogToJSON)(value.audioRouteEventLog), 'callQuality': (0, _1.CallQualityToJSON)(value.callQuality), 'pushProvider': (0, _1.PushProviderToJSON)(value.pushProvider), 'clientEvents': (0, _1.ClientEventsToJSON)(value.clientEvents), }; } //# sourceMappingURL=CallReport.js.map