From 30fbb1aea0bcc990a0022e0612a6a8d1489e0931 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 26 Oct 2018 16:46:59 +0000 Subject: [PATCH] Generated from 5787a885c048cfd6751240e1a784484b038260ec updated model names in preview version to be consistent with stable version to avoid breaking changes in client side code --- .../cognitiveservices/textanalytics/models.go | 8 ++--- .../v2.1/textanalytics/client.go | 4 +-- .../v2.1/textanalytics/models.go | 30 +++++++++---------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/profiles/preview/cognitiveservices/textanalytics/models.go b/profiles/preview/cognitiveservices/textanalytics/models.go index 5911c8c2c32c..d18dd3653939 100644 --- a/profiles/preview/cognitiveservices/textanalytics/models.go +++ b/profiles/preview/cognitiveservices/textanalytics/models.go @@ -24,9 +24,9 @@ import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2 type BaseClient = original.BaseClient type BatchInput = original.BatchInput type DetectedLanguage = original.DetectedLanguage -type EntitiesBatchResultItemV2dot1 = original.EntitiesBatchResultItemV2dot1 -type EntitiesBatchResultV2dot1 = original.EntitiesBatchResultV2dot1 -type EntityRecordV2dot1 = original.EntityRecordV2dot1 +type EntitiesBatchResult = original.EntitiesBatchResult +type EntitiesBatchResultItem = original.EntitiesBatchResultItem +type EntityRecord = original.EntityRecord type ErrorRecord = original.ErrorRecord type ErrorResponse = original.ErrorResponse type Input = original.Input @@ -35,7 +35,7 @@ type KeyPhraseBatchResult = original.KeyPhraseBatchResult type KeyPhraseBatchResultItem = original.KeyPhraseBatchResultItem type LanguageBatchResult = original.LanguageBatchResult type LanguageBatchResultItem = original.LanguageBatchResultItem -type MatchRecordV2dot1 = original.MatchRecordV2dot1 +type MatchRecord = original.MatchRecord type MultiLanguageBatchInput = original.MultiLanguageBatchInput type MultiLanguageInput = original.MultiLanguageInput type SentimentBatchResult = original.SentimentBatchResult diff --git a/services/cognitiveservices/v2.1/textanalytics/client.go b/services/cognitiveservices/v2.1/textanalytics/client.go index 0ba0100a9222..e0e03837ec67 100644 --- a/services/cognitiveservices/v2.1/textanalytics/client.go +++ b/services/cognitiveservices/v2.1/textanalytics/client.go @@ -126,7 +126,7 @@ func (client BaseClient) DetectLanguageResponder(resp *http.Response) (result La // languages in Text Analytics API for the list of enabled languages. // Parameters: // input - collection of documents to analyze. -func (client BaseClient) Entities(ctx context.Context, input MultiLanguageBatchInput) (result EntitiesBatchResultV2dot1, err error) { +func (client BaseClient) Entities(ctx context.Context, input MultiLanguageBatchInput) (result EntitiesBatchResult, err error) { req, err := client.EntitiesPreparer(ctx, input) if err != nil { err = autorest.NewErrorWithError(err, "textanalytics.BaseClient", "Entities", nil, "Failure preparing request") @@ -172,7 +172,7 @@ func (client BaseClient) EntitiesSender(req *http.Request) (*http.Response, erro // EntitiesResponder handles the response to the Entities request. The method always // closes the http.Response Body. -func (client BaseClient) EntitiesResponder(resp *http.Response) (result EntitiesBatchResultV2dot1, err error) { +func (client BaseClient) EntitiesResponder(resp *http.Response) (result EntitiesBatchResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/services/cognitiveservices/v2.1/textanalytics/models.go b/services/cognitiveservices/v2.1/textanalytics/models.go index 0b57fcf888e0..a9705f02ab39 100644 --- a/services/cognitiveservices/v2.1/textanalytics/models.go +++ b/services/cognitiveservices/v2.1/textanalytics/models.go @@ -36,27 +36,27 @@ type DetectedLanguage struct { Score *float64 `json:"score,omitempty"` } -// EntitiesBatchResultItemV2dot1 ... -type EntitiesBatchResultItemV2dot1 struct { +// EntitiesBatchResult ... +type EntitiesBatchResult struct { + autorest.Response `json:"-"` + Documents *[]EntitiesBatchResultItem `json:"documents,omitempty"` + Errors *[]ErrorRecord `json:"errors,omitempty"` +} + +// EntitiesBatchResultItem ... +type EntitiesBatchResultItem struct { // ID - Unique document identifier. ID *string `json:"id,omitempty"` // Entities - Recognized entities in the document. - Entities *[]EntityRecordV2dot1 `json:"entities,omitempty"` -} - -// EntitiesBatchResultV2dot1 ... -type EntitiesBatchResultV2dot1 struct { - autorest.Response `json:"-"` - Documents *[]EntitiesBatchResultItemV2dot1 `json:"documents,omitempty"` - Errors *[]ErrorRecord `json:"errors,omitempty"` + Entities *[]EntityRecord `json:"entities,omitempty"` } -// EntityRecordV2dot1 ... -type EntityRecordV2dot1 struct { +// EntityRecord ... +type EntityRecord struct { // Name - Entity formal name. Name *string `json:"name,omitempty"` // Matches - List of instances this entity appears in the text. - Matches *[]MatchRecordV2dot1 `json:"matches,omitempty"` + Matches *[]MatchRecord `json:"matches,omitempty"` // WikipediaLanguage - Wikipedia language for which the WikipediaId and WikipediaUrl refers to. WikipediaLanguage *string `json:"wikipediaLanguage,omitempty"` // WikipediaID - Wikipedia unique identifier of the recognized entity. @@ -131,8 +131,8 @@ type LanguageBatchResultItem struct { DetectedLanguages *[]DetectedLanguage `json:"detectedLanguages,omitempty"` } -// MatchRecordV2dot1 ... -type MatchRecordV2dot1 struct { +// MatchRecord ... +type MatchRecord struct { // Text - Entity text as appears in the request. Text *string `json:"text,omitempty"` // Offset - Start position (in Unicode characters) for the entity match text.