fastcomments-sdk
Version:
FastComments API Client - A SDK for interacting with the FastComments API
71 lines • 2.33 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.instanceOfPublicVote = instanceOfPublicVote;
exports.PublicVoteFromJSON = PublicVoteFromJSON;
exports.PublicVoteFromJSONTyped = PublicVoteFromJSONTyped;
exports.PublicVoteToJSON = PublicVoteToJSON;
exports.PublicVoteToJSONTyped = PublicVoteToJSONTyped;
/**
* Check if a given object implements the PublicVote interface.
*/
function instanceOfPublicVote(value) {
if (!('id' in value) || value['id'] === undefined)
return false;
if (!('urlId' in value) || value['urlId'] === undefined)
return false;
if (!('commentId' in value) || value['commentId'] === undefined)
return false;
if (!('userId' in value) || value['userId'] === undefined)
return false;
if (!('direction' in value) || value['direction'] === undefined)
return false;
if (!('createdAt' in value) || value['createdAt'] === undefined)
return false;
return true;
}
function PublicVoteFromJSON(json) {
return PublicVoteFromJSONTyped(json, false);
}
function PublicVoteFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'id': json['id'],
'urlId': json['urlId'],
'commentId': json['commentId'],
'userId': json['userId'],
'direction': json['direction'],
'createdAt': (new Date(json['createdAt'])),
};
}
function PublicVoteToJSON(json) {
return PublicVoteToJSONTyped(json, false);
}
function PublicVoteToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'id': value['id'],
'urlId': value['urlId'],
'commentId': value['commentId'],
'userId': value['userId'],
'direction': value['direction'],
'createdAt': ((value['createdAt']).toISOString()),
};
}
//# sourceMappingURL=PublicVote.js.map