-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
DictionaryExampleTextItem.cs
57 lines (49 loc) · 2.78 KB
/
DictionaryExampleTextItem.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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
namespace Azure.AI.Translation.Text
{
/// <summary> Element containing the text with translation. </summary>
public partial class DictionaryExampleTextItem : InputTextItem
{
/// <summary> Initializes a new instance of <see cref="DictionaryExampleTextItem"/>. </summary>
/// <param name="text"> Text to translate. </param>
/// <param name="translation">
/// A string specifying the translated text previously returned by the Dictionary lookup operation.
/// This should be the value from the normalizedTarget field in the translations list of the Dictionary
/// lookup response. The service will return examples for the specific source-target word-pair.
/// </param>
/// <exception cref="ArgumentNullException"> <paramref name="text"/> or <paramref name="translation"/> is null. </exception>
public DictionaryExampleTextItem(string text, string translation) : base(text)
{
Argument.AssertNotNull(text, nameof(text));
Argument.AssertNotNull(translation, nameof(translation));
Translation = translation;
}
/// <summary> Initializes a new instance of <see cref="DictionaryExampleTextItem"/>. </summary>
/// <param name="text"> Text to translate. </param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
/// <param name="translation">
/// A string specifying the translated text previously returned by the Dictionary lookup operation.
/// This should be the value from the normalizedTarget field in the translations list of the Dictionary
/// lookup response. The service will return examples for the specific source-target word-pair.
/// </param>
internal DictionaryExampleTextItem(string text, IDictionary<string, BinaryData> serializedAdditionalRawData, string translation) : base(text, serializedAdditionalRawData)
{
Translation = translation;
}
/// <summary> Initializes a new instance of <see cref="DictionaryExampleTextItem"/> for deserialization. </summary>
internal DictionaryExampleTextItem()
{
}
/// <summary>
/// A string specifying the translated text previously returned by the Dictionary lookup operation.
/// This should be the value from the normalizedTarget field in the translations list of the Dictionary
/// lookup response. The service will return examples for the specific source-target word-pair.
/// </summary>
public string Translation { get; }
}
}