UNPKG

fastcomments-sdk

Version:

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

81 lines 2.78 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.instanceOfPubSubVote = instanceOfPubSubVote; exports.PubSubVoteFromJSON = PubSubVoteFromJSON; exports.PubSubVoteFromJSONTyped = PubSubVoteFromJSONTyped; exports.PubSubVoteToJSON = PubSubVoteToJSON; exports.PubSubVoteToJSONTyped = PubSubVoteToJSONTyped; /** * Check if a given object implements the PubSubVote interface. */ function instanceOfPubSubVote(value) { if (!('id' in value) || value['id'] === undefined) return false; if (!('tenantId' in value) || value['tenantId'] === undefined) return false; if (!('urlId' in value) || value['urlId'] === undefined) return false; if (!('urlIdRaw' in value) || value['urlIdRaw'] === undefined) return false; if (!('commentId' in value) || value['commentId'] === undefined) return false; if (!('direction' in value) || value['direction'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('verificationId' in value) || value['verificationId'] === undefined) return false; return true; } function PubSubVoteFromJSON(json) { return PubSubVoteFromJSONTyped(json, false); } function PubSubVoteFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'id': json['_id'], 'tenantId': json['tenantId'], 'urlId': json['urlId'], 'urlIdRaw': json['urlIdRaw'], 'commentId': json['commentId'], 'userId': json['userId'] == null ? undefined : json['userId'], 'direction': json['direction'], 'createdAt': json['createdAt'], 'verificationId': json['verificationId'], }; } function PubSubVoteToJSON(json) { return PubSubVoteToJSONTyped(json, false); } function PubSubVoteToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { '_id': value['id'], 'tenantId': value['tenantId'], 'urlId': value['urlId'], 'urlIdRaw': value['urlIdRaw'], 'commentId': value['commentId'], 'userId': value['userId'], 'direction': value['direction'], 'createdAt': value['createdAt'], 'verificationId': value['verificationId'], }; } //# sourceMappingURL=PubSubVote.js.map