UNPKG

fetch-jsd

Version:

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

38 lines (37 loc) 2.81 kB
"use strict"; // 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 HistoryMetadataFromJSON(json) { return HistoryMetadataFromJSONTyped(json, false); } exports.HistoryMetadataFromJSON = HistoryMetadataFromJSON; function HistoryMetadataFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return Object.assign(Object.assign({}, json), { 'type': !runtime_1.exists(json, 'type') ? undefined : json['type'], 'description': !runtime_1.exists(json, 'description') ? undefined : json['description'], 'descriptionKey': !runtime_1.exists(json, 'descriptionKey') ? undefined : json['descriptionKey'], 'activityDescription': !runtime_1.exists(json, 'activityDescription') ? undefined : json['activityDescription'], 'activityDescriptionKey': !runtime_1.exists(json, 'activityDescriptionKey') ? undefined : json['activityDescriptionKey'], 'emailDescription': !runtime_1.exists(json, 'emailDescription') ? undefined : json['emailDescription'], 'emailDescriptionKey': !runtime_1.exists(json, 'emailDescriptionKey') ? undefined : json['emailDescriptionKey'], 'actor': !runtime_1.exists(json, 'actor') ? undefined : _1.HistoryMetadataParticipantFromJSON(json['actor']), 'generator': !runtime_1.exists(json, 'generator') ? undefined : _1.HistoryMetadataParticipantFromJSON(json['generator']), 'cause': !runtime_1.exists(json, 'cause') ? undefined : _1.HistoryMetadataParticipantFromJSON(json['cause']), 'extraData': !runtime_1.exists(json, 'extraData') ? undefined : json['extraData'] }); } exports.HistoryMetadataFromJSONTyped = HistoryMetadataFromJSONTyped; function HistoryMetadataToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return Object.assign(Object.assign({}, value), { 'type': value.type, 'description': value.description, 'descriptionKey': value.descriptionKey, 'activityDescription': value.activityDescription, 'activityDescriptionKey': value.activityDescriptionKey, 'emailDescription': value.emailDescription, 'emailDescriptionKey': value.emailDescriptionKey, 'actor': _1.HistoryMetadataParticipantToJSON(value.actor), 'generator': _1.HistoryMetadataParticipantToJSON(value.generator), 'cause': _1.HistoryMetadataParticipantToJSON(value.cause), 'extraData': value.extraData }); } exports.HistoryMetadataToJSON = HistoryMetadataToJSON;