internal CustomFormModel(Model_internal model) { ModelId = model.ModelInfo.ModelId.ToString(); Status = model.ModelInfo.Status; CreatedOn = model.ModelInfo.CreatedDateTime; LastModified = model.ModelInfo.LastUpdatedDateTime; Models = ConvertToSubmodels(model); TrainingDocuments = ConvertToTrainingDocuments(model.TrainResult); Errors = ConvertToFormRecognizerError(model.TrainResult); }
private static IReadOnlyList <CustomFormSubModel> ConvertToSubmodels(Model_internal model) { if (model.Keys != null) { return(ConvertFromUnlabeled(model.Keys)); } if (model.TrainResult != null) { return(ConvertFromLabeled(model)); } return(null); }