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:
defaultValue("N/A") // that's valid
s1: MyString
s2: MyString = "N/A" // that's invalid
}
smithy
@@
length(min:5)
string MyString
structure MyStruct {
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- DefaultValue
- Newtype
- HasId
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def apply(a: Document): Type
- Definition Classes
- Newtype
- Annotations
- @inline()
- implicit val asBijection: Bijection[Document, Type]
- Definition Classes
- Newtype
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val hints: Hints
- val id: ShapeId
- Definition Classes
- DefaultValue → HasId
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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()
- implicit val schema: Schema[DefaultValue]
- Definition Classes
- DefaultValue → Newtype
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- implicit val tag: ShapeTag[Type]
- Definition Classes
- Newtype
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unapply(t: Type): Some[Document]
- Definition Classes
- Newtype
- val underlyingSchema: Schema[Document]
- final def value(x: Type): Document
- Definition Classes
- Newtype
- Annotations
- @inline()
- 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()
- object hint
- Definition Classes
- Newtype