func (o *rwObject) PayloadSize() uint64 {
	return (*object.Object)(o).
		GetHeader().
		GetPayloadLength()
}
PayloadSize returns payload length of the object.
package object
import (
	"github.com/nspcc-dev/neofs-api-go/pkg"
	cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id"
	"github.com/nspcc-dev/neofs-api-go/pkg/owner"
	"github.com/nspcc-dev/neofs-api-go/pkg/session"
	"github.com/nspcc-dev/neofs-api-go/v2/object"
	"github.com/nspcc-dev/neofs-api-go/v2/refs"
)
type rwObject object.Object
func (o *rwObject) ToV2() *object.Object {
	return (*object.Object)(o)
}
func (o *rwObject) setHeaderField(setter func(*object.Header)) {
	obj := (*object.Object)(o)
	h := obj.GetHeader()
	if h == nil {
		h = new(object.Header)
		obj.SetHeader(h)
	}
	setter(h)
}
func (o *rwObject) setSplitFields(setter func(*object.SplitHeader)) {
	o.setHeaderField(func(h *object.Header) {
		split := h.GetSplit()
		if split == nil {
			split = new(object.SplitHeader)
			h.SetSplit(split)
		}
		setter(split)
	})
}
func (o *rwObject) ID() *ID {
	return NewIDFromV2(
		(*object.Object)(o).
			GetObjectID(),
	)
}
func (o *rwObject) setID(v *ID) {
	(*object.Object)(o).
		SetObjectID(v.ToV2())
}
func (o *rwObject) Signature() *pkg.Signature {
	return pkg.NewSignatureFromV2(
		(*object.Object)(o).
			GetSignature(),
	)
}
func (o *rwObject) setSignature(v *pkg.Signature) {
	(*object.Object)(o).
		SetSignature(v.ToV2())
}
func (o *rwObject) Payload() []byte {
	return (*object.Object)(o).
		GetPayload()
}
func (o *rwObject) setPayload(v []byte) {
	(*object.Object)(o).
		SetPayload(v)
}
func (o *rwObject) Version() *pkg.Version {
	return pkg.NewVersionFromV2(
		(*object.Object)(o).
			GetHeader().
			GetVersion(),
	)
}
func (o *rwObject) setVersion(v *pkg.Version) {
	o.setHeaderField(func(h *object.Header) {
		h.SetVersion(v.ToV2())
	})
}