UNPKG

fastcomments-sdk

Version:

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

74 lines 3.03 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.instanceOfHeaderState = instanceOfHeaderState; exports.HeaderStateFromJSON = HeaderStateFromJSON; exports.HeaderStateFromJSONTyped = HeaderStateFromJSONTyped; exports.HeaderStateToJSON = HeaderStateToJSON; exports.HeaderStateToJSONTyped = HeaderStateToJSONTyped; const HeaderAccountNotification_1 = require("./HeaderAccountNotification"); const APIStatus_1 = require("./APIStatus"); const NotificationAndCount_1 = require("./NotificationAndCount"); /** * Check if a given object implements the HeaderState interface. */ function instanceOfHeaderState(value) { if (!('status' in value) || value['status'] === undefined) return false; if (!('notificationType' in value) || value['notificationType'] === undefined) return false; if (!('userId' in value) || value['userId'] === undefined) return false; if (!('userIdWS' in value) || value['userIdWS'] === undefined) return false; if (!('notificationCounts' in value) || value['notificationCounts'] === undefined) return false; if (!('accountNotifications' in value) || value['accountNotifications'] === undefined) return false; return true; } function HeaderStateFromJSON(json) { return HeaderStateFromJSONTyped(json, false); } function HeaderStateFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'status': (0, APIStatus_1.APIStatusFromJSON)(json['status']), 'notificationType': json['NotificationType'], 'userId': json['userId'], 'userIdWS': json['userIdWS'], 'notificationCounts': (json['notificationCounts'].map(NotificationAndCount_1.NotificationAndCountFromJSON)), 'accountNotifications': (json['accountNotifications'].map(HeaderAccountNotification_1.HeaderAccountNotificationFromJSON)), }; } function HeaderStateToJSON(json) { return HeaderStateToJSONTyped(json, false); } function HeaderStateToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'status': (0, APIStatus_1.APIStatusToJSON)(value['status']), 'NotificationType': value['notificationType'], 'userId': value['userId'], 'userIdWS': value['userIdWS'], 'notificationCounts': (value['notificationCounts'].map(NotificationAndCount_1.NotificationAndCountToJSON)), 'accountNotifications': (value['accountNotifications'].map(HeaderAccountNotification_1.HeaderAccountNotificationToJSON)), }; } //# sourceMappingURL=HeaderState.js.map