Remove usage of deprecated of `container.ID` and `token.SessionToken` code
elements. Replace using of custom message generators with the ones provided
by packages. Replace string comparison with `Equal` method call.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Add CutPayload method that returns RawObject's copy with untethered empty
payload. Changing the result payload doesn't affect source object. Changing
the other fields affects source object.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
In previous implementation RawObject constructor initialized internal v2
Object structure recursively so that further you can directly set the values
of nested fields. This caused the object created by constructor New to be
different from the object created from the empty object v2.
Remove recursive initialization of v2 Object from New and NewRaw
constructors. Make setters to initialize nested structures on demand.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Define Object type that represents the immutable NeoFS object. Define
RawObject type that provides interface for convenient construction of NeoFS
object.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>