/* 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 { EnableTwoFaFromJSONTyped, EnableTwoFaToJSON, } from './EnableTwoFa';
import { MeetAccessRequirementFromJSONTyped, MeetAccessRequirementToJSON, } from './MeetAccessRequirement';
import { RequestDownloadFromJSONTyped, RequestDownloadToJSON, } from './RequestDownload';
export function ActionFromJSON(json) {
    return ActionFromJSONTyped(json, false);
}
export function ActionFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.download.EnableTwoFa':
            return Object.assign({}, EnableTwoFaFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.download.EnableTwoFa' });
        case 'org.sagebionetworks.repo.model.download.MeetAccessRequirement':
            return Object.assign({}, MeetAccessRequirementFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.download.MeetAccessRequirement' });
        case 'org.sagebionetworks.repo.model.download.RequestDownload':
            return Object.assign({}, RequestDownloadFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.download.RequestDownload' });
        default:
            return json;
    }
}
export function ActionToJSON(json) {
    return ActionToJSONTyped(json, false);
}
export function ActionToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.download.EnableTwoFa':
            return Object.assign({}, EnableTwoFaToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.download.EnableTwoFa' });
        case 'org.sagebionetworks.repo.model.download.MeetAccessRequirement':
            return Object.assign({}, MeetAccessRequirementToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.download.MeetAccessRequirement' });
        case 'org.sagebionetworks.repo.model.download.RequestDownload':
            return Object.assign({}, RequestDownloadToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.download.RequestDownload' });
        default:
            return value;
    }
}
//# sourceMappingURL=Action.js.map