-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
DocumentTranslationModelFactory.cs
64 lines (55 loc) · 3.27 KB
/
DocumentTranslationModelFactory.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace Azure.AI.Translation.Document
{
/// <summary> Model factory for models. </summary>
public static partial class DocumentTranslationModelFactory
{
/// <summary> Initializes a new instance of <see cref="Document.DocumentTranslationInput"/>. </summary>
/// <param name="source"> Source of the input documents. </param>
/// <param name="targets"> Location of the destination for the output. </param>
/// <param name="storageUriKind"> Storage type of the input documents source string. </param>
/// <returns> A new <see cref="Document.DocumentTranslationInput"/> instance for mocking. </returns>
public static DocumentTranslationInput DocumentTranslationInput(TranslationSource source = null, IEnumerable<TranslationTarget> targets = null, StorageInputUriKind? storageUriKind = null)
{
targets ??= new List<TranslationTarget>();
return new DocumentTranslationInput(source, targets?.ToList(), storageUriKind, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Document.SupportedFileFormats"/>. </summary>
/// <param name="value"> list of objects. </param>
/// <returns> A new <see cref="Document.SupportedFileFormats"/> instance for mocking. </returns>
public static SupportedFileFormats SupportedFileFormats(IEnumerable<DocumentTranslationFileFormat> value = null)
{
value ??= new List<DocumentTranslationFileFormat>();
return new SupportedFileFormats(value?.ToList(), serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Document.DocumentTranslationFileFormat"/>. </summary>
/// <param name="format"> Name of the format. </param>
/// <param name="fileExtensions"> Supported file extension for this format. </param>
/// <param name="contentTypes"> Supported Content-Types for this format. </param>
/// <param name="defaultFormatVersion"> Default version if none is specified. </param>
/// <param name="formatVersions"> Supported Version. </param>
/// <param name="type"> Supported Type for this format. </param>
/// <returns> A new <see cref="Document.DocumentTranslationFileFormat"/> instance for mocking. </returns>
public static DocumentTranslationFileFormat DocumentTranslationFileFormat(string format = null, IEnumerable<string> fileExtensions = null, IEnumerable<string> contentTypes = null, string defaultFormatVersion = null, IEnumerable<string> formatVersions = null, string type = null)
{
fileExtensions ??= new List<string>();
contentTypes ??= new List<string>();
formatVersions ??= new List<string>();
return new DocumentTranslationFileFormat(
format,
fileExtensions?.ToList(),
contentTypes?.ToList(),
defaultFormatVersion,
formatVersions?.ToList(),
type,
serializedAdditionalRawData: null);
}
}
}