
smithy4s.dynamic.model.StructureShape.scala Maven / Gradle / Ivy
package smithy4s.dynamic.model
import smithy4s.Document
import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.schema.Schema.struct
final case class StructureShape(members: Map[String, MemberShape] = Map(), traits: Map[IdRef, Document] = Map())
object StructureShape extends ShapeTag.Companion[StructureShape] {
val id: ShapeId = ShapeId("smithy4s.dynamic.model", "StructureShape")
val hints: Hints = Hints.empty
implicit val schema: Schema[StructureShape] = struct(
MemberMap.underlyingSchema.field[StructureShape]("members", _.members).addHints(smithy.api.Default(smithy4s.Document.obj())),
TraitMap.underlyingSchema.field[StructureShape]("traits", _.traits).addHints(smithy.api.Default(smithy4s.Document.obj())),
){
StructureShape.apply
}.withId(id).addHints(hints)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy