From 9f4d24b5921be4bd3eba14b658df0bffe8773601 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 17 Aug 2020 15:02:09 +0300 Subject: [PATCH] v2/container/grpc: Implement needed setters Signed-off-by: Leonard Lyubich --- v2/container/grpc/types.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/v2/container/grpc/types.go b/v2/container/grpc/types.go index 3678b56..5e51e3c 100644 --- a/v2/container/grpc/types.go +++ b/v2/container/grpc/types.go @@ -3,6 +3,7 @@ package container import ( netmap "github.com/nspcc-dev/neofs-api-go/v2/netmap/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. @@ -47,9 +48,16 @@ func (m *Container) SetAttributes(v []*Container_Attribute) { } } -// SetRules sets placement rules of the container. -func (m *Container) SetRules(v *netmap.PlacementPolicy) { +// SetPlacementPolicy sets placement policy of the container. +func (m *Container) SetPlacementPolicy(v *netmap.PlacementPolicy) { if m != nil { m.PlacementPolicy = v } } + +// SetVersion sets version of the container. +func (m *Container) SetVersion(v *service.Version) { + if m != nil { + m.Version = v + } +}