smithy.api.NonEmptyStringMap.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.map
object NonEmptyStringMap extends Newtype[Map[NonEmptyString, NonEmptyString]] {
val id: ShapeId = ShapeId("smithy.api", "NonEmptyStringMap")
val hints: Hints = Hints(
smithy.api.Private(),
).lazily
val underlyingSchema: Schema[Map[NonEmptyString, NonEmptyString]] = map(NonEmptyString.schema, NonEmptyString.schema).withId(id).addHints(hints)
implicit val schema: Schema[NonEmptyStringMap] = bijection(underlyingSchema, asBijection)
}