package {{package}};

{{#imports}}import {{import}};
{{/imports}}
import java.util.*;
import io.swagger.annotations.*;

{{#jdk8}}
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
{{/jdk8}}
import org.springframework.http.ResponseEntity;
{{#jdk8}}
import org.springframework.web.context.request.NativeWebRequest;
{{/jdk8}}
import org.springframework.web.multipart.MultipartFile;
{{#reactive}}
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
{{/reactive}}

import java.util.List;
import java.util.Map;
import org.springframework.core.io.InputStreamResource;
{{#jdk8}}
import java.util.Optional;
{{/jdk8}}
{{^jdk8}}
    {{#useOptional}}
import java.util.Optional;
    {{/useOptional}}
{{/jdk8}}
{{#async}}
import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture{{/jdk8}};
{{/async}}

{{#operations}}
/**
 * A delegate to be called by the {@link {{classname}}Controller}}.
 * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class.
 */

public class {{classname}}Delegate extends org.teiid.spring.openapi.TeiidRSProvider {
    private org.teiid.spring.autoconfigure.TeiidServer server;
    private org.teiid.adminapi.VDB vdb;

    public {{classname}}Delegate(org.teiid.spring.autoconfigure.TeiidServer server, org.teiid.adminapi.VDB vdb) {
        this.server = server;
        this.vdb = vdb;
    }

{{#operation}}
    /**
     * @see {{classname}}#{{operationId}}
     */
    {{#jdk8}}public {{/jdk8}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>teiidReturnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isListContainer}}Mono{{/isListContainer}}{{#isListContainer}}Flux{{/isListContainer}}<{{{baseType}}}>{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}MultipartFile{{/isFile}} {{paramName}}{{#hasMore}},
        {{/hasMore}}{{/allParams}}{{#reactive}}{{#hasParams}},
        {{/hasParams}}ServerWebExchange exchange{{/reactive}}){{^jdk8}};{{/jdk8}}{{#jdk8}} {
{{>teiidBody}}
    }{{/jdk8}}

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