GenericRecord

sealed case class GenericRecord(id: TypeId, fieldSet: FieldSet, annotations: Chunk[Any]) extends Record[ListMap[String, _]]
trait Serializable
trait Product
trait Equals
trait Record[ListMap[String, _]]
trait Schema[ListMap[String, _]]
class Object
trait Matchable
class Any

Type members

Types

type Accessors[Lens[_, _, _], Prism[_, _, _], Traversal[_, _]] = Accessors[ListMap[String, _], Lens, Prism, Traversal]
type Terms = Terms

Value members

Concrete methods

override def annotate(annotation: Any): GenericRecord

Returns a new schema that with annotation

Returns a new schema that with annotation

Definition Classes
override def construct(values: Chunk[Any])(implicit unsafe: Unsafe): Either[String, ListMap[String, _]]
Definition Classes
override def deconstruct(values: ListMap[String, _])(implicit unsafe: Unsafe): Chunk[Any]
Definition Classes
override def fields: Chunk[Field[ListMap[String, _], _]]
Definition Classes
Definition Classes

Inherited methods

def <*>[B](that: Schema[B]): Schema[(ListMap[String, _], B)]

A symbolic operator for zip.

A symbolic operator for zip.

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

A symbolic operator for orElseEither.

A symbolic operator for orElseEither.

Inherited from:
Schema
def ?: Schema[Option[ListMap[String, _]]]

A symbolic operator for optional.

A symbolic operator for optional.

Inherited from:
Schema
Inherited from:
Schema
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 defaultValue: Either[String, ListMap[String, _]]
Inherited from:
Record
def diff(thisValue: ListMap[String, _], thatValue: ListMap[String, _]): Patch[ListMap[String, _]]

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, ListMap[String, _]]
Inherited from:
Schema
def migrate[B](newSchema: Schema[B]): Either[String, ListMap[String, _] => 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[ListMap[String, _]]]

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[ListMap[String, _], 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[ListMap[String, _]]
Inherited from:
Schema
def patch(oldValue: ListMap[String, _], diff: Patch[ListMap[String, _]]): Either[String, ListMap[String, _]]

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[ListMap[String, _]]]
Inherited from:
Schema
def serializable: Schema[Schema[ListMap[String, _]]]
Inherited from:
Schema
def toDynamic(value: ListMap[String, _]): DynamicValue
Inherited from:
Schema
def transform[B](f: ListMap[String, _] => B, g: B => ListMap[String, _])(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: ListMap[String, _] => Either[String, B], g: B => Either[String, ListMap[String, _]])(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: ListMap[String, _])(implicit schema: Schema[ListMap[String, _]]): Chunk[ValidationError]
Inherited from:
Schema
def zip[B](that: Schema[B]): Schema[(ListMap[String, _], 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