sealed case class GenericRecord(id: TypeId, fieldSet: FieldSet, annotations: Chunk[Any] = Chunk.empty) extends Record[ListMap[String, _]] with Product with Serializable
- Self Type
- GenericRecord
- Alphabetic
- By Inheritance
- GenericRecord
- Serializable
- Product
- Equals
- Record
- Schema
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new GenericRecord(id: TypeId, fieldSet: FieldSet, annotations: Chunk[Any] = Chunk.empty)
Type Members
- type Accessors[Lens[_, _, _], Prism[_, _, _], Traversal[_, _]] = FieldSet.Accessors[ListMap[String, _], Lens, Prism, Traversal]
- Definition Classes
- GenericRecord → Schema
- type FieldNames = FieldSet.FieldNames
- Definition Classes
- GenericRecord → Record
- type Terms = FieldSet.Terms
- Definition Classes
- GenericRecord → Record
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def <*>[B](that: Schema[B]): Schema[(ListMap[String, _], B)]
A symbolic operator for zip.
- def <+>[B](that: Schema[B]): Schema[scala.util.Either[ListMap[String, _], B]]
A symbolic operator for orElseEither.
A symbolic operator for orElseEither.
- Definition Classes
- Schema
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ?: Schema[Option[ListMap[String, _]]]
A symbolic operator for optional.
- def annotate(annotation: Any): GenericRecord
Returns a new schema that with
annotationReturns a new schema that with
annotation- Definition Classes
- GenericRecord → Schema
- val annotations: Chunk[Any]
Chunk of annotations for this schema
Chunk of annotations for this schema
- Definition Classes
- GenericRecord → Schema
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def ast: MetaSchema
- Definition Classes
- Schema
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def coerce[B](newSchema: Schema[B]): scala.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,_]
- Definition Classes
- Schema
- def construct(values: Chunk[Any])(implicit unsafe: Unsafe): scala.util.Either[String, ListMap[String, _]]
- Definition Classes
- GenericRecord → Record
- def deconstruct(values: ListMap[String, _])(implicit unsafe: Unsafe): Chunk[Any]
- Definition Classes
- GenericRecord → Record
- def defaultValue: scala.util.Either[String, ListMap[String, _]]
The default value for a
Schemaof typeA. - def diff(thisValue: ListMap[String, _], thatValue: ListMap[String, _]): Patch[ListMap[String, _]]
Performs a diff between thisValue and thatValue.
Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.
- Definition Classes
- Schema
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val fieldSet: FieldSet
- def fields: Chunk[Field[ListMap[String, _], _]]
- Definition Classes
- GenericRecord → Record
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def fromDynamic(value: DynamicValue): scala.util.Either[String, ListMap[String, _]]
- Definition Classes
- Schema
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val id: TypeId
- Definition Classes
- GenericRecord → Record
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def makeAccessors(b: AccessorBuilder): Accessors[Lens, Prism, Traversal]
- Definition Classes
- GenericRecord → Schema
- def migrate[B](newSchema: Schema[B]): scala.Either[String, (ListMap[String, _]) => scala.util.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
- Definition Classes
- Schema
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- 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.
- Definition Classes
- Schema
- def orElseEither[B](that: Schema[B]): Schema[scala.util.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.
- Definition Classes
- Schema
- def ordering: Ordering[ListMap[String, _]]
- Definition Classes
- Schema
- def patch(oldValue: ListMap[String, _], diff: Patch[ListMap[String, _]]): scala.util.Either[String, ListMap[String, _]]
Patch value with a Patch.
Patch value with a Patch.
- Definition Classes
- Schema
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def repeated: Schema[Chunk[ListMap[String, _]]]
- Definition Classes
- Schema
- def serializable: Schema[Schema[ListMap[String, _]]]
- Definition Classes
- Schema
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toDynamic(value: ListMap[String, _]): DynamicValue
- Definition Classes
- Schema
- def transform[B](f: (ListMap[String, _]) => B, g: (B) => ListMap[String, _])(implicit loc: SourceLocation): Schema[B]
Transforms this
Schema[A]into aSchema[B], by supplying two functions that can transform betweenAandB, without possibility of failure.Transforms this
Schema[A]into aSchema[B], by supplying two functions that can transform betweenAandB, without possibility of failure.- Definition Classes
- Schema
- def transformOrFail[B](f: (ListMap[String, _]) => scala.util.Either[String, B], g: (B) => scala.util.Either[String, ListMap[String, _]])(implicit loc: SourceLocation): Schema[B]
Transforms this
Schema[A]into aSchema[B], by supplying two functions that can transform betweenAandB(possibly failing in some cases).Transforms this
Schema[A]into aSchema[B], by supplying two functions that can transform betweenAandB(possibly failing in some cases).- Definition Classes
- Schema
- def validate(value: ListMap[String, _])(implicit schema: Schema[ListMap[String, _]]): Chunk[ValidationError]
- Definition Classes
- Schema
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- 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.
- Definition Classes
- Schema