/* tslint:disable */
/* eslint-disable */
{{>licenseInfo}}


import * as runtime from '../runtime{{importFileExtension}}';
{{#imports.0}}
import type {
  {{#imports}}
  {{className}},
  {{/imports}}
} from '../models/index{{importFileExtension}}';
{{^withoutRuntimeChecks}}
import {
    {{#imports}}
    {{className}}FromJSON,
    {{className}}ToJSON,
    {{/imports}}
} from '../models/index{{importFileExtension}}';
{{/withoutRuntimeChecks}}
{{/imports.0}}

{{#operations}}
{{#operation}}
{{#allParams.0}}
export interface {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request {
{{#allParams}}
    {{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{#hasReadOnly}}Omit<{{{dataType}}}, {{#readOnlyVars}}'{{baseName}}'{{^-last}}|{{/-last}}{{/readOnlyVars}}>{{/hasReadOnly}}{{^hasReadOnly}}{{{dataType}}}{{/hasReadOnly}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}};
{{/allParams}}
}

{{/allParams.0}}
{{/operation}}
{{/operations}}
{{#withInterfaces}}
{{#operations}}
/**
 * {{classname}} - interface
 * {{#lambda.indented_1}}{{{unescapedDescription}}}{{/lambda.indented_1}}
 * @export
 * @interface {{classname}}Interface
 */
export interface {{classname}}Interface {
{{#operation}}
    /**
     * {{&notes}}
     {{#summary}}
     * @summary {{&summary}}
     {{/summary}}
     {{#allParams}}
     * @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
     {{/allParams}}
     * @param {*} [options] Override http request option.
    {{#isDeprecated}}
     * @deprecated
    {{/isDeprecated}}
     * @throws {RequiredError}
     * @memberof {{classname}}Interface
     */
    {{nickname}}Raw({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{{#responses}}{{#dataType}}{{{dataType}}}{{/dataType}}{{^dataType}}void{{/dataType}}{{^-last}} | {{/-last}}{{/responses}}{{^responses}}{{{returnType}}}{{^returnType}}void{{/returnType}}{{/responses}}>>;

    /**
     {{#notes}}
     * {{&notes}}
     {{/notes}}
     {{#summary}}
     * {{&summary}}
     {{/summary}}
     {{#isDeprecated}}
     * @deprecated
     {{/isDeprecated}}
     */
    {{^useSingleRequestParameter}}
    {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{{#responses}}{{#dataType}}{{{dataType}}}{{/dataType}}{{^dataType}}void{{/dataType}}{{^-last}} | {{/-last}}{{/responses}}{{^responses}}{{{returnType}}}{{#returnType}}{{#isResponseOptional}} | null | undefined {{/isResponseOptional}}{{/returnType}}{{^returnType}}void{{/returnType}}{{/responses}}>;
    {{/useSingleRequestParameter}}
    {{#useSingleRequestParameter}}
    {{nickname}}({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{{#responses}}{{#dataType}}{{{dataType}}}{{/dataType}}{{^dataType}}void{{/dataType}}{{^-last}} | {{/-last}}{{/responses}}{{^responses}}{{{returnType}}}{{#returnType}}{{#isResponseOptional}} | null | undefined {{/isResponseOptional}}{{/returnType}}{{^returnType}}void{{/returnType}}{{/responses}}>;
    {{/useSingleRequestParameter}}

{{/operation}}
}

{{/operations}}
{{/withInterfaces}}
{{#operations}}
/**
 * {{#lambda.indented_star_1}}{{{unescapedDescription}}}{{/lambda.indented_star_1}}
 */
{{#withInterfaces}}
export class {{classname}} extends runtime.BaseAPI implements {{classname}}Interface {
{{/withInterfaces}}
{{^withInterfaces}}
export class {{classname}} extends runtime.BaseAPI {
{{/withInterfaces}}

    {{#operation}}
    /**
     {{#notes}}
     * {{&notes}}
     {{/notes}}
     {{#summary}}
     * {{&summary}}
     {{/summary}}
     {{#isDeprecated}}
     * @deprecated
     {{/isDeprecated}}
     */
    async {{nickname}}Raw({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{{#responses}}{{#dataType}}{{{dataType}}}{{/dataType}}{{^dataType}}void{{/dataType}}{{^-last}} | {{/-last}}{{/responses}}{{^responses}}{{{returnType}}}{{^returnType}}void{{/returnType}}{{/responses}}>> {
        {{#allParams}}
        {{#required}}
        if (requestParameters['{{paramName}}'] == null) {
            throw new runtime.RequiredError(
                '{{paramName}}',
                'Required parameter "{{paramName}}" was null or undefined when calling {{nickname}}().'
            );
        }

        {{/required}}
        {{/allParams}}
        const queryParameters: any = {};

        {{#queryParams}}
        {{#isArray}}
        if (requestParameters['{{paramName}}'] != null) {
            {{#isCollectionFormatMulti}}
            queryParameters['{{baseName}}'] = requestParameters['{{paramName}}'];
            {{/isCollectionFormatMulti}}
            {{^isCollectionFormatMulti}}
            queryParameters['{{baseName}}'] = {{#uniqueItems}}Array.from({{/uniqueItems}}requestParameters['{{paramName}}']{{#uniqueItems}}){{/uniqueItems}}!.join(runtime.COLLECTION_FORMATS["{{collectionFormat}}"]);
            {{/isCollectionFormatMulti}}
        }

        {{/isArray}}
        {{^isArray}}
        if (requestParameters['{{paramName}}'] != null) {
            {{#isExplode}}
            {{#isContainer}}
            for (let key of Object.keys(requestParameters['{{paramName}}'])) {
                queryParameters[key] = requestParameters['{{paramName}}'][key];
            }
            {{/isContainer}}
            {{^isContainer}}
            queryParameters['{{baseName}}'] = requestParameters['{{paramName}}'];
            {{/isContainer}}
            {{/isExplode}}
            {{^isExplode}}
            {{#isDateTimeType}}
            queryParameters['{{baseName}}'] = (requestParameters['{{paramName}}'] as any).toISOString();
            {{/isDateTimeType}}
            {{^isDateTimeType}}
            {{#isDateType}}
            queryParameters['{{baseName}}'] = (requestParameters['{{paramName}}'] as any).toISOString().substring(0,10);
            {{/isDateType}}
            {{^isDateType}}
            queryParameters['{{baseName}}'] = requestParameters['{{paramName}}'];
            {{/isDateType}}
            {{/isDateTimeType}}
            {{/isExplode}}
        }

        {{/isArray}}
        {{/queryParams}}
        const headerParameters: runtime.HTTPHeaders = {};

        {{#bodyParam}}
        {{^consumes}}
        headerParameters['Content-Type'] = 'application/json';

        {{/consumes}}
        {{#consumes.0}}
        headerParameters['Content-Type'] = '{{{mediaType}}}';

        {{/consumes.0}}
        {{/bodyParam}}
        {{#headerParams}}
        {{#isArray}}
        if (requestParameters['{{paramName}}'] != null) {
            headerParameters['{{baseName}}'] = {{#uniqueItems}}Array.from({{/uniqueItems}}requestParameters['{{paramName}}']{{#uniqueItems}}){{/uniqueItems}}!.join(runtime.COLLECTION_FORMATS["{{collectionFormat}}"]);
        }

        {{/isArray}}
        {{^isArray}}
        if (requestParameters['{{paramName}}'] != null) {
            headerParameters['{{baseName}}'] = String(requestParameters['{{paramName}}']);
        }

        {{/isArray}}
        {{/headerParams}}
        {{#authMethods}}
        {{#isBasic}}
        {{#isBasicBasic}}
        if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
            headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
        }
        {{/isBasicBasic}}
        {{#isBasicBearer}}
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("{{name}}", [{{#scopes}}"{{{scope}}}"{{^-last}}, {{/-last}}{{/scopes}}]);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        {{/isBasicBearer}}
        {{/isBasic}}
        {{#isApiKey}}
        {{#isKeyInHeader}}
        if (this.configuration && this.configuration.apiKey) {
            headerParameters["{{keyParamName}}"] = await this.configuration.apiKey("{{keyParamName}}"); // {{name}} authentication
        }

        {{/isKeyInHeader}}
        {{#isKeyInQuery}}
        if (this.configuration && this.configuration.apiKey) {
            queryParameters["{{keyParamName}}"] = await this.configuration.apiKey("{{keyParamName}}"); // {{name}} authentication
        }

        {{/isKeyInQuery}}
        {{/isApiKey}}
        {{#isOAuth}}
        if (this.configuration && this.configuration.accessToken) {
            // oauth required
            headerParameters["Authorization"] = await this.configuration.accessToken("{{name}}", [{{#scopes}}"{{{scope}}}"{{^-last}}, {{/-last}}{{/scopes}}]);
        }

        {{/isOAuth}}
        {{/authMethods}}
        {{#hasFormParams}}
        const consumes: runtime.Consume[] = [
            {{#consumes}}
            { contentType: '{{{mediaType}}}' },
            {{/consumes}}
        ];
        // @ts-ignore: canConsumeForm may be unused
        const canConsumeForm = runtime.canConsumeForm(consumes);

        let formParams: { append(param: string, value: any): any };
        let useForm = false;
        {{#formParams}}
        {{#isFile}}
        // use FormData to transmit files using content-type "multipart/form-data"
        useForm = canConsumeForm;
        {{/isFile}}
        {{/formParams}}
        if (useForm) {
            formParams = new FormData();
        } else {
            formParams = new URLSearchParams();
        }

        {{#formParams}}
        {{#isArray}}
        if (requestParameters['{{paramName}}'] != null) {
            {{#isCollectionFormatMulti}}
            requestParameters['{{paramName}}'].forEach((element) => {
                formParams.append('{{baseName}}{{#useSquareBracketsInArrayNames}}[]{{/useSquareBracketsInArrayNames}}', element as any);
            })
            {{/isCollectionFormatMulti}}
            {{^isCollectionFormatMulti}}
            formParams.append('{{baseName}}{{#useSquareBracketsInArrayNames}}[]{{/useSquareBracketsInArrayNames}}', {{#uniqueItems}}Array.from({{/uniqueItems}}requestParameters['{{paramName}}']{{#uniqueItems}}){{/uniqueItems}}!.join(runtime.COLLECTION_FORMATS["{{collectionFormat}}"]));
            {{/isCollectionFormatMulti}}
        }

        {{/isArray}}
        {{^isArray}}
        if (requestParameters['{{paramName}}'] != null) {
            {{#isDateTimeType}}
            formParams.append('{{baseName}}', (requestParameters['{{paramName}}'] as any).toISOString());
            {{/isDateTimeType}}
            {{^isDateTimeType}}
            {{#isPrimitiveType}}
            formParams.append('{{baseName}}', requestParameters['{{paramName}}'] as any);
            {{/isPrimitiveType}}
            {{^isPrimitiveType}}
            {{#isEnumRef}}
            formParams.append('{{baseName}}', requestParameters['{{paramName}}'] as any);
            {{/isEnumRef}}
            {{^isEnumRef}}
            {{^withoutRuntimeChecks}}
            formParams.append('{{baseName}}', new Blob([JSON.stringify({{{dataType}}}ToJSON(requestParameters['{{paramName}}']))], { type: "application/json", }));
            {{/withoutRuntimeChecks}}{{#withoutRuntimeChecks}}
            formParams.append('{{baseName}}', new Blob([JSON.stringify(requestParameters['{{paramName}}'])], { type: "application/json", }));
            {{/withoutRuntimeChecks}}
            {{/isEnumRef}}
            {{/isPrimitiveType}}
            {{/isDateTimeType}}
        }

        {{/isArray}}
        {{/formParams}}
        {{/hasFormParams}}

        let urlPath = `{{{path}}}`;
        {{#pathParams}}
        {{#isDateTimeType}}
        if (requestParameters['{{paramName}}'] instanceof Date) {
            urlPath = urlPath.replace(`{${"{{baseName}}"}}`, encodeURIComponent(requestParameters['{{paramName}}'].toISOString()));
        } else {
            urlPath = urlPath.replace(`{${"{{baseName}}"}}`, encodeURIComponent(String(requestParameters['{{paramName}}'])));
        }
        {{/isDateTimeType}}
        {{^isDateTimeType}}
        {{#isDateType}}
        if (requestParameters['{{paramName}}'] instanceof Date) {
            urlPath = urlPath.replace(`{${"{{baseName}}"}}`, encodeURIComponent(requestParameters['{{paramName}}'].toISOString().substring(0,10)));
        } else {
            urlPath = urlPath.replace(`{${"{{baseName}}"}}`, encodeURIComponent(String(requestParameters['{{paramName}}'])));
        }
        {{/isDateType}}
        {{^isDateType}}
        urlPath = urlPath.replace(`{${"{{baseName}}"}}`, encodeURIComponent(String(requestParameters['{{paramName}}'])));
        {{/isDateType}}
        {{/isDateTimeType}}
        {{/pathParams}}

        const response = await this.request({
            path: urlPath,
            method: '{{httpMethod}}',
            headers: headerParameters,
            query: queryParameters,
            {{#hasBodyParam}}
            {{#bodyParam}}
            {{#isContainer}}
            {{^withoutRuntimeChecks}}
            body: requestParameters['{{paramName}}']{{#isArray}}{{#items}}{{^isPrimitiveType}}!.map({{datatype}}ToJSON){{/isPrimitiveType}}{{/items}}{{/isArray}},
            {{/withoutRuntimeChecks}}
            {{#withoutRuntimeChecks}}
            body: requestParameters['{{paramName}}'],
            {{/withoutRuntimeChecks}}
            {{/isContainer}}
            {{^isContainer}}
            {{^isPrimitiveType}}
            {{^withoutRuntimeChecks}}
            body: {{dataType}}ToJSON(requestParameters['{{paramName}}']),
            {{/withoutRuntimeChecks}}
            {{#withoutRuntimeChecks}}
            body: requestParameters['{{paramName}}'],
            {{/withoutRuntimeChecks}}
            {{/isPrimitiveType}}
            {{#isPrimitiveType}}
            body: requestParameters['{{paramName}}'] as any,
            {{/isPrimitiveType}}
            {{/isContainer}}
            {{/bodyParam}}
            {{/hasBodyParam}}
            {{#hasFormParams}}
            body: formParams,
            {{/hasFormParams}}
        }, initOverrides);

        // CHANGED: Handle all status codes defined in the OpenAPI spec, not just 2xx responses
        // This allows typed access to error responses (4xx, 5xx) and other status codes.
        // The code routes responses based on the actual HTTP status code and returns
        // appropriately typed ApiResponse wrappers for each status code.
        {{#responses}}
        if (response.status === {{code}}) {
            {{#dataType}}
            {{#isBinary}}
            // Binary response for status {{code}}
            return new runtime.BlobApiResponse(response);
            {{/isBinary}}
            {{^isBinary}}
            {{#isFile}}
            // File response for status {{code}}
            return new runtime.BlobApiResponse(response);
            {{/isFile}}
            {{^isFile}}
            {{#primitiveType}}
            {{#isMap}}
            // Map of primitives response for status {{code}}
            return new runtime.JSONApiResponse<any>(response);
            {{/isMap}}
            {{^isMap}}
            {{#isArray}}
            // Array of primitives response for status {{code}}
            return new runtime.JSONApiResponse<any>(response);
            {{/isArray}}
            {{^isArray}}
            {{#simpleType}}
            // Simple primitive type response for status {{code}} - check content-type
            if (this.isJsonMime(response.headers.get('content-type'))) {
                return new runtime.JSONApiResponse<{{dataType}}>(response);
            } else {
                return new runtime.TextApiResponse(response) as any;
            }
            {{/simpleType}}
            {{^simpleType}}
            // Primitive but not simple (e.g., object with additionalProperties) for status {{code}}
            return new runtime.JSONApiResponse<any>(response);
            {{/simpleType}}
            {{/isArray}}
            {{/isMap}}
            {{/primitiveType}}
            {{^primitiveType}}
            {{#isArray}}
            // Array of objects response for status {{code}}
            return new runtime.JSONApiResponse(response{{^withoutRuntimeChecks}}, (jsonValue) => {{#uniqueItems}}new Set({{/uniqueItems}}jsonValue.map({{baseType}}FromJSON){{/withoutRuntimeChecks}}){{#uniqueItems}}){{/uniqueItems}};
            {{/isArray}}
            {{^isArray}}
            {{#isMap}}
            // Map of objects response for status {{code}}
            return new runtime.JSONApiResponse(response{{^withoutRuntimeChecks}}, (jsonValue) => runtime.mapValues(jsonValue, {{baseType}}FromJSON){{/withoutRuntimeChecks}});
            {{/isMap}}
            {{^isMap}}
            // Object response for status {{code}}
            return new runtime.JSONApiResponse(response{{^withoutRuntimeChecks}}, (jsonValue) => {{baseType}}FromJSON(jsonValue){{/withoutRuntimeChecks}});
            {{/isMap}}
            {{/isArray}}
            {{/primitiveType}}
            {{/isFile}}
            {{/isBinary}}
            {{/dataType}}
            {{^dataType}}
            // No body response for status {{code}}
            return new runtime.VoidApiResponse(response);
            {{/dataType}}
        }
        {{/responses}}
        // CHANGED: Throw error if status code is not handled by any of the defined responses
        // This ensures all code paths return a value and provides clear error messages for unexpected status codes
        // Only throw if responses were defined but none matched the actual status code
        throw new runtime.ResponseError(response, `Unexpected status code: ${response.status}. Expected one of: {{#responses}}{{code}}{{^-last}}, {{/-last}}{{/responses}}`);
        {{^responses}}
        // FALLBACK: No responses defined in OpenAPI spec - use default behavior for backward compatibility
        // This maintains backward compatibility with specs that don't explicitly define all responses
        {{#returnType}}
        {{#isResponseFile}}
        return new runtime.BlobApiResponse(response);
        {{/isResponseFile}}
        {{^isResponseFile}}
        {{#returnTypeIsPrimitive}}
        {{#isMap}}
        return new runtime.JSONApiResponse<any>(response);
        {{/isMap}}
        {{#isArray}}
        return new runtime.JSONApiResponse<any>(response);
        {{/isArray}}
        {{#returnSimpleType}}
        if (this.isJsonMime(response.headers.get('content-type'))) {
            return new runtime.JSONApiResponse<{{returnType}}>(response);
        } else {
            return new runtime.TextApiResponse(response) as any;
        }
        {{/returnSimpleType}}
        {{/returnTypeIsPrimitive}}
        {{^returnTypeIsPrimitive}}
        {{#isArray}}
        return new runtime.JSONApiResponse(response{{^withoutRuntimeChecks}}, (jsonValue) => {{#uniqueItems}}new Set({{/uniqueItems}}jsonValue.map({{returnBaseType}}FromJSON){{/withoutRuntimeChecks}}){{#uniqueItems}}){{/uniqueItems}};
        {{/isArray}}
        {{^isArray}}
        {{#isMap}}
        return new runtime.JSONApiResponse(response{{^withoutRuntimeChecks}}, (jsonValue) => runtime.mapValues(jsonValue, {{returnBaseType}}FromJSON){{/withoutRuntimeChecks}});
        {{/isMap}}
        {{^isMap}}
        return new runtime.JSONApiResponse(response{{^withoutRuntimeChecks}}, (jsonValue) => {{returnBaseType}}FromJSON(jsonValue){{/withoutRuntimeChecks}});
        {{/isMap}}
        {{/isArray}}
        {{/returnTypeIsPrimitive}}
        {{/isResponseFile}}
        {{/returnType}}
        {{^returnType}}
        return new runtime.VoidApiResponse(response);
        {{/returnType}}
        {{/responses}}
    }

    /**
     {{#notes}}
     * {{&notes}}
     {{/notes}}
     {{#summary}}
     * {{&summary}}
     {{/summary}}
     {{#isDeprecated}}
     * @deprecated
     {{/isDeprecated}}
     */
    {{^useSingleRequestParameter}}
    async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{{#responses}}{{#dataType}}{{{dataType}}}{{/dataType}}{{^dataType}}void{{/dataType}}{{^-last}} | {{/-last}}{{/responses}}{{^responses}}{{{returnType}}}{{#returnType}}{{#isResponseOptional}} | null | undefined {{/isResponseOptional}}{{/returnType}}{{^returnType}}void{{/returnType}}{{/responses}}> {
        {{#returnType}}
        const response = await this.{{nickname}}Raw({{#allParams.0}}{ {{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}} }, {{/allParams.0}}initOverrides);
        return await response.value();
        {{/returnType}}
        {{^returnType}}
        await this.{{nickname}}Raw({{#allParams.0}}{ {{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}} }, {{/allParams.0}}initOverrides);
        {{/returnType}}
    }
    {{/useSingleRequestParameter}}
    {{#useSingleRequestParameter}}
    async {{nickname}}({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{{#responses}}{{#dataType}}{{{dataType}}}{{/dataType}}{{^dataType}}void{{/dataType}}{{^-last}} | {{/-last}}{{/responses}}{{^responses}}{{{returnType}}}{{#returnType}}{{#isResponseOptional}} | null | undefined {{/isResponseOptional}}{{/returnType}}{{^returnType}}void{{/returnType}}{{/responses}}> {
        {{#returnType}}
        const response = await this.{{nickname}}Raw({{#allParams.0}}requestParameters, {{/allParams.0}}initOverrides);
        {{#isResponseOptional}}
        // CHANGED: Handle all status codes for optional responses
        switch (response.raw.status) {
            {{#responses}}
            {{#is2xx}}
            case {{code}}:
                return {{#dataType}}await response.value(){{/dataType}}{{^dataType}}null{{/dataType}};
            {{/is2xx}}
            {{/responses}}
            default:
                // For non-2xx responses, throw error to maintain backward compatibility
                throw new runtime.ResponseError(response.raw, `Unexpected status code: ${response.raw.status}`);
        }
        {{/isResponseOptional}}
        {{^isResponseOptional}}
        return await response.value();
        {{/isResponseOptional}}
        {{/returnType}}
        {{^returnType}}
        await this.{{nickname}}Raw({{#allParams.0}}requestParameters, {{/allParams.0}}initOverrides);
        {{/returnType}}
    }
    {{/useSingleRequestParameter}}

    {{/operation}}
}
{{/operations}}
{{#hasEnums}}

{{#operations}}
{{#operation}}
{{#allParams}}
{{#isEnum}}
{{#stringEnums}}
/**
  * @export
  * @enum {string}
  */
export enum {{operationIdCamelCase}}{{enumName}} {
{{#allowableValues}}
    {{#enumVars}}
    {{{name}}} = {{{value}}}{{^-last}},{{/-last}}
    {{/enumVars}}
{{/allowableValues}}
}
{{/stringEnums}}
{{^stringEnums}}
/**
 * @export
 */
export const {{operationIdCamelCase}}{{enumName}} = {
{{#allowableValues}}
    {{#enumVars}}
    {{{name}}}: {{{value}}}{{^-last}},{{/-last}}
    {{/enumVars}}
{{/allowableValues}}
} as const;
export type {{operationIdCamelCase}}{{enumName}} = typeof {{operationIdCamelCase}}{{enumName}}[keyof typeof {{operationIdCamelCase}}{{enumName}}];
{{/stringEnums}}
{{/isEnum}}
{{/allParams}}
{{/operation}}
{{/operations}}
{{/hasEnums}}
