/* 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 { AuthenticationReceiptTokenFromJSONTyped, AuthenticationReceiptTokenToJSON, } from './AuthenticationReceiptToken';
import { EmailValidationSignedTokenFromJSONTyped, EmailValidationSignedTokenToJSON, } from './EmailValidationSignedToken';
import { InviteeVerificationSignedTokenFromJSONTyped, InviteeVerificationSignedTokenToJSON, } from './InviteeVerificationSignedToken';
import { JoinTeamSignedTokenFromJSONTyped, JoinTeamSignedTokenToJSON, } from './JoinTeamSignedToken';
import { MembershipInvtnSignedTokenFromJSONTyped, MembershipInvtnSignedTokenToJSON, } from './MembershipInvtnSignedToken';
import { NewUserSignedTokenFromJSONTyped, NewUserSignedTokenToJSON, } from './NewUserSignedToken';
import { NotificationSettingsSignedTokenFromJSONTyped, NotificationSettingsSignedTokenToJSON, } from './NotificationSettingsSignedToken';
import { PasswordResetSignedTokenFromJSONTyped, PasswordResetSignedTokenToJSON, } from './PasswordResetSignedToken';
import { TwoFactorAuthResetTokenFromJSONTyped, TwoFactorAuthResetTokenToJSON, } from './TwoFactorAuthResetToken';
import { TwoFactorAuthTokenFromJSONTyped, TwoFactorAuthTokenToJSON, } from './TwoFactorAuthToken';
export function SignedTokenInterfaceFromJSON(json) {
    return SignedTokenInterfaceFromJSONTyped(json, false);
}
export function SignedTokenInterfaceFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.InviteeVerificationSignedToken':
            return Object.assign({}, InviteeVerificationSignedTokenFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.InviteeVerificationSignedToken' });
        case 'org.sagebionetworks.repo.model.JoinTeamSignedToken':
            return Object.assign({}, JoinTeamSignedTokenFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.JoinTeamSignedToken' });
        case 'org.sagebionetworks.repo.model.MembershipInvtnSignedToken':
            return Object.assign({}, MembershipInvtnSignedTokenFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.MembershipInvtnSignedToken' });
        case 'org.sagebionetworks.repo.model.auth.AuthenticationReceiptToken':
            return Object.assign({}, AuthenticationReceiptTokenFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.auth.AuthenticationReceiptToken' });
        case 'org.sagebionetworks.repo.model.auth.NewUserSignedToken':
            return Object.assign({}, NewUserSignedTokenFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.auth.NewUserSignedToken' });
        case 'org.sagebionetworks.repo.model.auth.PasswordResetSignedToken':
            return Object.assign({}, PasswordResetSignedTokenFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.auth.PasswordResetSignedToken' });
        case 'org.sagebionetworks.repo.model.auth.TwoFactorAuthResetToken':
            return Object.assign({}, TwoFactorAuthResetTokenFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.auth.TwoFactorAuthResetToken' });
        case 'org.sagebionetworks.repo.model.auth.TwoFactorAuthToken':
            return Object.assign({}, TwoFactorAuthTokenFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.auth.TwoFactorAuthToken' });
        case 'org.sagebionetworks.repo.model.message.NotificationSettingsSignedToken':
            return Object.assign({}, NotificationSettingsSignedTokenFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.message.NotificationSettingsSignedToken' });
        case 'org.sagebionetworks.repo.model.principal.EmailValidationSignedToken':
            return Object.assign({}, EmailValidationSignedTokenFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.principal.EmailValidationSignedToken' });
        default:
            return json;
    }
}
export function SignedTokenInterfaceToJSON(json) {
    return SignedTokenInterfaceToJSONTyped(json, false);
}
export function SignedTokenInterfaceToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.InviteeVerificationSignedToken':
            return Object.assign({}, InviteeVerificationSignedTokenToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.InviteeVerificationSignedToken' });
        case 'org.sagebionetworks.repo.model.JoinTeamSignedToken':
            return Object.assign({}, JoinTeamSignedTokenToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.JoinTeamSignedToken' });
        case 'org.sagebionetworks.repo.model.MembershipInvtnSignedToken':
            return Object.assign({}, MembershipInvtnSignedTokenToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.MembershipInvtnSignedToken' });
        case 'org.sagebionetworks.repo.model.auth.AuthenticationReceiptToken':
            return Object.assign({}, AuthenticationReceiptTokenToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.auth.AuthenticationReceiptToken' });
        case 'org.sagebionetworks.repo.model.auth.NewUserSignedToken':
            return Object.assign({}, NewUserSignedTokenToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.auth.NewUserSignedToken' });
        case 'org.sagebionetworks.repo.model.auth.PasswordResetSignedToken':
            return Object.assign({}, PasswordResetSignedTokenToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.auth.PasswordResetSignedToken' });
        case 'org.sagebionetworks.repo.model.auth.TwoFactorAuthResetToken':
            return Object.assign({}, TwoFactorAuthResetTokenToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.auth.TwoFactorAuthResetToken' });
        case 'org.sagebionetworks.repo.model.auth.TwoFactorAuthToken':
            return Object.assign({}, TwoFactorAuthTokenToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.auth.TwoFactorAuthToken' });
        case 'org.sagebionetworks.repo.model.message.NotificationSettingsSignedToken':
            return Object.assign({}, NotificationSettingsSignedTokenToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.message.NotificationSettingsSignedToken' });
        case 'org.sagebionetworks.repo.model.principal.EmailValidationSignedToken':
            return Object.assign({}, EmailValidationSignedTokenToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.principal.EmailValidationSignedToken' });
        default:
            return value;
    }
}
//# sourceMappingURL=SignedTokenInterface.js.map