/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.4.67 * User agent: apibuilder app.apibuilder.io/flow/github/0.4.67/scala_mock_models */ package io.flow.github.v0.mock { object Factories { def randomString(length: Int = 24): String = { _root_.scala.util.Random.alphanumeric.take(length).mkString } def makeContentsType(): io.flow.github.v0.models.ContentsType = io.flow.github.v0.models.ContentsType.File def makeEncoding(): io.flow.github.v0.models.Encoding = io.flow.github.v0.models.Encoding.Base64 def makeHookEvent(): io.flow.github.v0.models.HookEvent = io.flow.github.v0.models.HookEvent.Push def makeNodeType(): io.flow.github.v0.models.NodeType = io.flow.github.v0.models.NodeType.Blob def makeOwnerType(): io.flow.github.v0.models.OwnerType = io.flow.github.v0.models.OwnerType.User def makeVisibility(): io.flow.github.v0.models.Visibility = io.flow.github.v0.models.Visibility.All def makeBlob(): io.flow.github.v0.models.Blob = io.flow.github.v0.models.Blob( content = Factories.randomString(24), encoding = io.flow.github.v0.mock.Factories.makeEncoding(), url = Factories.randomString(24), sha = Factories.randomString(24), size = 1L ) def makeBlobCreated(): io.flow.github.v0.models.BlobCreated = io.flow.github.v0.models.BlobCreated( url = Factories.randomString(24), sha = Factories.randomString(24) ) def makeBlobForm(): io.flow.github.v0.models.BlobForm = io.flow.github.v0.models.BlobForm( content = Factories.randomString(24), encoding = io.flow.github.v0.mock.Factories.makeEncoding() ) def makeCommit(): io.flow.github.v0.models.Commit = io.flow.github.v0.models.Commit( sha = Factories.randomString(24), url = Factories.randomString(24), htmlUrl = Factories.randomString(24), author = io.flow.github.v0.mock.Factories.makePerson(), committer = io.flow.github.v0.mock.Factories.makePerson(), tree = io.flow.github.v0.mock.Factories.makeTreeSummary(), message = Factories.randomString(24), parents = Nil ) def makeCommitForm(): io.flow.github.v0.models.CommitForm = io.flow.github.v0.models.CommitForm( message = Factories.randomString(24), tree = Factories.randomString(24), parents = Nil, author = io.flow.github.v0.mock.Factories.makePerson(), committer = io.flow.github.v0.mock.Factories.makePerson() ) def makeCommitResponse(): io.flow.github.v0.models.CommitResponse = io.flow.github.v0.models.CommitResponse( sha = Factories.randomString(24), url = Factories.randomString(24), author = io.flow.github.v0.mock.Factories.makePerson(), committer = io.flow.github.v0.mock.Factories.makePerson(), message = Factories.randomString(24), tree = io.flow.github.v0.mock.Factories.makeTreeSummary(), parents = Nil ) def makeCommitSummary(): io.flow.github.v0.models.CommitSummary = io.flow.github.v0.models.CommitSummary( sha = Factories.randomString(24), url = Factories.randomString(24) ) def makeContents(): io.flow.github.v0.models.Contents = io.flow.github.v0.models.Contents( `type` = io.flow.github.v0.mock.Factories.makeContentsType(), encoding = io.flow.github.v0.mock.Factories.makeEncoding(), size = 1L, name = Factories.randomString(24), path = Factories.randomString(24), content = None, sha = Factories.randomString(24), url = Factories.randomString(24), gitUrl = Factories.randomString(24), htmlUrl = Factories.randomString(24), downloadUrl = Factories.randomString(24) ) def makeCreateTreeForm(): io.flow.github.v0.models.CreateTreeForm = io.flow.github.v0.models.CreateTreeForm( baseTree = Factories.randomString(24), tree = Nil ) def makeCreateTreeResponse(): io.flow.github.v0.models.CreateTreeResponse = io.flow.github.v0.models.CreateTreeResponse( sha = Factories.randomString(24), url = Factories.randomString(24), treeResult = io.flow.github.v0.mock.Factories.makeTree() ) def makeError(): io.flow.github.v0.models.Error = io.flow.github.v0.models.Error( resource = Factories.randomString(24), field = Factories.randomString(24), code = Factories.randomString(24) ) def makeGithubObject(): io.flow.github.v0.models.GithubObject = io.flow.github.v0.models.GithubObject( `type` = Factories.randomString(24), sha = Factories.randomString(24), url = Factories.randomString(24) ) def makeHook(): io.flow.github.v0.models.Hook = io.flow.github.v0.models.Hook( id = 1L, url = Factories.randomString(24), testUrl = Factories.randomString(24), pingUrl = Factories.randomString(24), name = Factories.randomString(24), events = Nil, active = true, config = io.flow.github.v0.mock.Factories.makeHookConfig(), updatedAt = _root_.org.joda.time.DateTime.now, createdAt = _root_.org.joda.time.DateTime.now ) def makeHookConfig(): io.flow.github.v0.models.HookConfig = io.flow.github.v0.models.HookConfig( url = None, contentType = None ) def makeHookForm(): io.flow.github.v0.models.HookForm = io.flow.github.v0.models.HookForm( name = Factories.randomString(24), config = io.flow.github.v0.mock.Factories.makeHookConfig(), events = Nil, active = true ) def makeNode(): io.flow.github.v0.models.Node = io.flow.github.v0.models.Node( path = Factories.randomString(24), mode = Factories.randomString(24), `type` = io.flow.github.v0.mock.Factories.makeNodeType(), size = 1L, sha = Factories.randomString(24), url = Factories.randomString(24) ) def makeNodeForm(): io.flow.github.v0.models.NodeForm = io.flow.github.v0.models.NodeForm( path = Factories.randomString(24), mode = Factories.randomString(24), `type` = io.flow.github.v0.mock.Factories.makeNodeType(), sha = Factories.randomString(24) ) def makePerson(): io.flow.github.v0.models.Person = io.flow.github.v0.models.Person( name = Factories.randomString(24), email = Factories.randomString(24), date = _root_.org.joda.time.DateTime.now ) def makePullRequest(): io.flow.github.v0.models.PullRequest = io.flow.github.v0.models.PullRequest( id = 1L, url = Factories.randomString(24), number = 1L, htmlUrl = Factories.randomString(24), head = io.flow.github.v0.mock.Factories.makePullRequestHead() ) def makePullRequestForm(): io.flow.github.v0.models.PullRequestForm = io.flow.github.v0.models.PullRequestForm( title = Factories.randomString(24), head = Factories.randomString(24), base = Factories.randomString(24), body = None ) def makePullRequestHead(): io.flow.github.v0.models.PullRequestHead = io.flow.github.v0.models.PullRequestHead( ref = Factories.randomString(24) ) def makeRef(): io.flow.github.v0.models.Ref = io.flow.github.v0.models.Ref( ref = Factories.randomString(24), url = Factories.randomString(24), `object` = io.flow.github.v0.mock.Factories.makeGithubObject() ) def makeRefForm(): io.flow.github.v0.models.RefForm = io.flow.github.v0.models.RefForm( ref = Factories.randomString(24), sha = Factories.randomString(24) ) def makeRefUpdateForm(): io.flow.github.v0.models.RefUpdateForm = io.flow.github.v0.models.RefUpdateForm( sha = Factories.randomString(24) ) def makeRepository(): io.flow.github.v0.models.Repository = io.flow.github.v0.models.Repository( id = 1L, owner = io.flow.github.v0.mock.Factories.makeUser(), name = Factories.randomString(24), fullName = Factories.randomString(24), `private` = true, description = None, url = Factories.randomString(24), htmlUrl = Factories.randomString(24), defaultBranch = Factories.randomString(24) ) def makeTag(): io.flow.github.v0.models.Tag = io.flow.github.v0.models.Tag( tag = Factories.randomString(24), sha = Factories.randomString(24), url = Factories.randomString(24), message = Factories.randomString(24), tagger = io.flow.github.v0.mock.Factories.makeTagger(), `object` = io.flow.github.v0.mock.Factories.makeGithubObject() ) def makeTagForm(): io.flow.github.v0.models.TagForm = io.flow.github.v0.models.TagForm( tag = Factories.randomString(24), message = Factories.randomString(24), `object` = Factories.randomString(24), `type` = Factories.randomString(24), tagger = io.flow.github.v0.mock.Factories.makeTagger() ) def makeTagSummary(): io.flow.github.v0.models.TagSummary = io.flow.github.v0.models.TagSummary( name = Factories.randomString(24), commit = io.flow.github.v0.mock.Factories.makeCommitSummary() ) def makeTagger(): io.flow.github.v0.models.Tagger = io.flow.github.v0.models.Tagger( name = Factories.randomString(24), email = Factories.randomString(24), date = _root_.org.joda.time.DateTime.now ) def makeTree(): io.flow.github.v0.models.Tree = io.flow.github.v0.models.Tree( sha = Factories.randomString(24), url = Factories.randomString(24), truncated = true, tree = Nil ) def makeTreeForm(): io.flow.github.v0.models.TreeForm = io.flow.github.v0.models.TreeForm( path = Factories.randomString(24), mode = Factories.randomString(24), `type` = io.flow.github.v0.mock.Factories.makeNodeType(), sha = None, content = None ) def makeTreeResult(): io.flow.github.v0.models.TreeResult = io.flow.github.v0.models.TreeResult( path = Factories.randomString(24), mode = Factories.randomString(24), `type` = io.flow.github.v0.mock.Factories.makeNodeType(), size = 1L, sha = Factories.randomString(24), url = Factories.randomString(24) ) def makeTreeSummary(): io.flow.github.v0.models.TreeSummary = io.flow.github.v0.models.TreeSummary( url = Factories.randomString(24), sha = Factories.randomString(24) ) def makeUnprocessableEntity(): io.flow.github.v0.models.UnprocessableEntity = io.flow.github.v0.models.UnprocessableEntity( message = Factories.randomString(24), errors = None ) def makeUser(): io.flow.github.v0.models.User = io.flow.github.v0.models.User( id = 1L, login = Factories.randomString(24), name = None, email = None, avatarUrl = None, gravatarId = None, url = Factories.randomString(24), htmlUrl = Factories.randomString(24), `type` = io.flow.github.v0.mock.Factories.makeOwnerType() ) def makeUserEmail(): io.flow.github.v0.models.UserEmail = io.flow.github.v0.models.UserEmail( email = Factories.randomString(24), verified = true, primary = true ) def makeUserOrg(): io.flow.github.v0.models.UserOrg = io.flow.github.v0.models.UserOrg( login = Factories.randomString(24) ) } }