/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.2.16 * apibuilder 0.15.11 app.apibuilder.io/flow/github/0.2.16/http4s_0_15 */ package io.flow.github.v0.mock { trait Client extends io.flow.github.v0.interfaces.Client { val baseUrl: org.http4s.Uri = org.http4s.Uri.unsafeFromString("http://mock.localhost") override def blobs: io.flow.github.v0.Blobs = MockBlobsImpl override def commits: io.flow.github.v0.Commits = MockCommitsImpl override def contents: io.flow.github.v0.Contents = MockContentsImpl override def hooks: io.flow.github.v0.Hooks = MockHooksImpl override def pullRequests: io.flow.github.v0.PullRequests = MockPullRequestsImpl override def refs: io.flow.github.v0.Refs = MockRefsImpl override def repositories: io.flow.github.v0.Repositories = MockRepositoriesImpl override def tags: io.flow.github.v0.Tags = MockTagsImpl override def trees: io.flow.github.v0.Trees = MockTreesImpl override def users: io.flow.github.v0.Users = MockUsersImpl override def userEmails: io.flow.github.v0.UserEmails = MockUserEmailsImpl } object MockBlobsImpl extends MockBlobs trait MockBlobs extends io.flow.github.v0.Blobs { def getBySha( owner: String, repo: String, sha: String, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.Blob] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makeBlob() } def post( owner: String, repo: String, blobForm: io.flow.github.v0.models.BlobForm, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.BlobCreated] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makeBlobCreated() } } object MockCommitsImpl extends MockCommits trait MockCommits extends io.flow.github.v0.Commits { def getBySha( owner: String, repo: String, sha: String, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.Commit] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makeCommit() } def post( owner: String, repo: String, commitForm: io.flow.github.v0.models.CommitForm, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.CommitResponse] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makeCommitResponse() } } object MockContentsImpl extends MockContents trait MockContents extends io.flow.github.v0.Contents { def getReadme( owner: String, repo: String, ref: String = "master", requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.Contents] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makeContents() } def getContentsByPath( owner: String, repo: String, path: String, ref: String = "master", requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.Contents] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makeContents() } } object MockHooksImpl extends MockHooks trait MockHooks extends io.flow.github.v0.Hooks { def get( owner: String, repo: String, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[Seq[io.flow.github.v0.models.Hook]] = scalaz.concurrent.Task.now { Nil } def getById( owner: String, repo: String, id: Long, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.Hook] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makeHook() } def post( owner: String, repo: String, hookForm: io.flow.github.v0.models.HookForm, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.Hook] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makeHook() } def deleteById( owner: String, repo: String, id: Long, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[Unit] = scalaz.concurrent.Task.now { // unit type } } object MockPullRequestsImpl extends MockPullRequests trait MockPullRequests extends io.flow.github.v0.PullRequests { def post( owner: String, repo: String, pullRequestForm: io.flow.github.v0.models.PullRequestForm, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.PullRequest] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makePullRequest() } def get( owner: String, repo: String, page: Long = 1L, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[Seq[io.flow.github.v0.models.PullRequest]] = scalaz.concurrent.Task.now { Nil } } object MockRefsImpl extends MockRefs trait MockRefs extends io.flow.github.v0.Refs { def get( owner: String, repo: String, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[Seq[io.flow.github.v0.models.Ref]] = scalaz.concurrent.Task.now { Nil } def getByRef( owner: String, repo: String, ref: String, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.Ref] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makeRef() } def post( owner: String, repo: String, refForm: io.flow.github.v0.models.RefForm, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.Ref] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makeRef() } def putByRef( owner: String, repo: String, ref: String, refUpdateForm: io.flow.github.v0.models.RefUpdateForm, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.Ref] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makeRef() } } object MockRepositoriesImpl extends MockRepositories trait MockRepositories extends io.flow.github.v0.Repositories { def getUserAndRepos( page: Long = 1L, visibility: io.flow.github.v0.models.Visibility = io.flow.github.v0.models.Visibility.All, affiliation: _root_.scala.Option[String] = None, `type`: _root_.scala.Option[String] = None, sort: String = "full_name", direction: String = "asc", requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[Seq[io.flow.github.v0.models.Repository]] = scalaz.concurrent.Task.now { Nil } /** * List public repositories for the specified user. */ def getUsersAndReposByUsername( username: String, page: Long = 1L, `type`: String = "owner", sort: String = "full_name", direction: String = "asc", requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[Seq[io.flow.github.v0.models.Repository]] = scalaz.concurrent.Task.now { Nil } /** * List repositories for the specified org. */ def getOrgsAndReposByOrg( org: String, page: Long = 1L, `type`: String = "all", sort: String = "full_name", direction: String = "asc", requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[Seq[io.flow.github.v0.models.Repository]] = scalaz.concurrent.Task.now { Nil } } object MockTagsImpl extends MockTags trait MockTags extends io.flow.github.v0.Tags { def getTags( owner: String, repo: String, page: Long = 1L, perPage: Long = 30L, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[Seq[io.flow.github.v0.models.TagSummary]] = scalaz.concurrent.Task.now { Nil } def getTagsBySha( owner: String, repo: String, sha: String, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.Tag] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makeTag() } def postGitAndTags( owner: String, repo: String, tagForm: io.flow.github.v0.models.TagForm, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.Tag] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makeTag() } } object MockTreesImpl extends MockTrees trait MockTrees extends io.flow.github.v0.Trees { def post( owner: String, repo: String, createTreeForm: io.flow.github.v0.models.CreateTreeForm, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.CreateTreeResponse] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makeCreateTreeResponse() } } object MockUsersImpl extends MockUsers trait MockUsers extends io.flow.github.v0.Users { def getUser( requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[io.flow.github.v0.models.User] = scalaz.concurrent.Task.now { io.flow.github.v0.mock.Factories.makeUser() } } object MockUserEmailsImpl extends MockUserEmails trait MockUserEmails extends io.flow.github.v0.UserEmails { def get( requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[Seq[io.flow.github.v0.models.UserEmail]] = scalaz.concurrent.Task.now { Nil } } 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_.java.time.Instant.now, createdAt = _root_.java.time.Instant.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_.java.time.Instant.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) ) 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_.java.time.Instant.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 ) } }