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

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

package smithy.rules

import smithy4s.Document
import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.schema.Schema.document
import smithy4s.schema.Schema.struct

/** A static context parameter definition.
  * @param value
  *   The value to set the associated rule-set parameter to.
  */
final case class StaticContextParamDefinition(value: Document)

object StaticContextParamDefinition extends ShapeTag.Companion[StaticContextParamDefinition] {
  val id: ShapeId = ShapeId("smithy.rules", "StaticContextParamDefinition")

  val hints: Hints = Hints(
    smithy.api.Documentation("A static context parameter definition."),
    smithy.api.Unstable(),
    smithy.api.Private(),
  ).lazily

  // constructor using the original order from the spec
  private def make(value: Document): StaticContextParamDefinition = StaticContextParamDefinition(value)

  implicit val schema: Schema[StaticContextParamDefinition] = struct(
    document.required[StaticContextParamDefinition]("value", _.value).addHints(smithy.api.Documentation("The value to set the associated rule-set parameter to.")),
  )(make).withId(id).addHints(hints)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy