- if filter.AefId != nil {
- aefIdMatch = *filter.AefId == profile.AefId
- }
- if filter.ApiVersion != nil || filter.CommType != nil {
- versionMatch = checkVersionAndCommType(profile, filter.ApiVersion, filter.CommType)
- }
- if filter.Protocol != nil {
- protocolMatch = profile.Protocol != nil && *filter.Protocol == *profile.Protocol
- }
- if filter.DataFormat != nil {
- dataFormatMatch = profile.DataFormat != nil && *filter.DataFormat == *profile.DataFormat
- }
- if aefIdMatch && versionMatch && protocolMatch && dataFormatMatch {
+ if checkAefId(filter, profile) && checkVersionAndCommType(profile, filter) && checkProtocol(filter, profile) && checkDataFormat(filter, profile) {