/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.1 * User agent: apibuilder app.apibuilder.io/apicollective/examples-graphql-users/0.0.1/http4s_0_23 */ package io.apibuilder.examples.graphql.users.mock { class Client[F[_]: cats.Applicative] extends io.apibuilder.examples.graphql.users.interfaces.Client[F] { val baseUrl: org.http4s.Uri = org.http4s.Uri.unsafeFromString("http://mock.localhost") override def users: io.apibuilder.examples.graphql.users.Users[F] = new MockUsers[F] } class MockUsers[F[_]: cats.Applicative] extends io.apibuilder.examples.graphql.users.Users[F] { def getById( id: _root_.java.util.UUID, requestHeaders: Seq[(String, String)] = Nil ): F[io.apibuilder.examples.graphql.users.models.User] = cats.Applicative[F].pure { io.apibuilder.examples.graphql.users.mock.Factories.makeUser() } def post( userForm: io.apibuilder.examples.graphql.users.models.UserForm, requestHeaders: Seq[(String, String)] = Nil ): F[io.apibuilder.examples.graphql.users.models.User] = cats.Applicative[F].pure { io.apibuilder.examples.graphql.users.mock.Factories.makeUser() } def patch( userPatchForm: io.apibuilder.examples.graphql.users.models.UserPatchForm, requestHeaders: Seq[(String, String)] = Nil ): F[io.apibuilder.examples.graphql.users.models.User] = cats.Applicative[F].pure { io.apibuilder.examples.graphql.users.mock.Factories.makeUser() } def deleteById( id: _root_.java.util.UUID, requestHeaders: Seq[(String, String)] = Nil ): F[Unit] = cats.Applicative[F].pure { // unit type } } object Factories { def randomString(length: Int = 24): String = { _root_.scala.util.Random.alphanumeric.take(length).mkString } def makeUserStatus(): io.apibuilder.examples.graphql.users.models.UserStatus = io.apibuilder.examples.graphql.users.models.UserStatus.Active def makeUser(): io.apibuilder.examples.graphql.users.models.User = io.apibuilder.examples.graphql.users.models.User( id = _root_.java.util.UUID.randomUUID, status = io.apibuilder.examples.graphql.users.mock.Factories.makeUserStatus(), email = Factories.randomString(24), name = None ) def makeUserEmailPatchForm(): io.apibuilder.examples.graphql.users.models.UserEmailPatchForm = io.apibuilder.examples.graphql.users.models.UserEmailPatchForm( email = Factories.randomString(24) ) def makeUserForm(): io.apibuilder.examples.graphql.users.models.UserForm = io.apibuilder.examples.graphql.users.models.UserForm( status = io.apibuilder.examples.graphql.users.mock.Factories.makeUserStatus(), email = Factories.randomString(24), name = None ) def makeUserStatusPatchForm(): io.apibuilder.examples.graphql.users.models.UserStatusPatchForm = io.apibuilder.examples.graphql.users.models.UserStatusPatchForm( status = io.apibuilder.examples.graphql.users.mock.Factories.makeUserStatus() ) def makeUserPatchForm(): io.apibuilder.examples.graphql.users.models.UserPatchForm = io.apibuilder.examples.graphql.users.mock.Factories.makeUserStatusPatchForm() } }