/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.16.74 * User agent: apibuilder app.apibuilder.io/apicollective/apibuilder-generator/0.16.74/http4s_0_22 */ package io.apibuilder.generator.v0.models { /** * An attribute represents a key/value pair that is optionally used to provide * additional instructions / data to the code generator. An example could be an * attribute to specify the root import path for a go client.. */ final case class Attribute( name: String, value: String ) /** * @param code Machine readable code for this specific error message * @param message Description of the error */ final case class Error( code: String, message: String ) /** * Represents a source file * * @param name The recommended name for the file. * @param dir The recommended directory path for the file where appropriate. * @param contents The actual source code. */ final case class File( name: String, dir: _root_.scala.Option[String] = None, contents: String, flags: _root_.scala.Option[Seq[io.apibuilder.generator.v0.models.FileFlag]] = None ) /** * The generator metadata. * * @param language A comma separate list of the programming language(s) that this generator * produces * @param attributes The list of attributes that this code generator can use. You can find the full * list of available attributes and their descriptions at * http://apibuilder.io/doc/attributes */ final case class Generator( key: String, name: String, language: _root_.scala.Option[String] = None, description: _root_.scala.Option[String] = None, attributes: Seq[String] = Nil ) final case class Healthcheck( status: String ) /** * The result of invoking a generator. * * @param source The actual source code. * @param files A collection of source files */ final case class Invocation( @deprecated("Use files instead") source: String, files: Seq[io.apibuilder.generator.v0.models.File] ) /** * The invocation form is the payload send to the code generators when requesting * generation of client code. */ final case class InvocationForm( service: io.apibuilder.spec.v0.models.Service, attributes: Seq[io.apibuilder.generator.v0.models.Attribute] = Nil, userAgent: _root_.scala.Option[String] = None, importedServices: _root_.scala.Option[Seq[io.apibuilder.spec.v0.models.Service]] = None ) /** * Allows generator authors to flag files with special characteristics. It is up to * the client (i.e. the cli) to decide how to interpret them. */ sealed trait FileFlag extends _root_.scala.Product with _root_.scala.Serializable object FileFlag { /** * Indicates files that an end user starts from but should edit. Not intended to be * the final product (see: * https://stackoverflow.com/questions/235018/what-is-scaffolding-is-it-a-term-for-a-particular-platform). * Consider not overwriting these files when code is re-generated. */ case object Scaffolding extends FileFlag { override def toString = "scaffolding" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends FileFlag /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[FileFlag] = scala.List(Scaffolding) private val byName: Map[String, FileFlag] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): FileFlag = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[FileFlag] = byName.get(value.toLowerCase) } }