| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.Collections.Generic; |
| | 10 | | using System.Linq; |
| | 11 | |
|
| | 12 | | namespace Azure.AI.TextAnalytics.Models |
| | 13 | | { |
| | 14 | | /// <summary> The LinkedEntity. </summary> |
| | 15 | | internal partial class LinkedEntity |
| | 16 | | { |
| | 17 | | /// <summary> Initializes a new instance of LinkedEntity. </summary> |
| | 18 | | /// <param name="name"> Entity Linking formal name. </param> |
| | 19 | | /// <param name="matches"> List of instances this entity appears in the text. </param> |
| | 20 | | /// <param name="language"> Language used in the data source. </param> |
| | 21 | | /// <param name="url"> URL for the entity's page from the data source. </param> |
| | 22 | | /// <param name="dataSource"> Data source used to extract entity linking, such as Wiki/Bing etc. </param> |
| | 23 | | /// <exception cref="ArgumentNullException"> <paramref name="name"/>, <paramref name="matches"/>, <paramref name |
| 0 | 24 | | internal LinkedEntity(string name, IEnumerable<Match> matches, string language, string url, string dataSource) |
| | 25 | | { |
| 0 | 26 | | if (name == null) |
| | 27 | | { |
| 0 | 28 | | throw new ArgumentNullException(nameof(name)); |
| | 29 | | } |
| 0 | 30 | | if (matches == null) |
| | 31 | | { |
| 0 | 32 | | throw new ArgumentNullException(nameof(matches)); |
| | 33 | | } |
| 0 | 34 | | if (language == null) |
| | 35 | | { |
| 0 | 36 | | throw new ArgumentNullException(nameof(language)); |
| | 37 | | } |
| 0 | 38 | | if (url == null) |
| | 39 | | { |
| 0 | 40 | | throw new ArgumentNullException(nameof(url)); |
| | 41 | | } |
| 0 | 42 | | if (dataSource == null) |
| | 43 | | { |
| 0 | 44 | | throw new ArgumentNullException(nameof(dataSource)); |
| | 45 | | } |
| | 46 | |
|
| 0 | 47 | | Name = name; |
| 0 | 48 | | Matches = matches.ToList(); |
| 0 | 49 | | Language = language; |
| 0 | 50 | | Url = url; |
| 0 | 51 | | DataSource = dataSource; |
| 0 | 52 | | } |
| | 53 | |
|
| | 54 | | /// <summary> Initializes a new instance of LinkedEntity. </summary> |
| | 55 | | /// <param name="name"> Entity Linking formal name. </param> |
| | 56 | | /// <param name="matches"> List of instances this entity appears in the text. </param> |
| | 57 | | /// <param name="language"> Language used in the data source. </param> |
| | 58 | | /// <param name="id"> Unique identifier of the recognized entity from the data source. </param> |
| | 59 | | /// <param name="url"> URL for the entity's page from the data source. </param> |
| | 60 | | /// <param name="dataSource"> Data source used to extract entity linking, such as Wiki/Bing etc. </param> |
| 0 | 61 | | internal LinkedEntity(string name, IReadOnlyList<Match> matches, string language, string id, string url, string |
| | 62 | | { |
| 0 | 63 | | Name = name; |
| 0 | 64 | | Matches = matches; |
| 0 | 65 | | Language = language; |
| 0 | 66 | | Id = id; |
| 0 | 67 | | Url = url; |
| 0 | 68 | | DataSource = dataSource; |
| 0 | 69 | | } |
| | 70 | |
|
| | 71 | | /// <summary> Entity Linking formal name. </summary> |
| 0 | 72 | | public string Name { get; } |
| | 73 | | /// <summary> List of instances this entity appears in the text. </summary> |
| 0 | 74 | | public IReadOnlyList<Match> Matches { get; } |
| | 75 | | /// <summary> Language used in the data source. </summary> |
| 0 | 76 | | public string Language { get; } |
| | 77 | | /// <summary> Unique identifier of the recognized entity from the data source. </summary> |
| 0 | 78 | | public string Id { get; } |
| | 79 | | /// <summary> URL for the entity's page from the data source. </summary> |
| 0 | 80 | | public string Url { get; } |
| | 81 | | /// <summary> Data source used to extract entity linking, such as Wiki/Bing etc. </summary> |
| 0 | 82 | | public string DataSource { get; } |
| | 83 | | } |
| | 84 | | } |