UNPKG

sinch-rtc

Version:

RTC JavaScript/Web SDK

53 lines 2.19 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.PushProfileFromJSON = PushProfileFromJSON; exports.PushProfileFromJSONTyped = PushProfileFromJSONTyped; exports.PushProfileToJSON = PushProfileToJSON; const runtime_1 = require("../runtime"); const _1 = require("./"); function PushProfileFromJSON(json) { return PushProfileFromJSONTyped(json, false); } function PushProfileFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'maxPayloadSize': !(0, runtime_1.exists)(json, 'maxPayloadSize') ? undefined : json['maxPayloadSize'], 'apn': !(0, runtime_1.exists)(json, 'apn') ? undefined : (json['apn'].map(_1.ApnPushProfileFromJSON)), 'fcm': !(0, runtime_1.exists)(json, 'fcm') ? undefined : (0, _1.FcmPushProfileFromJSON)(json['fcm']), 'opaque': !(0, runtime_1.exists)(json, 'opaque') ? undefined : (0, _1.OpaquePushProfileFromJSON)(json['opaque']), 'upa': !(0, runtime_1.exists)(json, 'upa') ? undefined : (0, _1.UpaPushProfileFromJSON)(json['upa']), 'w3c': !(0, runtime_1.exists)(json, 'w3c') ? undefined : (0, _1.W3CPushProfileFromJSON)(json['w3c']), }; } function PushProfileToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'maxPayloadSize': value.maxPayloadSize, 'apn': value.apn === undefined ? undefined : (value.apn.map(_1.ApnPushProfileToJSON)), 'fcm': (0, _1.FcmPushProfileToJSON)(value.fcm), 'opaque': (0, _1.OpaquePushProfileToJSON)(value.opaque), 'upa': (0, _1.UpaPushProfileToJSON)(value.upa), 'w3c': (0, _1.W3CPushProfileToJSON)(value.w3c), }; } //# sourceMappingURL=PushProfile.js.map