/* 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 { FileHandleResultsFromJSON, PaginatedResultsOfV2WikiHeaderFromJSON, PaginatedResultsOfV2WikiHistorySnapshotFromJSON, V2WikiOrderHintFromJSON, V2WikiOrderHintToJSON, V2WikiPageFromJSON, V2WikiPageToJSON, } from '../models/index';
/**
 *
 */
export class WikiPageServices2Api extends runtime.BaseAPI {
    /**
     */
    async deleteRepoV1AccessRequirementOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling deleteRepoV1AccessRequirementOwnerIdWiki2WikiId().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling deleteRepoV1AccessRequirementOwnerIdWiki2WikiId().');
        }
        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/access_requirement/{ownerId}/wiki2/{wikiId}`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     */
    async deleteRepoV1AccessRequirementOwnerIdWiki2WikiId(requestParameters, initOverrides) {
        await this.deleteRepoV1AccessRequirementOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides);
    }
    /**
     */
    async deleteRepoV1EntityOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling deleteRepoV1EntityOwnerIdWiki2WikiId().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling deleteRepoV1EntityOwnerIdWiki2WikiId().');
        }
        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/entity/{ownerId}/wiki2/{wikiId}`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     */
    async deleteRepoV1EntityOwnerIdWiki2WikiId(requestParameters, initOverrides) {
        await this.deleteRepoV1EntityOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides);
    }
    /**
     */
    async deleteRepoV1EvaluationOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling deleteRepoV1EvaluationOwnerIdWiki2WikiId().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling deleteRepoV1EvaluationOwnerIdWiki2WikiId().');
        }
        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/{ownerId}/wiki2/{wikiId}`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        const response = await this.request({
            path: urlPath,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     */
    async deleteRepoV1EvaluationOwnerIdWiki2WikiId(requestParameters, initOverrides) {
        await this.deleteRepoV1EvaluationOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides);
    }
    /**
     */
    async getRepoV1AccessRequirementOwnerIdWiki2Raw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2().');
        }
        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/access_requirement/{ownerId}/wiki2`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiPageFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1AccessRequirementOwnerIdWiki2(requestParameters, initOverrides) {
        const response = await this.getRepoV1AccessRequirementOwnerIdWiki2Raw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1AccessRequirementOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiId().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiId().');
        }
        const queryParameters = {};
        if (requestParameters['wikiVersion'] != null) {
            queryParameters['wikiVersion'] = requestParameters['wikiVersion'];
        }
        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/access_requirement/{ownerId}/wiki2/{wikiId}`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiPageFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1AccessRequirementOwnerIdWiki2WikiId(requestParameters, initOverrides) {
        const response = await this.getRepoV1AccessRequirementOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachmentRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachment().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachment().');
        }
        if (requestParameters['fileName'] == null) {
            throw new runtime.RequiredError('fileName', 'Required parameter "fileName" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachment().');
        }
        const queryParameters = {};
        if (requestParameters['fileName'] != null) {
            queryParameters['fileName'] = requestParameters['fileName'];
        }
        if (requestParameters['redirect'] != null) {
            queryParameters['redirect'] = requestParameters['redirect'];
        }
        if (requestParameters['wikiVersion'] != null) {
            queryParameters['wikiVersion'] = requestParameters['wikiVersion'];
        }
        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/access_requirement/{ownerId}/wiki2/{wikiId}/attachment`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        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 getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachment(requestParameters, initOverrides) {
        const response = await this.getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachmentRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachmenthandlesRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachmenthandles().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachmenthandles().');
        }
        const queryParameters = {};
        if (requestParameters['wikiVersion'] != null) {
            queryParameters['wikiVersion'] = requestParameters['wikiVersion'];
        }
        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/access_requirement/{ownerId}/wiki2/{wikiId}/attachmenthandles`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => FileHandleResultsFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachmenthandles(requestParameters, initOverrides) {
        const response = await this.getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachmenthandlesRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachmentpreviewRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachmentpreview().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachmentpreview().');
        }
        if (requestParameters['fileName'] == null) {
            throw new runtime.RequiredError('fileName', 'Required parameter "fileName" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachmentpreview().');
        }
        const queryParameters = {};
        if (requestParameters['fileName'] != null) {
            queryParameters['fileName'] = requestParameters['fileName'];
        }
        if (requestParameters['redirect'] != null) {
            queryParameters['redirect'] = requestParameters['redirect'];
        }
        if (requestParameters['wikiVersion'] != null) {
            queryParameters['wikiVersion'] = requestParameters['wikiVersion'];
        }
        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/access_requirement/{ownerId}/wiki2/{wikiId}/attachmentpreview`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        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 getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachmentpreview(requestParameters, initOverrides) {
        const response = await this.getRepoV1AccessRequirementOwnerIdWiki2WikiIdAttachmentpreviewRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1AccessRequirementOwnerIdWiki2WikiIdMarkdownRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiIdMarkdown().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiIdMarkdown().');
        }
        const queryParameters = {};
        if (requestParameters['redirect'] != null) {
            queryParameters['redirect'] = requestParameters['redirect'];
        }
        if (requestParameters['wikiVersion'] != null) {
            queryParameters['wikiVersion'] = requestParameters['wikiVersion'];
        }
        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/access_requirement/{ownerId}/wiki2/{wikiId}/markdown`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        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 getRepoV1AccessRequirementOwnerIdWiki2WikiIdMarkdown(requestParameters, initOverrides) {
        const response = await this.getRepoV1AccessRequirementOwnerIdWiki2WikiIdMarkdownRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1AccessRequirementOwnerIdWiki2WikiIdWikihistoryRaw(requestParameters, initOverrides) {
        if (requestParameters['offset'] == null) {
            throw new runtime.RequiredError('offset', 'Required parameter "offset" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiIdWikihistory().');
        }
        if (requestParameters['limit'] == null) {
            throw new runtime.RequiredError('limit', 'Required parameter "limit" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiIdWikihistory().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiIdWikihistory().');
        }
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWiki2WikiIdWikihistory().');
        }
        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/access_requirement/{ownerId}/wiki2/{wikiId}/wikihistory`;
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResultsOfV2WikiHistorySnapshotFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1AccessRequirementOwnerIdWiki2WikiIdWikihistory(requestParameters, initOverrides) {
        const response = await this.getRepoV1AccessRequirementOwnerIdWiki2WikiIdWikihistoryRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1AccessRequirementOwnerIdWikiheadertree2Raw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1AccessRequirementOwnerIdWikiheadertree2().');
        }
        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/access_requirement/{ownerId}/wikiheadertree2`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResultsOfV2WikiHeaderFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1AccessRequirementOwnerIdWikiheadertree2(requestParameters, initOverrides) {
        const response = await this.getRepoV1AccessRequirementOwnerIdWikiheadertree2Raw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EntityOwnerIdWiki2Raw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EntityOwnerIdWiki2().');
        }
        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/entity/{ownerId}/wiki2`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiPageFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EntityOwnerIdWiki2(requestParameters, initOverrides) {
        const response = await this.getRepoV1EntityOwnerIdWiki2Raw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EntityOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiId().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiId().');
        }
        const queryParameters = {};
        if (requestParameters['wikiVersion'] != null) {
            queryParameters['wikiVersion'] = requestParameters['wikiVersion'];
        }
        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/{ownerId}/wiki2/{wikiId}`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiPageFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EntityOwnerIdWiki2WikiId(requestParameters, initOverrides) {
        const response = await this.getRepoV1EntityOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EntityOwnerIdWiki2WikiIdAttachmentRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiIdAttachment().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiIdAttachment().');
        }
        if (requestParameters['fileName'] == null) {
            throw new runtime.RequiredError('fileName', 'Required parameter "fileName" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiIdAttachment().');
        }
        const queryParameters = {};
        if (requestParameters['fileName'] != null) {
            queryParameters['fileName'] = requestParameters['fileName'];
        }
        if (requestParameters['redirect'] != null) {
            queryParameters['redirect'] = requestParameters['redirect'];
        }
        if (requestParameters['wikiVersion'] != null) {
            queryParameters['wikiVersion'] = requestParameters['wikiVersion'];
        }
        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/{ownerId}/wiki2/{wikiId}/attachment`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        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 getRepoV1EntityOwnerIdWiki2WikiIdAttachment(requestParameters, initOverrides) {
        const response = await this.getRepoV1EntityOwnerIdWiki2WikiIdAttachmentRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EntityOwnerIdWiki2WikiIdAttachmenthandlesRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiIdAttachmenthandles().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiIdAttachmenthandles().');
        }
        const queryParameters = {};
        if (requestParameters['wikiVersion'] != null) {
            queryParameters['wikiVersion'] = requestParameters['wikiVersion'];
        }
        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/{ownerId}/wiki2/{wikiId}/attachmenthandles`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => FileHandleResultsFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EntityOwnerIdWiki2WikiIdAttachmenthandles(requestParameters, initOverrides) {
        const response = await this.getRepoV1EntityOwnerIdWiki2WikiIdAttachmenthandlesRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EntityOwnerIdWiki2WikiIdAttachmentpreviewRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiIdAttachmentpreview().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiIdAttachmentpreview().');
        }
        if (requestParameters['fileName'] == null) {
            throw new runtime.RequiredError('fileName', 'Required parameter "fileName" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiIdAttachmentpreview().');
        }
        const queryParameters = {};
        if (requestParameters['fileName'] != null) {
            queryParameters['fileName'] = requestParameters['fileName'];
        }
        if (requestParameters['redirect'] != null) {
            queryParameters['redirect'] = requestParameters['redirect'];
        }
        if (requestParameters['wikiVersion'] != null) {
            queryParameters['wikiVersion'] = requestParameters['wikiVersion'];
        }
        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/{ownerId}/wiki2/{wikiId}/attachmentpreview`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        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 getRepoV1EntityOwnerIdWiki2WikiIdAttachmentpreview(requestParameters, initOverrides) {
        const response = await this.getRepoV1EntityOwnerIdWiki2WikiIdAttachmentpreviewRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EntityOwnerIdWiki2WikiIdMarkdownRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiIdMarkdown().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiIdMarkdown().');
        }
        const queryParameters = {};
        if (requestParameters['redirect'] != null) {
            queryParameters['redirect'] = requestParameters['redirect'];
        }
        if (requestParameters['wikiVersion'] != null) {
            queryParameters['wikiVersion'] = requestParameters['wikiVersion'];
        }
        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/{ownerId}/wiki2/{wikiId}/markdown`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        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 getRepoV1EntityOwnerIdWiki2WikiIdMarkdown(requestParameters, initOverrides) {
        const response = await this.getRepoV1EntityOwnerIdWiki2WikiIdMarkdownRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EntityOwnerIdWiki2WikiIdWikihistoryRaw(requestParameters, initOverrides) {
        if (requestParameters['offset'] == null) {
            throw new runtime.RequiredError('offset', 'Required parameter "offset" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiIdWikihistory().');
        }
        if (requestParameters['limit'] == null) {
            throw new runtime.RequiredError('limit', 'Required parameter "limit" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiIdWikihistory().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiIdWikihistory().');
        }
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EntityOwnerIdWiki2WikiIdWikihistory().');
        }
        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/entity/{ownerId}/wiki2/{wikiId}/wikihistory`;
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResultsOfV2WikiHistorySnapshotFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EntityOwnerIdWiki2WikiIdWikihistory(requestParameters, initOverrides) {
        const response = await this.getRepoV1EntityOwnerIdWiki2WikiIdWikihistoryRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EntityOwnerIdWiki2orderhintRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EntityOwnerIdWiki2orderhint().');
        }
        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/entity/{ownerId}/wiki2orderhint`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiOrderHintFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EntityOwnerIdWiki2orderhint(requestParameters, initOverrides) {
        const response = await this.getRepoV1EntityOwnerIdWiki2orderhintRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EntityOwnerIdWikiheadertree2Raw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EntityOwnerIdWikiheadertree2().');
        }
        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/entity/{ownerId}/wikiheadertree2`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResultsOfV2WikiHeaderFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EntityOwnerIdWikiheadertree2(requestParameters, initOverrides) {
        const response = await this.getRepoV1EntityOwnerIdWikiheadertree2Raw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationOwnerIdWiki2Raw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2().');
        }
        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/{ownerId}/wiki2`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiPageFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationOwnerIdWiki2(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationOwnerIdWiki2Raw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiId().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiId().');
        }
        const queryParameters = {};
        if (requestParameters['wikiVersion'] != null) {
            queryParameters['wikiVersion'] = requestParameters['wikiVersion'];
        }
        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/{ownerId}/wiki2/{wikiId}`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiPageFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationOwnerIdWiki2WikiId(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationOwnerIdWiki2WikiIdAttachmentRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiIdAttachment().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiIdAttachment().');
        }
        if (requestParameters['fileName'] == null) {
            throw new runtime.RequiredError('fileName', 'Required parameter "fileName" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiIdAttachment().');
        }
        const queryParameters = {};
        if (requestParameters['fileName'] != null) {
            queryParameters['fileName'] = requestParameters['fileName'];
        }
        if (requestParameters['redirect'] != null) {
            queryParameters['redirect'] = requestParameters['redirect'];
        }
        if (requestParameters['wikiVersion'] != null) {
            queryParameters['wikiVersion'] = requestParameters['wikiVersion'];
        }
        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/{ownerId}/wiki2/{wikiId}/attachment`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        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 getRepoV1EvaluationOwnerIdWiki2WikiIdAttachment(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationOwnerIdWiki2WikiIdAttachmentRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationOwnerIdWiki2WikiIdAttachmenthandlesRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiIdAttachmenthandles().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiIdAttachmenthandles().');
        }
        const queryParameters = {};
        if (requestParameters['wikiVersion'] != null) {
            queryParameters['wikiVersion'] = requestParameters['wikiVersion'];
        }
        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/{ownerId}/wiki2/{wikiId}/attachmenthandles`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => FileHandleResultsFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationOwnerIdWiki2WikiIdAttachmenthandles(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationOwnerIdWiki2WikiIdAttachmenthandlesRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationOwnerIdWiki2WikiIdAttachmentpreviewRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiIdAttachmentpreview().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiIdAttachmentpreview().');
        }
        if (requestParameters['fileName'] == null) {
            throw new runtime.RequiredError('fileName', 'Required parameter "fileName" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiIdAttachmentpreview().');
        }
        const queryParameters = {};
        if (requestParameters['fileName'] != null) {
            queryParameters['fileName'] = requestParameters['fileName'];
        }
        if (requestParameters['redirect'] != null) {
            queryParameters['redirect'] = requestParameters['redirect'];
        }
        if (requestParameters['wikiVersion'] != null) {
            queryParameters['wikiVersion'] = requestParameters['wikiVersion'];
        }
        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/{ownerId}/wiki2/{wikiId}/attachmentpreview`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        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 getRepoV1EvaluationOwnerIdWiki2WikiIdAttachmentpreview(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationOwnerIdWiki2WikiIdAttachmentpreviewRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationOwnerIdWiki2WikiIdMarkdownRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiIdMarkdown().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiIdMarkdown().');
        }
        const queryParameters = {};
        if (requestParameters['redirect'] != null) {
            queryParameters['redirect'] = requestParameters['redirect'];
        }
        if (requestParameters['wikiVersion'] != null) {
            queryParameters['wikiVersion'] = requestParameters['wikiVersion'];
        }
        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/{ownerId}/wiki2/{wikiId}/markdown`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        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 getRepoV1EvaluationOwnerIdWiki2WikiIdMarkdown(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationOwnerIdWiki2WikiIdMarkdownRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationOwnerIdWiki2WikiIdWikihistoryRaw(requestParameters, initOverrides) {
        if (requestParameters['offset'] == null) {
            throw new runtime.RequiredError('offset', 'Required parameter "offset" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiIdWikihistory().');
        }
        if (requestParameters['limit'] == null) {
            throw new runtime.RequiredError('limit', 'Required parameter "limit" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiIdWikihistory().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiIdWikihistory().');
        }
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EvaluationOwnerIdWiki2WikiIdWikihistory().');
        }
        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/{ownerId}/wiki2/{wikiId}/wikihistory`;
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResultsOfV2WikiHistorySnapshotFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationOwnerIdWiki2WikiIdWikihistory(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationOwnerIdWiki2WikiIdWikihistoryRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async getRepoV1EvaluationOwnerIdWikiheadertree2Raw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling getRepoV1EvaluationOwnerIdWikiheadertree2().');
        }
        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/{ownerId}/wikiheadertree2`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResultsOfV2WikiHeaderFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EvaluationOwnerIdWikiheadertree2(requestParameters, initOverrides) {
        const response = await this.getRepoV1EvaluationOwnerIdWikiheadertree2Raw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1AccessRequirementOwnerIdWiki2Raw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling postRepoV1AccessRequirementOwnerIdWiki2().');
        }
        if (requestParameters['v2WikiPage'] == null) {
            throw new runtime.RequiredError('v2WikiPage', 'Required parameter "v2WikiPage" was null or undefined when calling postRepoV1AccessRequirementOwnerIdWiki2().');
        }
        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/access_requirement/{ownerId}/wiki2`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: V2WikiPageToJSON(requestParameters['v2WikiPage']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiPageFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1AccessRequirementOwnerIdWiki2(requestParameters, initOverrides) {
        const response = await this.postRepoV1AccessRequirementOwnerIdWiki2Raw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1EntityOwnerIdWiki2Raw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling postRepoV1EntityOwnerIdWiki2().');
        }
        if (requestParameters['v2WikiPage'] == null) {
            throw new runtime.RequiredError('v2WikiPage', 'Required parameter "v2WikiPage" was null or undefined when calling postRepoV1EntityOwnerIdWiki2().');
        }
        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/entity/{ownerId}/wiki2`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: V2WikiPageToJSON(requestParameters['v2WikiPage']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiPageFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1EntityOwnerIdWiki2(requestParameters, initOverrides) {
        const response = await this.postRepoV1EntityOwnerIdWiki2Raw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1EvaluationOwnerIdWiki2Raw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling postRepoV1EvaluationOwnerIdWiki2().');
        }
        if (requestParameters['v2WikiPage'] == null) {
            throw new runtime.RequiredError('v2WikiPage', 'Required parameter "v2WikiPage" was null or undefined when calling postRepoV1EvaluationOwnerIdWiki2().');
        }
        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/{ownerId}/wiki2`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: V2WikiPageToJSON(requestParameters['v2WikiPage']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiPageFromJSON(jsonValue));
    }
    /**
     */
    async postRepoV1EvaluationOwnerIdWiki2(requestParameters, initOverrides) {
        const response = await this.postRepoV1EvaluationOwnerIdWiki2Raw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1AccessRequirementOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling putRepoV1AccessRequirementOwnerIdWiki2WikiId().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling putRepoV1AccessRequirementOwnerIdWiki2WikiId().');
        }
        if (requestParameters['v2WikiPage'] == null) {
            throw new runtime.RequiredError('v2WikiPage', 'Required parameter "v2WikiPage" was null or undefined when calling putRepoV1AccessRequirementOwnerIdWiki2WikiId().');
        }
        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/access_requirement/{ownerId}/wiki2/{wikiId}`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: V2WikiPageToJSON(requestParameters['v2WikiPage']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiPageFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1AccessRequirementOwnerIdWiki2WikiId(requestParameters, initOverrides) {
        const response = await this.putRepoV1AccessRequirementOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1AccessRequirementOwnerIdWiki2WikiIdWikiVersionRaw(requestParameters, initOverrides) {
        if (requestParameters['wikiVersion'] == null) {
            throw new runtime.RequiredError('wikiVersion', 'Required parameter "wikiVersion" was null or undefined when calling putRepoV1AccessRequirementOwnerIdWiki2WikiIdWikiVersion().');
        }
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling putRepoV1AccessRequirementOwnerIdWiki2WikiIdWikiVersion().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling putRepoV1AccessRequirementOwnerIdWiki2WikiIdWikiVersion().');
        }
        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/access_requirement/{ownerId}/wiki2/{wikiId}/{wikiVersion}`;
        urlPath = urlPath.replace(`{${"wikiVersion"}}`, encodeURIComponent(String(requestParameters['wikiVersion'])));
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiPageFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1AccessRequirementOwnerIdWiki2WikiIdWikiVersion(requestParameters, initOverrides) {
        const response = await this.putRepoV1AccessRequirementOwnerIdWiki2WikiIdWikiVersionRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1EntityOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling putRepoV1EntityOwnerIdWiki2WikiId().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling putRepoV1EntityOwnerIdWiki2WikiId().');
        }
        if (requestParameters['v2WikiPage'] == null) {
            throw new runtime.RequiredError('v2WikiPage', 'Required parameter "v2WikiPage" was null or undefined when calling putRepoV1EntityOwnerIdWiki2WikiId().');
        }
        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/entity/{ownerId}/wiki2/{wikiId}`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: V2WikiPageToJSON(requestParameters['v2WikiPage']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiPageFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1EntityOwnerIdWiki2WikiId(requestParameters, initOverrides) {
        const response = await this.putRepoV1EntityOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1EntityOwnerIdWiki2WikiIdWikiVersionRaw(requestParameters, initOverrides) {
        if (requestParameters['wikiVersion'] == null) {
            throw new runtime.RequiredError('wikiVersion', 'Required parameter "wikiVersion" was null or undefined when calling putRepoV1EntityOwnerIdWiki2WikiIdWikiVersion().');
        }
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling putRepoV1EntityOwnerIdWiki2WikiIdWikiVersion().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling putRepoV1EntityOwnerIdWiki2WikiIdWikiVersion().');
        }
        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/entity/{ownerId}/wiki2/{wikiId}/{wikiVersion}`;
        urlPath = urlPath.replace(`{${"wikiVersion"}}`, encodeURIComponent(String(requestParameters['wikiVersion'])));
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiPageFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1EntityOwnerIdWiki2WikiIdWikiVersion(requestParameters, initOverrides) {
        const response = await this.putRepoV1EntityOwnerIdWiki2WikiIdWikiVersionRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1EntityOwnerIdWiki2orderhintRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling putRepoV1EntityOwnerIdWiki2orderhint().');
        }
        if (requestParameters['v2WikiOrderHint'] == null) {
            throw new runtime.RequiredError('v2WikiOrderHint', 'Required parameter "v2WikiOrderHint" was null or undefined when calling putRepoV1EntityOwnerIdWiki2orderhint().');
        }
        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/entity/{ownerId}/wiki2orderhint`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: V2WikiOrderHintToJSON(requestParameters['v2WikiOrderHint']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiOrderHintFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1EntityOwnerIdWiki2orderhint(requestParameters, initOverrides) {
        const response = await this.putRepoV1EntityOwnerIdWiki2orderhintRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1EvaluationOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides) {
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling putRepoV1EvaluationOwnerIdWiki2WikiId().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling putRepoV1EvaluationOwnerIdWiki2WikiId().');
        }
        if (requestParameters['v2WikiPage'] == null) {
            throw new runtime.RequiredError('v2WikiPage', 'Required parameter "v2WikiPage" was null or undefined when calling putRepoV1EvaluationOwnerIdWiki2WikiId().');
        }
        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/{ownerId}/wiki2/{wikiId}`;
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: V2WikiPageToJSON(requestParameters['v2WikiPage']),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiPageFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1EvaluationOwnerIdWiki2WikiId(requestParameters, initOverrides) {
        const response = await this.putRepoV1EvaluationOwnerIdWiki2WikiIdRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async putRepoV1EvaluationOwnerIdWiki2WikiIdWikiVersionRaw(requestParameters, initOverrides) {
        if (requestParameters['wikiVersion'] == null) {
            throw new runtime.RequiredError('wikiVersion', 'Required parameter "wikiVersion" was null or undefined when calling putRepoV1EvaluationOwnerIdWiki2WikiIdWikiVersion().');
        }
        if (requestParameters['ownerId'] == null) {
            throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling putRepoV1EvaluationOwnerIdWiki2WikiIdWikiVersion().');
        }
        if (requestParameters['wikiId'] == null) {
            throw new runtime.RequiredError('wikiId', 'Required parameter "wikiId" was null or undefined when calling putRepoV1EvaluationOwnerIdWiki2WikiIdWikiVersion().');
        }
        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/{ownerId}/wiki2/{wikiId}/{wikiVersion}`;
        urlPath = urlPath.replace(`{${"wikiVersion"}}`, encodeURIComponent(String(requestParameters['wikiVersion'])));
        urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId'])));
        urlPath = urlPath.replace(`{${"wikiId"}}`, encodeURIComponent(String(requestParameters['wikiId'])));
        const response = await this.request({
            path: urlPath,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => V2WikiPageFromJSON(jsonValue));
    }
    /**
     */
    async putRepoV1EvaluationOwnerIdWiki2WikiIdWikiVersion(requestParameters, initOverrides) {
        const response = await this.putRepoV1EvaluationOwnerIdWiki2WikiIdWikiVersionRaw(requestParameters, initOverrides);
        return await response.value();
    }
}
//# sourceMappingURL=WikiPageServices2Api.js.map