smithy4s.smithy.rules.EndpointHeaders.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.Hints
import smithy4s.Newtype
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.schema.Schema.bijection
import smithy4s.schema.Schema.map
import smithy4s.schema.Schema.string
/** A map of header names to list of values.
* @param key
* The transport header name.
* @param value
* The transport header values.
*/
object EndpointHeaders extends Newtype[Map[String, List[String]]] {
val id: ShapeId = ShapeId("smithy.rules", "EndpointHeaders")
val hints: Hints = Hints(
smithy.api.Documentation("A map of header names to list of values."),
smithy.api.Unstable(),
smithy.api.Private(),
).lazily
val underlyingSchema: Schema[Map[String, List[String]]] = map(string.addMemberHints(smithy.api.Documentation("The transport header name.")), EndpointHeaderValue.underlyingSchema.addMemberHints(smithy.api.Documentation("The transport header values."))).withId(id).addHints(hints)
implicit val schema: Schema[EndpointHeaders] = bijection(underlyingSchema, asBijection)
}