fetch-jsd
Version:
A simple and typed library, based on OpenAPI spec from developer.atlassian.com, for accessing product APIs.
52 lines (51 loc) • 1.91 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 AttachmentDTOFromJSON(json) {
return AttachmentDTOFromJSONTyped(json, false);
}
exports.AttachmentDTOFromJSON = AttachmentDTOFromJSON;
function AttachmentDTOFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'filename': !runtime_1.exists(json, 'filename') ? undefined : json['filename'],
'author': !runtime_1.exists(json, 'author') ? undefined : _1.UserDTOFromJSON(json['author']),
'created': !runtime_1.exists(json, 'created') ? undefined : _1.DateDTOFromJSON(json['created']),
'size': !runtime_1.exists(json, 'size') ? undefined : json['size'],
'mimeType': !runtime_1.exists(json, 'mimeType') ? undefined : json['mimeType'],
'_links': !runtime_1.exists(json, '_links') ? undefined : _1.AttachmentLinkDTOFromJSON(json['_links']),
};
}
exports.AttachmentDTOFromJSONTyped = AttachmentDTOFromJSONTyped;
function AttachmentDTOToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'filename': value.filename,
'author': _1.UserDTOToJSON(value.author),
'created': _1.DateDTOToJSON(value.created),
'size': value.size,
'mimeType': value.mimeType,
'_links': _1.AttachmentLinkDTOToJSON(value._links),
};
}
exports.AttachmentDTOToJSON = AttachmentDTOToJSON;
;