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

smithy4s.smithy.rules.EndpointHeaders.scala Maven / Gradle / Ivy

There is a newer version: 0.0.32
Show 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)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy