smithy.api.Required.scala Maven / Gradle / Ivy
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