I'm not sure Opt is the best name for this, it's almost something like an OptionAssigner. Also as a tip you can use default parameters here to avoid passing lots of nulls above (which is hard to read). Something like this:
```
class Opt(val value: String, val deployModes: Int, val clusterManagers: Int, val envVar: String = null, ...)
```
Then you can call:
```
new OptionAssigner(foo, YARN, CLIENT, envVar="SPARK_FOO")
```
You can also make this a case class to avoid the `new`.