fastcomments-sdk
Version:
FastComments API Client - A SDK for interacting with the FastComments API
111 lines • 5.69 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.instanceOfCommentData = instanceOfCommentData;
exports.CommentDataFromJSON = CommentDataFromJSON;
exports.CommentDataFromJSONTyped = CommentDataFromJSONTyped;
exports.CommentDataToJSON = CommentDataToJSON;
exports.CommentDataToJSONTyped = CommentDataToJSONTyped;
const runtime_1 = require("../runtime");
const CommentUserHashTagInfo_1 = require("./CommentUserHashTagInfo");
const CommentUserMentionInfo_1 = require("./CommentUserMentionInfo");
const GifSearchResponseImagesInnerInner_1 = require("./GifSearchResponseImagesInnerInner");
/**
* Check if a given object implements the CommentData interface.
*/
function instanceOfCommentData(value) {
if (!('commenterName' in value) || value['commenterName'] === undefined)
return false;
if (!('comment' in value) || value['comment'] === undefined)
return false;
if (!('url' in value) || value['url'] === undefined)
return false;
if (!('urlId' in value) || value['urlId'] === undefined)
return false;
return true;
}
function CommentDataFromJSON(json) {
return CommentDataFromJSONTyped(json, false);
}
function CommentDataFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'date': json['date'] == null ? undefined : json['date'],
'localDateString': json['localDateString'] == null ? undefined : json['localDateString'],
'localDateHours': json['localDateHours'] == null ? undefined : json['localDateHours'],
'commenterName': json['commenterName'],
'commenterEmail': json['commenterEmail'] == null ? undefined : json['commenterEmail'],
'commenterLink': json['commenterLink'] == null ? undefined : json['commenterLink'],
'comment': json['comment'],
'productId': json['productId'] == null ? undefined : json['productId'],
'userId': json['userId'] == null ? undefined : json['userId'],
'avatarSrc': json['avatarSrc'] == null ? undefined : json['avatarSrc'],
'parentId': json['parentId'] == null ? undefined : json['parentId'],
'mentions': json['mentions'] == null ? undefined : (json['mentions'].map(CommentUserMentionInfo_1.CommentUserMentionInfoFromJSON)),
'hashTags': json['hashTags'] == null ? undefined : (json['hashTags'].map(CommentUserHashTagInfo_1.CommentUserHashTagInfoFromJSON)),
'pageTitle': json['pageTitle'] == null ? undefined : json['pageTitle'],
'isFromMyAccountPage': json['isFromMyAccountPage'] == null ? undefined : json['isFromMyAccountPage'],
'url': json['url'],
'urlId': json['urlId'],
'meta': json['meta'] == null ? undefined : json['meta'],
'moderationGroupIds': json['moderationGroupIds'] == null ? undefined : json['moderationGroupIds'],
'rating': json['rating'] == null ? undefined : json['rating'],
'fromOfflineRestore': json['fromOfflineRestore'] == null ? undefined : json['fromOfflineRestore'],
'autoplayDelayMS': json['autoplayDelayMS'] == null ? undefined : json['autoplayDelayMS'],
'feedbackIds': json['feedbackIds'] == null ? undefined : json['feedbackIds'],
'questionValues': json['questionValues'] == null ? undefined : ((0, runtime_1.mapValues)(json['questionValues'], GifSearchResponseImagesInnerInner_1.GifSearchResponseImagesInnerInnerFromJSON)),
'tos': json['tos'] == null ? undefined : json['tos'],
'botId': json['botId'] == null ? undefined : json['botId'],
};
}
function CommentDataToJSON(json) {
return CommentDataToJSONTyped(json, false);
}
function CommentDataToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'date': value['date'],
'localDateString': value['localDateString'],
'localDateHours': value['localDateHours'],
'commenterName': value['commenterName'],
'commenterEmail': value['commenterEmail'],
'commenterLink': value['commenterLink'],
'comment': value['comment'],
'productId': value['productId'],
'userId': value['userId'],
'avatarSrc': value['avatarSrc'],
'parentId': value['parentId'],
'mentions': value['mentions'] == null ? undefined : (value['mentions'].map(CommentUserMentionInfo_1.CommentUserMentionInfoToJSON)),
'hashTags': value['hashTags'] == null ? undefined : (value['hashTags'].map(CommentUserHashTagInfo_1.CommentUserHashTagInfoToJSON)),
'pageTitle': value['pageTitle'],
'isFromMyAccountPage': value['isFromMyAccountPage'],
'url': value['url'],
'urlId': value['urlId'],
'meta': value['meta'],
'moderationGroupIds': value['moderationGroupIds'],
'rating': value['rating'],
'fromOfflineRestore': value['fromOfflineRestore'],
'autoplayDelayMS': value['autoplayDelayMS'],
'feedbackIds': value['feedbackIds'],
'questionValues': value['questionValues'] == null ? undefined : ((0, runtime_1.mapValues)(value['questionValues'], GifSearchResponseImagesInnerInner_1.GifSearchResponseImagesInnerInnerToJSON)),
'tos': value['tos'],
'botId': value['botId'],
};
}
//# sourceMappingURL=CommentData.js.map