/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.16.74 * User agent: apibuilder app.apibuilder.io/apicollective/apibuilder-postman-collection-v2-1/0.16.74/http4s_0_17 */ package io.apibuilder.postman.collection.v21.v0.models { sealed trait Items extends _root_.scala.Product with _root_.scala.Serializable { def itemsType: ItemsType } /** * Defines the valid type values for the type Items */ sealed trait ItemsType extends _root_.scala.Product with _root_.scala.Serializable object ItemsType { case object Item extends ItemsType { override def toString = "item" } case object Folder extends ItemsType { override def toString = "folder" } final case class UNDEFINED(override val toString: String) extends ItemsType val all: scala.List[ItemsType] = scala.List(Item, Folder) 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) } final case class Auth( `type`: io.apibuilder.postman.collection.v21.v0.models.AuthEnum, basic: _root_.scala.Option[Seq[io.apibuilder.postman.collection.v21.v0.models.BasicAuth]] = None ) final case class BasicAuth( key: String, value: String, `type`: _root_.scala.Option[String] = None ) final case class Body( raw: _root_.scala.Option[String] = None, mode: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.BodyMode] = None, urlencoded: _root_.scala.Option[Seq[io.apibuilder.postman.collection.v21.v0.models.UrlEncoded]] = None, file: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.File] = None, formdata: _root_.scala.Option[Seq[io.apibuilder.postman.collection.v21.v0.models.FormParameter]] = None ) /** * @param info Detailed description of the info block * @param item Items are the basic unit for a Postman collection. You can think of them as * corresponding to a single API endpoint. Each Item has one request and may have * multiple API responses associated with it. * @param event Postman allows you to configure scripts to run when specific events occur. These * scripts are stored here, and can be referenced in the collection by their ID. * @param variable Collection variables allow you to define a set of variables, that are a part of * the collection, as opposed to environments, which are separate entities.Note: * Collection variables must not contain any sensitive information. * @param auth Represents authentication helpers provided by Postman */ final case class Collection( info: io.apibuilder.postman.collection.v21.v0.models.Info, item: Seq[io.apibuilder.postman.collection.v21.v0.models.Items], event: Seq[io.apibuilder.postman.collection.v21.v0.models.Event], variable: Seq[io.apibuilder.postman.collection.v21.v0.models.Variable], auth: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Auth] = None ) /** * @param content The content of the description goes here, as a raw string. * @param `type` Holds the mime type of the raw description content. E.g: 'text/markdown' or * 'text/html'. The type is used to correctly render the description when * generating documentation, or in the Postman app. */ final case class Description( content: _root_.scala.Option[String] = None, `type`: _root_.scala.Option[String] = None ) /** * @param listen Can be set to test or prerequest for test scripts or pre-request scripts * respectively. * @param id A unique identifier for the enclosing event. * @param disabled Indicates whether the event is disabled. If absent, the event is assumed to be * enabled */ final case class Event( listen: io.apibuilder.postman.collection.v21.v0.models.EventType, script: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Script] = None, id: _root_.scala.Option[String] = None, disabled: _root_.scala.Option[Boolean] = None ) final case class File( src: _root_.scala.Option[String] = None, content: _root_.scala.Option[String] = None ) /** * @param name A folder's friendly name is defined by this field. You would want to set this * field to a value that would allow you to easily identify this folder. */ final case class Folder( name: String, description: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Description] = None, variable: _root_.scala.Option[Seq[io.apibuilder.postman.collection.v21.v0.models.Variable]] = None, item: Seq[io.apibuilder.postman.collection.v21.v0.models.Item], event: _root_.scala.Option[Seq[io.apibuilder.postman.collection.v21.v0.models.Event]] = None, auth: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Auth] = None ) extends Items { override val itemsType: ItemsType = ItemsType.Folder } final case class FormParameter( key: String, value: _root_.scala.Option[String] = None, disabled: _root_.scala.Option[Boolean] = None, description: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Description] = None, contentType: _root_.scala.Option[String] = None, `type`: _root_.scala.Option[String] = None ) final case class Header( key: String, value: String, disabled: _root_.scala.Option[Boolean] = None, description: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Description] = None ) /** * @param name A collection's friendly name is defined by this field. You would want to set * this field to a value that would allow you to easily identify this collection * among a bunch of other collections, as such outlining its usage or content. * @param postmanId Every collection is identified by the unique value of this field. The value of * this field is usually easiest to generate using a UID generator function. If you * already have a collection, it is recommended that you maintain the same id since * changing the id usually implies that is a different collection than it was * originally.Note: This field exists for compatibility reasons with Collection * Format V1. * @param description A Description can be a raw text, or be an object, which holds the description * along with its format. * @param version Postman allows you to version your collections as they grow, and this field * holds the version number. While optional, it is recommended that you use this * field to its fullest extent! * @param schema This should ideally hold a link to the Postman schema that is used to validate * this collection. E.g: https://schema.getpostman.com/collection/v1 */ final case class Info( name: String, postmanId: _root_.scala.Option[String] = None, description: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Description] = None, version: _root_.scala.Option[String] = None, schema: String ) /** * @param id A unique ID that is used to identify collections internally * @param name A human readable identifier for the current item. * @param description A Description can be a raw text, or be an object, which holds the description * along with its format. * @param variable Collection variables allow you to define a set of variables, that are a part of * the collection, as opposed to environments, which are separate entities. * @param event Postman allows you to configure scripts to run when specific events occur. These * scripts are stored here, and can be referenced in the collection by their ID. */ final case class Item( id: _root_.scala.Option[String] = None, name: _root_.scala.Option[String] = None, description: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Description] = None, variable: _root_.scala.Option[Seq[io.apibuilder.postman.collection.v21.v0.models.Variable]] = None, event: _root_.scala.Option[Seq[io.apibuilder.postman.collection.v21.v0.models.Event]] = None, request: io.apibuilder.postman.collection.v21.v0.models.Request, response: _root_.scala.Option[Seq[io.apibuilder.postman.collection.v21.v0.models.Response]] = None ) extends Items { override val itemsType: ItemsType = ItemsType.Item } final case class QueryParam( key: _root_.scala.Option[String] = None, value: _root_.scala.Option[String] = None, disabled: _root_.scala.Option[Boolean] = None, description: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Description] = None ) final case class Request( url: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Url] = None, auth: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Auth] = None, method: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Method] = None, description: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Description] = None, header: _root_.scala.Option[Seq[io.apibuilder.postman.collection.v21.v0.models.Header]] = None, body: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Body] = None ) final case class Response( id: _root_.scala.Option[String] = None, name: _root_.scala.Option[String] = None, originalRequest: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Request] = None, responseTime: _root_.scala.Option[String] = None, header: _root_.scala.Option[Seq[io.apibuilder.postman.collection.v21.v0.models.Header]] = None, body: _root_.scala.Option[String] = None, status: _root_.scala.Option[String] = None, code: _root_.scala.Option[Int] = None ) /** * @param exec Body of the script in lines * @param `type` Type of the script. E.g: 'text/javascript' * @param id A unique, user defined identifier that can be used to refer to this script from * requests. * @param src If object, contains the complete broken-down URL for this request. If string, * contains the literal request URL. * @param name Script name */ final case class Script( exec: Seq[String], `type`: String = "text/javascript", id: _root_.scala.Option[String] = None, src: _root_.scala.Option[String] = None, name: _root_.scala.Option[String] = None ) /** * @param raw The string representation of the request URL, including the protocol, host, * path, hash, query parameter(s) and path variable(s). * @param protocol The protocol_ associated with the request, E.g: 'http' * @param host The host for the URL, E.g: api.yourdomain.com. Can be stored as a string or as * an array of strings. * @param port The port number present in this URL. An empty value implies 80/443 depending on * whether the protocol_ field contains http/https. * @param hash Contains the URL fragment (if any). Usually this is not transmitted over the * network, but it could be useful to store this in some cases. * @param variable Postman supports path variables with the syntax * /path/:variableName/to/somewhere. These variables are stored in this field. */ final case class Url( raw: _root_.scala.Option[String] = None, protocol: _root_.scala.Option[String] = None, host: _root_.scala.Option[Seq[String]] = None, path: _root_.scala.Option[Seq[String]] = None, port: _root_.scala.Option[String] = None, query: _root_.scala.Option[Seq[io.apibuilder.postman.collection.v21.v0.models.QueryParam]] = None, hash: _root_.scala.Option[String] = None, variable: _root_.scala.Option[Seq[io.apibuilder.postman.collection.v21.v0.models.Variable]] = None ) final case class UrlEncoded( key: String, value: _root_.scala.Option[String] = None, disabled: _root_.scala.Option[Boolean] = None, description: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Description] = None ) /** * Using variables in your Postman requests eliminates the need to duplicate * requests, which can save a lot of time. Variables can be defined, and referenced * to from any part of a request. * * @param id A variable ID is a unique user-defined value that identifies the variable within * a collection. In traditional terms, this would be a variable name. * @param key A variable key is a human friendly value that identifies the variable within a * collection. In traditional terms, this would be a variable name. * @param value The value that a variable holds in this collection. Ultimately, the variables * will be replaced by this value, when say running a set of requests from a * collection * @param `type` A variable may have multiple types. This field specifies the type of the * variable. * @param name Variable name * @param system When set to true, indicates that this variable has been set by Postman */ final case class Variable( id: _root_.scala.Option[String] = None, key: _root_.scala.Option[String] = None, value: _root_.scala.Option[String] = None, `type`: _root_.scala.Option[String] = None, name: _root_.scala.Option[String] = None, description: _root_.scala.Option[io.apibuilder.postman.collection.v21.v0.models.Description] = None, system: _root_.scala.Option[Boolean] = None, disabled: _root_.scala.Option[Boolean] = None ) /** * Provides future compatibility in clients - in the future, when a type is added * to the union Items, 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 ItemsUndefinedType( description: String ) extends Items { override val itemsType: ItemsType = ItemsType.UNDEFINED(description) } sealed trait AuthEnum extends _root_.scala.Product with _root_.scala.Serializable object AuthEnum { case object Awsv4 extends AuthEnum { override def toString = "awsv4" } case object Basic extends AuthEnum { override def toString = "basic" } case object Bearer extends AuthEnum { override def toString = "bearer" } case object Digest extends AuthEnum { override def toString = "digest" } case object Hawk extends AuthEnum { override def toString = "hawk" } case object Noauth extends AuthEnum { override def toString = "noauth" } case object Oauth1 extends AuthEnum { override def toString = "oauth1" } case object Oauth2 extends AuthEnum { override def toString = "oauth2" } case object Ntlm extends AuthEnum { override def toString = "ntlm" } /** * 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 AuthEnum /** * 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[AuthEnum] = scala.List(Awsv4, Basic, Bearer, Digest, Hawk, Noauth, Oauth1, Oauth2, Ntlm) private val byName: Map[String, AuthEnum] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): AuthEnum = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[AuthEnum] = byName.get(value.toLowerCase) } sealed trait BodyMode extends _root_.scala.Product with _root_.scala.Serializable object BodyMode { case object Raw extends BodyMode { override def toString = "raw" } case object Urlencoded extends BodyMode { override def toString = "urlencoded" } case object Formdata extends BodyMode { override def toString = "formdata" } case object File extends BodyMode { override def toString = "file" } /** * 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 BodyMode /** * 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[BodyMode] = scala.List(Raw, Urlencoded, Formdata, File) private val byName: Map[String, BodyMode] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): BodyMode = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[BodyMode] = byName.get(value.toLowerCase) } sealed trait EventType extends _root_.scala.Product with _root_.scala.Serializable object EventType { case object Test extends EventType { override def toString = "test" } case object Prerequest extends EventType { override def toString = "prerequest" } /** * 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 EventType /** * 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[EventType] = scala.List(Test, Prerequest) private val byName: Map[String, EventType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): EventType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[EventType] = byName.get(value.toLowerCase) } sealed trait Method extends _root_.scala.Product with _root_.scala.Serializable object Method { case object Get extends Method { override def toString = "GET" } case object Put extends Method { override def toString = "PUT" } case object Post extends Method { override def toString = "POST" } case object Patch extends Method { override def toString = "PATCH" } case object Delete extends Method { override def toString = "DELETE" } case object Copy extends Method { override def toString = "COPY" } case object Head extends Method { override def toString = "HEAD" } case object Options extends Method { override def toString = "OPTIONS" } case object Link extends Method { override def toString = "LINK" } case object Unlink extends Method { override def toString = "UNLINK" } case object Purge extends Method { override def toString = "PURGE" } case object Lock extends Method { override def toString = "LOCK" } case object Unlock extends Method { override def toString = "UNLOCK" } case object Propfind extends Method { override def toString = "PROPFIND" } case object View extends Method { override def toString = "VIEW" } /** * 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 Method /** * 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[Method] = scala.List(Get, Put, Post, Patch, Delete, Copy, Head, Options, Link, Unlink, Purge, Lock, Unlock, Propfind, View) private val byName: Map[String, Method] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): Method = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[Method] = byName.get(value.toLowerCase) } }