/* 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 { SigningOfficialFromJSON, SigningOfficialToJSON, } from './SigningOfficial';
import { AccessorChangeFromJSON, AccessorChangeToJSON, } from './AccessorChange';
import { PrincipalInvestigatorFromJSON, PrincipalInvestigatorToJSON, } from './PrincipalInvestigator';
/**
 * @export
 */
export const RequestConcreteTypeEnum = {
    org_sagebionetworks_repo_model_dataaccess_Request: 'org.sagebionetworks.repo.model.dataaccess.Request'
};
/**
 * Check if a given object implements the Request interface.
 */
export function instanceOfRequest(value) {
    if (!('concreteType' in value) || value['concreteType'] === undefined)
        return false;
    if (!Object.values(RequestConcreteTypeEnum).includes(value["concreteType"])) {
        return false;
    }
    return true;
}
export function RequestFromJSON(json) {
    return RequestFromJSONTyped(json, false);
}
export function RequestFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'id': json['id'] == null ? undefined : json['id'],
        'accessRequirementId': json['accessRequirementId'] == null ? undefined : json['accessRequirementId'],
        'researchProjectId': json['researchProjectId'] == null ? undefined : json['researchProjectId'],
        'createdOn': json['createdOn'] == null ? undefined : json['createdOn'],
        'modifiedOn': json['modifiedOn'] == null ? undefined : json['modifiedOn'],
        'createdBy': json['createdBy'] == null ? undefined : json['createdBy'],
        'modifiedBy': json['modifiedBy'] == null ? undefined : json['modifiedBy'],
        'ducFileHandleId': json['ducFileHandleId'] == null ? undefined : json['ducFileHandleId'],
        'irbFileHandleId': json['irbFileHandleId'] == null ? undefined : json['irbFileHandleId'],
        'attachments': json['attachments'] == null ? undefined : json['attachments'],
        'accessorChanges': json['accessorChanges'] == null ? undefined : (json['accessorChanges'].map(AccessorChangeFromJSON)),
        'etag': json['etag'] == null ? undefined : json['etag'],
        'concreteType': json['concreteType'],
        'institution': json['institution'] == null ? undefined : json['institution'],
        'principalInvestigator': json['principalInvestigator'] == null ? undefined : PrincipalInvestigatorFromJSON(json['principalInvestigator']),
        'signingOfficial': json['signingOfficial'] == null ? undefined : SigningOfficialFromJSON(json['signingOfficial']),
        'eDucSignatureEnvelopeId': json['eDucSignatureEnvelopeId'] == null ? undefined : json['eDucSignatureEnvelopeId'],
    };
}
export function RequestToJSON(json) {
    return RequestToJSONTyped(json, false);
}
export function RequestToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'id': value['id'],
        'accessRequirementId': value['accessRequirementId'],
        'researchProjectId': value['researchProjectId'],
        'createdOn': value['createdOn'],
        'modifiedOn': value['modifiedOn'],
        'createdBy': value['createdBy'],
        'modifiedBy': value['modifiedBy'],
        'ducFileHandleId': value['ducFileHandleId'],
        'irbFileHandleId': value['irbFileHandleId'],
        'attachments': value['attachments'],
        'accessorChanges': value['accessorChanges'] == null ? undefined : (value['accessorChanges'].map(AccessorChangeToJSON)),
        'etag': value['etag'],
        'concreteType': value['concreteType'],
        'institution': value['institution'],
        'principalInvestigator': PrincipalInvestigatorToJSON(value['principalInvestigator']),
        'signingOfficial': SigningOfficialToJSON(value['signingOfficial']),
        'eDucSignatureEnvelopeId': value['eDucSignatureEnvelopeId'],
    };
}
//# sourceMappingURL=Request.js.map