I want to end up generating the following scala code:
saeld trait Foo {
val internal_id: String
val external_id: String
}
object Foo{
case object Bar extends Foo {
val internal_id: String = "1"
val external_id: String = "2"
}
case object Baz extends Foo {
val internal_id: String = "10"
val external_id: String = "20"
}
}
as closely as possible. What would be the cleanest/preferred way of achieving this in smithy? Think both union types and mixins would give me something close enough 🤔
ideally, It'd be nice if we can have an enumeratum style Foo.all method generated for us as well. that would return Seq(Bar, Baz)
I want to end up generating the following scala code:
as closely as possible. What would be the cleanest/preferred way of achieving this in smithy? Think both
union typesand mixins would give me something close enough 🤔ideally, It'd be nice if we can have an enumeratum style
Foo.allmethod generated for us as well. that would returnSeq(Bar, Baz)