DefaultValue

alloy.DefaultValue
object DefaultValue extends Newtype[Document]

Use this trait to give a default value to a structure member. This is not the same as smithy.api#default which is more constrained. You can use defaultValue to specify a default that does not align with the target's shape constraints, where as Smithy's default trait prevents that. For example:

`@`length(min:5)
string MyString
structure MyStruct {
 `@`defaultValue("N/A") // that's valid
 s1: MyString
 s2: MyString = "N/A" // that's invalid
}

Attributes

Graph
Supertypes
class Newtype[Document]
trait HasId
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited classlikes

object hint

Attributes

Inherited from:
Newtype
Supertypes
class Object
trait Matchable
class Any

Inherited types

opaque type Type

Attributes

Inherited from:
Newtype

Value members

Inherited methods

def apply(a: Document): Type

Attributes

Inherited from:
Newtype
def unapply(orig: Type): Some[A]

Attributes

Inherited from:
Newtype

Concrete fields

val hints: Hints
val id: ShapeId

Extensions

Inherited extensions

extension (orig: Type)
def value: A

Attributes

Inherited from:
Newtype

Implicits

Implicits

implicit val schema: Schema[DefaultValue]

Inherited implicits

Attributes

Inherited from:
Newtype
implicit val tag: ShapeTag[Type]

Attributes

Inherited from:
Newtype