/* 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 { RenewalFromJSONTyped, RenewalToJSON, } from './Renewal';
import { RequestFromJSONTyped, RequestToJSON, } from './Request';
export function RequestInterfaceFromJSON(json) {
    return RequestInterfaceFromJSONTyped(json, false);
}
export function RequestInterfaceFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['concreteType']) {
        case 'org.sagebionetworks.repo.model.dataaccess.Renewal':
            return Object.assign({}, RenewalFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.dataaccess.Renewal' });
        case 'org.sagebionetworks.repo.model.dataaccess.Request':
            return Object.assign({}, RequestFromJSONTyped(json, true), { concreteType: 'org.sagebionetworks.repo.model.dataaccess.Request' });
        default:
            return json;
    }
}
export function RequestInterfaceToJSON(json) {
    return RequestInterfaceToJSONTyped(json, false);
}
export function RequestInterfaceToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['concreteType']) {
        case 'org.sagebionetworks.repo.model.dataaccess.Renewal':
            return Object.assign({}, RenewalToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.dataaccess.Renewal' });
        case 'org.sagebionetworks.repo.model.dataaccess.Request':
            return Object.assign({}, RequestToJSON(value), { concreteType: 'org.sagebionetworks.repo.model.dataaccess.Request' });
        default:
            return value;
    }
}
//# sourceMappingURL=RequestInterface.js.map