fastcomments-sdk
Version:
FastComments API Client - A SDK for interacting with the FastComments API
133 lines • 6.98 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.instanceOfCreateCommentParams = instanceOfCreateCommentParams;
exports.CreateCommentParamsFromJSON = CreateCommentParamsFromJSON;
exports.CreateCommentParamsFromJSONTyped = CreateCommentParamsFromJSONTyped;
exports.CreateCommentParamsToJSON = CreateCommentParamsToJSON;
exports.CreateCommentParamsToJSONTyped = CreateCommentParamsToJSONTyped;
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 CreateCommentParams interface.
*/
function instanceOfCreateCommentParams(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;
if (!('locale' in value) || value['locale'] === undefined)
return false;
return true;
}
function CreateCommentParamsFromJSON(json) {
return CreateCommentParamsFromJSONTyped(json, false);
}
function CreateCommentParamsFromJSONTyped(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'],
'approved': json['approved'] == null ? undefined : json['approved'],
'domain': json['domain'] == null ? undefined : json['domain'],
'ip': json['ip'] == null ? undefined : json['ip'],
'isPinned': json['isPinned'] == null ? undefined : json['isPinned'],
'locale': json['locale'],
'reviewed': json['reviewed'] == null ? undefined : json['reviewed'],
'verified': json['verified'] == null ? undefined : json['verified'],
'votes': json['votes'] == null ? undefined : json['votes'],
'votesDown': json['votesDown'] == null ? undefined : json['votesDown'],
'votesUp': json['votesUp'] == null ? undefined : json['votesUp'],
};
}
function CreateCommentParamsToJSON(json) {
return CreateCommentParamsToJSONTyped(json, false);
}
function CreateCommentParamsToJSONTyped(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'],
'approved': value['approved'],
'domain': value['domain'],
'ip': value['ip'],
'isPinned': value['isPinned'],
'locale': value['locale'],
'reviewed': value['reviewed'],
'verified': value['verified'],
'votes': value['votes'],
'votesDown': value['votesDown'],
'votesUp': value['votesUp'],
};
}
//# sourceMappingURL=CreateCommentParams.js.map