smithy.api.References.scala Maven / Gradle / Ivy
package smithy.api
import smithy4s.Hints
import smithy4s.Newtype
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.schema.Schema.bijection
import smithy4s.schema.Schema.list
import smithy4s.schema.Schema.recursive
/** Defines the resource shapes that are referenced by a string shape or a
* structure shape and the members of the structure that provide values for
* the identifiers of the resource.
*/
object References extends Newtype[List[Reference]] {
val id: ShapeId = ShapeId("smithy.api", "references")
val hints: Hints = Hints(
smithy.api.Documentation("Defines the resource shapes that are referenced by a string shape or a\nstructure shape and the members of the structure that provide values for\nthe identifiers of the resource."),
smithy.api.Trait(selector = Some(":is(structure, string)"), structurallyExclusive = None, conflicts = None, breakingChanges = None),
).lazily
val underlyingSchema: Schema[List[Reference]] = list(Reference.schema).withId(id).addHints(hints)
implicit val schema: Schema[References] = recursive(bijection(underlyingSchema, asBijection))
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy