Packages

object Schema

Data types and smart constructors which simplify the creation of schema values.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Schema
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class AbsentBuilder[P[_], A[_]] extends AnyRef

    Builder class used to construct a Absent property

  2. type AnnotatedSchema[P[_], A[_], I] = HFix[[γ$2$[_$1], δ$3$]HEnvT[A, [β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], γ$2$, δ$3$], I]

    The type of an annotated schema.

    The type of an annotated schema.

    This is an alias for the HFix fixpoint applied to the SchemaF type constructor.

  3. final class ConstantBuilder[P[_], A[_]] extends AnyRef

    Builder class used to construct a Constant property

  4. type Prop[P[_], A[_], O, I] = FreeApplicative[[γ$3$]PropSchema[O, [γ$2$]HFix[[γ$2$[_$1], δ$3$]HEnvT[A, [β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], γ$2$, δ$3$], γ$2$], γ$3$], I]

    The type of free applicative values which are used to capture the structure of individual record properties.

  5. type Props[P[_], A[_], R] = FreeApplicative[[γ$3$]PropSchema[R, [γ$2$]HFix[[γ$2$[_$1], δ$3$]HEnvT[A, [β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], γ$2$, δ$3$], γ$2$], γ$3$], R]

    The type of free applicative values which are used to capture the structure of record (product) types.

  6. implicit class SchemaOps[P[_], A[_], I] extends AnyRef
  7. final class ToOneOf[P[_], I] extends AnyRef

    Builder class used to construct a OneOfSchema value from an HList of alternatives which are proven to provide handling for every constructor of the sum type I.

  8. final class ToOneOfWithDiscriminator[P[_], I] extends AnyRef

    Builder class used to construct a OneOfSchema value with discriminator field from an HList of alternatives which are proven to provide handling for every constructor of the sum type I.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def absent[P[_], A[_]]: AbsentBuilder[P, A]

    Smart constructor for absent Prop instances.

    Smart constructor for absent Prop instances.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

  5. def alt[P[_], A[_], I, J](id: String, base: AnnotatedSchema[P, A, J], subset: Subset[I, J]): Alt[[γ$68$]HFix[[γ$2$[_$1], δ$3$]HEnvT[A, [β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], γ$2$, δ$3$], γ$68$], I, J]

    Convenience constructor for oneOf schema alternatives.

    Convenience constructor for oneOf schema alternatives.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    J

    The type of the base value which can be mapped into the I algebra.

    id

    The unique identifier of the constructor

    base

    The schema for the J type

    subset

    Subset between the sum type and the selected constructor.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  8. def const[P[_], A[_], O](obj: O)(implicit arg0: EmptyK[A]): AnnotatedSchema[P, A, O]

    The annotated empty record schema, representing a constant value.

    The annotated empty record schema, representing a constant value.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

  9. def const[P[_], A[_], O](obj: O, ann: A[O]): AnnotatedSchema[P, A, O]

    The annotated empty record schema, representing a constant value.

    The annotated empty record schema, representing a constant value.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

  10. def constant[P[_], A[_]]: ConstantBuilder[P, A]

    Smart constructor for constant Prop instances.

    Smart constructor for constant Prop instances.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  19. def oneOf[P[_], I]: ToOneOf[P, I]

    Builds an annotated schema for the sum type I from an HList of alternatives.

    Builds an annotated schema for the sum type I from an HList of alternatives.

    Each alternative value in the list describes a single constructor of I. For example, to construct the schema for scala.util.Either one would provide two alternatives, one for the Left constructor and one for Right.

    An easier-to-read type signature for this function is below:

    def oneOf[P[_], I](alts: NonEmptyList[Alt[Schema[P, *], I, _]]): Schema[P, I]
    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

  20. def oneOfDiscr[P[_], I](discriminatorField: String): ToOneOfWithDiscriminator[P, I]
  21. def optional[P[_], A[_], O, I](fieldName: String, valueSchema: AnnotatedSchema[P, A, I], property: Property[O, I]): Prop[P, A, O, Option[I]]

    Smart constructor for optional Prop instances.

    Smart constructor for optional Prop instances.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

    O

    The type of a Scala record - an object or a tuple, the property of which is being defined.

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    fieldName

    name of the record property

    valueSchema

    schema for the record property's type

    property

    Property lens from the record type to the property's value

  22. def optional[P[_], A[_], O, I, OI <: Option[I]](fieldName: String, valueSchema: AnnotatedSchema[P, A, I], extract: Extract[O, OI]): Prop[P, A, O, Option[I]]

    Smart constructor for optional Prop instances.

    Smart constructor for optional Prop instances.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

    O

    The type of a Scala record - an object or a tuple, the property of which is being defined.

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    OI

    hack for proper overload resolution

    fieldName

    name of the record property

    valueSchema

    schema for the record property's type

    extract

    Extract lens from the record type to the property's value

  23. def prim[P[_], A[_], I](p: P[I])(implicit arg0: EmptyK[A]): AnnotatedSchema[P, A, I]

    Lifts a value in an algebra of primitives into an annotated Schema

    Lifts a value in an algebra of primitives into an annotated Schema

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    p

    a value of the P algebra

    returns

    the newly constructed schema value

  24. def prim[P[_], A[_], I](p: P[I], ann: A[I]): AnnotatedSchema[P, A, I]

    Lifts a value in an algebra of primitives into an annotated Schema

    Lifts a value in an algebra of primitives into an annotated Schema

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    p

    a value of the P algebra

    returns

    the newly constructed schema value

  25. implicit def propApplicative[P[_], A[_], O]: Applicative[[δ$4$]FreeApplicative[[γ$3$]PropSchema[O, [γ$2$]HFix[[γ$2$[_$1], δ$3$]HEnvT[A, [β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], γ$2$, δ$3$], γ$2$], γ$3$], δ$4$]]
  26. implicit def propProfunctor[P[_], A[_]]: Profunctor[[γ$7$, δ$8$]FreeApplicative[[γ$3$]PropSchema[γ$7$, [γ$2$]HFix[[γ$2$[_$1], δ$3$]HEnvT[A, [β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], γ$2$, δ$3$], γ$2$], γ$3$], δ$8$]]
  27. def property[P[_], A[_], O, I](fieldName: String, valueSchema: AnnotatedSchema[P, A, I], default: I, extract: Extract[O, I]): Prop[P, A, O, I]

    Smart constructor for required Prop instances, with a default provided for the case where a serialized form is missing the required field.

    Smart constructor for required Prop instances, with a default provided for the case where a serialized form is missing the required field.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

    O

    The type of a Scala record - an object or a tuple, the property of which is being defined.

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    fieldName

    Name of the record property

    valueSchema

    Schema for the record property's type

    default

    Default value for use in the case that a serialized form is missing the required field.

    extract

    Extract lens from the record type to the property's value

  28. def rec[P[_], A[_], I](props: Props[P, A, I])(implicit arg0: EmptyK[A]): AnnotatedSchema[P, A, I]

    Builds an annotated schema for a record type from the free applicative capture of that record's structure.

    Builds an annotated schema for a record type from the free applicative capture of that record's structure.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    props

    The free-applicative value that captures the structure of the record type.

  29. def rec[P[_], A[_], I](props: Props[P, A, I], ann: A[I]): AnnotatedSchema[P, A, I]

    Builds an annotated schema for a record type from the free applicative capture of that record's structure.

    Builds an annotated schema for a record type from the free applicative capture of that record's structure.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    props

    The free-applicative value that captures the structure of the record type.

  30. def required[P[_], A[_], O, I](fieldName: String, valueSchema: AnnotatedSchema[P, A, I], extract: Extract[O, I]): Prop[P, A, O, I]

    Smart constructor for required Prop instances.

    Smart constructor for required Prop instances.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

    O

    The type of a Scala record - an object or a tuple, the property of which is being defined.

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    fieldName

    name of the record property

    valueSchema

    schema for the record property's type

    extract

    Extract lens from the record type to the property's value

  31. def schema[P[_], A[_], I](sf: => SchemaF[P, [γ$17$]HFix[[γ$2$[_$1], δ$3$]HEnvT[A, [β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], γ$2$, δ$3$], γ$17$], I])(implicit arg0: EmptyK[A]): AnnotatedSchema[P, A, I]

    Lifts a SchemaF value into an annotated Schema

    Lifts a SchemaF value into an annotated Schema

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    sf

    The value to be annotated

    returns

    the newly constructed schema value

  32. def schema[P[_], A[_], I](sf: => SchemaF[P, [γ$14$]HFix[[γ$2$[_$1], δ$3$]HEnvT[A, [β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], γ$2$, δ$3$], γ$14$], I], ann: => A[I]): AnnotatedSchema[P, A, I]

    Lifts a SchemaF value into an annotated Schema

    Lifts a SchemaF value into an annotated Schema

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

    sf

    The value to be annotated

    returns

    the newly constructed schema value

  33. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. def unsafeOneOf[P[_], A[_], I](alts: NonEmptyList[Alt[[γ$62$]HFix[[γ$2$[_$1], δ$3$]HEnvT[A, [β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], γ$2$, δ$3$], γ$62$], I, _]])(implicit arg0: EmptyK[A]): AnnotatedSchema[P, A, I]
  36. def unsafeOneOf[P[_], A[_], I](ann: A[I])(alts: NonEmptyList[Alt[[γ$60$]HFix[[γ$2$[_$1], δ$3$]HEnvT[A, [β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], γ$2$, δ$3$], γ$60$], I, _]]): AnnotatedSchema[P, A, I]

    Builds an annotated schema for the sum type I from a list of alternatives.

    Builds an annotated schema for the sum type I from a list of alternatives.

    Each alternative value in the list describes a single constructor of I. For example, to construct the schema for scala.util.Either one would provide two alternatives, one for the Left constructor and one for Right.

    This convenience constructor is unsafe in that the compiler will not prove that handling is present for every constructor of your sum type; however, it may sometimes be needed in the case that failures of the Scala compiler to correctly identify all the constructors of a sum type make it otherwise impossible to build a schema value.

    P

    The GADT type constructor for a sum type which defines the set of primitive types used in the schema.

    A

    The type of the annotation applied to each node of the schema

    I

    The type of the Scala value to be produced (or consumed) by an interpreter of the schema. Also known as the "index" type of the schema.

  37. def unsafeOneOfDiscr[P[_], A[_], I](discriminatorField: String)(alts: NonEmptyList[Alt[[γ$66$]HFix[[γ$2$[_$1], δ$3$]HEnvT[A, [β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], γ$2$, δ$3$], γ$66$], I, _]])(implicit arg0: EmptyK[A]): AnnotatedSchema[P, A, I]
  38. def unsafeOneOfDiscr[P[_], A[_], I](discriminatorField: String, ann: A[I])(alts: NonEmptyList[Alt[[γ$64$]HFix[[γ$2$[_$1], δ$3$]HEnvT[A, [β$0$[_$1], γ$1$]SchemaF[P, β$0$, γ$1$], γ$2$, δ$3$], γ$64$], I, _]]): AnnotatedSchema[P, A, I]
  39. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  40. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  41. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped