// Code generated by FTL. DO NOT EDIT.
package main

import (
	"context"
	ftlanother "ftl/another"
	ftlother "ftl/other"
	"github.com/block/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect"
	"github.com/block/ftl/common/plugin"
	"github.com/block/ftl/common/reflection"
	lib "github.com/block/ftl/go-runtime/schema/testdata"
	"github.com/block/ftl/go-runtime/server"
)

func init() {
	reflection.Register(
		reflection.SumType[ftlanother.SecondTypeEnum](
			*new(ftlanother.One),
			*new(ftlanother.Two),
		),
		reflection.SumType[ftlanother.TypeEnum](
			*new(ftlanother.A),
			*new(ftlanother.B),
		),
		reflection.SumType[ftlother.SecondTypeEnum](
			*new(ftlother.A),
			*new(ftlother.B),
		),
		reflection.SumType[ftlother.TypeEnum](
			*new(ftlother.MyBool),
			*new(ftlother.MyBytes),
			*new(ftlother.MyFloat),
			*new(ftlother.MyInt),
			*new(ftlother.MyList),
			*new(ftlother.MyMap),
			*new(ftlother.MyOption),
			*new(ftlother.MyString),
			*new(ftlother.MyStruct),
			*new(ftlother.MyTime),
			*new(ftlother.MyUnit),
		),
		reflection.ExternalType(*new(lib.NonFTLType)),
		reflection.ExternalType(*new(lib.AnotherNonFTLType)),
		reflection.ProvideResourcesForVerb(
			ftlother.Echo,
		),
	)
}

func main() {
	verbConstructor := server.NewUserVerbServer("integration", "other",
		server.HandleCall[ftlother.EchoRequest, ftlother.EchoResponse](ftlother.Echo),
	)
	plugin.Start(context.Background(), "other", verbConstructor, ftlv1connect.VerbServiceName, ftlv1connect.NewVerbServiceHandler)
}
