/* 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 { OAuthAccountCreationRequestFromJSONTyped, OAuthAccountCreationRequestToJSON, } from './OAuthAccountCreationRequest';
import { OAuthValidationRequestFromJSONTyped, OAuthValidationRequestToJSON, } from './OAuthValidationRequest';
export function OAuthValidationRequestInterfaceFromJSON(json) {
    return OAuthValidationRequestInterfaceFromJSONTyped(json, false);
}
export function OAuthValidationRequestInterfaceFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.oauth.OAuthAccountCreationRequest':
            return Object.assign({}, OAuthAccountCreationRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.oauth.OAuthAccountCreationRequest' });
        case 'org.sagebionetworks.repo.model.oauth.OAuthValidationRequest':
            return Object.assign({}, OAuthValidationRequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.oauth.OAuthValidationRequest' });
        default:
            return json;
    }
}
export function OAuthValidationRequestInterfaceToJSON(json) {
    return OAuthValidationRequestInterfaceToJSONTyped(json, false);
}
export function OAuthValidationRequestInterfaceToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.oauth.OAuthAccountCreationRequest':
            return Object.assign({}, OAuthAccountCreationRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.oauth.OAuthAccountCreationRequest' });
        case 'org.sagebionetworks.repo.model.oauth.OAuthValidationRequest':
            return Object.assign({}, OAuthValidationRequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.oauth.OAuthValidationRequest' });
        default:
            return value;
    }
}
//# sourceMappingURL=OAuthValidationRequestInterface.js.map