/* 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 { OAuthIdentityProviderFromJSONTyped, OAuthIdentityProviderToJSON, } from './OAuthIdentityProvider';
import { SynapseIdentityProviderFromJSONTyped, SynapseIdentityProviderToJSON, } from './SynapseIdentityProvider';
export function IdentityProviderFromJSON(json) {
    return IdentityProviderFromJSONTyped(json, false);
}
export function IdentityProviderFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.auth.OAuthIdentityProvider':
            return Object.assign({}, OAuthIdentityProviderFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.auth.OAuthIdentityProvider' });
        case 'org.sagebionetworks.repo.model.auth.SynapseIdentityProvider':
            return Object.assign({}, SynapseIdentityProviderFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.auth.SynapseIdentityProvider' });
        default:
            return json;
    }
}
export function IdentityProviderToJSON(json) {
    return IdentityProviderToJSONTyped(json, false);
}
export function IdentityProviderToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.auth.OAuthIdentityProvider':
            return Object.assign({}, OAuthIdentityProviderToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.auth.OAuthIdentityProvider' });
        case 'org.sagebionetworks.repo.model.auth.SynapseIdentityProvider':
            return Object.assign({}, SynapseIdentityProviderToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.auth.SynapseIdentityProvider' });
        default:
            return value;
    }
}
//# sourceMappingURL=IdentityProvider.js.map