fetch-jsd
Version:
A simple and typed library, based on OpenAPI spec from developer.atlassian.com, for accessing product APIs.
50 lines (49 loc) • 2 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 SlaInformationDTOFromJSON(json) {
return SlaInformationDTOFromJSONTyped(json, false);
}
exports.SlaInformationDTOFromJSON = SlaInformationDTOFromJSON;
function SlaInformationDTOFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !runtime_1.exists(json, 'id') ? undefined : json['id'],
'name': !runtime_1.exists(json, 'name') ? undefined : json['name'],
'completedCycles': !runtime_1.exists(json, 'completedCycles') ? undefined : json['completedCycles'].map(_1.SlaInformationCompletedCycleDTOFromJSON),
'ongoingCycle': !runtime_1.exists(json, 'ongoingCycle') ? undefined : _1.SlaInformationOngoingCycleDTOFromJSON(json['ongoingCycle']),
'_links': !runtime_1.exists(json, '_links') ? undefined : _1.SelfLinkDTOFromJSON(json['_links']),
};
}
exports.SlaInformationDTOFromJSONTyped = SlaInformationDTOFromJSONTyped;
function SlaInformationDTOToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'id': value.id,
'name': value.name,
'completedCycles': value.completedCycles === undefined ? undefined : value.completedCycles.map(_1.SlaInformationCompletedCycleDTOToJSON),
'ongoingCycle': _1.SlaInformationOngoingCycleDTOToJSON(value.ongoingCycle),
'_links': _1.SelfLinkDTOToJSON(value._links),
};
}
exports.SlaInformationDTOToJSON = SlaInformationDTOToJSON;
;