scala.smithy.rules.ClientContextParams.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
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.recursive
import smithy4s.schema.Schema.string
/** Defines one or more named rule-set parameters to be generated as configurable client parameters.
* The type specified for the client parameter MUST match the parameter type defined in the rule-set.
* @param key
* The rule-set parameter name.
* @param value
* The client parameter definition.
*/
object ClientContextParams extends Newtype[Map[String, ClientContextParamDefinition]] {
val id: ShapeId = ShapeId("smithy.rules", "clientContextParams")
val hints: Hints = Hints(
smithy.api.Documentation("Defines one or more named rule-set parameters to be generated as configurable client parameters.\nThe type specified for the client parameter MUST match the parameter type defined in the rule-set."),
smithy.api.Unstable(),
smithy.api.Trait(selector = Some("service"), structurallyExclusive = None, conflicts = None, breakingChanges = None),
)
val underlyingSchema: Schema[Map[String, ClientContextParamDefinition]] = map(string.addMemberHints(smithy.api.Documentation("The rule-set parameter name.")), ClientContextParamDefinition.schema.addMemberHints(smithy.api.Documentation("The client parameter definition."))).withId(id).addHints(hints)
implicit val schema: Schema[ClientContextParams] = recursive(bijection(underlyingSchema, asBijection))
}