smithy4s.smithy.rules.Properties.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kinesis4cats-smithy4s-client_3 Show documentation
Show all versions of kinesis4cats-smithy4s-client_3 Show documentation
Cats tooling for the Smithy4s Kinesis Client
The newest version!
package smithy.rules
import smithy4s.Document
import smithy4s.Hints
import smithy4s.Newtype
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.schema.Schema.bijection
import smithy4s.schema.Schema.document
import smithy4s.schema.Schema.map
import smithy4s.schema.Schema.string
/** A map of strings to document values.
* @param key
* The property name.
* @param value
* The property value.
*/
object Properties extends Newtype[Map[String, Document]] {
val id: ShapeId = ShapeId("smithy.rules", "Properties")
val hints: Hints = Hints(
smithy.api.Documentation("A map of strings to document values."),
smithy.api.Unstable(),
smithy.api.Private(),
).lazily
val underlyingSchema: Schema[Map[String, Document]] = map(string.addMemberHints(smithy.api.Documentation("The property name.")), document.addMemberHints(smithy.api.Documentation("The property value."))).withId(id).addHints(hints)
implicit val schema: Schema[Properties] = bijection(underlyingSchema, asBijection)
}