/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.2 * User agent: apibuilder app.apibuilder.io/bml/bml-gen-test-application/0.0.2/http4s_0_15 */ package org.bml.bml.gen.test.application.v0.mock { trait Client extends org.bml.bml.gen.test.application.v0.interfaces.Client { val baseUrl: org.http4s.Uri = org.http4s.Uri.unsafeFromString("http://mock.localhost") override def accounts: org.bml.bml.gen.test.application.v0.Accounts = MockAccountsImpl } object MockAccountsImpl extends MockAccounts trait MockAccounts extends org.bml.bml.gen.test.application.v0.Accounts { /** * @param authorization Standard Auth header pass a JWT token. * @param test is this call a test * @param testDefault is this call a test */ def post( testDefault: Boolean = false, accountForm: org.bml.bml.gen.test.application.v0.models.AccountForm, authorization: String, test: _root_.scala.Option[Boolean] = None, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[org.bml.bml.gen.test.application.v0.models.Account] = scalaz.concurrent.Task.now { org.bml.bml.gen.test.application.v0.mock.Factories.makeAccount() } /** * @param id The Universally Unique Identifier for an existing account resource. See RFC 4122 * @param authorization Standard Auth header pass a JWT token. */ def getById( id: _root_.java.util.UUID, authorization: String, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[org.bml.bml.gen.test.application.v0.models.Account] = scalaz.concurrent.Task.now { org.bml.bml.gen.test.application.v0.mock.Factories.makeAccount() } /** * A mock to test returning a raw array. This is not a practical method to * implement in a production environment. In production you would return a page * object but here we want to test to ensure generators are handling raw array * return value. * * @param id The Universally Unique Identifier for an existing account resource. See RFC 4122 * @param authorization Standard Auth header pass a JWT token. * @param name An optional test query parameter. * @param page An optional test query parameter. * @param count An optional test query parameter. */ def getFooById( id: _root_.java.util.UUID, name: _root_.scala.Option[String] = None, page: Int = 0, count: Int = 100, authorization: String, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[Seq[org.bml.bml.gen.test.application.v0.models.Account]] = scalaz.concurrent.Task.now { Nil } /** * A mock to test returning a raw array. This is not a practical method to * implement in a production environment. In production you would return a page * object but here we want to test to ensure generators are handling raw array * return value. * * @param authorization Standard Auth header pass a JWT token. * @param name An optional test query parameter. * @param page An optional test query parameter. * @param count An optional test query parameter. */ def get( name: _root_.scala.Option[String] = None, page: Int = 0, count: Int = 100, authorization: String, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[Seq[org.bml.bml.gen.test.application.v0.models.Account]] = scalaz.concurrent.Task.now { Nil } /** * Delete an Account resource by id. * * @param id The Universally Unique Identifier for an existing account resource. See RFC 4122 * @param authorization Standard Auth header pass a JWT token. */ def deleteById( id: _root_.java.util.UUID, authorization: String, requestHeaders: Seq[(String, String)] = Nil ): scalaz.concurrent.Task[org.bml.bml.gen.test.application.v0.models.Account] = scalaz.concurrent.Task.now { org.bml.bml.gen.test.application.v0.mock.Factories.makeAccount() } } object Factories { def randomString(length: Int = 24): String = { _root_.scala.util.Random.alphanumeric.take(length).mkString } def makeTestEnumeration(): org.bml.bml.gen.test.application.v0.models.TestEnumeration = org.bml.bml.gen.test.application.v0.models.TestEnumeration.Foo def makeAccount(): org.bml.bml.gen.test.application.v0.models.Account = org.bml.bml.gen.test.application.v0.models.Account( id = _root_.java.util.UUID.randomUUID, awsAccount = Factories.randomString(128), name = Factories.randomString(128), enabled = true ) def makeAccountForm(): org.bml.bml.gen.test.application.v0.models.AccountForm = org.bml.bml.gen.test.application.v0.models.AccountForm( name = Factories.randomString(128), enabled = true ) def makeClient(): org.bml.bml.gen.test.application.v0.models.Client = org.bml.bml.gen.test.application.v0.models.Client( accounts = Nil ) def makeHealthcheck(): org.bml.bml.gen.test.application.v0.models.Healthcheck = org.bml.bml.gen.test.application.v0.models.Healthcheck( status = Factories.randomString(512) ) } }