fetch-jsd
Version:
58 lines (57 loc) • 2.36 kB
JavaScript
;
// tslint:disable
/**
* Service Desk Public REST API
* Public REST API for Jira Service Desk
*
* The version of the OpenAPI document: 1001.0.0-SNAPSHOT
*
*
* 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 });
const runtime_1 = require("../runtime");
const _1 = require("./");
function CommentDTOFromJSON(json) {
return CommentDTOFromJSONTyped(json, false);
}
exports.CommentDTOFromJSON = CommentDTOFromJSON;
function CommentDTOFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !runtime_1.exists(json, 'id') ? undefined : json['id'],
'body': !runtime_1.exists(json, 'body') ? undefined : json['body'],
'renderedBody': !runtime_1.exists(json, 'renderedBody') ? undefined : _1.RenderedValueDTOFromJSON(json['renderedBody']),
'author': !runtime_1.exists(json, 'author') ? undefined : _1.UserDTOFromJSON(json['author']),
'created': !runtime_1.exists(json, 'created') ? undefined : _1.DateDTOFromJSON(json['created']),
'attachments': !runtime_1.exists(json, 'attachments') ? undefined : _1.PagedDTOAttachmentDTOFromJSON(json['attachments']),
'_expands': !runtime_1.exists(json, '_expands') ? undefined : json['_expands'],
'_public': !runtime_1.exists(json, 'public') ? undefined : json['public'],
'_links': !runtime_1.exists(json, '_links') ? undefined : _1.SelfLinkDTOFromJSON(json['_links']),
};
}
exports.CommentDTOFromJSONTyped = CommentDTOFromJSONTyped;
function CommentDTOToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'id': value.id,
'body': value.body,
'renderedBody': _1.RenderedValueDTOToJSON(value.renderedBody),
'author': _1.UserDTOToJSON(value.author),
'created': _1.DateDTOToJSON(value.created),
'attachments': _1.PagedDTOAttachmentDTOToJSON(value.attachments),
'_expands': value._expands,
'public': value._public,
'_links': _1.SelfLinkDTOToJSON(value._links),
};
}
exports.CommentDTOToJSON = CommentDTOToJSON;