2020-08-13 12:43:47 +00:00
|
|
|
package container
|
2020-08-12 19:06:10 +00:00
|
|
|
|
|
|
|
import (
|
2022-12-09 11:16:24 +00:00
|
|
|
netmap "github.com/TrueCloudLab/frostfs-api-go/v2/netmap/grpc"
|
|
|
|
refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
|
2020-08-12 19:06:10 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// SetKey sets key to the container attribute.
|
|
|
|
func (m *Container_Attribute) SetKey(v string) {
|
2022-03-23 11:42:57 +00:00
|
|
|
m.Key = v
|
2020-08-12 19:06:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetValue sets value of the container attribute.
|
|
|
|
func (m *Container_Attribute) SetValue(v string) {
|
2022-03-23 11:42:57 +00:00
|
|
|
m.Value = v
|
2020-08-12 19:06:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetOwnerId sets identifier of the container owner,
|
|
|
|
func (m *Container) SetOwnerId(v *refs.OwnerID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
m.OwnerId = v
|
2020-08-12 19:06:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetNonce sets nonce of the container structure.
|
|
|
|
func (m *Container) SetNonce(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
m.Nonce = v
|
2020-08-12 19:06:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetBasicAcl sets basic ACL of the container.
|
|
|
|
func (m *Container) SetBasicAcl(v uint32) {
|
2022-03-23 11:42:57 +00:00
|
|
|
m.BasicAcl = v
|
2020-08-12 19:06:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetAttributes sets list of the container attributes.
|
|
|
|
func (m *Container) SetAttributes(v []*Container_Attribute) {
|
2022-03-23 11:42:57 +00:00
|
|
|
m.Attributes = v
|
2020-08-12 19:06:10 +00:00
|
|
|
}
|
|
|
|
|
2020-08-17 12:02:09 +00:00
|
|
|
// SetPlacementPolicy sets placement policy of the container.
|
|
|
|
func (m *Container) SetPlacementPolicy(v *netmap.PlacementPolicy) {
|
2022-03-23 11:42:57 +00:00
|
|
|
m.PlacementPolicy = v
|
2020-08-12 19:06:10 +00:00
|
|
|
}
|
2020-08-17 12:02:09 +00:00
|
|
|
|
|
|
|
// SetVersion sets version of the container.
|
2020-08-20 09:43:47 +00:00
|
|
|
func (m *Container) SetVersion(v *refs.Version) {
|
2022-03-23 11:42:57 +00:00
|
|
|
m.Version = v
|
2020-08-17 12:02:09 +00:00
|
|
|
}
|