import basic import hasGeneric struct UsingGenerics { field1: basic.Maybe field2: basic.Either } struct UsingOwnGenerics { field1: basic.Maybe } struct KnownForMovie { media_type: "movie" poster_path: ?String id: U32 title: ?String vote_average: F32 release_date: ?String overview: String } struct KnownForShow { media_type: "tv" poster_path: ?String id: U32 vote_average: F32 overview: String first_air_date: ?String name: ?String } untagged union KnownFor { KnownForShow KnownForMovie String F32 } struct KnownForMovieWithoutTypeTag { poster_path: ?String id: U32 title: ?String vote_average: F32 release_date: ?String overview: String } struct KnownForShowWithoutTypeTag { poster_path: ?String id: U32 vote_average: F32 overview: String first_air_date: ?String name: ?String } union(tag = media_type, embedded) KnownForEmbedded { movieStartingWithLowercase: KnownForMovieWithoutTypeTag tvStartingWithLowercase: KnownForShowWithoutTypeTag } union(tag = media_type, embedded) KnownForEmbeddedWithUpperCase { Movie: KnownForMovieWithoutTypeTag Tv: KnownForShowWithoutTypeTag }