fastcomments-sdk
Version:
FastComments API Client - A SDK for interacting with the FastComments API
86 lines • 4.07 kB
JavaScript
;
/* 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.instanceOfGetUserNotificationsResponse = instanceOfGetUserNotificationsResponse;
exports.GetUserNotificationsResponseFromJSON = GetUserNotificationsResponseFromJSON;
exports.GetUserNotificationsResponseFromJSONTyped = GetUserNotificationsResponseFromJSONTyped;
exports.GetUserNotificationsResponseToJSON = GetUserNotificationsResponseToJSON;
exports.GetUserNotificationsResponseToJSONTyped = GetUserNotificationsResponseToJSONTyped;
const CustomConfigParameters_1 = require("./CustomConfigParameters");
const RenderableUserNotification_1 = require("./RenderableUserNotification");
const APIStatus_1 = require("./APIStatus");
/**
* Check if a given object implements the GetUserNotificationsResponse interface.
*/
function instanceOfGetUserNotificationsResponse(value) {
if (!('isSubscribed' in value) || value['isSubscribed'] === undefined)
return false;
if (!('hasMore' in value) || value['hasMore'] === undefined)
return false;
if (!('notifications' in value) || value['notifications'] === undefined)
return false;
if (!('status' in value) || value['status'] === undefined)
return false;
if (!('reason' in value) || value['reason'] === undefined)
return false;
if (!('code' in value) || value['code'] === undefined)
return false;
return true;
}
function GetUserNotificationsResponseFromJSON(json) {
return GetUserNotificationsResponseFromJSONTyped(json, false);
}
function GetUserNotificationsResponseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'translations': json['translations'] == null ? undefined : json['translations'],
'isSubscribed': json['isSubscribed'],
'hasMore': json['hasMore'],
'notifications': (json['notifications'].map(RenderableUserNotification_1.RenderableUserNotificationFromJSON)),
'status': (0, APIStatus_1.APIStatusFromJSON)(json['status']),
'reason': json['reason'],
'code': json['code'],
'secondaryCode': json['secondaryCode'] == null ? undefined : json['secondaryCode'],
'bannedUntil': json['bannedUntil'] == null ? undefined : json['bannedUntil'],
'maxCharacterLength': json['maxCharacterLength'] == null ? undefined : json['maxCharacterLength'],
'translatedError': json['translatedError'] == null ? undefined : json['translatedError'],
'customConfig': json['customConfig'] == null ? undefined : (0, CustomConfigParameters_1.CustomConfigParametersFromJSON)(json['customConfig']),
};
}
function GetUserNotificationsResponseToJSON(json) {
return GetUserNotificationsResponseToJSONTyped(json, false);
}
function GetUserNotificationsResponseToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'translations': value['translations'],
'isSubscribed': value['isSubscribed'],
'hasMore': value['hasMore'],
'notifications': (value['notifications'].map(RenderableUserNotification_1.RenderableUserNotificationToJSON)),
'status': (0, APIStatus_1.APIStatusToJSON)(value['status']),
'reason': value['reason'],
'code': value['code'],
'secondaryCode': value['secondaryCode'],
'bannedUntil': value['bannedUntil'],
'maxCharacterLength': value['maxCharacterLength'],
'translatedError': value['translatedError'],
'customConfig': (0, CustomConfigParameters_1.CustomConfigParametersToJSON)(value['customConfig']),
};
}
//# sourceMappingURL=GetUserNotificationsResponse.js.map