com.twilio.guardrail.terms.framework.FrameworkTerms.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of guardrail_2.12 Show documentation
Show all versions of guardrail_2.12 Show documentation
Principled code generation for Scala services from OpenAPI specifications
The newest version!
package com.twilio.guardrail
package terms.framework
import cats.Monad
import com.twilio.guardrail.languages.LA
import com.twilio.guardrail.terms.CollectionsLibTerms
abstract class FrameworkTerms[L <: LA, F[_]](implicit Cl: CollectionsLibTerms[L, F]) {
def MonadF: Monad[F]
def getFrameworkImports(tracing: Boolean): F[List[L#Import]]
def getFrameworkImplicits(): F[Option[(L#TermName, L#ObjectDefinition)]]
def getFrameworkDefinitions(tracing: Boolean): F[List[(L#TermName, List[L#Definition])]]
def lookupStatusCode(key: String): F[(Int, L#TermName)]
def fileType(format: Option[String]): F[L#Type]
def objectType(format: Option[String]): F[L#Type]
def copy(
newMonadF: Monad[F] = MonadF,
newGetFrameworkImports: Boolean => F[List[L#Import]] = getFrameworkImports _,
newGetFrameworkImplicits: () => F[Option[(L#TermName, L#ObjectDefinition)]] = getFrameworkImplicits _,
newGetFrameworkDefinitions: Boolean => F[List[(L#TermName, List[L#Definition])]] = getFrameworkDefinitions _,
newLookupStatusCode: String => F[(Int, L#TermName)] = lookupStatusCode _,
newFileType: Option[String] => F[L#Type] = fileType _,
newObjectType: Option[String] => F[L#Type] = objectType _
) = new FrameworkTerms[L, F] {
def MonadF = newMonadF
def getFrameworkImports(tracing: Boolean) = newGetFrameworkImports(tracing)
def getFrameworkImplicits() = newGetFrameworkImplicits()
def getFrameworkDefinitions(tracing: Boolean) = newGetFrameworkDefinitions(tracing)
def lookupStatusCode(key: String) = newLookupStatusCode(key)
def fileType(format: Option[String]) = newFileType(format)
def objectType(format: Option[String]) = newObjectType(format)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy