<#assign MapperUtil=statics["com.kobylynskyi.graphql.codegen.scala.ScalaGraphQLTypeMapper"]> <#if package?has_content> package ${package} <#list imports as import> import ${import}._ <#assign waitImports = []> <#list operations as operation> <#if operation.parameters?has_content> <#if enumImportItSelfInScala?has_content> <#list operation.parameters as param> <#list enumImportItSelfInScala as enum> <#if MapperUtil.isScalaCollection(param.type)> <#if enum == param.type?replace("Seq[", "")?replace("]", "")> <#if waitImports?seq_contains(enum)> <#else > <#assign waitImports = waitImports + [param.type] /> <#else > <#if enum == param.type> <#if waitImports?seq_contains(enum)> <#else > <#assign waitImports = waitImports + [param.type] /> <#if waitImports?has_content> <#list waitImports as import> import ${import}._ <#if javaDoc?has_content> /** <#list javaDoc as javaDocLine> * ${javaDocLine} */ <#if generatedAnnotation && generatedInfo.getGeneratedType()?has_content> @${generatedInfo.getGeneratedType()}( value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"), date = "${generatedInfo.getDateTime()}" ) trait ${className}<#if implements?has_content> extends <#list implements as interface>${interface}<#if interface_has_next> with { <#list operations as operation> <#if operation.javaDoc?has_content> /** <#list operation.javaDoc as javaDocLine> * ${javaDocLine} */ <#if operation.deprecated?has_content> @${operation.deprecated.annotation}(message = "${operation.deprecated.reason}") <#list operation.annotations as annotation> @${annotation} <#if operation.throwsException> @throws[Exception] def ${operation.name}(<#list operation.parameters as param>${param.name}: ${param.type}<#if param_has_next>, ): ${operation.type} }