Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordinal-based coproducts #1091

Merged
merged 21 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ private[aws] class AwsSchemaVisitorAwsQueryCodec(

def encode[A](u: U, alt: Alt[U, A]): FormData = {
val key = getKey(alt.hints, alt.label)
dispatch
.projector(alt)(u)
alt.project
.lift(u)
.fold(FormData.Empty.widen)(a => compile(alt.schema)(a))
.prepend(key)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,7 @@ object AwsQueryCodecSpec extends SimpleIOSuite {

test("union") {
type Foo = Either[Int, String]
implicit val schema: Schema[Foo] = {
val left = int.oneOf[Foo]("left", Left(_))
val right = string.oneOf[Foo]("right", Right(_))
union(left, right) {
case Left(int) => left(int)
case Right(string) => right(string)
}
}
implicit val schema: Schema[Foo] = Schema.either(int, string)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that looks good, wow

val expectedLeft = "left=1"
val expectedRight = "right=hello"
checkContent[Foo](expectedLeft, Left(1)) |+|
Expand All @@ -248,14 +241,10 @@ object AwsQueryCodecSpec extends SimpleIOSuite {

test("union: custom names") {
type Foo = Either[Int, String]
implicit val schema: Schema[Foo] = {
val left = int.oneOf[Foo]("left", Left(_)).addHints(XmlName("foo"))
val right = string.oneOf[Foo]("right", Right(_)).addHints(XmlName("bar"))
union(left, right) {
case Left(int) => left(int)
case Right(string) => right(string)
}
}
implicit val schema: Schema[Foo] = Schema.either(
int.addMemberHints(XmlName("foo")),
string.addMemberHints(XmlName("bar"))
)
val expectedLeft = "foo=1"
val expectedRight = "bar=hello".stripMargin
checkContent[Foo](expectedLeft, Left(1)) |+|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ object DynamoDBGen extends Service.Mixin[DynamoDBGen, DynamoDBOperation] {
type Default[F[+_, +_]] = Constant[smithy4s.kinds.stubs.Kind2[F]#toKind5]
}

val endpoints: List[smithy4s.Endpoint[DynamoDBOperation, _, _, _, _, _]] = List(
val endpoints: Vector[smithy4s.Endpoint[DynamoDBOperation, _, _, _, _, _]] = Vector(
DynamoDBOperation.DescribeEndpoints,
DynamoDBOperation.ListTables,
)

def endpoint[I, E, O, SI, SO](op: DynamoDBOperation[I, E, O, SI, SO]) = op.endpoint
def input[I, E, O, SI, SO](op: DynamoDBOperation[I, E, O, SI, SO]): I = op.input
def ordinal[I, E, O, SI, SO](op: DynamoDBOperation[I, E, O, SI, SO]): Int = op.ordinal
override def endpoint[I, E, O, SI, SO](op: DynamoDBOperation[I, E, O, SI, SO]) = op.endpoint
class Constant[P[-_, +_, +_, +_, +_]](value: P[Any, Nothing, Nothing, Nothing, Nothing]) extends DynamoDBOperation.Transformed[DynamoDBOperation, P](reified, const5(value))
type Default[F[+_]] = Constant[smithy4s.kinds.stubs.Kind1[F]#toKind5]
def reified: DynamoDBGen[DynamoDBOperation] = DynamoDBOperation.reified
Expand All @@ -95,7 +97,9 @@ object DynamoDBGen extends Service.Mixin[DynamoDBGen, DynamoDBOperation] {

sealed trait DynamoDBOperation[Input, Err, Output, StreamedInput, StreamedOutput] {
def run[F[_, _, _, _, _]](impl: DynamoDBGen[F]): F[Input, Err, Output, StreamedInput, StreamedOutput]
def endpoint: (Input, smithy4s.Endpoint[DynamoDBOperation, Input, Err, Output, StreamedInput, StreamedOutput])
def ordinal: Int
def input: Input
def endpoint: smithy4s.Endpoint[DynamoDBOperation, Input, Err, Output, StreamedInput, StreamedOutput]
}

object DynamoDBOperation {
Expand All @@ -114,7 +118,8 @@ object DynamoDBOperation {
}
final case class DescribeEndpoints(input: DescribeEndpointsRequest) extends DynamoDBOperation[DescribeEndpointsRequest, Nothing, DescribeEndpointsResponse, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: DynamoDBGen[F]): F[DescribeEndpointsRequest, Nothing, DescribeEndpointsResponse, Nothing, Nothing] = impl.describeEndpoints()
def endpoint: (DescribeEndpointsRequest, smithy4s.Endpoint[DynamoDBOperation,DescribeEndpointsRequest, Nothing, DescribeEndpointsResponse, Nothing, Nothing]) = (input, DescribeEndpoints)
def ordinal = 0
def endpoint: smithy4s.Endpoint[DynamoDBOperation,DescribeEndpointsRequest, Nothing, DescribeEndpointsResponse, Nothing, Nothing] = DescribeEndpoints
}
object DescribeEndpoints extends smithy4s.Endpoint[DynamoDBOperation,DescribeEndpointsRequest, Nothing, DescribeEndpointsResponse, Nothing, Nothing] {
val id: ShapeId = ShapeId("com.amazonaws.dynamodb", "DescribeEndpoints")
Expand All @@ -130,7 +135,8 @@ object DynamoDBOperation {
}
final case class ListTables(input: ListTablesInput) extends DynamoDBOperation[ListTablesInput, DynamoDBOperation.ListTablesError, ListTablesOutput, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: DynamoDBGen[F]): F[ListTablesInput, DynamoDBOperation.ListTablesError, ListTablesOutput, Nothing, Nothing] = impl.listTables(input.exclusiveStartTableName, input.limit)
def endpoint: (ListTablesInput, smithy4s.Endpoint[DynamoDBOperation,ListTablesInput, DynamoDBOperation.ListTablesError, ListTablesOutput, Nothing, Nothing]) = (input, ListTables)
def ordinal = 1
def endpoint: smithy4s.Endpoint[DynamoDBOperation,ListTablesInput, DynamoDBOperation.ListTablesError, ListTablesOutput, Nothing, Nothing] = ListTables
}
object ListTables extends smithy4s.Endpoint[DynamoDBOperation,ListTablesInput, DynamoDBOperation.ListTablesError, ListTablesOutput, Nothing, Nothing] with Errorable[ListTablesError] {
val id: ShapeId = ShapeId("com.amazonaws.dynamodb", "ListTables")
Expand Down Expand Up @@ -158,14 +164,15 @@ object DynamoDBOperation {
}
sealed trait ListTablesError extends scala.Product with scala.Serializable {
@inline final def widen: ListTablesError = this
def _ordinal: Int
}
object ListTablesError extends ShapeTag.Companion[ListTablesError] {
val id: ShapeId = ShapeId("com.amazonaws.dynamodb", "ListTablesError")

val hints: Hints = Hints.empty

final case class InternalServerErrorCase(internalServerError: InternalServerError) extends ListTablesError
final case class InvalidEndpointExceptionCase(invalidEndpointException: InvalidEndpointException) extends ListTablesError
final case class InternalServerErrorCase(internalServerError: InternalServerError) extends ListTablesError { final def _ordinal: Int = 0 }
final case class InvalidEndpointExceptionCase(invalidEndpointException: InvalidEndpointException) extends ListTablesError { final def _ordinal: Int = 1 }

object InternalServerErrorCase {
val hints: Hints = Hints.empty
Expand All @@ -182,8 +189,7 @@ object DynamoDBOperation {
InternalServerErrorCase.alt,
InvalidEndpointExceptionCase.alt,
){
case c: InternalServerErrorCase => InternalServerErrorCase.alt(c)
case c: InvalidEndpointExceptionCase => InvalidEndpointExceptionCase.alt(c)
_._ordinal
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ object BenchmarkServiceGen extends Service.Mixin[BenchmarkServiceGen, BenchmarkS
type Default[F[+_, +_]] = Constant[smithy4s.kinds.stubs.Kind2[F]#toKind5]
}

val endpoints: List[smithy4s.Endpoint[BenchmarkServiceOperation, _, _, _, _, _]] = List(
val endpoints: Vector[smithy4s.Endpoint[BenchmarkServiceOperation, _, _, _, _, _]] = Vector(
BenchmarkServiceOperation.CreateObject,
BenchmarkServiceOperation.SendString,
)

def endpoint[I, E, O, SI, SO](op: BenchmarkServiceOperation[I, E, O, SI, SO]) = op.endpoint
def input[I, E, O, SI, SO](op: BenchmarkServiceOperation[I, E, O, SI, SO]): I = op.input
def ordinal[I, E, O, SI, SO](op: BenchmarkServiceOperation[I, E, O, SI, SO]): Int = op.ordinal
override def endpoint[I, E, O, SI, SO](op: BenchmarkServiceOperation[I, E, O, SI, SO]) = op.endpoint
class Constant[P[-_, +_, +_, +_, +_]](value: P[Any, Nothing, Nothing, Nothing, Nothing]) extends BenchmarkServiceOperation.Transformed[BenchmarkServiceOperation, P](reified, const5(value))
type Default[F[+_]] = Constant[smithy4s.kinds.stubs.Kind1[F]#toKind5]
def reified: BenchmarkServiceGen[BenchmarkServiceOperation] = BenchmarkServiceOperation.reified
Expand All @@ -51,7 +53,9 @@ object BenchmarkServiceGen extends Service.Mixin[BenchmarkServiceGen, BenchmarkS

sealed trait BenchmarkServiceOperation[Input, Err, Output, StreamedInput, StreamedOutput] {
def run[F[_, _, _, _, _]](impl: BenchmarkServiceGen[F]): F[Input, Err, Output, StreamedInput, StreamedOutput]
def endpoint: (Input, Endpoint[BenchmarkServiceOperation, Input, Err, Output, StreamedInput, StreamedOutput])
def ordinal: Int
def input: Input
def endpoint: Endpoint[BenchmarkServiceOperation, Input, Err, Output, StreamedInput, StreamedOutput]
}

object BenchmarkServiceOperation {
Expand All @@ -70,7 +74,8 @@ object BenchmarkServiceOperation {
}
final case class CreateObject(input: CreateObjectInput) extends BenchmarkServiceOperation[CreateObjectInput, Nothing, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: BenchmarkServiceGen[F]): F[CreateObjectInput, Nothing, Unit, Nothing, Nothing] = impl.createObject(input.key, input.bucketName, input.payload)
def endpoint: (CreateObjectInput, smithy4s.Endpoint[BenchmarkServiceOperation,CreateObjectInput, Nothing, Unit, Nothing, Nothing]) = (input, CreateObject)
def ordinal = 0
def endpoint: smithy4s.Endpoint[BenchmarkServiceOperation,CreateObjectInput, Nothing, Unit, Nothing, Nothing] = CreateObject
}
object CreateObject extends smithy4s.Endpoint[BenchmarkServiceOperation,CreateObjectInput, Nothing, Unit, Nothing, Nothing] {
val id: ShapeId = ShapeId("smithy4s.benchmark", "CreateObject")
Expand All @@ -86,7 +91,8 @@ object BenchmarkServiceOperation {
}
final case class SendString(input: SendStringInput) extends BenchmarkServiceOperation[SendStringInput, Nothing, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: BenchmarkServiceGen[F]): F[SendStringInput, Nothing, Unit, Nothing, Nothing] = impl.sendString(input.key, input.bucketName, input.body)
def endpoint: (SendStringInput, smithy4s.Endpoint[BenchmarkServiceOperation,SendStringInput, Nothing, Unit, Nothing, Nothing]) = (input, SendString)
def ordinal = 1
def endpoint: smithy4s.Endpoint[BenchmarkServiceOperation,SendStringInput, Nothing, Unit, Nothing, Nothing] = SendString
}
object SendString extends smithy4s.Endpoint[BenchmarkServiceOperation,SendStringInput, Nothing, Unit, Nothing, Nothing] {
val id: ShapeId = ShapeId("smithy4s.benchmark", "SendString")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ object BrandServiceGen extends Service.Mixin[BrandServiceGen, BrandServiceOperat
type Default[F[+_, +_]] = Constant[smithy4s.kinds.stubs.Kind2[F]#toKind5]
}

val endpoints: List[smithy4s.Endpoint[BrandServiceOperation, _, _, _, _, _]] = List(
val endpoints: Vector[smithy4s.Endpoint[BrandServiceOperation, _, _, _, _, _]] = Vector(
BrandServiceOperation.AddBrands,
)

def endpoint[I, E, O, SI, SO](op: BrandServiceOperation[I, E, O, SI, SO]) = op.endpoint
def input[I, E, O, SI, SO](op: BrandServiceOperation[I, E, O, SI, SO]): I = op.input
def ordinal[I, E, O, SI, SO](op: BrandServiceOperation[I, E, O, SI, SO]): Int = op.ordinal
override def endpoint[I, E, O, SI, SO](op: BrandServiceOperation[I, E, O, SI, SO]) = op.endpoint
class Constant[P[-_, +_, +_, +_, +_]](value: P[Any, Nothing, Nothing, Nothing, Nothing]) extends BrandServiceOperation.Transformed[BrandServiceOperation, P](reified, const5(value))
type Default[F[+_]] = Constant[smithy4s.kinds.stubs.Kind1[F]#toKind5]
def reified: BrandServiceGen[BrandServiceOperation] = BrandServiceOperation.reified
Expand All @@ -49,7 +51,9 @@ object BrandServiceGen extends Service.Mixin[BrandServiceGen, BrandServiceOperat

sealed trait BrandServiceOperation[Input, Err, Output, StreamedInput, StreamedOutput] {
def run[F[_, _, _, _, _]](impl: BrandServiceGen[F]): F[Input, Err, Output, StreamedInput, StreamedOutput]
def endpoint: (Input, Endpoint[BrandServiceOperation, Input, Err, Output, StreamedInput, StreamedOutput])
def ordinal: Int
def input: Input
def endpoint: Endpoint[BrandServiceOperation, Input, Err, Output, StreamedInput, StreamedOutput]
}

object BrandServiceOperation {
Expand All @@ -66,7 +70,8 @@ object BrandServiceOperation {
}
final case class AddBrands(input: AddBrandsInput) extends BrandServiceOperation[AddBrandsInput, Nothing, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: BrandServiceGen[F]): F[AddBrandsInput, Nothing, Unit, Nothing, Nothing] = impl.addBrands(input.brands)
def endpoint: (AddBrandsInput, smithy4s.Endpoint[BrandServiceOperation,AddBrandsInput, Nothing, Unit, Nothing, Nothing]) = (input, AddBrands)
def ordinal = 0
def endpoint: smithy4s.Endpoint[BrandServiceOperation,AddBrandsInput, Nothing, Unit, Nothing, Nothing] = AddBrands
}
object AddBrands extends smithy4s.Endpoint[BrandServiceOperation,AddBrandsInput, Nothing, Unit, Nothing, Nothing] {
val id: ShapeId = ShapeId("smithy4s.example", "AddBrands")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ import smithy4s.schema.Schema.union

sealed trait CheckedOrUnchecked extends scala.Product with scala.Serializable {
@inline final def widen: CheckedOrUnchecked = this
def _ordinal: Int
}
object CheckedOrUnchecked extends ShapeTag.Companion[CheckedOrUnchecked] {
val id: ShapeId = ShapeId("smithy4s.example", "CheckedOrUnchecked")

val hints: Hints = Hints.empty

final case class CheckedCase(checked: String) extends CheckedOrUnchecked
final case class RawCase(raw: String) extends CheckedOrUnchecked
final case class CheckedCase(checked: String) extends CheckedOrUnchecked { final def _ordinal: Int = 0 }
final case class RawCase(raw: String) extends CheckedOrUnchecked { final def _ordinal: Int = 1 }

object CheckedCase {
val hints: Hints = Hints.empty
Expand All @@ -34,7 +35,6 @@ object CheckedOrUnchecked extends ShapeTag.Companion[CheckedOrUnchecked] {
CheckedCase.alt,
RawCase.alt,
){
case c: CheckedCase => CheckedCase.alt(c)
case c: RawCase => RawCase.alt(c)
_._ordinal
}.withId(id).addHints(hints)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import smithy4s.schema.Schema.union

sealed trait CheckedOrUnchecked2 extends scala.Product with scala.Serializable {
@inline final def widen: CheckedOrUnchecked2 = this
def _ordinal: Int
}
object CheckedOrUnchecked2 extends ShapeTag.Companion[CheckedOrUnchecked2] {
val id: ShapeId = ShapeId("smithy4s.example", "CheckedOrUnchecked2")
Expand All @@ -18,8 +19,8 @@ object CheckedOrUnchecked2 extends ShapeTag.Companion[CheckedOrUnchecked2] {
alloy.Untagged(),
)

final case class CheckedCase(checked: String) extends CheckedOrUnchecked2
final case class RawCase(raw: String) extends CheckedOrUnchecked2
final case class CheckedCase(checked: String) extends CheckedOrUnchecked2 { final def _ordinal: Int = 0 }
final case class RawCase(raw: String) extends CheckedOrUnchecked2 { final def _ordinal: Int = 1 }

object CheckedCase {
val hints: Hints = Hints.empty
Expand All @@ -36,7 +37,6 @@ object CheckedOrUnchecked2 extends ShapeTag.Companion[CheckedOrUnchecked2] {
CheckedCase.alt,
RawCase.alt,
){
case c: CheckedCase => CheckedCase.alt(c)
case c: RawCase => RawCase.alt(c)
_._ordinal
}.withId(id).addHints(hints)
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ object DeprecatedServiceGen extends Service.Mixin[DeprecatedServiceGen, Deprecat
type Default[F[+_, +_]] = Constant[smithy4s.kinds.stubs.Kind2[F]#toKind5]
}

val endpoints: List[smithy4s.Endpoint[DeprecatedServiceOperation, _, _, _, _, _]] = List(
val endpoints: Vector[smithy4s.Endpoint[DeprecatedServiceOperation, _, _, _, _, _]] = Vector(
DeprecatedServiceOperation.DeprecatedOperation,
)

def endpoint[I, E, O, SI, SO](op: DeprecatedServiceOperation[I, E, O, SI, SO]) = op.endpoint
def input[I, E, O, SI, SO](op: DeprecatedServiceOperation[I, E, O, SI, SO]): I = op.input
def ordinal[I, E, O, SI, SO](op: DeprecatedServiceOperation[I, E, O, SI, SO]): Int = op.ordinal
override def endpoint[I, E, O, SI, SO](op: DeprecatedServiceOperation[I, E, O, SI, SO]) = op.endpoint
class Constant[P[-_, +_, +_, +_, +_]](value: P[Any, Nothing, Nothing, Nothing, Nothing]) extends DeprecatedServiceOperation.Transformed[DeprecatedServiceOperation, P](reified, const5(value))
type Default[F[+_]] = Constant[smithy4s.kinds.stubs.Kind1[F]#toKind5]
def reified: DeprecatedServiceGen[DeprecatedServiceOperation] = DeprecatedServiceOperation.reified
Expand All @@ -53,7 +55,9 @@ object DeprecatedServiceGen extends Service.Mixin[DeprecatedServiceGen, Deprecat

sealed trait DeprecatedServiceOperation[Input, Err, Output, StreamedInput, StreamedOutput] {
def run[F[_, _, _, _, _]](impl: DeprecatedServiceGen[F]): F[Input, Err, Output, StreamedInput, StreamedOutput]
def endpoint: (Input, Endpoint[DeprecatedServiceOperation, Input, Err, Output, StreamedInput, StreamedOutput])
def ordinal: Int
def input: Input
def endpoint: Endpoint[DeprecatedServiceOperation, Input, Err, Output, StreamedInput, StreamedOutput]
}

object DeprecatedServiceOperation {
Expand All @@ -70,7 +74,9 @@ object DeprecatedServiceOperation {
}
final case class DeprecatedOperation() extends DeprecatedServiceOperation[Unit, Nothing, Unit, Nothing, Nothing] {
def run[F[_, _, _, _, _]](impl: DeprecatedServiceGen[F]): F[Unit, Nothing, Unit, Nothing, Nothing] = impl.deprecatedOperation()
def endpoint: (Unit, smithy4s.Endpoint[DeprecatedServiceOperation,Unit, Nothing, Unit, Nothing, Nothing]) = ((), DeprecatedOperation)
def ordinal = 0
def input: Unit = ()
def endpoint: smithy4s.Endpoint[DeprecatedServiceOperation,Unit, Nothing, Unit, Nothing, Nothing] = DeprecatedOperation
}
object DeprecatedOperation extends smithy4s.Endpoint[DeprecatedServiceOperation,Unit, Nothing, Unit, Nothing, Nothing] {
val id: ShapeId = ShapeId("smithy4s.example", "DeprecatedOperation")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import smithy4s.schema.Schema.union
@deprecated(message = "A compelling reason", since = "0.0.1")
sealed trait DeprecatedUnion extends scala.Product with scala.Serializable {
@inline final def widen: DeprecatedUnion = this
def _ordinal: Int
}
object DeprecatedUnion extends ShapeTag.Companion[DeprecatedUnion] {
val id: ShapeId = ShapeId("smithy4s.example", "DeprecatedUnion")
Expand All @@ -21,10 +22,12 @@ object DeprecatedUnion extends ShapeTag.Companion[DeprecatedUnion] {
)

@deprecated(message = "N/A", since = "N/A")
final case class SCase(s: String) extends DeprecatedUnion
final case class S_V2Case(s_V2: String) extends DeprecatedUnion
final case class SCase(s: String) extends DeprecatedUnion { final def _ordinal: Int = 0 }
final case class S_V2Case(s_V2: String) extends DeprecatedUnion { final def _ordinal: Int = 1 }
@deprecated(message = "N/A", since = "N/A")
final case class DeprecatedUnionProductCase() extends DeprecatedUnion
final case class DeprecatedUnionProductCase() extends DeprecatedUnion {
def _ordinal: Int = 2
}
object DeprecatedUnionProductCase extends ShapeTag.Companion[DeprecatedUnionProductCase] {
val id: ShapeId = ShapeId("smithy4s.example", "DeprecatedUnionProductCase")

Expand All @@ -37,7 +40,9 @@ object DeprecatedUnion extends ShapeTag.Companion[DeprecatedUnion] {
val alt = schema.oneOf[DeprecatedUnion]("p")
}
@deprecated(message = "N/A", since = "N/A")
final case class UnionProductCaseDeprecatedAtCallSite() extends DeprecatedUnion
final case class UnionProductCaseDeprecatedAtCallSite() extends DeprecatedUnion {
def _ordinal: Int = 3
}
object UnionProductCaseDeprecatedAtCallSite extends ShapeTag.Companion[UnionProductCaseDeprecatedAtCallSite] {
val id: ShapeId = ShapeId("smithy4s.example", "UnionProductCaseDeprecatedAtCallSite")

Expand Down Expand Up @@ -69,9 +74,6 @@ object DeprecatedUnion extends ShapeTag.Companion[DeprecatedUnion] {
DeprecatedUnionProductCase.alt,
UnionProductCaseDeprecatedAtCallSite.alt,
){
case c: SCase => SCase.alt(c)
case c: S_V2Case => S_V2Case.alt(c)
case c: DeprecatedUnionProductCase => DeprecatedUnionProductCase.alt(c)
case c: UnionProductCaseDeprecatedAtCallSite => UnionProductCaseDeprecatedAtCallSite.alt(c)
_._ordinal
}.withId(id).addHints(hints)
}
Loading