fastcomments-sdk
Version:
FastComments API Client - A SDK for interacting with the FastComments API
71 lines • 2.88 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.instanceOfAPICommentCommonBannedUser = instanceOfAPICommentCommonBannedUser;
exports.APICommentCommonBannedUserFromJSON = APICommentCommonBannedUserFromJSON;
exports.APICommentCommonBannedUserFromJSONTyped = APICommentCommonBannedUserFromJSONTyped;
exports.APICommentCommonBannedUserToJSON = APICommentCommonBannedUserToJSON;
exports.APICommentCommonBannedUserToJSONTyped = APICommentCommonBannedUserToJSONTyped;
/**
* Check if a given object implements the APICommentCommonBannedUser interface.
*/
function instanceOfAPICommentCommonBannedUser(value) {
if (!('id' in value) || value['id'] === undefined)
return false;
if (!('banType' in value) || value['banType'] === undefined)
return false;
if (!('bannedUntil' in value) || value['bannedUntil'] === undefined)
return false;
if (!('hasEmailWildcard' in value) || value['hasEmailWildcard'] === undefined)
return false;
return true;
}
function APICommentCommonBannedUserFromJSON(json) {
return APICommentCommonBannedUserFromJSONTyped(json, false);
}
function APICommentCommonBannedUserFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'id': json['_id'],
'userId': json['userId'] == null ? undefined : json['userId'],
'banType': json['banType'],
'email': json['email'] == null ? undefined : json['email'],
'ipHash': json['ipHash'] == null ? undefined : json['ipHash'],
'bannedUntil': (json['bannedUntil'] == null ? null : new Date(json['bannedUntil'])),
'hasEmailWildcard': json['hasEmailWildcard'],
'banReason': json['banReason'] == null ? undefined : json['banReason'],
};
}
function APICommentCommonBannedUserToJSON(json) {
return APICommentCommonBannedUserToJSONTyped(json, false);
}
function APICommentCommonBannedUserToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'_id': value['id'],
'userId': value['userId'],
'banType': value['banType'],
'email': value['email'],
'ipHash': value['ipHash'],
'bannedUntil': (value['bannedUntil'] == null ? null : value['bannedUntil'].toISOString()),
'hasEmailWildcard': value['hasEmailWildcard'],
'banReason': value['banReason'],
};
}
//# sourceMappingURL=APICommentCommonBannedUser.js.map