sinch-rtc
Version:
RTC JavaScript/Web SDK
89 lines • 4.73 kB
JavaScript
;
/* 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.BasicCallReportFromJSON = BasicCallReportFromJSON;
exports.BasicCallReportFromJSONTyped = BasicCallReportFromJSONTyped;
exports.BasicCallReportToJSON = BasicCallReportToJSON;
const runtime_1 = require("../runtime");
const _1 = require("./");
function BasicCallReportFromJSON(json) {
return BasicCallReportFromJSONTyped(json, false);
}
function BasicCallReportFromJSONTyped(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']),
};
}
function BasicCallReportToJSON(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),
};
}
//# sourceMappingURL=BasicCallReport.js.map