You can get a pretty reasonable facsimile using some libraries I made:
Discriminated unions: https://github.com/mcintyre321/OneOf and One line value objects: https://github.com/mcintyre321/ValueOf
Discriminated unions: https://github.com/mcintyre321/OneOf and One line value objects: https://github.com/mcintyre321/ValueOf