import basic struct SomeType { type: "SomeType" some_field: String some_other_field: I32 maybe_some_field: ?String } struct Holder { value: T } union(tag = kind) EventWithKind { NotificationWithKind: String LaunchWithKind AnotherEventWithKind: SomeType } union Possibly { NotReally Definitely: T } struct PossiblyHolder { value: Possibly } enum Color { red = "ff0000" green = "00ff00" blue = "0000ff" } 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 } 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 }