v2/container/grpc: Implement needed setters

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-08-17 15:02:09 +03:00 committed by Stanislav Bogatyrev
parent ddd3ba1bf2
commit 9f4d24b592

View file

@ -3,6 +3,7 @@ package container
import ( import (
netmap "github.com/nspcc-dev/neofs-api-go/v2/netmap/grpc" netmap "github.com/nspcc-dev/neofs-api-go/v2/netmap/grpc"
refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc" refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
service "github.com/nspcc-dev/neofs-api-go/v2/service/grpc"
) )
// SetKey sets key to the container attribute. // SetKey sets key to the container attribute.
@ -47,9 +48,16 @@ func (m *Container) SetAttributes(v []*Container_Attribute) {
} }
} }
// SetRules sets placement rules of the container. // SetPlacementPolicy sets placement policy of the container.
func (m *Container) SetRules(v *netmap.PlacementPolicy) { func (m *Container) SetPlacementPolicy(v *netmap.PlacementPolicy) {
if m != nil { if m != nil {
m.PlacementPolicy = v m.PlacementPolicy = v
} }
} }
// SetVersion sets version of the container.
func (m *Container) SetVersion(v *service.Version) {
if m != nil {
m.Version = v
}
}