UNPKG

fastcomments-sdk

Version:

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

70 lines 2.72 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.instanceOfCreateQuestionResultBody = instanceOfCreateQuestionResultBody; exports.CreateQuestionResultBodyFromJSON = CreateQuestionResultBodyFromJSON; exports.CreateQuestionResultBodyFromJSONTyped = CreateQuestionResultBodyFromJSONTyped; exports.CreateQuestionResultBodyToJSON = CreateQuestionResultBodyToJSON; exports.CreateQuestionResultBodyToJSONTyped = CreateQuestionResultBodyToJSONTyped; const MetaItem_1 = require("./MetaItem"); /** * Check if a given object implements the CreateQuestionResultBody interface. */ function instanceOfCreateQuestionResultBody(value) { if (!('urlId' in value) || value['urlId'] === undefined) return false; if (!('value' in value) || value['value'] === undefined) return false; if (!('questionId' in value) || value['questionId'] === undefined) return false; return true; } function CreateQuestionResultBodyFromJSON(json) { return CreateQuestionResultBodyFromJSONTyped(json, false); } function CreateQuestionResultBodyFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { ...json, 'urlId': json['urlId'], 'value': json['value'], 'questionId': json['questionId'], 'anonUserId': json['anonUserId'] == null ? undefined : json['anonUserId'], 'userId': json['userId'] == null ? undefined : json['userId'], 'commentId': json['commentId'] == null ? undefined : json['commentId'], 'meta': json['meta'] == null ? undefined : (json['meta'].map(MetaItem_1.MetaItemFromJSON)), }; } function CreateQuestionResultBodyToJSON(json) { return CreateQuestionResultBodyToJSONTyped(json, false); } function CreateQuestionResultBodyToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { ...value, 'urlId': value['urlId'], 'value': value['value'], 'questionId': value['questionId'], 'anonUserId': value['anonUserId'], 'userId': value['userId'], 'commentId': value['commentId'], 'meta': value['meta'] == null ? undefined : (value['meta'].map(MetaItem_1.MetaItemToJSON)), }; } //# sourceMappingURL=CreateQuestionResultBody.js.map