UNPKG

fetch-jsd

Version:

A simple and typed library, based on OpenAPI spec from developer.atlassian.com, for accessing product APIs.

53 lines 2.27 kB
// 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. */ import { exists } from '../runtime'; import { DateDTOFromJSON, DateDTOToJSON, PagedDTOAttachmentDTOFromJSON, PagedDTOAttachmentDTOToJSON, RenderedValueDTOFromJSON, RenderedValueDTOToJSON, SelfLinkDTOFromJSON, SelfLinkDTOToJSON, UserDTOFromJSON, UserDTOToJSON, } from './'; export function CommentDTOFromJSON(json) { return CommentDTOFromJSONTyped(json, false); } export function CommentDTOFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'id': !exists(json, 'id') ? undefined : json['id'], 'body': !exists(json, 'body') ? undefined : json['body'], 'renderedBody': !exists(json, 'renderedBody') ? undefined : RenderedValueDTOFromJSON(json['renderedBody']), 'author': !exists(json, 'author') ? undefined : UserDTOFromJSON(json['author']), 'created': !exists(json, 'created') ? undefined : DateDTOFromJSON(json['created']), 'attachments': !exists(json, 'attachments') ? undefined : PagedDTOAttachmentDTOFromJSON(json['attachments']), '_expands': !exists(json, '_expands') ? undefined : json['_expands'], '_public': !exists(json, 'public') ? undefined : json['public'], '_links': !exists(json, '_links') ? undefined : SelfLinkDTOFromJSON(json['_links']), }; } export function CommentDTOToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'id': value.id, 'body': value.body, 'renderedBody': RenderedValueDTOToJSON(value.renderedBody), 'author': UserDTOToJSON(value.author), 'created': DateDTOToJSON(value.created), 'attachments': PagedDTOAttachmentDTOToJSON(value.attachments), '_expands': value._expands, 'public': value._public, '_links': SelfLinkDTOToJSON(value._links), }; } //# sourceMappingURL=CommentDTO.js.map