func (id *ID) Unmarshal(data []byte) error {
	return (*refs.ObjectID)(id).
		Unmarshal(data)
}
Unmarshal unmarshals protobuf binary representation of ID.
package object
import (
	"bytes"
	"crypto/sha256"
	"errors"
	"fmt"
	"github.com/mr-tron/base58"
	"github.com/nspcc-dev/neofs-api-go/v2/refs"
)
type ID refs.ObjectID
var errInvalidIDString = errors.New("incorrect format of the string object ID")
func NewIDFromV2(idV2 *refs.ObjectID) *ID {
	return (*ID)(idV2)
}
func NewID() *ID {
	return NewIDFromV2(new(refs.ObjectID))
}
func (id *ID) SetSHA256(v [sha256.Size]byte) {
	(*refs.ObjectID)(id).SetValue(v[:])
}
func (id *ID) Equal(id2 *ID) bool {
	return bytes.Equal(
		(*refs.ObjectID)(id).GetValue(),
		(*refs.ObjectID)(id2).GetValue(),
	)
}
func (id *ID) ToV2() *refs.ObjectID {
	return (*refs.ObjectID)(id)
}
func (id *ID) Parse(s string) error {
	data, err := base58.Decode(s)
	if err != nil {
		return fmt.Errorf("could not parse object.ID from string: %w", err)
	} else if len(data) != sha256.Size {
		return errInvalidIDString
	}
	(*refs.ObjectID)(id).SetValue(data)
	return nil
}
func (id *ID) String() string {
	return base58.Encode((*refs.ObjectID)(id).GetValue())
}
func (id *ID) Marshal(b ...[]byte) ([]byte, error) {
	var buf []byte
	if len(b) > 0 {
		buf = b[0]
	}
	return (*refs.ObjectID)(id).
		StableMarshal(buf)
}