{{>licenseInfo}}
package {{apiPackage}}

import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.Field
import retrofit2.http.FieldMap
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.HEAD
import retrofit2.http.Header
import retrofit2.http.HeaderMap
import retrofit2.http.Headers
import retrofit2.http.HTTP
import retrofit2.http.Multipart
import retrofit2.http.OPTIONS
import retrofit2.http.Part
import retrofit2.http.PartMap
import retrofit2.http.PATCH
import retrofit2.http.Path
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Query
import retrofit2.http.QueryMap
import retrofit2.http.QueryName
import retrofit2.http.Streaming
import retrofit2.http.Tag
import retrofit2.http.Url
{{#doNotUseRxAndCoroutines}}
import retrofit2.Call
{{/doNotUseRxAndCoroutines}}
{{^doNotUseRxAndCoroutines}}
{{#useCoroutines}}
import retrofit2.Response
{{/useCoroutines}}
{{/doNotUseRxAndCoroutines}}
import okhttp3.RequestBody
{{#isResponseFile}}
import okhttp3.ResponseBody
{{/isResponseFile}}
{{#isMultipart}}
import okhttp3.MultipartBody
{{/isMultipart}}
{{^doNotUseRxAndCoroutines}}
{{#useRxJava}}
import rx.Observable
{{/useRxJava}}
{{#useRxJava2}}
import io.reactivex.Single
{{/useRxJava2}}
{{#useRxJava3}}
import io.reactivex.rxjava3.core.Single
{{/useRxJava3}}
{{^returnType}}
{{#useRxJava2}}
import io.reactivex.Completable
{{/useRxJava2}}
{{#useRxJava3}}
import io.reactivex.rxjava3.core.Completable
{{/useRxJava3}}
{{/returnType}}
{{/doNotUseRxAndCoroutines}}
{{^multiplatform}}
{{#gson}}
import com.google.gson.annotations.SerializedName
{{/gson}}
{{#moshi}}
import com.squareup.moshi.Json
{{/moshi}}
{{#jackson}}
import com.fasterxml.jackson.annotation.JsonProperty
{{/jackson}}
{{#kotlinx_serialization}}
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
{{/kotlinx_serialization}}
{{/multiplatform}}
{{#multiplatform}}
import kotlinx.serialization.*
{{/multiplatform}}

{{#imports}}import {{import}}
{{/imports}}

{{#operations}}
{{#x-kotlin-multipart-import}}
{{^isMultipart}}
import okhttp3.MultipartBody

{{/isMultipart}}
{{/x-kotlin-multipart-import}}
internal interface {{classname}} {
    {{#operation}}
    {{#allParams}}
    {{#isEnum}}

    /**
    * enum for parameter {{paramName}}
    */
    {{#nonPublicApi}}internal {{/nonPublicApi}}enum class {{enumName}}{{operationIdCamelCase}}(val value: {{^isContainer}}{{dataType}}{{/isContainer}}{{#isContainer}}kotlin.String{{/isContainer}}) {
    {{^enumUnknownDefaultCase}}
        {{#allowableValues}}
            {{#enumVars}}
                {{^multiplatform}}
                    {{#moshi}}
        @Json(name = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}
                    {{/moshi}}
                    {{#gson}}
        @SerializedName(value = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}
                    {{/gson}}
                    {{#jackson}}
        @JsonProperty(value = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}
                    {{/jackson}}
                    {{#kotlinx_serialization}}
        @SerialName(value = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}
                    {{/kotlinx_serialization}}
                {{/multiplatform}}
                {{#multiplatform}}
                    @SerialName(value = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}
                {{/multiplatform}}
            {{/enumVars}}
        {{/allowableValues}}
    {{/enumUnknownDefaultCase}}
    {{#enumUnknownDefaultCase}}
        {{#allowableValues}}
            {{#enumVars}}
                {{^-last}}
                    {{^multiplatform}}
                        {{#moshi}}
            @Json(name = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{&name}}({{{value}}}),
                        {{/moshi}}
                        {{#gson}}
            @SerializedName(value = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{&name}}({{{value}}}),
                        {{/gson}}
                        {{#jackson}}
            @JsonProperty(value = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{&name}}({{{value}}}),
                        {{/jackson}}
                        {{#kotlinx_serialization}}
            @SerialName(value = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{&name}}({{{value}}}),
                        {{/kotlinx_serialization}}
                    {{/multiplatform}}
                    {{#multiplatform}}
            @SerialName(value = {{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{&name}}({{{value}}}),
                    {{/multiplatform}}
                {{/-last}}
            {{/enumVars}}
        {{/allowableValues}}
    {{/enumUnknownDefaultCase}}
    }

    {{/isEnum}}
    {{/allParams}}
    /**
     * {{summary}}
     * {{notes}}
     * Responses:{{#responses}}
     *  - {{code}}: {{{message}}}{{/responses}}
     *{{>paramJavadoc}}
     * @return {{^useCoroutines}}[Call]<{{/useCoroutines}}{{#isResponseFile}}[ResponseBody]{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}[{{{.}}}]{{/returnType}}{{^returnType}}[Unit]{{/returnType}}{{/isResponseFile}}{{^useCoroutines}}>{{/useCoroutines}}
     */
    {{#isDeprecated}}
    @Deprecated("This api was deprecated")
    {{/isDeprecated}}
    {{#formParams}}
    {{#-first}}
    {{#isMultipart}}@Multipart{{/isMultipart}}{{^isMultipart}}@FormUrlEncoded{{/isMultipart}}
    {{/-first}}
    {{/formParams}}
    {{^formParams}}
    {{#prioritizedContentTypes}}
    {{#-first}}
    @Headers("Content-Type:{{{mediaType}}}")
    {{/-first}}
    {{/prioritizedContentTypes}}
    {{/formParams}}
    @{{httpMethod}}("{{{path}}}")
    {{^doNotUseRxAndCoroutines}}{{#useCoroutines}}suspend {{/useCoroutines}}{{/doNotUseRxAndCoroutines}}fun {{operationId}}({{^allParams}}){{/allParams}}{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/allParams}}: {{^doNotUseRxAndCoroutines}}{{#useRxJava}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{^returnType}}Unit{{/returnType}}{{/isResponseFile}}>{{/useRxJava}}{{#useRxJava2}}{{#returnType}}Single<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Single<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{#useCoroutines}}Response<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{^returnType}}Unit{{/returnType}}{{/isResponseFile}}>{{/useCoroutines}}{{/doNotUseRxAndCoroutines}}{{#doNotUseRxAndCoroutines}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{^returnType}}Unit{{/returnType}}{{/isResponseFile}}>{{/doNotUseRxAndCoroutines}}

    {{/operation}}
}
{{/operations}}
