func (f SessionOption) Compose(opts ...SessionOption) SessionOption {
	return func(x ttnpb.Session) ttnpb.Session {
		x = f(x)
		for _, opt := range opts {
			x = opt(x)
		}
		return x
	}
}
Compose returns a functional composition of f and opts as a singular SessionOption.
package test
import (
	"time"
	pbtypes "github.com/gogo/protobuf/types"
	"go.thethings.network/lorawan-stack/v3/pkg/ttnpb"
	"go.thethings.network/lorawan-stack/v3/pkg/types"
)
type (
	RootKeysOption func(ttnpb.RootKeys) ttnpb.RootKeys
	RootKeysOptionNamespace struct{}
)
func (RootKeysOptionNamespace) WithRootKeyID(v string) RootKeysOption {
	return func(x ttnpb.RootKeys) ttnpb.RootKeys {
		x.RootKeyId = v
		return x
	}
}
func (RootKeysOptionNamespace) WithAppKey(v *ttnpb.KeyEnvelope) RootKeysOption {
	return func(x ttnpb.RootKeys) ttnpb.RootKeys {
		x.AppKey = v
		return x
	}
}
func (RootKeysOptionNamespace) WithNwkKey(v *ttnpb.KeyEnvelope) RootKeysOption {
	return func(x ttnpb.RootKeys) ttnpb.RootKeys {
		x.NwkKey = v
		return x
	}
}
func (RootKeysOptionNamespace) Compose(opts ...RootKeysOption) RootKeysOption {
	return func(x ttnpb.RootKeys) ttnpb.RootKeys {
		for _, opt := range opts {
			x = opt(x)
		}
		return x
	}
}
func (f RootKeysOption) Compose(opts ...RootKeysOption) RootKeysOption {
	return func(x ttnpb.RootKeys) ttnpb.RootKeys {
		x = f(x)
		for _, opt := range opts {
			x = opt(x)
		}
		return x
	}
}
var RootKeysOptions RootKeysOptionNamespace
func MakeRootKeys(opts ...RootKeysOption) *ttnpb.RootKeys {
	v := RootKeysOptions.Compose(opts...)(baseRootKeys)
	return &v
}
type (
	SessionKeysOption func(ttnpb.SessionKeys) ttnpb.SessionKeys
	SessionKeysOptionNamespace struct{}
)
func (SessionKeysOptionNamespace) WithSessionKeyID(v []byte) SessionKeysOption {
	return func(x ttnpb.SessionKeys) ttnpb.SessionKeys {
		x.SessionKeyId = v
		return x
	}
}
func (SessionKeysOptionNamespace) WithFNwkSIntKey(v *ttnpb.KeyEnvelope) SessionKeysOption {
	return func(x ttnpb.SessionKeys) ttnpb.SessionKeys {
		x.FNwkSIntKey = v
		return x
	}
}
func (SessionKeysOptionNamespace) WithSNwkSIntKey(v *ttnpb.KeyEnvelope) SessionKeysOption {
	return func(x ttnpb.SessionKeys) ttnpb.SessionKeys {
		x.SNwkSIntKey = v
		return x
	}
}
func (SessionKeysOptionNamespace) WithNwkSEncKey(v *ttnpb.KeyEnvelope) SessionKeysOption {
	return func(x ttnpb.SessionKeys) ttnpb.SessionKeys {
		x.NwkSEncKey = v
		return x
	}
}
func (SessionKeysOptionNamespace) WithAppSKey(v *ttnpb.KeyEnvelope) SessionKeysOption {
	return func(x ttnpb.SessionKeys) ttnpb.SessionKeys {
		x.AppSKey = v
		return x
	}
}
func (SessionKeysOptionNamespace) Compose(opts ...SessionKeysOption) SessionKeysOption {
	return func(x ttnpb.SessionKeys) ttnpb.SessionKeys {
		for _, opt := range opts {
			x = opt(x)
		}
		return x
	}
}
func (f SessionKeysOption) Compose(opts ...SessionKeysOption) SessionKeysOption {
	return func(x ttnpb.SessionKeys) ttnpb.SessionKeys {
		x = f(x)
		for _, opt := range opts {
			x = opt(x)
		}
		return x
	}
}
var SessionKeysOptions SessionKeysOptionNamespace
func MakeSessionKeys(opts ...SessionKeysOption) *ttnpb.SessionKeys {
	v := SessionKeysOptions.Compose(opts...)(baseSessionKeys)
	return &v
}
type (
	SessionOption func(ttnpb.Session) ttnpb.Session
	SessionOptionNamespace struct{}
)
func (SessionOptionNamespace) WithDevAddr(v types.DevAddr) SessionOption {
	return func(x ttnpb.Session) ttnpb.Session {
		x.DevAddr = v
		return x
	}
}
func (SessionOptionNamespace) WithSessionKeys(v ttnpb.SessionKeys) SessionOption {
	return func(x ttnpb.Session) ttnpb.Session {
		x.SessionKeys = v
		return x
	}
}
func (SessionOptionNamespace) WithLastFCntUp(v uint32) SessionOption {
	return func(x ttnpb.Session) ttnpb.Session {
		x.LastFCntUp = v
		return x
	}
}
func (SessionOptionNamespace) WithLastNFCntDown(v uint32) SessionOption {
	return func(x ttnpb.Session) ttnpb.Session {
		x.LastNFCntDown = v
		return x
	}
}
func (SessionOptionNamespace) WithLastAFCntDown(v uint32) SessionOption {
	return func(x ttnpb.Session) ttnpb.Session {
		x.LastAFCntDown = v
		return x
	}
}
func (SessionOptionNamespace) WithLastConfFCntDown(v uint32) SessionOption {
	return func(x ttnpb.Session) ttnpb.Session {
		x.LastConfFCntDown = v
		return x
	}
}
func (SessionOptionNamespace) WithStartedAt(v time.Time) SessionOption {
	return func(x ttnpb.Session) ttnpb.Session {
		x.StartedAt = v
		return x
	}
}
func (SessionOptionNamespace) WithQueuedApplicationDownlinks(vs ...*ttnpb.ApplicationDownlink) SessionOption {
	return func(x ttnpb.Session) ttnpb.Session {
		x.QueuedApplicationDownlinks = vs
		return x
	}
}
func (SessionOptionNamespace) Compose(opts ...SessionOption) SessionOption {
	return func(x ttnpb.Session) ttnpb.Session {
		for _, opt := range opts {
			x = opt(x)
		}
		return x
	}
}