UNPKG

fastcomments-sdk

Version:

FastComments API Client - A SDK for interacting with the FastComments API

90 lines 4.24 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * fastcomments * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.0 * * * 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.instanceOfLiveEvent = instanceOfLiveEvent; exports.LiveEventFromJSON = LiveEventFromJSON; exports.LiveEventFromJSONTyped = LiveEventFromJSONTyped; exports.LiveEventToJSON = LiveEventToJSON; exports.LiveEventToJSONTyped = LiveEventToJSONTyped; const LiveEventType_1 = require("./LiveEventType"); const FeedPost_1 = require("./FeedPost"); const UserNotification_1 = require("./UserNotification"); const PubSubVote_1 = require("./PubSubVote"); const LiveEventExtraInfo_1 = require("./LiveEventExtraInfo"); const PubSubComment_1 = require("./PubSubComment"); const CommentUserBadgeInfo_1 = require("./CommentUserBadgeInfo"); /** * Check if a given object implements the LiveEvent interface. */ function instanceOfLiveEvent(value) { if (!('type' in value) || value['type'] === undefined) return false; return true; } function LiveEventFromJSON(json) { return LiveEventFromJSONTyped(json, false); } function LiveEventFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'type': (0, LiveEventType_1.LiveEventTypeFromJSON)(json['type']), 'timestamp': json['timestamp'] == null ? undefined : json['timestamp'], 'ts': json['ts'] == null ? undefined : json['ts'], 'broadcastId': json['broadcastId'] == null ? undefined : json['broadcastId'], 'userId': json['userId'] == null ? undefined : json['userId'], 'badges': json['badges'] == null ? undefined : (json['badges'].map(CommentUserBadgeInfo_1.CommentUserBadgeInfoFromJSON)), 'notification': json['notification'] == null ? undefined : (0, UserNotification_1.UserNotificationFromJSON)(json['notification']), 'vote': json['vote'] == null ? undefined : (0, PubSubVote_1.PubSubVoteFromJSON)(json['vote']), 'comment': json['comment'] == null ? undefined : (0, PubSubComment_1.PubSubCommentFromJSON)(json['comment']), 'feedPost': json['feedPost'] == null ? undefined : (0, FeedPost_1.FeedPostFromJSON)(json['feedPost']), 'extraInfo': json['extraInfo'] == null ? undefined : (0, LiveEventExtraInfo_1.LiveEventExtraInfoFromJSON)(json['extraInfo']), 'config': json['config'] == null ? undefined : json['config'], 'isClosed': json['isClosed'] == null ? undefined : json['isClosed'], 'uj': json['uj'] == null ? undefined : json['uj'], 'ul': json['ul'] == null ? undefined : json['ul'], 'sc': json['sc'] == null ? undefined : json['sc'], 'changes': json['changes'] == null ? undefined : json['changes'], }; } function LiveEventToJSON(json) { return LiveEventToJSONTyped(json, false); } function LiveEventToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'type': (0, LiveEventType_1.LiveEventTypeToJSON)(value['type']), 'timestamp': value['timestamp'], 'ts': value['ts'], 'broadcastId': value['broadcastId'], 'userId': value['userId'], 'badges': value['badges'] == null ? undefined : (value['badges'].map(CommentUserBadgeInfo_1.CommentUserBadgeInfoToJSON)), 'notification': (0, UserNotification_1.UserNotificationToJSON)(value['notification']), 'vote': (0, PubSubVote_1.PubSubVoteToJSON)(value['vote']), 'comment': (0, PubSubComment_1.PubSubCommentToJSON)(value['comment']), 'feedPost': (0, FeedPost_1.FeedPostToJSON)(value['feedPost']), 'extraInfo': (0, LiveEventExtraInfo_1.LiveEventExtraInfoToJSON)(value['extraInfo']), 'config': value['config'], 'isClosed': value['isClosed'], 'uj': value['uj'], 'ul': value['ul'], 'sc': value['sc'], 'changes': value['changes'], }; } //# sourceMappingURL=LiveEvent.js.map