+ }
+ } else if filter.CommType != nil {
+ for _, version := range profile.Versions {
+ match = checkCommType(version.Resources, filter.CommType)
+ }
+ } else {
+ match = true
+ }
+ return match
+}
+
+func checkProtocol(filter discoverapi.GetAllServiceAPIsParams, profile publishapi.AefProfile) bool {
+ if filter.Protocol != nil {
+ return profile.Protocol != nil && *filter.Protocol == *profile.Protocol
+ }
+ return true
+}
+
+func checkDataFormat(filter discoverapi.GetAllServiceAPIsParams, profile publishapi.AefProfile) bool {
+ if filter.DataFormat != nil {
+ return profile.DataFormat != nil && *filter.DataFormat == *profile.DataFormat
+ }
+ return true
+}
+
+func checkVersion(version publishapi.Version, wantedVersion *string, commType *publishapi.CommunicationType) bool {
+ match := false
+ if *wantedVersion == version.ApiVersion {
+ if commType != nil {
+ match = checkCommType(version.Resources, commType)