/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.1 * User agent: apibuilder app.apibuilder.io/bml/test-remote-defined-enum-as-header-value/0.0.1/play_2_9_scala_3_controllers */ package org.bml.test.remote.defined.`enum`.`as`.header.value.v0.controllers import org.bml.test.remote.defined.`enum`.`as`.header.value.v0.models.json._ import org.bml.test.locale.v0.models.json._ trait ContextsController extends play.api.mvc.BaseController { sealed trait GetById extends Product with Serializable object GetById { final case class HTTP200(body: org.bml.test.remote.defined.`enum`.`as`.header.value.v0.models.Context) extends GetById final case class Undocumented(result: play.api.mvc.Result) extends GetById } def getById( request: play.api.mvc.Request[play.api.mvc.AnyContent], id: _root_.java.util.UUID, lang: _root_.scala.Option[org.bml.test.locale.v0.models.Locale] ): scala.concurrent.Future[GetById] final def getById( id: _root_.java.util.UUID, lang: _root_.scala.Option[org.bml.test.locale.v0.models.Locale] ): play.api.mvc.Action[play.api.mvc.AnyContent] = Action.async { request => getById(request, id, lang) .map { case r: GetById.HTTP200 => Status(200)(play.api.libs.json.Json.toJson(r.body)) case r: GetById.Undocumented => r.result }(defaultExecutionContext) } }