/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.4.67 * User agent: apibuilder app.apibuilder.io/flow/github/0.4.67/play_2_6 */ package io.flow.github.v0.models { final case class Blob( content: String, encoding: io.flow.github.v0.models.Encoding, url: String, sha: String, size: Long ) final case class BlobCreated( url: String, sha: String ) final case class BlobForm( content: String, encoding: io.flow.github.v0.models.Encoding = io.flow.github.v0.models.Encoding.Utf8 ) final case class Commit( sha: String, url: String, htmlUrl: String, author: io.flow.github.v0.models.Person, committer: io.flow.github.v0.models.Person, tree: io.flow.github.v0.models.TreeSummary, message: String, parents: Seq[io.flow.github.v0.models.CommitSummary] ) final case class CommitForm( message: String, tree: String, parents: Seq[String], author: io.flow.github.v0.models.Person, committer: io.flow.github.v0.models.Person ) final case class CommitResponse( sha: String, url: String, author: io.flow.github.v0.models.Person, committer: io.flow.github.v0.models.Person, message: String, tree: io.flow.github.v0.models.TreeSummary, parents: Seq[io.flow.github.v0.models.TreeSummary] ) final case class CommitSummary( sha: String, url: String ) /** * @param content If file, then present */ final case class Contents( `type`: io.flow.github.v0.models.ContentsType, encoding: io.flow.github.v0.models.Encoding, size: Long, name: String, path: String, content: _root_.scala.Option[String] = None, sha: String, url: String, gitUrl: String, htmlUrl: String, downloadUrl: String ) final case class CreateTreeForm( baseTree: String, tree: Seq[io.flow.github.v0.models.TreeForm] ) final case class CreateTreeResponse( sha: String, url: String, treeResult: io.flow.github.v0.models.Tree ) final case class Error( resource: String, field: String, code: String ) final case class GithubObject( `type`: String, sha: String, url: String ) /** * See https://developer.github.com/v3/repos/hooks/#create-a-hook */ final case class Hook( id: Long, url: String, testUrl: String, pingUrl: String, name: String, events: Seq[io.flow.github.v0.models.HookEvent], active: Boolean, config: io.flow.github.v0.models.HookConfig, updatedAt: _root_.java.time.OffsetDateTime, createdAt: _root_.java.time.OffsetDateTime ) final case class HookConfig( url: _root_.scala.Option[String] = None, contentType: _root_.scala.Option[String] = None ) final case class HookForm( name: String, config: io.flow.github.v0.models.HookConfig, events: Seq[io.flow.github.v0.models.HookEvent], active: Boolean ) /** * @param mode 100644 file (blob), 100755 executable (blob), 040000 subdirectory (tree), 160000 * submodule (commit) */ final case class Node( path: String, mode: String, `type`: io.flow.github.v0.models.NodeType, size: Long, sha: String, url: String ) /** * @param mode 100644 file (blob), 100755 executable (blob), 040000 subdirectory (tree), 160000 * submodule (commit) */ final case class NodeForm( path: String, mode: String, `type`: io.flow.github.v0.models.NodeType, sha: String ) final case class Person( name: String, email: String, date: _root_.java.time.OffsetDateTime ) final case class PullRequest( id: Long, url: String, number: Long, htmlUrl: String, head: io.flow.github.v0.models.PullRequestHead ) final case class PullRequestForm( title: String, head: String, base: String, body: _root_.scala.Option[String] = None ) final case class PullRequestHead( ref: String ) final case class Ref( ref: String, url: String, `object`: io.flow.github.v0.models.GithubObject ) final case class RefForm( ref: String, sha: String ) final case class RefUpdateForm( sha: String ) final case class Repository( id: Long, owner: io.flow.github.v0.models.User, name: String, fullName: String, `private`: Boolean, description: _root_.scala.Option[String] = None, url: String, htmlUrl: String, defaultBranch: String ) final case class Tag( tag: String, sha: String, url: String, message: String, tagger: io.flow.github.v0.models.Tagger, `object`: io.flow.github.v0.models.GithubObject ) /** * @param `object` The SHA of the git object this is tagging */ final case class TagForm( tag: String, message: String, `object`: String, `type`: String = "commit", tagger: io.flow.github.v0.models.Tagger ) final case class TagSummary( name: String, commit: io.flow.github.v0.models.CommitSummary ) final case class Tagger( name: String, email: String, date: _root_.java.time.OffsetDateTime ) final case class Tree( sha: String, url: String, truncated: Boolean, tree: Seq[io.flow.github.v0.models.Node] ) /** * @param mode 100644 file (blob), 100755 executable (blob), 040000 subdirectory (tree), 160000 * submodule (commit) */ final case class TreeForm( path: String, mode: String, `type`: io.flow.github.v0.models.NodeType, sha: _root_.scala.Option[String] = None, content: _root_.scala.Option[String] = None ) /** * @param mode 100644 file (blob), 100755 executable (blob), 040000 subdirectory (tree), 160000 * submodule (commit) */ final case class TreeResult( path: String, mode: String, `type`: io.flow.github.v0.models.NodeType, size: Long, sha: String, url: String ) final case class TreeSummary( url: String, sha: String ) final case class UnprocessableEntity( message: String, errors: _root_.scala.Option[Seq[io.flow.github.v0.models.Error]] = None ) final case class User( id: Long, login: String, name: _root_.scala.Option[String] = None, email: _root_.scala.Option[String] = None, avatarUrl: _root_.scala.Option[String] = None, gravatarId: _root_.scala.Option[String] = None, url: String, htmlUrl: String, `type`: io.flow.github.v0.models.OwnerType ) final case class UserEmail( email: String, verified: Boolean, primary: Boolean ) final case class UserOrg( login: String ) sealed trait ContentsType extends _root_.scala.Product with _root_.scala.Serializable object ContentsType { case object File extends ContentsType { override def toString = "file" } case object Dir extends ContentsType { override def toString = "dir" } case object Symlink extends ContentsType { override def toString = "symlink" } case object Submodule extends ContentsType { override def toString = "submodule" } /** * 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 ContentsType /** * 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[ContentsType] = scala.List(File, Dir, Symlink, Submodule) private val byName: Map[String, ContentsType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): ContentsType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[ContentsType] = byName.get(value.toLowerCase) } sealed trait Encoding extends _root_.scala.Product with _root_.scala.Serializable object Encoding { case object Base64 extends Encoding { override def toString = "base64" } case object Utf8 extends Encoding { override def toString = "utf-8" } /** * 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 Encoding /** * 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[Encoding] = scala.List(Base64, Utf8) private val byName: Map[String, Encoding] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): Encoding = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[Encoding] = byName.get(value.toLowerCase) } sealed trait HookEvent extends _root_.scala.Product with _root_.scala.Serializable object HookEvent { case object Push extends HookEvent { override def toString = "push" } case object PullRequest extends HookEvent { override def toString = "pull_request" } /** * 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 HookEvent /** * 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[HookEvent] = scala.List(Push, PullRequest) private val byName: Map[String, HookEvent] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): HookEvent = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[HookEvent] = byName.get(value.toLowerCase) } sealed trait NodeType extends _root_.scala.Product with _root_.scala.Serializable object NodeType { case object Blob extends NodeType { override def toString = "blob" } case object Tree extends NodeType { override def toString = "tree" } case object Commit extends NodeType { override def toString = "commit" } /** * 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 NodeType /** * 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[NodeType] = scala.List(Blob, Tree, Commit) private val byName: Map[String, NodeType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): NodeType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[NodeType] = byName.get(value.toLowerCase) } sealed trait OwnerType extends _root_.scala.Product with _root_.scala.Serializable object OwnerType { case object User extends OwnerType { override def toString = "User" } /** * 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 OwnerType /** * 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[OwnerType] = scala.List(User) private val byName: Map[String, OwnerType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): OwnerType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[OwnerType] = byName.get(value.toLowerCase) } sealed trait Visibility extends _root_.scala.Product with _root_.scala.Serializable object Visibility { case object All extends Visibility { override def toString = "all" } case object Public extends Visibility { override def toString = "public" } case object Private extends Visibility { override def toString = "private" } /** * 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 Visibility /** * 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[Visibility] = scala.List(All, Public, Private) private val byName: Map[String, Visibility] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): Visibility = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[Visibility] = byName.get(value.toLowerCase) } }