sinch-rtc
Version:
RTC JavaScript/Web SDK
55 lines • 2.36 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.IceCandidateFromJSON = IceCandidateFromJSON;
exports.IceCandidateFromJSONTyped = IceCandidateFromJSONTyped;
exports.IceCandidateToJSON = IceCandidateToJSON;
const runtime_1 = require("../runtime");
const _1 = require("./");
function IceCandidateFromJSON(json) {
return IceCandidateFromJSONTyped(json, false);
}
function IceCandidateFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'address': !(0, runtime_1.exists)(json, 'address') ? undefined : json['address'],
'port': !(0, runtime_1.exists)(json, 'port') ? undefined : json['port'],
'ipProtocolVersion': !(0, runtime_1.exists)(json, 'ipProtocolVersion') ? undefined : (0, _1.IpProtocolVersionFromJSON)(json['ipProtocolVersion']),
'type': !(0, runtime_1.exists)(json, 'type') ? undefined : (0, _1.IceCandidateTypeFromJSON)(json['type']),
'transportProtocol': !(0, runtime_1.exists)(json, 'transportProtocol') ? undefined : (0, _1.TransportProtocolFromJSON)(json['transportProtocol']),
'relayProtocol': !(0, runtime_1.exists)(json, 'relayProtocol') ? undefined : (0, _1.RelayProtocolFromJSON)(json['relayProtocol']),
'url': !(0, runtime_1.exists)(json, 'url') ? undefined : json['url'],
};
}
function IceCandidateToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'address': value.address,
'port': value.port,
'ipProtocolVersion': (0, _1.IpProtocolVersionToJSON)(value.ipProtocolVersion),
'type': (0, _1.IceCandidateTypeToJSON)(value.type),
'transportProtocol': (0, _1.TransportProtocolToJSON)(value.transportProtocol),
'relayProtocol': (0, _1.RelayProtocolToJSON)(value.relayProtocol),
'url': value.url,
};
}
//# sourceMappingURL=IceCandidate.js.map