object Schema
Data types and smart constructors which simplify the creation of schema values.
- Alphabetic
- By Inheritance
- Schema
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
class
AbsentBuilder[P[_], A[_]] extends AnyRef
Builder class used to construct a Absent property
-
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.
-
final
class
ConstantBuilder[P[_], A[_]] extends AnyRef
Builder class used to construct a Constant property
-
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.
-
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.
- implicit class SchemaOps[P[_], A[_], I] extends AnyRef
-
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
. -
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
-
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.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
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
-
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
-
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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
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 theLeft
constructor and one forRight
.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.
- def oneOfDiscr[P[_], I](discriminatorField: String): ToOneOfWithDiscriminator[P, I]
-
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
-
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
-
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
-
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
- 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$]]
- 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$]]
-
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
-
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.
-
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.
-
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
-
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
-
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
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- 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]
-
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 theLeft
constructor and one forRight
.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.
- 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]
- 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]
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated