// automatically generated by stateify.

package nvconf

import (
	"context"

	"gvisor.dev/gvisor/pkg/state"
)

func (v *DriverVersion) StateTypeName() string {
	return "pkg/sentry/devices/nvproxy/nvconf.DriverVersion"
}

func (v *DriverVersion) StateFields() []string {
	return []string{
		"major",
		"minor",
		"patch",
	}
}

func (v *DriverVersion) beforeSave() {}

// +checklocksignore
func (v *DriverVersion) StateSave(stateSinkObject state.Sink) {
	v.beforeSave()
	stateSinkObject.Save(0, &v.major)
	stateSinkObject.Save(1, &v.minor)
	stateSinkObject.Save(2, &v.patch)
}

func (v *DriverVersion) afterLoad(context.Context) {}

// +checklocksignore
func (v *DriverVersion) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &v.major)
	stateSourceObject.Load(1, &v.minor)
	stateSourceObject.Load(2, &v.patch)
}

func init() {
	state.Register((*DriverVersion)(nil))
}
