Enum8

sealed case class Enum8[A1, A2, A3, A4, A5, A6, A7, A8, Z](id: TypeId, case1: Case[Z, A1], case2: Case[Z, A2], case3: Case[Z, A3], case4: Case[Z, A4], case5: Case[Z, A5], case6: Case[Z, A6], case7: Case[Z, A7], case8: Case[Z, A8], annotations: Chunk[Any]) extends Enum[Z]
trait Serializable
trait Product
trait Equals
trait Enum[Z]
trait Schema[Z]
class Object
trait Matchable
class Any
Enum8[A1, A2, A3, A4, A5, A6, A7, A8, Z]

Type members

Types

override type Accessors[Lens[_, _, _], Prism[_, _, _], Traversal[_, _]] = (Prism[String, Z, A1], Prism[String, Z, A2], Prism[String, Z, A3], Prism[String, Z, A4], Prism[String, Z, A5], Prism[String, Z, A6], Prism[String, Z, A7], Prism[String, Z, A8])

Value members

Concrete methods

override def annotate(annotation: Any): Enum8[A1, A2, A3, A4, A5, A6, A7, A8, Z]
Definition Classes
override def cases: Chunk[Case[Z, _]]
Definition Classes
override def defaultValue: Either[String, Z]
Definition Classes
override def makeAccessors(b: AccessorBuilder): (Prism[String, Z, A1], Prism[String, Z, A2], Prism[String, Z, A3], Prism[String, Z, A4], Prism[String, Z, A5], Prism[String, Z, A6], Prism[String, Z, A7], Prism[String, Z, A8])
Definition Classes

Inherited methods

def <*>[B](that: Schema[B]): Schema[(Z, B)]

A symbolic operator for zip.

A symbolic operator for zip.

Inherited from:
Schema
def <+>[B](that: Schema[B]): Schema[Either[Z, B]]

A symbolic operator for orElseEither.

A symbolic operator for orElseEither.

Inherited from:
Schema
def ?: Schema[Option[Z]]

A symbolic operator for optional.

A symbolic operator for optional.

Inherited from:
Schema
Inherited from:
Schema
def caseOf(z: Z): Option[Case[Z, _]]
Inherited from:
Enum
def caseOf(id: String): Option[Case[Z, _]]
Inherited from:
Enum
def coerce[B](newSchema: Schema[B]): Either[String, Schema[B]]

Convert to Schema[B] iff B and A are homomorphic.

Convert to Schema[B] iff B and A are homomorphic.

This can be used to e.g convert between a case class and it's "generic" representation as a ListMap[String,_]

Inherited from:
Schema
def diff(thisValue: Z, thatValue: Z): Patch[Z]

Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.

Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.

Inherited from:
Schema
def fromDynamic(value: DynamicValue): Either[String, Z]
Inherited from:
Schema
def migrate[B](newSchema: Schema[B]): Either[String, Z => Either[String, B]]

Generate a homomorphism from A to B iff A and B are homomorphic

Generate a homomorphism from A to B iff A and B are homomorphic

Inherited from:
Schema
def optional: Schema[Option[Z]]

Returns a new schema that modifies the type produced by this schema to be optional.

Returns a new schema that modifies the type produced by this schema to be optional.

Inherited from:
Schema
def orElseEither[B](that: Schema[B]): Schema[Either[Z, B]]

Returns a new schema that combines this schema and the specified schema together, modeling their either composition.

Returns a new schema that combines this schema and the specified schema together, modeling their either composition.

Inherited from:
Schema
def ordering: Ordering[Z]
Inherited from:
Schema
def patch(oldValue: Z, diff: Patch[Z]): Either[String, Z]

Patch value with a Patch.

Patch value with a Patch.

Inherited from:
Schema
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product
def repeated: Schema[Chunk[Z]]
Inherited from:
Schema
Inherited from:
Schema
def toDynamic(value: Z): DynamicValue
Inherited from:
Schema
def transform[B](f: Z => B, g: B => Z)(implicit loc: SourceLocation): Schema[B]

Transforms this Schema[A] into a Schema[B], by supplying two functions that can transform between A and B, without possibility of failure.

Transforms this Schema[A] into a Schema[B], by supplying two functions that can transform between A and B, without possibility of failure.

Inherited from:
Schema
def transformOrFail[B](f: Z => Either[String, B], g: B => Either[String, Z])(implicit loc: SourceLocation): Schema[B]

Transforms this Schema[A] into a Schema[B], by supplying two functions that can transform between A and B (possibly failing in some cases).

Transforms this Schema[A] into a Schema[B], by supplying two functions that can transform between A and B (possibly failing in some cases).

Inherited from:
Schema
def validate(value: Z)(implicit schema: Schema[Z]): Chunk[ValidationError]
Inherited from:
Schema
def zip[B](that: Schema[B]): Schema[(Z, B)]

Returns a new schema that combines this schema and the specified schema together, modeling their tuple composition.

Returns a new schema that combines this schema and the specified schema together, modeling their tuple composition.

Inherited from:
Schema