/// <summary> /// Initializes a new instance of the <see cref="Training.CustomFormModel"/> class. /// </summary> /// <param name="modelId">The unique identifier of this model.</param> /// <param name="status">A status indicating this model's readiness for use.</param> /// <param name="trainingStartedOn">The date and time (UTC) when model training was started.</param> /// <param name="trainingCompletedOn">The date and time (UTC) when model training completed.</param> /// <param name="submodels">A list of submodels that are part of this model, each of which can recognize and extract fields from a different type of form.</param> /// <param name="trainingDocuments">A list of meta-data about each of the documents used to train the model.</param> /// <param name="errors">A list of errors occurred during the training operation.</param> /// <param name="modelName">An optional, user-defined name to associate with your model.</param> /// <param name="properties">Model properties, like for example, if a model is composed.</param> /// <returns>A new <see cref="Training.CustomFormModel"/> instance for mocking.</returns> public static CustomFormModel CustomFormModel( string modelId, CustomFormModelStatus status, DateTimeOffset trainingStartedOn, DateTimeOffset trainingCompletedOn, IReadOnlyList <CustomFormSubmodel> submodels, IReadOnlyList <TrainingDocumentInfo> trainingDocuments, IReadOnlyList <FormRecognizerError> errors, string modelName, CustomFormModelProperties properties) { submodels = submodels?.ToList(); trainingDocuments = trainingDocuments?.ToList(); errors = errors?.ToList(); return(new CustomFormModel(modelId, status, trainingStartedOn, trainingCompletedOn, submodels, trainingDocuments, errors, modelName, properties)); }
/// <summary> /// Initializes a new instance of the <see cref="Training.CustomFormModelInfo"/> class. /// </summary> /// <param name="modelId">The unique identifier of the model.</param> /// <param name="trainingStartedOn">The date and time (UTC) when model training was started.</param> /// <param name="trainingCompletedOn">The date and time (UTC) when model training completed.</param> /// <param name="status">The status of the model.</param> /// <param name="modelName">An optional, user-defined name to associate with your model.</param> /// <param name="properties">Model properties, like for example, if a model is composed.</param> /// <returns>A new <see cref="Training.CustomFormModelInfo"/> instance for mocking.</returns> public static CustomFormModelInfo CustomFormModelInfo(string modelId, DateTimeOffset trainingStartedOn, DateTimeOffset trainingCompletedOn, CustomFormModelStatus status, string modelName, CustomFormModelProperties properties) => new CustomFormModelInfo(modelId, status, trainingStartedOn, trainingCompletedOn, modelName, properties);
/// <summary> Initializes new instance of CustomFormModelInfo class. </summary> /// <param name="modelId"> Model identifier. </param> /// <param name="status"> Status of the model. </param> /// <param name="trainingStartedOn"> Date and time (UTC) when the model was created. </param> /// <param name="trainingCompletedOn"> Date and time (UTC) when the status was last updated. </param> /// <param name="modelName"> Optional user defined model name (max length: 1024). </param> /// <param name="properties"> Optional model attributes. </param> /// <returns> A new <see cref="Training.CustomFormModelInfo"/> instance for mocking. </returns> internal static CustomFormModelInfo CustomFormModelInfo(string modelId = default, CustomFormModelStatus status = default, DateTimeOffset trainingStartedOn = default, DateTimeOffset trainingCompletedOn = default, string modelName = default, CustomFormModelProperties properties = default) { return(new CustomFormModelInfo(modelId, status, trainingStartedOn, trainingCompletedOn, modelName, properties)); }