Sum

io.hireproof.structure.Schema$.Sum
See theSum companion object
sealed abstract class Sum[A](default: Option[A], description: Option[String], val discriminator: Option[Discriminator], example: Option[A], name: Option[String], validations: Chain[Validation[_, _]]) extends Value[A] with Sum[A]

Attributes

Companion:
object
Graph
Supertypes
trait Sum[A]
class Value[A]
class Schema[A]
trait Structure[A]
class Object
trait Matchable
class Any
Self type
Sum[A]

Members list

Concise view

Type members

Types

final override type Element[a] = Branch[a]
final override type Group[a] = Sum[a]
final override type Self[a] = Sum[a]

Value members

Abstract methods

def toChain: Chain[Branch[_]]

Concrete methods

final def copy(default: Option[A], description: Option[String], discriminator: Option[Discriminator], example: Option[A], name: Option[String]): Sum[A]
final override def orElse[T](branch: Branch[T]): Sum[Either[A, T]]

Attributes

Definition Classes
final override def orElseAll[T](schema: Sum[T]): Sum[Either[A, T]]

Attributes

Definition Classes
final def setDiscriminator(discriminator: Option[Discriminator]): Sum[A]
final override def toJson(fa: A): Option[Json]

Attributes

Definition Classes
final override def toJsonValue(fa: A): Json

Attributes

Definition Classes
final override def toString(fa: A): Option[String]

Attributes

Definition Classes
final override def toStringValue(fa: A): String

Attributes

Definition Classes
final def withDiscriminator(discriminator: Discriminator): Sum[A]

Inherited methods

final def const(value: => A): Self[Unit]

Attributes

Inherited from:
Structure
final def fromJson(json: Option[Json]): Validated[Errors, A]

Attributes

Inherited from:
Schema
final def fromJsonValue(json: Json): Validated[Errors, A]

Attributes

Inherited from:
Value
final def fromString(value: Option[String]): Validated[Errors, A]

Attributes

Inherited from:
Schema
final def fromStringValue(value: String): Validated[Errors, A]

Attributes

Inherited from:
Value
final def imap[T](f: A => T)(g: T => A): Self[T]

Attributes

Inherited from:
Structure
final def ivalidate[T](validation: Validation[A, T])(g: T => A): Self[T]

Attributes

Inherited from:
Structure
final def jsonDefault: Option[Json]

Attributes

Inherited from:
Schema
final def jsonExample: Option[Json]

Attributes

Inherited from:
Schema
final def merge[T](implicit evidence: Aux[A, T]): Self[T]

Attributes

Inherited from:
Structure
final def setDefault(default: Option[A]): Self[A]

Attributes

Inherited from:
Schema
final def setDescription(description: Option[String]): Self[A]

Attributes

Inherited from:
Schema
final def setExample(example: Option[A]): Self[A]

Attributes

Inherited from:
Schema
final def setName(description: Option[String]): Self[A]

Attributes

Inherited from:
Schema
final def stringDefault: Option[String]

Attributes

Inherited from:
Schema
final def stringExample: Option[String]

Attributes

Inherited from:
Schema
final def validate(validation: Validation[A, A]): Self[A]

Attributes

Inherited from:
Structure
final def withDefault(default: A): Self[A]

Attributes

Inherited from:
Schema
final def withDescription(description: String): Self[A]

Attributes

Inherited from:
Schema
final def withExample(example: A): Self[A]

Attributes

Inherited from:
Schema
final def withName(description: String): Self[A]

Attributes

Inherited from:
Schema
final def withoutDefault: Self[A]

Attributes

Inherited from:
Schema
final def withoutDescription: Self[A]

Attributes

Inherited from:
Schema
final def withoutExample: Self[A]

Attributes

Inherited from:
Schema
final def withoutName: Self[A]

Attributes

Inherited from:
Schema
final def ximap[T](implicit evidence: Aux[T, A]): Self[T]

Attributes

Inherited from:
Sum
final def |+|[T](element: Branch[T]): Group[Either[A, T]]

Attributes

Inherited from:
Sum

Concrete fields