func()

in internal/pkg/core/deployers/types/inbound.go [43:59]


func (inbound *Inbound) Unmarshal(xmlData string, position artifacts.Position) (artifacts.Inbound, error) {
	newInbound := artifacts.Inbound{}
	newInbound.Position = position
	if err := xml.Unmarshal([]byte(xmlData), &inbound); err != nil {
		return artifacts.Inbound{}, err
	}
	newInbound.Name = inbound.Name
	newInbound.Sequence = inbound.Sequence
	newInbound.Protocol = inbound.Protocol
	newInbound.Suspend = inbound.Suspend
	newInbound.OnError = inbound.OnError
	for _, parameter := range inbound.Parameters {
		newInbound.Parameters = append(newInbound.Parameters, artifacts.Parameter{Name: parameter.Name, Value: parameter.Value})
	}
	newInbound.Position.Hierarchy = position.Hierarchy
	return newInbound, nil
}