fastcomments-sdk
Version:
FastComments API Client - A SDK for interacting with the FastComments API
65 lines • 2.82 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.instanceOfGetVotesForUserResponse = instanceOfGetVotesForUserResponse;
exports.GetVotesForUserResponseFromJSON = GetVotesForUserResponseFromJSON;
exports.GetVotesForUserResponseFromJSONTyped = GetVotesForUserResponseFromJSONTyped;
exports.GetVotesForUserResponseToJSON = GetVotesForUserResponseToJSON;
exports.GetVotesForUserResponseToJSONTyped = GetVotesForUserResponseToJSONTyped;
const PublicVote_1 = require("./PublicVote");
const APIStatus_1 = require("./APIStatus");
/**
* Check if a given object implements the GetVotesForUserResponse interface.
*/
function instanceOfGetVotesForUserResponse(value) {
if (!('status' in value) || value['status'] === undefined)
return false;
if (!('appliedAuthorizedVotes' in value) || value['appliedAuthorizedVotes'] === undefined)
return false;
if (!('appliedAnonymousVotes' in value) || value['appliedAnonymousVotes'] === undefined)
return false;
if (!('pendingVotes' in value) || value['pendingVotes'] === undefined)
return false;
return true;
}
function GetVotesForUserResponseFromJSON(json) {
return GetVotesForUserResponseFromJSONTyped(json, false);
}
function GetVotesForUserResponseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'status': (0, APIStatus_1.APIStatusFromJSON)(json['status']),
'appliedAuthorizedVotes': (json['appliedAuthorizedVotes'].map(PublicVote_1.PublicVoteFromJSON)),
'appliedAnonymousVotes': (json['appliedAnonymousVotes'].map(PublicVote_1.PublicVoteFromJSON)),
'pendingVotes': (json['pendingVotes'].map(PublicVote_1.PublicVoteFromJSON)),
};
}
function GetVotesForUserResponseToJSON(json) {
return GetVotesForUserResponseToJSONTyped(json, false);
}
function GetVotesForUserResponseToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'status': (0, APIStatus_1.APIStatusToJSON)(value['status']),
'appliedAuthorizedVotes': (value['appliedAuthorizedVotes'].map(PublicVote_1.PublicVoteToJSON)),
'appliedAnonymousVotes': (value['appliedAnonymousVotes'].map(PublicVote_1.PublicVoteToJSON)),
'pendingVotes': (value['pendingVotes'].map(PublicVote_1.PublicVoteToJSON)),
};
}
//# sourceMappingURL=GetVotesForUserResponse.js.map