alloy.common.CountryCodeFormat.scala Maven / Gradle / Ivy
package alloy.common
import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.schema.Schema.constant
/** ISO 3166-1 Alpha-2 country code
* Full list in https://www.iso.org/obp/ui/#search/code/
* example: "AF", "US"
*/
final case class CountryCodeFormat()
object CountryCodeFormat extends ShapeTag.Companion[CountryCodeFormat] {
val id: ShapeId = ShapeId("alloy.common", "countryCodeFormat")
val hints: Hints = Hints(
smithy.api.Documentation("ISO 3166-1 Alpha-2 country code\nFull list in https://www.iso.org/obp/ui/#search/code/\nexample: \"AF\", \"US\""),
smithy.api.Trait(selector = Some(":test(string, member > string)"), structurallyExclusive = None, conflicts = None, breakingChanges = None),
).lazily
implicit val schema: Schema[CountryCodeFormat] = constant(CountryCodeFormat()).withId(id).addHints(hints)
}