/* 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 * as runtime from '../runtime';
import { AccessApprovalFromJSON, AccessRequestListFromJSON, AccessRequestListRequestToJSON, AccessRequirementStatusFromJSON, CreateSubmissionRequestToJSON, DataaccessSubmissionFromJSON, DataaccessSubmissionStatusFromJSON, EDucFileHandleIdFromJSON, EDucSignatureQuotaFromJSON, EDucSignatureStatusFromJSON, EDucTemplateListRequestToJSON, EDucTemplatePageFromJSON, EDucTemplateValidationResultFromJSON, OpenSubmissionPageFromJSON, RequestInterfaceFromJSON, RequestInterfaceToJSON, ResearchProjectFromJSON, ResearchProjectToJSON, RestrictionInformationBatchRequestToJSON, RestrictionInformationBatchResponseFromJSON, RestrictionInformationRequestToJSON, RestrictionInformationResponseFromJSON, SubmissionInfoPageFromJSON, SubmissionInfoPageRequestToJSON, SubmissionPageFromJSON, SubmissionPageRequestToJSON, SubmissionSearchRequestToJSON, SubmissionSearchResponseFromJSON, SubmissionStateChangeRequestToJSON, UserSubmissionSearchRequestToJSON, UserSubmissionSearchResponseFromJSON, } from '../models/index';
/**
 *
 */
export class DataAccessServicesApi extends runtime.BaseAPI {
    /**
     */
    async deleteRepoV1DataAccessRequestRequestIdSignatureRaw(requestParameters, initOverrides) {
        if (requestParameters['requestId'] == null) {
            throw new runtime.RequiredError('requestId', 'Required parameter "requestId" was null or undefined when calling deleteRepoV1DataAccessRequestRequestIdSignature().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessRequest/{requestId}/signature`;
        urlPath = urlPath.replace(`{${"requestId"}}`, encodeURIComponent(String(requestParameters['requestId'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     */
    async deleteRepoV1DataAccessRequestRequestIdSignature(requestParameters, initOverrides) {
        await this.deleteRepoV1DataAccessRequestRequestIdSignatureRaw(requestParameters, initOverrides);
    }
    /**
     */
    async deleteRepoV1DataAccessSubmissionSubmissionIdRaw(requestParameters, initOverrides) {
        if (requestParameters['submissionId'] == null) {
            throw new runtime.RequiredError('submissionId', 'Required parameter "submissionId" was null or undefined when calling deleteRepoV1DataAccessSubmissionSubmissionId().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessSubmission/{submissionId}`;
        urlPath = urlPath.replace(`{${"submissionId"}}`, encodeURIComponent(String(requestParameters['submissionId'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     */
    async deleteRepoV1DataAccessSubmissionSubmissionId(requestParameters, initOverrides) {
        await this.deleteRepoV1DataAccessSubmissionSubmissionIdRaw(requestParameters, initOverrides);
    }
    /**
     */
    async getRepoV1AccessRequirementRequirementIdDataAccessRequestForUpdateRaw(requestParameters, initOverrides) {
        if (requestParameters['requirementId'] == null) {
            throw new runtime.RequiredError('requirementId', 'Required parameter "requirementId" was null or undefined when calling getRepoV1AccessRequirementRequirementIdDataAccessRequestForUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/accessRequirement/{requirementId}/dataAccessRequestForUpdate`;
        urlPath = urlPath.replace(`{${"requirementId"}}`, encodeURIComponent(String(requestParameters['requirementId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => RequestInterfaceFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1AccessRequirementRequirementIdDataAccessRequestForUpdate(requestParameters, initOverrides) {
        const response = await this.getRepoV1AccessRequirementRequirementIdDataAccessRequestForUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1AccessRequirementRequirementIdResearchProjectForUpdateRaw(requestParameters, initOverrides) {
        if (requestParameters['requirementId'] == null) {
            throw new runtime.RequiredError('requirementId', 'Required parameter "requirementId" was null or undefined when calling getRepoV1AccessRequirementRequirementIdResearchProjectForUpdate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/accessRequirement/{requirementId}/researchProjectForUpdate`;
        urlPath = urlPath.replace(`{${"requirementId"}}`, encodeURIComponent(String(requestParameters['requirementId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => ResearchProjectFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1AccessRequirementRequirementIdResearchProjectForUpdate(requestParameters, initOverrides) {
        const response = await this.getRepoV1AccessRequirementRequirementIdResearchProjectForUpdateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1AccessRequirementRequirementIdStatusRaw(requestParameters, initOverrides) {
        if (requestParameters['requirementId'] == null) {
            throw new runtime.RequiredError('requirementId', 'Required parameter "requirementId" was null or undefined when calling getRepoV1AccessRequirementRequirementIdStatus().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/accessRequirement/{requirementId}/status`;
        urlPath = urlPath.replace(`{${"requirementId"}}`, encodeURIComponent(String(requestParameters['requirementId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => AccessRequirementStatusFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1AccessRequirementRequirementIdStatus(requestParameters, initOverrides) {
        const response = await this.getRepoV1AccessRequirementRequirementIdStatusRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1DataAccessRequestRequestIdSignatureFilehandleIdRaw(requestParameters, initOverrides) {
        if (requestParameters['requestId'] == null) {
            throw new runtime.RequiredError('requestId', 'Required parameter "requestId" was null or undefined when calling getRepoV1DataAccessRequestRequestIdSignatureFilehandleId().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessRequest/{requestId}/signature/filehandleId`;
        urlPath = urlPath.replace(`{${"requestId"}}`, encodeURIComponent(String(requestParameters['requestId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => EDucFileHandleIdFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1DataAccessRequestRequestIdSignatureFilehandleId(requestParameters, initOverrides) {
        const response = await this.getRepoV1DataAccessRequestRequestIdSignatureFilehandleIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1DataAccessRequestRequestIdSignatureStatusRaw(requestParameters, initOverrides) {
        if (requestParameters['requestId'] == null) {
            throw new runtime.RequiredError('requestId', 'Required parameter "requestId" was null or undefined when calling getRepoV1DataAccessRequestRequestIdSignatureStatus().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessRequest/{requestId}/signature/status`;
        urlPath = urlPath.replace(`{${"requestId"}}`, encodeURIComponent(String(requestParameters['requestId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => EDucSignatureStatusFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1DataAccessRequestRequestIdSignatureStatus(requestParameters, initOverrides) {
        const response = await this.getRepoV1DataAccessRequestRequestIdSignatureStatusRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1DataAccessSubmissionOpenSubmissionsRaw(requestParameters, initOverrides) {
        const queryParameters = {};
        if (requestParameters['nextPageToken'] != null) {
            queryParameters['nextPageToken'] = requestParameters['nextPageToken'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessSubmission/openSubmissions`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => OpenSubmissionPageFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1DataAccessSubmissionOpenSubmissions(requestParameters = {}, initOverrides) {
        const response = await this.getRepoV1DataAccessSubmissionOpenSubmissionsRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1DataAccessSubmissionSubmissionIdRaw(requestParameters, initOverrides) {
        if (requestParameters['submissionId'] == null) {
            throw new runtime.RequiredError('submissionId', 'Required parameter "submissionId" was null or undefined when calling getRepoV1DataAccessSubmissionSubmissionId().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessSubmission/{submissionId}`;
        urlPath = urlPath.replace(`{${"submissionId"}}`, encodeURIComponent(String(requestParameters['submissionId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => DataaccessSubmissionFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1DataAccessSubmissionSubmissionId(requestParameters, initOverrides) {
        const response = await this.getRepoV1DataAccessSubmissionSubmissionIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1DataAccessSubmissionSubmissionIdUserAccessApprovalRaw(requestParameters, initOverrides) {
        if (requestParameters['submissionId'] == null) {
            throw new runtime.RequiredError('submissionId', 'Required parameter "submissionId" was null or undefined when calling getRepoV1DataAccessSubmissionSubmissionIdUserAccessApproval().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessSubmission/{submissionId}/userAccessApproval`;
        urlPath = urlPath.replace(`{${"submissionId"}}`, encodeURIComponent(String(requestParameters['submissionId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => AccessApprovalFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1DataAccessSubmissionSubmissionIdUserAccessApproval(requestParameters, initOverrides) {
        const response = await this.getRepoV1DataAccessSubmissionSubmissionIdUserAccessApprovalRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1DataAccessSubmissionThreadThreadIdRaw(requestParameters, initOverrides) {
        if (requestParameters['threadId'] == null) {
            throw new runtime.RequiredError('threadId', 'Required parameter "threadId" was null or undefined when calling getRepoV1DataAccessSubmissionThreadThreadId().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessSubmission/thread/{threadId}`;
        urlPath = urlPath.replace(`{${"threadId"}}`, encodeURIComponent(String(requestParameters['threadId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => DataaccessSubmissionFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1DataAccessSubmissionThreadThreadId(requestParameters, initOverrides) {
        const response = await this.getRepoV1DataAccessSubmissionThreadThreadIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EDucTemplateTemplateIdValidationRaw(requestParameters, initOverrides) {
        if (requestParameters['templateId'] == null) {
            throw new runtime.RequiredError('templateId', 'Required parameter "templateId" was null or undefined when calling getRepoV1EDucTemplateTemplateIdValidation().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/eDuc/template/{templateId}/validation`;
        urlPath = urlPath.replace(`{${"templateId"}}`, encodeURIComponent(String(requestParameters['templateId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => EDucTemplateValidationResultFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EDucTemplateTemplateIdValidation(requestParameters, initOverrides) {
        const response = await this.getRepoV1EDucTemplateTemplateIdValidationRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1AccessRequirementRequirementIdApprovedSubmissionInfoRaw(requestParameters, initOverrides) {
        if (requestParameters['requirementId'] == null) {
            throw new runtime.RequiredError('requirementId', 'Required parameter "requirementId" was null or undefined when calling postRepoV1AccessRequirementRequirementIdApprovedSubmissionInfo().');
        }
        if (requestParameters['submissionInfoPageRequest'] == null) {
            throw new runtime.RequiredError('submissionInfoPageRequest', 'Required parameter "submissionInfoPageRequest" was null or undefined when calling postRepoV1AccessRequirementRequirementIdApprovedSubmissionInfo().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/accessRequirement/{requirementId}/approvedSubmissionInfo`;
        urlPath = urlPath.replace(`{${"requirementId"}}`, encodeURIComponent(String(requestParameters['requirementId'])));
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SubmissionInfoPageRequestToJSON(requestParameters['submissionInfoPageRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => SubmissionInfoPageFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1AccessRequirementRequirementIdApprovedSubmissionInfo(requestParameters, initOverrides) {
        const response = await this.postRepoV1AccessRequirementRequirementIdApprovedSubmissionInfoRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1AccessRequirementRequirementIdSubmissionsRaw(requestParameters, initOverrides) {
        if (requestParameters['requirementId'] == null) {
            throw new runtime.RequiredError('requirementId', 'Required parameter "requirementId" was null or undefined when calling postRepoV1AccessRequirementRequirementIdSubmissions().');
        }
        if (requestParameters['submissionPageRequest'] == null) {
            throw new runtime.RequiredError('submissionPageRequest', 'Required parameter "submissionPageRequest" was null or undefined when calling postRepoV1AccessRequirementRequirementIdSubmissions().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/accessRequirement/{requirementId}/submissions`;
        urlPath = urlPath.replace(`{${"requirementId"}}`, encodeURIComponent(String(requestParameters['requirementId'])));
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SubmissionPageRequestToJSON(requestParameters['submissionPageRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => SubmissionPageFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1AccessRequirementRequirementIdSubmissions(requestParameters, initOverrides) {
        const response = await this.postRepoV1AccessRequirementRequirementIdSubmissionsRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1DataAccessRequestRaw(requestParameters, initOverrides) {
        if (requestParameters['requestInterface'] == null) {
            throw new runtime.RequiredError('requestInterface', 'Required parameter "requestInterface" was null or undefined when calling postRepoV1DataAccessRequest().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessRequest`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: RequestInterfaceToJSON(requestParameters['requestInterface']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => RequestInterfaceFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1DataAccessRequest(requestParameters, initOverrides) {
        const response = await this.postRepoV1DataAccessRequestRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1DataAccessRequestListRaw(requestParameters, initOverrides) {
        if (requestParameters['accessRequestListRequest'] == null) {
            throw new runtime.RequiredError('accessRequestListRequest', 'Required parameter "accessRequestListRequest" was null or undefined when calling postRepoV1DataAccessRequestList().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessRequest/list`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: AccessRequestListRequestToJSON(requestParameters['accessRequestListRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => AccessRequestListFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1DataAccessRequestList(requestParameters, initOverrides) {
        const response = await this.postRepoV1DataAccessRequestListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1DataAccessRequestRequestIdSignatureRaw(requestParameters, initOverrides) {
        if (requestParameters['requestId'] == null) {
            throw new runtime.RequiredError('requestId', 'Required parameter "requestId" was null or undefined when calling postRepoV1DataAccessRequestRequestIdSignature().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessRequest/{requestId}/signature`;
        urlPath = urlPath.replace(`{${"requestId"}}`, encodeURIComponent(String(requestParameters['requestId'])));
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => EDucSignatureQuotaFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1DataAccessRequestRequestIdSignature(requestParameters, initOverrides) {
        const response = await this.postRepoV1DataAccessRequestRequestIdSignatureRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1DataAccessRequestRequestIdSubmissionRaw(requestParameters, initOverrides) {
        if (requestParameters['requestId'] == null) {
            throw new runtime.RequiredError('requestId', 'Required parameter "requestId" was null or undefined when calling postRepoV1DataAccessRequestRequestIdSubmission().');
        }
        if (requestParameters['createSubmissionRequest'] == null) {
            throw new runtime.RequiredError('createSubmissionRequest', 'Required parameter "createSubmissionRequest" was null or undefined when calling postRepoV1DataAccessRequestRequestIdSubmission().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessRequest/{requestId}/submission`;
        urlPath = urlPath.replace(`{${"requestId"}}`, encodeURIComponent(String(requestParameters['requestId'])));
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: CreateSubmissionRequestToJSON(requestParameters['createSubmissionRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => DataaccessSubmissionStatusFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1DataAccessRequestRequestIdSubmission(requestParameters, initOverrides) {
        const response = await this.postRepoV1DataAccessRequestRequestIdSubmissionRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1DataAccessSubmissionSearchRaw(requestParameters, initOverrides) {
        if (requestParameters['submissionSearchRequest'] == null) {
            throw new runtime.RequiredError('submissionSearchRequest', 'Required parameter "submissionSearchRequest" was null or undefined when calling postRepoV1DataAccessSubmissionSearch().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessSubmission/search`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SubmissionSearchRequestToJSON(requestParameters['submissionSearchRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => SubmissionSearchResponseFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1DataAccessSubmissionSearch(requestParameters, initOverrides) {
        const response = await this.postRepoV1DataAccessSubmissionSearchRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1DataAccessSubmissionUserRequestsRaw(requestParameters, initOverrides) {
        if (requestParameters['userSubmissionSearchRequest'] == null) {
            throw new runtime.RequiredError('userSubmissionSearchRequest', 'Required parameter "userSubmissionSearchRequest" was null or undefined when calling postRepoV1DataAccessSubmissionUserRequests().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessSubmission/userRequests`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: UserSubmissionSearchRequestToJSON(requestParameters['userSubmissionSearchRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => UserSubmissionSearchResponseFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1DataAccessSubmissionUserRequests(requestParameters, initOverrides) {
        const response = await this.postRepoV1DataAccessSubmissionUserRequestsRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1EDucTemplateRaw(requestParameters, initOverrides) {
        if (requestParameters['eDucTemplateListRequest'] == null) {
            throw new runtime.RequiredError('eDucTemplateListRequest', 'Required parameter "eDucTemplateListRequest" was null or undefined when calling postRepoV1EDucTemplate().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/eDuc/template`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: EDucTemplateListRequestToJSON(requestParameters['eDucTemplateListRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => EDucTemplatePageFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1EDucTemplate(requestParameters, initOverrides) {
        const response = await this.postRepoV1EDucTemplateRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1ResearchProjectRaw(requestParameters, initOverrides) {
        if (requestParameters['researchProject'] == null) {
            throw new runtime.RequiredError('researchProject', 'Required parameter "researchProject" was null or undefined when calling postRepoV1ResearchProject().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/researchProject`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: ResearchProjectToJSON(requestParameters['researchProject']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => ResearchProjectFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1ResearchProject(requestParameters, initOverrides) {
        const response = await this.postRepoV1ResearchProjectRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1RestrictionInformationRaw(requestParameters, initOverrides) {
        if (requestParameters['restrictionInformationRequest'] == null) {
            throw new runtime.RequiredError('restrictionInformationRequest', 'Required parameter "restrictionInformationRequest" was null or undefined when calling postRepoV1RestrictionInformation().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/restrictionInformation`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: RestrictionInformationRequestToJSON(requestParameters['restrictionInformationRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => RestrictionInformationResponseFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1RestrictionInformation(requestParameters, initOverrides) {
        const response = await this.postRepoV1RestrictionInformationRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1RestrictionInformationBatchRaw(requestParameters, initOverrides) {
        if (requestParameters['restrictionInformationBatchRequest'] == null) {
            throw new runtime.RequiredError('restrictionInformationBatchRequest', 'Required parameter "restrictionInformationBatchRequest" was null or undefined when calling postRepoV1RestrictionInformationBatch().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/restrictionInformation/batch`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: RestrictionInformationBatchRequestToJSON(requestParameters['restrictionInformationBatchRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => RestrictionInformationBatchResponseFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1RestrictionInformationBatch(requestParameters, initOverrides) {
        const response = await this.postRepoV1RestrictionInformationBatchRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1DataAccessSubmissionSubmissionIdRaw(requestParameters, initOverrides) {
        if (requestParameters['submissionId'] == null) {
            throw new runtime.RequiredError('submissionId', 'Required parameter "submissionId" was null or undefined when calling putRepoV1DataAccessSubmissionSubmissionId().');
        }
        if (requestParameters['submissionStateChangeRequest'] == null) {
            throw new runtime.RequiredError('submissionStateChangeRequest', 'Required parameter "submissionStateChangeRequest" was null or undefined when calling putRepoV1DataAccessSubmissionSubmissionId().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessSubmission/{submissionId}`;
        urlPath = urlPath.replace(`{${"submissionId"}}`, encodeURIComponent(String(requestParameters['submissionId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: SubmissionStateChangeRequestToJSON(requestParameters['submissionStateChangeRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => DataaccessSubmissionFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1DataAccessSubmissionSubmissionId(requestParameters, initOverrides) {
        const response = await this.putRepoV1DataAccessSubmissionSubmissionIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1DataAccessSubmissionSubmissionIdCancellationRaw(requestParameters, initOverrides) {
        if (requestParameters['submissionId'] == null) {
            throw new runtime.RequiredError('submissionId', 'Required parameter "submissionId" was null or undefined when calling putRepoV1DataAccessSubmissionSubmissionIdCancellation().');
        }
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/dataAccessSubmission/{submissionId}/cancellation`;
        urlPath = urlPath.replace(`{${"submissionId"}}`, encodeURIComponent(String(requestParameters['submissionId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => DataaccessSubmissionStatusFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1DataAccessSubmissionSubmissionIdCancellation(requestParameters, initOverrides) {
        const response = await this.putRepoV1DataAccessSubmissionSubmissionIdCancellationRaw(requestParameters, initOverrides);
        return await response.value();
    }
}
//# sourceMappingURL=DataAccessServicesApi.js.map