// automatically generated by stateify.

package boot

import (
	"context"

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

func (c *sandboxNetstackCreator) StateTypeName() string {
	return "runsc/boot.sandboxNetstackCreator"
}

func (c *sandboxNetstackCreator) StateFields() []string {
	return []string{
		"clock",
		"allowPacketEndpointWrite",
		"uid",
	}
}

func (c *sandboxNetstackCreator) beforeSave() {}

// +checklocksignore
func (c *sandboxNetstackCreator) StateSave(stateSinkObject state.Sink) {
	c.beforeSave()
	stateSinkObject.Save(0, &c.clock)
	stateSinkObject.Save(1, &c.allowPacketEndpointWrite)
	stateSinkObject.Save(2, &c.uid)
}

func (c *sandboxNetstackCreator) afterLoad(context.Context) {}

// +checklocksignore
func (c *sandboxNetstackCreator) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &c.clock)
	stateSourceObject.Load(1, &c.allowPacketEndpointWrite)
	stateSourceObject.Load(2, &c.uid)
}

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