diff --git a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.DetectLanguageTests/DetectLanguage.json b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.DetectLanguageTests/DetectLanguage.json index 09efd652ef697..6b0070bcf3ac6 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.DetectLanguageTests/DetectLanguage.json +++ b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.DetectLanguageTests/DetectLanguage.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/text/analytics/v2.0/languages", - "EncodedRequestUri": "L3RleHQvYW5hbHl0aWNzL3YyLjAvbGFuZ3VhZ2Vz", + "RequestUri": "/text/analytics/v2.1-preview/languages", + "EncodedRequestUri": "L3RleHQvYW5hbHl0aWNzL3YyLjEtcHJldmlldy9sYW5ndWFnZXM=", "RequestMethod": "POST", "RequestBody": "{\r\n \"documents\": [\r\n {\r\n \"id\": \"id\",\r\n \"text\": \"I love my team mates\"\r\n }\r\n ]\r\n}", "RequestHeaders": { diff --git a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.EntitiesTests/Entities.json b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.EntitiesTests/Entities.json index 6708cf4ff54c1..095fd5f4df862 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.EntitiesTests/Entities.json +++ b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.EntitiesTests/Entities.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/text/analytics/v2.0/entities", - "EncodedRequestUri": "L3RleHQvYW5hbHl0aWNzL3YyLjAvZW50aXRpZXM=", + "RequestUri": "/text/analytics/v2.1-preview/entities", + "EncodedRequestUri": "L3RleHQvYW5hbHl0aWNzL3YyLjEtcHJldmlldy9lbnRpdGllcw==", "RequestMethod": "POST", "RequestBody": "{\r\n \"documents\": [\r\n {\r\n \"language\": \"en\",\r\n \"id\": \"id\",\r\n \"text\": \"Microsoft released Windows 10\"\r\n }\r\n ]\r\n}", "RequestHeaders": { diff --git a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.KeyPhrasesTests/KeyPhrases.json b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.KeyPhrasesTests/KeyPhrases.json index eefb0cd06cd04..6e2b117ff3228 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.KeyPhrasesTests/KeyPhrases.json +++ b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.KeyPhrasesTests/KeyPhrases.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/text/analytics/v2.0/keyPhrases", - "EncodedRequestUri": "L3RleHQvYW5hbHl0aWNzL3YyLjAva2V5UGhyYXNlcw==", + "RequestUri": "/text/analytics/v2.1-preview/keyPhrases", + "EncodedRequestUri": "L3RleHQvYW5hbHl0aWNzL3YyLjEtcHJldmlldy9rZXlQaHJhc2Vz", "RequestMethod": "POST", "RequestBody": "{\r\n \"documents\": [\r\n {\r\n \"language\": \"en\",\r\n \"id\": \"id\",\r\n \"text\": \"I love my team mates\"\r\n }\r\n ]\r\n}", "RequestHeaders": { diff --git a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.SentimentTests/Sentiment.json b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.SentimentTests/Sentiment.json index c5f620b0eadf9..0763200f6e6a0 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.SentimentTests/Sentiment.json +++ b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/SessionRecords/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Tests.SentimentTests/Sentiment.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/text/analytics/v2.0/sentiment", - "EncodedRequestUri": "L3RleHQvYW5hbHl0aWNzL3YyLjAvc2VudGltZW50", + "RequestUri": "/text/analytics/v2.1-preview/sentiment", + "EncodedRequestUri": "L3RleHQvYW5hbHl0aWNzL3YyLjEtcHJldmlldy9zZW50aW1lbnQ=", "RequestMethod": "POST", "RequestBody": "{\r\n \"documents\": [\r\n {\r\n \"language\": \"en\",\r\n \"id\": \"id\",\r\n \"text\": \"I love my team mates\"\r\n }\r\n ]\r\n}", "RequestHeaders": { diff --git a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/TextAnalytics/EntitiesTests.cs b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/TextAnalytics/EntitiesTests.cs index 0b2c813597988..bfa82a30db7d7 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/TextAnalytics/EntitiesTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics.Tests/TextAnalytics/EntitiesTests.cs @@ -17,7 +17,7 @@ public async Task Entities() { HttpMockServer.Initialize(this.GetType().FullName, "Entities"); ITextAnalyticsClient client = GetClient(HttpMockServer.CreateInstance()); - EntitiesBatchResult result = await client.EntitiesAsync( + EntitiesBatchResultV2dot1 result = await client.EntitiesAsync( new MultiLanguageBatchInput( new List() { diff --git a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/ITextAnalyticsClient.cs b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/ITextAnalyticsClient.cs index 78649afe9214c..79606f50bfed0 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/ITextAnalyticsClient.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/ITextAnalyticsClient.cs @@ -124,11 +124,25 @@ public partial interface ITextAnalyticsClient : System.IDisposable /// The API returns a list of recognized entities in a given document. /// /// + /// The API returns a list of recognized entities in a given document. /// To get even more information on each recognized entity we recommend /// using the Bing Entity Search API by querying for the recognized /// entities names. See the <a /// href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported /// languages in Text Analytics API</a> for the list of enabled + /// languages.The API returns a list of known entities and general + /// named entities ("Person", "Location", "Organization" etc) in a + /// given document. Known entities are returned with Wikipedia Id and + /// Wikipedia link, and also Bing Id which can be used in Bing Entity + /// Search API. General named entities are returned with entity types. + /// If a general named entity is also a known entity, then all + /// information regarding it (Wikipedia Id, Bing Id, entity type etc) + /// will be returned. See the <a + /// href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition">Supported + /// Entity Types in Text Analytics API</a> for the list of + /// supported Entity Types. See the <a + /// href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported + /// languages in Text Analytics API</a> for the list of enabled /// languages. /// /// @@ -140,7 +154,7 @@ public partial interface ITextAnalyticsClient : System.IDisposable /// /// The cancellation token. /// - Task> EntitiesWithHttpMessagesAsync(MultiLanguageBatchInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> EntitiesWithHttpMessagesAsync(MultiLanguageBatchInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntitiesBatchResultItem.cs b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntitiesBatchResultItemV2dot1.cs similarity index 80% rename from src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntitiesBatchResultItem.cs rename to src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntitiesBatchResultItemV2dot1.cs index 9586ad36a8301..08ad428c74d3e 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntitiesBatchResultItem.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntitiesBatchResultItemV2dot1.cs @@ -15,22 +15,24 @@ namespace Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Models using System.Collections.Generic; using System.Linq; - public partial class EntitiesBatchResultItem + public partial class EntitiesBatchResultItemV2dot1 { /// - /// Initializes a new instance of the EntitiesBatchResultItem class. + /// Initializes a new instance of the EntitiesBatchResultItemV2dot1 + /// class. /// - public EntitiesBatchResultItem() + public EntitiesBatchResultItemV2dot1() { CustomInit(); } /// - /// Initializes a new instance of the EntitiesBatchResultItem class. + /// Initializes a new instance of the EntitiesBatchResultItemV2dot1 + /// class. /// /// Unique document identifier. /// Recognized entities in the document. - public EntitiesBatchResultItem(string id = default(string), IList entities = default(IList)) + public EntitiesBatchResultItemV2dot1(string id = default(string), IList entities = default(IList)) { Id = id; Entities = entities; @@ -52,7 +54,7 @@ public EntitiesBatchResultItem() /// Gets recognized entities in the document. /// [JsonProperty(PropertyName = "entities")] - public IList Entities { get; private set; } + public IList Entities { get; private set; } } } diff --git a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntitiesBatchResult.cs b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntitiesBatchResultV2dot1.cs similarity index 77% rename from src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntitiesBatchResult.cs rename to src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntitiesBatchResultV2dot1.cs index 70b135e11f929..639e029d8776f 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntitiesBatchResult.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntitiesBatchResultV2dot1.cs @@ -15,20 +15,20 @@ namespace Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Models using System.Collections.Generic; using System.Linq; - public partial class EntitiesBatchResult + public partial class EntitiesBatchResultV2dot1 { /// - /// Initializes a new instance of the EntitiesBatchResult class. + /// Initializes a new instance of the EntitiesBatchResultV2dot1 class. /// - public EntitiesBatchResult() + public EntitiesBatchResultV2dot1() { CustomInit(); } /// - /// Initializes a new instance of the EntitiesBatchResult class. + /// Initializes a new instance of the EntitiesBatchResultV2dot1 class. /// - public EntitiesBatchResult(IList documents = default(IList), IList errors = default(IList)) + public EntitiesBatchResultV2dot1(IList documents = default(IList), IList errors = default(IList)) { Documents = documents; Errors = errors; @@ -43,7 +43,7 @@ public EntitiesBatchResult() /// /// [JsonProperty(PropertyName = "documents")] - public IList Documents { get; private set; } + public IList Documents { get; private set; } /// /// diff --git a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntityRecord.cs b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntityRecordV2dot1.cs similarity index 69% rename from src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntityRecord.cs rename to src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntityRecordV2dot1.cs index ce2992d5db9b6..aed5b02a33f08 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntityRecord.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/EntityRecordV2dot1.cs @@ -15,18 +15,18 @@ namespace Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Models using System.Collections.Generic; using System.Linq; - public partial class EntityRecord + public partial class EntityRecordV2dot1 { /// - /// Initializes a new instance of the EntityRecord class. + /// Initializes a new instance of the EntityRecordV2dot1 class. /// - public EntityRecord() + public EntityRecordV2dot1() { CustomInit(); } /// - /// Initializes a new instance of the EntityRecord class. + /// Initializes a new instance of the EntityRecordV2dot1 class. /// /// Entity formal name. /// List of instances this entity appears in the @@ -40,7 +40,11 @@ public EntityRecord() /// Bing unique identifier of the recognized /// entity. Use in conjunction with the Bing Entity Search API to fetch /// additional relevant information. - public EntityRecord(string name = default(string), IList matches = default(IList), string wikipediaLanguage = default(string), string wikipediaId = default(string), string wikipediaUrl = default(string), string bingId = default(string)) + /// Entity type from Named Entity Recognition + /// model + /// Entity sub type from Named Entity Recognition + /// model + public EntityRecordV2dot1(string name = default(string), IList matches = default(IList), string wikipediaLanguage = default(string), string wikipediaId = default(string), string wikipediaUrl = default(string), string bingId = default(string), string type = default(string), string subType = default(string)) { Name = name; Matches = matches; @@ -48,6 +52,8 @@ public EntityRecord() WikipediaId = wikipediaId; WikipediaUrl = wikipediaUrl; BingId = bingId; + Type = type; + SubType = subType; CustomInit(); } @@ -63,10 +69,10 @@ public EntityRecord() public string Name { get; set; } /// - /// Gets list of instances this entity appears in the text. + /// Gets or sets list of instances this entity appears in the text. /// [JsonProperty(PropertyName = "matches")] - public IList Matches { get; private set; } + public IList Matches { get; set; } /// /// Gets or sets wikipedia language for which the WikipediaId and @@ -95,5 +101,17 @@ public EntityRecord() [JsonProperty(PropertyName = "bingId")] public string BingId { get; set; } + /// + /// Gets or sets entity type from Named Entity Recognition model + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets entity sub type from Named Entity Recognition model + /// + [JsonProperty(PropertyName = "subType")] + public string SubType { get; set; } + } } diff --git a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/MatchRecord.cs b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/MatchRecordV2dot1.cs similarity index 84% rename from src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/MatchRecord.cs rename to src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/MatchRecordV2dot1.cs index 65835ae266201..09b8042ec446e 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/MatchRecord.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/Models/MatchRecordV2dot1.cs @@ -13,25 +13,25 @@ namespace Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Models using Newtonsoft.Json; using System.Linq; - public partial class MatchRecord + public partial class MatchRecordV2dot1 { /// - /// Initializes a new instance of the MatchRecord class. + /// Initializes a new instance of the MatchRecordV2dot1 class. /// - public MatchRecord() + public MatchRecordV2dot1() { CustomInit(); } /// - /// Initializes a new instance of the MatchRecord class. + /// Initializes a new instance of the MatchRecordV2dot1 class. /// /// Entity text as appears in the request. /// Start position (in Unicode characters) for the /// entity match text. /// Length (in Unicode characters) for the entity /// match text. - public MatchRecord(string text = default(string), int? offset = default(int?), int? length = default(int?)) + public MatchRecordV2dot1(string text = default(string), int? offset = default(int?), int? length = default(int?)) { Text = text; Offset = offset; diff --git a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/SdkInfo_TextAnalyticsClient.cs b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/SdkInfo_TextAnalyticsClient.cs index 51ce02bc95467..71cd990dc4944 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/SdkInfo_TextAnalyticsClient.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/SdkInfo_TextAnalyticsClient.cs @@ -19,12 +19,23 @@ public static IEnumerable> ApiInfo_TextAnalyticsCl { return new Tuple[] { - new Tuple("TextAnalyticsClient", "Detect Language", "v2.0"), - new Tuple("TextAnalyticsClient", "Entities", "v2.0"), - new Tuple("TextAnalyticsClient", "Key Phrases", "v2.0"), - new Tuple("TextAnalyticsClient", "Sentiment", "v2.0"), + new Tuple("TextAnalyticsClient", "Detect Language", "v2.1-preview"), + new Tuple("TextAnalyticsClient", "Entities", "v2.1-preview"), + new Tuple("TextAnalyticsClient", "Key Phrases", "v2.1-preview"), + new Tuple("TextAnalyticsClient", "Sentiment", "v2.1-preview"), }.AsEnumerable(); } } + // BEGIN: Code Generation Metadata Section + public static readonly String AutoRestVersion = "latest"; + public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; + public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/data-plane/TextAnalytics/readme.md --csharp --version=latest --reflect-api-versions --tag=release_2_1 --csharp.output-folder=C:\\mygitrepo\\azure-sdk-for-net\\src\\SDKs\\CognitiveServices\\dataPlane\\Language\\TextAnalytics\\TextAnalytics\\Generated\\TextAnalytics"; + public static readonly String GithubForkName = "Azure"; + public static readonly String GithubBranchName = "master"; + public static readonly String GithubCommidId = "9c1fe12b46cd05f44ed40a9e4bc25205cc343667"; + public static readonly String CodeGenerationErrors = ""; + public static readonly String GithubRepoName = "azure-rest-api-specs"; + // END: Code Generation Metadata Section } } + diff --git a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/TextAnalyticsClient.cs b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/TextAnalyticsClient.cs index 6f8823337ef75..e74e7c0d7e2ff 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/TextAnalyticsClient.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/TextAnalyticsClient.cs @@ -59,6 +59,19 @@ public partial class TextAnalyticsClient : ServiceClient, I /// public ServiceClientCredentials Credentials { get; private set; } + /// + /// Initializes a new instance of the TextAnalyticsClient class. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling TextAnalyticsClient.Dispose(). False: will not dispose provided httpClient + protected TextAnalyticsClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + { + Initialize(); + } + /// /// Initializes a new instance of the TextAnalyticsClient class. /// @@ -109,6 +122,33 @@ public TextAnalyticsClient(ServiceClientCredentials credentials, params Delegati } } + /// + /// Initializes a new instance of the TextAnalyticsClient class. + /// + /// + /// Required. Subscription credentials which uniquely identify client subscription. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling TextAnalyticsClient.Dispose(). False: will not dispose provided httpClient + /// + /// Thrown when a required parameter is null + /// + public TextAnalyticsClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + /// /// Initializes a new instance of the TextAnalyticsClient class. /// @@ -146,7 +186,7 @@ public TextAnalyticsClient(ServiceClientCredentials credentials, HttpClientHandl /// private void Initialize() { - BaseUri = "{Endpoint}/text/analytics/v2.0"; + BaseUri = "{Endpoint}/text/analytics/v2.1-preview"; SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, @@ -672,9 +712,22 @@ private void Initialize() /// The API returns a list of recognized entities in a given document. /// /// - /// To get even more information on each recognized entity we recommend using - /// the Bing Entity Search API by querying for the recognized entities names. - /// See the <a + /// The API returns a list of recognized entities in a given document. To get + /// even more information on each recognized entity we recommend using the Bing + /// Entity Search API by querying for the recognized entities names. See the + /// <a + /// href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported + /// languages in Text Analytics API</a> for the list of enabled + /// languages.The API returns a list of known entities and general named + /// entities ("Person", "Location", "Organization" etc) in a given document. + /// Known entities are returned with Wikipedia Id and Wikipedia link, and also + /// Bing Id which can be used in Bing Entity Search API. General named entities + /// are returned with entity types. If a general named entity is also a known + /// entity, then all information regarding it (Wikipedia Id, Bing Id, entity + /// type etc) will be returned. See the <a + /// href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition">Supported + /// Entity Types in Text Analytics API</a> for the list of supported + /// Entity Types. See the <a /// href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported /// languages in Text Analytics API</a> for the list of enabled /// languages. @@ -703,7 +756,7 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task> EntitiesWithHttpMessagesAsync(MultiLanguageBatchInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> EntitiesWithHttpMessagesAsync(MultiLanguageBatchInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Endpoint == null) { @@ -806,7 +859,7 @@ private void Initialize() throw ex; } // Create Result - var _result = new HttpOperationResponse(); + var _result = new HttpOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; // Deserialize Response @@ -815,7 +868,7 @@ private void Initialize() _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); } catch (JsonException ex) { diff --git a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/TextAnalyticsClientExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/TextAnalyticsClientExtensions.cs index 0dfa5a1e32d97..1415f6b4b77d1 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/TextAnalyticsClientExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Generated/TextAnalytics/TextAnalyticsClientExtensions.cs @@ -103,9 +103,22 @@ public static partial class TextAnalyticsClientExtensions /// The API returns a list of recognized entities in a given document. /// /// - /// To get even more information on each recognized entity we recommend using - /// the Bing Entity Search API by querying for the recognized entities names. - /// See the <a + /// The API returns a list of recognized entities in a given document. To get + /// even more information on each recognized entity we recommend using the Bing + /// Entity Search API by querying for the recognized entities names. See the + /// <a + /// href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported + /// languages in Text Analytics API</a> for the list of enabled + /// languages.The API returns a list of known entities and general named + /// entities ("Person", "Location", "Organization" etc) in a given document. + /// Known entities are returned with Wikipedia Id and Wikipedia link, and also + /// Bing Id which can be used in Bing Entity Search API. General named entities + /// are returned with entity types. If a general named entity is also a known + /// entity, then all information regarding it (Wikipedia Id, Bing Id, entity + /// type etc) will be returned. See the <a + /// href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition">Supported + /// Entity Types in Text Analytics API</a> for the list of supported + /// Entity Types. See the <a /// href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported /// languages in Text Analytics API</a> for the list of enabled /// languages. @@ -119,7 +132,7 @@ public static partial class TextAnalyticsClientExtensions /// /// The cancellation token. /// - public static async Task EntitiesAsync(this ITextAnalyticsClient operations, MultiLanguageBatchInput input, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task EntitiesAsync(this ITextAnalyticsClient operations, MultiLanguageBatchInput input, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.EntitiesWithHttpMessagesAsync(input, null, cancellationToken).ConfigureAwait(false)) { diff --git a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.csproj b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.csproj index 8c98882a16df9..4d040bf4936ba 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.csproj +++ b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/Microsoft.Azure.CognitiveServices.Language.TextAnalytics.csproj @@ -6,17 +6,18 @@ Microsoft.Azure.CognitiveServices.Language.TextAnalytics This client library provides access to the Microsoft Cognitive Services Language APIs. - 2.1.0-preview + 2.8.0-preview Microsoft.Azure.CognitiveServices.Language.TextAnalytics Microsoft Cognitive Services;Cognitive Services;Cognitive Services SDK;Text Analytics API;Text Analytics;REST HTTP client;netcore451511 diff --git a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/generate.ps1 b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/generate.ps1 index 872fcbf6991eb..2faac7e1886c6 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/generate.ps1 +++ b/src/SDKs/CognitiveServices/dataPlane/Language/TextAnalytics/TextAnalytics/generate.ps1 @@ -1 +1 @@ -Start-AutoRestCodeGeneration -ResourceProvider "cognitiveservices/data-plane/TextAnalytics" -AutoRestVersion "latest" -SdkGenerationDirectory "$PSScriptRoot\Generated\TextAnalytics" \ No newline at end of file +Start-AutoRestCodeGeneration -ResourceProvider "cognitiveservices/data-plane/TextAnalytics" -AutoRestVersion "latest" -SdkGenerationDirectory "$PSScriptRoot\Generated\TextAnalytics" -ConfigFileTag "release_2_1" \ No newline at end of file diff --git a/src/SDKs/_metadata/cognitiveservices_data-plane_TextAnalytics.txt b/src/SDKs/_metadata/cognitiveservices_data-plane_TextAnalytics.txt index 6e3a7da693475..fd437e8a50944 100644 --- a/src/SDKs/_metadata/cognitiveservices_data-plane_TextAnalytics.txt +++ b/src/SDKs/_metadata/cognitiveservices_data-plane_TextAnalytics.txt @@ -3,18 +3,12 @@ AutoRest installed successfully. Commencing code generation Generating CSharp code Executing AutoRest command -cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/data-plane/TextAnalytics/readme.md --csharp --version=latest --reflect-api-versions --csharp.output-folder=E:\azure-sdk-for-net\src\SDKs\CognitiveServices\dataPlane\Language\TextAnalytics\TextAnalytics\Generated\TextAnalytics -2018-07-26 19:20:31 UTC -1) azure-rest-api-specs repository information +cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/data-plane/TextAnalytics/readme.md --csharp --version=latest --reflect-api-versions --tag=release_2_1 --csharp.output-folder=C:\mygitrepo\azure-sdk-for-net\src\SDKs\CognitiveServices\dataPlane\Language\TextAnalytics\TextAnalytics\Generated\TextAnalytics +2018-10-23 17:05:47 UTC +Azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: c39645d5399639edb6a46d7f87715640e928cd30 - -2) AutoRest information +Commit: 9c1fe12b46cd05f44ed40a9e4bc25205cc343667 +AutoRest information Requested version: latest -Bootstrapper version: autorest@2.0.4282 - - -Latest installed version: - - +Bootstrapper version: autorest@2.0.4283