func (o OptionalFoo) MustGet() Foo {
	if !o.Present() {
		panic("value not present")
	}
	return *o.value
}
MustGet returns the Foo value or panics if not present.
package foo
import (
	"encoding/json"
	"errors"
)
type OptionalFoo struct {
	value *Foo
}
func NewOptionalFoo(v Foo) OptionalFoo {
	return OptionalFoo{&v}
}
func (o *OptionalFoo) Set(v Foo) {
	o.value = &v
}
func (o OptionalFoo) Get() (Foo, error) {
	if !o.Present() {
		var zero Foo
		return zero, errors.New("value not present")
	}
	return *o.value, nil
}