sinch-rtc
Version:
RTC JavaScript/Web SDK
63 lines • 2.31 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.ConnectionInfoV2ProtocolEnum = void 0;
exports.ConnectionInfoV2FromJSON = ConnectionInfoV2FromJSON;
exports.ConnectionInfoV2FromJSONTyped = ConnectionInfoV2FromJSONTyped;
exports.ConnectionInfoV2ToJSON = ConnectionInfoV2ToJSON;
const runtime_1 = require("../runtime");
const _1 = require("./");
/**
* @export
* @enum {string}
*/
var ConnectionInfoV2ProtocolEnum;
(function (ConnectionInfoV2ProtocolEnum) {
ConnectionInfoV2ProtocolEnum["Udp"] = "udp";
ConnectionInfoV2ProtocolEnum["Tcp"] = "tcp";
})(ConnectionInfoV2ProtocolEnum || (exports.ConnectionInfoV2ProtocolEnum = ConnectionInfoV2ProtocolEnum = {}));
function ConnectionInfoV2FromJSON(json) {
return ConnectionInfoV2FromJSONTyped(json, false);
}
function ConnectionInfoV2FromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'type': json['type'],
'protocol': !(0, runtime_1.exists)(json, 'protocol') ? undefined : json['protocol'],
'ipProtocolVersion': !(0, runtime_1.exists)(json, 'ipProtocolVersion') ? undefined : (0, _1.IpProtocolVersionFromJSON)(json['ipProtocolVersion']),
'host': !(0, runtime_1.exists)(json, 'host') ? undefined : json['host'],
'port': !(0, runtime_1.exists)(json, 'port') ? undefined : json['port'],
'timestamp': (new Date(json['timestamp'])),
};
}
function ConnectionInfoV2ToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'type': value.type,
'protocol': value.protocol,
'ipProtocolVersion': (0, _1.IpProtocolVersionToJSON)(value.ipProtocolVersion),
'host': value.host,
'port': value.port,
'timestamp': (value.timestamp.toISOString()),
};
}
//# sourceMappingURL=ConnectionInfoV2.js.map