sealed case class CaseClass1[A, Z](id: TypeId, field: Field[A], construct: (A) ⇒ Z, extractField: (Z) ⇒ A, annotations: Chunk[Any] = Chunk.empty) extends Record[Z] with Product with Serializable
- Self Type
- CaseClass1[A, Z]
- Alphabetic
- By Inheritance
- CaseClass1
- Serializable
- Serializable
- Product
- Equals
- Record
- Schema
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new CaseClass1(id: TypeId, field: Field[A], construct: (A) ⇒ Z, extractField: (Z) ⇒ A, annotations: Chunk[Any] = Chunk.empty)
Type Members
-
type
Accessors[Lens[_, _, _], Prism[_, _, _], Traversal[_, _]] = Lens[label.type, Z, A]
- Definition Classes
- CaseClass1 → Schema
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
<*>[B](that: Schema[B]): Schema[(Z, B)]
A symbolic operator for zip.
-
def
<+>[B](that: Schema[B]): Schema[Either[Z, 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[Z]]
A symbolic operator for optional.
-
def
annotate(annotation: Any): CaseClass1[A, Z]
Returns a new schema that with
annotation
Returns a new schema that with
annotation
- Definition Classes
- CaseClass1 → Schema
-
val
annotations: Chunk[Any]
Chunk of annotations for this schema
Chunk of annotations for this schema
- Definition Classes
- CaseClass1 → Schema
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
ast: SchemaAst
- Definition Classes
- Schema
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
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,_]
- Definition Classes
- Schema
- val construct: (A) ⇒ Z
-
def
defaultValue: Either[String, Z]
The default value for a
Schema
of typeA
. -
def
diff(thisValue: Z, thatValue: Z, differ: Option[Differ[Z]] = None): Diff[Z]
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.
A custom zio.schema.Differ can be supplied if the default behavior is not acceptable.
- Definition Classes
- Schema
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val extractField: (Z) ⇒ A
- val field: Field[A]
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fromDynamic(value: DynamicValue): Either[String, Z]
- Definition Classes
- Schema
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
val
id: TypeId
- Definition Classes
- CaseClass1 → Record
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
makeAccessors(b: AccessorBuilder): Lens[label.type, Z, A]
- Definition Classes
- CaseClass1 → 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
- 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[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.
- Definition Classes
- 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.
- Definition Classes
- Schema
-
def
ordering: Ordering[Z]
- Definition Classes
- Schema
-
def
patch(oldValue: Z, diff: Diff[Z]): Either[String, Z]
Patch value with a Diff.
Patch value with a Diff.
- Definition Classes
- Schema
-
def
rawConstruct(values: Chunk[Any]): Either[String, Z]
- Definition Classes
- CaseClass1 → Record
-
def
repeated: Schema[Chunk[Z]]
- Definition Classes
- Schema
-
def
serializable: Schema[Schema[Z]]
- Definition Classes
- Schema
-
def
structure: Chunk[Field[_]]
- Definition Classes
- CaseClass1 → Record
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toDynamic(value: Z): DynamicValue
- Definition Classes
- Schema
-
def
toSemiDynamic: Schema[(Z, Schema[Z])]
- Definition Classes
- Schema
-
def
toString(): String
- Definition Classes
- CaseClass1 → AnyRef → Any
-
def
transform[B](f: (Z) ⇒ B, g: (B) ⇒ Z)(implicit loc: SourceLocation): Schema[B]
Transforms this
Schema[A]
into aSchema[B]
, by supplying two functions that can transform betweenA
andB
, without possibility of failure.Transforms this
Schema[A]
into aSchema[B]
, by supplying two functions that can transform betweenA
andB
, without possibility of failure.- Definition Classes
- Schema
-
def
transformOrFail[B](f: (Z) ⇒ Either[String, B], g: (B) ⇒ Either[String, Z])(implicit loc: SourceLocation): Schema[B]
Transforms this
Schema[A]
into aSchema[B]
, by supplying two functions that can transform betweenA
andB
(possibly failing in some cases).Transforms this
Schema[A]
into aSchema[B]
, by supplying two functions that can transform betweenA
andB
(possibly failing in some cases).- Definition Classes
- Schema
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
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()
-
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.
- Definition Classes
- Schema