/* tslint:disable */
/* eslint-disable */
/**
 * Synapse REST API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
import { WebhookSynapseEventMessageFromJSONTyped, WebhookSynapseEventMessageToJSON, } from './WebhookSynapseEventMessage';
import { WebhookVerificationMessageFromJSONTyped, WebhookVerificationMessageToJSON, } from './WebhookVerificationMessage';
export function WebhookMessageFromJSON(json) {
    return WebhookMessageFromJSONTyped(json, false);
}
export function WebhookMessageFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.webhook.WebhookSynapseEventMessage':
            return Object.assign({}, WebhookSynapseEventMessageFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.webhook.WebhookSynapseEventMessage' });
        case 'org.sagebionetworks.repo.model.webhook.WebhookVerificationMessage':
            return Object.assign({}, WebhookVerificationMessageFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.webhook.WebhookVerificationMessage' });
        default:
            return json;
    }
}
export function WebhookMessageToJSON(json) {
    return WebhookMessageToJSONTyped(json, false);
}
export function WebhookMessageToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.webhook.WebhookSynapseEventMessage':
            return Object.assign({}, WebhookSynapseEventMessageToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.webhook.WebhookSynapseEventMessage' });
        case 'org.sagebionetworks.repo.model.webhook.WebhookVerificationMessage':
            return Object.assign({}, WebhookVerificationMessageToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.webhook.WebhookVerificationMessage' });
        default:
            return value;
    }
}
//# sourceMappingURL=WebhookMessage.js.map