/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.12.14 * User agent: apibuilder app.apibuilder.io/apicollective/apibuilder-swagger/0.12.14/http4s_0_20 */ package io.apibuilder.swagger.v0.models { sealed trait ParameterOrRef extends _root_.scala.Product with _root_.scala.Serializable sealed trait ResponseOrRef extends _root_.scala.Product with _root_.scala.Serializable final case class Contact( name: _root_.scala.Option[String] = None, url: _root_.scala.Option[String] = None, email: _root_.scala.Option[String] = None ) final case class ExternalDocumentation( description: _root_.scala.Option[String] = None, url: String ) /** * TODO: Can this be a union type with items? * * @param items NOTE: This is required if type is 'array' */ final case class Header( description: _root_.scala.Option[String] = None, `type`: io.apibuilder.swagger.v0.models.ItemsType, format: _root_.scala.Option[io.apibuilder.swagger.v0.models.FormatType] = None, items: _root_.scala.Option[io.apibuilder.swagger.v0.models.Items] = None, collectionFormat: _root_.scala.Option[io.apibuilder.swagger.v0.models.CollectionFormatType] = None, default: _root_.scala.Option[Map[String, _root_.io.circe.Json]] = None, maximum: _root_.scala.Option[Long] = None, exclusiveMaximum: _root_.scala.Option[Boolean] = None, minimum: _root_.scala.Option[Long] = None, exclusiveMinimum: _root_.scala.Option[Boolean] = None, maxLength: _root_.scala.Option[Int] = None, minLength: _root_.scala.Option[Int] = None, pattern: _root_.scala.Option[String] = None, maxItems: _root_.scala.Option[Int] = None, minItems: _root_.scala.Option[Int] = None, uniqueItems: _root_.scala.Option[Boolean] = None, `enum`: _root_.scala.Option[Seq[Map[String, _root_.io.circe.Json]]] = None, multipleOf: _root_.scala.Option[Long] = None ) final case class Info( title: String, description: _root_.scala.Option[String] = None, termsOfService: _root_.scala.Option[String] = None, contact: _root_.scala.Option[io.apibuilder.swagger.v0.models.Contact] = None, license: _root_.scala.Option[io.apibuilder.swagger.v0.models.License] = None, version: String ) /** * @param items NOTE: This is required if type is 'array' */ final case class Items( `type`: io.apibuilder.swagger.v0.models.ItemsType, format: _root_.scala.Option[io.apibuilder.swagger.v0.models.FormatType] = None, items: _root_.scala.Option[io.apibuilder.swagger.v0.models.Items] = None, collectionFormat: _root_.scala.Option[io.apibuilder.swagger.v0.models.CollectionFormatType] = None, default: _root_.scala.Option[Map[String, _root_.io.circe.Json]] = None, maximum: _root_.scala.Option[Long] = None, exclusiveMaximum: _root_.scala.Option[Boolean] = None, minimum: _root_.scala.Option[Long] = None, exclusiveMinimum: _root_.scala.Option[Boolean] = None, maxLength: _root_.scala.Option[Int] = None, minLength: _root_.scala.Option[Int] = None, pattern: _root_.scala.Option[String] = None, maxItems: _root_.scala.Option[Int] = None, minItems: _root_.scala.Option[Int] = None, uniqueItems: _root_.scala.Option[Boolean] = None, `enum`: _root_.scala.Option[Seq[Map[String, _root_.io.circe.Json]]] = None, multipleOf: _root_.scala.Option[Long] = None ) final case class License( name: String, url: _root_.scala.Option[String] = None ) final case class Operation( tags: _root_.scala.Option[Seq[String]] = None, summary: _root_.scala.Option[String] = None, description: _root_.scala.Option[String] = None, externalDocs: _root_.scala.Option[io.apibuilder.swagger.v0.models.ExternalDocumentation] = None, operationId: _root_.scala.Option[String] = None, consumes: _root_.scala.Option[Seq[String]] = None, produces: _root_.scala.Option[Seq[String]] = None, parameters: _root_.scala.Option[Seq[io.apibuilder.swagger.v0.models.ParameterOrRef]] = None, responses: Map[String, io.apibuilder.swagger.v0.models.ResponseOrRef], schemes: _root_.scala.Option[Seq[String]] = None, deprecated: _root_.scala.Option[Boolean] = None, security: _root_.scala.Option[Seq[Map[String, Seq[String]]]] = None ) /** * TODO: This might need to be a complex union type, given the different * requirements based on the 'in' property. * http://swagger.io/specification/#parameterObject */ final case class Parameter( name: String, in: io.apibuilder.swagger.v0.models.ParameterInType, description: _root_.scala.Option[String] = None, required: Boolean, schema: _root_.scala.Option[io.apibuilder.swagger.v0.models.Schema] = None, `type`: _root_.scala.Option[String] = None, format: _root_.scala.Option[String] = None, allowEmptyValue: _root_.scala.Option[Boolean] = None, items: _root_.scala.Option[io.apibuilder.swagger.v0.models.Items] = None, collectionFormat: _root_.scala.Option[io.apibuilder.swagger.v0.models.CollectionFormatType] = None, default: _root_.scala.Option[Map[String, _root_.io.circe.Json]] = None, maximum: _root_.scala.Option[Long] = None, exclusiveMaximum: _root_.scala.Option[Boolean] = None, minimum: _root_.scala.Option[Long] = None, exclusiveMinimum: _root_.scala.Option[Boolean] = None, maxLength: _root_.scala.Option[Int] = None, minLength: _root_.scala.Option[Int] = None, pattern: _root_.scala.Option[String] = None, maxItems: _root_.scala.Option[Int] = None, minItems: _root_.scala.Option[Int] = None, uniqueItems: _root_.scala.Option[Boolean] = None, `enum`: _root_.scala.Option[Seq[Map[String, _root_.io.circe.Json]]] = None, multipleOf: _root_.scala.Option[Long] = None ) extends ParameterOrRef /** * @param ref TODO: Needs to be named '$ref' */ final case class PathItem( ref: _root_.scala.Option[String] = None, get: _root_.scala.Option[io.apibuilder.swagger.v0.models.Operation] = None, put: _root_.scala.Option[io.apibuilder.swagger.v0.models.Operation] = None, post: _root_.scala.Option[io.apibuilder.swagger.v0.models.Operation] = None, delete: _root_.scala.Option[io.apibuilder.swagger.v0.models.Operation] = None, options: _root_.scala.Option[io.apibuilder.swagger.v0.models.Operation] = None, head: _root_.scala.Option[io.apibuilder.swagger.v0.models.Operation] = None, patch: _root_.scala.Option[io.apibuilder.swagger.v0.models.Operation] = None, parameters: _root_.scala.Option[Seq[io.apibuilder.swagger.v0.models.ParameterOrRef]] = None ) /** * @param ref TODO: Needs to be named '$ref' */ final case class Reference( ref: String ) extends ParameterOrRef with ResponseOrRef final case class Response( description: String, schema: _root_.scala.Option[io.apibuilder.swagger.v0.models.Schema] = None, headers: _root_.scala.Option[Map[String, io.apibuilder.swagger.v0.models.Header]] = None, examples: _root_.scala.Option[Map[String, _root_.io.circe.Json]] = None ) extends ResponseOrRef /** * @param ref TODO: Needs to be named '$ref' * @param items TODO: figure out if this also needs to support boolean * (http://json-schema.org/latest/json-schema-validation.html#rfc.section.5.9). * It's possible that a uni-directional approach may allow us to avoid supporting * this odd type. * @param additionalProperties TODO: figure out if this also needs to support boolean * (http://json-schema.org/latest/json-schema-validation.html#rfc.section.5.18). * It's possible that a uni-directional approach may allow us to avoid supporting * this odd type. */ final case class Schema( ref: _root_.scala.Option[String] = None, format: _root_.scala.Option[io.apibuilder.swagger.v0.models.FormatType] = None, title: _root_.scala.Option[String] = None, description: _root_.scala.Option[String] = None, default: _root_.scala.Option[Map[String, _root_.io.circe.Json]] = None, multipleOf: _root_.scala.Option[Long] = None, maximum: _root_.scala.Option[Long] = None, exclusiveMaximum: _root_.scala.Option[Boolean] = None, minimum: _root_.scala.Option[Long] = None, exclusiveMinimum: _root_.scala.Option[Boolean] = None, maxLength: _root_.scala.Option[Int] = None, minLength: _root_.scala.Option[Int] = None, pattern: _root_.scala.Option[String] = None, maxItems: _root_.scala.Option[Int] = None, minItems: _root_.scala.Option[Int] = None, uniqueItems: _root_.scala.Option[Boolean] = None, maxProperties: _root_.scala.Option[Int] = None, minProperties: _root_.scala.Option[Int] = None, required: _root_.scala.Option[Seq[String]] = None, `enum`: _root_.scala.Option[Seq[Map[String, _root_.io.circe.Json]]] = None, `type`: _root_.scala.Option[Seq[String]] = None, items: _root_.scala.Option[io.apibuilder.swagger.v0.models.Schema] = None, allOf: _root_.scala.Option[Seq[io.apibuilder.swagger.v0.models.Schema]] = None, properties: _root_.scala.Option[Map[String, io.apibuilder.swagger.v0.models.Schema]] = None, additionalProperties: _root_.scala.Option[io.apibuilder.swagger.v0.models.Schema] = None, discriminator: _root_.scala.Option[String] = None, readOnly: _root_.scala.Option[Boolean] = None, xml: _root_.scala.Option[io.apibuilder.swagger.v0.models.Xml] = None, externalDocs: _root_.scala.Option[io.apibuilder.swagger.v0.models.ExternalDocumentation] = None, example: _root_.scala.Option[Map[String, _root_.io.circe.Json]] = None ) /** * TODO: Consider making this a union type of the three different schemes (and * their required fields) * * @param name Required for apiKey * @param in Required for apiKey * @param flow Required for oauth2 * @param authorizationUrl Required for oauth2 * @param tokenUrl Required for oauth2 * @param scopes Required for oauth2 */ final case class SecurityScheme( `type`: io.apibuilder.swagger.v0.models.SecuritySchemeType, description: _root_.scala.Option[String] = None, name: _root_.scala.Option[String] = None, in: _root_.scala.Option[io.apibuilder.swagger.v0.models.ApiKeyInType] = None, flow: _root_.scala.Option[String] = None, authorizationUrl: _root_.scala.Option[String] = None, tokenUrl: _root_.scala.Option[String] = None, scopes: _root_.scala.Option[Map[String, String]] = None ) final case class Swagger( swagger: String, info: io.apibuilder.swagger.v0.models.Info, host: _root_.scala.Option[String] = None, basePath: _root_.scala.Option[String] = None, schemes: _root_.scala.Option[Seq[String]] = None, consumes: _root_.scala.Option[Seq[String]] = None, produces: _root_.scala.Option[Seq[String]] = None, paths: Map[String, io.apibuilder.swagger.v0.models.PathItem], definitions: _root_.scala.Option[Map[String, io.apibuilder.swagger.v0.models.Schema]] = None, parameters: _root_.scala.Option[Map[String, io.apibuilder.swagger.v0.models.Parameter]] = None, responses: _root_.scala.Option[Map[String, io.apibuilder.swagger.v0.models.Response]] = None, securityDefinitions: _root_.scala.Option[Map[String, io.apibuilder.swagger.v0.models.SecurityScheme]] = None, security: _root_.scala.Option[Map[String, String]] = None, tags: _root_.scala.Option[Seq[io.apibuilder.swagger.v0.models.Tag]] = None, externalDocs: _root_.scala.Option[io.apibuilder.swagger.v0.models.ExternalDocumentation] = None ) final case class Tag( name: String, description: _root_.scala.Option[String] = None, externalDocs: _root_.scala.Option[io.apibuilder.swagger.v0.models.ExternalDocumentation] = None ) final case class Xml( name: _root_.scala.Option[String] = None, namespace: _root_.scala.Option[String] = None, prefix: _root_.scala.Option[String] = None, attribute: _root_.scala.Option[Boolean] = None, wrapped: _root_.scala.Option[Boolean] = None ) /** * Provides future compatibility in clients - in the future, when a type is added * to the union ParameterOrRef, it will need to be handled in the client code. This * implementation will deserialize these future types as an instance of this class. * * @param description Information about the type that we received that is undefined in this version of * the client. */ final case class ParameterOrRefUndefinedType( description: String ) extends ParameterOrRef /** * Provides future compatibility in clients - in the future, when a type is added * to the union ResponseOrRef, it will need to be handled in the client code. This * implementation will deserialize these future types as an instance of this class. * * @param description Information about the type that we received that is undefined in this version of * the client. */ final case class ResponseOrRefUndefinedType( description: String ) extends ResponseOrRef sealed trait ApiKeyInType extends _root_.scala.Product with _root_.scala.Serializable object ApiKeyInType { case object Query extends ApiKeyInType { override def toString = "query" } case object Header extends ApiKeyInType { override def toString = "header" } /** * 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 ApiKeyInType /** * 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[ApiKeyInType] = scala.List(Query, Header) private val byName: Map[String, ApiKeyInType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): ApiKeyInType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[ApiKeyInType] = byName.get(value.toLowerCase) } sealed trait CollectionFormatType extends _root_.scala.Product with _root_.scala.Serializable object CollectionFormatType { case object Csv extends CollectionFormatType { override def toString = "csv" } case object Ssv extends CollectionFormatType { override def toString = "ssv" } case object Tsv extends CollectionFormatType { override def toString = "tsv" } case object Pipes extends CollectionFormatType { override def toString = "pipes" } /** * 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 CollectionFormatType /** * 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[CollectionFormatType] = scala.List(Csv, Ssv, Tsv, Pipes) private val byName: Map[String, CollectionFormatType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): CollectionFormatType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[CollectionFormatType] = byName.get(value.toLowerCase) } sealed trait FormatType extends _root_.scala.Product with _root_.scala.Serializable object FormatType { case object Binary extends FormatType { override def toString = "binary" } case object Byte extends FormatType { override def toString = "byte" } case object Date extends FormatType { override def toString = "date" } case object DateTime extends FormatType { override def toString = "date-time" } case object Double extends FormatType { override def toString = "double" } case object Float extends FormatType { override def toString = "float" } case object Int32 extends FormatType { override def toString = "int32" } case object Int64 extends FormatType { override def toString = "int64" } case object Password extends FormatType { override def toString = "password" } /** * 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 FormatType /** * 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[FormatType] = scala.List(Binary, Byte, Date, DateTime, Double, Float, Int32, Int64, Password) private val byName: Map[String, FormatType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): FormatType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[FormatType] = byName.get(value.toLowerCase) } sealed trait ItemsType extends _root_.scala.Product with _root_.scala.Serializable object ItemsType { case object String extends ItemsType { override def toString = "string" } case object Number extends ItemsType { override def toString = "number" } case object Integer extends ItemsType { override def toString = "integer" } case object Boolean extends ItemsType { override def toString = "boolean" } case object Array extends ItemsType { override def toString = "array" } /** * 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 ItemsType /** * 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[ItemsType] = scala.List(String, Number, Integer, Boolean, Array) private val byName: Map[String, ItemsType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): ItemsType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[ItemsType] = byName.get(value.toLowerCase) } sealed trait ParameterInType extends _root_.scala.Product with _root_.scala.Serializable object ParameterInType { case object Query extends ParameterInType { override def toString = "query" } case object Header extends ParameterInType { override def toString = "header" } case object Path extends ParameterInType { override def toString = "path" } case object FormData extends ParameterInType { override def toString = "formData" } case object Body extends ParameterInType { override def toString = "body" } /** * 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 ParameterInType /** * 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[ParameterInType] = scala.List(Query, Header, Path, FormData, Body) private val byName: Map[String, ParameterInType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): ParameterInType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[ParameterInType] = byName.get(value.toLowerCase) } sealed trait SecuritySchemeType extends _root_.scala.Product with _root_.scala.Serializable object SecuritySchemeType { case object Basic extends SecuritySchemeType { override def toString = "basic" } case object ApiKey extends SecuritySchemeType { override def toString = "apiKey" } case object Oauth2 extends SecuritySchemeType { override def toString = "oauth2" } /** * 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 SecuritySchemeType /** * 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[SecuritySchemeType] = scala.List(Basic, ApiKey, Oauth2) private val byName: Map[String, SecuritySchemeType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): SecuritySchemeType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[SecuritySchemeType] = byName.get(value.toLowerCase) } }