smithy4s.smithy.rules.OperationContextParams.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_sjs1_2.13 Show documentation
Show all versions of kinesis4cats-smithy4s-client_sjs1_2.13 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.recursive
import smithy4s.schema.Schema.string
/** Binds one or more named rule-set parameters to elements contained in the operation's input structure.
* The type of the shapes targeted by the trait MUST match the parameter types defined in the rule-set.
* @param key
* The rule-set parameter name.
* @param value
* The static parameter definition.
*/
object OperationContextParams extends Newtype[Map[String, OperationContextParamDefinition]] {
val id: ShapeId = ShapeId("smithy.rules", "operationContextParams")
val hints: Hints = Hints(
smithy.api.Documentation("Binds one or more named rule-set parameters to elements contained in the operation\'s input structure.\nThe type of the shapes targeted by the trait MUST match the parameter types defined in the rule-set."),
smithy.api.Unstable(),
smithy.api.Trait(selector = Some("operation"), structurallyExclusive = None, conflicts = None, breakingChanges = None),
).lazily
val underlyingSchema: Schema[Map[String, OperationContextParamDefinition]] = map(string.addMemberHints(smithy.api.Documentation("The rule-set parameter name.")), OperationContextParamDefinition.schema.addMemberHints(smithy.api.Documentation("The static parameter definition."))).withId(id).addHints(hints)
implicit val schema: Schema[OperationContextParams] = recursive(bijection(underlyingSchema, asBijection))
}