/* 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 { AccessControlListFromJSON, AccessControlListToJSON, BatchUploadResponseFromJSON, EvaluationFromJSON, EvaluationToJSON, EvaluationRoundFromJSON, EvaluationRoundToJSON, EvaluationRoundListRequestToJSON, EvaluationRoundListResponseFromJSON, ModelSubmissionFromJSON, ModelSubmissionToJSON, ModelSubmissionStatusFromJSON, ModelSubmissionStatusToJSON, PaginatedResultsOfEvaluationFromJSON, PaginatedResultsOfSubmissionFromJSON, PaginatedResultsOfSubmissionBundleFromJSON, PaginatedResultsOfSubmissionStatusFromJSON, SubmissionContributorFromJSON, SubmissionContributorToJSON, SubmissionStatusBatchToJSON, TeamSubmissionEligibilityFromJSON, UserEvaluationPermissionsFromJSON, } from '../models/index';
/**
 *
 */
export class EvaluationServicesApi extends runtime.BaseAPI {
    /**
     */
    async deleteRepoV1EvaluationEvalIdRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling deleteRepoV1EvaluationEvalId().');
        }
        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/evaluation/{evalId}`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     */
    async deleteRepoV1EvaluationEvalId(requestParameters, initOverrides) {
        await this.deleteRepoV1EvaluationEvalIdRaw(requestParameters, initOverrides);
    }
    /**
     */
    async deleteRepoV1EvaluationEvalIdRoundRoundIdRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling deleteRepoV1EvaluationEvalIdRoundRoundId().');
        }
        if (requestParameters['roundId'] == null) {
            throw new runtime.RequiredError('roundId', 'Required parameter "roundId" was null or undefined when calling deleteRepoV1EvaluationEvalIdRoundRoundId().');
        }
        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/evaluation/{evalId}/round/{roundId}`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        urlPath = urlPath.replace(`{${"roundId"}}`, encodeURIComponent(String(requestParameters['roundId'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     */
    async deleteRepoV1EvaluationEvalIdRoundRoundId(requestParameters, initOverrides) {
        await this.deleteRepoV1EvaluationEvalIdRoundRoundIdRaw(requestParameters, initOverrides);
    }
    /**
     */
    async deleteRepoV1EvaluationSubmissionSubIdRaw(requestParameters, initOverrides) {
        if (requestParameters['subId'] == null) {
            throw new runtime.RequiredError('subId', 'Required parameter "subId" was null or undefined when calling deleteRepoV1EvaluationSubmissionSubId().');
        }
        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/evaluation/submission/{subId}`;
        urlPath = urlPath.replace(`{${"subId"}}`, encodeURIComponent(String(requestParameters['subId'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     */
    async deleteRepoV1EvaluationSubmissionSubId(requestParameters, initOverrides) {
        await this.deleteRepoV1EvaluationSubmissionSubIdRaw(requestParameters, initOverrides);
    }
    /**
     */
    async getRepoV1EntityIdEvaluationRaw(requestParameters, initOverrides) {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getRepoV1EntityIdEvaluation().');
        }
        const queryParameters = {};
        if (requestParameters['accessType'] != null) {
            queryParameters['accessType'] = requestParameters['accessType'];
        }
        if (requestParameters['activeOnly'] != null) {
            queryParameters['activeOnly'] = requestParameters['activeOnly'];
        }
        if (requestParameters['evaluationIds'] != null) {
            queryParameters['evaluationIds'] = requestParameters['evaluationIds'];
        }
        if (requestParameters['offset'] != null) {
            queryParameters['offset'] = requestParameters['offset'];
        }
        if (requestParameters['limit'] != null) {
            queryParameters['limit'] = requestParameters['limit'];
        }
        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/entity/{id}/evaluation`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResultsOfEvaluationFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EntityIdEvaluation(requestParameters, initOverrides) {
        const response = await this.getRepoV1EntityIdEvaluationRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationRaw(requestParameters, initOverrides) {
        const queryParameters = {};
        if (requestParameters['accessType'] != null) {
            queryParameters['accessType'] = requestParameters['accessType'];
        }
        if (requestParameters['activeOnly'] != null) {
            queryParameters['activeOnly'] = requestParameters['activeOnly'];
        }
        if (requestParameters['evaluationIds'] != null) {
            queryParameters['evaluationIds'] = requestParameters['evaluationIds'];
        }
        if (requestParameters['offset'] != null) {
            queryParameters['offset'] = requestParameters['offset'];
        }
        if (requestParameters['limit'] != null) {
            queryParameters['limit'] = requestParameters['limit'];
        }
        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/evaluation`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResultsOfEvaluationFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1Evaluation(requestParameters = {}, initOverrides) {
        const response = await this.getRepoV1EvaluationRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationAvailableRaw(requestParameters, initOverrides) {
        const queryParameters = {};
        if (requestParameters['activeOnly'] != null) {
            queryParameters['activeOnly'] = requestParameters['activeOnly'];
        }
        if (requestParameters['evaluationIds'] != null) {
            queryParameters['evaluationIds'] = requestParameters['evaluationIds'];
        }
        if (requestParameters['offset'] != null) {
            queryParameters['offset'] = requestParameters['offset'];
        }
        if (requestParameters['limit'] != null) {
            queryParameters['limit'] = requestParameters['limit'];
        }
        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/evaluation/available`;
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResultsOfEvaluationFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationAvailable(requestParameters = {}, initOverrides) {
        const response = await this.getRepoV1EvaluationAvailableRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationEvalIdRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling getRepoV1EvaluationEvalId().');
        }
        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/evaluation/{evalId}`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => EvaluationFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationEvalId(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationEvalIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationEvalIdAccessRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling getRepoV1EvaluationEvalIdAccess().');
        }
        if (requestParameters['accessType'] == null) {
            throw new runtime.RequiredError('accessType', 'Required parameter "accessType" was null or undefined when calling getRepoV1EvaluationEvalIdAccess().');
        }
        const queryParameters = {};
        if (requestParameters['accessType'] != null) {
            queryParameters['accessType'] = requestParameters['accessType'];
        }
        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/evaluation/{evalId}/access`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        if (this.isJsonMime(response.headers.get('content-type'))) {
            return new runtime.JSONApiResponse(response);
        }
        else {
            return new runtime.TextApiResponse(response);
        }
    }
    /**
     */
    async getRepoV1EvaluationEvalIdAccess(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationEvalIdAccessRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationEvalIdAclRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling getRepoV1EvaluationEvalIdAcl().');
        }
        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/evaluation/{evalId}/acl`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => AccessControlListFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationEvalIdAcl(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationEvalIdAclRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationEvalIdPermissionsRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling getRepoV1EvaluationEvalIdPermissions().');
        }
        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/evaluation/{evalId}/permissions`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => UserEvaluationPermissionsFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationEvalIdPermissions(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationEvalIdPermissionsRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationEvalIdRoundRoundIdRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling getRepoV1EvaluationEvalIdRoundRoundId().');
        }
        if (requestParameters['roundId'] == null) {
            throw new runtime.RequiredError('roundId', 'Required parameter "roundId" was null or undefined when calling getRepoV1EvaluationEvalIdRoundRoundId().');
        }
        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/evaluation/{evalId}/round/{roundId}`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        urlPath = urlPath.replace(`{${"roundId"}}`, encodeURIComponent(String(requestParameters['roundId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => EvaluationRoundFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationEvalIdRoundRoundId(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationEvalIdRoundRoundIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationEvalIdSubmissionRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling getRepoV1EvaluationEvalIdSubmission().');
        }
        const queryParameters = {};
        if (requestParameters['offset'] != null) {
            queryParameters['offset'] = requestParameters['offset'];
        }
        if (requestParameters['limit'] != null) {
            queryParameters['limit'] = requestParameters['limit'];
        }
        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/evaluation/{evalId}/submission`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResultsOfSubmissionFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationEvalIdSubmission(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationEvalIdSubmissionRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationEvalIdSubmissionAllRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling getRepoV1EvaluationEvalIdSubmissionAll().');
        }
        if (requestParameters['status'] == null) {
            throw new runtime.RequiredError('status', 'Required parameter "status" was null or undefined when calling getRepoV1EvaluationEvalIdSubmissionAll().');
        }
        const queryParameters = {};
        if (requestParameters['offset'] != null) {
            queryParameters['offset'] = requestParameters['offset'];
        }
        if (requestParameters['limit'] != null) {
            queryParameters['limit'] = requestParameters['limit'];
        }
        if (requestParameters['status'] != null) {
            queryParameters['status'] = requestParameters['status'];
        }
        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/evaluation/{evalId}/submission/all`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResultsOfSubmissionFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationEvalIdSubmissionAll(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationEvalIdSubmissionAllRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationEvalIdSubmissionBundleRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling getRepoV1EvaluationEvalIdSubmissionBundle().');
        }
        const queryParameters = {};
        if (requestParameters['offset'] != null) {
            queryParameters['offset'] = requestParameters['offset'];
        }
        if (requestParameters['limit'] != null) {
            queryParameters['limit'] = requestParameters['limit'];
        }
        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/evaluation/{evalId}/submission/bundle`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResultsOfSubmissionBundleFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationEvalIdSubmissionBundle(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationEvalIdSubmissionBundleRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationEvalIdSubmissionBundleAllRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling getRepoV1EvaluationEvalIdSubmissionBundleAll().');
        }
        if (requestParameters['status'] == null) {
            throw new runtime.RequiredError('status', 'Required parameter "status" was null or undefined when calling getRepoV1EvaluationEvalIdSubmissionBundleAll().');
        }
        const queryParameters = {};
        if (requestParameters['offset'] != null) {
            queryParameters['offset'] = requestParameters['offset'];
        }
        if (requestParameters['limit'] != null) {
            queryParameters['limit'] = requestParameters['limit'];
        }
        if (requestParameters['status'] != null) {
            queryParameters['status'] = requestParameters['status'];
        }
        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/evaluation/{evalId}/submission/bundle/all`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResultsOfSubmissionBundleFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationEvalIdSubmissionBundleAll(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationEvalIdSubmissionBundleAllRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationEvalIdSubmissionCountRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling getRepoV1EvaluationEvalIdSubmissionCount().');
        }
        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/evaluation/{evalId}/submission/count`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        if (this.isJsonMime(response.headers.get('content-type'))) {
            return new runtime.JSONApiResponse(response);
        }
        else {
            return new runtime.TextApiResponse(response);
        }
    }
    /**
     */
    async getRepoV1EvaluationEvalIdSubmissionCount(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationEvalIdSubmissionCountRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationEvalIdSubmissionStatusAllRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling getRepoV1EvaluationEvalIdSubmissionStatusAll().');
        }
        if (requestParameters['status'] == null) {
            throw new runtime.RequiredError('status', 'Required parameter "status" was null or undefined when calling getRepoV1EvaluationEvalIdSubmissionStatusAll().');
        }
        const queryParameters = {};
        if (requestParameters['offset'] != null) {
            queryParameters['offset'] = requestParameters['offset'];
        }
        if (requestParameters['limit'] != null) {
            queryParameters['limit'] = requestParameters['limit'];
        }
        if (requestParameters['status'] != null) {
            queryParameters['status'] = requestParameters['status'];
        }
        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/evaluation/{evalId}/submission/status/all`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResultsOfSubmissionStatusFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationEvalIdSubmissionStatusAll(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationEvalIdSubmissionStatusAllRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationEvalIdTeamIdSubmissionEligibilityRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling getRepoV1EvaluationEvalIdTeamIdSubmissionEligibility().');
        }
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getRepoV1EvaluationEvalIdTeamIdSubmissionEligibility().');
        }
        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/evaluation/{evalId}/team/{id}/submissionEligibility`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => TeamSubmissionEligibilityFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationEvalIdTeamIdSubmissionEligibility(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationEvalIdTeamIdSubmissionEligibilityRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationNameNameRaw(requestParameters, initOverrides) {
        if (requestParameters['name'] == null) {
            throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling getRepoV1EvaluationNameName().');
        }
        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/evaluation/name/{name}`;
        urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => EvaluationFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationNameName(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationNameNameRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationSubmissionSubIdRaw(requestParameters, initOverrides) {
        if (requestParameters['subId'] == null) {
            throw new runtime.RequiredError('subId', 'Required parameter "subId" was null or undefined when calling getRepoV1EvaluationSubmissionSubId().');
        }
        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/evaluation/submission/{subId}`;
        urlPath = urlPath.replace(`{${"subId"}}`, encodeURIComponent(String(requestParameters['subId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => ModelSubmissionFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationSubmissionSubId(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationSubmissionSubIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationSubmissionSubIdFileFileHandleIdRaw(requestParameters, initOverrides) {
        if (requestParameters['subId'] == null) {
            throw new runtime.RequiredError('subId', 'Required parameter "subId" was null or undefined when calling getRepoV1EvaluationSubmissionSubIdFileFileHandleId().');
        }
        if (requestParameters['fileHandleId'] == null) {
            throw new runtime.RequiredError('fileHandleId', 'Required parameter "fileHandleId" was null or undefined when calling getRepoV1EvaluationSubmissionSubIdFileFileHandleId().');
        }
        const queryParameters = {};
        if (requestParameters['redirect'] != null) {
            queryParameters['redirect'] = requestParameters['redirect'];
        }
        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/evaluation/submission/{subId}/file/{fileHandleId}`;
        urlPath = urlPath.replace(`{${"subId"}}`, encodeURIComponent(String(requestParameters['subId'])));
        urlPath = urlPath.replace(`{${"fileHandleId"}}`, encodeURIComponent(String(requestParameters['fileHandleId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        if (this.isJsonMime(response.headers.get('content-type'))) {
            return new runtime.JSONApiResponse(response);
        }
        else {
            return new runtime.TextApiResponse(response);
        }
    }
    /**
     */
    async getRepoV1EvaluationSubmissionSubIdFileFileHandleId(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationSubmissionSubIdFileFileHandleIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationSubmissionSubIdStatusRaw(requestParameters, initOverrides) {
        if (requestParameters['subId'] == null) {
            throw new runtime.RequiredError('subId', 'Required parameter "subId" was null or undefined when calling getRepoV1EvaluationSubmissionSubIdStatus().');
        }
        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/evaluation/submission/{subId}/status`;
        urlPath = urlPath.replace(`{${"subId"}}`, encodeURIComponent(String(requestParameters['subId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => ModelSubmissionStatusFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationSubmissionSubIdStatus(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationSubmissionSubIdStatusRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1AdminEvaluationSubmissionSubIdContributorRaw(requestParameters, initOverrides) {
        if (requestParameters['subId'] == null) {
            throw new runtime.RequiredError('subId', 'Required parameter "subId" was null or undefined when calling postRepoV1AdminEvaluationSubmissionSubIdContributor().');
        }
        if (requestParameters['submissionContributor'] == null) {
            throw new runtime.RequiredError('submissionContributor', 'Required parameter "submissionContributor" was null or undefined when calling postRepoV1AdminEvaluationSubmissionSubIdContributor().');
        }
        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/admin/evaluation/submission/{subId}/contributor`;
        urlPath = urlPath.replace(`{${"subId"}}`, encodeURIComponent(String(requestParameters['subId'])));
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SubmissionContributorToJSON(requestParameters['submissionContributor']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => SubmissionContributorFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1AdminEvaluationSubmissionSubIdContributor(requestParameters, initOverrides) {
        const response = await this.postRepoV1AdminEvaluationSubmissionSubIdContributorRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1EvaluationRaw(requestParameters, initOverrides) {
        if (requestParameters['evaluation'] == null) {
            throw new runtime.RequiredError('evaluation', 'Required parameter "evaluation" was null or undefined when calling postRepoV1Evaluation().');
        }
        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/evaluation`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: EvaluationToJSON(requestParameters['evaluation']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => EvaluationFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1Evaluation(requestParameters, initOverrides) {
        const response = await this.postRepoV1EvaluationRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1EvaluationEvalIdMigratequotaRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling postRepoV1EvaluationEvalIdMigratequota().');
        }
        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/evaluation/{evalId}/migratequota`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     */
    async postRepoV1EvaluationEvalIdMigratequota(requestParameters, initOverrides) {
        await this.postRepoV1EvaluationEvalIdMigratequotaRaw(requestParameters, initOverrides);
    }
    /**
     */
    async postRepoV1EvaluationEvalIdRoundRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling postRepoV1EvaluationEvalIdRound().');
        }
        if (requestParameters['evaluationRound'] == null) {
            throw new runtime.RequiredError('evaluationRound', 'Required parameter "evaluationRound" was null or undefined when calling postRepoV1EvaluationEvalIdRound().');
        }
        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/evaluation/{evalId}/round`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: EvaluationRoundToJSON(requestParameters['evaluationRound']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => EvaluationRoundFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1EvaluationEvalIdRound(requestParameters, initOverrides) {
        const response = await this.postRepoV1EvaluationEvalIdRoundRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1EvaluationEvalIdRoundListRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling postRepoV1EvaluationEvalIdRoundList().');
        }
        if (requestParameters['evaluationRoundListRequest'] == null) {
            throw new runtime.RequiredError('evaluationRoundListRequest', 'Required parameter "evaluationRoundListRequest" was null or undefined when calling postRepoV1EvaluationEvalIdRoundList().');
        }
        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/evaluation/{evalId}/round/list`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: EvaluationRoundListRequestToJSON(requestParameters['evaluationRoundListRequest']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => EvaluationRoundListResponseFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1EvaluationEvalIdRoundList(requestParameters, initOverrides) {
        const response = await this.postRepoV1EvaluationEvalIdRoundListRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1EvaluationSubmissionRaw(requestParameters, initOverrides) {
        if (requestParameters['challengeEndpoint'] == null) {
            throw new runtime.RequiredError('challengeEndpoint', 'Required parameter "challengeEndpoint" was null or undefined when calling postRepoV1EvaluationSubmission().');
        }
        if (requestParameters['notificationUnsubscribeEndpoint'] == null) {
            throw new runtime.RequiredError('notificationUnsubscribeEndpoint', 'Required parameter "notificationUnsubscribeEndpoint" was null or undefined when calling postRepoV1EvaluationSubmission().');
        }
        if (requestParameters['modelSubmission'] == null) {
            throw new runtime.RequiredError('modelSubmission', 'Required parameter "modelSubmission" was null or undefined when calling postRepoV1EvaluationSubmission().');
        }
        const queryParameters = {};
        if (requestParameters['etag'] != null) {
            queryParameters['etag'] = requestParameters['etag'];
        }
        if (requestParameters['submissionEligibilityHash'] != null) {
            queryParameters['submissionEligibilityHash'] = requestParameters['submissionEligibilityHash'];
        }
        if (requestParameters['challengeEndpoint'] != null) {
            queryParameters['challengeEndpoint'] = requestParameters['challengeEndpoint'];
        }
        if (requestParameters['notificationUnsubscribeEndpoint'] != null) {
            queryParameters['notificationUnsubscribeEndpoint'] = requestParameters['notificationUnsubscribeEndpoint'];
        }
        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/evaluation/submission`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: ModelSubmissionToJSON(requestParameters['modelSubmission']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => ModelSubmissionFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1EvaluationSubmission(requestParameters, initOverrides) {
        const response = await this.postRepoV1EvaluationSubmissionRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1EvaluationAclRaw(requestParameters, initOverrides) {
        if (requestParameters['accessControlList'] == null) {
            throw new runtime.RequiredError('accessControlList', 'Required parameter "accessControlList" was null or undefined when calling putRepoV1EvaluationAcl().');
        }
        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/evaluation/acl`;
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: AccessControlListToJSON(requestParameters['accessControlList']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => AccessControlListFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1EvaluationAcl(requestParameters, initOverrides) {
        const response = await this.putRepoV1EvaluationAclRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1EvaluationEvalIdRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling putRepoV1EvaluationEvalId().');
        }
        if (requestParameters['evaluation'] == null) {
            throw new runtime.RequiredError('evaluation', 'Required parameter "evaluation" was null or undefined when calling putRepoV1EvaluationEvalId().');
        }
        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/evaluation/{evalId}`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: EvaluationToJSON(requestParameters['evaluation']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => EvaluationFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1EvaluationEvalId(requestParameters, initOverrides) {
        const response = await this.putRepoV1EvaluationEvalIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1EvaluationEvalIdRoundRoundIdRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling putRepoV1EvaluationEvalIdRoundRoundId().');
        }
        if (requestParameters['roundId'] == null) {
            throw new runtime.RequiredError('roundId', 'Required parameter "roundId" was null or undefined when calling putRepoV1EvaluationEvalIdRoundRoundId().');
        }
        if (requestParameters['evaluationRound'] == null) {
            throw new runtime.RequiredError('evaluationRound', 'Required parameter "evaluationRound" was null or undefined when calling putRepoV1EvaluationEvalIdRoundRoundId().');
        }
        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/evaluation/{evalId}/round/{roundId}`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        urlPath = urlPath.replace(`{${"roundId"}}`, encodeURIComponent(String(requestParameters['roundId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: EvaluationRoundToJSON(requestParameters['evaluationRound']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => EvaluationRoundFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1EvaluationEvalIdRoundRoundId(requestParameters, initOverrides) {
        const response = await this.putRepoV1EvaluationEvalIdRoundRoundIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1EvaluationEvalIdStatusBatchRaw(requestParameters, initOverrides) {
        if (requestParameters['evalId'] == null) {
            throw new runtime.RequiredError('evalId', 'Required parameter "evalId" was null or undefined when calling putRepoV1EvaluationEvalIdStatusBatch().');
        }
        if (requestParameters['submissionStatusBatch'] == null) {
            throw new runtime.RequiredError('submissionStatusBatch', 'Required parameter "submissionStatusBatch" was null or undefined when calling putRepoV1EvaluationEvalIdStatusBatch().');
        }
        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/evaluation/{evalId}/statusBatch`;
        urlPath = urlPath.replace(`{${"evalId"}}`, encodeURIComponent(String(requestParameters['evalId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: SubmissionStatusBatchToJSON(requestParameters['submissionStatusBatch']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => BatchUploadResponseFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1EvaluationEvalIdStatusBatch(requestParameters, initOverrides) {
        const response = await this.putRepoV1EvaluationEvalIdStatusBatchRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1EvaluationSubmissionSubIdCancellationRaw(requestParameters, initOverrides) {
        if (requestParameters['subId'] == null) {
            throw new runtime.RequiredError('subId', 'Required parameter "subId" was null or undefined when calling putRepoV1EvaluationSubmissionSubIdCancellation().');
        }
        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/evaluation/submission/{subId}/cancellation`;
        urlPath = urlPath.replace(`{${"subId"}}`, encodeURIComponent(String(requestParameters['subId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     */
    async putRepoV1EvaluationSubmissionSubIdCancellation(requestParameters, initOverrides) {
        await this.putRepoV1EvaluationSubmissionSubIdCancellationRaw(requestParameters, initOverrides);
    }
    /**
     */
    async putRepoV1EvaluationSubmissionSubIdStatusRaw(requestParameters, initOverrides) {
        if (requestParameters['subId'] == null) {
            throw new runtime.RequiredError('subId', 'Required parameter "subId" was null or undefined when calling putRepoV1EvaluationSubmissionSubIdStatus().');
        }
        if (requestParameters['modelSubmissionStatus'] == null) {
            throw new runtime.RequiredError('modelSubmissionStatus', 'Required parameter "modelSubmissionStatus" was null or undefined when calling putRepoV1EvaluationSubmissionSubIdStatus().');
        }
        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/evaluation/submission/{subId}/status`;
        urlPath = urlPath.replace(`{${"subId"}}`, encodeURIComponent(String(requestParameters['subId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: ModelSubmissionStatusToJSON(requestParameters['modelSubmissionStatus']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => ModelSubmissionStatusFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1EvaluationSubmissionSubIdStatus(requestParameters, initOverrides) {
        const response = await this.putRepoV1EvaluationSubmissionSubIdStatusRaw(requestParameters, initOverrides);
        return await response.value();
    }
}
//# sourceMappingURL=EvaluationServicesApi.js.map