All Downloads are FREE. Search and download functionalities are using the official Maven repository.

smithy.api.References.scala Maven / Gradle / Ivy

There is a newer version: 0.19.0-41-91762fb
Show newest version
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