private static void ValidateJobProfile(JobProfile jobProfile, JobParameterBag jobInput) { if (jobProfile.Name != JOB_PROFILE_CONFORM_WORKFLOW && jobProfile.Name != JOB_PROFILE_AI_WORKFLOW) { throw new Exception("JobProfile '" + jobProfile.Name + "' is not supported"); } if (jobProfile.InputParameters != null) { foreach (var parameter in jobProfile.InputParameters) { if (!jobInput.HasProperty(parameter.ParameterName)) { throw new Exception("jobInput misses required input parameter '" + parameter.ParameterName + "'"); } } } }
private static void ValidateJobProfile(JobProfile jobProfile, JobParameterBag jobInput) { if (jobProfile.Name != JOB_PROFILE_TRANSCRIBE_AUDIO && jobProfile.Name != JOB_PROFILE_TRANSLATE_TEXT && jobProfile.Name != JOB_PROFILE_DETECT_CELEBRITIES) { throw new Exception("JobProfile '" + jobProfile.Name + "' is not supported"); } if (jobProfile.InputParameters != null) { foreach (var parameter in jobProfile.InputParameters) { if (!jobInput.HasProperty(parameter.ParameterName)) { throw new Exception("jobInput misses required input parameter '" + parameter.ParameterName + "'"); } } } }