package schsdk import ( "gitlink.org.cn/cloudream/common/pkgs/types" "gitlink.org.cn/cloudream/common/utils/serder" ) type AppInfo interface { GetAppID() string } var AppInfoTypeUnion = types.NewTypeUnion[AppInfo]( (*FederatedLearningAppInfo)(nil), (*OtherAppInfo)(nil), ) var _ = serder.UseTypeUnionInternallyTagged(&JobInfoTypeUnion, "type") type AppInfoBase struct { ID string `json:"id"` } func (i *AppInfoBase) GetAppID() string { return i.ID } type FederatedLearningAppInfo struct { serder.Metadata `union:"federatedLearning"` AppInfoBase Type string `json:"type"` Name string `json:"name"` Description string `json:"description"` } type OtherAppInfo struct { serder.Metadata `union:"other"` AppInfoBase Type string `json:"type"` Name string `json:"name"` Description string `json:"description"` }