Implement field setters on all protobuf messages

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-08-12 22:06:10 +03:00 committed by Stanislav Bogatyrev
parent 2ccfe34a20
commit 0ee1c3653d
12 changed files with 1913 additions and 0 deletions

89
acl/v2/types.go Normal file
View file

@ -0,0 +1,89 @@
package v2
import (
refs "github.com/nspcc-dev/neofs-api-go/refs/v2"
)
// SetContainerId sets container identifier of the eACL table.
func (m *EACLTable) SetContainerId(v *refs.ContainerID) {
if m != nil {
m.ContainerId = v
}
}
// SetRecords sets record list of the eACL table.
func (m *EACLTable) SetRecords(v []*EACLRecord) {
if m != nil {
m.Records = v
}
}
// SetOperation sets operation of the eACL record.
func (m *EACLRecord) SetOperation(v EACLRecord_Operation) {
if m != nil {
m.Operation = v
}
}
// SetAction sets action of the eACL record.
func (m *EACLRecord) SetAction(v EACLRecord_Action) {
if m != nil {
m.Action = v
}
}
// SetFilters sets filter list of the eACL record.
func (m *EACLRecord) SetFilters(v []*EACLRecord_FilterInfo) {
if m != nil {
m.Filters = v
}
}
// SetTargets sets target list of the eACL record.
func (m *EACLRecord) SetTargets(v []*EACLRecord_TargetInfo) {
if m != nil {
m.Targets = v
}
}
// SetHeader sets header type of the eACL filter.
func (m *EACLRecord_FilterInfo) SetHeader(v EACLRecord_FilterInfo_Header) {
if m != nil {
m.Header = v
}
}
// SetMatchType sets match type of the eACL filter.
func (m *EACLRecord_FilterInfo) SetMatchType(v EACLRecord_FilterInfo_MatchType) {
if m != nil {
m.MatchType = v
}
}
// SetHeaderName sets header name of the eACL filter.
func (m *EACLRecord_FilterInfo) SetHeaderName(v string) {
if m != nil {
m.HeaderName = v
}
}
// SetHeaderVal sets header value of the eACL filter.
func (m *EACLRecord_FilterInfo) SetHeaderVal(v string) {
if m != nil {
m.HeaderVal = v
}
}
// SetTarget sets target group of the eACL target.
func (m *EACLRecord_TargetInfo) SetTarget(v Target) {
if m != nil {
m.Target = v
}
}
// SetKeyList sets key list of the eACL target.
func (m *EACLRecord_TargetInfo) SetKeyList(v [][]byte) {
if m != nil {
m.KeyList = v
}
}