/* 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 { ACTAccessRequirementFromJSONTyped, ACTAccessRequirementToJSON, } from './ACTAccessRequirement';
import { LockAccessRequirementFromJSONTyped, LockAccessRequirementToJSON, } from './LockAccessRequirement';
import { ManagedACTAccessRequirementFromJSONTyped, ManagedACTAccessRequirementToJSON, } from './ManagedACTAccessRequirement';
import { PostMessageContentAccessRequirementFromJSONTyped, PostMessageContentAccessRequirementToJSON, } from './PostMessageContentAccessRequirement';
import { SelfSignAccessRequirementFromJSONTyped, SelfSignAccessRequirementToJSON, } from './SelfSignAccessRequirement';
import { TermsOfUseAccessRequirementFromJSONTyped, TermsOfUseAccessRequirementToJSON, } from './TermsOfUseAccessRequirement';
export function AccessRequirementFromJSON(json) {
    return AccessRequirementFromJSONTyped(json, false);
}
export function AccessRequirementFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.ACTAccessRequirement':
            return Object.assign({}, ACTAccessRequirementFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.ACTAccessRequirement' });
        case 'org.sagebionetworks.repo.model.LockAccessRequirement':
            return Object.assign({}, LockAccessRequirementFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.LockAccessRequirement' });
        case 'org.sagebionetworks.repo.model.ManagedACTAccessRequirement':
            return Object.assign({}, ManagedACTAccessRequirementFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.ManagedACTAccessRequirement' });
        case 'org.sagebionetworks.repo.model.PostMessageContentAccessRequirement':
            return Object.assign({}, PostMessageContentAccessRequirementFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.PostMessageContentAccessRequirement' });
        case 'org.sagebionetworks.repo.model.SelfSignAccessRequirement':
            return Object.assign({}, SelfSignAccessRequirementFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.SelfSignAccessRequirement' });
        case 'org.sagebionetworks.repo.model.TermsOfUseAccessRequirement':
            return Object.assign({}, TermsOfUseAccessRequirementFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.TermsOfUseAccessRequirement' });
        default:
            return json;
    }
}
export function AccessRequirementToJSON(json) {
    return AccessRequirementToJSONTyped(json, false);
}
export function AccessRequirementToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.ACTAccessRequirement':
            return Object.assign({}, ACTAccessRequirementToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.ACTAccessRequirement' });
        case 'org.sagebionetworks.repo.model.LockAccessRequirement':
            return Object.assign({}, LockAccessRequirementToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.LockAccessRequirement' });
        case 'org.sagebionetworks.repo.model.ManagedACTAccessRequirement':
            return Object.assign({}, ManagedACTAccessRequirementToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.ManagedACTAccessRequirement' });
        case 'org.sagebionetworks.repo.model.PostMessageContentAccessRequirement':
            return Object.assign({}, PostMessageContentAccessRequirementToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.PostMessageContentAccessRequirement' });
        case 'org.sagebionetworks.repo.model.SelfSignAccessRequirement':
            return Object.assign({}, SelfSignAccessRequirementToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.SelfSignAccessRequirement' });
        case 'org.sagebionetworks.repo.model.TermsOfUseAccessRequirement':
            return Object.assign({}, TermsOfUseAccessRequirementToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.TermsOfUseAccessRequirement' });
        default:
            return value;
    }
}
//# sourceMappingURL=AccessRequirement.js.map