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

smithy.api.Required.scala Maven / Gradle / Ivy

There is a newer version: 0.19.0-41-91762fb
Show newest version
package smithy.api

import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.schema.Schema.constant

/** Marks a structure member as required, meaning a value for the member MUST
  * be present.
  */
final case class Required()

object Required extends ShapeTag.Companion[Required] {
  val id: ShapeId = ShapeId("smithy.api", "required")

  val hints: Hints = Hints(
    smithy.api.Documentation("Marks a structure member as required, meaning a value for the member MUST\nbe present."),
    smithy.api.Trait(selector = Some("structure > member"), structurallyExclusive = None, conflicts = None, breakingChanges = Some(List(smithy.api.TraitDiffRule(change = smithy.api.TraitChangeType.ADD.widen, severity = smithy.api.Severity.WARNING.widen, path = None, message = Some("If any consumers were previously omitting this member in operation inputs, making it required is backwards incompatible"))))),
  ).lazily


  implicit val schema: Schema[Required] = constant(Required()).withId(id).addHints(hints)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy