fetch-jsd
Version:
A simple and typed library, based on OpenAPI spec from developer.atlassian.com, for accessing product APIs.
47 lines • 1.75 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.
*/
import { exists } from '../runtime';
import { AttachmentLinkDTOFromJSON, AttachmentLinkDTOToJSON, DateDTOFromJSON, DateDTOToJSON, UserDTOFromJSON, UserDTOToJSON, } from './';
export function AttachmentDTOFromJSON(json) {
return AttachmentDTOFromJSONTyped(json, false);
}
export function AttachmentDTOFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'filename': !exists(json, 'filename') ? undefined : json['filename'],
'author': !exists(json, 'author') ? undefined : UserDTOFromJSON(json['author']),
'created': !exists(json, 'created') ? undefined : DateDTOFromJSON(json['created']),
'size': !exists(json, 'size') ? undefined : json['size'],
'mimeType': !exists(json, 'mimeType') ? undefined : json['mimeType'],
'_links': !exists(json, '_links') ? undefined : AttachmentLinkDTOFromJSON(json['_links']),
};
}
export function AttachmentDTOToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'filename': value.filename,
'author': UserDTOToJSON(value.author),
'created': DateDTOToJSON(value.created),
'size': value.size,
'mimeType': value.mimeType,
'_links': AttachmentLinkDTOToJSON(value._links),
};
}
//# sourceMappingURL=AttachmentDTO.js.map