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

scala.smithy.rules.ClientContextParamDefinition.scala Maven / Gradle / Ivy

There is a newer version: 0.0.32
Show newest version
package smithy.rules

import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

/** A client context parameter definition.
  * @param type
  *   The Smithy shape type that should be used to generate a client configurable for the rule-set parameter.
  * @param documentation
  *   Documentation string to be generated with the client parameter.
  */
final case class ClientContextParamDefinition(_type: ShapeType, documentation: Option[String] = None)

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

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

  implicit val schema: Schema[ClientContextParamDefinition] = struct(
    ShapeType.schema.required[ClientContextParamDefinition]("type", _._type).addHints(smithy.api.Documentation("The Smithy shape type that should be used to generate a client configurable for the rule-set parameter.")),
    string.optional[ClientContextParamDefinition]("documentation", _.documentation).addHints(smithy.api.Documentation("Documentation string to be generated with the client parameter.")),
  ){
    ClientContextParamDefinition.apply
  }.withId(id).addHints(hints)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy