<?php

namespace {{invokerPackage}}\Api\{{classname}};

use {{invokerPackage}}\AccessToken;
use {{invokerPackage}}\Exception\ApiException;
use {{invokerPackage}}\Exception\InvalidArgumentException;
use Psr\Http\Message\RequestInterface;

/**
{{>partial_header}}
*/
{{#operations}}interface {{packageName}}SDKInterface
{
    public const API_NAME = '{{packageName}}';

    {{#operation}}
    public const OPERATION_{{#lambda.uppercase}}{{operationId}}{{/lambda.uppercase}} = '{{operationId}}';

    public const OPERATION_{{#lambda.uppercase}}{{operationId}}{{/lambda.uppercase}}_PATH = '{{path}}';
    {{/operation}}

{{#operation}}
    /**
    * Operation {{{operationId}}}
    {{#summary}}
        *
        * {{.}}
    {{/summary}}
    *
    {{#description}}
        * {{.}}
        *
    {{/description}}
    {{#vendorExtensions.x-group-parameters}}
        * Note: the input parameter is an associative array with the keys listed as the parameter name below
        *
    {{/vendorExtensions.x-group-parameters}}
    {{#servers}}
        {{#-first}}
            * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
        {{/-first}}
        * URL: {{{url}}}
        {{#-last}}
        {{/-last}}
    {{/servers}}
    * @param AccessToken $accessToken
    * @param string $region
    {{#allParams}}
    * @param {{{dataType}}}{{^required}}{{#defaultValue}}{{/defaultValue}}{{^defaultValue}}|null{{/defaultValue}}{{/required}} ${{paramName}} {{#description}} {{description}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
    {{/allParams}}
    *
    * @throws ApiException on non-2xx response
    * @throws InvalidArgumentException
    * @return {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}null{{/returnType}}
    */
    public function {{operationId}}(AccessToken $accessToken, string $region{{^vendorExtensions.x-group-parameters}}{{#allParams}}, ${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}{{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}, $associative_array{{/vendorExtensions.x-group-parameters}});
{{/operation}}
}
{{/operations}}