UNPKG

fastcomments-sdk

Version:

FastComments API Client - A SDK for interacting with the FastComments API

65 lines 2.69 kB
"use strict"; /* 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.instanceOfGetVotesResponse = instanceOfGetVotesResponse; exports.GetVotesResponseFromJSON = GetVotesResponseFromJSON; exports.GetVotesResponseFromJSONTyped = GetVotesResponseFromJSONTyped; exports.GetVotesResponseToJSON = GetVotesResponseToJSON; exports.GetVotesResponseToJSONTyped = GetVotesResponseToJSONTyped; const PublicVote_1 = require("./PublicVote"); const APIStatus_1 = require("./APIStatus"); /** * Check if a given object implements the GetVotesResponse interface. */ function instanceOfGetVotesResponse(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 GetVotesResponseFromJSON(json) { return GetVotesResponseFromJSONTyped(json, false); } function GetVotesResponseFromJSONTyped(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 GetVotesResponseToJSON(json) { return GetVotesResponseToJSONTyped(json, false); } function GetVotesResponseToJSONTyped(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=GetVotesResponse.js.map