#set($resourceName = $artifactId)
#macro(replaceChar $originalName, $char)
#if($originalName.contains($char))
#set($tokens = $originalName.split($char))
#set($newResourceName = "")
#foreach($token in $tokens)
#set($newResourceName = $newResourceName + $token.substring(0,1).toUpperCase() + $token.substring(1).toLowerCase())
#end
  ${newResourceName}
  #else
  #set($newResourceName = $originalName.substring(0,1).toUpperCase() + $originalName.substring(1))
  ${newResourceName}
  #end
  #end
  #set($resourceName = "#replaceChar($resourceName, '-')")
  #set($resourceName = "#replaceChar($resourceName, '.')")
  #set($resourceName = $resourceName.replaceAll("\n", "").trim())
  #macro(regionVar)
  AWS::Region
#end
#set($awsRegion = "#regionVar()")
#set($awsRegion = $awsRegion.replaceAll("\n", "").trim())
AWSTemplateFormatVersion: '2010-09-09'
  Transform: AWS::Serverless-2016-10-31
  Description: AWS Serverless Quarkus HTTP - ${groupId}::${artifactId}
  Globals:
    Api:
      BinaryMediaTypes:
        - "*/*"

  Resources:
    ${resourceName}NativeFunction:
      Type: AWS::Serverless::Function
      Properties:
        Handler: not.used.in.provided.runtimei
        Runtime: provided
        CodeUri: target/function.zip
        MemorySize: 128
        Policies: AWSLambdaBasicExecutionRole
        Timeout: 15
        Environment:
          Variables:
            DISABLE_SIGNAL_HANDLERS: true
