> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canton.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Variant

> Base class of all decoded-to-codegen Daml variants with no type parameters. Its encoded counterpart is Variant, which can be produced with toValue().

## Variant - stable

Upstream docs: [Open](https://javadoc.io/doc/com.daml/bindings-java/3.4.11/com/daml/ledger/javaapi/data/codegen/Variant.html)

**Signature**

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
public abstract class Variant<T> extends Object implements DefinedDataType<T>
```

**Members**

| Docs                                                                                                                            | Member      | Introduced | Deprecated | Removed |
| ------------------------------------------------------------------------------------------------------------------------------- | ----------- | ---------- | ---------- | ------- |
| [Open](https://javadoc.io/doc/com.daml/bindings-java/3.4.11/com/daml/ledger/javaapi/data/codegen/Variant.html#%3Cinit%3E%28%29) | `Variant()` | `3.4.8`    | -          | -       |
| [Open](https://javadoc.io/doc/com.daml/bindings-java/3.4.11/com/daml/ledger/javaapi/data/codegen/Variant.html#toValue%28%29)    | `toValue()` | `3.4.8`    | -          | -       |
