fastcomments-sdk
Version:
FastComments API Client - A SDK for interacting with the FastComments API
76 lines • 3.29 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.instanceOfAPIBannedUserWithMultiMatchInfo = instanceOfAPIBannedUserWithMultiMatchInfo;
exports.APIBannedUserWithMultiMatchInfoFromJSON = APIBannedUserWithMultiMatchInfoFromJSON;
exports.APIBannedUserWithMultiMatchInfoFromJSONTyped = APIBannedUserWithMultiMatchInfoFromJSONTyped;
exports.APIBannedUserWithMultiMatchInfoToJSON = APIBannedUserWithMultiMatchInfoToJSON;
exports.APIBannedUserWithMultiMatchInfoToJSONTyped = APIBannedUserWithMultiMatchInfoToJSONTyped;
const BannedUserMatch_1 = require("./BannedUserMatch");
/**
* Check if a given object implements the APIBannedUserWithMultiMatchInfo interface.
*/
function instanceOfAPIBannedUserWithMultiMatchInfo(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;
if (!('matches' in value) || value['matches'] === undefined)
return false;
return true;
}
function APIBannedUserWithMultiMatchInfoFromJSON(json) {
return APIBannedUserWithMultiMatchInfoFromJSONTyped(json, false);
}
function APIBannedUserWithMultiMatchInfoFromJSONTyped(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'],
'matches': (json['matches'].map(BannedUserMatch_1.BannedUserMatchFromJSON)),
};
}
function APIBannedUserWithMultiMatchInfoToJSON(json) {
return APIBannedUserWithMultiMatchInfoToJSONTyped(json, false);
}
function APIBannedUserWithMultiMatchInfoToJSONTyped(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'],
'matches': (value['matches'].map(BannedUserMatch_1.BannedUserMatchToJSON)),
};
}
//# sourceMappingURL=APIBannedUserWithMultiMatchInfo.js.map