From bfc1dd6ab27a8dcc0e28626c0f107267c7b7e246 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 18 Apr 2019 13:24:45 -0700 Subject: [PATCH] [AutoPR network/resource-manager] Allow vnet access fix (#4582) * Updated README.md to correct logging values * add cognitive services anomalydetector v1.0 * Generated from 26af0939511462110644a747e481a1c8689ff5b8 (#4304) Fix operation types * Generated from fab65b72b5e9035dca9399cb347fd9ad9f9739d1 (#4323) removing runtime swagger - in different PR * Generated from 5335c9316f894ab4060d031632b8fdd168386829 (#4320) graph: identifierUris should not be required * [AutoPR graphrbac/data-plane] Add service principals by app id microsoft.graph rbac (#4311) * Generated from cec3f8a6bcad7e1b69f227281eb1a984180a4090 Update graphrbac.json * Generated from 1ba20d49c738fb00f7e75e227c3ab92d9c7be54d Update graphrbac.json * Generated from 42b9031222de601bb4b5fb67995b60a64712f81b Update graphrbac.json * Generated from 6afb048f96472417e5cadf45df930eb381f4ad3b Update graphrbac.json * [AutoPR machinelearning/resource-manager] [Hub Generated] Review request for Microsoft.MachineLearning to add version 2017-01-01 (#4291) * Generated from 3e4f75e7a15cbd81f6161bf9221a29a621386acc RevertWebServiceDefinition * Generated from 3e4f75e7a15cbd81f6161bf9221a29a621386acc RevertWebServiceDefinition * [AutoPR netapp/resource-manager] Update to Release 3.5 standard (pre GA) (#4269) * Generated from 46f3cb6030777135484c1bdc4b1d2146053172f9 NFSAAS-1875 Update to R3.5 Standard (#11) * Generated from 084552639aef23de670f0dc26ba5c9496eb6daff Nfsaas 1875 swagger update (#12) * NFSAAS-1875 Update to R3.5 Standard * NFSAAS-1875 update to R3.5 standard * Generated from 0af27c76c27c57415609e59ba20027b3808ba30e Nfsaas 1875 swagger update (#13) * NFSAAS-1875 Update to R3.5 Standard * NFSAAS-1875 update to R3.5 standard * NFSAAS-1875 updated from review comments * Generated from 7b0a7b54ad6b868b3486657e2e1079ac806096de (#4561) Add missing examples * Generated from 924f82edcf711df9d7d704cc674130792471c4fd Fixed allow Vnet description --- README.md | 2 +- .../luis/authoring/models.go | 125 +- profiles/latest/graphrbac/graphrbac/models.go | 1 + .../mgmt/webservices/models.go | 2 + .../luis/authoring/models.go | 125 +- .../preview/graphrbac/graphrbac/models.go | 1 + .../mgmt/webservices/models.go | 2 + .../anomalydetectorapi/models.go | 24 + .../anomalydetector/models.go | 56 + .../preview/netapp/mgmt/netapp/models.go | 5 +- .../v2.0/luis/authoring/apps.go | 327 +- .../luis/authoring/authoringapi/interfaces.go | 333 +- .../v2.0/luis/authoring/azureaccounts.go | 91 +- .../v2.0/luis/authoring/client.go | 10 +- .../v2.0/luis/authoring/examples.go | 68 +- .../v2.0/luis/authoring/features.go | 200 +- .../v2.0/luis/authoring/model.go | 3091 +++++++++-------- .../v2.0/luis/authoring/models.go | 312 +- .../v2.0/luis/authoring/pattern.go | 160 +- .../v2.0/luis/authoring/permissions.go | 62 +- .../v2.0/luis/authoring/settings.go | 41 +- .../v2.0/luis/authoring/train.go | 30 +- .../v2.0/luis/authoring/versions.go | 124 +- .../graphrbac/1.6/graphrbac/applications.go | 78 +- .../1.6/graphrbac/graphrbacapi/interfaces.go | 1 + services/graphrbac/1.6/graphrbac/models.go | 9 + .../mgmt/2017-01-01/webservices/models.go | 141 + .../2017-01-01/webservices/webservices.go | 4 +- .../webservices/webservicesapi/interfaces.go | 2 +- .../marketplaceagreements.go | 4 +- .../anomalydetectorapi/interfaces.go | 31 + .../v1.0/anomalydetector/client.go | 208 ++ .../v1.0/anomalydetector/models.go | 121 + .../v1.0/anomalydetector/version.go | 30 + .../netapp/mgmt/2017-08-15/netapp/models.go | 276 +- 35 files changed, 3908 insertions(+), 2189 deletions(-) create mode 100644 profiles/preview/preview/cognitiveservices/anomalydetector/anomalydetectorapi/models.go create mode 100644 profiles/preview/preview/cognitiveservices/anomalydetector/models.go create mode 100644 services/preview/cognitiveservices/v1.0/anomalydetector/anomalydetectorapi/interfaces.go create mode 100644 services/preview/cognitiveservices/v1.0/anomalydetector/client.go create mode 100644 services/preview/cognitiveservices/v1.0/anomalydetector/models.go create mode 100644 services/preview/cognitiveservices/v1.0/anomalydetector/version.go diff --git a/README.md b/README.md index 460a804795eb..697cda2c697f 100644 --- a/README.md +++ b/README.md @@ -391,7 +391,7 @@ Combined, these techniques will ensure that breaking changes should not occur. I ### Built-in Basic Request/Response Logging Starting with `go-autorest v10.15.0` you can enable basic logging of requests and responses through setting environment variables. -Setting `AZURE_GO_SDK_LOG_LEVEL` to `LogInfo` will log request/response without their bodies. To include the bodies set the log level to `LogDebug`. +Setting `AZURE_GO_SDK_LOG_LEVEL` to `INFO` will log request/response without their bodies. To include the bodies set the log level to `DEBUG`. By default the logger writes to strerr, however it can also write to stdout or a file if specified in `AZURE_GO_SDK_LOG_FILE`. Note that if the specified file already exists it will be truncated. diff --git a/profiles/latest/cognitiveservices/luis/authoring/models.go b/profiles/latest/cognitiveservices/luis/authoring/models.go index a3e82a3999a4..6a7d89d535f5 100644 --- a/profiles/latest/cognitiveservices/luis/authoring/models.go +++ b/profiles/latest/cognitiveservices/luis/authoring/models.go @@ -21,6 +21,31 @@ package authoring import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring" +type AzureClouds = original.AzureClouds + +const ( + Com AzureClouds = original.Com + Us AzureClouds = original.Us +) + +type AzureRegions = original.AzureRegions + +const ( + Australiaeast AzureRegions = original.Australiaeast + Brazilsouth AzureRegions = original.Brazilsouth + Eastasia AzureRegions = original.Eastasia + Eastus AzureRegions = original.Eastus + Eastus2 AzureRegions = original.Eastus2 + Northeurope AzureRegions = original.Northeurope + Southcentralus AzureRegions = original.Southcentralus + Southeastasia AzureRegions = original.Southeastasia + Virginia AzureRegions = original.Virginia + Westcentralus AzureRegions = original.Westcentralus + Westeurope AzureRegions = original.Westeurope + Westus AzureRegions = original.Westus + Westus2 AzureRegions = original.Westus2 +) + type OperationStatusType = original.OperationStatusType const ( @@ -32,155 +57,155 @@ const ( type ReadableType = original.ReadableType const ( - ReadableTypeClosedListEntityExtractor ReadableType = original.ReadableTypeClosedListEntityExtractor ReadableTypeCompositeEntityExtractor ReadableType = original.ReadableTypeCompositeEntityExtractor ReadableTypeEntityExtractor ReadableType = original.ReadableTypeEntityExtractor ReadableTypeHierarchicalChildEntityExtractor ReadableType = original.ReadableTypeHierarchicalChildEntityExtractor ReadableTypeHierarchicalEntityExtractor ReadableType = original.ReadableTypeHierarchicalEntityExtractor ReadableTypeIntentClassifier ReadableType = original.ReadableTypeIntentClassifier + ReadableTypeListEntityExtractor ReadableType = original.ReadableTypeListEntityExtractor ReadableTypePatternAnyEntityExtractor ReadableType = original.ReadableTypePatternAnyEntityExtractor ReadableTypePrebuiltEntityExtractor ReadableType = original.ReadableTypePrebuiltEntityExtractor - ReadableTypeRegexEntityExtractor ReadableType = original.ReadableTypeRegexEntityExtractor + ReadableTypeRegularExpressionEntityExtractor ReadableType = original.ReadableTypeRegularExpressionEntityExtractor ) type ReadableType1 = original.ReadableType1 const ( - ReadableType1ClosedListEntityExtractor ReadableType1 = original.ReadableType1ClosedListEntityExtractor ReadableType1CompositeEntityExtractor ReadableType1 = original.ReadableType1CompositeEntityExtractor ReadableType1EntityExtractor ReadableType1 = original.ReadableType1EntityExtractor ReadableType1HierarchicalChildEntityExtractor ReadableType1 = original.ReadableType1HierarchicalChildEntityExtractor ReadableType1HierarchicalEntityExtractor ReadableType1 = original.ReadableType1HierarchicalEntityExtractor ReadableType1IntentClassifier ReadableType1 = original.ReadableType1IntentClassifier + ReadableType1ListEntityExtractor ReadableType1 = original.ReadableType1ListEntityExtractor ReadableType1PatternAnyEntityExtractor ReadableType1 = original.ReadableType1PatternAnyEntityExtractor ReadableType1PrebuiltEntityExtractor ReadableType1 = original.ReadableType1PrebuiltEntityExtractor - ReadableType1RegexEntityExtractor ReadableType1 = original.ReadableType1RegexEntityExtractor + ReadableType1RegularExpressionEntityExtractor ReadableType1 = original.ReadableType1RegularExpressionEntityExtractor ) type ReadableType10 = original.ReadableType10 const ( - ReadableType10ClosedListEntityExtractor ReadableType10 = original.ReadableType10ClosedListEntityExtractor ReadableType10CompositeEntityExtractor ReadableType10 = original.ReadableType10CompositeEntityExtractor ReadableType10EntityExtractor ReadableType10 = original.ReadableType10EntityExtractor ReadableType10HierarchicalChildEntityExtractor ReadableType10 = original.ReadableType10HierarchicalChildEntityExtractor ReadableType10HierarchicalEntityExtractor ReadableType10 = original.ReadableType10HierarchicalEntityExtractor ReadableType10IntentClassifier ReadableType10 = original.ReadableType10IntentClassifier + ReadableType10ListEntityExtractor ReadableType10 = original.ReadableType10ListEntityExtractor ReadableType10PatternAnyEntityExtractor ReadableType10 = original.ReadableType10PatternAnyEntityExtractor ReadableType10PrebuiltEntityExtractor ReadableType10 = original.ReadableType10PrebuiltEntityExtractor - ReadableType10RegexEntityExtractor ReadableType10 = original.ReadableType10RegexEntityExtractor + ReadableType10RegularExpressionEntityExtractor ReadableType10 = original.ReadableType10RegularExpressionEntityExtractor ) type ReadableType2 = original.ReadableType2 const ( - ReadableType2ClosedListEntityExtractor ReadableType2 = original.ReadableType2ClosedListEntityExtractor ReadableType2CompositeEntityExtractor ReadableType2 = original.ReadableType2CompositeEntityExtractor ReadableType2EntityExtractor ReadableType2 = original.ReadableType2EntityExtractor ReadableType2HierarchicalChildEntityExtractor ReadableType2 = original.ReadableType2HierarchicalChildEntityExtractor ReadableType2HierarchicalEntityExtractor ReadableType2 = original.ReadableType2HierarchicalEntityExtractor ReadableType2IntentClassifier ReadableType2 = original.ReadableType2IntentClassifier + ReadableType2ListEntityExtractor ReadableType2 = original.ReadableType2ListEntityExtractor ReadableType2PatternAnyEntityExtractor ReadableType2 = original.ReadableType2PatternAnyEntityExtractor ReadableType2PrebuiltEntityExtractor ReadableType2 = original.ReadableType2PrebuiltEntityExtractor - ReadableType2RegexEntityExtractor ReadableType2 = original.ReadableType2RegexEntityExtractor + ReadableType2RegularExpressionEntityExtractor ReadableType2 = original.ReadableType2RegularExpressionEntityExtractor ) type ReadableType3 = original.ReadableType3 const ( - ReadableType3ClosedListEntityExtractor ReadableType3 = original.ReadableType3ClosedListEntityExtractor ReadableType3CompositeEntityExtractor ReadableType3 = original.ReadableType3CompositeEntityExtractor ReadableType3EntityExtractor ReadableType3 = original.ReadableType3EntityExtractor ReadableType3HierarchicalChildEntityExtractor ReadableType3 = original.ReadableType3HierarchicalChildEntityExtractor ReadableType3HierarchicalEntityExtractor ReadableType3 = original.ReadableType3HierarchicalEntityExtractor ReadableType3IntentClassifier ReadableType3 = original.ReadableType3IntentClassifier + ReadableType3ListEntityExtractor ReadableType3 = original.ReadableType3ListEntityExtractor ReadableType3PatternAnyEntityExtractor ReadableType3 = original.ReadableType3PatternAnyEntityExtractor ReadableType3PrebuiltEntityExtractor ReadableType3 = original.ReadableType3PrebuiltEntityExtractor - ReadableType3RegexEntityExtractor ReadableType3 = original.ReadableType3RegexEntityExtractor + ReadableType3RegularExpressionEntityExtractor ReadableType3 = original.ReadableType3RegularExpressionEntityExtractor ) type ReadableType4 = original.ReadableType4 const ( - ReadableType4ClosedListEntityExtractor ReadableType4 = original.ReadableType4ClosedListEntityExtractor ReadableType4CompositeEntityExtractor ReadableType4 = original.ReadableType4CompositeEntityExtractor ReadableType4EntityExtractor ReadableType4 = original.ReadableType4EntityExtractor ReadableType4HierarchicalChildEntityExtractor ReadableType4 = original.ReadableType4HierarchicalChildEntityExtractor ReadableType4HierarchicalEntityExtractor ReadableType4 = original.ReadableType4HierarchicalEntityExtractor ReadableType4IntentClassifier ReadableType4 = original.ReadableType4IntentClassifier + ReadableType4ListEntityExtractor ReadableType4 = original.ReadableType4ListEntityExtractor ReadableType4PatternAnyEntityExtractor ReadableType4 = original.ReadableType4PatternAnyEntityExtractor ReadableType4PrebuiltEntityExtractor ReadableType4 = original.ReadableType4PrebuiltEntityExtractor - ReadableType4RegexEntityExtractor ReadableType4 = original.ReadableType4RegexEntityExtractor + ReadableType4RegularExpressionEntityExtractor ReadableType4 = original.ReadableType4RegularExpressionEntityExtractor ) type ReadableType5 = original.ReadableType5 const ( - ReadableType5ClosedListEntityExtractor ReadableType5 = original.ReadableType5ClosedListEntityExtractor ReadableType5CompositeEntityExtractor ReadableType5 = original.ReadableType5CompositeEntityExtractor ReadableType5EntityExtractor ReadableType5 = original.ReadableType5EntityExtractor ReadableType5HierarchicalChildEntityExtractor ReadableType5 = original.ReadableType5HierarchicalChildEntityExtractor ReadableType5HierarchicalEntityExtractor ReadableType5 = original.ReadableType5HierarchicalEntityExtractor ReadableType5IntentClassifier ReadableType5 = original.ReadableType5IntentClassifier + ReadableType5ListEntityExtractor ReadableType5 = original.ReadableType5ListEntityExtractor ReadableType5PatternAnyEntityExtractor ReadableType5 = original.ReadableType5PatternAnyEntityExtractor ReadableType5PrebuiltEntityExtractor ReadableType5 = original.ReadableType5PrebuiltEntityExtractor - ReadableType5RegexEntityExtractor ReadableType5 = original.ReadableType5RegexEntityExtractor + ReadableType5RegularExpressionEntityExtractor ReadableType5 = original.ReadableType5RegularExpressionEntityExtractor ) type ReadableType6 = original.ReadableType6 const ( - ReadableType6ClosedListEntityExtractor ReadableType6 = original.ReadableType6ClosedListEntityExtractor ReadableType6CompositeEntityExtractor ReadableType6 = original.ReadableType6CompositeEntityExtractor ReadableType6EntityExtractor ReadableType6 = original.ReadableType6EntityExtractor ReadableType6HierarchicalChildEntityExtractor ReadableType6 = original.ReadableType6HierarchicalChildEntityExtractor ReadableType6HierarchicalEntityExtractor ReadableType6 = original.ReadableType6HierarchicalEntityExtractor ReadableType6IntentClassifier ReadableType6 = original.ReadableType6IntentClassifier + ReadableType6ListEntityExtractor ReadableType6 = original.ReadableType6ListEntityExtractor ReadableType6PatternAnyEntityExtractor ReadableType6 = original.ReadableType6PatternAnyEntityExtractor ReadableType6PrebuiltEntityExtractor ReadableType6 = original.ReadableType6PrebuiltEntityExtractor - ReadableType6RegexEntityExtractor ReadableType6 = original.ReadableType6RegexEntityExtractor + ReadableType6RegularExpressionEntityExtractor ReadableType6 = original.ReadableType6RegularExpressionEntityExtractor ) type ReadableType7 = original.ReadableType7 const ( - ReadableType7ClosedListEntityExtractor ReadableType7 = original.ReadableType7ClosedListEntityExtractor ReadableType7CompositeEntityExtractor ReadableType7 = original.ReadableType7CompositeEntityExtractor ReadableType7EntityExtractor ReadableType7 = original.ReadableType7EntityExtractor ReadableType7HierarchicalChildEntityExtractor ReadableType7 = original.ReadableType7HierarchicalChildEntityExtractor ReadableType7HierarchicalEntityExtractor ReadableType7 = original.ReadableType7HierarchicalEntityExtractor ReadableType7IntentClassifier ReadableType7 = original.ReadableType7IntentClassifier + ReadableType7ListEntityExtractor ReadableType7 = original.ReadableType7ListEntityExtractor ReadableType7PatternAnyEntityExtractor ReadableType7 = original.ReadableType7PatternAnyEntityExtractor ReadableType7PrebuiltEntityExtractor ReadableType7 = original.ReadableType7PrebuiltEntityExtractor - ReadableType7RegexEntityExtractor ReadableType7 = original.ReadableType7RegexEntityExtractor + ReadableType7RegularExpressionEntityExtractor ReadableType7 = original.ReadableType7RegularExpressionEntityExtractor ) type ReadableType8 = original.ReadableType8 const ( - ReadableType8ClosedListEntityExtractor ReadableType8 = original.ReadableType8ClosedListEntityExtractor ReadableType8CompositeEntityExtractor ReadableType8 = original.ReadableType8CompositeEntityExtractor ReadableType8EntityExtractor ReadableType8 = original.ReadableType8EntityExtractor ReadableType8HierarchicalChildEntityExtractor ReadableType8 = original.ReadableType8HierarchicalChildEntityExtractor ReadableType8HierarchicalEntityExtractor ReadableType8 = original.ReadableType8HierarchicalEntityExtractor ReadableType8IntentClassifier ReadableType8 = original.ReadableType8IntentClassifier + ReadableType8ListEntityExtractor ReadableType8 = original.ReadableType8ListEntityExtractor ReadableType8PatternAnyEntityExtractor ReadableType8 = original.ReadableType8PatternAnyEntityExtractor ReadableType8PrebuiltEntityExtractor ReadableType8 = original.ReadableType8PrebuiltEntityExtractor - ReadableType8RegexEntityExtractor ReadableType8 = original.ReadableType8RegexEntityExtractor + ReadableType8RegularExpressionEntityExtractor ReadableType8 = original.ReadableType8RegularExpressionEntityExtractor ) type ReadableType9 = original.ReadableType9 const ( - ReadableType9ClosedListEntityExtractor ReadableType9 = original.ReadableType9ClosedListEntityExtractor ReadableType9CompositeEntityExtractor ReadableType9 = original.ReadableType9CompositeEntityExtractor ReadableType9EntityExtractor ReadableType9 = original.ReadableType9EntityExtractor ReadableType9HierarchicalChildEntityExtractor ReadableType9 = original.ReadableType9HierarchicalChildEntityExtractor ReadableType9HierarchicalEntityExtractor ReadableType9 = original.ReadableType9HierarchicalEntityExtractor ReadableType9IntentClassifier ReadableType9 = original.ReadableType9IntentClassifier + ReadableType9ListEntityExtractor ReadableType9 = original.ReadableType9ListEntityExtractor ReadableType9PatternAnyEntityExtractor ReadableType9 = original.ReadableType9PatternAnyEntityExtractor ReadableType9PrebuiltEntityExtractor ReadableType9 = original.ReadableType9PrebuiltEntityExtractor - ReadableType9RegexEntityExtractor ReadableType9 = original.ReadableType9RegexEntityExtractor + ReadableType9RegularExpressionEntityExtractor ReadableType9 = original.ReadableType9RegularExpressionEntityExtractor ) type Status = original.Status @@ -263,6 +288,7 @@ type HierarchicalEntityExtractor = original.HierarchicalEntityExtractor type HierarchicalEntityModel = original.HierarchicalEntityModel type HierarchicalModel = original.HierarchicalModel type Int32 = original.Int32 +type Int64 = original.Int64 type IntentClassifier = original.IntentClassifier type IntentPrediction = original.IntentPrediction type IntentsSuggestionExample = original.IntentsSuggestionExample @@ -294,6 +320,7 @@ type ListLabeledUtterance = original.ListLabeledUtterance type ListModelInfoResponse = original.ListModelInfoResponse type ListModelTrainingInfo = original.ListModelTrainingInfo type ListPatternAnyEntityExtractor = original.ListPatternAnyEntityExtractor +type ListPatternFeatureInfo = original.ListPatternFeatureInfo type ListPatternRuleInfo = original.ListPatternRuleInfo type ListPhraseListFeatureInfo = original.ListPhraseListFeatureInfo type ListPrebuiltDomain = original.ListPrebuiltDomain @@ -360,41 +387,47 @@ type VersionsClient = original.VersionsClient type WordListBaseUpdateObject = original.WordListBaseUpdateObject type WordListObject = original.WordListObject -func New(endpoint string) BaseClient { - return original.New(endpoint) +func New() BaseClient { + return original.New() +} +func NewAppsClient() AppsClient { + return original.NewAppsClient() +} +func NewAzureAccountsClient() AzureAccountsClient { + return original.NewAzureAccountsClient() } -func NewAppsClient(endpoint string) AppsClient { - return original.NewAppsClient(endpoint) +func NewExamplesClient() ExamplesClient { + return original.NewExamplesClient() } -func NewAzureAccountsClient(endpoint string) AzureAccountsClient { - return original.NewAzureAccountsClient(endpoint) +func NewFeaturesClient() FeaturesClient { + return original.NewFeaturesClient() } -func NewExamplesClient(endpoint string) ExamplesClient { - return original.NewExamplesClient(endpoint) +func NewModelClient() ModelClient { + return original.NewModelClient() } -func NewFeaturesClient(endpoint string) FeaturesClient { - return original.NewFeaturesClient(endpoint) +func NewPatternClient() PatternClient { + return original.NewPatternClient() } -func NewModelClient(endpoint string) ModelClient { - return original.NewModelClient(endpoint) +func NewPermissionsClient() PermissionsClient { + return original.NewPermissionsClient() } -func NewPatternClient(endpoint string) PatternClient { - return original.NewPatternClient(endpoint) +func NewSettingsClient() SettingsClient { + return original.NewSettingsClient() } -func NewPermissionsClient(endpoint string) PermissionsClient { - return original.NewPermissionsClient(endpoint) +func NewTrainClient() TrainClient { + return original.NewTrainClient() } -func NewSettingsClient(endpoint string) SettingsClient { - return original.NewSettingsClient(endpoint) +func NewVersionsClient() VersionsClient { + return original.NewVersionsClient() } -func NewTrainClient(endpoint string) TrainClient { - return original.NewTrainClient(endpoint) +func NewWithoutDefaults() BaseClient { + return original.NewWithoutDefaults() } -func NewVersionsClient(endpoint string) VersionsClient { - return original.NewVersionsClient(endpoint) +func PossibleAzureCloudsValues() []AzureClouds { + return original.PossibleAzureCloudsValues() } -func NewWithoutDefaults(endpoint string) BaseClient { - return original.NewWithoutDefaults(endpoint) +func PossibleAzureRegionsValues() []AzureRegions { + return original.PossibleAzureRegionsValues() } func PossibleOperationStatusTypeValues() []OperationStatusType { return original.PossibleOperationStatusTypeValues() diff --git a/profiles/latest/graphrbac/graphrbac/models.go b/profiles/latest/graphrbac/graphrbac/models.go index c05b831e96b5..0f2949bc61e3 100644 --- a/profiles/latest/graphrbac/graphrbac/models.go +++ b/profiles/latest/graphrbac/graphrbac/models.go @@ -116,6 +116,7 @@ type ServicePrincipalCreateParameters = original.ServicePrincipalCreateParameter type ServicePrincipalListResult = original.ServicePrincipalListResult type ServicePrincipalListResultIterator = original.ServicePrincipalListResultIterator type ServicePrincipalListResultPage = original.ServicePrincipalListResultPage +type ServicePrincipalObjectResult = original.ServicePrincipalObjectResult type ServicePrincipalUpdateParameters = original.ServicePrincipalUpdateParameters type ServicePrincipalsClient = original.ServicePrincipalsClient type SignInName = original.SignInName diff --git a/profiles/latest/machinelearning/mgmt/webservices/models.go b/profiles/latest/machinelearning/mgmt/webservices/models.go index bbaa06c8547a..15e0f13cfe13 100644 --- a/profiles/latest/machinelearning/mgmt/webservices/models.go +++ b/profiles/latest/machinelearning/mgmt/webservices/models.go @@ -153,6 +153,8 @@ type PaginatedWebServicesListIterator = original.PaginatedWebServicesListIterato type PaginatedWebServicesListPage = original.PaginatedWebServicesListPage type Parameter = original.Parameter type PatchFuture = original.PatchFuture +type PatchedResource = original.PatchedResource +type PatchedWebService = original.PatchedWebService type Properties = original.Properties type PropertiesForGraph = original.PropertiesForGraph type RealtimeConfiguration = original.RealtimeConfiguration diff --git a/profiles/preview/cognitiveservices/luis/authoring/models.go b/profiles/preview/cognitiveservices/luis/authoring/models.go index 2e7556f92a89..a2355c491ba1 100644 --- a/profiles/preview/cognitiveservices/luis/authoring/models.go +++ b/profiles/preview/cognitiveservices/luis/authoring/models.go @@ -21,6 +21,31 @@ package authoring import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring" +type AzureClouds = original.AzureClouds + +const ( + Com AzureClouds = original.Com + Us AzureClouds = original.Us +) + +type AzureRegions = original.AzureRegions + +const ( + Australiaeast AzureRegions = original.Australiaeast + Brazilsouth AzureRegions = original.Brazilsouth + Eastasia AzureRegions = original.Eastasia + Eastus AzureRegions = original.Eastus + Eastus2 AzureRegions = original.Eastus2 + Northeurope AzureRegions = original.Northeurope + Southcentralus AzureRegions = original.Southcentralus + Southeastasia AzureRegions = original.Southeastasia + Virginia AzureRegions = original.Virginia + Westcentralus AzureRegions = original.Westcentralus + Westeurope AzureRegions = original.Westeurope + Westus AzureRegions = original.Westus + Westus2 AzureRegions = original.Westus2 +) + type OperationStatusType = original.OperationStatusType const ( @@ -32,155 +57,155 @@ const ( type ReadableType = original.ReadableType const ( - ReadableTypeClosedListEntityExtractor ReadableType = original.ReadableTypeClosedListEntityExtractor ReadableTypeCompositeEntityExtractor ReadableType = original.ReadableTypeCompositeEntityExtractor ReadableTypeEntityExtractor ReadableType = original.ReadableTypeEntityExtractor ReadableTypeHierarchicalChildEntityExtractor ReadableType = original.ReadableTypeHierarchicalChildEntityExtractor ReadableTypeHierarchicalEntityExtractor ReadableType = original.ReadableTypeHierarchicalEntityExtractor ReadableTypeIntentClassifier ReadableType = original.ReadableTypeIntentClassifier + ReadableTypeListEntityExtractor ReadableType = original.ReadableTypeListEntityExtractor ReadableTypePatternAnyEntityExtractor ReadableType = original.ReadableTypePatternAnyEntityExtractor ReadableTypePrebuiltEntityExtractor ReadableType = original.ReadableTypePrebuiltEntityExtractor - ReadableTypeRegexEntityExtractor ReadableType = original.ReadableTypeRegexEntityExtractor + ReadableTypeRegularExpressionEntityExtractor ReadableType = original.ReadableTypeRegularExpressionEntityExtractor ) type ReadableType1 = original.ReadableType1 const ( - ReadableType1ClosedListEntityExtractor ReadableType1 = original.ReadableType1ClosedListEntityExtractor ReadableType1CompositeEntityExtractor ReadableType1 = original.ReadableType1CompositeEntityExtractor ReadableType1EntityExtractor ReadableType1 = original.ReadableType1EntityExtractor ReadableType1HierarchicalChildEntityExtractor ReadableType1 = original.ReadableType1HierarchicalChildEntityExtractor ReadableType1HierarchicalEntityExtractor ReadableType1 = original.ReadableType1HierarchicalEntityExtractor ReadableType1IntentClassifier ReadableType1 = original.ReadableType1IntentClassifier + ReadableType1ListEntityExtractor ReadableType1 = original.ReadableType1ListEntityExtractor ReadableType1PatternAnyEntityExtractor ReadableType1 = original.ReadableType1PatternAnyEntityExtractor ReadableType1PrebuiltEntityExtractor ReadableType1 = original.ReadableType1PrebuiltEntityExtractor - ReadableType1RegexEntityExtractor ReadableType1 = original.ReadableType1RegexEntityExtractor + ReadableType1RegularExpressionEntityExtractor ReadableType1 = original.ReadableType1RegularExpressionEntityExtractor ) type ReadableType10 = original.ReadableType10 const ( - ReadableType10ClosedListEntityExtractor ReadableType10 = original.ReadableType10ClosedListEntityExtractor ReadableType10CompositeEntityExtractor ReadableType10 = original.ReadableType10CompositeEntityExtractor ReadableType10EntityExtractor ReadableType10 = original.ReadableType10EntityExtractor ReadableType10HierarchicalChildEntityExtractor ReadableType10 = original.ReadableType10HierarchicalChildEntityExtractor ReadableType10HierarchicalEntityExtractor ReadableType10 = original.ReadableType10HierarchicalEntityExtractor ReadableType10IntentClassifier ReadableType10 = original.ReadableType10IntentClassifier + ReadableType10ListEntityExtractor ReadableType10 = original.ReadableType10ListEntityExtractor ReadableType10PatternAnyEntityExtractor ReadableType10 = original.ReadableType10PatternAnyEntityExtractor ReadableType10PrebuiltEntityExtractor ReadableType10 = original.ReadableType10PrebuiltEntityExtractor - ReadableType10RegexEntityExtractor ReadableType10 = original.ReadableType10RegexEntityExtractor + ReadableType10RegularExpressionEntityExtractor ReadableType10 = original.ReadableType10RegularExpressionEntityExtractor ) type ReadableType2 = original.ReadableType2 const ( - ReadableType2ClosedListEntityExtractor ReadableType2 = original.ReadableType2ClosedListEntityExtractor ReadableType2CompositeEntityExtractor ReadableType2 = original.ReadableType2CompositeEntityExtractor ReadableType2EntityExtractor ReadableType2 = original.ReadableType2EntityExtractor ReadableType2HierarchicalChildEntityExtractor ReadableType2 = original.ReadableType2HierarchicalChildEntityExtractor ReadableType2HierarchicalEntityExtractor ReadableType2 = original.ReadableType2HierarchicalEntityExtractor ReadableType2IntentClassifier ReadableType2 = original.ReadableType2IntentClassifier + ReadableType2ListEntityExtractor ReadableType2 = original.ReadableType2ListEntityExtractor ReadableType2PatternAnyEntityExtractor ReadableType2 = original.ReadableType2PatternAnyEntityExtractor ReadableType2PrebuiltEntityExtractor ReadableType2 = original.ReadableType2PrebuiltEntityExtractor - ReadableType2RegexEntityExtractor ReadableType2 = original.ReadableType2RegexEntityExtractor + ReadableType2RegularExpressionEntityExtractor ReadableType2 = original.ReadableType2RegularExpressionEntityExtractor ) type ReadableType3 = original.ReadableType3 const ( - ReadableType3ClosedListEntityExtractor ReadableType3 = original.ReadableType3ClosedListEntityExtractor ReadableType3CompositeEntityExtractor ReadableType3 = original.ReadableType3CompositeEntityExtractor ReadableType3EntityExtractor ReadableType3 = original.ReadableType3EntityExtractor ReadableType3HierarchicalChildEntityExtractor ReadableType3 = original.ReadableType3HierarchicalChildEntityExtractor ReadableType3HierarchicalEntityExtractor ReadableType3 = original.ReadableType3HierarchicalEntityExtractor ReadableType3IntentClassifier ReadableType3 = original.ReadableType3IntentClassifier + ReadableType3ListEntityExtractor ReadableType3 = original.ReadableType3ListEntityExtractor ReadableType3PatternAnyEntityExtractor ReadableType3 = original.ReadableType3PatternAnyEntityExtractor ReadableType3PrebuiltEntityExtractor ReadableType3 = original.ReadableType3PrebuiltEntityExtractor - ReadableType3RegexEntityExtractor ReadableType3 = original.ReadableType3RegexEntityExtractor + ReadableType3RegularExpressionEntityExtractor ReadableType3 = original.ReadableType3RegularExpressionEntityExtractor ) type ReadableType4 = original.ReadableType4 const ( - ReadableType4ClosedListEntityExtractor ReadableType4 = original.ReadableType4ClosedListEntityExtractor ReadableType4CompositeEntityExtractor ReadableType4 = original.ReadableType4CompositeEntityExtractor ReadableType4EntityExtractor ReadableType4 = original.ReadableType4EntityExtractor ReadableType4HierarchicalChildEntityExtractor ReadableType4 = original.ReadableType4HierarchicalChildEntityExtractor ReadableType4HierarchicalEntityExtractor ReadableType4 = original.ReadableType4HierarchicalEntityExtractor ReadableType4IntentClassifier ReadableType4 = original.ReadableType4IntentClassifier + ReadableType4ListEntityExtractor ReadableType4 = original.ReadableType4ListEntityExtractor ReadableType4PatternAnyEntityExtractor ReadableType4 = original.ReadableType4PatternAnyEntityExtractor ReadableType4PrebuiltEntityExtractor ReadableType4 = original.ReadableType4PrebuiltEntityExtractor - ReadableType4RegexEntityExtractor ReadableType4 = original.ReadableType4RegexEntityExtractor + ReadableType4RegularExpressionEntityExtractor ReadableType4 = original.ReadableType4RegularExpressionEntityExtractor ) type ReadableType5 = original.ReadableType5 const ( - ReadableType5ClosedListEntityExtractor ReadableType5 = original.ReadableType5ClosedListEntityExtractor ReadableType5CompositeEntityExtractor ReadableType5 = original.ReadableType5CompositeEntityExtractor ReadableType5EntityExtractor ReadableType5 = original.ReadableType5EntityExtractor ReadableType5HierarchicalChildEntityExtractor ReadableType5 = original.ReadableType5HierarchicalChildEntityExtractor ReadableType5HierarchicalEntityExtractor ReadableType5 = original.ReadableType5HierarchicalEntityExtractor ReadableType5IntentClassifier ReadableType5 = original.ReadableType5IntentClassifier + ReadableType5ListEntityExtractor ReadableType5 = original.ReadableType5ListEntityExtractor ReadableType5PatternAnyEntityExtractor ReadableType5 = original.ReadableType5PatternAnyEntityExtractor ReadableType5PrebuiltEntityExtractor ReadableType5 = original.ReadableType5PrebuiltEntityExtractor - ReadableType5RegexEntityExtractor ReadableType5 = original.ReadableType5RegexEntityExtractor + ReadableType5RegularExpressionEntityExtractor ReadableType5 = original.ReadableType5RegularExpressionEntityExtractor ) type ReadableType6 = original.ReadableType6 const ( - ReadableType6ClosedListEntityExtractor ReadableType6 = original.ReadableType6ClosedListEntityExtractor ReadableType6CompositeEntityExtractor ReadableType6 = original.ReadableType6CompositeEntityExtractor ReadableType6EntityExtractor ReadableType6 = original.ReadableType6EntityExtractor ReadableType6HierarchicalChildEntityExtractor ReadableType6 = original.ReadableType6HierarchicalChildEntityExtractor ReadableType6HierarchicalEntityExtractor ReadableType6 = original.ReadableType6HierarchicalEntityExtractor ReadableType6IntentClassifier ReadableType6 = original.ReadableType6IntentClassifier + ReadableType6ListEntityExtractor ReadableType6 = original.ReadableType6ListEntityExtractor ReadableType6PatternAnyEntityExtractor ReadableType6 = original.ReadableType6PatternAnyEntityExtractor ReadableType6PrebuiltEntityExtractor ReadableType6 = original.ReadableType6PrebuiltEntityExtractor - ReadableType6RegexEntityExtractor ReadableType6 = original.ReadableType6RegexEntityExtractor + ReadableType6RegularExpressionEntityExtractor ReadableType6 = original.ReadableType6RegularExpressionEntityExtractor ) type ReadableType7 = original.ReadableType7 const ( - ReadableType7ClosedListEntityExtractor ReadableType7 = original.ReadableType7ClosedListEntityExtractor ReadableType7CompositeEntityExtractor ReadableType7 = original.ReadableType7CompositeEntityExtractor ReadableType7EntityExtractor ReadableType7 = original.ReadableType7EntityExtractor ReadableType7HierarchicalChildEntityExtractor ReadableType7 = original.ReadableType7HierarchicalChildEntityExtractor ReadableType7HierarchicalEntityExtractor ReadableType7 = original.ReadableType7HierarchicalEntityExtractor ReadableType7IntentClassifier ReadableType7 = original.ReadableType7IntentClassifier + ReadableType7ListEntityExtractor ReadableType7 = original.ReadableType7ListEntityExtractor ReadableType7PatternAnyEntityExtractor ReadableType7 = original.ReadableType7PatternAnyEntityExtractor ReadableType7PrebuiltEntityExtractor ReadableType7 = original.ReadableType7PrebuiltEntityExtractor - ReadableType7RegexEntityExtractor ReadableType7 = original.ReadableType7RegexEntityExtractor + ReadableType7RegularExpressionEntityExtractor ReadableType7 = original.ReadableType7RegularExpressionEntityExtractor ) type ReadableType8 = original.ReadableType8 const ( - ReadableType8ClosedListEntityExtractor ReadableType8 = original.ReadableType8ClosedListEntityExtractor ReadableType8CompositeEntityExtractor ReadableType8 = original.ReadableType8CompositeEntityExtractor ReadableType8EntityExtractor ReadableType8 = original.ReadableType8EntityExtractor ReadableType8HierarchicalChildEntityExtractor ReadableType8 = original.ReadableType8HierarchicalChildEntityExtractor ReadableType8HierarchicalEntityExtractor ReadableType8 = original.ReadableType8HierarchicalEntityExtractor ReadableType8IntentClassifier ReadableType8 = original.ReadableType8IntentClassifier + ReadableType8ListEntityExtractor ReadableType8 = original.ReadableType8ListEntityExtractor ReadableType8PatternAnyEntityExtractor ReadableType8 = original.ReadableType8PatternAnyEntityExtractor ReadableType8PrebuiltEntityExtractor ReadableType8 = original.ReadableType8PrebuiltEntityExtractor - ReadableType8RegexEntityExtractor ReadableType8 = original.ReadableType8RegexEntityExtractor + ReadableType8RegularExpressionEntityExtractor ReadableType8 = original.ReadableType8RegularExpressionEntityExtractor ) type ReadableType9 = original.ReadableType9 const ( - ReadableType9ClosedListEntityExtractor ReadableType9 = original.ReadableType9ClosedListEntityExtractor ReadableType9CompositeEntityExtractor ReadableType9 = original.ReadableType9CompositeEntityExtractor ReadableType9EntityExtractor ReadableType9 = original.ReadableType9EntityExtractor ReadableType9HierarchicalChildEntityExtractor ReadableType9 = original.ReadableType9HierarchicalChildEntityExtractor ReadableType9HierarchicalEntityExtractor ReadableType9 = original.ReadableType9HierarchicalEntityExtractor ReadableType9IntentClassifier ReadableType9 = original.ReadableType9IntentClassifier + ReadableType9ListEntityExtractor ReadableType9 = original.ReadableType9ListEntityExtractor ReadableType9PatternAnyEntityExtractor ReadableType9 = original.ReadableType9PatternAnyEntityExtractor ReadableType9PrebuiltEntityExtractor ReadableType9 = original.ReadableType9PrebuiltEntityExtractor - ReadableType9RegexEntityExtractor ReadableType9 = original.ReadableType9RegexEntityExtractor + ReadableType9RegularExpressionEntityExtractor ReadableType9 = original.ReadableType9RegularExpressionEntityExtractor ) type Status = original.Status @@ -263,6 +288,7 @@ type HierarchicalEntityExtractor = original.HierarchicalEntityExtractor type HierarchicalEntityModel = original.HierarchicalEntityModel type HierarchicalModel = original.HierarchicalModel type Int32 = original.Int32 +type Int64 = original.Int64 type IntentClassifier = original.IntentClassifier type IntentPrediction = original.IntentPrediction type IntentsSuggestionExample = original.IntentsSuggestionExample @@ -294,6 +320,7 @@ type ListLabeledUtterance = original.ListLabeledUtterance type ListModelInfoResponse = original.ListModelInfoResponse type ListModelTrainingInfo = original.ListModelTrainingInfo type ListPatternAnyEntityExtractor = original.ListPatternAnyEntityExtractor +type ListPatternFeatureInfo = original.ListPatternFeatureInfo type ListPatternRuleInfo = original.ListPatternRuleInfo type ListPhraseListFeatureInfo = original.ListPhraseListFeatureInfo type ListPrebuiltDomain = original.ListPrebuiltDomain @@ -360,41 +387,47 @@ type VersionsClient = original.VersionsClient type WordListBaseUpdateObject = original.WordListBaseUpdateObject type WordListObject = original.WordListObject -func New(endpoint string) BaseClient { - return original.New(endpoint) +func New() BaseClient { + return original.New() +} +func NewAppsClient() AppsClient { + return original.NewAppsClient() +} +func NewAzureAccountsClient() AzureAccountsClient { + return original.NewAzureAccountsClient() } -func NewAppsClient(endpoint string) AppsClient { - return original.NewAppsClient(endpoint) +func NewExamplesClient() ExamplesClient { + return original.NewExamplesClient() } -func NewAzureAccountsClient(endpoint string) AzureAccountsClient { - return original.NewAzureAccountsClient(endpoint) +func NewFeaturesClient() FeaturesClient { + return original.NewFeaturesClient() } -func NewExamplesClient(endpoint string) ExamplesClient { - return original.NewExamplesClient(endpoint) +func NewModelClient() ModelClient { + return original.NewModelClient() } -func NewFeaturesClient(endpoint string) FeaturesClient { - return original.NewFeaturesClient(endpoint) +func NewPatternClient() PatternClient { + return original.NewPatternClient() } -func NewModelClient(endpoint string) ModelClient { - return original.NewModelClient(endpoint) +func NewPermissionsClient() PermissionsClient { + return original.NewPermissionsClient() } -func NewPatternClient(endpoint string) PatternClient { - return original.NewPatternClient(endpoint) +func NewSettingsClient() SettingsClient { + return original.NewSettingsClient() } -func NewPermissionsClient(endpoint string) PermissionsClient { - return original.NewPermissionsClient(endpoint) +func NewTrainClient() TrainClient { + return original.NewTrainClient() } -func NewSettingsClient(endpoint string) SettingsClient { - return original.NewSettingsClient(endpoint) +func NewVersionsClient() VersionsClient { + return original.NewVersionsClient() } -func NewTrainClient(endpoint string) TrainClient { - return original.NewTrainClient(endpoint) +func NewWithoutDefaults() BaseClient { + return original.NewWithoutDefaults() } -func NewVersionsClient(endpoint string) VersionsClient { - return original.NewVersionsClient(endpoint) +func PossibleAzureCloudsValues() []AzureClouds { + return original.PossibleAzureCloudsValues() } -func NewWithoutDefaults(endpoint string) BaseClient { - return original.NewWithoutDefaults(endpoint) +func PossibleAzureRegionsValues() []AzureRegions { + return original.PossibleAzureRegionsValues() } func PossibleOperationStatusTypeValues() []OperationStatusType { return original.PossibleOperationStatusTypeValues() diff --git a/profiles/preview/graphrbac/graphrbac/models.go b/profiles/preview/graphrbac/graphrbac/models.go index ac6111d6ba3b..d3846552c93d 100644 --- a/profiles/preview/graphrbac/graphrbac/models.go +++ b/profiles/preview/graphrbac/graphrbac/models.go @@ -116,6 +116,7 @@ type ServicePrincipalCreateParameters = original.ServicePrincipalCreateParameter type ServicePrincipalListResult = original.ServicePrincipalListResult type ServicePrincipalListResultIterator = original.ServicePrincipalListResultIterator type ServicePrincipalListResultPage = original.ServicePrincipalListResultPage +type ServicePrincipalObjectResult = original.ServicePrincipalObjectResult type ServicePrincipalUpdateParameters = original.ServicePrincipalUpdateParameters type ServicePrincipalsClient = original.ServicePrincipalsClient type SignInName = original.SignInName diff --git a/profiles/preview/machinelearning/mgmt/webservices/models.go b/profiles/preview/machinelearning/mgmt/webservices/models.go index f3fb201bc630..fcd55b1a5df4 100644 --- a/profiles/preview/machinelearning/mgmt/webservices/models.go +++ b/profiles/preview/machinelearning/mgmt/webservices/models.go @@ -153,6 +153,8 @@ type PaginatedWebServicesListIterator = original.PaginatedWebServicesListIterato type PaginatedWebServicesListPage = original.PaginatedWebServicesListPage type Parameter = original.Parameter type PatchFuture = original.PatchFuture +type PatchedResource = original.PatchedResource +type PatchedWebService = original.PatchedWebService type Properties = original.Properties type PropertiesForGraph = original.PropertiesForGraph type RealtimeConfiguration = original.RealtimeConfiguration diff --git a/profiles/preview/preview/cognitiveservices/anomalydetector/anomalydetectorapi/models.go b/profiles/preview/preview/cognitiveservices/anomalydetector/anomalydetectorapi/models.go new file mode 100644 index 000000000000..59baf9caf7bb --- /dev/null +++ b/profiles/preview/preview/cognitiveservices/anomalydetector/anomalydetectorapi/models.go @@ -0,0 +1,24 @@ +// +build go1.9 + +// Copyright 2019 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This code was auto-generated by: +// github.com/Azure/azure-sdk-for-go/tools/profileBuilder + +package anomalydetectorapi + +import original "github.com/Azure/azure-sdk-for-go/services/preview/cognitiveservices/v1.0/anomalydetector/anomalydetectorapi" + +type BaseClientAPI = original.BaseClientAPI diff --git a/profiles/preview/preview/cognitiveservices/anomalydetector/models.go b/profiles/preview/preview/cognitiveservices/anomalydetector/models.go new file mode 100644 index 000000000000..5eb8fb76e4e3 --- /dev/null +++ b/profiles/preview/preview/cognitiveservices/anomalydetector/models.go @@ -0,0 +1,56 @@ +// +build go1.9 + +// Copyright 2019 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This code was auto-generated by: +// github.com/Azure/azure-sdk-for-go/tools/profileBuilder + +package anomalydetector + +import original "github.com/Azure/azure-sdk-for-go/services/preview/cognitiveservices/v1.0/anomalydetector" + +type Granularity = original.Granularity + +const ( + Daily Granularity = original.Daily + Hourly Granularity = original.Hourly + Minutely Granularity = original.Minutely + Monthly Granularity = original.Monthly + Weekly Granularity = original.Weekly + Yearly Granularity = original.Yearly +) + +type APIError = original.APIError +type BaseClient = original.BaseClient +type EntireDetectResponse = original.EntireDetectResponse +type LastDetectResponse = original.LastDetectResponse +type Point = original.Point +type Request = original.Request + +func New(endpoint string) BaseClient { + return original.New(endpoint) +} +func NewWithoutDefaults(endpoint string) BaseClient { + return original.NewWithoutDefaults(endpoint) +} +func PossibleGranularityValues() []Granularity { + return original.PossibleGranularityValues() +} +func UserAgent() string { + return original.UserAgent() + " profiles/preview" +} +func Version() string { + return original.Version() +} diff --git a/profiles/preview/preview/netapp/mgmt/netapp/models.go b/profiles/preview/preview/netapp/mgmt/netapp/models.go index b673531a8fdc..c834f58052fe 100644 --- a/profiles/preview/preview/netapp/mgmt/netapp/models.go +++ b/profiles/preview/preview/netapp/mgmt/netapp/models.go @@ -28,9 +28,9 @@ const ( type ServiceLevel = original.ServiceLevel const ( - Extreme ServiceLevel = original.Extreme Premium ServiceLevel = original.Premium Standard ServiceLevel = original.Standard + Ultra ServiceLevel = original.Ultra ) type Account = original.Account @@ -40,12 +40,14 @@ type AccountProperties = original.AccountProperties type AccountsClient = original.AccountsClient type AccountsCreateOrUpdateFuture = original.AccountsCreateOrUpdateFuture type AccountsDeleteFuture = original.AccountsDeleteFuture +type ActiveDirectories = original.ActiveDirectories type BaseClient = original.BaseClient type CapacityPool = original.CapacityPool type CapacityPoolList = original.CapacityPoolList type CapacityPoolPatch = original.CapacityPoolPatch type Dimension = original.Dimension type Error = original.Error +type ExportPolicyRule = original.ExportPolicyRule type MetricSpecification = original.MetricSpecification type MountTarget = original.MountTarget type MountTargetList = original.MountTargetList @@ -56,6 +58,7 @@ type OperationDisplay = original.OperationDisplay type OperationListResult = original.OperationListResult type OperationProperties = original.OperationProperties type OperationsClient = original.OperationsClient +type PoolPatchProperties = original.PoolPatchProperties type PoolProperties = original.PoolProperties type PoolsClient = original.PoolsClient type PoolsCreateOrUpdateFuture = original.PoolsCreateOrUpdateFuture diff --git a/services/cognitiveservices/v2.0/luis/authoring/apps.go b/services/cognitiveservices/v2.0/luis/authoring/apps.go index 419f412bc74a..9baaac161cbf 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/apps.go +++ b/services/cognitiveservices/v2.0/luis/authoring/apps.go @@ -33,16 +33,18 @@ type AppsClient struct { } // NewAppsClient creates an instance of the AppsClient client. -func NewAppsClient(endpoint string) AppsClient { - return AppsClient{New(endpoint)} +func NewAppsClient() AppsClient { + return AppsClient{New()} } // Add creates a new LUIS app. // Parameters: -// applicationCreateObject - a model containing Name, Description (optional), Culture, Usage Scenario +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints +// applicationCreateObject - an application containing Name, Description (optional), Culture, Usage Scenario // (optional), Domain (optional) and initial version ID (optional) of the application. Default value for the -// version ID is 0.1. Note: the culture cannot be changed after the app is created. -func (client AppsClient) Add(ctx context.Context, applicationCreateObject ApplicationCreateObject) (result UUID, err error) { +// version ID is "0.1". Note: the culture cannot be changed after the app is created. +func (client AppsClient) Add(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, applicationCreateObject ApplicationCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Add") defer func() { @@ -60,7 +62,7 @@ func (client AppsClient) Add(ctx context.Context, applicationCreateObject Applic return result, validation.NewError("authoring.AppsClient", "Add", err.Error()) } - req, err := client.AddPreparer(ctx, applicationCreateObject) + req, err := client.AddPreparer(ctx, azureRegion, azureCloud, applicationCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Add", nil, "Failure preparing request") return @@ -82,15 +84,16 @@ func (client AppsClient) Add(ctx context.Context, applicationCreateObject Applic } // AddPreparer prepares the Add request. -func (client AppsClient) AddPreparer(ctx context.Context, applicationCreateObject ApplicationCreateObject) (*http.Request, error) { +func (client AppsClient) AddPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, applicationCreateObject ApplicationCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/"), autorest.WithJSON(applicationCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -116,10 +119,12 @@ func (client AppsClient) AddResponder(resp *http.Response) (result UUID, err err return } -// AddCustomPrebuiltDomain adds a prebuilt domain along with its models as a new application. +// AddCustomPrebuiltDomain adds a prebuilt domain along with its intent and entity models as a new application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // prebuiltDomainCreateObject - a prebuilt domain create object containing the name and culture of the domain. -func (client AppsClient) AddCustomPrebuiltDomain(ctx context.Context, prebuiltDomainCreateObject PrebuiltDomainCreateObject) (result UUID, err error) { +func (client AppsClient) AddCustomPrebuiltDomain(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, prebuiltDomainCreateObject PrebuiltDomainCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.AddCustomPrebuiltDomain") defer func() { @@ -130,7 +135,7 @@ func (client AppsClient) AddCustomPrebuiltDomain(ctx context.Context, prebuiltDo tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddCustomPrebuiltDomainPreparer(ctx, prebuiltDomainCreateObject) + req, err := client.AddCustomPrebuiltDomainPreparer(ctx, azureRegion, azureCloud, prebuiltDomainCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "AddCustomPrebuiltDomain", nil, "Failure preparing request") return @@ -152,15 +157,16 @@ func (client AppsClient) AddCustomPrebuiltDomain(ctx context.Context, prebuiltDo } // AddCustomPrebuiltDomainPreparer prepares the AddCustomPrebuiltDomain request. -func (client AppsClient) AddCustomPrebuiltDomainPreparer(ctx context.Context, prebuiltDomainCreateObject PrebuiltDomainCreateObject) (*http.Request, error) { +func (client AppsClient) AddCustomPrebuiltDomainPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, prebuiltDomainCreateObject PrebuiltDomainCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/customprebuiltdomains"), autorest.WithJSON(prebuiltDomainCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -188,9 +194,11 @@ func (client AppsClient) AddCustomPrebuiltDomainResponder(resp *http.Response) ( // Delete deletes an application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // force - a flag to indicate whether to force an operation. -func (client AppsClient) Delete(ctx context.Context, appID uuid.UUID, force *bool) (result OperationStatus, err error) { +func (client AppsClient) Delete(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, force *bool) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Delete") defer func() { @@ -201,7 +209,7 @@ func (client AppsClient) Delete(ctx context.Context, appID uuid.UUID, force *boo tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePreparer(ctx, appID, force) + req, err := client.DeletePreparer(ctx, azureRegion, azureCloud, appID, force) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Delete", nil, "Failure preparing request") return @@ -223,9 +231,10 @@ func (client AppsClient) Delete(ctx context.Context, appID uuid.UUID, force *boo } // DeletePreparer prepares the Delete request. -func (client AppsClient) DeletePreparer(ctx context.Context, appID uuid.UUID, force *bool) (*http.Request, error) { +func (client AppsClient) DeletePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, force *bool) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -241,7 +250,7 @@ func (client AppsClient) DeletePreparer(ctx context.Context, appID uuid.UUID, fo preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -267,10 +276,12 @@ func (client AppsClient) DeleteResponder(resp *http.Response) (result OperationS return } -// DownloadQueryLogs gets the query logs of the past month for the application. +// DownloadQueryLogs gets the logs of the past month's endpoint queries for the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. -func (client AppsClient) DownloadQueryLogs(ctx context.Context, appID uuid.UUID) (result ReadCloser, err error) { +func (client AppsClient) DownloadQueryLogs(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID) (result ReadCloser, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DownloadQueryLogs") defer func() { @@ -281,7 +292,7 @@ func (client AppsClient) DownloadQueryLogs(ctx context.Context, appID uuid.UUID) tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DownloadQueryLogsPreparer(ctx, appID) + req, err := client.DownloadQueryLogsPreparer(ctx, azureRegion, azureCloud, appID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "DownloadQueryLogs", nil, "Failure preparing request") return @@ -303,9 +314,10 @@ func (client AppsClient) DownloadQueryLogs(ctx context.Context, appID uuid.UUID) } // DownloadQueryLogsPreparer prepares the DownloadQueryLogs request. -func (client AppsClient) DownloadQueryLogsPreparer(ctx context.Context, appID uuid.UUID) (*http.Request, error) { +func (client AppsClient) DownloadQueryLogsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -314,7 +326,7 @@ func (client AppsClient) DownloadQueryLogsPreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/querylogs", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -340,8 +352,10 @@ func (client AppsClient) DownloadQueryLogsResponder(resp *http.Response) (result // Get gets the application info. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. -func (client AppsClient) Get(ctx context.Context, appID uuid.UUID) (result ApplicationInfoResponse, err error) { +func (client AppsClient) Get(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID) (result ApplicationInfoResponse, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Get") defer func() { @@ -352,7 +366,7 @@ func (client AppsClient) Get(ctx context.Context, appID uuid.UUID) (result Appli tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPreparer(ctx, appID) + req, err := client.GetPreparer(ctx, azureRegion, azureCloud, appID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Get", nil, "Failure preparing request") return @@ -374,9 +388,10 @@ func (client AppsClient) Get(ctx context.Context, appID uuid.UUID) (result Appli } // GetPreparer prepares the Get request. -func (client AppsClient) GetPreparer(ctx context.Context, appID uuid.UUID) (*http.Request, error) { +func (client AppsClient) GetPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -385,7 +400,7 @@ func (client AppsClient) GetPreparer(ctx context.Context, appID uuid.UUID) (*htt preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -410,10 +425,12 @@ func (client AppsClient) GetResponder(resp *http.Response) (result ApplicationIn return } -// GetPublishSettings get the application publish settings. +// GetPublishSettings get the application publish settings including 'UseAllTrainingData'. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. -func (client AppsClient) GetPublishSettings(ctx context.Context, appID uuid.UUID) (result PublishSettings, err error) { +func (client AppsClient) GetPublishSettings(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID) (result PublishSettings, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPublishSettings") defer func() { @@ -424,7 +441,7 @@ func (client AppsClient) GetPublishSettings(ctx context.Context, appID uuid.UUID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPublishSettingsPreparer(ctx, appID) + req, err := client.GetPublishSettingsPreparer(ctx, azureRegion, azureCloud, appID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "GetPublishSettings", nil, "Failure preparing request") return @@ -446,9 +463,10 @@ func (client AppsClient) GetPublishSettings(ctx context.Context, appID uuid.UUID } // GetPublishSettingsPreparer prepares the GetPublishSettings request. -func (client AppsClient) GetPublishSettingsPreparer(ctx context.Context, appID uuid.UUID) (*http.Request, error) { +func (client AppsClient) GetPublishSettingsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -457,7 +475,7 @@ func (client AppsClient) GetPublishSettingsPreparer(ctx context.Context, appID u preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/publishsettings", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -482,10 +500,12 @@ func (client AppsClient) GetPublishSettingsResponder(resp *http.Response) (resul return } -// GetSettings get the application settings. +// GetSettings get the application settings including 'UseAllTrainingData'. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. -func (client AppsClient) GetSettings(ctx context.Context, appID uuid.UUID) (result ApplicationSettings, err error) { +func (client AppsClient) GetSettings(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID) (result ApplicationSettings, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSettings") defer func() { @@ -496,7 +516,7 @@ func (client AppsClient) GetSettings(ctx context.Context, appID uuid.UUID) (resu tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetSettingsPreparer(ctx, appID) + req, err := client.GetSettingsPreparer(ctx, azureRegion, azureCloud, appID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "GetSettings", nil, "Failure preparing request") return @@ -518,9 +538,10 @@ func (client AppsClient) GetSettings(ctx context.Context, appID uuid.UUID) (resu } // GetSettingsPreparer prepares the GetSettings request. -func (client AppsClient) GetSettingsPreparer(ctx context.Context, appID uuid.UUID) (*http.Request, error) { +func (client AppsClient) GetSettingsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -529,7 +550,7 @@ func (client AppsClient) GetSettingsPreparer(ctx context.Context, appID uuid.UUI preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/settings", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -554,12 +575,14 @@ func (client AppsClient) GetSettingsResponder(resp *http.Response) (result Appli return } -// Import imports an application to LUIS, the application's structure should be included in the request body. +// Import imports an application to LUIS, the application's structure is included in the request body. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // luisApp - a LUIS application structure. // appName - the application name to create. If not specified, the application name will be read from the -// imported object. -func (client AppsClient) Import(ctx context.Context, luisApp LuisApp, appName string) (result UUID, err error) { +// imported object. If the application name already exists, an error is returned. +func (client AppsClient) Import(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, luisApp LuisApp, appName string) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Import") defer func() { @@ -570,7 +593,7 @@ func (client AppsClient) Import(ctx context.Context, luisApp LuisApp, appName st tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ImportPreparer(ctx, luisApp, appName) + req, err := client.ImportPreparer(ctx, azureRegion, azureCloud, luisApp, appName) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Import", nil, "Failure preparing request") return @@ -592,9 +615,10 @@ func (client AppsClient) Import(ctx context.Context, luisApp LuisApp, appName st } // ImportPreparer prepares the Import request. -func (client AppsClient) ImportPreparer(ctx context.Context, luisApp LuisApp, appName string) (*http.Request, error) { +func (client AppsClient) ImportPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, luisApp LuisApp, appName string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } queryParameters := map[string]interface{}{} @@ -605,7 +629,7 @@ func (client AppsClient) ImportPreparer(ctx context.Context, luisApp LuisApp, ap preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/import"), autorest.WithJSON(luisApp), autorest.WithQueryParameters(queryParameters)) @@ -632,11 +656,13 @@ func (client AppsClient) ImportResponder(resp *http.Response) (result UUID, err return } -// List lists all of the user applications. +// List lists all of the user's applications. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // skip - the number of entries to skip. Default value is 0. // take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client AppsClient) List(ctx context.Context, skip *int32, take *int32) (result ListApplicationInfoResponse, err error) { +func (client AppsClient) List(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, skip *int32, take *int32) (result ListApplicationInfoResponse, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.List") defer func() { @@ -659,7 +685,7 @@ func (client AppsClient) List(ctx context.Context, skip *int32, take *int32) (re return result, validation.NewError("authoring.AppsClient", "List", err.Error()) } - req, err := client.ListPreparer(ctx, skip, take) + req, err := client.ListPreparer(ctx, azureRegion, azureCloud, skip, take) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "List", nil, "Failure preparing request") return @@ -681,9 +707,10 @@ func (client AppsClient) List(ctx context.Context, skip *int32, take *int32) (re } // ListPreparer prepares the List request. -func (client AppsClient) ListPreparer(ctx context.Context, skip *int32, take *int32) (*http.Request, error) { +func (client AppsClient) ListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } queryParameters := map[string]interface{}{} @@ -700,7 +727,7 @@ func (client AppsClient) ListPreparer(ctx context.Context, skip *int32, take *in preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/"), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -727,7 +754,10 @@ func (client AppsClient) ListResponder(resp *http.Response) (result ListApplicat } // ListAvailableCustomPrebuiltDomains gets all the available custom prebuilt domains for all cultures. -func (client AppsClient) ListAvailableCustomPrebuiltDomains(ctx context.Context) (result ListPrebuiltDomain, err error) { +// Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints +func (client AppsClient) ListAvailableCustomPrebuiltDomains(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds) (result ListPrebuiltDomain, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAvailableCustomPrebuiltDomains") defer func() { @@ -738,7 +768,7 @@ func (client AppsClient) ListAvailableCustomPrebuiltDomains(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ListAvailableCustomPrebuiltDomainsPreparer(ctx) + req, err := client.ListAvailableCustomPrebuiltDomainsPreparer(ctx, azureRegion, azureCloud) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListAvailableCustomPrebuiltDomains", nil, "Failure preparing request") return @@ -760,14 +790,15 @@ func (client AppsClient) ListAvailableCustomPrebuiltDomains(ctx context.Context) } // ListAvailableCustomPrebuiltDomainsPreparer prepares the ListAvailableCustomPrebuiltDomains request. -func (client AppsClient) ListAvailableCustomPrebuiltDomainsPreparer(ctx context.Context) (*http.Request, error) { +func (client AppsClient) ListAvailableCustomPrebuiltDomainsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/customprebuiltdomains")) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -792,10 +823,12 @@ func (client AppsClient) ListAvailableCustomPrebuiltDomainsResponder(resp *http. return } -// ListAvailableCustomPrebuiltDomainsForCulture gets all the available custom prebuilt domains for a specific culture. +// ListAvailableCustomPrebuiltDomainsForCulture gets all the available prebuilt domains for a specific culture. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // culture - culture. -func (client AppsClient) ListAvailableCustomPrebuiltDomainsForCulture(ctx context.Context, culture string) (result ListPrebuiltDomain, err error) { +func (client AppsClient) ListAvailableCustomPrebuiltDomainsForCulture(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, culture string) (result ListPrebuiltDomain, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAvailableCustomPrebuiltDomainsForCulture") defer func() { @@ -806,7 +839,7 @@ func (client AppsClient) ListAvailableCustomPrebuiltDomainsForCulture(ctx contex tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ListAvailableCustomPrebuiltDomainsForCulturePreparer(ctx, culture) + req, err := client.ListAvailableCustomPrebuiltDomainsForCulturePreparer(ctx, azureRegion, azureCloud, culture) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListAvailableCustomPrebuiltDomainsForCulture", nil, "Failure preparing request") return @@ -828,9 +861,10 @@ func (client AppsClient) ListAvailableCustomPrebuiltDomainsForCulture(ctx contex } // ListAvailableCustomPrebuiltDomainsForCulturePreparer prepares the ListAvailableCustomPrebuiltDomainsForCulture request. -func (client AppsClient) ListAvailableCustomPrebuiltDomainsForCulturePreparer(ctx context.Context, culture string) (*http.Request, error) { +func (client AppsClient) ListAvailableCustomPrebuiltDomainsForCulturePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, culture string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -839,7 +873,7 @@ func (client AppsClient) ListAvailableCustomPrebuiltDomainsForCulturePreparer(ct preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/customprebuiltdomains/{culture}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -865,7 +899,10 @@ func (client AppsClient) ListAvailableCustomPrebuiltDomainsForCultureResponder(r } // ListCortanaEndpoints gets the endpoint URLs for the prebuilt Cortana applications. -func (client AppsClient) ListCortanaEndpoints(ctx context.Context) (result PersonalAssistantsResponse, err error) { +// Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints +func (client AppsClient) ListCortanaEndpoints(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds) (result PersonalAssistantsResponse, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListCortanaEndpoints") defer func() { @@ -876,7 +913,7 @@ func (client AppsClient) ListCortanaEndpoints(ctx context.Context) (result Perso tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ListCortanaEndpointsPreparer(ctx) + req, err := client.ListCortanaEndpointsPreparer(ctx, azureRegion, azureCloud) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListCortanaEndpoints", nil, "Failure preparing request") return @@ -898,14 +935,15 @@ func (client AppsClient) ListCortanaEndpoints(ctx context.Context) (result Perso } // ListCortanaEndpointsPreparer prepares the ListCortanaEndpoints request. -func (client AppsClient) ListCortanaEndpointsPreparer(ctx context.Context) (*http.Request, error) { +func (client AppsClient) ListCortanaEndpointsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/assistants")) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -931,7 +969,10 @@ func (client AppsClient) ListCortanaEndpointsResponder(resp *http.Response) (res } // ListDomains gets the available application domains. -func (client AppsClient) ListDomains(ctx context.Context) (result ListString, err error) { +// Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints +func (client AppsClient) ListDomains(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds) (result ListString, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomains") defer func() { @@ -942,7 +983,7 @@ func (client AppsClient) ListDomains(ctx context.Context) (result ListString, er tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ListDomainsPreparer(ctx) + req, err := client.ListDomainsPreparer(ctx, azureRegion, azureCloud) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListDomains", nil, "Failure preparing request") return @@ -964,14 +1005,15 @@ func (client AppsClient) ListDomains(ctx context.Context) (result ListString, er } // ListDomainsPreparer prepares the ListDomains request. -func (client AppsClient) ListDomainsPreparer(ctx context.Context) (*http.Request, error) { +func (client AppsClient) ListDomainsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/domains")) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -998,8 +1040,10 @@ func (client AppsClient) ListDomainsResponder(resp *http.Response) (result ListS // ListEndpoints returns the available endpoint deployment regions and URLs. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. -func (client AppsClient) ListEndpoints(ctx context.Context, appID uuid.UUID) (result SetString, err error) { +func (client AppsClient) ListEndpoints(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID) (result SetString, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListEndpoints") defer func() { @@ -1010,7 +1054,7 @@ func (client AppsClient) ListEndpoints(ctx context.Context, appID uuid.UUID) (re tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ListEndpointsPreparer(ctx, appID) + req, err := client.ListEndpointsPreparer(ctx, azureRegion, azureCloud, appID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListEndpoints", nil, "Failure preparing request") return @@ -1032,9 +1076,10 @@ func (client AppsClient) ListEndpoints(ctx context.Context, appID uuid.UUID) (re } // ListEndpointsPreparer prepares the ListEndpoints request. -func (client AppsClient) ListEndpointsPreparer(ctx context.Context, appID uuid.UUID) (*http.Request, error) { +func (client AppsClient) ListEndpointsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1043,7 +1088,7 @@ func (client AppsClient) ListEndpointsPreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/endpoints", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1068,8 +1113,12 @@ func (client AppsClient) ListEndpointsResponder(resp *http.Response) (result Set return } -// ListSupportedCultures gets the supported application cultures. -func (client AppsClient) ListSupportedCultures(ctx context.Context) (result ListAvailableCulture, err error) { +// ListSupportedCultures gets a list of supported cultures. Cultures are equivalent to the written language and locale. +// For example,"en-us" represents the U.S. variation of English. +// Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints +func (client AppsClient) ListSupportedCultures(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds) (result ListAvailableCulture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSupportedCultures") defer func() { @@ -1080,7 +1129,7 @@ func (client AppsClient) ListSupportedCultures(ctx context.Context) (result List tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ListSupportedCulturesPreparer(ctx) + req, err := client.ListSupportedCulturesPreparer(ctx, azureRegion, azureCloud) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListSupportedCultures", nil, "Failure preparing request") return @@ -1102,14 +1151,15 @@ func (client AppsClient) ListSupportedCultures(ctx context.Context) (result List } // ListSupportedCulturesPreparer prepares the ListSupportedCultures request. -func (client AppsClient) ListSupportedCulturesPreparer(ctx context.Context) (*http.Request, error) { +func (client AppsClient) ListSupportedCulturesPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/cultures")) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1135,7 +1185,10 @@ func (client AppsClient) ListSupportedCulturesResponder(resp *http.Response) (re } // ListUsageScenarios gets the application available usage scenarios. -func (client AppsClient) ListUsageScenarios(ctx context.Context) (result ListString, err error) { +// Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints +func (client AppsClient) ListUsageScenarios(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds) (result ListString, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListUsageScenarios") defer func() { @@ -1146,7 +1199,7 @@ func (client AppsClient) ListUsageScenarios(ctx context.Context) (result ListStr tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ListUsageScenariosPreparer(ctx) + req, err := client.ListUsageScenariosPreparer(ctx, azureRegion, azureCloud) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "ListUsageScenarios", nil, "Failure preparing request") return @@ -1168,14 +1221,15 @@ func (client AppsClient) ListUsageScenarios(ctx context.Context) (result ListStr } // ListUsageScenariosPreparer prepares the ListUsageScenarios request. -func (client AppsClient) ListUsageScenariosPreparer(ctx context.Context) (*http.Request, error) { +func (client AppsClient) ListUsageScenariosPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/usagescenarios")) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1200,11 +1254,14 @@ func (client AppsClient) ListUsageScenariosResponder(resp *http.Response) (resul return } -// PackagePublishedApplicationAsGzip packages published LUIS application as GZip. +// PackagePublishedApplicationAsGzip packages a published LUIS application as a GZip file to be used in the LUIS +// container. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // slotName - the publishing slot name. -func (client AppsClient) PackagePublishedApplicationAsGzip(ctx context.Context, appID uuid.UUID, slotName uuid.UUID) (result ReadCloser, err error) { +func (client AppsClient) PackagePublishedApplicationAsGzip(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, slotName string) (result ReadCloser, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.PackagePublishedApplicationAsGzip") defer func() { @@ -1215,7 +1272,7 @@ func (client AppsClient) PackagePublishedApplicationAsGzip(ctx context.Context, tracing.EndSpan(ctx, sc, err) }() } - req, err := client.PackagePublishedApplicationAsGzipPreparer(ctx, appID, slotName) + req, err := client.PackagePublishedApplicationAsGzipPreparer(ctx, azureRegion, azureCloud, appID, slotName) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "PackagePublishedApplicationAsGzip", nil, "Failure preparing request") return @@ -1237,9 +1294,10 @@ func (client AppsClient) PackagePublishedApplicationAsGzip(ctx context.Context, } // PackagePublishedApplicationAsGzipPreparer prepares the PackagePublishedApplicationAsGzip request. -func (client AppsClient) PackagePublishedApplicationAsGzipPreparer(ctx context.Context, appID uuid.UUID, slotName uuid.UUID) (*http.Request, error) { +func (client AppsClient) PackagePublishedApplicationAsGzipPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, slotName string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1249,7 +1307,7 @@ func (client AppsClient) PackagePublishedApplicationAsGzipPreparer(ctx context.C preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/package/{appId}/slot/{slotName}/gzip", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1273,11 +1331,13 @@ func (client AppsClient) PackagePublishedApplicationAsGzipResponder(resp *http.R return } -// PackageTrainedApplicationAsGzip packages trained LUIS application as GZip. +// PackageTrainedApplicationAsGzip packages trained LUIS application as GZip file to be used in the LUIS container. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -func (client AppsClient) PackageTrainedApplicationAsGzip(ctx context.Context, appID uuid.UUID, versionID string) (result ReadCloser, err error) { +func (client AppsClient) PackageTrainedApplicationAsGzip(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (result ReadCloser, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.PackageTrainedApplicationAsGzip") defer func() { @@ -1288,7 +1348,7 @@ func (client AppsClient) PackageTrainedApplicationAsGzip(ctx context.Context, ap tracing.EndSpan(ctx, sc, err) }() } - req, err := client.PackageTrainedApplicationAsGzipPreparer(ctx, appID, versionID) + req, err := client.PackageTrainedApplicationAsGzipPreparer(ctx, azureRegion, azureCloud, appID, versionID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "PackageTrainedApplicationAsGzip", nil, "Failure preparing request") return @@ -1310,9 +1370,10 @@ func (client AppsClient) PackageTrainedApplicationAsGzip(ctx context.Context, ap } // PackageTrainedApplicationAsGzipPreparer prepares the PackageTrainedApplicationAsGzip request. -func (client AppsClient) PackageTrainedApplicationAsGzipPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) { +func (client AppsClient) PackageTrainedApplicationAsGzipPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1322,7 +1383,7 @@ func (client AppsClient) PackageTrainedApplicationAsGzipPreparer(ctx context.Con preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/package/{appId}/versions/{versionId}/gzip", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1348,10 +1409,12 @@ func (client AppsClient) PackageTrainedApplicationAsGzipResponder(resp *http.Res // Publish publishes a specific version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // applicationPublishObject - the application publish object. The region is the target region that the // application is published to. -func (client AppsClient) Publish(ctx context.Context, appID uuid.UUID, applicationPublishObject ApplicationPublishObject) (result ProductionOrStagingEndpointInfo, err error) { +func (client AppsClient) Publish(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, applicationPublishObject ApplicationPublishObject) (result ProductionOrStagingEndpointInfo, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Publish") defer func() { @@ -1362,7 +1425,7 @@ func (client AppsClient) Publish(ctx context.Context, appID uuid.UUID, applicati tracing.EndSpan(ctx, sc, err) }() } - req, err := client.PublishPreparer(ctx, appID, applicationPublishObject) + req, err := client.PublishPreparer(ctx, azureRegion, azureCloud, appID, applicationPublishObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Publish", nil, "Failure preparing request") return @@ -1384,9 +1447,10 @@ func (client AppsClient) Publish(ctx context.Context, appID uuid.UUID, applicati } // PublishPreparer prepares the Publish request. -func (client AppsClient) PublishPreparer(ctx context.Context, appID uuid.UUID, applicationPublishObject ApplicationPublishObject) (*http.Request, error) { +func (client AppsClient) PublishPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, applicationPublishObject ApplicationPublishObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1396,7 +1460,7 @@ func (client AppsClient) PublishPreparer(ctx context.Context, appID uuid.UUID, a preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/publish", pathParameters), autorest.WithJSON(applicationPublishObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1424,9 +1488,11 @@ func (client AppsClient) PublishResponder(resp *http.Response) (result Productio // Update updates the name or description of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // applicationUpdateObject - a model containing Name and Description of the application. -func (client AppsClient) Update(ctx context.Context, appID uuid.UUID, applicationUpdateObject ApplicationUpdateObject) (result OperationStatus, err error) { +func (client AppsClient) Update(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, applicationUpdateObject ApplicationUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Update") defer func() { @@ -1437,7 +1503,7 @@ func (client AppsClient) Update(ctx context.Context, appID uuid.UUID, applicatio tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdatePreparer(ctx, appID, applicationUpdateObject) + req, err := client.UpdatePreparer(ctx, azureRegion, azureCloud, appID, applicationUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "Update", nil, "Failure preparing request") return @@ -1459,9 +1525,10 @@ func (client AppsClient) Update(ctx context.Context, appID uuid.UUID, applicatio } // UpdatePreparer prepares the Update request. -func (client AppsClient) UpdatePreparer(ctx context.Context, appID uuid.UUID, applicationUpdateObject ApplicationUpdateObject) (*http.Request, error) { +func (client AppsClient) UpdatePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, applicationUpdateObject ApplicationUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1471,7 +1538,7 @@ func (client AppsClient) UpdatePreparer(ctx context.Context, appID uuid.UUID, ap preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}", pathParameters), autorest.WithJSON(applicationUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1497,11 +1564,13 @@ func (client AppsClient) UpdateResponder(resp *http.Response) (result OperationS return } -// UpdatePublishSettings updates the application publish settings. +// UpdatePublishSettings updates the application publish settings including 'UseAllTrainingData'. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // publishSettingUpdateObject - an object containing the new publish application settings. -func (client AppsClient) UpdatePublishSettings(ctx context.Context, appID uuid.UUID, publishSettingUpdateObject PublishSettingUpdateObject) (result OperationStatus, err error) { +func (client AppsClient) UpdatePublishSettings(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, publishSettingUpdateObject PublishSettingUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdatePublishSettings") defer func() { @@ -1512,7 +1581,7 @@ func (client AppsClient) UpdatePublishSettings(ctx context.Context, appID uuid.U tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdatePublishSettingsPreparer(ctx, appID, publishSettingUpdateObject) + req, err := client.UpdatePublishSettingsPreparer(ctx, azureRegion, azureCloud, appID, publishSettingUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "UpdatePublishSettings", nil, "Failure preparing request") return @@ -1534,9 +1603,10 @@ func (client AppsClient) UpdatePublishSettings(ctx context.Context, appID uuid.U } // UpdatePublishSettingsPreparer prepares the UpdatePublishSettings request. -func (client AppsClient) UpdatePublishSettingsPreparer(ctx context.Context, appID uuid.UUID, publishSettingUpdateObject PublishSettingUpdateObject) (*http.Request, error) { +func (client AppsClient) UpdatePublishSettingsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, publishSettingUpdateObject PublishSettingUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1546,7 +1616,7 @@ func (client AppsClient) UpdatePublishSettingsPreparer(ctx context.Context, appI preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/publishsettings", pathParameters), autorest.WithJSON(publishSettingUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1572,11 +1642,13 @@ func (client AppsClient) UpdatePublishSettingsResponder(resp *http.Response) (re return } -// UpdateSettings updates the application settings. +// UpdateSettings updates the application settings including 'UseAllTrainingData'. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // applicationSettingUpdateObject - an object containing the new application settings. -func (client AppsClient) UpdateSettings(ctx context.Context, appID uuid.UUID, applicationSettingUpdateObject ApplicationSettingUpdateObject) (result OperationStatus, err error) { +func (client AppsClient) UpdateSettings(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, applicationSettingUpdateObject ApplicationSettingUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSettings") defer func() { @@ -1587,7 +1659,7 @@ func (client AppsClient) UpdateSettings(ctx context.Context, appID uuid.UUID, ap tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateSettingsPreparer(ctx, appID, applicationSettingUpdateObject) + req, err := client.UpdateSettingsPreparer(ctx, azureRegion, azureCloud, appID, applicationSettingUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AppsClient", "UpdateSettings", nil, "Failure preparing request") return @@ -1609,9 +1681,10 @@ func (client AppsClient) UpdateSettings(ctx context.Context, appID uuid.UUID, ap } // UpdateSettingsPreparer prepares the UpdateSettings request. -func (client AppsClient) UpdateSettingsPreparer(ctx context.Context, appID uuid.UUID, applicationSettingUpdateObject ApplicationSettingUpdateObject) (*http.Request, error) { +func (client AppsClient) UpdateSettingsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, applicationSettingUpdateObject ApplicationSettingUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1621,7 +1694,7 @@ func (client AppsClient) UpdateSettingsPreparer(ctx context.Context, appID uuid. preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/settings", pathParameters), autorest.WithJSON(applicationSettingUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) diff --git a/services/cognitiveservices/v2.0/luis/authoring/authoringapi/interfaces.go b/services/cognitiveservices/v2.0/luis/authoring/authoringapi/interfaces.go index 3ac74b39d11d..9a1b922dedfb 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/authoringapi/interfaces.go +++ b/services/cognitiveservices/v2.0/luis/authoring/authoringapi/interfaces.go @@ -25,226 +25,227 @@ import ( // FeaturesClientAPI contains the set of methods on the FeaturesClient type. type FeaturesClientAPI interface { - AddPhraseList(ctx context.Context, appID uuid.UUID, versionID string, phraselistCreateObject authoring.PhraselistCreateObject) (result authoring.Int32, err error) - DeletePhraseList(ctx context.Context, appID uuid.UUID, versionID string, phraselistID int32) (result authoring.OperationStatus, err error) - GetPhraseList(ctx context.Context, appID uuid.UUID, versionID string, phraselistID int32) (result authoring.PhraseListFeatureInfo, err error) - List(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.FeaturesResponseObject, err error) - ListPhraseLists(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListPhraseListFeatureInfo, err error) - UpdatePhraseList(ctx context.Context, appID uuid.UUID, versionID string, phraselistID int32, phraselistUpdateObject *authoring.PhraselistUpdateObject) (result authoring.OperationStatus, err error) + AddPhraseList(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, phraselistCreateObject authoring.PhraselistCreateObject) (result authoring.Int32, err error) + DeletePhraseList(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, phraselistID int32) (result authoring.OperationStatus, err error) + GetPhraseList(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, phraselistID int32) (result authoring.PhraseListFeatureInfo, err error) + List(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.FeaturesResponseObject, err error) + ListApplicationVersionPatternFeatures(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListPatternFeatureInfo, err error) + ListPhraseLists(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListPhraseListFeatureInfo, err error) + UpdatePhraseList(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, phraselistID int32, phraselistUpdateObject *authoring.PhraselistUpdateObject) (result authoring.OperationStatus, err error) } var _ FeaturesClientAPI = (*authoring.FeaturesClient)(nil) // ExamplesClientAPI contains the set of methods on the ExamplesClient type. type ExamplesClientAPI interface { - Add(ctx context.Context, appID uuid.UUID, versionID string, exampleLabelObject authoring.ExampleLabelObject) (result authoring.LabelExampleResponse, err error) - Batch(ctx context.Context, appID uuid.UUID, versionID string, exampleLabelObjectArray []authoring.ExampleLabelObject) (result authoring.ListBatchLabelExample, err error) - Delete(ctx context.Context, appID uuid.UUID, versionID string, exampleID int32) (result authoring.OperationStatus, err error) - List(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListLabeledUtterance, err error) + Add(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, exampleLabelObject authoring.ExampleLabelObject) (result authoring.LabelExampleResponse, err error) + Batch(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, exampleLabelObjectArray []authoring.ExampleLabelObject) (result authoring.ListBatchLabelExample, err error) + Delete(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, exampleID int32) (result authoring.OperationStatus, err error) + List(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListLabeledUtterance, err error) } var _ ExamplesClientAPI = (*authoring.ExamplesClient)(nil) // ModelClientAPI contains the set of methods on the ModelClient type. type ModelClientAPI interface { - AddClosedList(ctx context.Context, appID uuid.UUID, versionID string, closedListModelCreateObject authoring.ClosedListModelCreateObject) (result authoring.UUID, err error) - AddCompositeEntity(ctx context.Context, appID uuid.UUID, versionID string, compositeModelCreateObject authoring.CompositeEntityModel) (result authoring.UUID, err error) - AddCompositeEntityChild(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeChildModelCreateObject authoring.CompositeChildModelCreateObject) (result authoring.UUID, err error) - AddCustomPrebuiltDomain(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainObject authoring.PrebuiltDomainCreateBaseObject) (result authoring.ListUUID, err error) - AddCustomPrebuiltEntity(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject authoring.PrebuiltDomainModelCreateObject) (result authoring.UUID, err error) - AddCustomPrebuiltIntent(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject authoring.PrebuiltDomainModelCreateObject) (result authoring.UUID, err error) - AddEntity(ctx context.Context, appID uuid.UUID, versionID string, modelCreateObject authoring.ModelCreateObject) (result authoring.UUID, err error) - AddExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, item authoring.ExplicitListItemCreateObject) (result authoring.Int32, err error) - AddHierarchicalEntity(ctx context.Context, appID uuid.UUID, versionID string, hierarchicalModelCreateObject authoring.HierarchicalEntityModel) (result authoring.UUID, err error) - AddHierarchicalEntityChild(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalChildModelCreateObject authoring.HierarchicalChildModelCreateObject) (result authoring.UUID, err error) - AddIntent(ctx context.Context, appID uuid.UUID, versionID string, intentCreateObject authoring.ModelCreateObject) (result authoring.UUID, err error) - AddPrebuilt(ctx context.Context, appID uuid.UUID, versionID string, prebuiltExtractorNames []string) (result authoring.ListPrebuiltEntityExtractor, err error) - AddSubList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, wordListCreateObject authoring.WordListObject) (result authoring.Int32, err error) - CreateClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) - CreateCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) - CreateCustomPrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) - CreateEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) - CreateHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) - CreatePatternAnyEntityModel(ctx context.Context, appID uuid.UUID, versionID string, extractorCreateObject authoring.PatternAnyModelCreateObject) (result authoring.UUID, err error) - CreatePatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) - CreatePrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) - CreateRegexEntityModel(ctx context.Context, appID uuid.UUID, versionID string, regexEntityExtractorCreateObj authoring.RegexModelCreateObject) (result authoring.UUID, err error) - CreateRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) - DeleteClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (result authoring.OperationStatus, err error) - DeleteClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) - DeleteCompositeEntity(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result authoring.OperationStatus, err error) - DeleteCompositeEntityChild(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, cChildID uuid.UUID) (result authoring.OperationStatus, err error) - DeleteCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) - DeleteCustomEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) - DeleteCustomPrebuiltDomain(ctx context.Context, appID uuid.UUID, versionID string, domainName string) (result authoring.OperationStatus, err error) - DeleteEntity(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.OperationStatus, err error) - DeleteEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) - DeleteExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (result authoring.OperationStatus, err error) - DeleteHierarchicalEntity(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result authoring.OperationStatus, err error) - DeleteHierarchicalEntityChild(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (result authoring.OperationStatus, err error) - DeleteHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) - DeleteIntent(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, deleteUtterances *bool) (result authoring.OperationStatus, err error) - DeletePatternAnyEntityModel(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.OperationStatus, err error) - DeletePatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) - DeletePrebuilt(ctx context.Context, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (result authoring.OperationStatus, err error) - DeletePrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) - DeleteRegexEntityModel(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (result authoring.OperationStatus, err error) - DeleteRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) - DeleteSubList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int32) (result authoring.OperationStatus, err error) - ExamplesMethod(ctx context.Context, appID uuid.UUID, versionID string, modelID string, skip *int32, take *int32) (result authoring.ListLabelTextObject, err error) - GetClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (result authoring.ClosedListEntityExtractor, err error) - GetClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) - GetClosedListEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.ListEntityRole, err error) - GetCompositeEntity(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result authoring.CompositeEntityExtractor, err error) - GetCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) - GetCompositeEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result authoring.ListEntityRole, err error) - GetCustomEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) - GetCustomPrebuiltEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.ListEntityRole, err error) - GetEntity(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.EntityExtractor, err error) - GetEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) - GetEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.ListEntityRole, err error) - GetEntitySuggestions(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, take *int32) (result authoring.ListEntitiesSuggestionExample, err error) - GetExplicitList(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.ListExplicitListItem, err error) - GetExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (result authoring.ExplicitListItem, err error) - GetHierarchicalEntity(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result authoring.HierarchicalEntityExtractor, err error) - GetHierarchicalEntityChild(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (result authoring.HierarchicalChildEntity, err error) - GetHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) - GetHierarchicalEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result authoring.ListEntityRole, err error) - GetIntent(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID) (result authoring.IntentClassifier, err error) - GetIntentSuggestions(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, take *int32) (result authoring.ListIntentsSuggestionExample, err error) - GetPatternAnyEntityInfo(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.PatternAnyEntityExtractor, err error) - GetPatternAnyEntityInfos(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListPatternAnyEntityExtractor, err error) - GetPatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) - GetPatternAnyEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.ListEntityRole, err error) - GetPrebuilt(ctx context.Context, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (result authoring.PrebuiltEntityExtractor, err error) - GetPrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) - GetPrebuiltEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.ListEntityRole, err error) - GetRegexEntityEntityInfo(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (result authoring.RegexEntityExtractor, err error) - GetRegexEntityInfos(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListRegexEntityExtractor, err error) - GetRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) - GetRegexEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.ListEntityRole, err error) - ListClosedLists(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListClosedListEntityExtractor, err error) - ListCompositeEntities(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListCompositeEntityExtractor, err error) - ListCustomPrebuiltEntities(ctx context.Context, appID uuid.UUID, versionID string) (result authoring.ListEntityExtractor, err error) - ListCustomPrebuiltIntents(ctx context.Context, appID uuid.UUID, versionID string) (result authoring.ListIntentClassifier, err error) - ListCustomPrebuiltModels(ctx context.Context, appID uuid.UUID, versionID string) (result authoring.ListCustomPrebuiltModel, err error) - ListEntities(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListEntityExtractor, err error) - ListHierarchicalEntities(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListHierarchicalEntityExtractor, err error) - ListIntents(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListIntentClassifier, err error) - ListModels(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListModelInfoResponse, err error) - ListPrebuiltEntities(ctx context.Context, appID uuid.UUID, versionID string) (result authoring.ListAvailablePrebuiltEntityModel, err error) - ListPrebuilts(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListPrebuiltEntityExtractor, err error) - PatchClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelPatchObject authoring.ClosedListModelPatchObject) (result authoring.OperationStatus, err error) - UpdateClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelUpdateObject authoring.ClosedListModelUpdateObject) (result authoring.OperationStatus, err error) - UpdateClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) - UpdateCompositeEntity(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeModelUpdateObject authoring.CompositeEntityModel) (result authoring.OperationStatus, err error) - UpdateCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) - UpdateCustomPrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) - UpdateEntity(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, modelUpdateObject authoring.ModelUpdateObject) (result authoring.OperationStatus, err error) - UpdateEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) - UpdateExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64, item authoring.ExplicitListItemUpdateObject) (result authoring.OperationStatus, err error) - UpdateHierarchicalEntity(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalModelUpdateObject authoring.HierarchicalEntityModel) (result authoring.OperationStatus, err error) - UpdateHierarchicalEntityChild(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID, hierarchicalChildModelUpdateObject authoring.HierarchicalChildModelUpdateObject) (result authoring.OperationStatus, err error) - UpdateHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) - UpdateIntent(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, modelUpdateObject authoring.ModelUpdateObject) (result authoring.OperationStatus, err error) - UpdatePatternAnyEntityModel(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, patternAnyUpdateObject authoring.PatternAnyModelUpdateObject) (result authoring.OperationStatus, err error) - UpdatePatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) - UpdatePrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) - UpdateRegexEntityModel(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID, regexEntityUpdateObject authoring.RegexModelUpdateObject) (result authoring.OperationStatus, err error) - UpdateRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) - UpdateSubList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int32, wordListBaseUpdateObject authoring.WordListBaseUpdateObject) (result authoring.OperationStatus, err error) + AddClosedList(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, closedListModelCreateObject authoring.ClosedListModelCreateObject) (result authoring.UUID, err error) + AddCompositeEntity(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, compositeModelCreateObject authoring.CompositeEntityModel) (result authoring.UUID, err error) + AddCompositeEntityChild(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeChildModelCreateObject authoring.CompositeChildModelCreateObject) (result authoring.UUID, err error) + AddCustomPrebuiltDomain(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, prebuiltDomainObject authoring.PrebuiltDomainCreateBaseObject) (result authoring.ListUUID, err error) + AddCustomPrebuiltEntity(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject authoring.PrebuiltDomainModelCreateObject) (result authoring.UUID, err error) + AddCustomPrebuiltIntent(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject authoring.PrebuiltDomainModelCreateObject) (result authoring.UUID, err error) + AddEntity(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, modelCreateObject authoring.ModelCreateObject) (result authoring.UUID, err error) + AddExplicitListItem(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, item authoring.ExplicitListItemCreateObject) (result authoring.Int32, err error) + AddHierarchicalEntity(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, hierarchicalModelCreateObject authoring.HierarchicalEntityModel) (result authoring.UUID, err error) + AddHierarchicalEntityChild(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalChildModelCreateObject authoring.HierarchicalChildModelCreateObject) (result authoring.UUID, err error) + AddIntent(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, intentCreateObject authoring.ModelCreateObject) (result authoring.UUID, err error) + AddPrebuilt(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, prebuiltExtractorNames []string) (result authoring.ListPrebuiltEntityExtractor, err error) + AddSubList(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID, wordListCreateObject authoring.WordListObject) (result authoring.Int64, err error) + CreateClosedListEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) + CreateCompositeEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) + CreateCustomPrebuiltEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) + CreateEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) + CreateHierarchicalEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) + CreatePatternAnyEntityModel(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, extractorCreateObject authoring.PatternAnyModelCreateObject) (result authoring.UUID, err error) + CreatePatternAnyEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) + CreatePrebuiltEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) + CreateRegexEntityModel(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, regexEntityExtractorCreateObj authoring.RegexModelCreateObject) (result authoring.UUID, err error) + CreateRegexEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject authoring.EntityRoleCreateObject) (result authoring.UUID, err error) + DeleteClosedList(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (result authoring.OperationStatus, err error) + DeleteClosedListEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) + DeleteCompositeEntity(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result authoring.OperationStatus, err error) + DeleteCompositeEntityChild(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, cChildID uuid.UUID) (result authoring.OperationStatus, err error) + DeleteCompositeEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) + DeleteCustomEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) + DeleteCustomPrebuiltDomain(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, domainName string) (result authoring.OperationStatus, err error) + DeleteEntity(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.OperationStatus, err error) + DeleteEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) + DeleteExplicitListItem(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (result authoring.OperationStatus, err error) + DeleteHierarchicalEntity(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result authoring.OperationStatus, err error) + DeleteHierarchicalEntityChild(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (result authoring.OperationStatus, err error) + DeleteHierarchicalEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) + DeleteIntent(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, intentID uuid.UUID, deleteUtterances *bool) (result authoring.OperationStatus, err error) + DeletePatternAnyEntityModel(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.OperationStatus, err error) + DeletePatternAnyEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) + DeletePrebuilt(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (result authoring.OperationStatus, err error) + DeletePrebuiltEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) + DeleteRegexEntityModel(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (result authoring.OperationStatus, err error) + DeleteRegexEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.OperationStatus, err error) + DeleteSubList(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int64) (result authoring.OperationStatus, err error) + ExamplesMethod(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, modelID string, skip *int32, take *int32) (result authoring.ListLabelTextObject, err error) + GetClosedList(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (result authoring.ClosedListEntityExtractor, err error) + GetClosedListEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) + GetCompositeEntity(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result authoring.CompositeEntityExtractor, err error) + GetCompositeEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) + GetCustomEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) + GetEntity(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.EntityExtractor, err error) + GetEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) + GetExplicitList(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.ListExplicitListItem, err error) + GetExplicitListItem(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (result authoring.ExplicitListItem, err error) + GetHierarchicalEntity(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result authoring.HierarchicalEntityExtractor, err error) + GetHierarchicalEntityChild(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (result authoring.HierarchicalChildEntity, err error) + GetHierarchicalEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) + GetIntent(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, intentID uuid.UUID) (result authoring.IntentClassifier, err error) + GetPatternAnyEntityInfo(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.PatternAnyEntityExtractor, err error) + GetPatternAnyEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) + GetPrebuilt(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (result authoring.PrebuiltEntityExtractor, err error) + GetPrebuiltEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) + GetRegexEntityEntityInfo(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (result authoring.RegexEntityExtractor, err error) + GetRegexEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result authoring.EntityRole, err error) + ListClosedListEntityRoles(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.ListEntityRole, err error) + ListClosedLists(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListClosedListEntityExtractor, err error) + ListCompositeEntities(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListCompositeEntityExtractor, err error) + ListCompositeEntityRoles(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result authoring.ListEntityRole, err error) + ListCustomPrebuiltEntities(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string) (result authoring.ListEntityExtractor, err error) + ListCustomPrebuiltEntityRoles(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.ListEntityRole, err error) + ListCustomPrebuiltIntents(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string) (result authoring.ListIntentClassifier, err error) + ListCustomPrebuiltModels(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string) (result authoring.ListCustomPrebuiltModel, err error) + ListEntities(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListEntityExtractor, err error) + ListEntityRoles(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.ListEntityRole, err error) + ListEntitySuggestions(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, take *int32) (result authoring.ListEntitiesSuggestionExample, err error) + ListHierarchicalEntities(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListHierarchicalEntityExtractor, err error) + ListHierarchicalEntityRoles(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result authoring.ListEntityRole, err error) + ListIntents(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListIntentClassifier, err error) + ListIntentSuggestions(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, intentID uuid.UUID, take *int32) (result authoring.ListIntentsSuggestionExample, err error) + ListModels(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListModelInfoResponse, err error) + ListPatternAnyEntityInfos(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListPatternAnyEntityExtractor, err error) + ListPatternAnyEntityRoles(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.ListEntityRole, err error) + ListPrebuiltEntities(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string) (result authoring.ListAvailablePrebuiltEntityModel, err error) + ListPrebuiltEntityRoles(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.ListEntityRole, err error) + ListPrebuilts(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListPrebuiltEntityExtractor, err error) + ListRegexEntityInfos(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListRegexEntityExtractor, err error) + ListRegexEntityRoles(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result authoring.ListEntityRole, err error) + PatchClosedList(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelPatchObject authoring.ClosedListModelPatchObject) (result authoring.OperationStatus, err error) + UpdateClosedList(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelUpdateObject authoring.ClosedListModelUpdateObject) (result authoring.OperationStatus, err error) + UpdateClosedListEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) + UpdateCompositeEntity(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeModelUpdateObject authoring.CompositeEntityModel) (result authoring.OperationStatus, err error) + UpdateCompositeEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) + UpdateCustomPrebuiltEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) + UpdateEntity(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, modelUpdateObject authoring.ModelUpdateObject) (result authoring.OperationStatus, err error) + UpdateEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) + UpdateExplicitListItem(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64, item authoring.ExplicitListItemUpdateObject) (result authoring.OperationStatus, err error) + UpdateHierarchicalEntity(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalModelUpdateObject authoring.HierarchicalEntityModel) (result authoring.OperationStatus, err error) + UpdateHierarchicalEntityChild(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID, hierarchicalChildModelUpdateObject authoring.HierarchicalChildModelUpdateObject) (result authoring.OperationStatus, err error) + UpdateHierarchicalEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) + UpdateIntent(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, intentID uuid.UUID, modelUpdateObject authoring.ModelUpdateObject) (result authoring.OperationStatus, err error) + UpdatePatternAnyEntityModel(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, patternAnyUpdateObject authoring.PatternAnyModelUpdateObject) (result authoring.OperationStatus, err error) + UpdatePatternAnyEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) + UpdatePrebuiltEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) + UpdateRegexEntityModel(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, regexEntityID uuid.UUID, regexEntityUpdateObject authoring.RegexModelUpdateObject) (result authoring.OperationStatus, err error) + UpdateRegexEntityRole(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject authoring.EntityRoleUpdateObject) (result authoring.OperationStatus, err error) + UpdateSubList(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int64, wordListBaseUpdateObject authoring.WordListBaseUpdateObject) (result authoring.OperationStatus, err error) } var _ ModelClientAPI = (*authoring.ModelClient)(nil) // AppsClientAPI contains the set of methods on the AppsClient type. type AppsClientAPI interface { - Add(ctx context.Context, applicationCreateObject authoring.ApplicationCreateObject) (result authoring.UUID, err error) - AddCustomPrebuiltDomain(ctx context.Context, prebuiltDomainCreateObject authoring.PrebuiltDomainCreateObject) (result authoring.UUID, err error) - Delete(ctx context.Context, appID uuid.UUID, force *bool) (result authoring.OperationStatus, err error) - DownloadQueryLogs(ctx context.Context, appID uuid.UUID) (result authoring.ReadCloser, err error) - Get(ctx context.Context, appID uuid.UUID) (result authoring.ApplicationInfoResponse, err error) - GetPublishSettings(ctx context.Context, appID uuid.UUID) (result authoring.PublishSettings, err error) - GetSettings(ctx context.Context, appID uuid.UUID) (result authoring.ApplicationSettings, err error) - Import(ctx context.Context, luisApp authoring.LuisApp, appName string) (result authoring.UUID, err error) - List(ctx context.Context, skip *int32, take *int32) (result authoring.ListApplicationInfoResponse, err error) - ListAvailableCustomPrebuiltDomains(ctx context.Context) (result authoring.ListPrebuiltDomain, err error) - ListAvailableCustomPrebuiltDomainsForCulture(ctx context.Context, culture string) (result authoring.ListPrebuiltDomain, err error) - ListCortanaEndpoints(ctx context.Context) (result authoring.PersonalAssistantsResponse, err error) - ListDomains(ctx context.Context) (result authoring.ListString, err error) - ListEndpoints(ctx context.Context, appID uuid.UUID) (result authoring.SetString, err error) - ListSupportedCultures(ctx context.Context) (result authoring.ListAvailableCulture, err error) - ListUsageScenarios(ctx context.Context) (result authoring.ListString, err error) - PackagePublishedApplicationAsGzip(ctx context.Context, appID uuid.UUID, slotName uuid.UUID) (result authoring.ReadCloser, err error) - PackageTrainedApplicationAsGzip(ctx context.Context, appID uuid.UUID, versionID string) (result authoring.ReadCloser, err error) - Publish(ctx context.Context, appID uuid.UUID, applicationPublishObject authoring.ApplicationPublishObject) (result authoring.ProductionOrStagingEndpointInfo, err error) - Update(ctx context.Context, appID uuid.UUID, applicationUpdateObject authoring.ApplicationUpdateObject) (result authoring.OperationStatus, err error) - UpdatePublishSettings(ctx context.Context, appID uuid.UUID, publishSettingUpdateObject authoring.PublishSettingUpdateObject) (result authoring.OperationStatus, err error) - UpdateSettings(ctx context.Context, appID uuid.UUID, applicationSettingUpdateObject authoring.ApplicationSettingUpdateObject) (result authoring.OperationStatus, err error) + Add(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, applicationCreateObject authoring.ApplicationCreateObject) (result authoring.UUID, err error) + AddCustomPrebuiltDomain(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, prebuiltDomainCreateObject authoring.PrebuiltDomainCreateObject) (result authoring.UUID, err error) + Delete(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, force *bool) (result authoring.OperationStatus, err error) + DownloadQueryLogs(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID) (result authoring.ReadCloser, err error) + Get(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID) (result authoring.ApplicationInfoResponse, err error) + GetPublishSettings(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID) (result authoring.PublishSettings, err error) + GetSettings(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID) (result authoring.ApplicationSettings, err error) + Import(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, luisApp authoring.LuisApp, appName string) (result authoring.UUID, err error) + List(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, skip *int32, take *int32) (result authoring.ListApplicationInfoResponse, err error) + ListAvailableCustomPrebuiltDomains(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds) (result authoring.ListPrebuiltDomain, err error) + ListAvailableCustomPrebuiltDomainsForCulture(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, culture string) (result authoring.ListPrebuiltDomain, err error) + ListCortanaEndpoints(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds) (result authoring.PersonalAssistantsResponse, err error) + ListDomains(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds) (result authoring.ListString, err error) + ListEndpoints(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID) (result authoring.SetString, err error) + ListSupportedCultures(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds) (result authoring.ListAvailableCulture, err error) + ListUsageScenarios(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds) (result authoring.ListString, err error) + PackagePublishedApplicationAsGzip(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, slotName string) (result authoring.ReadCloser, err error) + PackageTrainedApplicationAsGzip(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string) (result authoring.ReadCloser, err error) + Publish(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, applicationPublishObject authoring.ApplicationPublishObject) (result authoring.ProductionOrStagingEndpointInfo, err error) + Update(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, applicationUpdateObject authoring.ApplicationUpdateObject) (result authoring.OperationStatus, err error) + UpdatePublishSettings(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, publishSettingUpdateObject authoring.PublishSettingUpdateObject) (result authoring.OperationStatus, err error) + UpdateSettings(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, applicationSettingUpdateObject authoring.ApplicationSettingUpdateObject) (result authoring.OperationStatus, err error) } var _ AppsClientAPI = (*authoring.AppsClient)(nil) // VersionsClientAPI contains the set of methods on the VersionsClient type. type VersionsClientAPI interface { - Clone(ctx context.Context, appID uuid.UUID, versionID string, versionCloneObject *authoring.TaskUpdateObject) (result authoring.String, err error) - Delete(ctx context.Context, appID uuid.UUID, versionID string) (result authoring.OperationStatus, err error) - DeleteUnlabelledUtterance(ctx context.Context, appID uuid.UUID, versionID string, utterance string) (result authoring.OperationStatus, err error) - Export(ctx context.Context, appID uuid.UUID, versionID string) (result authoring.LuisApp, err error) - Get(ctx context.Context, appID uuid.UUID, versionID string) (result authoring.VersionInfo, err error) - Import(ctx context.Context, appID uuid.UUID, luisApp authoring.LuisApp, versionID string) (result authoring.String, err error) - List(ctx context.Context, appID uuid.UUID, skip *int32, take *int32) (result authoring.ListVersionInfo, err error) - Update(ctx context.Context, appID uuid.UUID, versionID string, versionUpdateObject authoring.TaskUpdateObject) (result authoring.OperationStatus, err error) + Clone(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, versionCloneObject authoring.TaskUpdateObject) (result authoring.String, err error) + Delete(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string) (result authoring.OperationStatus, err error) + DeleteUnlabelledUtterance(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, utterance string) (result authoring.OperationStatus, err error) + Export(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string) (result authoring.LuisApp, err error) + Get(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string) (result authoring.VersionInfo, err error) + Import(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, luisApp authoring.LuisApp, versionID string) (result authoring.String, err error) + List(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, skip *int32, take *int32) (result authoring.ListVersionInfo, err error) + Update(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, versionUpdateObject authoring.TaskUpdateObject) (result authoring.OperationStatus, err error) } var _ VersionsClientAPI = (*authoring.VersionsClient)(nil) // TrainClientAPI contains the set of methods on the TrainClient type. type TrainClientAPI interface { - GetStatus(ctx context.Context, appID uuid.UUID, versionID string) (result authoring.ListModelTrainingInfo, err error) - TrainVersion(ctx context.Context, appID uuid.UUID, versionID string) (result authoring.EnqueueTrainingResponse, err error) + GetStatus(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string) (result authoring.ListModelTrainingInfo, err error) + TrainVersion(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string) (result authoring.EnqueueTrainingResponse, err error) } var _ TrainClientAPI = (*authoring.TrainClient)(nil) // PermissionsClientAPI contains the set of methods on the PermissionsClient type. type PermissionsClientAPI interface { - Add(ctx context.Context, appID uuid.UUID, userToAdd authoring.UserCollaborator) (result authoring.OperationStatus, err error) - Delete(ctx context.Context, appID uuid.UUID, userToDelete authoring.UserCollaborator) (result authoring.OperationStatus, err error) - List(ctx context.Context, appID uuid.UUID) (result authoring.UserAccessList, err error) - Update(ctx context.Context, appID uuid.UUID, collaborators authoring.CollaboratorsArray) (result authoring.OperationStatus, err error) + Add(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, userToAdd authoring.UserCollaborator) (result authoring.OperationStatus, err error) + Delete(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, userToDelete authoring.UserCollaborator) (result authoring.OperationStatus, err error) + List(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID) (result authoring.UserAccessList, err error) + Update(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, collaborators authoring.CollaboratorsArray) (result authoring.OperationStatus, err error) } var _ PermissionsClientAPI = (*authoring.PermissionsClient)(nil) // PatternClientAPI contains the set of methods on the PatternClient type. type PatternClientAPI interface { - AddPattern(ctx context.Context, appID uuid.UUID, versionID string, pattern authoring.PatternRuleCreateObject) (result authoring.PatternRuleInfo, err error) - BatchAddPatterns(ctx context.Context, appID uuid.UUID, versionID string, patterns []authoring.PatternRuleCreateObject) (result authoring.ListPatternRuleInfo, err error) - DeletePattern(ctx context.Context, appID uuid.UUID, versionID string, patternID uuid.UUID) (result authoring.OperationStatus, err error) - DeletePatterns(ctx context.Context, appID uuid.UUID, versionID string, patternIds []uuid.UUID) (result authoring.OperationStatus, err error) - GetIntentPatterns(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, skip *int32, take *int32) (result authoring.ListPatternRuleInfo, err error) - GetPatterns(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListPatternRuleInfo, err error) - UpdatePattern(ctx context.Context, appID uuid.UUID, versionID string, patternID uuid.UUID, pattern authoring.PatternRuleUpdateObject) (result authoring.PatternRuleInfo, err error) - UpdatePatterns(ctx context.Context, appID uuid.UUID, versionID string, patterns []authoring.PatternRuleUpdateObject) (result authoring.ListPatternRuleInfo, err error) + AddPattern(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, pattern authoring.PatternRuleCreateObject) (result authoring.PatternRuleInfo, err error) + BatchAddPatterns(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, patterns []authoring.PatternRuleCreateObject) (result authoring.ListPatternRuleInfo, err error) + DeletePattern(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, patternID uuid.UUID) (result authoring.OperationStatus, err error) + DeletePatterns(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, patternIds []uuid.UUID) (result authoring.OperationStatus, err error) + ListIntentPatterns(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, intentID uuid.UUID, skip *int32, take *int32) (result authoring.ListPatternRuleInfo, err error) + ListPatterns(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result authoring.ListPatternRuleInfo, err error) + UpdatePattern(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, patternID uuid.UUID, pattern authoring.PatternRuleUpdateObject) (result authoring.PatternRuleInfo, err error) + UpdatePatterns(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, patterns []authoring.PatternRuleUpdateObject) (result authoring.ListPatternRuleInfo, err error) } var _ PatternClientAPI = (*authoring.PatternClient)(nil) // SettingsClientAPI contains the set of methods on the SettingsClient type. type SettingsClientAPI interface { - List(ctx context.Context, appID uuid.UUID, versionID string) (result authoring.ListAppVersionSettingObject, err error) - Update(ctx context.Context, appID uuid.UUID, versionID string, listOfAppVersionSettingObject authoring.AppVersionSettingObject) (result authoring.OperationStatus, err error) + List(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string) (result authoring.ListAppVersionSettingObject, err error) + Update(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, versionID string, listOfAppVersionSettingObject []authoring.AppVersionSettingObject) (result authoring.OperationStatus, err error) } var _ SettingsClientAPI = (*authoring.SettingsClient)(nil) // AzureAccountsClientAPI contains the set of methods on the AzureAccountsClient type. type AzureAccountsClientAPI interface { - AssignToApp(ctx context.Context, appID uuid.UUID, azureAccountInfoObject *authoring.AzureAccountInfoObject) (result authoring.OperationStatus, err error) - GetAssigned(ctx context.Context, appID uuid.UUID) (result authoring.ListAzureAccountInfoObject, err error) - GetUserLUISAccounts(ctx context.Context) (result authoring.ListAzureAccountInfoObject, err error) - RemoveFromApp(ctx context.Context, appID uuid.UUID, azureAccountInfoObject *authoring.AzureAccountInfoObject) (result authoring.OperationStatus, err error) + AssignToApp(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, azureAccountInfoObject *authoring.AzureAccountInfoObject) (result authoring.OperationStatus, err error) + GetAssigned(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID) (result authoring.ListAzureAccountInfoObject, err error) + ListUserLUISAccounts(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds) (result authoring.ListAzureAccountInfoObject, err error) + RemoveFromApp(ctx context.Context, azureRegion authoring.AzureRegions, azureCloud authoring.AzureClouds, appID uuid.UUID, azureAccountInfoObject *authoring.AzureAccountInfoObject) (result authoring.OperationStatus, err error) } var _ AzureAccountsClientAPI = (*authoring.AzureAccountsClient)(nil) diff --git a/services/cognitiveservices/v2.0/luis/authoring/azureaccounts.go b/services/cognitiveservices/v2.0/luis/authoring/azureaccounts.go index 4c37df1311c7..a490955886a9 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/azureaccounts.go +++ b/services/cognitiveservices/v2.0/luis/authoring/azureaccounts.go @@ -33,15 +33,17 @@ type AzureAccountsClient struct { } // NewAzureAccountsClient creates an instance of the AzureAccountsClient client. -func NewAzureAccountsClient(endpoint string) AzureAccountsClient { - return AzureAccountsClient{New(endpoint)} +func NewAzureAccountsClient() AzureAccountsClient { + return AzureAccountsClient{New()} } -// AssignToApp assigns an azure account to the application. +// AssignToApp assigns an Azure account to the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. -// azureAccountInfoObject - the azure account information object. -func (client AzureAccountsClient) AssignToApp(ctx context.Context, appID uuid.UUID, azureAccountInfoObject *AzureAccountInfoObject) (result OperationStatus, err error) { +// azureAccountInfoObject - the Azure account information object. +func (client AzureAccountsClient) AssignToApp(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, azureAccountInfoObject *AzureAccountInfoObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AzureAccountsClient.AssignToApp") defer func() { @@ -62,7 +64,7 @@ func (client AzureAccountsClient) AssignToApp(ctx context.Context, appID uuid.UU return result, validation.NewError("authoring.AzureAccountsClient", "AssignToApp", err.Error()) } - req, err := client.AssignToAppPreparer(ctx, appID, azureAccountInfoObject) + req, err := client.AssignToAppPreparer(ctx, azureRegion, azureCloud, appID, azureAccountInfoObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AzureAccountsClient", "AssignToApp", nil, "Failure preparing request") return @@ -84,9 +86,10 @@ func (client AzureAccountsClient) AssignToApp(ctx context.Context, appID uuid.UU } // AssignToAppPreparer prepares the AssignToApp request. -func (client AzureAccountsClient) AssignToAppPreparer(ctx context.Context, appID uuid.UUID, azureAccountInfoObject *AzureAccountInfoObject) (*http.Request, error) { +func (client AzureAccountsClient) AssignToAppPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, azureAccountInfoObject *AzureAccountInfoObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -96,7 +99,7 @@ func (client AzureAccountsClient) AssignToAppPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/azureaccounts", pathParameters)) if azureAccountInfoObject != nil { preparer = autorest.DecoratePreparer(preparer, @@ -125,10 +128,12 @@ func (client AzureAccountsClient) AssignToAppResponder(resp *http.Response) (res return } -// GetAssigned gets the LUIS azure accounts assigned to the application for the user using his ARM token. +// GetAssigned gets the LUIS Azure accounts assigned to the application for the user using his ARM token. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. -func (client AzureAccountsClient) GetAssigned(ctx context.Context, appID uuid.UUID) (result ListAzureAccountInfoObject, err error) { +func (client AzureAccountsClient) GetAssigned(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID) (result ListAzureAccountInfoObject, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AzureAccountsClient.GetAssigned") defer func() { @@ -139,7 +144,7 @@ func (client AzureAccountsClient) GetAssigned(ctx context.Context, appID uuid.UU tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetAssignedPreparer(ctx, appID) + req, err := client.GetAssignedPreparer(ctx, azureRegion, azureCloud, appID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AzureAccountsClient", "GetAssigned", nil, "Failure preparing request") return @@ -161,9 +166,10 @@ func (client AzureAccountsClient) GetAssigned(ctx context.Context, appID uuid.UU } // GetAssignedPreparer prepares the GetAssigned request. -func (client AzureAccountsClient) GetAssignedPreparer(ctx context.Context, appID uuid.UUID) (*http.Request, error) { +func (client AzureAccountsClient) GetAssignedPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -172,7 +178,7 @@ func (client AzureAccountsClient) GetAssignedPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/azureaccounts", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -197,10 +203,13 @@ func (client AzureAccountsClient) GetAssignedResponder(resp *http.Response) (res return } -// GetUserLUISAccounts gets the LUIS azure accounts for the user using his ARM token. -func (client AzureAccountsClient) GetUserLUISAccounts(ctx context.Context) (result ListAzureAccountInfoObject, err error) { +// ListUserLUISAccounts gets the LUIS Azure accounts for the user using his ARM token. +// Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints +func (client AzureAccountsClient) ListUserLUISAccounts(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds) (result ListAzureAccountInfoObject, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AzureAccountsClient.GetUserLUISAccounts") + ctx = tracing.StartSpan(ctx, fqdn+"/AzureAccountsClient.ListUserLUISAccounts") defer func() { sc := -1 if result.Response.Response != nil { @@ -209,50 +218,51 @@ func (client AzureAccountsClient) GetUserLUISAccounts(ctx context.Context) (resu tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetUserLUISAccountsPreparer(ctx) + req, err := client.ListUserLUISAccountsPreparer(ctx, azureRegion, azureCloud) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.AzureAccountsClient", "GetUserLUISAccounts", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.AzureAccountsClient", "ListUserLUISAccounts", nil, "Failure preparing request") return } - resp, err := client.GetUserLUISAccountsSender(req) + resp, err := client.ListUserLUISAccountsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.AzureAccountsClient", "GetUserLUISAccounts", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.AzureAccountsClient", "ListUserLUISAccounts", resp, "Failure sending request") return } - result, err = client.GetUserLUISAccountsResponder(resp) + result, err = client.ListUserLUISAccountsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.AzureAccountsClient", "GetUserLUISAccounts", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.AzureAccountsClient", "ListUserLUISAccounts", resp, "Failure responding to request") } return } -// GetUserLUISAccountsPreparer prepares the GetUserLUISAccounts request. -func (client AzureAccountsClient) GetUserLUISAccountsPreparer(ctx context.Context) (*http.Request, error) { +// ListUserLUISAccountsPreparer prepares the ListUserLUISAccounts request. +func (client AzureAccountsClient) ListUserLUISAccountsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPath("/azureaccounts")) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetUserLUISAccountsSender sends the GetUserLUISAccounts request. The method will close the +// ListUserLUISAccountsSender sends the ListUserLUISAccounts request. The method will close the // http.Response Body if it receives an error. -func (client AzureAccountsClient) GetUserLUISAccountsSender(req *http.Request) (*http.Response, error) { +func (client AzureAccountsClient) ListUserLUISAccountsSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetUserLUISAccountsResponder handles the response to the GetUserLUISAccounts request. The method always +// ListUserLUISAccountsResponder handles the response to the ListUserLUISAccounts request. The method always // closes the http.Response Body. -func (client AzureAccountsClient) GetUserLUISAccountsResponder(resp *http.Response) (result ListAzureAccountInfoObject, err error) { +func (client AzureAccountsClient) ListUserLUISAccountsResponder(resp *http.Response) (result ListAzureAccountInfoObject, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -263,11 +273,13 @@ func (client AzureAccountsClient) GetUserLUISAccountsResponder(resp *http.Respon return } -// RemoveFromApp removes assigned azure account from the application. +// RemoveFromApp removes assigned Azure account from the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. -// azureAccountInfoObject - the azure account information object. -func (client AzureAccountsClient) RemoveFromApp(ctx context.Context, appID uuid.UUID, azureAccountInfoObject *AzureAccountInfoObject) (result OperationStatus, err error) { +// azureAccountInfoObject - the Azure account information object. +func (client AzureAccountsClient) RemoveFromApp(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, azureAccountInfoObject *AzureAccountInfoObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AzureAccountsClient.RemoveFromApp") defer func() { @@ -288,7 +300,7 @@ func (client AzureAccountsClient) RemoveFromApp(ctx context.Context, appID uuid. return result, validation.NewError("authoring.AzureAccountsClient", "RemoveFromApp", err.Error()) } - req, err := client.RemoveFromAppPreparer(ctx, appID, azureAccountInfoObject) + req, err := client.RemoveFromAppPreparer(ctx, azureRegion, azureCloud, appID, azureAccountInfoObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.AzureAccountsClient", "RemoveFromApp", nil, "Failure preparing request") return @@ -310,9 +322,10 @@ func (client AzureAccountsClient) RemoveFromApp(ctx context.Context, appID uuid. } // RemoveFromAppPreparer prepares the RemoveFromApp request. -func (client AzureAccountsClient) RemoveFromAppPreparer(ctx context.Context, appID uuid.UUID, azureAccountInfoObject *AzureAccountInfoObject) (*http.Request, error) { +func (client AzureAccountsClient) RemoveFromAppPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, azureAccountInfoObject *AzureAccountInfoObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -322,7 +335,7 @@ func (client AzureAccountsClient) RemoveFromAppPreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/azureaccounts", pathParameters)) if azureAccountInfoObject != nil { preparer = autorest.DecoratePreparer(preparer, diff --git a/services/cognitiveservices/v2.0/luis/authoring/client.go b/services/cognitiveservices/v2.0/luis/authoring/client.go index 58feb2308a04..12fcc7de0347 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/client.go +++ b/services/cognitiveservices/v2.0/luis/authoring/client.go @@ -27,18 +27,16 @@ import ( // BaseClient is the base client for Authoring. type BaseClient struct { autorest.Client - Endpoint string } // New creates an instance of the BaseClient client. -func New(endpoint string) BaseClient { - return NewWithoutDefaults(endpoint) +func New() BaseClient { + return NewWithoutDefaults() } // NewWithoutDefaults creates an instance of the BaseClient client. -func NewWithoutDefaults(endpoint string) BaseClient { +func NewWithoutDefaults() BaseClient { return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - Endpoint: endpoint, + Client: autorest.NewClientWithUserAgent(UserAgent()), } } diff --git a/services/cognitiveservices/v2.0/luis/authoring/examples.go b/services/cognitiveservices/v2.0/luis/authoring/examples.go index fe620a515efe..010562524cd4 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/examples.go +++ b/services/cognitiveservices/v2.0/luis/authoring/examples.go @@ -33,16 +33,18 @@ type ExamplesClient struct { } // NewExamplesClient creates an instance of the ExamplesClient client. -func NewExamplesClient(endpoint string) ExamplesClient { - return ExamplesClient{New(endpoint)} +func NewExamplesClient() ExamplesClient { + return ExamplesClient{New()} } -// Add adds a labeled example to the application. +// Add adds a labeled example utterance in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// exampleLabelObject - an example label with the expected intent and entities. -func (client ExamplesClient) Add(ctx context.Context, appID uuid.UUID, versionID string, exampleLabelObject ExampleLabelObject) (result LabelExampleResponse, err error) { +// exampleLabelObject - a labeled example utterance with the expected intent and entities. +func (client ExamplesClient) Add(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, exampleLabelObject ExampleLabelObject) (result LabelExampleResponse, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ExamplesClient.Add") defer func() { @@ -53,7 +55,7 @@ func (client ExamplesClient) Add(ctx context.Context, appID uuid.UUID, versionID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddPreparer(ctx, appID, versionID, exampleLabelObject) + req, err := client.AddPreparer(ctx, azureRegion, azureCloud, appID, versionID, exampleLabelObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "Add", nil, "Failure preparing request") return @@ -75,9 +77,10 @@ func (client ExamplesClient) Add(ctx context.Context, appID uuid.UUID, versionID } // AddPreparer prepares the Add request. -func (client ExamplesClient) AddPreparer(ctx context.Context, appID uuid.UUID, versionID string, exampleLabelObject ExampleLabelObject) (*http.Request, error) { +func (client ExamplesClient) AddPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, exampleLabelObject ExampleLabelObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -88,7 +91,7 @@ func (client ExamplesClient) AddPreparer(ctx context.Context, appID uuid.UUID, v preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/example", pathParameters), autorest.WithJSON(exampleLabelObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -114,12 +117,14 @@ func (client ExamplesClient) AddResponder(resp *http.Response) (result LabelExam return } -// Batch adds a batch of labeled examples to the application. +// Batch adds a batch of labeled example utterances to a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// exampleLabelObjectArray - array of examples. -func (client ExamplesClient) Batch(ctx context.Context, appID uuid.UUID, versionID string, exampleLabelObjectArray []ExampleLabelObject) (result ListBatchLabelExample, err error) { +// exampleLabelObjectArray - array of example utterances. +func (client ExamplesClient) Batch(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, exampleLabelObjectArray []ExampleLabelObject) (result ListBatchLabelExample, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ExamplesClient.Batch") defer func() { @@ -136,7 +141,7 @@ func (client ExamplesClient) Batch(ctx context.Context, appID uuid.UUID, version return result, validation.NewError("authoring.ExamplesClient", "Batch", err.Error()) } - req, err := client.BatchPreparer(ctx, appID, versionID, exampleLabelObjectArray) + req, err := client.BatchPreparer(ctx, azureRegion, azureCloud, appID, versionID, exampleLabelObjectArray) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "Batch", nil, "Failure preparing request") return @@ -158,9 +163,10 @@ func (client ExamplesClient) Batch(ctx context.Context, appID uuid.UUID, version } // BatchPreparer prepares the Batch request. -func (client ExamplesClient) BatchPreparer(ctx context.Context, appID uuid.UUID, versionID string, exampleLabelObjectArray []ExampleLabelObject) (*http.Request, error) { +func (client ExamplesClient) BatchPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, exampleLabelObjectArray []ExampleLabelObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -171,7 +177,7 @@ func (client ExamplesClient) BatchPreparer(ctx context.Context, appID uuid.UUID, preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/examples", pathParameters), autorest.WithJSON(exampleLabelObjectArray)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -197,12 +203,14 @@ func (client ExamplesClient) BatchResponder(resp *http.Response) (result ListBat return } -// Delete deletes the labeled example with the specified ID. +// Delete deletes the labeled example utterances with the specified ID from a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // exampleID - the example ID. -func (client ExamplesClient) Delete(ctx context.Context, appID uuid.UUID, versionID string, exampleID int32) (result OperationStatus, err error) { +func (client ExamplesClient) Delete(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, exampleID int32) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ExamplesClient.Delete") defer func() { @@ -213,7 +221,7 @@ func (client ExamplesClient) Delete(ctx context.Context, appID uuid.UUID, versio tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePreparer(ctx, appID, versionID, exampleID) + req, err := client.DeletePreparer(ctx, azureRegion, azureCloud, appID, versionID, exampleID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "Delete", nil, "Failure preparing request") return @@ -235,9 +243,10 @@ func (client ExamplesClient) Delete(ctx context.Context, appID uuid.UUID, versio } // DeletePreparer prepares the Delete request. -func (client ExamplesClient) DeletePreparer(ctx context.Context, appID uuid.UUID, versionID string, exampleID int32) (*http.Request, error) { +func (client ExamplesClient) DeletePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, exampleID int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -248,7 +257,7 @@ func (client ExamplesClient) DeletePreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/examples/{exampleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -273,13 +282,15 @@ func (client ExamplesClient) DeleteResponder(resp *http.Response) (result Operat return } -// List returns examples to be reviewed. +// List returns example utterances to be reviewed from a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // skip - the number of entries to skip. Default value is 0. // take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client ExamplesClient) List(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListLabeledUtterance, err error) { +func (client ExamplesClient) List(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListLabeledUtterance, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ExamplesClient.List") defer func() { @@ -302,7 +313,7 @@ func (client ExamplesClient) List(ctx context.Context, appID uuid.UUID, versionI return result, validation.NewError("authoring.ExamplesClient", "List", err.Error()) } - req, err := client.ListPreparer(ctx, appID, versionID, skip, take) + req, err := client.ListPreparer(ctx, azureRegion, azureCloud, appID, versionID, skip, take) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ExamplesClient", "List", nil, "Failure preparing request") return @@ -324,9 +335,10 @@ func (client ExamplesClient) List(ctx context.Context, appID uuid.UUID, versionI } // ListPreparer prepares the List request. -func (client ExamplesClient) ListPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { +func (client ExamplesClient) ListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -348,7 +360,7 @@ func (client ExamplesClient) ListPreparer(ctx context.Context, appID uuid.UUID, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/examples", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) diff --git a/services/cognitiveservices/v2.0/luis/authoring/features.go b/services/cognitiveservices/v2.0/luis/authoring/features.go index 5062f138988b..dc3533e7f2a9 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/features.go +++ b/services/cognitiveservices/v2.0/luis/authoring/features.go @@ -33,17 +33,19 @@ type FeaturesClient struct { } // NewFeaturesClient creates an instance of the FeaturesClient client. -func NewFeaturesClient(endpoint string) FeaturesClient { - return FeaturesClient{New(endpoint)} +func NewFeaturesClient() FeaturesClient { + return FeaturesClient{New()} } -// AddPhraseList creates a new phraselist feature. +// AddPhraseList creates a new phraselist feature in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // phraselistCreateObject - a Phraselist object containing Name, comma-separated Phrases and the isExchangeable // boolean. Default value for isExchangeable is true. -func (client FeaturesClient) AddPhraseList(ctx context.Context, appID uuid.UUID, versionID string, phraselistCreateObject PhraselistCreateObject) (result Int32, err error) { +func (client FeaturesClient) AddPhraseList(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, phraselistCreateObject PhraselistCreateObject) (result Int32, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FeaturesClient.AddPhraseList") defer func() { @@ -54,7 +56,7 @@ func (client FeaturesClient) AddPhraseList(ctx context.Context, appID uuid.UUID, tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddPhraseListPreparer(ctx, appID, versionID, phraselistCreateObject) + req, err := client.AddPhraseListPreparer(ctx, azureRegion, azureCloud, appID, versionID, phraselistCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "AddPhraseList", nil, "Failure preparing request") return @@ -76,9 +78,10 @@ func (client FeaturesClient) AddPhraseList(ctx context.Context, appID uuid.UUID, } // AddPhraseListPreparer prepares the AddPhraseList request. -func (client FeaturesClient) AddPhraseListPreparer(ctx context.Context, appID uuid.UUID, versionID string, phraselistCreateObject PhraselistCreateObject) (*http.Request, error) { +func (client FeaturesClient) AddPhraseListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, phraselistCreateObject PhraselistCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -89,7 +92,7 @@ func (client FeaturesClient) AddPhraseListPreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists", pathParameters), autorest.WithJSON(phraselistCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -115,12 +118,14 @@ func (client FeaturesClient) AddPhraseListResponder(resp *http.Response) (result return } -// DeletePhraseList deletes a phraselist feature. +// DeletePhraseList deletes a phraselist feature from a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // phraselistID - the ID of the feature to be deleted. -func (client FeaturesClient) DeletePhraseList(ctx context.Context, appID uuid.UUID, versionID string, phraselistID int32) (result OperationStatus, err error) { +func (client FeaturesClient) DeletePhraseList(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, phraselistID int32) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FeaturesClient.DeletePhraseList") defer func() { @@ -131,7 +136,7 @@ func (client FeaturesClient) DeletePhraseList(ctx context.Context, appID uuid.UU tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePhraseListPreparer(ctx, appID, versionID, phraselistID) + req, err := client.DeletePhraseListPreparer(ctx, azureRegion, azureCloud, appID, versionID, phraselistID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "DeletePhraseList", nil, "Failure preparing request") return @@ -153,9 +158,10 @@ func (client FeaturesClient) DeletePhraseList(ctx context.Context, appID uuid.UU } // DeletePhraseListPreparer prepares the DeletePhraseList request. -func (client FeaturesClient) DeletePhraseListPreparer(ctx context.Context, appID uuid.UUID, versionID string, phraselistID int32) (*http.Request, error) { +func (client FeaturesClient) DeletePhraseListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, phraselistID int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -166,7 +172,7 @@ func (client FeaturesClient) DeletePhraseListPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists/{phraselistId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -191,12 +197,14 @@ func (client FeaturesClient) DeletePhraseListResponder(resp *http.Response) (res return } -// GetPhraseList gets phraselist feature info. +// GetPhraseList gets phraselist feature info in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // phraselistID - the ID of the feature to be retrieved. -func (client FeaturesClient) GetPhraseList(ctx context.Context, appID uuid.UUID, versionID string, phraselistID int32) (result PhraseListFeatureInfo, err error) { +func (client FeaturesClient) GetPhraseList(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, phraselistID int32) (result PhraseListFeatureInfo, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FeaturesClient.GetPhraseList") defer func() { @@ -207,7 +215,7 @@ func (client FeaturesClient) GetPhraseList(ctx context.Context, appID uuid.UUID, tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPhraseListPreparer(ctx, appID, versionID, phraselistID) + req, err := client.GetPhraseListPreparer(ctx, azureRegion, azureCloud, appID, versionID, phraselistID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "GetPhraseList", nil, "Failure preparing request") return @@ -229,9 +237,10 @@ func (client FeaturesClient) GetPhraseList(ctx context.Context, appID uuid.UUID, } // GetPhraseListPreparer prepares the GetPhraseList request. -func (client FeaturesClient) GetPhraseListPreparer(ctx context.Context, appID uuid.UUID, versionID string, phraselistID int32) (*http.Request, error) { +func (client FeaturesClient) GetPhraseListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, phraselistID int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -242,7 +251,7 @@ func (client FeaturesClient) GetPhraseListPreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists/{phraselistId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -267,13 +276,15 @@ func (client FeaturesClient) GetPhraseListResponder(resp *http.Response) (result return } -// List gets all the extraction features for the specified application version. +// List gets all the extraction phraselist and pattern features in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // skip - the number of entries to skip. Default value is 0. // take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client FeaturesClient) List(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result FeaturesResponseObject, err error) { +func (client FeaturesClient) List(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result FeaturesResponseObject, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FeaturesClient.List") defer func() { @@ -296,7 +307,7 @@ func (client FeaturesClient) List(ctx context.Context, appID uuid.UUID, versionI return result, validation.NewError("authoring.FeaturesClient", "List", err.Error()) } - req, err := client.ListPreparer(ctx, appID, versionID, skip, take) + req, err := client.ListPreparer(ctx, azureRegion, azureCloud, appID, versionID, skip, take) if err != nil { err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "List", nil, "Failure preparing request") return @@ -318,9 +329,10 @@ func (client FeaturesClient) List(ctx context.Context, appID uuid.UUID, versionI } // ListPreparer prepares the List request. -func (client FeaturesClient) ListPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { +func (client FeaturesClient) ListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -342,7 +354,7 @@ func (client FeaturesClient) ListPreparer(ctx context.Context, appID uuid.UUID, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/features", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -368,13 +380,120 @@ func (client FeaturesClient) ListResponder(resp *http.Response) (result Features return } -// ListPhraseLists gets all the phraselist features. +// ListApplicationVersionPatternFeatures [DEPRECATED NOTICE: This operation will soon be removed] Gets all the pattern +// features. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // skip - the number of entries to skip. Default value is 0. // take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client FeaturesClient) ListPhraseLists(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPhraseListFeatureInfo, err error) { +func (client FeaturesClient) ListApplicationVersionPatternFeatures(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPatternFeatureInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FeaturesClient.ListApplicationVersionPatternFeatures") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: skip, + Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + {TargetValue: take, + Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("authoring.FeaturesClient", "ListApplicationVersionPatternFeatures", err.Error()) + } + + req, err := client.ListApplicationVersionPatternFeaturesPreparer(ctx, azureRegion, azureCloud, appID, versionID, skip, take) + if err != nil { + err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "ListApplicationVersionPatternFeatures", nil, "Failure preparing request") + return + } + + resp, err := client.ListApplicationVersionPatternFeaturesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "ListApplicationVersionPatternFeatures", resp, "Failure sending request") + return + } + + result, err = client.ListApplicationVersionPatternFeaturesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "ListApplicationVersionPatternFeatures", resp, "Failure responding to request") + } + + return +} + +// ListApplicationVersionPatternFeaturesPreparer prepares the ListApplicationVersionPatternFeatures request. +func (client FeaturesClient) ListApplicationVersionPatternFeaturesPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, + } + + pathParameters := map[string]interface{}{ + "appId": autorest.Encode("path", appID), + "versionId": autorest.Encode("path", versionID), + } + + queryParameters := map[string]interface{}{} + if skip != nil { + queryParameters["skip"] = autorest.Encode("query", *skip) + } else { + queryParameters["skip"] = autorest.Encode("query", 0) + } + if take != nil { + queryParameters["take"] = autorest.Encode("query", *take) + } else { + queryParameters["take"] = autorest.Encode("query", 100) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patterns", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListApplicationVersionPatternFeaturesSender sends the ListApplicationVersionPatternFeatures request. The method will close the +// http.Response Body if it receives an error. +func (client FeaturesClient) ListApplicationVersionPatternFeaturesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// ListApplicationVersionPatternFeaturesResponder handles the response to the ListApplicationVersionPatternFeatures request. The method always +// closes the http.Response Body. +func (client FeaturesClient) ListApplicationVersionPatternFeaturesResponder(resp *http.Response) (result ListPatternFeatureInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListPhraseLists gets all the phraselist features in a version of the application. +// Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints +// appID - the application ID. +// versionID - the version ID. +// skip - the number of entries to skip. Default value is 0. +// take - the number of entries to return. Maximum page size is 500. Default is 100. +func (client FeaturesClient) ListPhraseLists(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPhraseListFeatureInfo, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FeaturesClient.ListPhraseLists") defer func() { @@ -397,7 +516,7 @@ func (client FeaturesClient) ListPhraseLists(ctx context.Context, appID uuid.UUI return result, validation.NewError("authoring.FeaturesClient", "ListPhraseLists", err.Error()) } - req, err := client.ListPhraseListsPreparer(ctx, appID, versionID, skip, take) + req, err := client.ListPhraseListsPreparer(ctx, azureRegion, azureCloud, appID, versionID, skip, take) if err != nil { err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "ListPhraseLists", nil, "Failure preparing request") return @@ -419,9 +538,10 @@ func (client FeaturesClient) ListPhraseLists(ctx context.Context, appID uuid.UUI } // ListPhraseListsPreparer prepares the ListPhraseLists request. -func (client FeaturesClient) ListPhraseListsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { +func (client FeaturesClient) ListPhraseListsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -443,7 +563,7 @@ func (client FeaturesClient) ListPhraseListsPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -469,14 +589,17 @@ func (client FeaturesClient) ListPhraseListsResponder(resp *http.Response) (resu return } -// UpdatePhraseList updates the phrases, the state and the name of the phraselist feature. +// UpdatePhraseList updates the phrases, the state and the name of the phraselist feature in a version of the +// application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // phraselistID - the ID of the feature to be updated. // phraselistUpdateObject - the new values for: - Just a boolean called IsActive, in which case the status of // the feature will be changed. - Name, Pattern, Mode, and a boolean called IsActive to update the feature. -func (client FeaturesClient) UpdatePhraseList(ctx context.Context, appID uuid.UUID, versionID string, phraselistID int32, phraselistUpdateObject *PhraselistUpdateObject) (result OperationStatus, err error) { +func (client FeaturesClient) UpdatePhraseList(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, phraselistID int32, phraselistUpdateObject *PhraselistUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FeaturesClient.UpdatePhraseList") defer func() { @@ -487,7 +610,7 @@ func (client FeaturesClient) UpdatePhraseList(ctx context.Context, appID uuid.UU tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdatePhraseListPreparer(ctx, appID, versionID, phraselistID, phraselistUpdateObject) + req, err := client.UpdatePhraseListPreparer(ctx, azureRegion, azureCloud, appID, versionID, phraselistID, phraselistUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.FeaturesClient", "UpdatePhraseList", nil, "Failure preparing request") return @@ -509,9 +632,10 @@ func (client FeaturesClient) UpdatePhraseList(ctx context.Context, appID uuid.UU } // UpdatePhraseListPreparer prepares the UpdatePhraseList request. -func (client FeaturesClient) UpdatePhraseListPreparer(ctx context.Context, appID uuid.UUID, versionID string, phraselistID int32, phraselistUpdateObject *PhraselistUpdateObject) (*http.Request, error) { +func (client FeaturesClient) UpdatePhraseListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, phraselistID int32, phraselistUpdateObject *PhraselistUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -523,7 +647,7 @@ func (client FeaturesClient) UpdatePhraseListPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists/{phraselistId}", pathParameters)) if phraselistUpdateObject != nil { preparer = autorest.DecoratePreparer(preparer, diff --git a/services/cognitiveservices/v2.0/luis/authoring/model.go b/services/cognitiveservices/v2.0/luis/authoring/model.go index 4cc30ad607ca..2629f5e8676a 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/model.go +++ b/services/cognitiveservices/v2.0/luis/authoring/model.go @@ -33,17 +33,18 @@ type ModelClient struct { } // NewModelClient creates an instance of the ModelClient client. -func NewModelClient(endpoint string) ModelClient { - return ModelClient{New(endpoint)} +func NewModelClient() ModelClient { + return ModelClient{New()} } -// AddClosedList adds a closed list model to the application. +// AddClosedList adds a list entity model to a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// closedListModelCreateObject - a model containing the name and words for the new closed list entity -// extractor. -func (client ModelClient) AddClosedList(ctx context.Context, appID uuid.UUID, versionID string, closedListModelCreateObject ClosedListModelCreateObject) (result UUID, err error) { +// closedListModelCreateObject - a model containing the name and words for the new list entity extractor. +func (client ModelClient) AddClosedList(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, closedListModelCreateObject ClosedListModelCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddClosedList") defer func() { @@ -54,7 +55,7 @@ func (client ModelClient) AddClosedList(ctx context.Context, appID uuid.UUID, ve tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddClosedListPreparer(ctx, appID, versionID, closedListModelCreateObject) + req, err := client.AddClosedListPreparer(ctx, azureRegion, azureCloud, appID, versionID, closedListModelCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddClosedList", nil, "Failure preparing request") return @@ -76,9 +77,10 @@ func (client ModelClient) AddClosedList(ctx context.Context, appID uuid.UUID, ve } // AddClosedListPreparer prepares the AddClosedList request. -func (client ModelClient) AddClosedListPreparer(ctx context.Context, appID uuid.UUID, versionID string, closedListModelCreateObject ClosedListModelCreateObject) (*http.Request, error) { +func (client ModelClient) AddClosedListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, closedListModelCreateObject ClosedListModelCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -89,7 +91,7 @@ func (client ModelClient) AddClosedListPreparer(ctx context.Context, appID uuid. preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists", pathParameters), autorest.WithJSON(closedListModelCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -115,12 +117,14 @@ func (client ModelClient) AddClosedListResponder(resp *http.Response) (result UU return } -// AddCompositeEntity adds a composite entity extractor to the application. +// AddCompositeEntity adds a composite entity extractor to a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // compositeModelCreateObject - a model containing the name and children of the new entity extractor. -func (client ModelClient) AddCompositeEntity(ctx context.Context, appID uuid.UUID, versionID string, compositeModelCreateObject CompositeEntityModel) (result UUID, err error) { +func (client ModelClient) AddCompositeEntity(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, compositeModelCreateObject CompositeEntityModel) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddCompositeEntity") defer func() { @@ -131,7 +135,7 @@ func (client ModelClient) AddCompositeEntity(ctx context.Context, appID uuid.UUI tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddCompositeEntityPreparer(ctx, appID, versionID, compositeModelCreateObject) + req, err := client.AddCompositeEntityPreparer(ctx, azureRegion, azureCloud, appID, versionID, compositeModelCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCompositeEntity", nil, "Failure preparing request") return @@ -153,9 +157,10 @@ func (client ModelClient) AddCompositeEntity(ctx context.Context, appID uuid.UUI } // AddCompositeEntityPreparer prepares the AddCompositeEntity request. -func (client ModelClient) AddCompositeEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, compositeModelCreateObject CompositeEntityModel) (*http.Request, error) { +func (client ModelClient) AddCompositeEntityPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, compositeModelCreateObject CompositeEntityModel) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -166,7 +171,7 @@ func (client ModelClient) AddCompositeEntityPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities", pathParameters), autorest.WithJSON(compositeModelCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -192,13 +197,16 @@ func (client ModelClient) AddCompositeEntityResponder(resp *http.Response) (resu return } -// AddCompositeEntityChild creates a single child in an existing composite entity model. +// AddCompositeEntityChild creates a single child in an existing composite entity model in a version of the +// application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // cEntityID - the composite entity extractor ID. // compositeChildModelCreateObject - a model object containing the name of the new composite child model. -func (client ModelClient) AddCompositeEntityChild(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeChildModelCreateObject CompositeChildModelCreateObject) (result UUID, err error) { +func (client ModelClient) AddCompositeEntityChild(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeChildModelCreateObject CompositeChildModelCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddCompositeEntityChild") defer func() { @@ -209,7 +217,7 @@ func (client ModelClient) AddCompositeEntityChild(ctx context.Context, appID uui tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddCompositeEntityChildPreparer(ctx, appID, versionID, cEntityID, compositeChildModelCreateObject) + req, err := client.AddCompositeEntityChildPreparer(ctx, azureRegion, azureCloud, appID, versionID, cEntityID, compositeChildModelCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCompositeEntityChild", nil, "Failure preparing request") return @@ -231,9 +239,10 @@ func (client ModelClient) AddCompositeEntityChild(ctx context.Context, appID uui } // AddCompositeEntityChildPreparer prepares the AddCompositeEntityChild request. -func (client ModelClient) AddCompositeEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeChildModelCreateObject CompositeChildModelCreateObject) (*http.Request, error) { +func (client ModelClient) AddCompositeEntityChildPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeChildModelCreateObject CompositeChildModelCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -245,7 +254,7 @@ func (client ModelClient) AddCompositeEntityChildPreparer(ctx context.Context, a preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children", pathParameters), autorest.WithJSON(compositeChildModelCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -271,12 +280,15 @@ func (client ModelClient) AddCompositeEntityChildResponder(resp *http.Response) return } -// AddCustomPrebuiltDomain adds a customizable prebuilt domain along with all of its models to this application. +// AddCustomPrebuiltDomain adds a customizable prebuilt domain along with all of its intent and entity models in a +// version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // prebuiltDomainObject - a prebuilt domain create object containing the name of the domain. -func (client ModelClient) AddCustomPrebuiltDomain(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainObject PrebuiltDomainCreateBaseObject) (result ListUUID, err error) { +func (client ModelClient) AddCustomPrebuiltDomain(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, prebuiltDomainObject PrebuiltDomainCreateBaseObject) (result ListUUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddCustomPrebuiltDomain") defer func() { @@ -287,7 +299,7 @@ func (client ModelClient) AddCustomPrebuiltDomain(ctx context.Context, appID uui tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddCustomPrebuiltDomainPreparer(ctx, appID, versionID, prebuiltDomainObject) + req, err := client.AddCustomPrebuiltDomainPreparer(ctx, azureRegion, azureCloud, appID, versionID, prebuiltDomainObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltDomain", nil, "Failure preparing request") return @@ -309,9 +321,10 @@ func (client ModelClient) AddCustomPrebuiltDomain(ctx context.Context, appID uui } // AddCustomPrebuiltDomainPreparer prepares the AddCustomPrebuiltDomain request. -func (client ModelClient) AddCustomPrebuiltDomainPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainObject PrebuiltDomainCreateBaseObject) (*http.Request, error) { +func (client ModelClient) AddCustomPrebuiltDomainPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, prebuiltDomainObject PrebuiltDomainCreateBaseObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -322,7 +335,7 @@ func (client ModelClient) AddCustomPrebuiltDomainPreparer(ctx context.Context, a preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltdomains", pathParameters), autorest.WithJSON(prebuiltDomainObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -348,13 +361,15 @@ func (client ModelClient) AddCustomPrebuiltDomainResponder(resp *http.Response) return } -// AddCustomPrebuiltEntity adds a custom prebuilt entity model to the application. +// AddCustomPrebuiltEntity adds a prebuilt entity model to a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// prebuiltDomainModelCreateObject - a model object containing the name of the custom prebuilt entity and the -// name of the domain to which this model belongs. -func (client ModelClient) AddCustomPrebuiltEntity(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (result UUID, err error) { +// prebuiltDomainModelCreateObject - a model object containing the name of the prebuilt entity and the name of +// the domain to which this model belongs. +func (client ModelClient) AddCustomPrebuiltEntity(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddCustomPrebuiltEntity") defer func() { @@ -365,7 +380,7 @@ func (client ModelClient) AddCustomPrebuiltEntity(ctx context.Context, appID uui tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddCustomPrebuiltEntityPreparer(ctx, appID, versionID, prebuiltDomainModelCreateObject) + req, err := client.AddCustomPrebuiltEntityPreparer(ctx, azureRegion, azureCloud, appID, versionID, prebuiltDomainModelCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltEntity", nil, "Failure preparing request") return @@ -387,9 +402,10 @@ func (client ModelClient) AddCustomPrebuiltEntity(ctx context.Context, appID uui } // AddCustomPrebuiltEntityPreparer prepares the AddCustomPrebuiltEntity request. -func (client ModelClient) AddCustomPrebuiltEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (*http.Request, error) { +func (client ModelClient) AddCustomPrebuiltEntityPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -400,7 +416,7 @@ func (client ModelClient) AddCustomPrebuiltEntityPreparer(ctx context.Context, a preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities", pathParameters), autorest.WithJSON(prebuiltDomainModelCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -426,13 +442,15 @@ func (client ModelClient) AddCustomPrebuiltEntityResponder(resp *http.Response) return } -// AddCustomPrebuiltIntent adds a custom prebuilt intent model to the application. +// AddCustomPrebuiltIntent adds a customizable prebuilt intent model to a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// prebuiltDomainModelCreateObject - a model object containing the name of the custom prebuilt intent and the -// name of the domain to which this model belongs. -func (client ModelClient) AddCustomPrebuiltIntent(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (result UUID, err error) { +// prebuiltDomainModelCreateObject - a model object containing the name of the customizable prebuilt intent and +// the name of the domain to which this model belongs. +func (client ModelClient) AddCustomPrebuiltIntent(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddCustomPrebuiltIntent") defer func() { @@ -443,7 +461,7 @@ func (client ModelClient) AddCustomPrebuiltIntent(ctx context.Context, appID uui tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddCustomPrebuiltIntentPreparer(ctx, appID, versionID, prebuiltDomainModelCreateObject) + req, err := client.AddCustomPrebuiltIntentPreparer(ctx, azureRegion, azureCloud, appID, versionID, prebuiltDomainModelCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltIntent", nil, "Failure preparing request") return @@ -465,9 +483,10 @@ func (client ModelClient) AddCustomPrebuiltIntent(ctx context.Context, appID uui } // AddCustomPrebuiltIntentPreparer prepares the AddCustomPrebuiltIntent request. -func (client ModelClient) AddCustomPrebuiltIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (*http.Request, error) { +func (client ModelClient) AddCustomPrebuiltIntentPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -478,7 +497,7 @@ func (client ModelClient) AddCustomPrebuiltIntentPreparer(ctx context.Context, a preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltintents", pathParameters), autorest.WithJSON(prebuiltDomainModelCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -504,12 +523,14 @@ func (client ModelClient) AddCustomPrebuiltIntentResponder(resp *http.Response) return } -// AddEntity adds a simple entity extractor to the application. +// AddEntity adds a simple entity extractor to a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // modelCreateObject - a model object containing the name for the new simple entity extractor. -func (client ModelClient) AddEntity(ctx context.Context, appID uuid.UUID, versionID string, modelCreateObject ModelCreateObject) (result UUID, err error) { +func (client ModelClient) AddEntity(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, modelCreateObject ModelCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddEntity") defer func() { @@ -520,7 +541,7 @@ func (client ModelClient) AddEntity(ctx context.Context, appID uuid.UUID, versio tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddEntityPreparer(ctx, appID, versionID, modelCreateObject) + req, err := client.AddEntityPreparer(ctx, azureRegion, azureCloud, appID, versionID, modelCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddEntity", nil, "Failure preparing request") return @@ -542,9 +563,10 @@ func (client ModelClient) AddEntity(ctx context.Context, appID uuid.UUID, versio } // AddEntityPreparer prepares the AddEntity request. -func (client ModelClient) AddEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, modelCreateObject ModelCreateObject) (*http.Request, error) { +func (client ModelClient) AddEntityPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, modelCreateObject ModelCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -555,7 +577,7 @@ func (client ModelClient) AddEntityPreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities", pathParameters), autorest.WithJSON(modelCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -583,11 +605,13 @@ func (client ModelClient) AddEntityResponder(resp *http.Response) (result UUID, // AddExplicitListItem sends the add explicit list item request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the Pattern.Any entity extractor ID. // item - the new explicit list item. -func (client ModelClient) AddExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, item ExplicitListItemCreateObject) (result Int32, err error) { +func (client ModelClient) AddExplicitListItem(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, item ExplicitListItemCreateObject) (result Int32, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddExplicitListItem") defer func() { @@ -598,7 +622,7 @@ func (client ModelClient) AddExplicitListItem(ctx context.Context, appID uuid.UU tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddExplicitListItemPreparer(ctx, appID, versionID, entityID, item) + req, err := client.AddExplicitListItemPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, item) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddExplicitListItem", nil, "Failure preparing request") return @@ -620,9 +644,10 @@ func (client ModelClient) AddExplicitListItem(ctx context.Context, appID uuid.UU } // AddExplicitListItemPreparer prepares the AddExplicitListItem request. -func (client ModelClient) AddExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, item ExplicitListItemCreateObject) (*http.Request, error) { +func (client ModelClient) AddExplicitListItemPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, item ExplicitListItemCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -634,7 +659,7 @@ func (client ModelClient) AddExplicitListItemPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist", pathParameters), autorest.WithJSON(item)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -660,12 +685,14 @@ func (client ModelClient) AddExplicitListItemResponder(resp *http.Response) (res return } -// AddHierarchicalEntity adds a hierarchical entity extractor to the application version. +// AddHierarchicalEntity adds a hierarchical entity extractor to a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // hierarchicalModelCreateObject - a model containing the name and children of the new entity extractor. -func (client ModelClient) AddHierarchicalEntity(ctx context.Context, appID uuid.UUID, versionID string, hierarchicalModelCreateObject HierarchicalEntityModel) (result UUID, err error) { +func (client ModelClient) AddHierarchicalEntity(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hierarchicalModelCreateObject HierarchicalEntityModel) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddHierarchicalEntity") defer func() { @@ -676,7 +703,7 @@ func (client ModelClient) AddHierarchicalEntity(ctx context.Context, appID uuid. tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddHierarchicalEntityPreparer(ctx, appID, versionID, hierarchicalModelCreateObject) + req, err := client.AddHierarchicalEntityPreparer(ctx, azureRegion, azureCloud, appID, versionID, hierarchicalModelCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddHierarchicalEntity", nil, "Failure preparing request") return @@ -698,9 +725,10 @@ func (client ModelClient) AddHierarchicalEntity(ctx context.Context, appID uuid. } // AddHierarchicalEntityPreparer prepares the AddHierarchicalEntity request. -func (client ModelClient) AddHierarchicalEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, hierarchicalModelCreateObject HierarchicalEntityModel) (*http.Request, error) { +func (client ModelClient) AddHierarchicalEntityPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hierarchicalModelCreateObject HierarchicalEntityModel) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -711,7 +739,7 @@ func (client ModelClient) AddHierarchicalEntityPreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities", pathParameters), autorest.WithJSON(hierarchicalModelCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -737,13 +765,16 @@ func (client ModelClient) AddHierarchicalEntityResponder(resp *http.Response) (r return } -// AddHierarchicalEntityChild creates a single child in an existing hierarchical entity model. +// AddHierarchicalEntityChild creates a single child in an existing hierarchical entity model in a version of the +// application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // hEntityID - the hierarchical entity extractor ID. // hierarchicalChildModelCreateObject - a model object containing the name of the new hierarchical child model. -func (client ModelClient) AddHierarchicalEntityChild(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalChildModelCreateObject HierarchicalChildModelCreateObject) (result UUID, err error) { +func (client ModelClient) AddHierarchicalEntityChild(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalChildModelCreateObject HierarchicalChildModelCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddHierarchicalEntityChild") defer func() { @@ -754,7 +785,7 @@ func (client ModelClient) AddHierarchicalEntityChild(ctx context.Context, appID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddHierarchicalEntityChildPreparer(ctx, appID, versionID, hEntityID, hierarchicalChildModelCreateObject) + req, err := client.AddHierarchicalEntityChildPreparer(ctx, azureRegion, azureCloud, appID, versionID, hEntityID, hierarchicalChildModelCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddHierarchicalEntityChild", nil, "Failure preparing request") return @@ -776,9 +807,10 @@ func (client ModelClient) AddHierarchicalEntityChild(ctx context.Context, appID } // AddHierarchicalEntityChildPreparer prepares the AddHierarchicalEntityChild request. -func (client ModelClient) AddHierarchicalEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalChildModelCreateObject HierarchicalChildModelCreateObject) (*http.Request, error) { +func (client ModelClient) AddHierarchicalEntityChildPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalChildModelCreateObject HierarchicalChildModelCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -790,7 +822,7 @@ func (client ModelClient) AddHierarchicalEntityChildPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children", pathParameters), autorest.WithJSON(hierarchicalChildModelCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -816,12 +848,14 @@ func (client ModelClient) AddHierarchicalEntityChildResponder(resp *http.Respons return } -// AddIntent adds an intent classifier to the application. +// AddIntent adds an intent to a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// intentCreateObject - a model object containing the name of the new intent classifier. -func (client ModelClient) AddIntent(ctx context.Context, appID uuid.UUID, versionID string, intentCreateObject ModelCreateObject) (result UUID, err error) { +// intentCreateObject - a model object containing the name of the new intent. +func (client ModelClient) AddIntent(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, intentCreateObject ModelCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddIntent") defer func() { @@ -832,7 +866,7 @@ func (client ModelClient) AddIntent(ctx context.Context, appID uuid.UUID, versio tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddIntentPreparer(ctx, appID, versionID, intentCreateObject) + req, err := client.AddIntentPreparer(ctx, azureRegion, azureCloud, appID, versionID, intentCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddIntent", nil, "Failure preparing request") return @@ -854,9 +888,10 @@ func (client ModelClient) AddIntent(ctx context.Context, appID uuid.UUID, versio } // AddIntentPreparer prepares the AddIntent request. -func (client ModelClient) AddIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentCreateObject ModelCreateObject) (*http.Request, error) { +func (client ModelClient) AddIntentPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, intentCreateObject ModelCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -867,7 +902,7 @@ func (client ModelClient) AddIntentPreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents", pathParameters), autorest.WithJSON(intentCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -893,12 +928,14 @@ func (client ModelClient) AddIntentResponder(resp *http.Response) (result UUID, return } -// AddPrebuilt adds a list of prebuilt entity extractors to the application. +// AddPrebuilt adds a list of prebuilt entities to a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // prebuiltExtractorNames - an array of prebuilt entity extractor names. -func (client ModelClient) AddPrebuilt(ctx context.Context, appID uuid.UUID, versionID string, prebuiltExtractorNames []string) (result ListPrebuiltEntityExtractor, err error) { +func (client ModelClient) AddPrebuilt(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, prebuiltExtractorNames []string) (result ListPrebuiltEntityExtractor, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddPrebuilt") defer func() { @@ -915,7 +952,7 @@ func (client ModelClient) AddPrebuilt(ctx context.Context, appID uuid.UUID, vers return result, validation.NewError("authoring.ModelClient", "AddPrebuilt", err.Error()) } - req, err := client.AddPrebuiltPreparer(ctx, appID, versionID, prebuiltExtractorNames) + req, err := client.AddPrebuiltPreparer(ctx, azureRegion, azureCloud, appID, versionID, prebuiltExtractorNames) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddPrebuilt", nil, "Failure preparing request") return @@ -937,9 +974,10 @@ func (client ModelClient) AddPrebuilt(ctx context.Context, appID uuid.UUID, vers } // AddPrebuiltPreparer prepares the AddPrebuilt request. -func (client ModelClient) AddPrebuiltPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltExtractorNames []string) (*http.Request, error) { +func (client ModelClient) AddPrebuiltPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, prebuiltExtractorNames []string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -950,7 +988,7 @@ func (client ModelClient) AddPrebuiltPreparer(ctx context.Context, appID uuid.UU preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts", pathParameters), autorest.WithJSON(prebuiltExtractorNames)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -976,13 +1014,15 @@ func (client ModelClient) AddPrebuiltResponder(resp *http.Response) (result List return } -// AddSubList adds a list to an existing closed list. +// AddSubList adds a sublist to an existing list entity in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// clEntityID - the closed list entity extractor ID. +// clEntityID - the list entity extractor ID. // wordListCreateObject - words list. -func (client ModelClient) AddSubList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, wordListCreateObject WordListObject) (result Int32, err error) { +func (client ModelClient) AddSubList(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID, wordListCreateObject WordListObject) (result Int64, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddSubList") defer func() { @@ -993,7 +1033,7 @@ func (client ModelClient) AddSubList(ctx context.Context, appID uuid.UUID, versi tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddSubListPreparer(ctx, appID, versionID, clEntityID, wordListCreateObject) + req, err := client.AddSubListPreparer(ctx, azureRegion, azureCloud, appID, versionID, clEntityID, wordListCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddSubList", nil, "Failure preparing request") return @@ -1015,9 +1055,10 @@ func (client ModelClient) AddSubList(ctx context.Context, appID uuid.UUID, versi } // AddSubListPreparer prepares the AddSubList request. -func (client ModelClient) AddSubListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, wordListCreateObject WordListObject) (*http.Request, error) { +func (client ModelClient) AddSubListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID, wordListCreateObject WordListObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1029,7 +1070,7 @@ func (client ModelClient) AddSubListPreparer(ctx context.Context, appID uuid.UUI preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists", pathParameters), autorest.WithJSON(wordListCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1044,7 +1085,7 @@ func (client ModelClient) AddSubListSender(req *http.Request) (*http.Response, e // AddSubListResponder handles the response to the AddSubList request. The method always // closes the http.Response Body. -func (client ModelClient) AddSubListResponder(resp *http.Response) (result Int32, err error) { +func (client ModelClient) AddSubListResponder(resp *http.Response) (result Int64, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -1057,11 +1098,13 @@ func (client ModelClient) AddSubListResponder(resp *http.Response) (result Int32 // CreateClosedListEntityRole sends the create closed list entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity model ID. // entityRoleCreateObject - an entity role object containing the name of role. -func (client ModelClient) CreateClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { +func (client ModelClient) CreateClosedListEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreateClosedListEntityRole") defer func() { @@ -1072,7 +1115,7 @@ func (client ModelClient) CreateClosedListEntityRole(ctx context.Context, appID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CreateClosedListEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject) + req, err := client.CreateClosedListEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, entityRoleCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateClosedListEntityRole", nil, "Failure preparing request") return @@ -1094,9 +1137,10 @@ func (client ModelClient) CreateClosedListEntityRole(ctx context.Context, appID } // CreateClosedListEntityRolePreparer prepares the CreateClosedListEntityRole request. -func (client ModelClient) CreateClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { +func (client ModelClient) CreateClosedListEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1108,7 +1152,7 @@ func (client ModelClient) CreateClosedListEntityRolePreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles", pathParameters), autorest.WithJSON(entityRoleCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1136,11 +1180,13 @@ func (client ModelClient) CreateClosedListEntityRoleResponder(resp *http.Respons // CreateCompositeEntityRole sends the create composite entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // cEntityID - the composite entity extractor ID. // entityRoleCreateObject - an entity role object containing the name of role. -func (client ModelClient) CreateCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { +func (client ModelClient) CreateCompositeEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreateCompositeEntityRole") defer func() { @@ -1151,7 +1197,7 @@ func (client ModelClient) CreateCompositeEntityRole(ctx context.Context, appID u tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CreateCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, entityRoleCreateObject) + req, err := client.CreateCompositeEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, cEntityID, entityRoleCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateCompositeEntityRole", nil, "Failure preparing request") return @@ -1173,9 +1219,10 @@ func (client ModelClient) CreateCompositeEntityRole(ctx context.Context, appID u } // CreateCompositeEntityRolePreparer prepares the CreateCompositeEntityRole request. -func (client ModelClient) CreateCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { +func (client ModelClient) CreateCompositeEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1187,7 +1234,7 @@ func (client ModelClient) CreateCompositeEntityRolePreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles", pathParameters), autorest.WithJSON(entityRoleCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1215,11 +1262,13 @@ func (client ModelClient) CreateCompositeEntityRoleResponder(resp *http.Response // CreateCustomPrebuiltEntityRole sends the create custom prebuilt entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity model ID. // entityRoleCreateObject - an entity role object containing the name of role. -func (client ModelClient) CreateCustomPrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { +func (client ModelClient) CreateCustomPrebuiltEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreateCustomPrebuiltEntityRole") defer func() { @@ -1230,7 +1279,7 @@ func (client ModelClient) CreateCustomPrebuiltEntityRole(ctx context.Context, ap tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CreateCustomPrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject) + req, err := client.CreateCustomPrebuiltEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, entityRoleCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateCustomPrebuiltEntityRole", nil, "Failure preparing request") return @@ -1252,9 +1301,10 @@ func (client ModelClient) CreateCustomPrebuiltEntityRole(ctx context.Context, ap } // CreateCustomPrebuiltEntityRolePreparer prepares the CreateCustomPrebuiltEntityRole request. -func (client ModelClient) CreateCustomPrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { +func (client ModelClient) CreateCustomPrebuiltEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1266,7 +1316,7 @@ func (client ModelClient) CreateCustomPrebuiltEntityRolePreparer(ctx context.Con preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles", pathParameters), autorest.WithJSON(entityRoleCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1294,11 +1344,13 @@ func (client ModelClient) CreateCustomPrebuiltEntityRoleResponder(resp *http.Res // CreateEntityRole sends the create entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity model ID. // entityRoleCreateObject - an entity role object containing the name of role. -func (client ModelClient) CreateEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { +func (client ModelClient) CreateEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreateEntityRole") defer func() { @@ -1309,7 +1361,7 @@ func (client ModelClient) CreateEntityRole(ctx context.Context, appID uuid.UUID, tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CreateEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject) + req, err := client.CreateEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, entityRoleCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateEntityRole", nil, "Failure preparing request") return @@ -1331,9 +1383,10 @@ func (client ModelClient) CreateEntityRole(ctx context.Context, appID uuid.UUID, } // CreateEntityRolePreparer prepares the CreateEntityRole request. -func (client ModelClient) CreateEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { +func (client ModelClient) CreateEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1345,7 +1398,7 @@ func (client ModelClient) CreateEntityRolePreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles", pathParameters), autorest.WithJSON(entityRoleCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1373,11 +1426,13 @@ func (client ModelClient) CreateEntityRoleResponder(resp *http.Response) (result // CreateHierarchicalEntityRole sends the create hierarchical entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // hEntityID - the hierarchical entity extractor ID. // entityRoleCreateObject - an entity role object containing the name of role. -func (client ModelClient) CreateHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { +func (client ModelClient) CreateHierarchicalEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreateHierarchicalEntityRole") defer func() { @@ -1388,7 +1443,7 @@ func (client ModelClient) CreateHierarchicalEntityRole(ctx context.Context, appI tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CreateHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, entityRoleCreateObject) + req, err := client.CreateHierarchicalEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, hEntityID, entityRoleCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateHierarchicalEntityRole", nil, "Failure preparing request") return @@ -1410,9 +1465,10 @@ func (client ModelClient) CreateHierarchicalEntityRole(ctx context.Context, appI } // CreateHierarchicalEntityRolePreparer prepares the CreateHierarchicalEntityRole request. -func (client ModelClient) CreateHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { +func (client ModelClient) CreateHierarchicalEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1424,7 +1480,7 @@ func (client ModelClient) CreateHierarchicalEntityRolePreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles", pathParameters), autorest.WithJSON(entityRoleCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1452,11 +1508,13 @@ func (client ModelClient) CreateHierarchicalEntityRoleResponder(resp *http.Respo // CreatePatternAnyEntityModel sends the create pattern any entity model request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // extractorCreateObject - a model object containing the name and explicit list for the new Pattern.Any entity // extractor. -func (client ModelClient) CreatePatternAnyEntityModel(ctx context.Context, appID uuid.UUID, versionID string, extractorCreateObject PatternAnyModelCreateObject) (result UUID, err error) { +func (client ModelClient) CreatePatternAnyEntityModel(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, extractorCreateObject PatternAnyModelCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreatePatternAnyEntityModel") defer func() { @@ -1467,7 +1525,7 @@ func (client ModelClient) CreatePatternAnyEntityModel(ctx context.Context, appID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CreatePatternAnyEntityModelPreparer(ctx, appID, versionID, extractorCreateObject) + req, err := client.CreatePatternAnyEntityModelPreparer(ctx, azureRegion, azureCloud, appID, versionID, extractorCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePatternAnyEntityModel", nil, "Failure preparing request") return @@ -1489,9 +1547,10 @@ func (client ModelClient) CreatePatternAnyEntityModel(ctx context.Context, appID } // CreatePatternAnyEntityModelPreparer prepares the CreatePatternAnyEntityModel request. -func (client ModelClient) CreatePatternAnyEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, extractorCreateObject PatternAnyModelCreateObject) (*http.Request, error) { +func (client ModelClient) CreatePatternAnyEntityModelPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, extractorCreateObject PatternAnyModelCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1502,7 +1561,7 @@ func (client ModelClient) CreatePatternAnyEntityModelPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities", pathParameters), autorest.WithJSON(extractorCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1530,11 +1589,13 @@ func (client ModelClient) CreatePatternAnyEntityModelResponder(resp *http.Respon // CreatePatternAnyEntityRole sends the create pattern any entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity model ID. // entityRoleCreateObject - an entity role object containing the name of role. -func (client ModelClient) CreatePatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { +func (client ModelClient) CreatePatternAnyEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreatePatternAnyEntityRole") defer func() { @@ -1545,7 +1606,7 @@ func (client ModelClient) CreatePatternAnyEntityRole(ctx context.Context, appID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CreatePatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject) + req, err := client.CreatePatternAnyEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, entityRoleCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePatternAnyEntityRole", nil, "Failure preparing request") return @@ -1567,9 +1628,10 @@ func (client ModelClient) CreatePatternAnyEntityRole(ctx context.Context, appID } // CreatePatternAnyEntityRolePreparer prepares the CreatePatternAnyEntityRole request. -func (client ModelClient) CreatePatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { +func (client ModelClient) CreatePatternAnyEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1581,7 +1643,7 @@ func (client ModelClient) CreatePatternAnyEntityRolePreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles", pathParameters), autorest.WithJSON(entityRoleCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1609,11 +1671,13 @@ func (client ModelClient) CreatePatternAnyEntityRoleResponder(resp *http.Respons // CreatePrebuiltEntityRole sends the create prebuilt entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity model ID. // entityRoleCreateObject - an entity role object containing the name of role. -func (client ModelClient) CreatePrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { +func (client ModelClient) CreatePrebuiltEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreatePrebuiltEntityRole") defer func() { @@ -1624,7 +1688,7 @@ func (client ModelClient) CreatePrebuiltEntityRole(ctx context.Context, appID uu tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CreatePrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject) + req, err := client.CreatePrebuiltEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, entityRoleCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePrebuiltEntityRole", nil, "Failure preparing request") return @@ -1646,9 +1710,10 @@ func (client ModelClient) CreatePrebuiltEntityRole(ctx context.Context, appID uu } // CreatePrebuiltEntityRolePreparer prepares the CreatePrebuiltEntityRole request. -func (client ModelClient) CreatePrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { +func (client ModelClient) CreatePrebuiltEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1660,7 +1725,7 @@ func (client ModelClient) CreatePrebuiltEntityRolePreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles", pathParameters), autorest.WithJSON(entityRoleCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1688,11 +1753,13 @@ func (client ModelClient) CreatePrebuiltEntityRoleResponder(resp *http.Response) // CreateRegexEntityModel sends the create regex entity model request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// regexEntityExtractorCreateObj - a model object containing the name and regex pattern for the new regex -// entity extractor. -func (client ModelClient) CreateRegexEntityModel(ctx context.Context, appID uuid.UUID, versionID string, regexEntityExtractorCreateObj RegexModelCreateObject) (result UUID, err error) { +// regexEntityExtractorCreateObj - a model object containing the name and regex pattern for the new regular +// expression entity extractor. +func (client ModelClient) CreateRegexEntityModel(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, regexEntityExtractorCreateObj RegexModelCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreateRegexEntityModel") defer func() { @@ -1703,7 +1770,7 @@ func (client ModelClient) CreateRegexEntityModel(ctx context.Context, appID uuid tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CreateRegexEntityModelPreparer(ctx, appID, versionID, regexEntityExtractorCreateObj) + req, err := client.CreateRegexEntityModelPreparer(ctx, azureRegion, azureCloud, appID, versionID, regexEntityExtractorCreateObj) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateRegexEntityModel", nil, "Failure preparing request") return @@ -1725,9 +1792,10 @@ func (client ModelClient) CreateRegexEntityModel(ctx context.Context, appID uuid } // CreateRegexEntityModelPreparer prepares the CreateRegexEntityModel request. -func (client ModelClient) CreateRegexEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityExtractorCreateObj RegexModelCreateObject) (*http.Request, error) { +func (client ModelClient) CreateRegexEntityModelPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, regexEntityExtractorCreateObj RegexModelCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1738,7 +1806,7 @@ func (client ModelClient) CreateRegexEntityModelPreparer(ctx context.Context, ap preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities", pathParameters), autorest.WithJSON(regexEntityExtractorCreateObj)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1766,11 +1834,13 @@ func (client ModelClient) CreateRegexEntityModelResponder(resp *http.Response) ( // CreateRegexEntityRole sends the create regex entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity model ID. // entityRoleCreateObject - an entity role object containing the name of role. -func (client ModelClient) CreateRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { +func (client ModelClient) CreateRegexEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreateRegexEntityRole") defer func() { @@ -1781,7 +1851,7 @@ func (client ModelClient) CreateRegexEntityRole(ctx context.Context, appID uuid. tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CreateRegexEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject) + req, err := client.CreateRegexEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, entityRoleCreateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateRegexEntityRole", nil, "Failure preparing request") return @@ -1803,9 +1873,10 @@ func (client ModelClient) CreateRegexEntityRole(ctx context.Context, appID uuid. } // CreateRegexEntityRolePreparer prepares the CreateRegexEntityRole request. -func (client ModelClient) CreateRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { +func (client ModelClient) CreateRegexEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1817,7 +1888,7 @@ func (client ModelClient) CreateRegexEntityRolePreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles", pathParameters), autorest.WithJSON(entityRoleCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1843,12 +1914,14 @@ func (client ModelClient) CreateRegexEntityRoleResponder(resp *http.Response) (r return } -// DeleteClosedList deletes a closed list model from the application. +// DeleteClosedList deletes a list entity model from a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// clEntityID - the closed list model ID. -func (client ModelClient) DeleteClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (result OperationStatus, err error) { +// clEntityID - the list entity model ID. +func (client ModelClient) DeleteClosedList(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteClosedList") defer func() { @@ -1859,7 +1932,7 @@ func (client ModelClient) DeleteClosedList(ctx context.Context, appID uuid.UUID, tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteClosedListPreparer(ctx, appID, versionID, clEntityID) + req, err := client.DeleteClosedListPreparer(ctx, azureRegion, azureCloud, appID, versionID, clEntityID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteClosedList", nil, "Failure preparing request") return @@ -1881,9 +1954,10 @@ func (client ModelClient) DeleteClosedList(ctx context.Context, appID uuid.UUID, } // DeleteClosedListPreparer prepares the DeleteClosedList request. -func (client ModelClient) DeleteClosedListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeleteClosedListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1894,7 +1968,7 @@ func (client ModelClient) DeleteClosedListPreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1921,11 +1995,13 @@ func (client ModelClient) DeleteClosedListResponder(resp *http.Response) (result // DeleteClosedListEntityRole sends the delete closed list entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity ID. // roleID - the entity role Id. -func (client ModelClient) DeleteClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { +func (client ModelClient) DeleteClosedListEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteClosedListEntityRole") defer func() { @@ -1936,7 +2012,7 @@ func (client ModelClient) DeleteClosedListEntityRole(ctx context.Context, appID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteClosedListEntityRolePreparer(ctx, appID, versionID, entityID, roleID) + req, err := client.DeleteClosedListEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteClosedListEntityRole", nil, "Failure preparing request") return @@ -1958,9 +2034,10 @@ func (client ModelClient) DeleteClosedListEntityRole(ctx context.Context, appID } // DeleteClosedListEntityRolePreparer prepares the DeleteClosedListEntityRole request. -func (client ModelClient) DeleteClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeleteClosedListEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -1972,7 +2049,7 @@ func (client ModelClient) DeleteClosedListEntityRolePreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1997,12 +2074,14 @@ func (client ModelClient) DeleteClosedListEntityRoleResponder(resp *http.Respons return } -// DeleteCompositeEntity deletes a composite entity extractor from the application. +// DeleteCompositeEntity deletes a composite entity from a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // cEntityID - the composite entity extractor ID. -func (client ModelClient) DeleteCompositeEntity(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result OperationStatus, err error) { +func (client ModelClient) DeleteCompositeEntity(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteCompositeEntity") defer func() { @@ -2013,7 +2092,7 @@ func (client ModelClient) DeleteCompositeEntity(ctx context.Context, appID uuid. tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteCompositeEntityPreparer(ctx, appID, versionID, cEntityID) + req, err := client.DeleteCompositeEntityPreparer(ctx, azureRegion, azureCloud, appID, versionID, cEntityID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntity", nil, "Failure preparing request") return @@ -2035,9 +2114,10 @@ func (client ModelClient) DeleteCompositeEntity(ctx context.Context, appID uuid. } // DeleteCompositeEntityPreparer prepares the DeleteCompositeEntity request. -func (client ModelClient) DeleteCompositeEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeleteCompositeEntityPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -2048,7 +2128,7 @@ func (client ModelClient) DeleteCompositeEntityPreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2073,13 +2153,15 @@ func (client ModelClient) DeleteCompositeEntityResponder(resp *http.Response) (r return } -// DeleteCompositeEntityChild deletes a composite entity extractor child from the application. +// DeleteCompositeEntityChild deletes a composite entity extractor child from a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // cEntityID - the composite entity extractor ID. // cChildID - the hierarchical entity extractor child ID. -func (client ModelClient) DeleteCompositeEntityChild(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, cChildID uuid.UUID) (result OperationStatus, err error) { +func (client ModelClient) DeleteCompositeEntityChild(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, cChildID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteCompositeEntityChild") defer func() { @@ -2090,7 +2172,7 @@ func (client ModelClient) DeleteCompositeEntityChild(ctx context.Context, appID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteCompositeEntityChildPreparer(ctx, appID, versionID, cEntityID, cChildID) + req, err := client.DeleteCompositeEntityChildPreparer(ctx, azureRegion, azureCloud, appID, versionID, cEntityID, cChildID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntityChild", nil, "Failure preparing request") return @@ -2112,9 +2194,10 @@ func (client ModelClient) DeleteCompositeEntityChild(ctx context.Context, appID } // DeleteCompositeEntityChildPreparer prepares the DeleteCompositeEntityChild request. -func (client ModelClient) DeleteCompositeEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, cChildID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeleteCompositeEntityChildPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, cChildID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -2126,7 +2209,7 @@ func (client ModelClient) DeleteCompositeEntityChildPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children/{cChildId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2153,11 +2236,13 @@ func (client ModelClient) DeleteCompositeEntityChildResponder(resp *http.Respons // DeleteCompositeEntityRole sends the delete composite entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // cEntityID - the composite entity extractor ID. // roleID - the entity role Id. -func (client ModelClient) DeleteCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { +func (client ModelClient) DeleteCompositeEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteCompositeEntityRole") defer func() { @@ -2168,7 +2253,7 @@ func (client ModelClient) DeleteCompositeEntityRole(ctx context.Context, appID u tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, roleID) + req, err := client.DeleteCompositeEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, cEntityID, roleID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntityRole", nil, "Failure preparing request") return @@ -2190,9 +2275,10 @@ func (client ModelClient) DeleteCompositeEntityRole(ctx context.Context, appID u } // DeleteCompositeEntityRolePreparer prepares the DeleteCompositeEntityRole request. -func (client ModelClient) DeleteCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeleteCompositeEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -2204,7 +2290,7 @@ func (client ModelClient) DeleteCompositeEntityRolePreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2231,11 +2317,13 @@ func (client ModelClient) DeleteCompositeEntityRoleResponder(resp *http.Response // DeleteCustomEntityRole sends the delete custom entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity ID. // roleID - the entity role Id. -func (client ModelClient) DeleteCustomEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { +func (client ModelClient) DeleteCustomEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteCustomEntityRole") defer func() { @@ -2246,7 +2334,7 @@ func (client ModelClient) DeleteCustomEntityRole(ctx context.Context, appID uuid tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteCustomEntityRolePreparer(ctx, appID, versionID, entityID, roleID) + req, err := client.DeleteCustomEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCustomEntityRole", nil, "Failure preparing request") return @@ -2268,9 +2356,10 @@ func (client ModelClient) DeleteCustomEntityRole(ctx context.Context, appID uuid } // DeleteCustomEntityRolePreparer prepares the DeleteCustomEntityRole request. -func (client ModelClient) DeleteCustomEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeleteCustomEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -2282,7 +2371,7 @@ func (client ModelClient) DeleteCustomEntityRolePreparer(ctx context.Context, ap preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2307,12 +2396,14 @@ func (client ModelClient) DeleteCustomEntityRoleResponder(resp *http.Response) ( return } -// DeleteCustomPrebuiltDomain deletes a prebuilt domain's models from the application. +// DeleteCustomPrebuiltDomain deletes a prebuilt domain's models in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // domainName - domain name. -func (client ModelClient) DeleteCustomPrebuiltDomain(ctx context.Context, appID uuid.UUID, versionID string, domainName string) (result OperationStatus, err error) { +func (client ModelClient) DeleteCustomPrebuiltDomain(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, domainName string) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteCustomPrebuiltDomain") defer func() { @@ -2323,7 +2414,7 @@ func (client ModelClient) DeleteCustomPrebuiltDomain(ctx context.Context, appID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteCustomPrebuiltDomainPreparer(ctx, appID, versionID, domainName) + req, err := client.DeleteCustomPrebuiltDomainPreparer(ctx, azureRegion, azureCloud, appID, versionID, domainName) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCustomPrebuiltDomain", nil, "Failure preparing request") return @@ -2345,9 +2436,10 @@ func (client ModelClient) DeleteCustomPrebuiltDomain(ctx context.Context, appID } // DeleteCustomPrebuiltDomainPreparer prepares the DeleteCustomPrebuiltDomain request. -func (client ModelClient) DeleteCustomPrebuiltDomainPreparer(ctx context.Context, appID uuid.UUID, versionID string, domainName string) (*http.Request, error) { +func (client ModelClient) DeleteCustomPrebuiltDomainPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, domainName string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -2358,7 +2450,7 @@ func (client ModelClient) DeleteCustomPrebuiltDomainPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltdomains/{domainName}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2383,12 +2475,14 @@ func (client ModelClient) DeleteCustomPrebuiltDomainResponder(resp *http.Respons return } -// DeleteEntity deletes an entity extractor from the application. +// DeleteEntity deletes an entity from a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity extractor ID. -func (client ModelClient) DeleteEntity(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result OperationStatus, err error) { +func (client ModelClient) DeleteEntity(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteEntity") defer func() { @@ -2399,7 +2493,7 @@ func (client ModelClient) DeleteEntity(ctx context.Context, appID uuid.UUID, ver tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteEntityPreparer(ctx, appID, versionID, entityID) + req, err := client.DeleteEntityPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntity", nil, "Failure preparing request") return @@ -2421,9 +2515,10 @@ func (client ModelClient) DeleteEntity(ctx context.Context, appID uuid.UUID, ver } // DeleteEntityPreparer prepares the DeleteEntity request. -func (client ModelClient) DeleteEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeleteEntityPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -2434,7 +2529,7 @@ func (client ModelClient) DeleteEntityPreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2461,11 +2556,13 @@ func (client ModelClient) DeleteEntityResponder(resp *http.Response) (result Ope // DeleteEntityRole sends the delete entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity ID. // roleID - the entity role Id. -func (client ModelClient) DeleteEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { +func (client ModelClient) DeleteEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteEntityRole") defer func() { @@ -2476,7 +2573,7 @@ func (client ModelClient) DeleteEntityRole(ctx context.Context, appID uuid.UUID, tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteEntityRolePreparer(ctx, appID, versionID, entityID, roleID) + req, err := client.DeleteEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntityRole", nil, "Failure preparing request") return @@ -2498,9 +2595,10 @@ func (client ModelClient) DeleteEntityRole(ctx context.Context, appID uuid.UUID, } // DeleteEntityRolePreparer prepares the DeleteEntityRole request. -func (client ModelClient) DeleteEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeleteEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -2512,7 +2610,7 @@ func (client ModelClient) DeleteEntityRolePreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2539,11 +2637,13 @@ func (client ModelClient) DeleteEntityRoleResponder(resp *http.Response) (result // DeleteExplicitListItem sends the delete explicit list item request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the pattern.any entity id. // itemID - the explicit list item which will be deleted. -func (client ModelClient) DeleteExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (result OperationStatus, err error) { +func (client ModelClient) DeleteExplicitListItem(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteExplicitListItem") defer func() { @@ -2554,7 +2654,7 @@ func (client ModelClient) DeleteExplicitListItem(ctx context.Context, appID uuid tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteExplicitListItemPreparer(ctx, appID, versionID, entityID, itemID) + req, err := client.DeleteExplicitListItemPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, itemID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteExplicitListItem", nil, "Failure preparing request") return @@ -2576,9 +2676,10 @@ func (client ModelClient) DeleteExplicitListItem(ctx context.Context, appID uuid } // DeleteExplicitListItemPreparer prepares the DeleteExplicitListItem request. -func (client ModelClient) DeleteExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (*http.Request, error) { +func (client ModelClient) DeleteExplicitListItemPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -2590,7 +2691,7 @@ func (client ModelClient) DeleteExplicitListItemPreparer(ctx context.Context, ap preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2615,12 +2716,14 @@ func (client ModelClient) DeleteExplicitListItemResponder(resp *http.Response) ( return } -// DeleteHierarchicalEntity deletes a hierarchical entity extractor from the application version. +// DeleteHierarchicalEntity deletes a hierarchical entity from a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // hEntityID - the hierarchical entity extractor ID. -func (client ModelClient) DeleteHierarchicalEntity(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result OperationStatus, err error) { +func (client ModelClient) DeleteHierarchicalEntity(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteHierarchicalEntity") defer func() { @@ -2631,7 +2734,7 @@ func (client ModelClient) DeleteHierarchicalEntity(ctx context.Context, appID uu tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteHierarchicalEntityPreparer(ctx, appID, versionID, hEntityID) + req, err := client.DeleteHierarchicalEntityPreparer(ctx, azureRegion, azureCloud, appID, versionID, hEntityID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntity", nil, "Failure preparing request") return @@ -2653,9 +2756,10 @@ func (client ModelClient) DeleteHierarchicalEntity(ctx context.Context, appID uu } // DeleteHierarchicalEntityPreparer prepares the DeleteHierarchicalEntity request. -func (client ModelClient) DeleteHierarchicalEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeleteHierarchicalEntityPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -2666,7 +2770,7 @@ func (client ModelClient) DeleteHierarchicalEntityPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2691,13 +2795,15 @@ func (client ModelClient) DeleteHierarchicalEntityResponder(resp *http.Response) return } -// DeleteHierarchicalEntityChild deletes a hierarchical entity extractor child from the application. +// DeleteHierarchicalEntityChild deletes a hierarchical entity extractor child in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // hEntityID - the hierarchical entity extractor ID. // hChildID - the hierarchical entity extractor child ID. -func (client ModelClient) DeleteHierarchicalEntityChild(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (result OperationStatus, err error) { +func (client ModelClient) DeleteHierarchicalEntityChild(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteHierarchicalEntityChild") defer func() { @@ -2708,7 +2814,7 @@ func (client ModelClient) DeleteHierarchicalEntityChild(ctx context.Context, app tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteHierarchicalEntityChildPreparer(ctx, appID, versionID, hEntityID, hChildID) + req, err := client.DeleteHierarchicalEntityChildPreparer(ctx, azureRegion, azureCloud, appID, versionID, hEntityID, hChildID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntityChild", nil, "Failure preparing request") return @@ -2730,9 +2836,10 @@ func (client ModelClient) DeleteHierarchicalEntityChild(ctx context.Context, app } // DeleteHierarchicalEntityChildPreparer prepares the DeleteHierarchicalEntityChild request. -func (client ModelClient) DeleteHierarchicalEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeleteHierarchicalEntityChildPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -2744,7 +2851,7 @@ func (client ModelClient) DeleteHierarchicalEntityChildPreparer(ctx context.Cont preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2771,11 +2878,13 @@ func (client ModelClient) DeleteHierarchicalEntityChildResponder(resp *http.Resp // DeleteHierarchicalEntityRole sends the delete hierarchical entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // hEntityID - the hierarchical entity extractor ID. // roleID - the entity role Id. -func (client ModelClient) DeleteHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { +func (client ModelClient) DeleteHierarchicalEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteHierarchicalEntityRole") defer func() { @@ -2786,7 +2895,7 @@ func (client ModelClient) DeleteHierarchicalEntityRole(ctx context.Context, appI tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, roleID) + req, err := client.DeleteHierarchicalEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, hEntityID, roleID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntityRole", nil, "Failure preparing request") return @@ -2808,9 +2917,10 @@ func (client ModelClient) DeleteHierarchicalEntityRole(ctx context.Context, appI } // DeleteHierarchicalEntityRolePreparer prepares the DeleteHierarchicalEntityRole request. -func (client ModelClient) DeleteHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeleteHierarchicalEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -2822,7 +2932,7 @@ func (client ModelClient) DeleteHierarchicalEntityRolePreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2847,14 +2957,16 @@ func (client ModelClient) DeleteHierarchicalEntityRoleResponder(resp *http.Respo return } -// DeleteIntent deletes an intent classifier from the application. +// DeleteIntent deletes an intent from a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // intentID - the intent classifier ID. -// deleteUtterances - also delete the intent's utterances (true). Or move the utterances to the None intent -// (false - the default value). -func (client ModelClient) DeleteIntent(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, deleteUtterances *bool) (result OperationStatus, err error) { +// deleteUtterances - if true, deletes the intent's example utterances. If false, moves the example utterances +// to the None intent. The default value is false. +func (client ModelClient) DeleteIntent(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, intentID uuid.UUID, deleteUtterances *bool) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteIntent") defer func() { @@ -2865,7 +2977,7 @@ func (client ModelClient) DeleteIntent(ctx context.Context, appID uuid.UUID, ver tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteIntentPreparer(ctx, appID, versionID, intentID, deleteUtterances) + req, err := client.DeleteIntentPreparer(ctx, azureRegion, azureCloud, appID, versionID, intentID, deleteUtterances) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteIntent", nil, "Failure preparing request") return @@ -2887,9 +2999,10 @@ func (client ModelClient) DeleteIntent(ctx context.Context, appID uuid.UUID, ver } // DeleteIntentPreparer prepares the DeleteIntent request. -func (client ModelClient) DeleteIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, deleteUtterances *bool) (*http.Request, error) { +func (client ModelClient) DeleteIntentPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, intentID uuid.UUID, deleteUtterances *bool) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -2907,7 +3020,7 @@ func (client ModelClient) DeleteIntentPreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -2935,10 +3048,12 @@ func (client ModelClient) DeleteIntentResponder(resp *http.Response) (result Ope // DeletePatternAnyEntityModel sends the delete pattern any entity model request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the Pattern.Any entity extractor ID. -func (client ModelClient) DeletePatternAnyEntityModel(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result OperationStatus, err error) { +func (client ModelClient) DeletePatternAnyEntityModel(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeletePatternAnyEntityModel") defer func() { @@ -2949,7 +3064,7 @@ func (client ModelClient) DeletePatternAnyEntityModel(ctx context.Context, appID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePatternAnyEntityModelPreparer(ctx, appID, versionID, entityID) + req, err := client.DeletePatternAnyEntityModelPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePatternAnyEntityModel", nil, "Failure preparing request") return @@ -2971,9 +3086,10 @@ func (client ModelClient) DeletePatternAnyEntityModel(ctx context.Context, appID } // DeletePatternAnyEntityModelPreparer prepares the DeletePatternAnyEntityModel request. -func (client ModelClient) DeletePatternAnyEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeletePatternAnyEntityModelPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -2984,7 +3100,7 @@ func (client ModelClient) DeletePatternAnyEntityModelPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3011,11 +3127,13 @@ func (client ModelClient) DeletePatternAnyEntityModelResponder(resp *http.Respon // DeletePatternAnyEntityRole sends the delete pattern any entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity ID. // roleID - the entity role Id. -func (client ModelClient) DeletePatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { +func (client ModelClient) DeletePatternAnyEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeletePatternAnyEntityRole") defer func() { @@ -3026,7 +3144,7 @@ func (client ModelClient) DeletePatternAnyEntityRole(ctx context.Context, appID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, roleID) + req, err := client.DeletePatternAnyEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePatternAnyEntityRole", nil, "Failure preparing request") return @@ -3048,9 +3166,10 @@ func (client ModelClient) DeletePatternAnyEntityRole(ctx context.Context, appID } // DeletePatternAnyEntityRolePreparer prepares the DeletePatternAnyEntityRole request. -func (client ModelClient) DeletePatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeletePatternAnyEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -3062,7 +3181,7 @@ func (client ModelClient) DeletePatternAnyEntityRolePreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3087,12 +3206,14 @@ func (client ModelClient) DeletePatternAnyEntityRoleResponder(resp *http.Respons return } -// DeletePrebuilt deletes a prebuilt entity extractor from the application. +// DeletePrebuilt deletes a prebuilt entity extractor from a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // prebuiltID - the prebuilt entity extractor ID. -func (client ModelClient) DeletePrebuilt(ctx context.Context, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (result OperationStatus, err error) { +func (client ModelClient) DeletePrebuilt(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeletePrebuilt") defer func() { @@ -3103,7 +3224,7 @@ func (client ModelClient) DeletePrebuilt(ctx context.Context, appID uuid.UUID, v tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePrebuiltPreparer(ctx, appID, versionID, prebuiltID) + req, err := client.DeletePrebuiltPreparer(ctx, azureRegion, azureCloud, appID, versionID, prebuiltID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePrebuilt", nil, "Failure preparing request") return @@ -3125,9 +3246,10 @@ func (client ModelClient) DeletePrebuilt(ctx context.Context, appID uuid.UUID, v } // DeletePrebuiltPreparer prepares the DeletePrebuilt request. -func (client ModelClient) DeletePrebuiltPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeletePrebuiltPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -3138,7 +3260,7 @@ func (client ModelClient) DeletePrebuiltPreparer(ctx context.Context, appID uuid preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3165,11 +3287,13 @@ func (client ModelClient) DeletePrebuiltResponder(resp *http.Response) (result O // DeletePrebuiltEntityRole sends the delete prebuilt entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity ID. // roleID - the entity role Id. -func (client ModelClient) DeletePrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { +func (client ModelClient) DeletePrebuiltEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeletePrebuiltEntityRole") defer func() { @@ -3180,7 +3304,7 @@ func (client ModelClient) DeletePrebuiltEntityRole(ctx context.Context, appID uu tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID) + req, err := client.DeletePrebuiltEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePrebuiltEntityRole", nil, "Failure preparing request") return @@ -3202,9 +3326,10 @@ func (client ModelClient) DeletePrebuiltEntityRole(ctx context.Context, appID uu } // DeletePrebuiltEntityRolePreparer prepares the DeletePrebuiltEntityRole request. -func (client ModelClient) DeletePrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeletePrebuiltEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -3216,7 +3341,7 @@ func (client ModelClient) DeletePrebuiltEntityRolePreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3243,10 +3368,12 @@ func (client ModelClient) DeletePrebuiltEntityRoleResponder(resp *http.Response) // DeleteRegexEntityModel sends the delete regex entity model request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// regexEntityID - the regex entity extractor ID. -func (client ModelClient) DeleteRegexEntityModel(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (result OperationStatus, err error) { +// regexEntityID - the regular expression entity extractor ID. +func (client ModelClient) DeleteRegexEntityModel(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteRegexEntityModel") defer func() { @@ -3257,7 +3384,7 @@ func (client ModelClient) DeleteRegexEntityModel(ctx context.Context, appID uuid tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteRegexEntityModelPreparer(ctx, appID, versionID, regexEntityID) + req, err := client.DeleteRegexEntityModelPreparer(ctx, azureRegion, azureCloud, appID, versionID, regexEntityID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteRegexEntityModel", nil, "Failure preparing request") return @@ -3279,9 +3406,10 @@ func (client ModelClient) DeleteRegexEntityModel(ctx context.Context, appID uuid } // DeleteRegexEntityModelPreparer prepares the DeleteRegexEntityModel request. -func (client ModelClient) DeleteRegexEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeleteRegexEntityModelPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -3292,7 +3420,7 @@ func (client ModelClient) DeleteRegexEntityModelPreparer(ctx context.Context, ap preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3319,11 +3447,13 @@ func (client ModelClient) DeleteRegexEntityModelResponder(resp *http.Response) ( // DeleteRegexEntityRole sends the delete regex entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity ID. // roleID - the entity role Id. -func (client ModelClient) DeleteRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { +func (client ModelClient) DeleteRegexEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteRegexEntityRole") defer func() { @@ -3334,7 +3464,7 @@ func (client ModelClient) DeleteRegexEntityRole(ctx context.Context, appID uuid. tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteRegexEntityRolePreparer(ctx, appID, versionID, entityID, roleID) + req, err := client.DeleteRegexEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteRegexEntityRole", nil, "Failure preparing request") return @@ -3356,9 +3486,10 @@ func (client ModelClient) DeleteRegexEntityRole(ctx context.Context, appID uuid. } // DeleteRegexEntityRolePreparer prepares the DeleteRegexEntityRole request. -func (client ModelClient) DeleteRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +func (client ModelClient) DeleteRegexEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -3370,7 +3501,7 @@ func (client ModelClient) DeleteRegexEntityRolePreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3395,13 +3526,15 @@ func (client ModelClient) DeleteRegexEntityRoleResponder(resp *http.Response) (r return } -// DeleteSubList deletes a sublist of a specific closed list model. +// DeleteSubList deletes a sublist of a specific list entity model from a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// clEntityID - the closed list entity extractor ID. +// clEntityID - the list entity extractor ID. // subListID - the sublist ID. -func (client ModelClient) DeleteSubList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int32) (result OperationStatus, err error) { +func (client ModelClient) DeleteSubList(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int64) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteSubList") defer func() { @@ -3412,7 +3545,7 @@ func (client ModelClient) DeleteSubList(ctx context.Context, appID uuid.UUID, ve tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteSubListPreparer(ctx, appID, versionID, clEntityID, subListID) + req, err := client.DeleteSubListPreparer(ctx, azureRegion, azureCloud, appID, versionID, clEntityID, subListID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteSubList", nil, "Failure preparing request") return @@ -3434,9 +3567,10 @@ func (client ModelClient) DeleteSubList(ctx context.Context, appID uuid.UUID, ve } // DeleteSubListPreparer prepares the DeleteSubList request. -func (client ModelClient) DeleteSubListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int32) (*http.Request, error) { +func (client ModelClient) DeleteSubListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int64) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -3448,7 +3582,7 @@ func (client ModelClient) DeleteSubListPreparer(ctx context.Context, appID uuid. preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3473,14 +3607,16 @@ func (client ModelClient) DeleteSubListResponder(resp *http.Response) (result Op return } -// ExamplesMethod gets the utterances for the given model in the given app version. +// ExamplesMethod gets the example utterances for the given intent or entity model in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // modelID - the ID (GUID) of the model. // skip - the number of entries to skip. Default value is 0. // take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client ModelClient) ExamplesMethod(ctx context.Context, appID uuid.UUID, versionID string, modelID string, skip *int32, take *int32) (result ListLabelTextObject, err error) { +func (client ModelClient) ExamplesMethod(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, modelID string, skip *int32, take *int32) (result ListLabelTextObject, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ExamplesMethod") defer func() { @@ -3503,7 +3639,7 @@ func (client ModelClient) ExamplesMethod(ctx context.Context, appID uuid.UUID, v return result, validation.NewError("authoring.ModelClient", "ExamplesMethod", err.Error()) } - req, err := client.ExamplesMethodPreparer(ctx, appID, versionID, modelID, skip, take) + req, err := client.ExamplesMethodPreparer(ctx, azureRegion, azureCloud, appID, versionID, modelID, skip, take) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ExamplesMethod", nil, "Failure preparing request") return @@ -3525,9 +3661,10 @@ func (client ModelClient) ExamplesMethod(ctx context.Context, appID uuid.UUID, v } // ExamplesMethodPreparer prepares the ExamplesMethod request. -func (client ModelClient) ExamplesMethodPreparer(ctx context.Context, appID uuid.UUID, versionID string, modelID string, skip *int32, take *int32) (*http.Request, error) { +func (client ModelClient) ExamplesMethodPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, modelID string, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -3550,7 +3687,7 @@ func (client ModelClient) ExamplesMethodPreparer(ctx context.Context, appID uuid preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/models/{modelId}/examples", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -3576,12 +3713,14 @@ func (client ModelClient) ExamplesMethodResponder(resp *http.Response) (result L return } -// GetClosedList gets information of a closed list model. +// GetClosedList gets information about a list entity in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// clEntityID - the closed list model ID. -func (client ModelClient) GetClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (result ClosedListEntityExtractor, err error) { +// clEntityID - the list model ID. +func (client ModelClient) GetClosedList(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (result ClosedListEntityExtractor, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetClosedList") defer func() { @@ -3592,7 +3731,7 @@ func (client ModelClient) GetClosedList(ctx context.Context, appID uuid.UUID, ve tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetClosedListPreparer(ctx, appID, versionID, clEntityID) + req, err := client.GetClosedListPreparer(ctx, azureRegion, azureCloud, appID, versionID, clEntityID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedList", nil, "Failure preparing request") return @@ -3614,9 +3753,10 @@ func (client ModelClient) GetClosedList(ctx context.Context, appID uuid.UUID, ve } // GetClosedListPreparer prepares the GetClosedList request. -func (client ModelClient) GetClosedListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (*http.Request, error) { +func (client ModelClient) GetClosedListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -3627,7 +3767,7 @@ func (client ModelClient) GetClosedListPreparer(ctx context.Context, appID uuid. preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3654,11 +3794,13 @@ func (client ModelClient) GetClosedListResponder(resp *http.Response) (result Cl // GetClosedListEntityRole sends the get closed list entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - entity ID. // roleID - entity role ID. -func (client ModelClient) GetClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { +func (client ModelClient) GetClosedListEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetClosedListEntityRole") defer func() { @@ -3669,7 +3811,7 @@ func (client ModelClient) GetClosedListEntityRole(ctx context.Context, appID uui tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetClosedListEntityRolePreparer(ctx, appID, versionID, entityID, roleID) + req, err := client.GetClosedListEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedListEntityRole", nil, "Failure preparing request") return @@ -3691,9 +3833,10 @@ func (client ModelClient) GetClosedListEntityRole(ctx context.Context, appID uui } // GetClosedListEntityRolePreparer prepares the GetClosedListEntityRole request. -func (client ModelClient) GetClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +func (client ModelClient) GetClosedListEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -3705,7 +3848,7 @@ func (client ModelClient) GetClosedListEntityRolePreparer(ctx context.Context, a preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3730,14 +3873,16 @@ func (client ModelClient) GetClosedListEntityRoleResponder(resp *http.Response) return } -// GetClosedListEntityRoles sends the get closed list entity roles request. +// GetCompositeEntity gets information about a composite entity in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// entityID - entity Id -func (client ModelClient) GetClosedListEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) { +// cEntityID - the composite entity extractor ID. +func (client ModelClient) GetCompositeEntity(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result CompositeEntityExtractor, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetClosedListEntityRoles") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetCompositeEntity") defer func() { sc := -1 if result.Response.Response != nil { @@ -3746,74 +3891,78 @@ func (client ModelClient) GetClosedListEntityRoles(ctx context.Context, appID uu tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetClosedListEntityRolesPreparer(ctx, appID, versionID, entityID) + req, err := client.GetCompositeEntityPreparer(ctx, azureRegion, azureCloud, appID, versionID, cEntityID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedListEntityRoles", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntity", nil, "Failure preparing request") return } - resp, err := client.GetClosedListEntityRolesSender(req) + resp, err := client.GetCompositeEntitySender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedListEntityRoles", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntity", resp, "Failure sending request") return } - result, err = client.GetClosedListEntityRolesResponder(resp) + result, err = client.GetCompositeEntityResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedListEntityRoles", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntity", resp, "Failure responding to request") } return } -// GetClosedListEntityRolesPreparer prepares the GetClosedListEntityRoles request. -func (client ModelClient) GetClosedListEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { +// GetCompositeEntityPreparer prepares the GetCompositeEntity request. +func (client ModelClient) GetCompositeEntityPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), - "entityId": autorest.Encode("path", entityID), + "cEntityId": autorest.Encode("path", cEntityID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetClosedListEntityRolesSender sends the GetClosedListEntityRoles request. The method will close the +// GetCompositeEntitySender sends the GetCompositeEntity request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetClosedListEntityRolesSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetCompositeEntitySender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetClosedListEntityRolesResponder handles the response to the GetClosedListEntityRoles request. The method always +// GetCompositeEntityResponder handles the response to the GetCompositeEntity request. The method always // closes the http.Response Body. -func (client ModelClient) GetClosedListEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { +func (client ModelClient) GetCompositeEntityResponder(resp *http.Response) (result CompositeEntityExtractor, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetCompositeEntity gets information about the composite entity model. +// GetCompositeEntityRole sends the get composite entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // cEntityID - the composite entity extractor ID. -func (client ModelClient) GetCompositeEntity(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result CompositeEntityExtractor, err error) { +// roleID - entity role ID. +func (client ModelClient) GetCompositeEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetCompositeEntity") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetCompositeEntityRole") defer func() { sc := -1 if result.Response.Response != nil { @@ -3822,56 +3971,58 @@ func (client ModelClient) GetCompositeEntity(ctx context.Context, appID uuid.UUI tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetCompositeEntityPreparer(ctx, appID, versionID, cEntityID) + req, err := client.GetCompositeEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, cEntityID, roleID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntity", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRole", nil, "Failure preparing request") return } - resp, err := client.GetCompositeEntitySender(req) + resp, err := client.GetCompositeEntityRoleSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntity", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRole", resp, "Failure sending request") return } - result, err = client.GetCompositeEntityResponder(resp) + result, err = client.GetCompositeEntityRoleResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntity", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRole", resp, "Failure responding to request") } return } -// GetCompositeEntityPreparer prepares the GetCompositeEntity request. -func (client ModelClient) GetCompositeEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (*http.Request, error) { +// GetCompositeEntityRolePreparer prepares the GetCompositeEntityRole request. +func (client ModelClient) GetCompositeEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "cEntityId": autorest.Encode("path", cEntityID), + "roleId": autorest.Encode("path", roleID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetCompositeEntitySender sends the GetCompositeEntity request. The method will close the +// GetCompositeEntityRoleSender sends the GetCompositeEntityRole request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetCompositeEntitySender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetCompositeEntityRoleSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetCompositeEntityResponder handles the response to the GetCompositeEntity request. The method always +// GetCompositeEntityRoleResponder handles the response to the GetCompositeEntityRole request. The method always // closes the http.Response Body. -func (client ModelClient) GetCompositeEntityResponder(resp *http.Response) (result CompositeEntityExtractor, err error) { +func (client ModelClient) GetCompositeEntityRoleResponder(resp *http.Response) (result EntityRole, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -3882,15 +4033,17 @@ func (client ModelClient) GetCompositeEntityResponder(resp *http.Response) (resu return } -// GetCompositeEntityRole sends the get composite entity role request. +// GetCustomEntityRole sends the get custom entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// cEntityID - the composite entity extractor ID. +// entityID - entity ID. // roleID - entity role ID. -func (client ModelClient) GetCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { +func (client ModelClient) GetCustomEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetCompositeEntityRole") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetCustomEntityRole") defer func() { sc := -1 if result.Response.Response != nil { @@ -3899,57 +4052,58 @@ func (client ModelClient) GetCompositeEntityRole(ctx context.Context, appID uuid tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, roleID) + req, err := client.GetCustomEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRole", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomEntityRole", nil, "Failure preparing request") return } - resp, err := client.GetCompositeEntityRoleSender(req) + resp, err := client.GetCustomEntityRoleSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRole", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomEntityRole", resp, "Failure sending request") return } - result, err = client.GetCompositeEntityRoleResponder(resp) + result, err = client.GetCustomEntityRoleResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRole", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomEntityRole", resp, "Failure responding to request") } return } -// GetCompositeEntityRolePreparer prepares the GetCompositeEntityRole request. -func (client ModelClient) GetCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +// GetCustomEntityRolePreparer prepares the GetCustomEntityRole request. +func (client ModelClient) GetCustomEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), - "cEntityId": autorest.Encode("path", cEntityID), + "entityId": autorest.Encode("path", entityID), "roleId": autorest.Encode("path", roleID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetCompositeEntityRoleSender sends the GetCompositeEntityRole request. The method will close the +// GetCustomEntityRoleSender sends the GetCustomEntityRole request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetCompositeEntityRoleSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetCustomEntityRoleSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetCompositeEntityRoleResponder handles the response to the GetCompositeEntityRole request. The method always +// GetCustomEntityRoleResponder handles the response to the GetCustomEntityRole request. The method always // closes the http.Response Body. -func (client ModelClient) GetCompositeEntityRoleResponder(resp *http.Response) (result EntityRole, err error) { +func (client ModelClient) GetCustomEntityRoleResponder(resp *http.Response) (result EntityRole, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -3960,14 +4114,16 @@ func (client ModelClient) GetCompositeEntityRoleResponder(resp *http.Response) ( return } -// GetCompositeEntityRoles sends the get composite entity roles request. +// GetEntity gets information about an entity model in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// cEntityID - the composite entity extractor ID. -func (client ModelClient) GetCompositeEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result ListEntityRole, err error) { +// entityID - the entity extractor ID. +func (client ModelClient) GetEntity(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result EntityExtractor, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetCompositeEntityRoles") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetEntity") defer func() { sc := -1 if result.Response.Response != nil { @@ -3976,75 +4132,78 @@ func (client ModelClient) GetCompositeEntityRoles(ctx context.Context, appID uui tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetCompositeEntityRolesPreparer(ctx, appID, versionID, cEntityID) + req, err := client.GetEntityPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRoles", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntity", nil, "Failure preparing request") return } - resp, err := client.GetCompositeEntityRolesSender(req) + resp, err := client.GetEntitySender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRoles", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntity", resp, "Failure sending request") return } - result, err = client.GetCompositeEntityRolesResponder(resp) + result, err = client.GetEntityResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRoles", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntity", resp, "Failure responding to request") } return } -// GetCompositeEntityRolesPreparer prepares the GetCompositeEntityRoles request. -func (client ModelClient) GetCompositeEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (*http.Request, error) { +// GetEntityPreparer prepares the GetEntity request. +func (client ModelClient) GetEntityPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), - "cEntityId": autorest.Encode("path", cEntityID), + "entityId": autorest.Encode("path", entityID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetCompositeEntityRolesSender sends the GetCompositeEntityRoles request. The method will close the +// GetEntitySender sends the GetEntity request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetCompositeEntityRolesSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetEntitySender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetCompositeEntityRolesResponder handles the response to the GetCompositeEntityRoles request. The method always +// GetEntityResponder handles the response to the GetEntity request. The method always // closes the http.Response Body. -func (client ModelClient) GetCompositeEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { +func (client ModelClient) GetEntityResponder(resp *http.Response) (result EntityExtractor, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetCustomEntityRole sends the get custom entity role request. +// GetEntityRole sends the get entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - entity ID. // roleID - entity role ID. -func (client ModelClient) GetCustomEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { +func (client ModelClient) GetEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetCustomEntityRole") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetEntityRole") defer func() { sc := -1 if result.Response.Response != nil { @@ -4053,31 +4212,32 @@ func (client ModelClient) GetCustomEntityRole(ctx context.Context, appID uuid.UU tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetCustomEntityRolePreparer(ctx, appID, versionID, entityID, roleID) + req, err := client.GetEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomEntityRole", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRole", nil, "Failure preparing request") return } - resp, err := client.GetCustomEntityRoleSender(req) + resp, err := client.GetEntityRoleSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomEntityRole", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRole", resp, "Failure sending request") return } - result, err = client.GetCustomEntityRoleResponder(resp) + result, err = client.GetEntityRoleResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomEntityRole", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRole", resp, "Failure responding to request") } return } -// GetCustomEntityRolePreparer prepares the GetCustomEntityRole request. -func (client ModelClient) GetCustomEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +// GetEntityRolePreparer prepares the GetEntityRole request. +func (client ModelClient) GetEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -4089,21 +4249,21 @@ func (client ModelClient) GetCustomEntityRolePreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetCustomEntityRoleSender sends the GetCustomEntityRole request. The method will close the +// GetEntityRoleSender sends the GetEntityRole request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetCustomEntityRoleSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetEntityRoleSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetCustomEntityRoleResponder handles the response to the GetCustomEntityRole request. The method always +// GetEntityRoleResponder handles the response to the GetEntityRole request. The method always // closes the http.Response Body. -func (client ModelClient) GetCustomEntityRoleResponder(resp *http.Response) (result EntityRole, err error) { +func (client ModelClient) GetEntityRoleResponder(resp *http.Response) (result EntityRole, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -4114,14 +4274,16 @@ func (client ModelClient) GetCustomEntityRoleResponder(resp *http.Response) (res return } -// GetCustomPrebuiltEntityRoles sends the get custom prebuilt entity roles request. +// GetExplicitList sends the get explicit list request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// entityID - entity Id -func (client ModelClient) GetCustomPrebuiltEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) { +// entityID - the Pattern.Any entity id. +func (client ModelClient) GetExplicitList(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListExplicitListItem, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetCustomPrebuiltEntityRoles") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetExplicitList") defer func() { sc := -1 if result.Response.Response != nil { @@ -4130,31 +4292,32 @@ func (client ModelClient) GetCustomPrebuiltEntityRoles(ctx context.Context, appI tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetCustomPrebuiltEntityRolesPreparer(ctx, appID, versionID, entityID) + req, err := client.GetExplicitListPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomPrebuiltEntityRoles", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitList", nil, "Failure preparing request") return } - resp, err := client.GetCustomPrebuiltEntityRolesSender(req) + resp, err := client.GetExplicitListSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomPrebuiltEntityRoles", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitList", resp, "Failure sending request") return } - result, err = client.GetCustomPrebuiltEntityRolesResponder(resp) + result, err = client.GetExplicitListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomPrebuiltEntityRoles", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitList", resp, "Failure responding to request") } return } -// GetCustomPrebuiltEntityRolesPreparer prepares the GetCustomPrebuiltEntityRoles request. -func (client ModelClient) GetCustomPrebuiltEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { +// GetExplicitListPreparer prepares the GetExplicitList request. +func (client ModelClient) GetExplicitListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -4165,21 +4328,21 @@ func (client ModelClient) GetCustomPrebuiltEntityRolesPreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetCustomPrebuiltEntityRolesSender sends the GetCustomPrebuiltEntityRoles request. The method will close the +// GetExplicitListSender sends the GetExplicitList request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetCustomPrebuiltEntityRolesSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetExplicitListSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetCustomPrebuiltEntityRolesResponder handles the response to the GetCustomPrebuiltEntityRoles request. The method always +// GetExplicitListResponder handles the response to the GetExplicitList request. The method always // closes the http.Response Body. -func (client ModelClient) GetCustomPrebuiltEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { +func (client ModelClient) GetExplicitListResponder(resp *http.Response) (result ListExplicitListItem, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -4190,14 +4353,17 @@ func (client ModelClient) GetCustomPrebuiltEntityRolesResponder(resp *http.Respo return } -// GetEntity gets information about the entity model. +// GetExplicitListItem sends the get explicit list item request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// entityID - the entity extractor ID. -func (client ModelClient) GetEntity(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result EntityExtractor, err error) { +// entityID - the Pattern.Any entity Id. +// itemID - the explicit list item Id. +func (client ModelClient) GetExplicitListItem(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (result ExplicitListItem, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetEntity") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetExplicitListItem") defer func() { sc := -1 if result.Response.Response != nil { @@ -4206,56 +4372,58 @@ func (client ModelClient) GetEntity(ctx context.Context, appID uuid.UUID, versio tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetEntityPreparer(ctx, appID, versionID, entityID) + req, err := client.GetExplicitListItemPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, itemID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntity", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitListItem", nil, "Failure preparing request") return } - resp, err := client.GetEntitySender(req) + resp, err := client.GetExplicitListItemSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntity", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitListItem", resp, "Failure sending request") return } - result, err = client.GetEntityResponder(resp) + result, err = client.GetExplicitListItemResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntity", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitListItem", resp, "Failure responding to request") } return } -// GetEntityPreparer prepares the GetEntity request. -func (client ModelClient) GetEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { +// GetExplicitListItemPreparer prepares the GetExplicitListItem request. +func (client ModelClient) GetExplicitListItemPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), + "itemId": autorest.Encode("path", itemID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetEntitySender sends the GetEntity request. The method will close the +// GetExplicitListItemSender sends the GetExplicitListItem request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetEntitySender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetExplicitListItemSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetEntityResponder handles the response to the GetEntity request. The method always +// GetExplicitListItemResponder handles the response to the GetExplicitListItem request. The method always // closes the http.Response Body. -func (client ModelClient) GetEntityResponder(resp *http.Response) (result EntityExtractor, err error) { +func (client ModelClient) GetExplicitListItemResponder(resp *http.Response) (result ExplicitListItem, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -4266,15 +4434,16 @@ func (client ModelClient) GetEntityResponder(resp *http.Response) (result Entity return } -// GetEntityRole sends the get entity role request. +// GetHierarchicalEntity gets information about a hierarchical entity in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// entityID - entity ID. -// roleID - entity role ID. -func (client ModelClient) GetEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { +// hEntityID - the hierarchical entity extractor ID. +func (client ModelClient) GetHierarchicalEntity(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result HierarchicalEntityExtractor, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetEntityRole") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetHierarchicalEntity") defer func() { sc := -1 if result.Response.Response != nil { @@ -4283,57 +4452,57 @@ func (client ModelClient) GetEntityRole(ctx context.Context, appID uuid.UUID, ve tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetEntityRolePreparer(ctx, appID, versionID, entityID, roleID) + req, err := client.GetHierarchicalEntityPreparer(ctx, azureRegion, azureCloud, appID, versionID, hEntityID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRole", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntity", nil, "Failure preparing request") return } - resp, err := client.GetEntityRoleSender(req) + resp, err := client.GetHierarchicalEntitySender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRole", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntity", resp, "Failure sending request") return } - result, err = client.GetEntityRoleResponder(resp) + result, err = client.GetHierarchicalEntityResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRole", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntity", resp, "Failure responding to request") } return } -// GetEntityRolePreparer prepares the GetEntityRole request. -func (client ModelClient) GetEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +// GetHierarchicalEntityPreparer prepares the GetHierarchicalEntity request. +func (client ModelClient) GetHierarchicalEntityPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), - "entityId": autorest.Encode("path", entityID), - "roleId": autorest.Encode("path", roleID), + "hEntityId": autorest.Encode("path", hEntityID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetEntityRoleSender sends the GetEntityRole request. The method will close the +// GetHierarchicalEntitySender sends the GetHierarchicalEntity request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetEntityRoleSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetHierarchicalEntitySender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetEntityRoleResponder handles the response to the GetEntityRole request. The method always +// GetHierarchicalEntityResponder handles the response to the GetHierarchicalEntity request. The method always // closes the http.Response Body. -func (client ModelClient) GetEntityRoleResponder(resp *http.Response) (result EntityRole, err error) { +func (client ModelClient) GetHierarchicalEntityResponder(resp *http.Response) (result HierarchicalEntityExtractor, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -4344,14 +4513,18 @@ func (client ModelClient) GetEntityRoleResponder(resp *http.Response) (result En return } -// GetEntityRoles sends the get entity roles request. +// GetHierarchicalEntityChild gets information about the child's model contained in an hierarchical entity child model +// in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// entityID - entity Id -func (client ModelClient) GetEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) { +// hEntityID - the hierarchical entity extractor ID. +// hChildID - the hierarchical entity extractor child ID. +func (client ModelClient) GetHierarchicalEntityChild(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (result HierarchicalChildEntity, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetEntityRoles") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetHierarchicalEntityChild") defer func() { sc := -1 if result.Response.Response != nil { @@ -4360,75 +4533,79 @@ func (client ModelClient) GetEntityRoles(ctx context.Context, appID uuid.UUID, v tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetEntityRolesPreparer(ctx, appID, versionID, entityID) + req, err := client.GetHierarchicalEntityChildPreparer(ctx, azureRegion, azureCloud, appID, versionID, hEntityID, hChildID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRoles", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityChild", nil, "Failure preparing request") return } - resp, err := client.GetEntityRolesSender(req) + resp, err := client.GetHierarchicalEntityChildSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRoles", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityChild", resp, "Failure sending request") return } - result, err = client.GetEntityRolesResponder(resp) + result, err = client.GetHierarchicalEntityChildResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRoles", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityChild", resp, "Failure responding to request") } return } -// GetEntityRolesPreparer prepares the GetEntityRoles request. -func (client ModelClient) GetEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { +// GetHierarchicalEntityChildPreparer prepares the GetHierarchicalEntityChild request. +func (client ModelClient) GetHierarchicalEntityChildPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), - "entityId": autorest.Encode("path", entityID), + "hChildId": autorest.Encode("path", hChildID), + "hEntityId": autorest.Encode("path", hEntityID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetEntityRolesSender sends the GetEntityRoles request. The method will close the +// GetHierarchicalEntityChildSender sends the GetHierarchicalEntityChild request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetEntityRolesSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetHierarchicalEntityChildSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetEntityRolesResponder handles the response to the GetEntityRoles request. The method always +// GetHierarchicalEntityChildResponder handles the response to the GetHierarchicalEntityChild request. The method always // closes the http.Response Body. -func (client ModelClient) GetEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { +func (client ModelClient) GetHierarchicalEntityChildResponder(resp *http.Response) (result HierarchicalChildEntity, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetEntitySuggestions get suggestion examples that would improve the accuracy of the entity model. +// GetHierarchicalEntityRole sends the get hierarchical entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// entityID - the target entity extractor model to enhance. -// take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client ModelClient) GetEntitySuggestions(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, take *int32) (result ListEntitiesSuggestionExample, err error) { +// hEntityID - the hierarchical entity extractor ID. +// roleID - entity role ID. +func (client ModelClient) GetHierarchicalEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetEntitySuggestions") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetHierarchicalEntityRole") defer func() { sc := -1 if result.Response.Response != nil { @@ -4437,91 +4614,78 @@ func (client ModelClient) GetEntitySuggestions(ctx context.Context, appID uuid.U tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: take, - Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("authoring.ModelClient", "GetEntitySuggestions", err.Error()) - } - - req, err := client.GetEntitySuggestionsPreparer(ctx, appID, versionID, entityID, take) + req, err := client.GetHierarchicalEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, hEntityID, roleID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntitySuggestions", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRole", nil, "Failure preparing request") return } - resp, err := client.GetEntitySuggestionsSender(req) + resp, err := client.GetHierarchicalEntityRoleSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntitySuggestions", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRole", resp, "Failure sending request") return } - result, err = client.GetEntitySuggestionsResponder(resp) + result, err = client.GetHierarchicalEntityRoleResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntitySuggestions", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRole", resp, "Failure responding to request") } return } -// GetEntitySuggestionsPreparer prepares the GetEntitySuggestions request. -func (client ModelClient) GetEntitySuggestionsPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, take *int32) (*http.Request, error) { +// GetHierarchicalEntityRolePreparer prepares the GetHierarchicalEntityRole request. +func (client ModelClient) GetHierarchicalEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), - "entityId": autorest.Encode("path", entityID), + "hEntityId": autorest.Encode("path", hEntityID), + "roleId": autorest.Encode("path", roleID), "versionId": autorest.Encode("path", versionID), } - queryParameters := map[string]interface{}{} - if take != nil { - queryParameters["take"] = autorest.Encode("query", *take) - } else { - queryParameters["take"] = autorest.Encode("query", 100) - } - preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/suggest", pathParameters), - autorest.WithQueryParameters(queryParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetEntitySuggestionsSender sends the GetEntitySuggestions request. The method will close the +// GetHierarchicalEntityRoleSender sends the GetHierarchicalEntityRole request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetEntitySuggestionsSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetHierarchicalEntityRoleSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetEntitySuggestionsResponder handles the response to the GetEntitySuggestions request. The method always +// GetHierarchicalEntityRoleResponder handles the response to the GetHierarchicalEntityRole request. The method always // closes the http.Response Body. -func (client ModelClient) GetEntitySuggestionsResponder(resp *http.Response) (result ListEntitiesSuggestionExample, err error) { +func (client ModelClient) GetHierarchicalEntityRoleResponder(resp *http.Response) (result EntityRole, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetExplicitList sends the get explicit list request. +// GetIntent gets information about the intent model in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// entityID - the Pattern.Any entity id. -func (client ModelClient) GetExplicitList(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListExplicitListItem, err error) { +// intentID - the intent classifier ID. +func (client ModelClient) GetIntent(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, intentID uuid.UUID) (result IntentClassifier, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetExplicitList") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetIntent") defer func() { sc := -1 if result.Response.Response != nil { @@ -4530,75 +4694,77 @@ func (client ModelClient) GetExplicitList(ctx context.Context, appID uuid.UUID, tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetExplicitListPreparer(ctx, appID, versionID, entityID) + req, err := client.GetIntentPreparer(ctx, azureRegion, azureCloud, appID, versionID, intentID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitList", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntent", nil, "Failure preparing request") return } - resp, err := client.GetExplicitListSender(req) + resp, err := client.GetIntentSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitList", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntent", resp, "Failure sending request") return } - result, err = client.GetExplicitListResponder(resp) + result, err = client.GetIntentResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitList", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntent", resp, "Failure responding to request") } return } -// GetExplicitListPreparer prepares the GetExplicitList request. -func (client ModelClient) GetExplicitListPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { +// GetIntentPreparer prepares the GetIntent request. +func (client ModelClient) GetIntentPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, intentID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), - "entityId": autorest.Encode("path", entityID), + "intentId": autorest.Encode("path", intentID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetExplicitListSender sends the GetExplicitList request. The method will close the +// GetIntentSender sends the GetIntent request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetExplicitListSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetIntentSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetExplicitListResponder handles the response to the GetExplicitList request. The method always +// GetIntentResponder handles the response to the GetIntent request. The method always // closes the http.Response Body. -func (client ModelClient) GetExplicitListResponder(resp *http.Response) (result ListExplicitListItem, err error) { +func (client ModelClient) GetIntentResponder(resp *http.Response) (result IntentClassifier, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetExplicitListItem sends the get explicit list item request. +// GetPatternAnyEntityInfo sends the get pattern any entity info request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// entityID - the Pattern.Any entity Id. -// itemID - the explicit list item Id. -func (client ModelClient) GetExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (result ExplicitListItem, err error) { +// entityID - the entity extractor ID. +func (client ModelClient) GetPatternAnyEntityInfo(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result PatternAnyEntityExtractor, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetExplicitListItem") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetPatternAnyEntityInfo") defer func() { sc := -1 if result.Response.Response != nil { @@ -4607,57 +4773,57 @@ func (client ModelClient) GetExplicitListItem(ctx context.Context, appID uuid.UU tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetExplicitListItemPreparer(ctx, appID, versionID, entityID, itemID) + req, err := client.GetPatternAnyEntityInfoPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitListItem", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfo", nil, "Failure preparing request") return } - resp, err := client.GetExplicitListItemSender(req) + resp, err := client.GetPatternAnyEntityInfoSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitListItem", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfo", resp, "Failure sending request") return } - result, err = client.GetExplicitListItemResponder(resp) + result, err = client.GetPatternAnyEntityInfoResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitListItem", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfo", resp, "Failure responding to request") } return } -// GetExplicitListItemPreparer prepares the GetExplicitListItem request. -func (client ModelClient) GetExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (*http.Request, error) { +// GetPatternAnyEntityInfoPreparer prepares the GetPatternAnyEntityInfo request. +func (client ModelClient) GetPatternAnyEntityInfoPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), - "itemId": autorest.Encode("path", itemID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetExplicitListItemSender sends the GetExplicitListItem request. The method will close the +// GetPatternAnyEntityInfoSender sends the GetPatternAnyEntityInfo request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetExplicitListItemSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetPatternAnyEntityInfoSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetExplicitListItemResponder handles the response to the GetExplicitListItem request. The method always +// GetPatternAnyEntityInfoResponder handles the response to the GetPatternAnyEntityInfo request. The method always // closes the http.Response Body. -func (client ModelClient) GetExplicitListItemResponder(resp *http.Response) (result ExplicitListItem, err error) { +func (client ModelClient) GetPatternAnyEntityInfoResponder(resp *http.Response) (result PatternAnyEntityExtractor, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -4668,14 +4834,17 @@ func (client ModelClient) GetExplicitListItemResponder(resp *http.Response) (res return } -// GetHierarchicalEntity gets information about the hierarchical entity model. +// GetPatternAnyEntityRole sends the get pattern any entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// hEntityID - the hierarchical entity extractor ID. -func (client ModelClient) GetHierarchicalEntity(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result HierarchicalEntityExtractor, err error) { +// entityID - entity ID. +// roleID - entity role ID. +func (client ModelClient) GetPatternAnyEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetHierarchicalEntity") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetPatternAnyEntityRole") defer func() { sc := -1 if result.Response.Response != nil { @@ -4684,56 +4853,58 @@ func (client ModelClient) GetHierarchicalEntity(ctx context.Context, appID uuid. tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetHierarchicalEntityPreparer(ctx, appID, versionID, hEntityID) + req, err := client.GetPatternAnyEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntity", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRole", nil, "Failure preparing request") return } - resp, err := client.GetHierarchicalEntitySender(req) + resp, err := client.GetPatternAnyEntityRoleSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntity", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRole", resp, "Failure sending request") return } - result, err = client.GetHierarchicalEntityResponder(resp) + result, err = client.GetPatternAnyEntityRoleResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntity", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRole", resp, "Failure responding to request") } return } -// GetHierarchicalEntityPreparer prepares the GetHierarchicalEntity request. -func (client ModelClient) GetHierarchicalEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (*http.Request, error) { +// GetPatternAnyEntityRolePreparer prepares the GetPatternAnyEntityRole request. +func (client ModelClient) GetPatternAnyEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), - "hEntityId": autorest.Encode("path", hEntityID), + "entityId": autorest.Encode("path", entityID), + "roleId": autorest.Encode("path", roleID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetHierarchicalEntitySender sends the GetHierarchicalEntity request. The method will close the +// GetPatternAnyEntityRoleSender sends the GetPatternAnyEntityRole request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetHierarchicalEntitySender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetPatternAnyEntityRoleSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetHierarchicalEntityResponder handles the response to the GetHierarchicalEntity request. The method always +// GetPatternAnyEntityRoleResponder handles the response to the GetPatternAnyEntityRole request. The method always // closes the http.Response Body. -func (client ModelClient) GetHierarchicalEntityResponder(resp *http.Response) (result HierarchicalEntityExtractor, err error) { +func (client ModelClient) GetPatternAnyEntityRoleResponder(resp *http.Response) (result EntityRole, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -4744,15 +4915,16 @@ func (client ModelClient) GetHierarchicalEntityResponder(resp *http.Response) (r return } -// GetHierarchicalEntityChild gets information about the hierarchical entity child model. +// GetPrebuilt gets information about a prebuilt entity model in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// hEntityID - the hierarchical entity extractor ID. -// hChildID - the hierarchical entity extractor child ID. -func (client ModelClient) GetHierarchicalEntityChild(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (result HierarchicalChildEntity, err error) { +// prebuiltID - the prebuilt entity extractor ID. +func (client ModelClient) GetPrebuilt(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (result PrebuiltEntityExtractor, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetHierarchicalEntityChild") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetPrebuilt") defer func() { sc := -1 if result.Response.Response != nil { @@ -4761,57 +4933,57 @@ func (client ModelClient) GetHierarchicalEntityChild(ctx context.Context, appID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetHierarchicalEntityChildPreparer(ctx, appID, versionID, hEntityID, hChildID) + req, err := client.GetPrebuiltPreparer(ctx, azureRegion, azureCloud, appID, versionID, prebuiltID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityChild", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuilt", nil, "Failure preparing request") return } - resp, err := client.GetHierarchicalEntityChildSender(req) + resp, err := client.GetPrebuiltSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityChild", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuilt", resp, "Failure sending request") return } - result, err = client.GetHierarchicalEntityChildResponder(resp) + result, err = client.GetPrebuiltResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityChild", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuilt", resp, "Failure responding to request") } return } -// GetHierarchicalEntityChildPreparer prepares the GetHierarchicalEntityChild request. -func (client ModelClient) GetHierarchicalEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (*http.Request, error) { +// GetPrebuiltPreparer prepares the GetPrebuilt request. +func (client ModelClient) GetPrebuiltPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ - "appId": autorest.Encode("path", appID), - "hChildId": autorest.Encode("path", hChildID), - "hEntityId": autorest.Encode("path", hEntityID), - "versionId": autorest.Encode("path", versionID), + "appId": autorest.Encode("path", appID), + "prebuiltId": autorest.Encode("path", prebuiltID), + "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetHierarchicalEntityChildSender sends the GetHierarchicalEntityChild request. The method will close the +// GetPrebuiltSender sends the GetPrebuilt request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetHierarchicalEntityChildSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetPrebuiltSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetHierarchicalEntityChildResponder handles the response to the GetHierarchicalEntityChild request. The method always +// GetPrebuiltResponder handles the response to the GetPrebuilt request. The method always // closes the http.Response Body. -func (client ModelClient) GetHierarchicalEntityChildResponder(resp *http.Response) (result HierarchicalChildEntity, err error) { +func (client ModelClient) GetPrebuiltResponder(resp *http.Response) (result PrebuiltEntityExtractor, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -4822,15 +4994,17 @@ func (client ModelClient) GetHierarchicalEntityChildResponder(resp *http.Respons return } -// GetHierarchicalEntityRole sends the get hierarchical entity role request. +// GetPrebuiltEntityRole sends the get prebuilt entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// hEntityID - the hierarchical entity extractor ID. +// entityID - entity ID. // roleID - entity role ID. -func (client ModelClient) GetHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { +func (client ModelClient) GetPrebuiltEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetHierarchicalEntityRole") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetPrebuiltEntityRole") defer func() { sc := -1 if result.Response.Response != nil { @@ -4839,57 +5013,58 @@ func (client ModelClient) GetHierarchicalEntityRole(ctx context.Context, appID u tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, roleID) + req, err := client.GetPrebuiltEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRole", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRole", nil, "Failure preparing request") return } - resp, err := client.GetHierarchicalEntityRoleSender(req) + resp, err := client.GetPrebuiltEntityRoleSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRole", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRole", resp, "Failure sending request") return } - result, err = client.GetHierarchicalEntityRoleResponder(resp) + result, err = client.GetPrebuiltEntityRoleResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRole", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRole", resp, "Failure responding to request") } return } -// GetHierarchicalEntityRolePreparer prepares the GetHierarchicalEntityRole request. -func (client ModelClient) GetHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +// GetPrebuiltEntityRolePreparer prepares the GetPrebuiltEntityRole request. +func (client ModelClient) GetPrebuiltEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), - "hEntityId": autorest.Encode("path", hEntityID), + "entityId": autorest.Encode("path", entityID), "roleId": autorest.Encode("path", roleID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetHierarchicalEntityRoleSender sends the GetHierarchicalEntityRole request. The method will close the +// GetPrebuiltEntityRoleSender sends the GetPrebuiltEntityRole request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetHierarchicalEntityRoleSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetPrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetHierarchicalEntityRoleResponder handles the response to the GetHierarchicalEntityRole request. The method always +// GetPrebuiltEntityRoleResponder handles the response to the GetPrebuiltEntityRole request. The method always // closes the http.Response Body. -func (client ModelClient) GetHierarchicalEntityRoleResponder(resp *http.Response) (result EntityRole, err error) { +func (client ModelClient) GetPrebuiltEntityRoleResponder(resp *http.Response) (result EntityRole, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -4900,14 +5075,16 @@ func (client ModelClient) GetHierarchicalEntityRoleResponder(resp *http.Response return } -// GetHierarchicalEntityRoles sends the get hierarchical entity roles request. +// GetRegexEntityEntityInfo sends the get regex entity entity info request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// hEntityID - the hierarchical entity extractor ID. -func (client ModelClient) GetHierarchicalEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result ListEntityRole, err error) { +// regexEntityID - the regular expression entity model ID. +func (client ModelClient) GetRegexEntityEntityInfo(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (result RegexEntityExtractor, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetHierarchicalEntityRoles") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetRegexEntityEntityInfo") defer func() { sc := -1 if result.Response.Response != nil { @@ -4916,74 +5093,78 @@ func (client ModelClient) GetHierarchicalEntityRoles(ctx context.Context, appID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetHierarchicalEntityRolesPreparer(ctx, appID, versionID, hEntityID) + req, err := client.GetRegexEntityEntityInfoPreparer(ctx, azureRegion, azureCloud, appID, versionID, regexEntityID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRoles", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityEntityInfo", nil, "Failure preparing request") return } - resp, err := client.GetHierarchicalEntityRolesSender(req) + resp, err := client.GetRegexEntityEntityInfoSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRoles", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityEntityInfo", resp, "Failure sending request") return } - result, err = client.GetHierarchicalEntityRolesResponder(resp) + result, err = client.GetRegexEntityEntityInfoResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRoles", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityEntityInfo", resp, "Failure responding to request") } return } -// GetHierarchicalEntityRolesPreparer prepares the GetHierarchicalEntityRoles request. -func (client ModelClient) GetHierarchicalEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (*http.Request, error) { +// GetRegexEntityEntityInfoPreparer prepares the GetRegexEntityEntityInfo request. +func (client ModelClient) GetRegexEntityEntityInfoPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ - "appId": autorest.Encode("path", appID), - "hEntityId": autorest.Encode("path", hEntityID), - "versionId": autorest.Encode("path", versionID), + "appId": autorest.Encode("path", appID), + "regexEntityId": autorest.Encode("path", regexEntityID), + "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetHierarchicalEntityRolesSender sends the GetHierarchicalEntityRoles request. The method will close the +// GetRegexEntityEntityInfoSender sends the GetRegexEntityEntityInfo request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetHierarchicalEntityRolesSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetRegexEntityEntityInfoSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetHierarchicalEntityRolesResponder handles the response to the GetHierarchicalEntityRoles request. The method always +// GetRegexEntityEntityInfoResponder handles the response to the GetRegexEntityEntityInfo request. The method always // closes the http.Response Body. -func (client ModelClient) GetHierarchicalEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { +func (client ModelClient) GetRegexEntityEntityInfoResponder(resp *http.Response) (result RegexEntityExtractor, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetIntent gets information about the intent model. +// GetRegexEntityRole sends the get regex entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// intentID - the intent classifier ID. -func (client ModelClient) GetIntent(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID) (result IntentClassifier, err error) { +// entityID - entity ID. +// roleID - entity role ID. +func (client ModelClient) GetRegexEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetIntent") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetRegexEntityRole") defer func() { sc := -1 if result.Response.Response != nil { @@ -4992,56 +5173,58 @@ func (client ModelClient) GetIntent(ctx context.Context, appID uuid.UUID, versio tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetIntentPreparer(ctx, appID, versionID, intentID) + req, err := client.GetRegexEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntent", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRole", nil, "Failure preparing request") return } - resp, err := client.GetIntentSender(req) + resp, err := client.GetRegexEntityRoleSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntent", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRole", resp, "Failure sending request") return } - result, err = client.GetIntentResponder(resp) + result, err = client.GetRegexEntityRoleResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntent", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRole", resp, "Failure responding to request") } return } -// GetIntentPreparer prepares the GetIntent request. -func (client ModelClient) GetIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID) (*http.Request, error) { +// GetRegexEntityRolePreparer prepares the GetRegexEntityRole request. +func (client ModelClient) GetRegexEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), - "intentId": autorest.Encode("path", intentID), + "entityId": autorest.Encode("path", entityID), + "roleId": autorest.Encode("path", roleID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetIntentSender sends the GetIntent request. The method will close the +// GetRegexEntityRoleSender sends the GetRegexEntityRole request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetIntentSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) GetRegexEntityRoleSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetIntentResponder handles the response to the GetIntent request. The method always +// GetRegexEntityRoleResponder handles the response to the GetRegexEntityRole request. The method always // closes the http.Response Body. -func (client ModelClient) GetIntentResponder(resp *http.Response) (result IntentClassifier, err error) { +func (client ModelClient) GetRegexEntityRoleResponder(resp *http.Response) (result EntityRole, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -5052,15 +5235,16 @@ func (client ModelClient) GetIntentResponder(resp *http.Response) (result Intent return } -// GetIntentSuggestions suggests examples that would improve the accuracy of the intent model. +// ListClosedListEntityRoles sends the list closed list entity roles request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// intentID - the intent classifier ID. -// take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client ModelClient) GetIntentSuggestions(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, take *int32) (result ListIntentsSuggestionExample, err error) { +// entityID - entity Id +func (client ModelClient) ListClosedListEntityRoles(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetIntentSuggestions") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListClosedListEntityRoles") defer func() { sc := -1 if result.Response.Response != nil { @@ -5069,73 +5253,57 @@ func (client ModelClient) GetIntentSuggestions(ctx context.Context, appID uuid.U tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: take, - Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("authoring.ModelClient", "GetIntentSuggestions", err.Error()) - } - - req, err := client.GetIntentSuggestionsPreparer(ctx, appID, versionID, intentID, take) + req, err := client.ListClosedListEntityRolesPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntentSuggestions", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedListEntityRoles", nil, "Failure preparing request") return } - resp, err := client.GetIntentSuggestionsSender(req) + resp, err := client.ListClosedListEntityRolesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntentSuggestions", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedListEntityRoles", resp, "Failure sending request") return } - result, err = client.GetIntentSuggestionsResponder(resp) + result, err = client.ListClosedListEntityRolesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntentSuggestions", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedListEntityRoles", resp, "Failure responding to request") } return } -// GetIntentSuggestionsPreparer prepares the GetIntentSuggestions request. -func (client ModelClient) GetIntentSuggestionsPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, take *int32) (*http.Request, error) { +// ListClosedListEntityRolesPreparer prepares the ListClosedListEntityRoles request. +func (client ModelClient) ListClosedListEntityRolesPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), - "intentId": autorest.Encode("path", intentID), + "entityId": autorest.Encode("path", entityID), "versionId": autorest.Encode("path", versionID), } - queryParameters := map[string]interface{}{} - if take != nil { - queryParameters["take"] = autorest.Encode("query", *take) - } else { - queryParameters["take"] = autorest.Encode("query", 100) - } - preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/suggest", pathParameters), - autorest.WithQueryParameters(queryParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetIntentSuggestionsSender sends the GetIntentSuggestions request. The method will close the +// ListClosedListEntityRolesSender sends the ListClosedListEntityRoles request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetIntentSuggestionsSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListClosedListEntityRolesSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetIntentSuggestionsResponder handles the response to the GetIntentSuggestions request. The method always +// ListClosedListEntityRolesResponder handles the response to the ListClosedListEntityRoles request. The method always // closes the http.Response Body. -func (client ModelClient) GetIntentSuggestionsResponder(resp *http.Response) (result ListIntentsSuggestionExample, err error) { +func (client ModelClient) ListClosedListEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -5146,14 +5314,17 @@ func (client ModelClient) GetIntentSuggestionsResponder(resp *http.Response) (re return } -// GetPatternAnyEntityInfo sends the get pattern any entity info request. +// ListClosedLists gets information about all the list entity models in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// entityID - the entity extractor ID. -func (client ModelClient) GetPatternAnyEntityInfo(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result PatternAnyEntityExtractor, err error) { +// skip - the number of entries to skip. Default value is 0. +// take - the number of entries to return. Maximum page size is 500. Default is 100. +func (client ModelClient) ListClosedLists(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListClosedListEntityExtractor, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetPatternAnyEntityInfo") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListClosedLists") defer func() { sc := -1 if result.Response.Response != nil { @@ -5162,75 +5333,102 @@ func (client ModelClient) GetPatternAnyEntityInfo(ctx context.Context, appID uui tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPatternAnyEntityInfoPreparer(ctx, appID, versionID, entityID) + if err := validation.Validate([]validation.Validation{ + {TargetValue: skip, + Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + {TargetValue: take, + Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("authoring.ModelClient", "ListClosedLists", err.Error()) + } + + req, err := client.ListClosedListsPreparer(ctx, azureRegion, azureCloud, appID, versionID, skip, take) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfo", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedLists", nil, "Failure preparing request") return } - resp, err := client.GetPatternAnyEntityInfoSender(req) + resp, err := client.ListClosedListsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfo", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedLists", resp, "Failure sending request") return } - result, err = client.GetPatternAnyEntityInfoResponder(resp) + result, err = client.ListClosedListsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfo", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedLists", resp, "Failure responding to request") } return } -// GetPatternAnyEntityInfoPreparer prepares the GetPatternAnyEntityInfo request. -func (client ModelClient) GetPatternAnyEntityInfoPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { +// ListClosedListsPreparer prepares the ListClosedLists request. +func (client ModelClient) ListClosedListsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), - "entityId": autorest.Encode("path", entityID), "versionId": autorest.Encode("path", versionID), } + queryParameters := map[string]interface{}{} + if skip != nil { + queryParameters["skip"] = autorest.Encode("query", *skip) + } else { + queryParameters["skip"] = autorest.Encode("query", 0) + } + if take != nil { + queryParameters["take"] = autorest.Encode("query", *take) + } else { + queryParameters["take"] = autorest.Encode("query", 100) + } + preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists", pathParameters), + autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPatternAnyEntityInfoSender sends the GetPatternAnyEntityInfo request. The method will close the +// ListClosedListsSender sends the ListClosedLists request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetPatternAnyEntityInfoSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListClosedListsSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetPatternAnyEntityInfoResponder handles the response to the GetPatternAnyEntityInfo request. The method always +// ListClosedListsResponder handles the response to the ListClosedLists request. The method always // closes the http.Response Body. -func (client ModelClient) GetPatternAnyEntityInfoResponder(resp *http.Response) (result PatternAnyEntityExtractor, err error) { +func (client ModelClient) ListClosedListsResponder(resp *http.Response) (result ListClosedListEntityExtractor, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetPatternAnyEntityInfos sends the get pattern any entity infos request. +// ListCompositeEntities gets information about all the composite entity models in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // skip - the number of entries to skip. Default value is 0. // take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client ModelClient) GetPatternAnyEntityInfos(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPatternAnyEntityExtractor, err error) { +func (client ModelClient) ListCompositeEntities(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListCompositeEntityExtractor, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetPatternAnyEntityInfos") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCompositeEntities") defer func() { sc := -1 if result.Response.Response != nil { @@ -5248,34 +5446,35 @@ func (client ModelClient) GetPatternAnyEntityInfos(ctx context.Context, appID uu Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}}}}); err != nil { - return result, validation.NewError("authoring.ModelClient", "GetPatternAnyEntityInfos", err.Error()) + return result, validation.NewError("authoring.ModelClient", "ListCompositeEntities", err.Error()) } - req, err := client.GetPatternAnyEntityInfosPreparer(ctx, appID, versionID, skip, take) + req, err := client.ListCompositeEntitiesPreparer(ctx, azureRegion, azureCloud, appID, versionID, skip, take) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfos", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntities", nil, "Failure preparing request") return } - resp, err := client.GetPatternAnyEntityInfosSender(req) + resp, err := client.ListCompositeEntitiesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfos", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntities", resp, "Failure sending request") return } - result, err = client.GetPatternAnyEntityInfosResponder(resp) + result, err = client.ListCompositeEntitiesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfos", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntities", resp, "Failure responding to request") } return } -// GetPatternAnyEntityInfosPreparer prepares the GetPatternAnyEntityInfos request. -func (client ModelClient) GetPatternAnyEntityInfosPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { +// ListCompositeEntitiesPreparer prepares the ListCompositeEntities request. +func (client ModelClient) ListCompositeEntitiesPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -5297,22 +5496,22 @@ func (client ModelClient) GetPatternAnyEntityInfosPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities", pathParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPatternAnyEntityInfosSender sends the GetPatternAnyEntityInfos request. The method will close the +// ListCompositeEntitiesSender sends the ListCompositeEntities request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetPatternAnyEntityInfosSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListCompositeEntitiesSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetPatternAnyEntityInfosResponder handles the response to the GetPatternAnyEntityInfos request. The method always +// ListCompositeEntitiesResponder handles the response to the ListCompositeEntities request. The method always // closes the http.Response Body. -func (client ModelClient) GetPatternAnyEntityInfosResponder(resp *http.Response) (result ListPatternAnyEntityExtractor, err error) { +func (client ModelClient) ListCompositeEntitiesResponder(resp *http.Response) (result ListCompositeEntityExtractor, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -5323,15 +5522,16 @@ func (client ModelClient) GetPatternAnyEntityInfosResponder(resp *http.Response) return } -// GetPatternAnyEntityRole sends the get pattern any entity role request. +// ListCompositeEntityRoles sends the list composite entity roles request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// entityID - entity ID. -// roleID - entity role ID. -func (client ModelClient) GetPatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { +// cEntityID - the composite entity extractor ID. +func (client ModelClient) ListCompositeEntityRoles(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result ListEntityRole, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetPatternAnyEntityRole") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCompositeEntityRoles") defer func() { sc := -1 if result.Response.Response != nil { @@ -5340,75 +5540,76 @@ func (client ModelClient) GetPatternAnyEntityRole(ctx context.Context, appID uui tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, roleID) + req, err := client.ListCompositeEntityRolesPreparer(ctx, azureRegion, azureCloud, appID, versionID, cEntityID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRole", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntityRoles", nil, "Failure preparing request") return } - resp, err := client.GetPatternAnyEntityRoleSender(req) + resp, err := client.ListCompositeEntityRolesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRole", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntityRoles", resp, "Failure sending request") return } - result, err = client.GetPatternAnyEntityRoleResponder(resp) + result, err = client.ListCompositeEntityRolesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRole", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntityRoles", resp, "Failure responding to request") } return } -// GetPatternAnyEntityRolePreparer prepares the GetPatternAnyEntityRole request. -func (client ModelClient) GetPatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +// ListCompositeEntityRolesPreparer prepares the ListCompositeEntityRoles request. +func (client ModelClient) ListCompositeEntityRolesPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), - "entityId": autorest.Encode("path", entityID), - "roleId": autorest.Encode("path", roleID), + "cEntityId": autorest.Encode("path", cEntityID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPatternAnyEntityRoleSender sends the GetPatternAnyEntityRole request. The method will close the +// ListCompositeEntityRolesSender sends the ListCompositeEntityRoles request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetPatternAnyEntityRoleSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListCompositeEntityRolesSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetPatternAnyEntityRoleResponder handles the response to the GetPatternAnyEntityRole request. The method always +// ListCompositeEntityRolesResponder handles the response to the ListCompositeEntityRoles request. The method always // closes the http.Response Body. -func (client ModelClient) GetPatternAnyEntityRoleResponder(resp *http.Response) (result EntityRole, err error) { +func (client ModelClient) ListCompositeEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetPatternAnyEntityRoles sends the get pattern any entity roles request. +// ListCustomPrebuiltEntities gets all prebuilt entities used in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// entityID - entity Id -func (client ModelClient) GetPatternAnyEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) { +func (client ModelClient) ListCustomPrebuiltEntities(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (result ListEntityExtractor, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetPatternAnyEntityRoles") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCustomPrebuiltEntities") defer func() { sc := -1 if result.Response.Response != nil { @@ -5417,56 +5618,56 @@ func (client ModelClient) GetPatternAnyEntityRoles(ctx context.Context, appID uu tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPatternAnyEntityRolesPreparer(ctx, appID, versionID, entityID) + req, err := client.ListCustomPrebuiltEntitiesPreparer(ctx, azureRegion, azureCloud, appID, versionID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRoles", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntities", nil, "Failure preparing request") return } - resp, err := client.GetPatternAnyEntityRolesSender(req) + resp, err := client.ListCustomPrebuiltEntitiesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRoles", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntities", resp, "Failure sending request") return } - result, err = client.GetPatternAnyEntityRolesResponder(resp) + result, err = client.ListCustomPrebuiltEntitiesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRoles", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntities", resp, "Failure responding to request") } return } -// GetPatternAnyEntityRolesPreparer prepares the GetPatternAnyEntityRoles request. -func (client ModelClient) GetPatternAnyEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { +// ListCustomPrebuiltEntitiesPreparer prepares the ListCustomPrebuiltEntities request. +func (client ModelClient) ListCustomPrebuiltEntitiesPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), - "entityId": autorest.Encode("path", entityID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPatternAnyEntityRolesSender sends the GetPatternAnyEntityRoles request. The method will close the +// ListCustomPrebuiltEntitiesSender sends the ListCustomPrebuiltEntities request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetPatternAnyEntityRolesSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListCustomPrebuiltEntitiesSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetPatternAnyEntityRolesResponder handles the response to the GetPatternAnyEntityRoles request. The method always +// ListCustomPrebuiltEntitiesResponder handles the response to the ListCustomPrebuiltEntities request. The method always // closes the http.Response Body. -func (client ModelClient) GetPatternAnyEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { +func (client ModelClient) ListCustomPrebuiltEntitiesResponder(resp *http.Response) (result ListEntityExtractor, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -5477,91 +5678,16 @@ func (client ModelClient) GetPatternAnyEntityRolesResponder(resp *http.Response) return } -// GetPrebuilt gets information about the prebuilt entity model. -// Parameters: -// appID - the application ID. -// versionID - the version ID. -// prebuiltID - the prebuilt entity extractor ID. -func (client ModelClient) GetPrebuilt(ctx context.Context, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (result PrebuiltEntityExtractor, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetPrebuilt") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPrebuiltPreparer(ctx, appID, versionID, prebuiltID) - if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuilt", nil, "Failure preparing request") - return - } - - resp, err := client.GetPrebuiltSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuilt", resp, "Failure sending request") - return - } - - result, err = client.GetPrebuiltResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuilt", resp, "Failure responding to request") - } - - return -} - -// GetPrebuiltPreparer prepares the GetPrebuilt request. -func (client ModelClient) GetPrebuiltPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (*http.Request, error) { - urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, - } - - pathParameters := map[string]interface{}{ - "appId": autorest.Encode("path", appID), - "prebuiltId": autorest.Encode("path", prebuiltID), - "versionId": autorest.Encode("path", versionID), - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}", pathParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetPrebuiltSender sends the GetPrebuilt request. The method will close the -// http.Response Body if it receives an error. -func (client ModelClient) GetPrebuiltSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// GetPrebuiltResponder handles the response to the GetPrebuilt request. The method always -// closes the http.Response Body. -func (client ModelClient) GetPrebuiltResponder(resp *http.Response) (result PrebuiltEntityExtractor, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetPrebuiltEntityRole sends the get prebuilt entity role request. +// ListCustomPrebuiltEntityRoles sends the list custom prebuilt entity roles request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// entityID - entity ID. -// roleID - entity role ID. -func (client ModelClient) GetPrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { +// entityID - entity Id +func (client ModelClient) ListCustomPrebuiltEntityRoles(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetPrebuiltEntityRole") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCustomPrebuiltEntityRoles") defer func() { sc := -1 if result.Response.Response != nil { @@ -5570,75 +5696,77 @@ func (client ModelClient) GetPrebuiltEntityRole(ctx context.Context, appID uuid. tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID) + req, err := client.ListCustomPrebuiltEntityRolesPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRole", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntityRoles", nil, "Failure preparing request") return } - resp, err := client.GetPrebuiltEntityRoleSender(req) + resp, err := client.ListCustomPrebuiltEntityRolesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRole", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntityRoles", resp, "Failure sending request") return } - result, err = client.GetPrebuiltEntityRoleResponder(resp) + result, err = client.ListCustomPrebuiltEntityRolesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRole", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntityRoles", resp, "Failure responding to request") } return } -// GetPrebuiltEntityRolePreparer prepares the GetPrebuiltEntityRole request. -func (client ModelClient) GetPrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +// ListCustomPrebuiltEntityRolesPreparer prepares the ListCustomPrebuiltEntityRoles request. +func (client ModelClient) ListCustomPrebuiltEntityRolesPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), - "roleId": autorest.Encode("path", roleID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPrebuiltEntityRoleSender sends the GetPrebuiltEntityRole request. The method will close the +// ListCustomPrebuiltEntityRolesSender sends the ListCustomPrebuiltEntityRoles request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetPrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListCustomPrebuiltEntityRolesSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetPrebuiltEntityRoleResponder handles the response to the GetPrebuiltEntityRole request. The method always +// ListCustomPrebuiltEntityRolesResponder handles the response to the ListCustomPrebuiltEntityRoles request. The method always // closes the http.Response Body. -func (client ModelClient) GetPrebuiltEntityRoleResponder(resp *http.Response) (result EntityRole, err error) { +func (client ModelClient) ListCustomPrebuiltEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetPrebuiltEntityRoles sends the get prebuilt entity roles request. +// ListCustomPrebuiltIntents gets information about customizable prebuilt intents added to a version of the +// application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// entityID - entity Id -func (client ModelClient) GetPrebuiltEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) { +func (client ModelClient) ListCustomPrebuiltIntents(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (result ListIntentClassifier, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetPrebuiltEntityRoles") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCustomPrebuiltIntents") defer func() { sc := -1 if result.Response.Response != nil { @@ -5647,56 +5775,56 @@ func (client ModelClient) GetPrebuiltEntityRoles(ctx context.Context, appID uuid tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPrebuiltEntityRolesPreparer(ctx, appID, versionID, entityID) + req, err := client.ListCustomPrebuiltIntentsPreparer(ctx, azureRegion, azureCloud, appID, versionID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRoles", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltIntents", nil, "Failure preparing request") return } - resp, err := client.GetPrebuiltEntityRolesSender(req) + resp, err := client.ListCustomPrebuiltIntentsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRoles", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltIntents", resp, "Failure sending request") return } - result, err = client.GetPrebuiltEntityRolesResponder(resp) + result, err = client.ListCustomPrebuiltIntentsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRoles", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltIntents", resp, "Failure responding to request") } return } -// GetPrebuiltEntityRolesPreparer prepares the GetPrebuiltEntityRoles request. -func (client ModelClient) GetPrebuiltEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { +// ListCustomPrebuiltIntentsPreparer prepares the ListCustomPrebuiltIntents request. +func (client ModelClient) ListCustomPrebuiltIntentsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), - "entityId": autorest.Encode("path", entityID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltintents", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPrebuiltEntityRolesSender sends the GetPrebuiltEntityRoles request. The method will close the +// ListCustomPrebuiltIntentsSender sends the ListCustomPrebuiltIntents request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetPrebuiltEntityRolesSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListCustomPrebuiltIntentsSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetPrebuiltEntityRolesResponder handles the response to the GetPrebuiltEntityRoles request. The method always +// ListCustomPrebuiltIntentsResponder handles the response to the ListCustomPrebuiltIntents request. The method always // closes the http.Response Body. -func (client ModelClient) GetPrebuiltEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { +func (client ModelClient) ListCustomPrebuiltIntentsResponder(resp *http.Response) (result ListIntentClassifier, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -5707,14 +5835,16 @@ func (client ModelClient) GetPrebuiltEntityRolesResponder(resp *http.Response) ( return } -// GetRegexEntityEntityInfo sends the get regex entity entity info request. +// ListCustomPrebuiltModels gets all prebuilt intent and entity model information used in a version of this +// application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// regexEntityID - the regex entity model ID. -func (client ModelClient) GetRegexEntityEntityInfo(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (result RegexEntityExtractor, err error) { +func (client ModelClient) ListCustomPrebuiltModels(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (result ListCustomPrebuiltModel, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetRegexEntityEntityInfo") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCustomPrebuiltModels") defer func() { sc := -1 if result.Response.Response != nil { @@ -5723,75 +5853,77 @@ func (client ModelClient) GetRegexEntityEntityInfo(ctx context.Context, appID uu tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetRegexEntityEntityInfoPreparer(ctx, appID, versionID, regexEntityID) + req, err := client.ListCustomPrebuiltModelsPreparer(ctx, azureRegion, azureCloud, appID, versionID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityEntityInfo", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltModels", nil, "Failure preparing request") return } - resp, err := client.GetRegexEntityEntityInfoSender(req) + resp, err := client.ListCustomPrebuiltModelsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityEntityInfo", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltModels", resp, "Failure sending request") return } - result, err = client.GetRegexEntityEntityInfoResponder(resp) + result, err = client.ListCustomPrebuiltModelsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityEntityInfo", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltModels", resp, "Failure responding to request") } return } -// GetRegexEntityEntityInfoPreparer prepares the GetRegexEntityEntityInfo request. -func (client ModelClient) GetRegexEntityEntityInfoPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (*http.Request, error) { +// ListCustomPrebuiltModelsPreparer prepares the ListCustomPrebuiltModels request. +func (client ModelClient) ListCustomPrebuiltModelsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ - "appId": autorest.Encode("path", appID), - "regexEntityId": autorest.Encode("path", regexEntityID), - "versionId": autorest.Encode("path", versionID), + "appId": autorest.Encode("path", appID), + "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltmodels", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetRegexEntityEntityInfoSender sends the GetRegexEntityEntityInfo request. The method will close the +// ListCustomPrebuiltModelsSender sends the ListCustomPrebuiltModels request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetRegexEntityEntityInfoSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListCustomPrebuiltModelsSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetRegexEntityEntityInfoResponder handles the response to the GetRegexEntityEntityInfo request. The method always +// ListCustomPrebuiltModelsResponder handles the response to the ListCustomPrebuiltModels request. The method always // closes the http.Response Body. -func (client ModelClient) GetRegexEntityEntityInfoResponder(resp *http.Response) (result RegexEntityExtractor, err error) { +func (client ModelClient) ListCustomPrebuiltModelsResponder(resp *http.Response) (result ListCustomPrebuiltModel, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetRegexEntityInfos sends the get regex entity infos request. +// ListEntities gets information about all the simple entity models in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // skip - the number of entries to skip. Default value is 0. // take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client ModelClient) GetRegexEntityInfos(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListRegexEntityExtractor, err error) { +func (client ModelClient) ListEntities(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListEntityExtractor, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetRegexEntityInfos") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListEntities") defer func() { sc := -1 if result.Response.Response != nil { @@ -5809,34 +5941,35 @@ func (client ModelClient) GetRegexEntityInfos(ctx context.Context, appID uuid.UU Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}}}}); err != nil { - return result, validation.NewError("authoring.ModelClient", "GetRegexEntityInfos", err.Error()) + return result, validation.NewError("authoring.ModelClient", "ListEntities", err.Error()) } - req, err := client.GetRegexEntityInfosPreparer(ctx, appID, versionID, skip, take) + req, err := client.ListEntitiesPreparer(ctx, azureRegion, azureCloud, appID, versionID, skip, take) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityInfos", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntities", nil, "Failure preparing request") return } - resp, err := client.GetRegexEntityInfosSender(req) + resp, err := client.ListEntitiesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityInfos", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntities", resp, "Failure sending request") return } - result, err = client.GetRegexEntityInfosResponder(resp) + result, err = client.ListEntitiesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityInfos", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntities", resp, "Failure responding to request") } return } -// GetRegexEntityInfosPreparer prepares the GetRegexEntityInfos request. -func (client ModelClient) GetRegexEntityInfosPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { +// ListEntitiesPreparer prepares the ListEntities request. +func (client ModelClient) ListEntitiesPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -5858,22 +5991,22 @@ func (client ModelClient) GetRegexEntityInfosPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities", pathParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetRegexEntityInfosSender sends the GetRegexEntityInfos request. The method will close the +// ListEntitiesSender sends the ListEntities request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetRegexEntityInfosSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListEntitiesSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetRegexEntityInfosResponder handles the response to the GetRegexEntityInfos request. The method always +// ListEntitiesResponder handles the response to the ListEntities request. The method always // closes the http.Response Body. -func (client ModelClient) GetRegexEntityInfosResponder(resp *http.Response) (result ListRegexEntityExtractor, err error) { +func (client ModelClient) ListEntitiesResponder(resp *http.Response) (result ListEntityExtractor, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -5884,15 +6017,16 @@ func (client ModelClient) GetRegexEntityInfosResponder(resp *http.Response) (res return } -// GetRegexEntityRole sends the get regex entity role request. +// ListEntityRoles sends the list entity roles request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// entityID - entity ID. -// roleID - entity role ID. -func (client ModelClient) GetRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) { +// entityID - entity Id +func (client ModelClient) ListEntityRoles(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetRegexEntityRole") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListEntityRoles") defer func() { sc := -1 if result.Response.Response != nil { @@ -5901,75 +6035,79 @@ func (client ModelClient) GetRegexEntityRole(ctx context.Context, appID uuid.UUI tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetRegexEntityRolePreparer(ctx, appID, versionID, entityID, roleID) + req, err := client.ListEntityRolesPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRole", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntityRoles", nil, "Failure preparing request") return } - resp, err := client.GetRegexEntityRoleSender(req) + resp, err := client.ListEntityRolesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRole", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntityRoles", resp, "Failure sending request") return } - result, err = client.GetRegexEntityRoleResponder(resp) + result, err = client.ListEntityRolesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRole", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntityRoles", resp, "Failure responding to request") } return } -// GetRegexEntityRolePreparer prepares the GetRegexEntityRole request. -func (client ModelClient) GetRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) { +// ListEntityRolesPreparer prepares the ListEntityRoles request. +func (client ModelClient) ListEntityRolesPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), - "roleId": autorest.Encode("path", roleID), "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetRegexEntityRoleSender sends the GetRegexEntityRole request. The method will close the +// ListEntityRolesSender sends the ListEntityRoles request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetRegexEntityRoleSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListEntityRolesSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetRegexEntityRoleResponder handles the response to the GetRegexEntityRole request. The method always +// ListEntityRolesResponder handles the response to the ListEntityRoles request. The method always // closes the http.Response Body. -func (client ModelClient) GetRegexEntityRoleResponder(resp *http.Response) (result EntityRole, err error) { +func (client ModelClient) ListEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetRegexEntityRoles sends the get regex entity roles request. +// ListEntitySuggestions get suggested example utterances that would improve the accuracy of the entity model in a +// version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// entityID - entity Id -func (client ModelClient) GetRegexEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) { +// entityID - the target entity extractor model to enhance. +// take - the number of entries to return. Maximum page size is 500. Default is 100. +func (client ModelClient) ListEntitySuggestions(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, take *int32) (result ListEntitiesSuggestionExample, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetRegexEntityRoles") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListEntitySuggestions") defer func() { sc := -1 if result.Response.Response != nil { @@ -5978,31 +6116,41 @@ func (client ModelClient) GetRegexEntityRoles(ctx context.Context, appID uuid.UU tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetRegexEntityRolesPreparer(ctx, appID, versionID, entityID) + if err := validation.Validate([]validation.Validation{ + {TargetValue: take, + Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("authoring.ModelClient", "ListEntitySuggestions", err.Error()) + } + + req, err := client.ListEntitySuggestionsPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, take) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRoles", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntitySuggestions", nil, "Failure preparing request") return } - resp, err := client.GetRegexEntityRolesSender(req) + resp, err := client.ListEntitySuggestionsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRoles", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntitySuggestions", resp, "Failure sending request") return } - result, err = client.GetRegexEntityRolesResponder(resp) + result, err = client.ListEntitySuggestionsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRoles", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntitySuggestions", resp, "Failure responding to request") } return } -// GetRegexEntityRolesPreparer prepares the GetRegexEntityRoles request. -func (client ModelClient) GetRegexEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { +// ListEntitySuggestionsPreparer prepares the ListEntitySuggestions request. +func (client ModelClient) ListEntitySuggestionsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -6011,23 +6159,31 @@ func (client ModelClient) GetRegexEntityRolesPreparer(ctx context.Context, appID "versionId": autorest.Encode("path", versionID), } + queryParameters := map[string]interface{}{} + if take != nil { + queryParameters["take"] = autorest.Encode("query", *take) + } else { + queryParameters["take"] = autorest.Encode("query", 100) + } + preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/suggest", pathParameters), + autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetRegexEntityRolesSender sends the GetRegexEntityRoles request. The method will close the +// ListEntitySuggestionsSender sends the ListEntitySuggestions request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) GetRegexEntityRolesSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListEntitySuggestionsSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetRegexEntityRolesResponder handles the response to the GetRegexEntityRoles request. The method always +// ListEntitySuggestionsResponder handles the response to the ListEntitySuggestions request. The method always // closes the http.Response Body. -func (client ModelClient) GetRegexEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { +func (client ModelClient) ListEntitySuggestionsResponder(resp *http.Response) (result ListEntitiesSuggestionExample, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6038,15 +6194,17 @@ func (client ModelClient) GetRegexEntityRolesResponder(resp *http.Response) (res return } -// ListClosedLists gets information about the closedlist models. +// ListHierarchicalEntities gets information about all the hierarchical entity models in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // skip - the number of entries to skip. Default value is 0. // take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client ModelClient) ListClosedLists(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListClosedListEntityExtractor, err error) { +func (client ModelClient) ListHierarchicalEntities(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListHierarchicalEntityExtractor, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListClosedLists") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListHierarchicalEntities") defer func() { sc := -1 if result.Response.Response != nil { @@ -6064,34 +6222,35 @@ func (client ModelClient) ListClosedLists(ctx context.Context, appID uuid.UUID, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}}}}); err != nil { - return result, validation.NewError("authoring.ModelClient", "ListClosedLists", err.Error()) + return result, validation.NewError("authoring.ModelClient", "ListHierarchicalEntities", err.Error()) } - req, err := client.ListClosedListsPreparer(ctx, appID, versionID, skip, take) + req, err := client.ListHierarchicalEntitiesPreparer(ctx, azureRegion, azureCloud, appID, versionID, skip, take) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedLists", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntities", nil, "Failure preparing request") return } - resp, err := client.ListClosedListsSender(req) + resp, err := client.ListHierarchicalEntitiesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedLists", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntities", resp, "Failure sending request") return } - result, err = client.ListClosedListsResponder(resp) + result, err = client.ListHierarchicalEntitiesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedLists", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntities", resp, "Failure responding to request") } return } -// ListClosedListsPreparer prepares the ListClosedLists request. -func (client ModelClient) ListClosedListsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { +// ListHierarchicalEntitiesPreparer prepares the ListHierarchicalEntities request. +func (client ModelClient) ListHierarchicalEntitiesPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -6113,22 +6272,22 @@ func (client ModelClient) ListClosedListsPreparer(ctx context.Context, appID uui preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists", pathParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListClosedListsSender sends the ListClosedLists request. The method will close the +// ListHierarchicalEntitiesSender sends the ListHierarchicalEntities request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) ListClosedListsSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListHierarchicalEntitiesSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// ListClosedListsResponder handles the response to the ListClosedLists request. The method always +// ListHierarchicalEntitiesResponder handles the response to the ListHierarchicalEntities request. The method always // closes the http.Response Body. -func (client ModelClient) ListClosedListsResponder(resp *http.Response) (result ListClosedListEntityExtractor, err error) { +func (client ModelClient) ListHierarchicalEntitiesResponder(resp *http.Response) (result ListHierarchicalEntityExtractor, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6139,15 +6298,16 @@ func (client ModelClient) ListClosedListsResponder(resp *http.Response) (result return } -// ListCompositeEntities gets information about the composite entity models. +// ListHierarchicalEntityRoles sends the list hierarchical entity roles request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// skip - the number of entries to skip. Default value is 0. -// take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client ModelClient) ListCompositeEntities(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListCompositeEntityExtractor, err error) { +// hEntityID - the hierarchical entity extractor ID. +func (client ModelClient) ListHierarchicalEntityRoles(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result ListEntityRole, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCompositeEntities") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListHierarchicalEntityRoles") defer func() { sc := -1 if result.Response.Response != nil { @@ -6156,80 +6316,57 @@ func (client ModelClient) ListCompositeEntities(ctx context.Context, appID uuid. tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: skip, - Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, - {TargetValue: take, - Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("authoring.ModelClient", "ListCompositeEntities", err.Error()) - } - - req, err := client.ListCompositeEntitiesPreparer(ctx, appID, versionID, skip, take) + req, err := client.ListHierarchicalEntityRolesPreparer(ctx, azureRegion, azureCloud, appID, versionID, hEntityID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntities", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntityRoles", nil, "Failure preparing request") return } - resp, err := client.ListCompositeEntitiesSender(req) + resp, err := client.ListHierarchicalEntityRolesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntities", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntityRoles", resp, "Failure sending request") return } - result, err = client.ListCompositeEntitiesResponder(resp) + result, err = client.ListHierarchicalEntityRolesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntities", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntityRoles", resp, "Failure responding to request") } return } -// ListCompositeEntitiesPreparer prepares the ListCompositeEntities request. -func (client ModelClient) ListCompositeEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { +// ListHierarchicalEntityRolesPreparer prepares the ListHierarchicalEntityRoles request. +func (client ModelClient) ListHierarchicalEntityRolesPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), + "hEntityId": autorest.Encode("path", hEntityID), "versionId": autorest.Encode("path", versionID), } - queryParameters := map[string]interface{}{} - if skip != nil { - queryParameters["skip"] = autorest.Encode("query", *skip) - } else { - queryParameters["skip"] = autorest.Encode("query", 0) - } - if take != nil { - queryParameters["take"] = autorest.Encode("query", *take) - } else { - queryParameters["take"] = autorest.Encode("query", 100) - } - preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities", pathParameters), - autorest.WithQueryParameters(queryParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListCompositeEntitiesSender sends the ListCompositeEntities request. The method will close the +// ListHierarchicalEntityRolesSender sends the ListHierarchicalEntityRoles request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) ListCompositeEntitiesSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListHierarchicalEntityRolesSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// ListCompositeEntitiesResponder handles the response to the ListCompositeEntities request. The method always +// ListHierarchicalEntityRolesResponder handles the response to the ListHierarchicalEntityRoles request. The method always // closes the http.Response Body. -func (client ModelClient) ListCompositeEntitiesResponder(resp *http.Response) (result ListCompositeEntityExtractor, err error) { +func (client ModelClient) ListHierarchicalEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6240,13 +6377,17 @@ func (client ModelClient) ListCompositeEntitiesResponder(resp *http.Response) (r return } -// ListCustomPrebuiltEntities gets all custom prebuilt entities information of this application. +// ListIntents gets information about the intent models in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -func (client ModelClient) ListCustomPrebuiltEntities(ctx context.Context, appID uuid.UUID, versionID string) (result ListEntityExtractor, err error) { +// skip - the number of entries to skip. Default value is 0. +// take - the number of entries to return. Maximum page size is 500. Default is 100. +func (client ModelClient) ListIntents(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListIntentClassifier, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCustomPrebuiltEntities") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListIntents") defer func() { sc := -1 if result.Response.Response != nil { @@ -6255,31 +6396,44 @@ func (client ModelClient) ListCustomPrebuiltEntities(ctx context.Context, appID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ListCustomPrebuiltEntitiesPreparer(ctx, appID, versionID) + if err := validation.Validate([]validation.Validation{ + {TargetValue: skip, + Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + {TargetValue: take, + Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("authoring.ModelClient", "ListIntents", err.Error()) + } + + req, err := client.ListIntentsPreparer(ctx, azureRegion, azureCloud, appID, versionID, skip, take) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntities", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntents", nil, "Failure preparing request") return } - resp, err := client.ListCustomPrebuiltEntitiesSender(req) + resp, err := client.ListIntentsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntities", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntents", resp, "Failure sending request") return } - result, err = client.ListCustomPrebuiltEntitiesResponder(resp) + result, err = client.ListIntentsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntities", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntents", resp, "Failure responding to request") } return } -// ListCustomPrebuiltEntitiesPreparer prepares the ListCustomPrebuiltEntities request. -func (client ModelClient) ListCustomPrebuiltEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) { +// ListIntentsPreparer prepares the ListIntents request. +func (client ModelClient) ListIntentsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -6287,23 +6441,36 @@ func (client ModelClient) ListCustomPrebuiltEntitiesPreparer(ctx context.Context "versionId": autorest.Encode("path", versionID), } + queryParameters := map[string]interface{}{} + if skip != nil { + queryParameters["skip"] = autorest.Encode("query", *skip) + } else { + queryParameters["skip"] = autorest.Encode("query", 0) + } + if take != nil { + queryParameters["take"] = autorest.Encode("query", *take) + } else { + queryParameters["take"] = autorest.Encode("query", 100) + } + preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents", pathParameters), + autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListCustomPrebuiltEntitiesSender sends the ListCustomPrebuiltEntities request. The method will close the +// ListIntentsSender sends the ListIntents request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) ListCustomPrebuiltEntitiesSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListIntentsSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// ListCustomPrebuiltEntitiesResponder handles the response to the ListCustomPrebuiltEntities request. The method always +// ListIntentsResponder handles the response to the ListIntents request. The method always // closes the http.Response Body. -func (client ModelClient) ListCustomPrebuiltEntitiesResponder(resp *http.Response) (result ListEntityExtractor, err error) { +func (client ModelClient) ListIntentsResponder(resp *http.Response) (result ListIntentClassifier, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6314,13 +6481,18 @@ func (client ModelClient) ListCustomPrebuiltEntitiesResponder(resp *http.Respons return } -// ListCustomPrebuiltIntents gets custom prebuilt intents information of this application. +// ListIntentSuggestions suggests example utterances that would improve the accuracy of the intent model in a version +// of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -func (client ModelClient) ListCustomPrebuiltIntents(ctx context.Context, appID uuid.UUID, versionID string) (result ListIntentClassifier, err error) { +// intentID - the intent classifier ID. +// take - the number of entries to return. Maximum page size is 500. Default is 100. +func (client ModelClient) ListIntentSuggestions(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, intentID uuid.UUID, take *int32) (result ListIntentsSuggestionExample, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCustomPrebuiltIntents") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListIntentSuggestions") defer func() { sc := -1 if result.Response.Response != nil { @@ -6329,55 +6501,74 @@ func (client ModelClient) ListCustomPrebuiltIntents(ctx context.Context, appID u tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ListCustomPrebuiltIntentsPreparer(ctx, appID, versionID) + if err := validation.Validate([]validation.Validation{ + {TargetValue: take, + Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("authoring.ModelClient", "ListIntentSuggestions", err.Error()) + } + + req, err := client.ListIntentSuggestionsPreparer(ctx, azureRegion, azureCloud, appID, versionID, intentID, take) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltIntents", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntentSuggestions", nil, "Failure preparing request") return } - resp, err := client.ListCustomPrebuiltIntentsSender(req) + resp, err := client.ListIntentSuggestionsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltIntents", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntentSuggestions", resp, "Failure sending request") return } - result, err = client.ListCustomPrebuiltIntentsResponder(resp) + result, err = client.ListIntentSuggestionsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltIntents", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntentSuggestions", resp, "Failure responding to request") } return } -// ListCustomPrebuiltIntentsPreparer prepares the ListCustomPrebuiltIntents request. -func (client ModelClient) ListCustomPrebuiltIntentsPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) { +// ListIntentSuggestionsPreparer prepares the ListIntentSuggestions request. +func (client ModelClient) ListIntentSuggestionsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, intentID uuid.UUID, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), + "intentId": autorest.Encode("path", intentID), "versionId": autorest.Encode("path", versionID), } + queryParameters := map[string]interface{}{} + if take != nil { + queryParameters["take"] = autorest.Encode("query", *take) + } else { + queryParameters["take"] = autorest.Encode("query", 100) + } + preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltintents", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/suggest", pathParameters), + autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListCustomPrebuiltIntentsSender sends the ListCustomPrebuiltIntents request. The method will close the +// ListIntentSuggestionsSender sends the ListIntentSuggestions request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) ListCustomPrebuiltIntentsSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListIntentSuggestionsSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// ListCustomPrebuiltIntentsResponder handles the response to the ListCustomPrebuiltIntents request. The method always +// ListIntentSuggestionsResponder handles the response to the ListIntentSuggestions request. The method always // closes the http.Response Body. -func (client ModelClient) ListCustomPrebuiltIntentsResponder(resp *http.Response) (result ListIntentClassifier, err error) { +func (client ModelClient) ListIntentSuggestionsResponder(resp *http.Response) (result ListIntentsSuggestionExample, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6388,13 +6579,17 @@ func (client ModelClient) ListCustomPrebuiltIntentsResponder(resp *http.Response return } -// ListCustomPrebuiltModels gets all custom prebuilt models information of this application. +// ListModels gets information about all the intent and entity models in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -func (client ModelClient) ListCustomPrebuiltModels(ctx context.Context, appID uuid.UUID, versionID string) (result ListCustomPrebuiltModel, err error) { +// skip - the number of entries to skip. Default value is 0. +// take - the number of entries to return. Maximum page size is 500. Default is 100. +func (client ModelClient) ListModels(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListModelInfoResponse, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCustomPrebuiltModels") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListModels") defer func() { sc := -1 if result.Response.Response != nil { @@ -6403,31 +6598,44 @@ func (client ModelClient) ListCustomPrebuiltModels(ctx context.Context, appID uu tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ListCustomPrebuiltModelsPreparer(ctx, appID, versionID) + if err := validation.Validate([]validation.Validation{ + {TargetValue: skip, + Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + {TargetValue: take, + Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("authoring.ModelClient", "ListModels", err.Error()) + } + + req, err := client.ListModelsPreparer(ctx, azureRegion, azureCloud, appID, versionID, skip, take) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltModels", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListModels", nil, "Failure preparing request") return } - resp, err := client.ListCustomPrebuiltModelsSender(req) + resp, err := client.ListModelsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltModels", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListModels", resp, "Failure sending request") return } - result, err = client.ListCustomPrebuiltModelsResponder(resp) + result, err = client.ListModelsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltModels", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListModels", resp, "Failure responding to request") } return } -// ListCustomPrebuiltModelsPreparer prepares the ListCustomPrebuiltModels request. -func (client ModelClient) ListCustomPrebuiltModelsPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) { +// ListModelsPreparer prepares the ListModels request. +func (client ModelClient) ListModelsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -6435,23 +6643,36 @@ func (client ModelClient) ListCustomPrebuiltModelsPreparer(ctx context.Context, "versionId": autorest.Encode("path", versionID), } + queryParameters := map[string]interface{}{} + if skip != nil { + queryParameters["skip"] = autorest.Encode("query", *skip) + } else { + queryParameters["skip"] = autorest.Encode("query", 0) + } + if take != nil { + queryParameters["take"] = autorest.Encode("query", *take) + } else { + queryParameters["take"] = autorest.Encode("query", 100) + } + preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltmodels", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/models", pathParameters), + autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListCustomPrebuiltModelsSender sends the ListCustomPrebuiltModels request. The method will close the +// ListModelsSender sends the ListModels request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) ListCustomPrebuiltModelsSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListModelsSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// ListCustomPrebuiltModelsResponder handles the response to the ListCustomPrebuiltModels request. The method always +// ListModelsResponder handles the response to the ListModels request. The method always // closes the http.Response Body. -func (client ModelClient) ListCustomPrebuiltModelsResponder(resp *http.Response) (result ListCustomPrebuiltModel, err error) { +func (client ModelClient) ListModelsResponder(resp *http.Response) (result ListModelInfoResponse, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6462,15 +6683,17 @@ func (client ModelClient) ListCustomPrebuiltModelsResponder(resp *http.Response) return } -// ListEntities gets information about the entity models. +// ListPatternAnyEntityInfos sends the list pattern any entity infos request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // skip - the number of entries to skip. Default value is 0. // take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client ModelClient) ListEntities(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListEntityExtractor, err error) { +func (client ModelClient) ListPatternAnyEntityInfos(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPatternAnyEntityExtractor, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListEntities") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListPatternAnyEntityInfos") defer func() { sc := -1 if result.Response.Response != nil { @@ -6488,34 +6711,35 @@ func (client ModelClient) ListEntities(ctx context.Context, appID uuid.UUID, ver Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}}}}); err != nil { - return result, validation.NewError("authoring.ModelClient", "ListEntities", err.Error()) + return result, validation.NewError("authoring.ModelClient", "ListPatternAnyEntityInfos", err.Error()) } - req, err := client.ListEntitiesPreparer(ctx, appID, versionID, skip, take) + req, err := client.ListPatternAnyEntityInfosPreparer(ctx, azureRegion, azureCloud, appID, versionID, skip, take) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntities", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPatternAnyEntityInfos", nil, "Failure preparing request") return } - resp, err := client.ListEntitiesSender(req) + resp, err := client.ListPatternAnyEntityInfosSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntities", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPatternAnyEntityInfos", resp, "Failure sending request") return } - result, err = client.ListEntitiesResponder(resp) + result, err = client.ListPatternAnyEntityInfosResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntities", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPatternAnyEntityInfos", resp, "Failure responding to request") } return } -// ListEntitiesPreparer prepares the ListEntities request. -func (client ModelClient) ListEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { +// ListPatternAnyEntityInfosPreparer prepares the ListPatternAnyEntityInfos request. +func (client ModelClient) ListPatternAnyEntityInfosPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -6537,22 +6761,22 @@ func (client ModelClient) ListEntitiesPreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities", pathParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListEntitiesSender sends the ListEntities request. The method will close the +// ListPatternAnyEntityInfosSender sends the ListPatternAnyEntityInfos request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) ListEntitiesSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListPatternAnyEntityInfosSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// ListEntitiesResponder handles the response to the ListEntities request. The method always +// ListPatternAnyEntityInfosResponder handles the response to the ListPatternAnyEntityInfos request. The method always // closes the http.Response Body. -func (client ModelClient) ListEntitiesResponder(resp *http.Response) (result ListEntityExtractor, err error) { +func (client ModelClient) ListPatternAnyEntityInfosResponder(resp *http.Response) (result ListPatternAnyEntityExtractor, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6563,15 +6787,16 @@ func (client ModelClient) ListEntitiesResponder(resp *http.Response) (result Lis return } -// ListHierarchicalEntities gets information about the hierarchical entity models. +// ListPatternAnyEntityRoles sends the list pattern any entity roles request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// skip - the number of entries to skip. Default value is 0. -// take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client ModelClient) ListHierarchicalEntities(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListHierarchicalEntityExtractor, err error) { +// entityID - entity Id +func (client ModelClient) ListPatternAnyEntityRoles(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListHierarchicalEntities") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListPatternAnyEntityRoles") defer func() { sc := -1 if result.Response.Response != nil { @@ -6580,80 +6805,57 @@ func (client ModelClient) ListHierarchicalEntities(ctx context.Context, appID uu tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: skip, - Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, - {TargetValue: take, - Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("authoring.ModelClient", "ListHierarchicalEntities", err.Error()) - } - - req, err := client.ListHierarchicalEntitiesPreparer(ctx, appID, versionID, skip, take) + req, err := client.ListPatternAnyEntityRolesPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntities", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPatternAnyEntityRoles", nil, "Failure preparing request") return } - resp, err := client.ListHierarchicalEntitiesSender(req) + resp, err := client.ListPatternAnyEntityRolesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntities", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPatternAnyEntityRoles", resp, "Failure sending request") return } - result, err = client.ListHierarchicalEntitiesResponder(resp) + result, err = client.ListPatternAnyEntityRolesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntities", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPatternAnyEntityRoles", resp, "Failure responding to request") } return } -// ListHierarchicalEntitiesPreparer prepares the ListHierarchicalEntities request. -func (client ModelClient) ListHierarchicalEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { +// ListPatternAnyEntityRolesPreparer prepares the ListPatternAnyEntityRoles request. +func (client ModelClient) ListPatternAnyEntityRolesPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), + "entityId": autorest.Encode("path", entityID), "versionId": autorest.Encode("path", versionID), } - queryParameters := map[string]interface{}{} - if skip != nil { - queryParameters["skip"] = autorest.Encode("query", *skip) - } else { - queryParameters["skip"] = autorest.Encode("query", 0) - } - if take != nil { - queryParameters["take"] = autorest.Encode("query", *take) - } else { - queryParameters["take"] = autorest.Encode("query", 100) - } - preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities", pathParameters), - autorest.WithQueryParameters(queryParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListHierarchicalEntitiesSender sends the ListHierarchicalEntities request. The method will close the +// ListPatternAnyEntityRolesSender sends the ListPatternAnyEntityRoles request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) ListHierarchicalEntitiesSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListPatternAnyEntityRolesSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// ListHierarchicalEntitiesResponder handles the response to the ListHierarchicalEntities request. The method always +// ListPatternAnyEntityRolesResponder handles the response to the ListPatternAnyEntityRoles request. The method always // closes the http.Response Body. -func (client ModelClient) ListHierarchicalEntitiesResponder(resp *http.Response) (result ListHierarchicalEntityExtractor, err error) { +func (client ModelClient) ListPatternAnyEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6664,15 +6866,15 @@ func (client ModelClient) ListHierarchicalEntitiesResponder(resp *http.Response) return } -// ListIntents gets information about the intent models. +// ListPrebuiltEntities gets all the available prebuilt entities in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// skip - the number of entries to skip. Default value is 0. -// take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client ModelClient) ListIntents(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListIntentClassifier, err error) { +func (client ModelClient) ListPrebuiltEntities(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (result ListAvailablePrebuiltEntityModel, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListIntents") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListPrebuiltEntities") defer func() { sc := -1 if result.Response.Response != nil { @@ -6681,43 +6883,32 @@ func (client ModelClient) ListIntents(ctx context.Context, appID uuid.UUID, vers tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: skip, - Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, - {TargetValue: take, - Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("authoring.ModelClient", "ListIntents", err.Error()) - } - - req, err := client.ListIntentsPreparer(ctx, appID, versionID, skip, take) + req, err := client.ListPrebuiltEntitiesPreparer(ctx, azureRegion, azureCloud, appID, versionID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntents", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntities", nil, "Failure preparing request") return } - resp, err := client.ListIntentsSender(req) + resp, err := client.ListPrebuiltEntitiesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntents", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntities", resp, "Failure sending request") return } - result, err = client.ListIntentsResponder(resp) + result, err = client.ListPrebuiltEntitiesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntents", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntities", resp, "Failure responding to request") } return } -// ListIntentsPreparer prepares the ListIntents request. -func (client ModelClient) ListIntentsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { +// ListPrebuiltEntitiesPreparer prepares the ListPrebuiltEntities request. +func (client ModelClient) ListPrebuiltEntitiesPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -6725,36 +6916,102 @@ func (client ModelClient) ListIntentsPreparer(ctx context.Context, appID uuid.UU "versionId": autorest.Encode("path", versionID), } - queryParameters := map[string]interface{}{} - if skip != nil { - queryParameters["skip"] = autorest.Encode("query", *skip) - } else { - queryParameters["skip"] = autorest.Encode("query", 0) + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/listprebuilts", pathParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListPrebuiltEntitiesSender sends the ListPrebuiltEntities request. The method will close the +// http.Response Body if it receives an error. +func (client ModelClient) ListPrebuiltEntitiesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// ListPrebuiltEntitiesResponder handles the response to the ListPrebuiltEntities request. The method always +// closes the http.Response Body. +func (client ModelClient) ListPrebuiltEntitiesResponder(resp *http.Response) (result ListAvailablePrebuiltEntityModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListPrebuiltEntityRoles sends the list prebuilt entity roles request. +// Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints +// appID - the application ID. +// versionID - the version ID. +// entityID - entity Id +func (client ModelClient) ListPrebuiltEntityRoles(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListPrebuiltEntityRoles") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if take != nil { - queryParameters["take"] = autorest.Encode("query", *take) - } else { - queryParameters["take"] = autorest.Encode("query", 100) + req, err := client.ListPrebuiltEntityRolesPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID) + if err != nil { + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntityRoles", nil, "Failure preparing request") + return + } + + resp, err := client.ListPrebuiltEntityRolesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntityRoles", resp, "Failure sending request") + return + } + + result, err = client.ListPrebuiltEntityRolesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntityRoles", resp, "Failure responding to request") + } + + return +} + +// ListPrebuiltEntityRolesPreparer prepares the ListPrebuiltEntityRoles request. +func (client ModelClient) ListPrebuiltEntityRolesPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, + } + + pathParameters := map[string]interface{}{ + "appId": autorest.Encode("path", appID), + "entityId": autorest.Encode("path", entityID), + "versionId": autorest.Encode("path", versionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents", pathParameters), - autorest.WithQueryParameters(queryParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListIntentsSender sends the ListIntents request. The method will close the +// ListPrebuiltEntityRolesSender sends the ListPrebuiltEntityRoles request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) ListIntentsSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListPrebuiltEntityRolesSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// ListIntentsResponder handles the response to the ListIntents request. The method always +// ListPrebuiltEntityRolesResponder handles the response to the ListPrebuiltEntityRoles request. The method always // closes the http.Response Body. -func (client ModelClient) ListIntentsResponder(resp *http.Response) (result ListIntentClassifier, err error) { +func (client ModelClient) ListPrebuiltEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6765,15 +7022,17 @@ func (client ModelClient) ListIntentsResponder(resp *http.Response) (result List return } -// ListModels gets information about the application version models. +// ListPrebuilts gets information about all the prebuilt entities in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // skip - the number of entries to skip. Default value is 0. // take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client ModelClient) ListModels(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListModelInfoResponse, err error) { +func (client ModelClient) ListPrebuilts(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPrebuiltEntityExtractor, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListModels") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListPrebuilts") defer func() { sc := -1 if result.Response.Response != nil { @@ -6791,34 +7050,35 @@ func (client ModelClient) ListModels(ctx context.Context, appID uuid.UUID, versi Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}}}}); err != nil { - return result, validation.NewError("authoring.ModelClient", "ListModels", err.Error()) + return result, validation.NewError("authoring.ModelClient", "ListPrebuilts", err.Error()) } - req, err := client.ListModelsPreparer(ctx, appID, versionID, skip, take) + req, err := client.ListPrebuiltsPreparer(ctx, azureRegion, azureCloud, appID, versionID, skip, take) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListModels", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuilts", nil, "Failure preparing request") return } - resp, err := client.ListModelsSender(req) + resp, err := client.ListPrebuiltsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListModels", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuilts", resp, "Failure sending request") return } - result, err = client.ListModelsResponder(resp) + result, err = client.ListPrebuiltsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListModels", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuilts", resp, "Failure responding to request") } return } -// ListModelsPreparer prepares the ListModels request. -func (client ModelClient) ListModelsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { +// ListPrebuiltsPreparer prepares the ListPrebuilts request. +func (client ModelClient) ListPrebuiltsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -6840,22 +7100,22 @@ func (client ModelClient) ListModelsPreparer(ctx context.Context, appID uuid.UUI preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/models", pathParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListModelsSender sends the ListModels request. The method will close the +// ListPrebuiltsSender sends the ListPrebuilts request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) ListModelsSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListPrebuiltsSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// ListModelsResponder handles the response to the ListModels request. The method always +// ListPrebuiltsResponder handles the response to the ListPrebuilts request. The method always // closes the http.Response Body. -func (client ModelClient) ListModelsResponder(resp *http.Response) (result ListModelInfoResponse, err error) { +func (client ModelClient) ListPrebuiltsResponder(resp *http.Response) (result ListPrebuiltEntityExtractor, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6866,13 +7126,17 @@ func (client ModelClient) ListModelsResponder(resp *http.Response) (result ListM return } -// ListPrebuiltEntities gets all the available prebuilt entity extractors for the application. +// ListRegexEntityInfos sends the list regex entity infos request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -func (client ModelClient) ListPrebuiltEntities(ctx context.Context, appID uuid.UUID, versionID string) (result ListAvailablePrebuiltEntityModel, err error) { +// skip - the number of entries to skip. Default value is 0. +// take - the number of entries to return. Maximum page size is 500. Default is 100. +func (client ModelClient) ListRegexEntityInfos(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListRegexEntityExtractor, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListPrebuiltEntities") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListRegexEntityInfos") defer func() { sc := -1 if result.Response.Response != nil { @@ -6881,31 +7145,44 @@ func (client ModelClient) ListPrebuiltEntities(ctx context.Context, appID uuid.U tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ListPrebuiltEntitiesPreparer(ctx, appID, versionID) + if err := validation.Validate([]validation.Validation{ + {TargetValue: skip, + Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + {TargetValue: take, + Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("authoring.ModelClient", "ListRegexEntityInfos", err.Error()) + } + + req, err := client.ListRegexEntityInfosPreparer(ctx, azureRegion, azureCloud, appID, versionID, skip, take) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntities", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListRegexEntityInfos", nil, "Failure preparing request") return } - resp, err := client.ListPrebuiltEntitiesSender(req) + resp, err := client.ListRegexEntityInfosSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntities", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListRegexEntityInfos", resp, "Failure sending request") return } - result, err = client.ListPrebuiltEntitiesResponder(resp) + result, err = client.ListRegexEntityInfosResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntities", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListRegexEntityInfos", resp, "Failure responding to request") } return } -// ListPrebuiltEntitiesPreparer prepares the ListPrebuiltEntities request. -func (client ModelClient) ListPrebuiltEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) { +// ListRegexEntityInfosPreparer prepares the ListRegexEntityInfos request. +func (client ModelClient) ListRegexEntityInfosPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -6913,23 +7190,36 @@ func (client ModelClient) ListPrebuiltEntitiesPreparer(ctx context.Context, appI "versionId": autorest.Encode("path", versionID), } + queryParameters := map[string]interface{}{} + if skip != nil { + queryParameters["skip"] = autorest.Encode("query", *skip) + } else { + queryParameters["skip"] = autorest.Encode("query", 0) + } + if take != nil { + queryParameters["take"] = autorest.Encode("query", *take) + } else { + queryParameters["take"] = autorest.Encode("query", 100) + } + preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/listprebuilts", pathParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities", pathParameters), + autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListPrebuiltEntitiesSender sends the ListPrebuiltEntities request. The method will close the +// ListRegexEntityInfosSender sends the ListRegexEntityInfos request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) ListPrebuiltEntitiesSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListRegexEntityInfosSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// ListPrebuiltEntitiesResponder handles the response to the ListPrebuiltEntities request. The method always +// ListRegexEntityInfosResponder handles the response to the ListRegexEntityInfos request. The method always // closes the http.Response Body. -func (client ModelClient) ListPrebuiltEntitiesResponder(resp *http.Response) (result ListAvailablePrebuiltEntityModel, err error) { +func (client ModelClient) ListRegexEntityInfosResponder(resp *http.Response) (result ListRegexEntityExtractor, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6940,15 +7230,16 @@ func (client ModelClient) ListPrebuiltEntitiesResponder(resp *http.Response) (re return } -// ListPrebuilts gets information about the prebuilt entity models. +// ListRegexEntityRoles sends the list regex entity roles request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// skip - the number of entries to skip. Default value is 0. -// take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client ModelClient) ListPrebuilts(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPrebuiltEntityExtractor, err error) { +// entityID - entity Id +func (client ModelClient) ListRegexEntityRoles(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListPrebuilts") + ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListRegexEntityRoles") defer func() { sc := -1 if result.Response.Response != nil { @@ -6957,80 +7248,57 @@ func (client ModelClient) ListPrebuilts(ctx context.Context, appID uuid.UUID, ve tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: skip, - Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, - {TargetValue: take, - Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("authoring.ModelClient", "ListPrebuilts", err.Error()) - } - - req, err := client.ListPrebuiltsPreparer(ctx, appID, versionID, skip, take) + req, err := client.ListRegexEntityRolesPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuilts", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListRegexEntityRoles", nil, "Failure preparing request") return } - resp, err := client.ListPrebuiltsSender(req) + resp, err := client.ListRegexEntityRolesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuilts", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListRegexEntityRoles", resp, "Failure sending request") return } - result, err = client.ListPrebuiltsResponder(resp) + result, err = client.ListRegexEntityRolesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuilts", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListRegexEntityRoles", resp, "Failure responding to request") } return } -// ListPrebuiltsPreparer prepares the ListPrebuilts request. -func (client ModelClient) ListPrebuiltsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { +// ListRegexEntityRolesPreparer prepares the ListRegexEntityRoles request. +func (client ModelClient) ListRegexEntityRolesPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), + "entityId": autorest.Encode("path", entityID), "versionId": autorest.Encode("path", versionID), } - queryParameters := map[string]interface{}{} - if skip != nil { - queryParameters["skip"] = autorest.Encode("query", *skip) - } else { - queryParameters["skip"] = autorest.Encode("query", 0) - } - if take != nil { - queryParameters["take"] = autorest.Encode("query", *take) - } else { - queryParameters["take"] = autorest.Encode("query", 100) - } - preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts", pathParameters), - autorest.WithQueryParameters(queryParameters)) + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListPrebuiltsSender sends the ListPrebuilts request. The method will close the +// ListRegexEntityRolesSender sends the ListRegexEntityRoles request. The method will close the // http.Response Body if it receives an error. -func (client ModelClient) ListPrebuiltsSender(req *http.Request) (*http.Response, error) { +func (client ModelClient) ListRegexEntityRolesSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// ListPrebuiltsResponder handles the response to the ListPrebuilts request. The method always +// ListRegexEntityRolesResponder handles the response to the ListRegexEntityRoles request. The method always // closes the http.Response Body. -func (client ModelClient) ListPrebuiltsResponder(resp *http.Response) (result ListPrebuiltEntityExtractor, err error) { +func (client ModelClient) ListRegexEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -7041,13 +7309,15 @@ func (client ModelClient) ListPrebuiltsResponder(resp *http.Response) (result Li return } -// PatchClosedList adds a batch of sublists to an existing closedlist. +// PatchClosedList adds a batch of sublists to an existing list entity in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// clEntityID - the closed list model ID. +// clEntityID - the list entity model ID. // closedListModelPatchObject - a words list batch. -func (client ModelClient) PatchClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelPatchObject ClosedListModelPatchObject) (result OperationStatus, err error) { +func (client ModelClient) PatchClosedList(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelPatchObject ClosedListModelPatchObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.PatchClosedList") defer func() { @@ -7058,7 +7328,7 @@ func (client ModelClient) PatchClosedList(ctx context.Context, appID uuid.UUID, tracing.EndSpan(ctx, sc, err) }() } - req, err := client.PatchClosedListPreparer(ctx, appID, versionID, clEntityID, closedListModelPatchObject) + req, err := client.PatchClosedListPreparer(ctx, azureRegion, azureCloud, appID, versionID, clEntityID, closedListModelPatchObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "PatchClosedList", nil, "Failure preparing request") return @@ -7080,9 +7350,10 @@ func (client ModelClient) PatchClosedList(ctx context.Context, appID uuid.UUID, } // PatchClosedListPreparer prepares the PatchClosedList request. -func (client ModelClient) PatchClosedListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelPatchObject ClosedListModelPatchObject) (*http.Request, error) { +func (client ModelClient) PatchClosedListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelPatchObject ClosedListModelPatchObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -7094,7 +7365,7 @@ func (client ModelClient) PatchClosedListPreparer(ctx context.Context, appID uui preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPatch(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters), autorest.WithJSON(closedListModelPatchObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -7120,13 +7391,15 @@ func (client ModelClient) PatchClosedListResponder(resp *http.Response) (result return } -// UpdateClosedList updates the closed list model. +// UpdateClosedList updates the list entity in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// clEntityID - the closed list model ID. -// closedListModelUpdateObject - the new entity name and words list. -func (client ModelClient) UpdateClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelUpdateObject ClosedListModelUpdateObject) (result OperationStatus, err error) { +// clEntityID - the list model ID. +// closedListModelUpdateObject - the new list entity name and words list. +func (client ModelClient) UpdateClosedList(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelUpdateObject ClosedListModelUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateClosedList") defer func() { @@ -7137,7 +7410,7 @@ func (client ModelClient) UpdateClosedList(ctx context.Context, appID uuid.UUID, tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateClosedListPreparer(ctx, appID, versionID, clEntityID, closedListModelUpdateObject) + req, err := client.UpdateClosedListPreparer(ctx, azureRegion, azureCloud, appID, versionID, clEntityID, closedListModelUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateClosedList", nil, "Failure preparing request") return @@ -7159,9 +7432,10 @@ func (client ModelClient) UpdateClosedList(ctx context.Context, appID uuid.UUID, } // UpdateClosedListPreparer prepares the UpdateClosedList request. -func (client ModelClient) UpdateClosedListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelUpdateObject ClosedListModelUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdateClosedListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelUpdateObject ClosedListModelUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -7173,7 +7447,7 @@ func (client ModelClient) UpdateClosedListPreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters), autorest.WithJSON(closedListModelUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -7201,12 +7475,14 @@ func (client ModelClient) UpdateClosedListResponder(resp *http.Response) (result // UpdateClosedListEntityRole sends the update closed list entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity ID. // roleID - the entity role ID. // entityRoleUpdateObject - the new entity role. -func (client ModelClient) UpdateClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { +func (client ModelClient) UpdateClosedListEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateClosedListEntityRole") defer func() { @@ -7217,7 +7493,7 @@ func (client ModelClient) UpdateClosedListEntityRole(ctx context.Context, appID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateClosedListEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject) + req, err := client.UpdateClosedListEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID, entityRoleUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateClosedListEntityRole", nil, "Failure preparing request") return @@ -7239,9 +7515,10 @@ func (client ModelClient) UpdateClosedListEntityRole(ctx context.Context, appID } // UpdateClosedListEntityRolePreparer prepares the UpdateClosedListEntityRole request. -func (client ModelClient) UpdateClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdateClosedListEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -7254,7 +7531,7 @@ func (client ModelClient) UpdateClosedListEntityRolePreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters), autorest.WithJSON(entityRoleUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -7280,13 +7557,15 @@ func (client ModelClient) UpdateClosedListEntityRoleResponder(resp *http.Respons return } -// UpdateCompositeEntity updates the composite entity extractor. +// UpdateCompositeEntity updates a composite entity in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // cEntityID - the composite entity extractor ID. // compositeModelUpdateObject - a model object containing the new entity extractor name and children. -func (client ModelClient) UpdateCompositeEntity(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeModelUpdateObject CompositeEntityModel) (result OperationStatus, err error) { +func (client ModelClient) UpdateCompositeEntity(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeModelUpdateObject CompositeEntityModel) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateCompositeEntity") defer func() { @@ -7297,7 +7576,7 @@ func (client ModelClient) UpdateCompositeEntity(ctx context.Context, appID uuid. tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateCompositeEntityPreparer(ctx, appID, versionID, cEntityID, compositeModelUpdateObject) + req, err := client.UpdateCompositeEntityPreparer(ctx, azureRegion, azureCloud, appID, versionID, cEntityID, compositeModelUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCompositeEntity", nil, "Failure preparing request") return @@ -7319,9 +7598,10 @@ func (client ModelClient) UpdateCompositeEntity(ctx context.Context, appID uuid. } // UpdateCompositeEntityPreparer prepares the UpdateCompositeEntity request. -func (client ModelClient) UpdateCompositeEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeModelUpdateObject CompositeEntityModel) (*http.Request, error) { +func (client ModelClient) UpdateCompositeEntityPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeModelUpdateObject CompositeEntityModel) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -7333,7 +7613,7 @@ func (client ModelClient) UpdateCompositeEntityPreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters), autorest.WithJSON(compositeModelUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -7361,12 +7641,14 @@ func (client ModelClient) UpdateCompositeEntityResponder(resp *http.Response) (r // UpdateCompositeEntityRole sends the update composite entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // cEntityID - the composite entity extractor ID. // roleID - the entity role ID. // entityRoleUpdateObject - the new entity role. -func (client ModelClient) UpdateCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { +func (client ModelClient) UpdateCompositeEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateCompositeEntityRole") defer func() { @@ -7377,7 +7659,7 @@ func (client ModelClient) UpdateCompositeEntityRole(ctx context.Context, appID u tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, roleID, entityRoleUpdateObject) + req, err := client.UpdateCompositeEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, cEntityID, roleID, entityRoleUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCompositeEntityRole", nil, "Failure preparing request") return @@ -7399,9 +7681,10 @@ func (client ModelClient) UpdateCompositeEntityRole(ctx context.Context, appID u } // UpdateCompositeEntityRolePreparer prepares the UpdateCompositeEntityRole request. -func (client ModelClient) UpdateCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdateCompositeEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -7414,7 +7697,7 @@ func (client ModelClient) UpdateCompositeEntityRolePreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters), autorest.WithJSON(entityRoleUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -7442,12 +7725,14 @@ func (client ModelClient) UpdateCompositeEntityRoleResponder(resp *http.Response // UpdateCustomPrebuiltEntityRole sends the update custom prebuilt entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity ID. // roleID - the entity role ID. // entityRoleUpdateObject - the new entity role. -func (client ModelClient) UpdateCustomPrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { +func (client ModelClient) UpdateCustomPrebuiltEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateCustomPrebuiltEntityRole") defer func() { @@ -7458,7 +7743,7 @@ func (client ModelClient) UpdateCustomPrebuiltEntityRole(ctx context.Context, ap tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateCustomPrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject) + req, err := client.UpdateCustomPrebuiltEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID, entityRoleUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCustomPrebuiltEntityRole", nil, "Failure preparing request") return @@ -7480,9 +7765,10 @@ func (client ModelClient) UpdateCustomPrebuiltEntityRole(ctx context.Context, ap } // UpdateCustomPrebuiltEntityRolePreparer prepares the UpdateCustomPrebuiltEntityRole request. -func (client ModelClient) UpdateCustomPrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdateCustomPrebuiltEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -7495,7 +7781,7 @@ func (client ModelClient) UpdateCustomPrebuiltEntityRolePreparer(ctx context.Con preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters), autorest.WithJSON(entityRoleUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -7521,13 +7807,15 @@ func (client ModelClient) UpdateCustomPrebuiltEntityRoleResponder(resp *http.Res return } -// UpdateEntity updates the name of an entity extractor. +// UpdateEntity updates the name of an entity in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity extractor ID. // modelUpdateObject - a model object containing the new entity extractor name. -func (client ModelClient) UpdateEntity(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, modelUpdateObject ModelUpdateObject) (result OperationStatus, err error) { +func (client ModelClient) UpdateEntity(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, modelUpdateObject ModelUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateEntity") defer func() { @@ -7538,7 +7826,7 @@ func (client ModelClient) UpdateEntity(ctx context.Context, appID uuid.UUID, ver tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateEntityPreparer(ctx, appID, versionID, entityID, modelUpdateObject) + req, err := client.UpdateEntityPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, modelUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateEntity", nil, "Failure preparing request") return @@ -7560,9 +7848,10 @@ func (client ModelClient) UpdateEntity(ctx context.Context, appID uuid.UUID, ver } // UpdateEntityPreparer prepares the UpdateEntity request. -func (client ModelClient) UpdateEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, modelUpdateObject ModelUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdateEntityPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, modelUpdateObject ModelUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -7574,7 +7863,7 @@ func (client ModelClient) UpdateEntityPreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters), autorest.WithJSON(modelUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -7602,12 +7891,14 @@ func (client ModelClient) UpdateEntityResponder(resp *http.Response) (result Ope // UpdateEntityRole sends the update entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity ID. // roleID - the entity role ID. // entityRoleUpdateObject - the new entity role. -func (client ModelClient) UpdateEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { +func (client ModelClient) UpdateEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateEntityRole") defer func() { @@ -7618,7 +7909,7 @@ func (client ModelClient) UpdateEntityRole(ctx context.Context, appID uuid.UUID, tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject) + req, err := client.UpdateEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID, entityRoleUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateEntityRole", nil, "Failure preparing request") return @@ -7640,9 +7931,10 @@ func (client ModelClient) UpdateEntityRole(ctx context.Context, appID uuid.UUID, } // UpdateEntityRolePreparer prepares the UpdateEntityRole request. -func (client ModelClient) UpdateEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdateEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -7655,7 +7947,7 @@ func (client ModelClient) UpdateEntityRolePreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters), autorest.WithJSON(entityRoleUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -7683,12 +7975,14 @@ func (client ModelClient) UpdateEntityRoleResponder(resp *http.Response) (result // UpdateExplicitListItem sends the update explicit list item request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the Pattern.Any entity extractor ID. // itemID - the explicit list item ID. // item - the new explicit list item. -func (client ModelClient) UpdateExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64, item ExplicitListItemUpdateObject) (result OperationStatus, err error) { +func (client ModelClient) UpdateExplicitListItem(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64, item ExplicitListItemUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateExplicitListItem") defer func() { @@ -7699,7 +7993,7 @@ func (client ModelClient) UpdateExplicitListItem(ctx context.Context, appID uuid tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateExplicitListItemPreparer(ctx, appID, versionID, entityID, itemID, item) + req, err := client.UpdateExplicitListItemPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, itemID, item) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateExplicitListItem", nil, "Failure preparing request") return @@ -7721,9 +8015,10 @@ func (client ModelClient) UpdateExplicitListItem(ctx context.Context, appID uuid } // UpdateExplicitListItemPreparer prepares the UpdateExplicitListItem request. -func (client ModelClient) UpdateExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64, item ExplicitListItemUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdateExplicitListItemPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64, item ExplicitListItemUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -7736,7 +8031,7 @@ func (client ModelClient) UpdateExplicitListItemPreparer(ctx context.Context, ap preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters), autorest.WithJSON(item)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -7762,13 +8057,16 @@ func (client ModelClient) UpdateExplicitListItemResponder(resp *http.Response) ( return } -// UpdateHierarchicalEntity updates the name and children of a hierarchical entity model. +// UpdateHierarchicalEntity updates the name and children of a hierarchical entity model in a version of the +// application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // hEntityID - the hierarchical entity extractor ID. // hierarchicalModelUpdateObject - model containing names of the children of the hierarchical entity. -func (client ModelClient) UpdateHierarchicalEntity(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalModelUpdateObject HierarchicalEntityModel) (result OperationStatus, err error) { +func (client ModelClient) UpdateHierarchicalEntity(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalModelUpdateObject HierarchicalEntityModel) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateHierarchicalEntity") defer func() { @@ -7779,7 +8077,7 @@ func (client ModelClient) UpdateHierarchicalEntity(ctx context.Context, appID uu tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateHierarchicalEntityPreparer(ctx, appID, versionID, hEntityID, hierarchicalModelUpdateObject) + req, err := client.UpdateHierarchicalEntityPreparer(ctx, azureRegion, azureCloud, appID, versionID, hEntityID, hierarchicalModelUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntity", nil, "Failure preparing request") return @@ -7801,9 +8099,10 @@ func (client ModelClient) UpdateHierarchicalEntity(ctx context.Context, appID uu } // UpdateHierarchicalEntityPreparer prepares the UpdateHierarchicalEntity request. -func (client ModelClient) UpdateHierarchicalEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalModelUpdateObject HierarchicalEntityModel) (*http.Request, error) { +func (client ModelClient) UpdateHierarchicalEntityPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hierarchicalModelUpdateObject HierarchicalEntityModel) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -7815,7 +8114,7 @@ func (client ModelClient) UpdateHierarchicalEntityPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters), autorest.WithJSON(hierarchicalModelUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -7841,14 +8140,17 @@ func (client ModelClient) UpdateHierarchicalEntityResponder(resp *http.Response) return } -// UpdateHierarchicalEntityChild renames a single child in an existing hierarchical entity model. +// UpdateHierarchicalEntityChild renames a single child in an existing hierarchical entity model in a version of the +// application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // hEntityID - the hierarchical entity extractor ID. // hChildID - the hierarchical entity extractor child ID. // hierarchicalChildModelUpdateObject - model object containing new name of the hierarchical entity child. -func (client ModelClient) UpdateHierarchicalEntityChild(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID, hierarchicalChildModelUpdateObject HierarchicalChildModelUpdateObject) (result OperationStatus, err error) { +func (client ModelClient) UpdateHierarchicalEntityChild(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID, hierarchicalChildModelUpdateObject HierarchicalChildModelUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateHierarchicalEntityChild") defer func() { @@ -7859,7 +8161,7 @@ func (client ModelClient) UpdateHierarchicalEntityChild(ctx context.Context, app tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateHierarchicalEntityChildPreparer(ctx, appID, versionID, hEntityID, hChildID, hierarchicalChildModelUpdateObject) + req, err := client.UpdateHierarchicalEntityChildPreparer(ctx, azureRegion, azureCloud, appID, versionID, hEntityID, hChildID, hierarchicalChildModelUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntityChild", nil, "Failure preparing request") return @@ -7881,9 +8183,10 @@ func (client ModelClient) UpdateHierarchicalEntityChild(ctx context.Context, app } // UpdateHierarchicalEntityChildPreparer prepares the UpdateHierarchicalEntityChild request. -func (client ModelClient) UpdateHierarchicalEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID, hierarchicalChildModelUpdateObject HierarchicalChildModelUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdateHierarchicalEntityChildPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID, hierarchicalChildModelUpdateObject HierarchicalChildModelUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -7896,7 +8199,7 @@ func (client ModelClient) UpdateHierarchicalEntityChildPreparer(ctx context.Cont preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", pathParameters), autorest.WithJSON(hierarchicalChildModelUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -7924,12 +8227,14 @@ func (client ModelClient) UpdateHierarchicalEntityChildResponder(resp *http.Resp // UpdateHierarchicalEntityRole sends the update hierarchical entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // hEntityID - the hierarchical entity extractor ID. // roleID - the entity role ID. // entityRoleUpdateObject - the new entity role. -func (client ModelClient) UpdateHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { +func (client ModelClient) UpdateHierarchicalEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateHierarchicalEntityRole") defer func() { @@ -7940,7 +8245,7 @@ func (client ModelClient) UpdateHierarchicalEntityRole(ctx context.Context, appI tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, roleID, entityRoleUpdateObject) + req, err := client.UpdateHierarchicalEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, hEntityID, roleID, entityRoleUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntityRole", nil, "Failure preparing request") return @@ -7962,9 +8267,10 @@ func (client ModelClient) UpdateHierarchicalEntityRole(ctx context.Context, appI } // UpdateHierarchicalEntityRolePreparer prepares the UpdateHierarchicalEntityRole request. -func (client ModelClient) UpdateHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdateHierarchicalEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -7977,7 +8283,7 @@ func (client ModelClient) UpdateHierarchicalEntityRolePreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters), autorest.WithJSON(entityRoleUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -8003,13 +8309,15 @@ func (client ModelClient) UpdateHierarchicalEntityRoleResponder(resp *http.Respo return } -// UpdateIntent updates the name of an intent classifier. +// UpdateIntent updates the name of an intent in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // intentID - the intent classifier ID. -// modelUpdateObject - a model object containing the new intent classifier name. -func (client ModelClient) UpdateIntent(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, modelUpdateObject ModelUpdateObject) (result OperationStatus, err error) { +// modelUpdateObject - a model object containing the new intent name. +func (client ModelClient) UpdateIntent(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, intentID uuid.UUID, modelUpdateObject ModelUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateIntent") defer func() { @@ -8020,7 +8328,7 @@ func (client ModelClient) UpdateIntent(ctx context.Context, appID uuid.UUID, ver tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateIntentPreparer(ctx, appID, versionID, intentID, modelUpdateObject) + req, err := client.UpdateIntentPreparer(ctx, azureRegion, azureCloud, appID, versionID, intentID, modelUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateIntent", nil, "Failure preparing request") return @@ -8042,9 +8350,10 @@ func (client ModelClient) UpdateIntent(ctx context.Context, appID uuid.UUID, ver } // UpdateIntentPreparer prepares the UpdateIntent request. -func (client ModelClient) UpdateIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, modelUpdateObject ModelUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdateIntentPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, intentID uuid.UUID, modelUpdateObject ModelUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -8056,7 +8365,7 @@ func (client ModelClient) UpdateIntentPreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters), autorest.WithJSON(modelUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -8084,11 +8393,13 @@ func (client ModelClient) UpdateIntentResponder(resp *http.Response) (result Ope // UpdatePatternAnyEntityModel sends the update pattern any entity model request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the Pattern.Any entity extractor ID. // patternAnyUpdateObject - an object containing the explicit list of the Pattern.Any entity. -func (client ModelClient) UpdatePatternAnyEntityModel(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, patternAnyUpdateObject PatternAnyModelUpdateObject) (result OperationStatus, err error) { +func (client ModelClient) UpdatePatternAnyEntityModel(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, patternAnyUpdateObject PatternAnyModelUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdatePatternAnyEntityModel") defer func() { @@ -8099,7 +8410,7 @@ func (client ModelClient) UpdatePatternAnyEntityModel(ctx context.Context, appID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdatePatternAnyEntityModelPreparer(ctx, appID, versionID, entityID, patternAnyUpdateObject) + req, err := client.UpdatePatternAnyEntityModelPreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, patternAnyUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePatternAnyEntityModel", nil, "Failure preparing request") return @@ -8121,9 +8432,10 @@ func (client ModelClient) UpdatePatternAnyEntityModel(ctx context.Context, appID } // UpdatePatternAnyEntityModelPreparer prepares the UpdatePatternAnyEntityModel request. -func (client ModelClient) UpdatePatternAnyEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, patternAnyUpdateObject PatternAnyModelUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdatePatternAnyEntityModelPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, patternAnyUpdateObject PatternAnyModelUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -8135,7 +8447,7 @@ func (client ModelClient) UpdatePatternAnyEntityModelPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters), autorest.WithJSON(patternAnyUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -8163,12 +8475,14 @@ func (client ModelClient) UpdatePatternAnyEntityModelResponder(resp *http.Respon // UpdatePatternAnyEntityRole sends the update pattern any entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity ID. // roleID - the entity role ID. // entityRoleUpdateObject - the new entity role. -func (client ModelClient) UpdatePatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { +func (client ModelClient) UpdatePatternAnyEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdatePatternAnyEntityRole") defer func() { @@ -8179,7 +8493,7 @@ func (client ModelClient) UpdatePatternAnyEntityRole(ctx context.Context, appID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdatePatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject) + req, err := client.UpdatePatternAnyEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID, entityRoleUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePatternAnyEntityRole", nil, "Failure preparing request") return @@ -8201,9 +8515,10 @@ func (client ModelClient) UpdatePatternAnyEntityRole(ctx context.Context, appID } // UpdatePatternAnyEntityRolePreparer prepares the UpdatePatternAnyEntityRole request. -func (client ModelClient) UpdatePatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdatePatternAnyEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -8216,7 +8531,7 @@ func (client ModelClient) UpdatePatternAnyEntityRolePreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters), autorest.WithJSON(entityRoleUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -8244,12 +8559,14 @@ func (client ModelClient) UpdatePatternAnyEntityRoleResponder(resp *http.Respons // UpdatePrebuiltEntityRole sends the update prebuilt entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity ID. // roleID - the entity role ID. // entityRoleUpdateObject - the new entity role. -func (client ModelClient) UpdatePrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { +func (client ModelClient) UpdatePrebuiltEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdatePrebuiltEntityRole") defer func() { @@ -8260,7 +8577,7 @@ func (client ModelClient) UpdatePrebuiltEntityRole(ctx context.Context, appID uu tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdatePrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject) + req, err := client.UpdatePrebuiltEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID, entityRoleUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePrebuiltEntityRole", nil, "Failure preparing request") return @@ -8282,9 +8599,10 @@ func (client ModelClient) UpdatePrebuiltEntityRole(ctx context.Context, appID uu } // UpdatePrebuiltEntityRolePreparer prepares the UpdatePrebuiltEntityRole request. -func (client ModelClient) UpdatePrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdatePrebuiltEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -8297,7 +8615,7 @@ func (client ModelClient) UpdatePrebuiltEntityRolePreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters), autorest.WithJSON(entityRoleUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -8325,11 +8643,13 @@ func (client ModelClient) UpdatePrebuiltEntityRoleResponder(resp *http.Response) // UpdateRegexEntityModel sends the update regex entity model request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// regexEntityID - the regex entity extractor ID. +// regexEntityID - the regular expression entity extractor ID. // regexEntityUpdateObject - an object containing the new entity name and regex pattern. -func (client ModelClient) UpdateRegexEntityModel(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID, regexEntityUpdateObject RegexModelUpdateObject) (result OperationStatus, err error) { +func (client ModelClient) UpdateRegexEntityModel(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, regexEntityID uuid.UUID, regexEntityUpdateObject RegexModelUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateRegexEntityModel") defer func() { @@ -8340,7 +8660,7 @@ func (client ModelClient) UpdateRegexEntityModel(ctx context.Context, appID uuid tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateRegexEntityModelPreparer(ctx, appID, versionID, regexEntityID, regexEntityUpdateObject) + req, err := client.UpdateRegexEntityModelPreparer(ctx, azureRegion, azureCloud, appID, versionID, regexEntityID, regexEntityUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateRegexEntityModel", nil, "Failure preparing request") return @@ -8362,9 +8682,10 @@ func (client ModelClient) UpdateRegexEntityModel(ctx context.Context, appID uuid } // UpdateRegexEntityModelPreparer prepares the UpdateRegexEntityModel request. -func (client ModelClient) UpdateRegexEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID, regexEntityUpdateObject RegexModelUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdateRegexEntityModelPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, regexEntityID uuid.UUID, regexEntityUpdateObject RegexModelUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -8376,7 +8697,7 @@ func (client ModelClient) UpdateRegexEntityModelPreparer(ctx context.Context, ap preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters), autorest.WithJSON(regexEntityUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -8404,12 +8725,14 @@ func (client ModelClient) UpdateRegexEntityModelResponder(resp *http.Response) ( // UpdateRegexEntityRole sends the update regex entity role request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // entityID - the entity ID. // roleID - the entity role ID. // entityRoleUpdateObject - the new entity role. -func (client ModelClient) UpdateRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { +func (client ModelClient) UpdateRegexEntityRole(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateRegexEntityRole") defer func() { @@ -8420,7 +8743,7 @@ func (client ModelClient) UpdateRegexEntityRole(ctx context.Context, appID uuid. tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateRegexEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject) + req, err := client.UpdateRegexEntityRolePreparer(ctx, azureRegion, azureCloud, appID, versionID, entityID, roleID, entityRoleUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateRegexEntityRole", nil, "Failure preparing request") return @@ -8442,9 +8765,10 @@ func (client ModelClient) UpdateRegexEntityRole(ctx context.Context, appID uuid. } // UpdateRegexEntityRolePreparer prepares the UpdateRegexEntityRole request. -func (client ModelClient) UpdateRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdateRegexEntityRolePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -8457,7 +8781,7 @@ func (client ModelClient) UpdateRegexEntityRolePreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters), autorest.WithJSON(entityRoleUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -8483,14 +8807,16 @@ func (client ModelClient) UpdateRegexEntityRoleResponder(resp *http.Response) (r return } -// UpdateSubList updates one of the closed list's sublists. +// UpdateSubList updates one of the list entity's sublists in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -// clEntityID - the closed list entity extractor ID. +// clEntityID - the list entity extractor ID. // subListID - the sublist ID. // wordListBaseUpdateObject - a sublist update object containing the new canonical form and the list of words. -func (client ModelClient) UpdateSubList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int32, wordListBaseUpdateObject WordListBaseUpdateObject) (result OperationStatus, err error) { +func (client ModelClient) UpdateSubList(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int64, wordListBaseUpdateObject WordListBaseUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateSubList") defer func() { @@ -8501,7 +8827,7 @@ func (client ModelClient) UpdateSubList(ctx context.Context, appID uuid.UUID, ve tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateSubListPreparer(ctx, appID, versionID, clEntityID, subListID, wordListBaseUpdateObject) + req, err := client.UpdateSubListPreparer(ctx, azureRegion, azureCloud, appID, versionID, clEntityID, subListID, wordListBaseUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateSubList", nil, "Failure preparing request") return @@ -8523,9 +8849,10 @@ func (client ModelClient) UpdateSubList(ctx context.Context, appID uuid.UUID, ve } // UpdateSubListPreparer prepares the UpdateSubList request. -func (client ModelClient) UpdateSubListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int32, wordListBaseUpdateObject WordListBaseUpdateObject) (*http.Request, error) { +func (client ModelClient) UpdateSubListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int64, wordListBaseUpdateObject WordListBaseUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -8538,7 +8865,7 @@ func (client ModelClient) UpdateSubListPreparer(ctx context.Context, appID uuid. preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}", pathParameters), autorest.WithJSON(wordListBaseUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) diff --git a/services/cognitiveservices/v2.0/luis/authoring/models.go b/services/cognitiveservices/v2.0/luis/authoring/models.go index 3770fac7c6e8..b5e8ace35237 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/models.go +++ b/services/cognitiveservices/v2.0/luis/authoring/models.go @@ -28,6 +28,58 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring" +// AzureClouds enumerates the values for azure clouds. +type AzureClouds string + +const ( + // Com ... + Com AzureClouds = "com" + // Us ... + Us AzureClouds = "us" +) + +// PossibleAzureCloudsValues returns an array of possible values for the AzureClouds const type. +func PossibleAzureCloudsValues() []AzureClouds { + return []AzureClouds{Com, Us} +} + +// AzureRegions enumerates the values for azure regions. +type AzureRegions string + +const ( + // Australiaeast ... + Australiaeast AzureRegions = "australiaeast" + // Brazilsouth ... + Brazilsouth AzureRegions = "brazilsouth" + // Eastasia ... + Eastasia AzureRegions = "eastasia" + // Eastus ... + Eastus AzureRegions = "eastus" + // Eastus2 ... + Eastus2 AzureRegions = "eastus2" + // Northeurope ... + Northeurope AzureRegions = "northeurope" + // Southcentralus ... + Southcentralus AzureRegions = "southcentralus" + // Southeastasia ... + Southeastasia AzureRegions = "southeastasia" + // Virginia ... + Virginia AzureRegions = "virginia" + // Westcentralus ... + Westcentralus AzureRegions = "westcentralus" + // Westeurope ... + Westeurope AzureRegions = "westeurope" + // Westus ... + Westus AzureRegions = "westus" + // Westus2 ... + Westus2 AzureRegions = "westus2" +) + +// PossibleAzureRegionsValues returns an array of possible values for the AzureRegions const type. +func PossibleAzureRegionsValues() []AzureRegions { + return []AzureRegions{Australiaeast, Brazilsouth, Eastasia, Eastus, Eastus2, Northeurope, Southcentralus, Southeastasia, Virginia, Westcentralus, Westeurope, Westus, Westus2} +} + // OperationStatusType enumerates the values for operation status type. type OperationStatusType string @@ -49,8 +101,6 @@ func PossibleOperationStatusTypeValues() []OperationStatusType { type ReadableType string const ( - // ReadableTypeClosedListEntityExtractor ... - ReadableTypeClosedListEntityExtractor ReadableType = "Closed List Entity Extractor" // ReadableTypeCompositeEntityExtractor ... ReadableTypeCompositeEntityExtractor ReadableType = "Composite Entity Extractor" // ReadableTypeEntityExtractor ... @@ -61,25 +111,25 @@ const ( ReadableTypeHierarchicalEntityExtractor ReadableType = "Hierarchical Entity Extractor" // ReadableTypeIntentClassifier ... ReadableTypeIntentClassifier ReadableType = "Intent Classifier" + // ReadableTypeListEntityExtractor ... + ReadableTypeListEntityExtractor ReadableType = "List Entity Extractor" // ReadableTypePatternAnyEntityExtractor ... ReadableTypePatternAnyEntityExtractor ReadableType = "Pattern.Any Entity Extractor" // ReadableTypePrebuiltEntityExtractor ... ReadableTypePrebuiltEntityExtractor ReadableType = "Prebuilt Entity Extractor" - // ReadableTypeRegexEntityExtractor ... - ReadableTypeRegexEntityExtractor ReadableType = "Regex Entity Extractor" + // ReadableTypeRegularExpressionEntityExtractor ... + ReadableTypeRegularExpressionEntityExtractor ReadableType = "Regular Expression Entity Extractor" ) // PossibleReadableTypeValues returns an array of possible values for the ReadableType const type. func PossibleReadableTypeValues() []ReadableType { - return []ReadableType{ReadableTypeClosedListEntityExtractor, ReadableTypeCompositeEntityExtractor, ReadableTypeEntityExtractor, ReadableTypeHierarchicalChildEntityExtractor, ReadableTypeHierarchicalEntityExtractor, ReadableTypeIntentClassifier, ReadableTypePatternAnyEntityExtractor, ReadableTypePrebuiltEntityExtractor, ReadableTypeRegexEntityExtractor} + return []ReadableType{ReadableTypeCompositeEntityExtractor, ReadableTypeEntityExtractor, ReadableTypeHierarchicalChildEntityExtractor, ReadableTypeHierarchicalEntityExtractor, ReadableTypeIntentClassifier, ReadableTypeListEntityExtractor, ReadableTypePatternAnyEntityExtractor, ReadableTypePrebuiltEntityExtractor, ReadableTypeRegularExpressionEntityExtractor} } // ReadableType1 enumerates the values for readable type 1. type ReadableType1 string const ( - // ReadableType1ClosedListEntityExtractor ... - ReadableType1ClosedListEntityExtractor ReadableType1 = "Closed List Entity Extractor" // ReadableType1CompositeEntityExtractor ... ReadableType1CompositeEntityExtractor ReadableType1 = "Composite Entity Extractor" // ReadableType1EntityExtractor ... @@ -90,25 +140,25 @@ const ( ReadableType1HierarchicalEntityExtractor ReadableType1 = "Hierarchical Entity Extractor" // ReadableType1IntentClassifier ... ReadableType1IntentClassifier ReadableType1 = "Intent Classifier" + // ReadableType1ListEntityExtractor ... + ReadableType1ListEntityExtractor ReadableType1 = "List Entity Extractor" // ReadableType1PatternAnyEntityExtractor ... ReadableType1PatternAnyEntityExtractor ReadableType1 = "Pattern.Any Entity Extractor" // ReadableType1PrebuiltEntityExtractor ... ReadableType1PrebuiltEntityExtractor ReadableType1 = "Prebuilt Entity Extractor" - // ReadableType1RegexEntityExtractor ... - ReadableType1RegexEntityExtractor ReadableType1 = "Regex Entity Extractor" + // ReadableType1RegularExpressionEntityExtractor ... + ReadableType1RegularExpressionEntityExtractor ReadableType1 = "Regular Expression Entity Extractor" ) // PossibleReadableType1Values returns an array of possible values for the ReadableType1 const type. func PossibleReadableType1Values() []ReadableType1 { - return []ReadableType1{ReadableType1ClosedListEntityExtractor, ReadableType1CompositeEntityExtractor, ReadableType1EntityExtractor, ReadableType1HierarchicalChildEntityExtractor, ReadableType1HierarchicalEntityExtractor, ReadableType1IntentClassifier, ReadableType1PatternAnyEntityExtractor, ReadableType1PrebuiltEntityExtractor, ReadableType1RegexEntityExtractor} + return []ReadableType1{ReadableType1CompositeEntityExtractor, ReadableType1EntityExtractor, ReadableType1HierarchicalChildEntityExtractor, ReadableType1HierarchicalEntityExtractor, ReadableType1IntentClassifier, ReadableType1ListEntityExtractor, ReadableType1PatternAnyEntityExtractor, ReadableType1PrebuiltEntityExtractor, ReadableType1RegularExpressionEntityExtractor} } // ReadableType10 enumerates the values for readable type 10. type ReadableType10 string const ( - // ReadableType10ClosedListEntityExtractor ... - ReadableType10ClosedListEntityExtractor ReadableType10 = "Closed List Entity Extractor" // ReadableType10CompositeEntityExtractor ... ReadableType10CompositeEntityExtractor ReadableType10 = "Composite Entity Extractor" // ReadableType10EntityExtractor ... @@ -119,25 +169,25 @@ const ( ReadableType10HierarchicalEntityExtractor ReadableType10 = "Hierarchical Entity Extractor" // ReadableType10IntentClassifier ... ReadableType10IntentClassifier ReadableType10 = "Intent Classifier" + // ReadableType10ListEntityExtractor ... + ReadableType10ListEntityExtractor ReadableType10 = "List Entity Extractor" // ReadableType10PatternAnyEntityExtractor ... ReadableType10PatternAnyEntityExtractor ReadableType10 = "Pattern.Any Entity Extractor" // ReadableType10PrebuiltEntityExtractor ... ReadableType10PrebuiltEntityExtractor ReadableType10 = "Prebuilt Entity Extractor" - // ReadableType10RegexEntityExtractor ... - ReadableType10RegexEntityExtractor ReadableType10 = "Regex Entity Extractor" + // ReadableType10RegularExpressionEntityExtractor ... + ReadableType10RegularExpressionEntityExtractor ReadableType10 = "Regular Expression Entity Extractor" ) // PossibleReadableType10Values returns an array of possible values for the ReadableType10 const type. func PossibleReadableType10Values() []ReadableType10 { - return []ReadableType10{ReadableType10ClosedListEntityExtractor, ReadableType10CompositeEntityExtractor, ReadableType10EntityExtractor, ReadableType10HierarchicalChildEntityExtractor, ReadableType10HierarchicalEntityExtractor, ReadableType10IntentClassifier, ReadableType10PatternAnyEntityExtractor, ReadableType10PrebuiltEntityExtractor, ReadableType10RegexEntityExtractor} + return []ReadableType10{ReadableType10CompositeEntityExtractor, ReadableType10EntityExtractor, ReadableType10HierarchicalChildEntityExtractor, ReadableType10HierarchicalEntityExtractor, ReadableType10IntentClassifier, ReadableType10ListEntityExtractor, ReadableType10PatternAnyEntityExtractor, ReadableType10PrebuiltEntityExtractor, ReadableType10RegularExpressionEntityExtractor} } // ReadableType2 enumerates the values for readable type 2. type ReadableType2 string const ( - // ReadableType2ClosedListEntityExtractor ... - ReadableType2ClosedListEntityExtractor ReadableType2 = "Closed List Entity Extractor" // ReadableType2CompositeEntityExtractor ... ReadableType2CompositeEntityExtractor ReadableType2 = "Composite Entity Extractor" // ReadableType2EntityExtractor ... @@ -148,25 +198,25 @@ const ( ReadableType2HierarchicalEntityExtractor ReadableType2 = "Hierarchical Entity Extractor" // ReadableType2IntentClassifier ... ReadableType2IntentClassifier ReadableType2 = "Intent Classifier" + // ReadableType2ListEntityExtractor ... + ReadableType2ListEntityExtractor ReadableType2 = "List Entity Extractor" // ReadableType2PatternAnyEntityExtractor ... ReadableType2PatternAnyEntityExtractor ReadableType2 = "Pattern.Any Entity Extractor" // ReadableType2PrebuiltEntityExtractor ... ReadableType2PrebuiltEntityExtractor ReadableType2 = "Prebuilt Entity Extractor" - // ReadableType2RegexEntityExtractor ... - ReadableType2RegexEntityExtractor ReadableType2 = "Regex Entity Extractor" + // ReadableType2RegularExpressionEntityExtractor ... + ReadableType2RegularExpressionEntityExtractor ReadableType2 = "Regular Expression Entity Extractor" ) // PossibleReadableType2Values returns an array of possible values for the ReadableType2 const type. func PossibleReadableType2Values() []ReadableType2 { - return []ReadableType2{ReadableType2ClosedListEntityExtractor, ReadableType2CompositeEntityExtractor, ReadableType2EntityExtractor, ReadableType2HierarchicalChildEntityExtractor, ReadableType2HierarchicalEntityExtractor, ReadableType2IntentClassifier, ReadableType2PatternAnyEntityExtractor, ReadableType2PrebuiltEntityExtractor, ReadableType2RegexEntityExtractor} + return []ReadableType2{ReadableType2CompositeEntityExtractor, ReadableType2EntityExtractor, ReadableType2HierarchicalChildEntityExtractor, ReadableType2HierarchicalEntityExtractor, ReadableType2IntentClassifier, ReadableType2ListEntityExtractor, ReadableType2PatternAnyEntityExtractor, ReadableType2PrebuiltEntityExtractor, ReadableType2RegularExpressionEntityExtractor} } // ReadableType3 enumerates the values for readable type 3. type ReadableType3 string const ( - // ReadableType3ClosedListEntityExtractor ... - ReadableType3ClosedListEntityExtractor ReadableType3 = "Closed List Entity Extractor" // ReadableType3CompositeEntityExtractor ... ReadableType3CompositeEntityExtractor ReadableType3 = "Composite Entity Extractor" // ReadableType3EntityExtractor ... @@ -177,25 +227,25 @@ const ( ReadableType3HierarchicalEntityExtractor ReadableType3 = "Hierarchical Entity Extractor" // ReadableType3IntentClassifier ... ReadableType3IntentClassifier ReadableType3 = "Intent Classifier" + // ReadableType3ListEntityExtractor ... + ReadableType3ListEntityExtractor ReadableType3 = "List Entity Extractor" // ReadableType3PatternAnyEntityExtractor ... ReadableType3PatternAnyEntityExtractor ReadableType3 = "Pattern.Any Entity Extractor" // ReadableType3PrebuiltEntityExtractor ... ReadableType3PrebuiltEntityExtractor ReadableType3 = "Prebuilt Entity Extractor" - // ReadableType3RegexEntityExtractor ... - ReadableType3RegexEntityExtractor ReadableType3 = "Regex Entity Extractor" + // ReadableType3RegularExpressionEntityExtractor ... + ReadableType3RegularExpressionEntityExtractor ReadableType3 = "Regular Expression Entity Extractor" ) // PossibleReadableType3Values returns an array of possible values for the ReadableType3 const type. func PossibleReadableType3Values() []ReadableType3 { - return []ReadableType3{ReadableType3ClosedListEntityExtractor, ReadableType3CompositeEntityExtractor, ReadableType3EntityExtractor, ReadableType3HierarchicalChildEntityExtractor, ReadableType3HierarchicalEntityExtractor, ReadableType3IntentClassifier, ReadableType3PatternAnyEntityExtractor, ReadableType3PrebuiltEntityExtractor, ReadableType3RegexEntityExtractor} + return []ReadableType3{ReadableType3CompositeEntityExtractor, ReadableType3EntityExtractor, ReadableType3HierarchicalChildEntityExtractor, ReadableType3HierarchicalEntityExtractor, ReadableType3IntentClassifier, ReadableType3ListEntityExtractor, ReadableType3PatternAnyEntityExtractor, ReadableType3PrebuiltEntityExtractor, ReadableType3RegularExpressionEntityExtractor} } // ReadableType4 enumerates the values for readable type 4. type ReadableType4 string const ( - // ReadableType4ClosedListEntityExtractor ... - ReadableType4ClosedListEntityExtractor ReadableType4 = "Closed List Entity Extractor" // ReadableType4CompositeEntityExtractor ... ReadableType4CompositeEntityExtractor ReadableType4 = "Composite Entity Extractor" // ReadableType4EntityExtractor ... @@ -206,25 +256,25 @@ const ( ReadableType4HierarchicalEntityExtractor ReadableType4 = "Hierarchical Entity Extractor" // ReadableType4IntentClassifier ... ReadableType4IntentClassifier ReadableType4 = "Intent Classifier" + // ReadableType4ListEntityExtractor ... + ReadableType4ListEntityExtractor ReadableType4 = "List Entity Extractor" // ReadableType4PatternAnyEntityExtractor ... ReadableType4PatternAnyEntityExtractor ReadableType4 = "Pattern.Any Entity Extractor" // ReadableType4PrebuiltEntityExtractor ... ReadableType4PrebuiltEntityExtractor ReadableType4 = "Prebuilt Entity Extractor" - // ReadableType4RegexEntityExtractor ... - ReadableType4RegexEntityExtractor ReadableType4 = "Regex Entity Extractor" + // ReadableType4RegularExpressionEntityExtractor ... + ReadableType4RegularExpressionEntityExtractor ReadableType4 = "Regular Expression Entity Extractor" ) // PossibleReadableType4Values returns an array of possible values for the ReadableType4 const type. func PossibleReadableType4Values() []ReadableType4 { - return []ReadableType4{ReadableType4ClosedListEntityExtractor, ReadableType4CompositeEntityExtractor, ReadableType4EntityExtractor, ReadableType4HierarchicalChildEntityExtractor, ReadableType4HierarchicalEntityExtractor, ReadableType4IntentClassifier, ReadableType4PatternAnyEntityExtractor, ReadableType4PrebuiltEntityExtractor, ReadableType4RegexEntityExtractor} + return []ReadableType4{ReadableType4CompositeEntityExtractor, ReadableType4EntityExtractor, ReadableType4HierarchicalChildEntityExtractor, ReadableType4HierarchicalEntityExtractor, ReadableType4IntentClassifier, ReadableType4ListEntityExtractor, ReadableType4PatternAnyEntityExtractor, ReadableType4PrebuiltEntityExtractor, ReadableType4RegularExpressionEntityExtractor} } // ReadableType5 enumerates the values for readable type 5. type ReadableType5 string const ( - // ReadableType5ClosedListEntityExtractor ... - ReadableType5ClosedListEntityExtractor ReadableType5 = "Closed List Entity Extractor" // ReadableType5CompositeEntityExtractor ... ReadableType5CompositeEntityExtractor ReadableType5 = "Composite Entity Extractor" // ReadableType5EntityExtractor ... @@ -235,25 +285,25 @@ const ( ReadableType5HierarchicalEntityExtractor ReadableType5 = "Hierarchical Entity Extractor" // ReadableType5IntentClassifier ... ReadableType5IntentClassifier ReadableType5 = "Intent Classifier" + // ReadableType5ListEntityExtractor ... + ReadableType5ListEntityExtractor ReadableType5 = "List Entity Extractor" // ReadableType5PatternAnyEntityExtractor ... ReadableType5PatternAnyEntityExtractor ReadableType5 = "Pattern.Any Entity Extractor" // ReadableType5PrebuiltEntityExtractor ... ReadableType5PrebuiltEntityExtractor ReadableType5 = "Prebuilt Entity Extractor" - // ReadableType5RegexEntityExtractor ... - ReadableType5RegexEntityExtractor ReadableType5 = "Regex Entity Extractor" + // ReadableType5RegularExpressionEntityExtractor ... + ReadableType5RegularExpressionEntityExtractor ReadableType5 = "Regular Expression Entity Extractor" ) // PossibleReadableType5Values returns an array of possible values for the ReadableType5 const type. func PossibleReadableType5Values() []ReadableType5 { - return []ReadableType5{ReadableType5ClosedListEntityExtractor, ReadableType5CompositeEntityExtractor, ReadableType5EntityExtractor, ReadableType5HierarchicalChildEntityExtractor, ReadableType5HierarchicalEntityExtractor, ReadableType5IntentClassifier, ReadableType5PatternAnyEntityExtractor, ReadableType5PrebuiltEntityExtractor, ReadableType5RegexEntityExtractor} + return []ReadableType5{ReadableType5CompositeEntityExtractor, ReadableType5EntityExtractor, ReadableType5HierarchicalChildEntityExtractor, ReadableType5HierarchicalEntityExtractor, ReadableType5IntentClassifier, ReadableType5ListEntityExtractor, ReadableType5PatternAnyEntityExtractor, ReadableType5PrebuiltEntityExtractor, ReadableType5RegularExpressionEntityExtractor} } // ReadableType6 enumerates the values for readable type 6. type ReadableType6 string const ( - // ReadableType6ClosedListEntityExtractor ... - ReadableType6ClosedListEntityExtractor ReadableType6 = "Closed List Entity Extractor" // ReadableType6CompositeEntityExtractor ... ReadableType6CompositeEntityExtractor ReadableType6 = "Composite Entity Extractor" // ReadableType6EntityExtractor ... @@ -264,25 +314,25 @@ const ( ReadableType6HierarchicalEntityExtractor ReadableType6 = "Hierarchical Entity Extractor" // ReadableType6IntentClassifier ... ReadableType6IntentClassifier ReadableType6 = "Intent Classifier" + // ReadableType6ListEntityExtractor ... + ReadableType6ListEntityExtractor ReadableType6 = "List Entity Extractor" // ReadableType6PatternAnyEntityExtractor ... ReadableType6PatternAnyEntityExtractor ReadableType6 = "Pattern.Any Entity Extractor" // ReadableType6PrebuiltEntityExtractor ... ReadableType6PrebuiltEntityExtractor ReadableType6 = "Prebuilt Entity Extractor" - // ReadableType6RegexEntityExtractor ... - ReadableType6RegexEntityExtractor ReadableType6 = "Regex Entity Extractor" + // ReadableType6RegularExpressionEntityExtractor ... + ReadableType6RegularExpressionEntityExtractor ReadableType6 = "Regular Expression Entity Extractor" ) // PossibleReadableType6Values returns an array of possible values for the ReadableType6 const type. func PossibleReadableType6Values() []ReadableType6 { - return []ReadableType6{ReadableType6ClosedListEntityExtractor, ReadableType6CompositeEntityExtractor, ReadableType6EntityExtractor, ReadableType6HierarchicalChildEntityExtractor, ReadableType6HierarchicalEntityExtractor, ReadableType6IntentClassifier, ReadableType6PatternAnyEntityExtractor, ReadableType6PrebuiltEntityExtractor, ReadableType6RegexEntityExtractor} + return []ReadableType6{ReadableType6CompositeEntityExtractor, ReadableType6EntityExtractor, ReadableType6HierarchicalChildEntityExtractor, ReadableType6HierarchicalEntityExtractor, ReadableType6IntentClassifier, ReadableType6ListEntityExtractor, ReadableType6PatternAnyEntityExtractor, ReadableType6PrebuiltEntityExtractor, ReadableType6RegularExpressionEntityExtractor} } // ReadableType7 enumerates the values for readable type 7. type ReadableType7 string const ( - // ReadableType7ClosedListEntityExtractor ... - ReadableType7ClosedListEntityExtractor ReadableType7 = "Closed List Entity Extractor" // ReadableType7CompositeEntityExtractor ... ReadableType7CompositeEntityExtractor ReadableType7 = "Composite Entity Extractor" // ReadableType7EntityExtractor ... @@ -293,25 +343,25 @@ const ( ReadableType7HierarchicalEntityExtractor ReadableType7 = "Hierarchical Entity Extractor" // ReadableType7IntentClassifier ... ReadableType7IntentClassifier ReadableType7 = "Intent Classifier" + // ReadableType7ListEntityExtractor ... + ReadableType7ListEntityExtractor ReadableType7 = "List Entity Extractor" // ReadableType7PatternAnyEntityExtractor ... ReadableType7PatternAnyEntityExtractor ReadableType7 = "Pattern.Any Entity Extractor" // ReadableType7PrebuiltEntityExtractor ... ReadableType7PrebuiltEntityExtractor ReadableType7 = "Prebuilt Entity Extractor" - // ReadableType7RegexEntityExtractor ... - ReadableType7RegexEntityExtractor ReadableType7 = "Regex Entity Extractor" + // ReadableType7RegularExpressionEntityExtractor ... + ReadableType7RegularExpressionEntityExtractor ReadableType7 = "Regular Expression Entity Extractor" ) // PossibleReadableType7Values returns an array of possible values for the ReadableType7 const type. func PossibleReadableType7Values() []ReadableType7 { - return []ReadableType7{ReadableType7ClosedListEntityExtractor, ReadableType7CompositeEntityExtractor, ReadableType7EntityExtractor, ReadableType7HierarchicalChildEntityExtractor, ReadableType7HierarchicalEntityExtractor, ReadableType7IntentClassifier, ReadableType7PatternAnyEntityExtractor, ReadableType7PrebuiltEntityExtractor, ReadableType7RegexEntityExtractor} + return []ReadableType7{ReadableType7CompositeEntityExtractor, ReadableType7EntityExtractor, ReadableType7HierarchicalChildEntityExtractor, ReadableType7HierarchicalEntityExtractor, ReadableType7IntentClassifier, ReadableType7ListEntityExtractor, ReadableType7PatternAnyEntityExtractor, ReadableType7PrebuiltEntityExtractor, ReadableType7RegularExpressionEntityExtractor} } // ReadableType8 enumerates the values for readable type 8. type ReadableType8 string const ( - // ReadableType8ClosedListEntityExtractor ... - ReadableType8ClosedListEntityExtractor ReadableType8 = "Closed List Entity Extractor" // ReadableType8CompositeEntityExtractor ... ReadableType8CompositeEntityExtractor ReadableType8 = "Composite Entity Extractor" // ReadableType8EntityExtractor ... @@ -322,25 +372,25 @@ const ( ReadableType8HierarchicalEntityExtractor ReadableType8 = "Hierarchical Entity Extractor" // ReadableType8IntentClassifier ... ReadableType8IntentClassifier ReadableType8 = "Intent Classifier" + // ReadableType8ListEntityExtractor ... + ReadableType8ListEntityExtractor ReadableType8 = "List Entity Extractor" // ReadableType8PatternAnyEntityExtractor ... ReadableType8PatternAnyEntityExtractor ReadableType8 = "Pattern.Any Entity Extractor" // ReadableType8PrebuiltEntityExtractor ... ReadableType8PrebuiltEntityExtractor ReadableType8 = "Prebuilt Entity Extractor" - // ReadableType8RegexEntityExtractor ... - ReadableType8RegexEntityExtractor ReadableType8 = "Regex Entity Extractor" + // ReadableType8RegularExpressionEntityExtractor ... + ReadableType8RegularExpressionEntityExtractor ReadableType8 = "Regular Expression Entity Extractor" ) // PossibleReadableType8Values returns an array of possible values for the ReadableType8 const type. func PossibleReadableType8Values() []ReadableType8 { - return []ReadableType8{ReadableType8ClosedListEntityExtractor, ReadableType8CompositeEntityExtractor, ReadableType8EntityExtractor, ReadableType8HierarchicalChildEntityExtractor, ReadableType8HierarchicalEntityExtractor, ReadableType8IntentClassifier, ReadableType8PatternAnyEntityExtractor, ReadableType8PrebuiltEntityExtractor, ReadableType8RegexEntityExtractor} + return []ReadableType8{ReadableType8CompositeEntityExtractor, ReadableType8EntityExtractor, ReadableType8HierarchicalChildEntityExtractor, ReadableType8HierarchicalEntityExtractor, ReadableType8IntentClassifier, ReadableType8ListEntityExtractor, ReadableType8PatternAnyEntityExtractor, ReadableType8PrebuiltEntityExtractor, ReadableType8RegularExpressionEntityExtractor} } // ReadableType9 enumerates the values for readable type 9. type ReadableType9 string const ( - // ReadableType9ClosedListEntityExtractor ... - ReadableType9ClosedListEntityExtractor ReadableType9 = "Closed List Entity Extractor" // ReadableType9CompositeEntityExtractor ... ReadableType9CompositeEntityExtractor ReadableType9 = "Composite Entity Extractor" // ReadableType9EntityExtractor ... @@ -351,17 +401,19 @@ const ( ReadableType9HierarchicalEntityExtractor ReadableType9 = "Hierarchical Entity Extractor" // ReadableType9IntentClassifier ... ReadableType9IntentClassifier ReadableType9 = "Intent Classifier" + // ReadableType9ListEntityExtractor ... + ReadableType9ListEntityExtractor ReadableType9 = "List Entity Extractor" // ReadableType9PatternAnyEntityExtractor ... ReadableType9PatternAnyEntityExtractor ReadableType9 = "Pattern.Any Entity Extractor" // ReadableType9PrebuiltEntityExtractor ... ReadableType9PrebuiltEntityExtractor ReadableType9 = "Prebuilt Entity Extractor" - // ReadableType9RegexEntityExtractor ... - ReadableType9RegexEntityExtractor ReadableType9 = "Regex Entity Extractor" + // ReadableType9RegularExpressionEntityExtractor ... + ReadableType9RegularExpressionEntityExtractor ReadableType9 = "Regular Expression Entity Extractor" ) // PossibleReadableType9Values returns an array of possible values for the ReadableType9 const type. func PossibleReadableType9Values() []ReadableType9 { - return []ReadableType9{ReadableType9ClosedListEntityExtractor, ReadableType9CompositeEntityExtractor, ReadableType9EntityExtractor, ReadableType9HierarchicalChildEntityExtractor, ReadableType9HierarchicalEntityExtractor, ReadableType9IntentClassifier, ReadableType9PatternAnyEntityExtractor, ReadableType9PrebuiltEntityExtractor, ReadableType9RegexEntityExtractor} + return []ReadableType9{ReadableType9CompositeEntityExtractor, ReadableType9EntityExtractor, ReadableType9HierarchicalChildEntityExtractor, ReadableType9HierarchicalEntityExtractor, ReadableType9IntentClassifier, ReadableType9ListEntityExtractor, ReadableType9PatternAnyEntityExtractor, ReadableType9PrebuiltEntityExtractor, ReadableType9RegularExpressionEntityExtractor} } // Status enumerates the values for status. @@ -448,11 +500,11 @@ type ApplicationInfoResponse struct { Name *string `json:"name,omitempty"` // Description - The description of the application. Description *string `json:"description,omitempty"` - // Culture - The culture of the application. E.g.: en-us. + // Culture - The culture of the application. For example, "en-us". Culture *string `json:"culture,omitempty"` - // UsageScenario - Defines the scenario for the new application. Optional. E.g.: IoT. + // UsageScenario - Defines the scenario for the new application. Optional. For example, IoT. UsageScenario *string `json:"usageScenario,omitempty"` - // Domain - The domain for the new application. Optional. E.g.: Comics. + // Domain - The domain for the new application. Optional. For example, Comics. Domain *string `json:"domain,omitempty"` // VersionsCount - Amount of model versions within the application. VersionsCount *int32 `json:"versionsCount,omitempty"` @@ -479,14 +531,14 @@ type ApplicationSettings struct { autorest.Response `json:"-"` // ID - The application ID. ID *uuid.UUID `json:"id,omitempty"` - // IsPublic - Setting your application as public allows other people to use your application's endpoint using their own keys. + // IsPublic - Setting your application as public allows other people to use your application's endpoint using their own keys for billing purposes. IsPublic *bool `json:"public,omitempty"` } // ApplicationSettingUpdateObject object model for updating an application's settings. type ApplicationSettingUpdateObject struct { - // Public - Setting your application as public allows other people to use your application's endpoint using their own keys. - Public *bool `json:"public,omitempty"` + // IsPublic - Setting your application as public allows other people to use your application's endpoint using their own keys. + IsPublic *bool `json:"public,omitempty"` } // ApplicationUpdateObject object model for updating the name or description of an application. @@ -523,17 +575,17 @@ type AvailablePrebuiltEntityModel struct { Examples *string `json:"examples,omitempty"` } -// AzureAccountInfoObject defines the azure account information object. +// AzureAccountInfoObject defines the Azure account information object. type AzureAccountInfoObject struct { - // AzureSubscriptionID - The id for the azure subscription. + // AzureSubscriptionID - The id for the Azure subscription. AzureSubscriptionID *string `json:"azureSubscriptionId,omitempty"` - // ResourceGroup - The azure resource group name. + // ResourceGroup - The Azure resource group name. ResourceGroup *string `json:"resourceGroup,omitempty"` - // AccountName - The azure account name. + // AccountName - The Azure account name. AccountName *string `json:"accountName,omitempty"` } -// BatchLabelExample response when adding a batch of labeled examples. +// BatchLabelExample response when adding a batch of labeled example utterances. type BatchLabelExample struct { Value *LabelExampleResponse `json:"value,omitempty"` HasError *bool `json:"hasError,omitempty"` @@ -548,16 +600,16 @@ type ChildEntity struct { Name *string `json:"name,omitempty"` } -// ClosedList exported Model - A Closed List. +// ClosedList exported Model - A list entity. type ClosedList struct { - // Name - Name of the closed list feature. + // Name - Name of the list entity. Name *string `json:"name,omitempty"` - // SubLists - Sublists for the feature. + // SubLists - Sublists for the list entity. SubLists *[]SubClosedList `json:"subLists,omitempty"` Roles *[]string `json:"roles,omitempty"` } -// ClosedListEntityExtractor closed List Entity Extractor. +// ClosedListEntityExtractor list Entity Extractor. type ClosedListEntityExtractor struct { autorest.Response `json:"-"` // ID - The ID of the Entity Model. @@ -566,32 +618,32 @@ type ClosedListEntityExtractor struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType4EntityExtractor', 'ReadableType4HierarchicalEntityExtractor', 'ReadableType4HierarchicalChildEntityExtractor', 'ReadableType4CompositeEntityExtractor', 'ReadableType4ClosedListEntityExtractor', 'ReadableType4PrebuiltEntityExtractor', 'ReadableType4IntentClassifier', 'ReadableType4PatternAnyEntityExtractor', 'ReadableType4RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType4EntityExtractor', 'ReadableType4HierarchicalEntityExtractor', 'ReadableType4HierarchicalChildEntityExtractor', 'ReadableType4CompositeEntityExtractor', 'ReadableType4ListEntityExtractor', 'ReadableType4PrebuiltEntityExtractor', 'ReadableType4IntentClassifier', 'ReadableType4PatternAnyEntityExtractor', 'ReadableType4RegularExpressionEntityExtractor' ReadableType ReadableType4 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` - // SubLists - List of sub-lists. + // SubLists - List of sublists. SubLists *[]SubClosedListResponse `json:"subLists,omitempty"` } -// ClosedListModelCreateObject object model for creating a closed list. +// ClosedListModelCreateObject object model for creating a list entity. type ClosedListModelCreateObject struct { // SubLists - Sublists for the feature. SubLists *[]WordListObject `json:"subLists,omitempty"` - // Name - Name of the closed list feature. + // Name - Name of the list entity. Name *string `json:"name,omitempty"` } -// ClosedListModelPatchObject object model for adding a batch of sublists to an existing closedlist. +// ClosedListModelPatchObject object model for adding a batch of sublists to an existing list entity. type ClosedListModelPatchObject struct { // SubLists - Sublists to add. SubLists *[]WordListObject `json:"subLists,omitempty"` } -// ClosedListModelUpdateObject object model for updating a closed list. +// ClosedListModelUpdateObject object model for updating a list entity. type ClosedListModelUpdateObject struct { // SubLists - The new sublists for the feature. SubLists *[]WordListObject `json:"subLists,omitempty"` - // Name - The new name of the closed list feature. + // Name - The new name of the list entity. Name *string `json:"name,omitempty"` } @@ -615,14 +667,14 @@ type CompositeEntityExtractor struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType3EntityExtractor', 'ReadableType3HierarchicalEntityExtractor', 'ReadableType3HierarchicalChildEntityExtractor', 'ReadableType3CompositeEntityExtractor', 'ReadableType3ClosedListEntityExtractor', 'ReadableType3PrebuiltEntityExtractor', 'ReadableType3IntentClassifier', 'ReadableType3PatternAnyEntityExtractor', 'ReadableType3RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType3EntityExtractor', 'ReadableType3HierarchicalEntityExtractor', 'ReadableType3HierarchicalChildEntityExtractor', 'ReadableType3CompositeEntityExtractor', 'ReadableType3ListEntityExtractor', 'ReadableType3PrebuiltEntityExtractor', 'ReadableType3IntentClassifier', 'ReadableType3PatternAnyEntityExtractor', 'ReadableType3RegularExpressionEntityExtractor' ReadableType ReadableType3 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` // Children - List of child entities. Children *[]ChildEntity `json:"children,omitempty"` } -// CompositeEntityModel a composite entity. +// CompositeEntityModel a composite entity extractor. type CompositeEntityModel struct { // Children - Child entities. Children *[]string `json:"children,omitempty"` @@ -638,7 +690,7 @@ type CustomPrebuiltModel struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType7EntityExtractor', 'ReadableType7HierarchicalEntityExtractor', 'ReadableType7HierarchicalChildEntityExtractor', 'ReadableType7CompositeEntityExtractor', 'ReadableType7ClosedListEntityExtractor', 'ReadableType7PrebuiltEntityExtractor', 'ReadableType7IntentClassifier', 'ReadableType7PatternAnyEntityExtractor', 'ReadableType7RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType7EntityExtractor', 'ReadableType7HierarchicalEntityExtractor', 'ReadableType7HierarchicalChildEntityExtractor', 'ReadableType7CompositeEntityExtractor', 'ReadableType7ListEntityExtractor', 'ReadableType7PrebuiltEntityExtractor', 'ReadableType7IntentClassifier', 'ReadableType7PatternAnyEntityExtractor', 'ReadableType7RegularExpressionEntityExtractor' ReadableType ReadableType7 `json:"readableType,omitempty"` // CustomPrebuiltDomainName - The domain name. CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"` @@ -678,7 +730,7 @@ type EnqueueTrainingResponse struct { // EntitiesSuggestionExample predicted/suggested entity. type EntitiesSuggestionExample struct { - // Text - The utterance. E.g.: what's the weather like in seattle? + // Text - The utterance. For example, "What's the weather like in seattle?" Text *string `json:"text,omitempty"` // TokenizedText - The utterance tokenized. TokenizedText *[]string `json:"tokenizedText,omitempty"` @@ -697,7 +749,7 @@ type EntityExtractor struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType8EntityExtractor', 'ReadableType8HierarchicalEntityExtractor', 'ReadableType8HierarchicalChildEntityExtractor', 'ReadableType8CompositeEntityExtractor', 'ReadableType8ClosedListEntityExtractor', 'ReadableType8PrebuiltEntityExtractor', 'ReadableType8IntentClassifier', 'ReadableType8PatternAnyEntityExtractor', 'ReadableType8RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType8EntityExtractor', 'ReadableType8HierarchicalEntityExtractor', 'ReadableType8HierarchicalChildEntityExtractor', 'ReadableType8CompositeEntityExtractor', 'ReadableType8ListEntityExtractor', 'ReadableType8PrebuiltEntityExtractor', 'ReadableType8IntentClassifier', 'ReadableType8PatternAnyEntityExtractor', 'ReadableType8RegularExpressionEntityExtractor' ReadableType ReadableType8 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` // CustomPrebuiltDomainName - The domain name. @@ -735,7 +787,7 @@ type EntityModelInfo struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeRegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeRegularExpressionEntityExtractor' ReadableType ReadableType `json:"readableType,omitempty"` } @@ -827,17 +879,17 @@ func (er *ErrorResponse) UnmarshalJSON(body []byte) error { return nil } -// ExampleLabelObject a labeled example. +// ExampleLabelObject a labeled example utterance. type ExampleLabelObject struct { - // Text - The sample's utterance. + // Text - The example utterance. Text *string `json:"text,omitempty"` - // EntityLabels - The identified entities within the utterance. + // EntityLabels - The identified entities within the example utterance. EntityLabels *[]EntityLabelObject `json:"entityLabels,omitempty"` - // IntentName - The identified intent representing the utterance. + // IntentName - The identified intent representing the example utterance. IntentName *string `json:"intentName,omitempty"` } -// ExplicitListItem explicit list item +// ExplicitListItem explicit (exception) list item type ExplicitListItem struct { autorest.Response `json:"-"` // ID - The explicit list item ID. @@ -846,13 +898,13 @@ type ExplicitListItem struct { ExplicitListItem *string `json:"explicitListItem,omitempty"` } -// ExplicitListItemCreateObject object model for creating an explicit list item. +// ExplicitListItemCreateObject object model for creating an explicit (exception) list item. type ExplicitListItemCreateObject struct { // ExplicitListItem - The explicit list item. ExplicitListItem *string `json:"explicitListItem,omitempty"` } -// ExplicitListItemUpdateObject model object for updating an explicit list item. +// ExplicitListItemUpdateObject model object for updating an explicit (exception) list item. type ExplicitListItemUpdateObject struct { // ExplicitListItem - The explicit list item. ExplicitListItem *string `json:"explicitListItem,omitempty"` @@ -880,7 +932,7 @@ type HierarchicalChildEntity struct { autorest.Response `json:"-"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType6EntityExtractor', 'ReadableType6HierarchicalEntityExtractor', 'ReadableType6HierarchicalChildEntityExtractor', 'ReadableType6CompositeEntityExtractor', 'ReadableType6ClosedListEntityExtractor', 'ReadableType6PrebuiltEntityExtractor', 'ReadableType6IntentClassifier', 'ReadableType6PatternAnyEntityExtractor', 'ReadableType6RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType6EntityExtractor', 'ReadableType6HierarchicalEntityExtractor', 'ReadableType6HierarchicalChildEntityExtractor', 'ReadableType6CompositeEntityExtractor', 'ReadableType6ListEntityExtractor', 'ReadableType6PrebuiltEntityExtractor', 'ReadableType6IntentClassifier', 'ReadableType6PatternAnyEntityExtractor', 'ReadableType6RegularExpressionEntityExtractor' ReadableType ReadableType6 `json:"readableType,omitempty"` // ID - The ID (GUID) belonging to a child entity. ID *uuid.UUID `json:"id,omitempty"` @@ -907,14 +959,14 @@ type HierarchicalEntityExtractor struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType2EntityExtractor', 'ReadableType2HierarchicalEntityExtractor', 'ReadableType2HierarchicalChildEntityExtractor', 'ReadableType2CompositeEntityExtractor', 'ReadableType2ClosedListEntityExtractor', 'ReadableType2PrebuiltEntityExtractor', 'ReadableType2IntentClassifier', 'ReadableType2PatternAnyEntityExtractor', 'ReadableType2RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType2EntityExtractor', 'ReadableType2HierarchicalEntityExtractor', 'ReadableType2HierarchicalChildEntityExtractor', 'ReadableType2CompositeEntityExtractor', 'ReadableType2ListEntityExtractor', 'ReadableType2PrebuiltEntityExtractor', 'ReadableType2IntentClassifier', 'ReadableType2PatternAnyEntityExtractor', 'ReadableType2RegularExpressionEntityExtractor' ReadableType ReadableType2 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` // Children - List of child entities. Children *[]ChildEntity `json:"children,omitempty"` } -// HierarchicalEntityModel a Hierarchical Entity Extractor. +// HierarchicalEntityModel a hierarchical entity extractor. type HierarchicalEntityModel struct { // Children - Child entities. Children *[]string `json:"children,omitempty"` @@ -936,6 +988,12 @@ type Int32 struct { Value *int32 `json:"value,omitempty"` } +// Int64 ... +type Int64 struct { + autorest.Response `json:"-"` + Value *int64 `json:"value,omitempty"` +} + // IntentClassifier intent Classifier. type IntentClassifier struct { autorest.Response `json:"-"` @@ -949,7 +1007,7 @@ type IntentClassifier struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeRegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeRegularExpressionEntityExtractor' ReadableType ReadableType `json:"readableType,omitempty"` } @@ -963,9 +1021,9 @@ type IntentPrediction struct { // IntentsSuggestionExample predicted/suggested intent. type IntentsSuggestionExample struct { - // Text - The utterance. E.g.: what's the weather like in seattle? + // Text - The utterance. For example, "What's the weather like in seattle?" Text *string `json:"text,omitempty"` - // TokenizedText - The utterance tokenized. + // TokenizedText - The tokenized utterance. TokenizedText *[]string `json:"tokenizedText,omitempty"` // IntentPredictions - Predicted/suggested intents. IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"` @@ -991,7 +1049,7 @@ type JSONModelFeature struct { Name *string `json:"name,omitempty"` // Words - List of comma-separated phrases that represent the Phraselist. Words *string `json:"words,omitempty"` - // Mode - An exchangeable phrase list feature are serves as single feature to the LUIS underlying training algorithm. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn’t. Think of an exchangeable as a synonyms list. A non-exchangeable phrase list feature has all the phrases in the list serve as separate features to the underlying training algorithm. So, if you your phrase list feature contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable phrase list feature as an additional bag of words that you are willing to add to LUIS existing vocabulary features. Think of a non-exchangeable as set of different words. Default value is true. + // Mode - An interchangeable phrase list feature serves as a list of synonyms for training. A non-exchangeable phrase list serves as separate features for training. So, if your non-interchangeable phrase list contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-interchangeable phrase list as an additional bag of words to add to LUIS existing vocabulary features. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn’t. Default value is true. Mode *bool `json:"mode,omitempty"` } @@ -1019,7 +1077,7 @@ type JSONUtterance struct { type LabeledUtterance struct { // ID - ID of Labeled Utterance. ID *int32 `json:"id,omitempty"` - // Text - The utterance. E.g.: what's the weather like in seattle? + // Text - The utterance. For example, "What's the weather like in seattle?" Text *string `json:"text,omitempty"` // TokenizedText - The utterance tokenized. TokenizedText *[]string `json:"tokenizedText,omitempty"` @@ -1033,16 +1091,16 @@ type LabeledUtterance struct { EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"` } -// LabelExampleResponse response when adding a labeled example. +// LabelExampleResponse response when adding a labeled example utterance. type LabelExampleResponse struct { autorest.Response `json:"-"` - // UtteranceText - The sample's utterance. + // UtteranceText - The example utterance. UtteranceText *string `json:"UtteranceText,omitempty"` // ExampleID - The newly created sample ID. ExampleID *int32 `json:"ExampleId,omitempty"` } -// LabelTextObject an object containing the example's text. +// LabelTextObject an object containing the example utterance's text. type LabelTextObject struct { // ID - The ID of the Label. ID *int32 `json:"id,omitempty"` @@ -1176,6 +1234,12 @@ type ListPatternAnyEntityExtractor struct { Value *[]PatternAnyEntityExtractor `json:"value,omitempty"` } +// ListPatternFeatureInfo ... +type ListPatternFeatureInfo struct { + autorest.Response `json:"-"` + Value *[]PatternFeatureInfo `json:"value,omitempty"` +} + // ListPatternRuleInfo ... type ListPatternRuleInfo struct { autorest.Response `json:"-"` @@ -1241,7 +1305,7 @@ type LuisApp struct { Intents *[]HierarchicalModel `json:"intents,omitempty"` // Entities - List of entities. Entities *[]HierarchicalModel `json:"entities,omitempty"` - // ClosedLists - List of closed lists. + // ClosedLists - List of list entities. ClosedLists *[]ClosedList `json:"closedLists,omitempty"` // Composites - List of composite entities. Composites *[]HierarchicalModel `json:"composites,omitempty"` @@ -1257,7 +1321,7 @@ type LuisApp struct { ModelFeatures *[]JSONModelFeature `json:"model_features,omitempty"` // Patterns - List of patterns. Patterns *[]PatternRule `json:"patterns,omitempty"` - // Utterances - List of sample utterances. + // Utterances - List of example utterances. Utterances *[]JSONUtterance `json:"utterances,omitempty"` } @@ -1491,7 +1555,7 @@ type ModelInfo struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeRegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeRegularExpressionEntityExtractor' ReadableType ReadableType `json:"readableType,omitempty"` } @@ -1503,18 +1567,18 @@ type ModelInfoResponse struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType1EntityExtractor', 'ReadableType1HierarchicalEntityExtractor', 'ReadableType1HierarchicalChildEntityExtractor', 'ReadableType1CompositeEntityExtractor', 'ReadableType1ClosedListEntityExtractor', 'ReadableType1PrebuiltEntityExtractor', 'ReadableType1IntentClassifier', 'ReadableType1PatternAnyEntityExtractor', 'ReadableType1RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType1EntityExtractor', 'ReadableType1HierarchicalEntityExtractor', 'ReadableType1HierarchicalChildEntityExtractor', 'ReadableType1CompositeEntityExtractor', 'ReadableType1ListEntityExtractor', 'ReadableType1PrebuiltEntityExtractor', 'ReadableType1IntentClassifier', 'ReadableType1PatternAnyEntityExtractor', 'ReadableType1RegularExpressionEntityExtractor' ReadableType ReadableType1 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` // Children - List of child entities. Children *[]ChildEntity `json:"children,omitempty"` - // SubLists - List of sub-lists. + // SubLists - List of sublists. SubLists *[]SubClosedListResponse `json:"subLists,omitempty"` // CustomPrebuiltDomainName - The domain name. CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"` // CustomPrebuiltModelName - The intent name or entity name. CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"` - // RegexPattern - The Regex entity pattern. + // RegexPattern - The Regular Expression entity pattern. RegexPattern *string `json:"regexPattern,omitempty"` ExplicitList *[]ExplicitListItem `json:"explicitList,omitempty"` } @@ -1577,7 +1641,7 @@ type PatternAnyEntityExtractor struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType10EntityExtractor', 'ReadableType10HierarchicalEntityExtractor', 'ReadableType10HierarchicalChildEntityExtractor', 'ReadableType10CompositeEntityExtractor', 'ReadableType10ClosedListEntityExtractor', 'ReadableType10PrebuiltEntityExtractor', 'ReadableType10IntentClassifier', 'ReadableType10PatternAnyEntityExtractor', 'ReadableType10RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType10EntityExtractor', 'ReadableType10HierarchicalEntityExtractor', 'ReadableType10HierarchicalChildEntityExtractor', 'ReadableType10CompositeEntityExtractor', 'ReadableType10ListEntityExtractor', 'ReadableType10PrebuiltEntityExtractor', 'ReadableType10IntentClassifier', 'ReadableType10PatternAnyEntityExtractor', 'ReadableType10RegularExpressionEntityExtractor' ReadableType ReadableType10 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` ExplicitList *[]ExplicitListItem `json:"explicitList,omitempty"` @@ -1692,7 +1756,7 @@ type PhraselistCreateObject struct { Phrases *string `json:"phrases,omitempty"` // Name - The Phraselist name. Name *string `json:"name,omitempty"` - // IsExchangeable - An exchangeable phrase list feature are serves as single feature to the LUIS underlying training algorithm. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn’t. Think of an exchangeable as a synonyms list. A non-exchangeable phrase list feature has all the phrases in the list serve as separate features to the underlying training algorithm. So, if you your phrase list feature contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable phrase list feature as an additional bag of words that you are willing to add to LUIS existing vocabulary features. Think of a non-exchangeable as set of different words. Default value is true. + // IsExchangeable - An interchangeable phrase list feature serves as a list of synonyms for training. A non-exchangeable phrase list serves as separate features for training. So, if your non-interchangeable phrase list contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-interchangeable phrase list as an additional bag of words to add to LUIS existing vocabulary features. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn’t. Default value is true. IsExchangeable *bool `json:"isExchangeable,omitempty"` } @@ -1786,7 +1850,7 @@ type PrebuiltEntityExtractor struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType5EntityExtractor', 'ReadableType5HierarchicalEntityExtractor', 'ReadableType5HierarchicalChildEntityExtractor', 'ReadableType5CompositeEntityExtractor', 'ReadableType5ClosedListEntityExtractor', 'ReadableType5PrebuiltEntityExtractor', 'ReadableType5IntentClassifier', 'ReadableType5PatternAnyEntityExtractor', 'ReadableType5RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType5EntityExtractor', 'ReadableType5HierarchicalEntityExtractor', 'ReadableType5HierarchicalChildEntityExtractor', 'ReadableType5CompositeEntityExtractor', 'ReadableType5ListEntityExtractor', 'ReadableType5PrebuiltEntityExtractor', 'ReadableType5IntentClassifier', 'ReadableType5PatternAnyEntityExtractor', 'ReadableType5RegularExpressionEntityExtractor' ReadableType ReadableType5 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` } @@ -1817,11 +1881,11 @@ type PublishSettings struct { autorest.Response `json:"-"` // ID - The application ID. ID *uuid.UUID `json:"id,omitempty"` - // IsSentimentAnalysisEnabled - Setting sentiment analysis as true returns the Sentiment of the input utterance along with the response + // IsSentimentAnalysisEnabled - Setting sentiment analysis as true returns the sentiment of the input utterance along with the response IsSentimentAnalysisEnabled *bool `json:"sentimentAnalysis,omitempty"` - // IsSpeechEnabled - Setting speech as public enables speech priming in your app + // IsSpeechEnabled - Enables speech priming in your app IsSpeechEnabled *bool `json:"speech,omitempty"` - // IsSpellCheckerEnabled - Setting spell checker as public enables spell checking the input utterance. + // IsSpellCheckerEnabled - Enables spell checking of the utterance. IsSpellCheckerEnabled *bool `json:"spellChecker,omitempty"` } @@ -1848,7 +1912,7 @@ type RegexEntity struct { Roles *[]string `json:"roles,omitempty"` } -// RegexEntityExtractor regex Entity Extractor. +// RegexEntityExtractor regular Expression Entity Extractor. type RegexEntityExtractor struct { autorest.Response `json:"-"` // ID - The ID of the Entity Model. @@ -1857,24 +1921,24 @@ type RegexEntityExtractor struct { Name *string `json:"name,omitempty"` // TypeID - The type ID of the Entity Model. TypeID *int32 `json:"typeId,omitempty"` - // ReadableType - Possible values include: 'ReadableType9EntityExtractor', 'ReadableType9HierarchicalEntityExtractor', 'ReadableType9HierarchicalChildEntityExtractor', 'ReadableType9CompositeEntityExtractor', 'ReadableType9ClosedListEntityExtractor', 'ReadableType9PrebuiltEntityExtractor', 'ReadableType9IntentClassifier', 'ReadableType9PatternAnyEntityExtractor', 'ReadableType9RegexEntityExtractor' + // ReadableType - Possible values include: 'ReadableType9EntityExtractor', 'ReadableType9HierarchicalEntityExtractor', 'ReadableType9HierarchicalChildEntityExtractor', 'ReadableType9CompositeEntityExtractor', 'ReadableType9ListEntityExtractor', 'ReadableType9PrebuiltEntityExtractor', 'ReadableType9IntentClassifier', 'ReadableType9PatternAnyEntityExtractor', 'ReadableType9RegularExpressionEntityExtractor' ReadableType ReadableType9 `json:"readableType,omitempty"` Roles *[]EntityRole `json:"roles,omitempty"` - // RegexPattern - The Regex entity pattern. + // RegexPattern - The Regular Expression entity pattern. RegexPattern *string `json:"regexPattern,omitempty"` } -// RegexModelCreateObject model object for creating a regex entity model. +// RegexModelCreateObject model object for creating a regular expression entity model. type RegexModelCreateObject struct { - // RegexPattern - The regex entity pattern. + // RegexPattern - The regular expression entity pattern. RegexPattern *string `json:"regexPattern,omitempty"` // Name - The model name. Name *string `json:"name,omitempty"` } -// RegexModelUpdateObject model object for updating a regex entity model. +// RegexModelUpdateObject model object for updating a regular expression entity model. type RegexModelUpdateObject struct { - // RegexPattern - The regex entity pattern. + // RegexPattern - The regular expression entity pattern. RegexPattern *string `json:"regexPattern,omitempty"` // Name - The model name. Name *string `json:"name,omitempty"` @@ -1901,7 +1965,7 @@ type String struct { Value *string `json:"value,omitempty"` } -// SubClosedList sublist of items for a Closed list. +// SubClosedList sublist of items for a list entity. type SubClosedList struct { // CanonicalForm - The standard form that the list represents. CanonicalForm *string `json:"canonicalForm,omitempty"` @@ -1909,7 +1973,7 @@ type SubClosedList struct { List *[]string `json:"list,omitempty"` } -// SubClosedListResponse sublist of items for a Closed list. +// SubClosedListResponse sublist of items for a list entity. type SubClosedListResponse struct { // ID - The sublist ID ID *int32 `json:"id,omitempty"` @@ -2016,7 +2080,7 @@ func (vi VersionInfo) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// WordListBaseUpdateObject object model for updating one of the closed list's sublists. +// WordListBaseUpdateObject object model for updating one of the list entity's sublists. type WordListBaseUpdateObject struct { // CanonicalForm - The standard form that the list represents. CanonicalForm *string `json:"canonicalForm,omitempty"` @@ -2024,7 +2088,7 @@ type WordListBaseUpdateObject struct { List *[]string `json:"list,omitempty"` } -// WordListObject sublist of items for a Closed list. +// WordListObject sublist of items for a list entity. type WordListObject struct { // CanonicalForm - The standard form that the list represents. CanonicalForm *string `json:"canonicalForm,omitempty"` diff --git a/services/cognitiveservices/v2.0/luis/authoring/pattern.go b/services/cognitiveservices/v2.0/luis/authoring/pattern.go index f1bb49f33063..e70147630ede 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/pattern.go +++ b/services/cognitiveservices/v2.0/luis/authoring/pattern.go @@ -33,16 +33,18 @@ type PatternClient struct { } // NewPatternClient creates an instance of the PatternClient client. -func NewPatternClient(endpoint string) PatternClient { - return PatternClient{New(endpoint)} +func NewPatternClient() PatternClient { + return PatternClient{New()} } // AddPattern sends the add pattern request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // pattern - the input pattern. -func (client PatternClient) AddPattern(ctx context.Context, appID uuid.UUID, versionID string, pattern PatternRuleCreateObject) (result PatternRuleInfo, err error) { +func (client PatternClient) AddPattern(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, pattern PatternRuleCreateObject) (result PatternRuleInfo, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PatternClient.AddPattern") defer func() { @@ -53,7 +55,7 @@ func (client PatternClient) AddPattern(ctx context.Context, appID uuid.UUID, ver tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddPatternPreparer(ctx, appID, versionID, pattern) + req, err := client.AddPatternPreparer(ctx, azureRegion, azureCloud, appID, versionID, pattern) if err != nil { err = autorest.NewErrorWithError(err, "authoring.PatternClient", "AddPattern", nil, "Failure preparing request") return @@ -75,9 +77,10 @@ func (client PatternClient) AddPattern(ctx context.Context, appID uuid.UUID, ver } // AddPatternPreparer prepares the AddPattern request. -func (client PatternClient) AddPatternPreparer(ctx context.Context, appID uuid.UUID, versionID string, pattern PatternRuleCreateObject) (*http.Request, error) { +func (client PatternClient) AddPatternPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, pattern PatternRuleCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -88,7 +91,7 @@ func (client PatternClient) AddPatternPreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrule", pathParameters), autorest.WithJSON(pattern)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -116,10 +119,12 @@ func (client PatternClient) AddPatternResponder(resp *http.Response) (result Pat // BatchAddPatterns sends the batch add patterns request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // patterns - a JSON array containing patterns. -func (client PatternClient) BatchAddPatterns(ctx context.Context, appID uuid.UUID, versionID string, patterns []PatternRuleCreateObject) (result ListPatternRuleInfo, err error) { +func (client PatternClient) BatchAddPatterns(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, patterns []PatternRuleCreateObject) (result ListPatternRuleInfo, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PatternClient.BatchAddPatterns") defer func() { @@ -136,7 +141,7 @@ func (client PatternClient) BatchAddPatterns(ctx context.Context, appID uuid.UUI return result, validation.NewError("authoring.PatternClient", "BatchAddPatterns", err.Error()) } - req, err := client.BatchAddPatternsPreparer(ctx, appID, versionID, patterns) + req, err := client.BatchAddPatternsPreparer(ctx, azureRegion, azureCloud, appID, versionID, patterns) if err != nil { err = autorest.NewErrorWithError(err, "authoring.PatternClient", "BatchAddPatterns", nil, "Failure preparing request") return @@ -158,9 +163,10 @@ func (client PatternClient) BatchAddPatterns(ctx context.Context, appID uuid.UUI } // BatchAddPatternsPreparer prepares the BatchAddPatterns request. -func (client PatternClient) BatchAddPatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, patterns []PatternRuleCreateObject) (*http.Request, error) { +func (client PatternClient) BatchAddPatternsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, patterns []PatternRuleCreateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -171,7 +177,7 @@ func (client PatternClient) BatchAddPatternsPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters), autorest.WithJSON(patterns)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -199,10 +205,12 @@ func (client PatternClient) BatchAddPatternsResponder(resp *http.Response) (resu // DeletePattern sends the delete pattern request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // patternID - the pattern ID. -func (client PatternClient) DeletePattern(ctx context.Context, appID uuid.UUID, versionID string, patternID uuid.UUID) (result OperationStatus, err error) { +func (client PatternClient) DeletePattern(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, patternID uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PatternClient.DeletePattern") defer func() { @@ -213,7 +221,7 @@ func (client PatternClient) DeletePattern(ctx context.Context, appID uuid.UUID, tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePatternPreparer(ctx, appID, versionID, patternID) + req, err := client.DeletePatternPreparer(ctx, azureRegion, azureCloud, appID, versionID, patternID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.PatternClient", "DeletePattern", nil, "Failure preparing request") return @@ -235,9 +243,10 @@ func (client PatternClient) DeletePattern(ctx context.Context, appID uuid.UUID, } // DeletePatternPreparer prepares the DeletePattern request. -func (client PatternClient) DeletePatternPreparer(ctx context.Context, appID uuid.UUID, versionID string, patternID uuid.UUID) (*http.Request, error) { +func (client PatternClient) DeletePatternPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, patternID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -248,7 +257,7 @@ func (client PatternClient) DeletePatternPreparer(ctx context.Context, appID uui preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules/{patternId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -275,10 +284,12 @@ func (client PatternClient) DeletePatternResponder(resp *http.Response) (result // DeletePatterns sends the delete patterns request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // patternIds - the patterns IDs. -func (client PatternClient) DeletePatterns(ctx context.Context, appID uuid.UUID, versionID string, patternIds []uuid.UUID) (result OperationStatus, err error) { +func (client PatternClient) DeletePatterns(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, patternIds []uuid.UUID) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PatternClient.DeletePatterns") defer func() { @@ -295,7 +306,7 @@ func (client PatternClient) DeletePatterns(ctx context.Context, appID uuid.UUID, return result, validation.NewError("authoring.PatternClient", "DeletePatterns", err.Error()) } - req, err := client.DeletePatternsPreparer(ctx, appID, versionID, patternIds) + req, err := client.DeletePatternsPreparer(ctx, azureRegion, azureCloud, appID, versionID, patternIds) if err != nil { err = autorest.NewErrorWithError(err, "authoring.PatternClient", "DeletePatterns", nil, "Failure preparing request") return @@ -317,9 +328,10 @@ func (client PatternClient) DeletePatterns(ctx context.Context, appID uuid.UUID, } // DeletePatternsPreparer prepares the DeletePatterns request. -func (client PatternClient) DeletePatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, patternIds []uuid.UUID) (*http.Request, error) { +func (client PatternClient) DeletePatternsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, patternIds []uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -330,7 +342,7 @@ func (client PatternClient) DeletePatternsPreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters), autorest.WithJSON(patternIds)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -356,16 +368,18 @@ func (client PatternClient) DeletePatternsResponder(resp *http.Response) (result return } -// GetIntentPatterns sends the get intent patterns request. +// ListIntentPatterns sends the list intent patterns request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // intentID - the intent classifier ID. // skip - the number of entries to skip. Default value is 0. // take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client PatternClient) GetIntentPatterns(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, skip *int32, take *int32) (result ListPatternRuleInfo, err error) { +func (client PatternClient) ListIntentPatterns(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, intentID uuid.UUID, skip *int32, take *int32) (result ListPatternRuleInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PatternClient.GetIntentPatterns") + ctx = tracing.StartSpan(ctx, fqdn+"/PatternClient.ListIntentPatterns") defer func() { sc := -1 if result.Response.Response != nil { @@ -383,34 +397,35 @@ func (client PatternClient) GetIntentPatterns(ctx context.Context, appID uuid.UU Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}}}}); err != nil { - return result, validation.NewError("authoring.PatternClient", "GetIntentPatterns", err.Error()) + return result, validation.NewError("authoring.PatternClient", "ListIntentPatterns", err.Error()) } - req, err := client.GetIntentPatternsPreparer(ctx, appID, versionID, intentID, skip, take) + req, err := client.ListIntentPatternsPreparer(ctx, azureRegion, azureCloud, appID, versionID, intentID, skip, take) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.PatternClient", "GetIntentPatterns", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.PatternClient", "ListIntentPatterns", nil, "Failure preparing request") return } - resp, err := client.GetIntentPatternsSender(req) + resp, err := client.ListIntentPatternsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.PatternClient", "GetIntentPatterns", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.PatternClient", "ListIntentPatterns", resp, "Failure sending request") return } - result, err = client.GetIntentPatternsResponder(resp) + result, err = client.ListIntentPatternsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.PatternClient", "GetIntentPatterns", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.PatternClient", "ListIntentPatterns", resp, "Failure responding to request") } return } -// GetIntentPatternsPreparer prepares the GetIntentPatterns request. -func (client PatternClient) GetIntentPatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, skip *int32, take *int32) (*http.Request, error) { +// ListIntentPatternsPreparer prepares the ListIntentPatterns request. +func (client PatternClient) ListIntentPatternsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, intentID uuid.UUID, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -433,22 +448,22 @@ func (client PatternClient) GetIntentPatternsPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/patternrules", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetIntentPatternsSender sends the GetIntentPatterns request. The method will close the +// ListIntentPatternsSender sends the ListIntentPatterns request. The method will close the // http.Response Body if it receives an error. -func (client PatternClient) GetIntentPatternsSender(req *http.Request) (*http.Response, error) { +func (client PatternClient) ListIntentPatternsSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetIntentPatternsResponder handles the response to the GetIntentPatterns request. The method always +// ListIntentPatternsResponder handles the response to the ListIntentPatterns request. The method always // closes the http.Response Body. -func (client PatternClient) GetIntentPatternsResponder(resp *http.Response) (result ListPatternRuleInfo, err error) { +func (client PatternClient) ListIntentPatternsResponder(resp *http.Response) (result ListPatternRuleInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -459,15 +474,17 @@ func (client PatternClient) GetIntentPatternsResponder(resp *http.Response) (res return } -// GetPatterns sends the get patterns request. +// ListPatterns sends the list patterns request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // skip - the number of entries to skip. Default value is 0. // take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client PatternClient) GetPatterns(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPatternRuleInfo, err error) { +func (client PatternClient) ListPatterns(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPatternRuleInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PatternClient.GetPatterns") + ctx = tracing.StartSpan(ctx, fqdn+"/PatternClient.ListPatterns") defer func() { sc := -1 if result.Response.Response != nil { @@ -485,34 +502,35 @@ func (client PatternClient) GetPatterns(ctx context.Context, appID uuid.UUID, ve Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}}}}); err != nil { - return result, validation.NewError("authoring.PatternClient", "GetPatterns", err.Error()) + return result, validation.NewError("authoring.PatternClient", "ListPatterns", err.Error()) } - req, err := client.GetPatternsPreparer(ctx, appID, versionID, skip, take) + req, err := client.ListPatternsPreparer(ctx, azureRegion, azureCloud, appID, versionID, skip, take) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.PatternClient", "GetPatterns", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "authoring.PatternClient", "ListPatterns", nil, "Failure preparing request") return } - resp, err := client.GetPatternsSender(req) + resp, err := client.ListPatternsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "authoring.PatternClient", "GetPatterns", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "authoring.PatternClient", "ListPatterns", resp, "Failure sending request") return } - result, err = client.GetPatternsResponder(resp) + result, err = client.ListPatternsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "authoring.PatternClient", "GetPatterns", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "authoring.PatternClient", "ListPatterns", resp, "Failure responding to request") } return } -// GetPatternsPreparer prepares the GetPatterns request. -func (client PatternClient) GetPatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { +// ListPatternsPreparer prepares the ListPatterns request. +func (client PatternClient) ListPatternsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -534,22 +552,22 @@ func (client PatternClient) GetPatternsPreparer(ctx context.Context, appID uuid. preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPatternsSender sends the GetPatterns request. The method will close the +// ListPatternsSender sends the ListPatterns request. The method will close the // http.Response Body if it receives an error. -func (client PatternClient) GetPatternsSender(req *http.Request) (*http.Response, error) { +func (client PatternClient) ListPatternsSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } -// GetPatternsResponder handles the response to the GetPatterns request. The method always +// ListPatternsResponder handles the response to the ListPatterns request. The method always // closes the http.Response Body. -func (client PatternClient) GetPatternsResponder(resp *http.Response) (result ListPatternRuleInfo, err error) { +func (client PatternClient) ListPatternsResponder(resp *http.Response) (result ListPatternRuleInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -562,11 +580,13 @@ func (client PatternClient) GetPatternsResponder(resp *http.Response) (result Li // UpdatePattern sends the update pattern request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // patternID - the pattern ID. // pattern - an object representing a pattern. -func (client PatternClient) UpdatePattern(ctx context.Context, appID uuid.UUID, versionID string, patternID uuid.UUID, pattern PatternRuleUpdateObject) (result PatternRuleInfo, err error) { +func (client PatternClient) UpdatePattern(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, patternID uuid.UUID, pattern PatternRuleUpdateObject) (result PatternRuleInfo, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PatternClient.UpdatePattern") defer func() { @@ -577,7 +597,7 @@ func (client PatternClient) UpdatePattern(ctx context.Context, appID uuid.UUID, tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdatePatternPreparer(ctx, appID, versionID, patternID, pattern) + req, err := client.UpdatePatternPreparer(ctx, azureRegion, azureCloud, appID, versionID, patternID, pattern) if err != nil { err = autorest.NewErrorWithError(err, "authoring.PatternClient", "UpdatePattern", nil, "Failure preparing request") return @@ -599,9 +619,10 @@ func (client PatternClient) UpdatePattern(ctx context.Context, appID uuid.UUID, } // UpdatePatternPreparer prepares the UpdatePattern request. -func (client PatternClient) UpdatePatternPreparer(ctx context.Context, appID uuid.UUID, versionID string, patternID uuid.UUID, pattern PatternRuleUpdateObject) (*http.Request, error) { +func (client PatternClient) UpdatePatternPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, patternID uuid.UUID, pattern PatternRuleUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -613,7 +634,7 @@ func (client PatternClient) UpdatePatternPreparer(ctx context.Context, appID uui preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules/{patternId}", pathParameters), autorest.WithJSON(pattern)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -641,10 +662,12 @@ func (client PatternClient) UpdatePatternResponder(resp *http.Response) (result // UpdatePatterns sends the update patterns request. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // patterns - an array represents the patterns. -func (client PatternClient) UpdatePatterns(ctx context.Context, appID uuid.UUID, versionID string, patterns []PatternRuleUpdateObject) (result ListPatternRuleInfo, err error) { +func (client PatternClient) UpdatePatterns(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, patterns []PatternRuleUpdateObject) (result ListPatternRuleInfo, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PatternClient.UpdatePatterns") defer func() { @@ -661,7 +684,7 @@ func (client PatternClient) UpdatePatterns(ctx context.Context, appID uuid.UUID, return result, validation.NewError("authoring.PatternClient", "UpdatePatterns", err.Error()) } - req, err := client.UpdatePatternsPreparer(ctx, appID, versionID, patterns) + req, err := client.UpdatePatternsPreparer(ctx, azureRegion, azureCloud, appID, versionID, patterns) if err != nil { err = autorest.NewErrorWithError(err, "authoring.PatternClient", "UpdatePatterns", nil, "Failure preparing request") return @@ -683,9 +706,10 @@ func (client PatternClient) UpdatePatterns(ctx context.Context, appID uuid.UUID, } // UpdatePatternsPreparer prepares the UpdatePatterns request. -func (client PatternClient) UpdatePatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, patterns []PatternRuleUpdateObject) (*http.Request, error) { +func (client PatternClient) UpdatePatternsPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, patterns []PatternRuleUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -696,7 +720,7 @@ func (client PatternClient) UpdatePatternsPreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters), autorest.WithJSON(patterns)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) diff --git a/services/cognitiveservices/v2.0/luis/authoring/permissions.go b/services/cognitiveservices/v2.0/luis/authoring/permissions.go index 8b758b84d30e..67d63db65808 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/permissions.go +++ b/services/cognitiveservices/v2.0/luis/authoring/permissions.go @@ -32,16 +32,18 @@ type PermissionsClient struct { } // NewPermissionsClient creates an instance of the PermissionsClient client. -func NewPermissionsClient(endpoint string) PermissionsClient { - return PermissionsClient{New(endpoint)} +func NewPermissionsClient() PermissionsClient { + return PermissionsClient{New()} } // Add adds a user to the allowed list of users to access this LUIS application. Users are added using their email // address. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // userToAdd - a model containing the user's email address. -func (client PermissionsClient) Add(ctx context.Context, appID uuid.UUID, userToAdd UserCollaborator) (result OperationStatus, err error) { +func (client PermissionsClient) Add(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, userToAdd UserCollaborator) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PermissionsClient.Add") defer func() { @@ -52,7 +54,7 @@ func (client PermissionsClient) Add(ctx context.Context, appID uuid.UUID, userTo tracing.EndSpan(ctx, sc, err) }() } - req, err := client.AddPreparer(ctx, appID, userToAdd) + req, err := client.AddPreparer(ctx, azureRegion, azureCloud, appID, userToAdd) if err != nil { err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "Add", nil, "Failure preparing request") return @@ -74,9 +76,10 @@ func (client PermissionsClient) Add(ctx context.Context, appID uuid.UUID, userTo } // AddPreparer prepares the Add request. -func (client PermissionsClient) AddPreparer(ctx context.Context, appID uuid.UUID, userToAdd UserCollaborator) (*http.Request, error) { +func (client PermissionsClient) AddPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, userToAdd UserCollaborator) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -86,7 +89,7 @@ func (client PermissionsClient) AddPreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/permissions", pathParameters), autorest.WithJSON(userToAdd)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -115,9 +118,11 @@ func (client PermissionsClient) AddResponder(resp *http.Response) (result Operat // Delete removes a user from the allowed list of users to access this LUIS application. Users are removed using their // email address. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // userToDelete - a model containing the user's email address. -func (client PermissionsClient) Delete(ctx context.Context, appID uuid.UUID, userToDelete UserCollaborator) (result OperationStatus, err error) { +func (client PermissionsClient) Delete(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, userToDelete UserCollaborator) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PermissionsClient.Delete") defer func() { @@ -128,7 +133,7 @@ func (client PermissionsClient) Delete(ctx context.Context, appID uuid.UUID, use tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePreparer(ctx, appID, userToDelete) + req, err := client.DeletePreparer(ctx, azureRegion, azureCloud, appID, userToDelete) if err != nil { err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "Delete", nil, "Failure preparing request") return @@ -150,9 +155,10 @@ func (client PermissionsClient) Delete(ctx context.Context, appID uuid.UUID, use } // DeletePreparer prepares the Delete request. -func (client PermissionsClient) DeletePreparer(ctx context.Context, appID uuid.UUID, userToDelete UserCollaborator) (*http.Request, error) { +func (client PermissionsClient) DeletePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, userToDelete UserCollaborator) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -162,7 +168,7 @@ func (client PermissionsClient) DeletePreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/permissions", pathParameters), autorest.WithJSON(userToDelete)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -190,8 +196,10 @@ func (client PermissionsClient) DeleteResponder(resp *http.Response) (result Ope // List gets the list of user emails that have permissions to access your application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. -func (client PermissionsClient) List(ctx context.Context, appID uuid.UUID) (result UserAccessList, err error) { +func (client PermissionsClient) List(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID) (result UserAccessList, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PermissionsClient.List") defer func() { @@ -202,7 +210,7 @@ func (client PermissionsClient) List(ctx context.Context, appID uuid.UUID) (resu tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ListPreparer(ctx, appID) + req, err := client.ListPreparer(ctx, azureRegion, azureCloud, appID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "List", nil, "Failure preparing request") return @@ -224,9 +232,10 @@ func (client PermissionsClient) List(ctx context.Context, appID uuid.UUID) (resu } // ListPreparer prepares the List request. -func (client PermissionsClient) ListPreparer(ctx context.Context, appID uuid.UUID) (*http.Request, error) { +func (client PermissionsClient) ListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -235,7 +244,7 @@ func (client PermissionsClient) ListPreparer(ctx context.Context, appID uuid.UUI preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/permissions", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -260,12 +269,14 @@ func (client PermissionsClient) ListResponder(resp *http.Response) (result UserA return } -// Update replaces the current users access list with the one sent in the body. If an empty list is sent, all access to -// other users will be removed. +// Update replaces the current user access list with the new list sent in the body. If an empty list is sent, all +// access to other users will be removed. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. -// collaborators - a model containing a list of user's email addresses. -func (client PermissionsClient) Update(ctx context.Context, appID uuid.UUID, collaborators CollaboratorsArray) (result OperationStatus, err error) { +// collaborators - a model containing a list of user email addresses. +func (client PermissionsClient) Update(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, collaborators CollaboratorsArray) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PermissionsClient.Update") defer func() { @@ -276,7 +287,7 @@ func (client PermissionsClient) Update(ctx context.Context, appID uuid.UUID, col tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdatePreparer(ctx, appID, collaborators) + req, err := client.UpdatePreparer(ctx, azureRegion, azureCloud, appID, collaborators) if err != nil { err = autorest.NewErrorWithError(err, "authoring.PermissionsClient", "Update", nil, "Failure preparing request") return @@ -298,9 +309,10 @@ func (client PermissionsClient) Update(ctx context.Context, appID uuid.UUID, col } // UpdatePreparer prepares the Update request. -func (client PermissionsClient) UpdatePreparer(ctx context.Context, appID uuid.UUID, collaborators CollaboratorsArray) (*http.Request, error) { +func (client PermissionsClient) UpdatePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, collaborators CollaboratorsArray) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -310,7 +322,7 @@ func (client PermissionsClient) UpdatePreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/permissions", pathParameters), autorest.WithJSON(collaborators)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) diff --git a/services/cognitiveservices/v2.0/luis/authoring/settings.go b/services/cognitiveservices/v2.0/luis/authoring/settings.go index 872af192cdc0..e2d0b058d7d8 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/settings.go +++ b/services/cognitiveservices/v2.0/luis/authoring/settings.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" "github.com/satori/go.uuid" "net/http" @@ -32,15 +33,17 @@ type SettingsClient struct { } // NewSettingsClient creates an instance of the SettingsClient client. -func NewSettingsClient(endpoint string) SettingsClient { - return SettingsClient{New(endpoint)} +func NewSettingsClient() SettingsClient { + return SettingsClient{New()} } -// List gets the application version settings. +// List gets the settings in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -func (client SettingsClient) List(ctx context.Context, appID uuid.UUID, versionID string) (result ListAppVersionSettingObject, err error) { +func (client SettingsClient) List(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (result ListAppVersionSettingObject, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SettingsClient.List") defer func() { @@ -51,7 +54,7 @@ func (client SettingsClient) List(ctx context.Context, appID uuid.UUID, versionI tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ListPreparer(ctx, appID, versionID) + req, err := client.ListPreparer(ctx, azureRegion, azureCloud, appID, versionID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.SettingsClient", "List", nil, "Failure preparing request") return @@ -73,9 +76,10 @@ func (client SettingsClient) List(ctx context.Context, appID uuid.UUID, versionI } // ListPreparer prepares the List request. -func (client SettingsClient) ListPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) { +func (client SettingsClient) ListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -85,7 +89,7 @@ func (client SettingsClient) ListPreparer(ctx context.Context, appID uuid.UUID, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/settings", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -110,12 +114,14 @@ func (client SettingsClient) ListResponder(resp *http.Response) (result ListAppV return } -// Update updates the application version settings. +// Update updates the settings in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // listOfAppVersionSettingObject - a list of the updated application version settings. -func (client SettingsClient) Update(ctx context.Context, appID uuid.UUID, versionID string, listOfAppVersionSettingObject AppVersionSettingObject) (result OperationStatus, err error) { +func (client SettingsClient) Update(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, listOfAppVersionSettingObject []AppVersionSettingObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SettingsClient.Update") defer func() { @@ -126,7 +132,13 @@ func (client SettingsClient) Update(ctx context.Context, appID uuid.UUID, versio tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdatePreparer(ctx, appID, versionID, listOfAppVersionSettingObject) + if err := validation.Validate([]validation.Validation{ + {TargetValue: listOfAppVersionSettingObject, + Constraints: []validation.Constraint{{Target: "listOfAppVersionSettingObject", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("authoring.SettingsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, azureRegion, azureCloud, appID, versionID, listOfAppVersionSettingObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.SettingsClient", "Update", nil, "Failure preparing request") return @@ -148,9 +160,10 @@ func (client SettingsClient) Update(ctx context.Context, appID uuid.UUID, versio } // UpdatePreparer prepares the Update request. -func (client SettingsClient) UpdatePreparer(ctx context.Context, appID uuid.UUID, versionID string, listOfAppVersionSettingObject AppVersionSettingObject) (*http.Request, error) { +func (client SettingsClient) UpdatePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, listOfAppVersionSettingObject []AppVersionSettingObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -161,7 +174,7 @@ func (client SettingsClient) UpdatePreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/settings", pathParameters), autorest.WithJSON(listOfAppVersionSettingObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) diff --git a/services/cognitiveservices/v2.0/luis/authoring/train.go b/services/cognitiveservices/v2.0/luis/authoring/train.go index 8611abd8f6fd..ad286fa8380f 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/train.go +++ b/services/cognitiveservices/v2.0/luis/authoring/train.go @@ -32,17 +32,19 @@ type TrainClient struct { } // NewTrainClient creates an instance of the TrainClient client. -func NewTrainClient(endpoint string) TrainClient { - return TrainClient{New(endpoint)} +func NewTrainClient() TrainClient { + return TrainClient{New()} } // GetStatus gets the training status of all models (intents and entities) for the specified LUIS app. You must call // the train API to train the LUIS app before you call this API to get training status. "appID" specifies the LUIS app // ID. "versionId" specifies the version number of the LUIS app. For example, "0.1". // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -func (client TrainClient) GetStatus(ctx context.Context, appID uuid.UUID, versionID string) (result ListModelTrainingInfo, err error) { +func (client TrainClient) GetStatus(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (result ListModelTrainingInfo, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TrainClient.GetStatus") defer func() { @@ -53,7 +55,7 @@ func (client TrainClient) GetStatus(ctx context.Context, appID uuid.UUID, versio tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetStatusPreparer(ctx, appID, versionID) + req, err := client.GetStatusPreparer(ctx, azureRegion, azureCloud, appID, versionID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.TrainClient", "GetStatus", nil, "Failure preparing request") return @@ -75,9 +77,10 @@ func (client TrainClient) GetStatus(ctx context.Context, appID uuid.UUID, versio } // GetStatusPreparer prepares the GetStatus request. -func (client TrainClient) GetStatusPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) { +func (client TrainClient) GetStatusPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -87,7 +90,7 @@ func (client TrainClient) GetStatusPreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/train", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -118,9 +121,11 @@ func (client TrainClient) GetStatusResponder(resp *http.Response) (result ListMo // successfully or are up to date. To verify training success, get the training status at least once after training is // complete. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -func (client TrainClient) TrainVersion(ctx context.Context, appID uuid.UUID, versionID string) (result EnqueueTrainingResponse, err error) { +func (client TrainClient) TrainVersion(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (result EnqueueTrainingResponse, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TrainClient.TrainVersion") defer func() { @@ -131,7 +136,7 @@ func (client TrainClient) TrainVersion(ctx context.Context, appID uuid.UUID, ver tracing.EndSpan(ctx, sc, err) }() } - req, err := client.TrainVersionPreparer(ctx, appID, versionID) + req, err := client.TrainVersionPreparer(ctx, azureRegion, azureCloud, appID, versionID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.TrainClient", "TrainVersion", nil, "Failure preparing request") return @@ -153,9 +158,10 @@ func (client TrainClient) TrainVersion(ctx context.Context, appID uuid.UUID, ver } // TrainVersionPreparer prepares the TrainVersion request. -func (client TrainClient) TrainVersionPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) { +func (client TrainClient) TrainVersionPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -165,7 +171,7 @@ func (client TrainClient) TrainVersionPreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/train", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/cognitiveservices/v2.0/luis/authoring/versions.go b/services/cognitiveservices/v2.0/luis/authoring/versions.go index 032cb7a09894..c85176f74e86 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/versions.go +++ b/services/cognitiveservices/v2.0/luis/authoring/versions.go @@ -33,16 +33,18 @@ type VersionsClient struct { } // NewVersionsClient creates an instance of the VersionsClient client. -func NewVersionsClient(endpoint string) VersionsClient { - return VersionsClient{New(endpoint)} +func NewVersionsClient() VersionsClient { + return VersionsClient{New()} } -// Clone creates a new version using the current snapshot of the selected application version. +// Clone creates a new version from the selected version. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // versionCloneObject - a model containing the new version ID. -func (client VersionsClient) Clone(ctx context.Context, appID uuid.UUID, versionID string, versionCloneObject *TaskUpdateObject) (result String, err error) { +func (client VersionsClient) Clone(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, versionCloneObject TaskUpdateObject) (result String, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VersionsClient.Clone") defer func() { @@ -53,7 +55,7 @@ func (client VersionsClient) Clone(ctx context.Context, appID uuid.UUID, version tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ClonePreparer(ctx, appID, versionID, versionCloneObject) + req, err := client.ClonePreparer(ctx, azureRegion, azureCloud, appID, versionID, versionCloneObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Clone", nil, "Failure preparing request") return @@ -75,9 +77,10 @@ func (client VersionsClient) Clone(ctx context.Context, appID uuid.UUID, version } // ClonePreparer prepares the Clone request. -func (client VersionsClient) ClonePreparer(ctx context.Context, appID uuid.UUID, versionID string, versionCloneObject *TaskUpdateObject) (*http.Request, error) { +func (client VersionsClient) ClonePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, versionCloneObject TaskUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -88,12 +91,9 @@ func (client VersionsClient) ClonePreparer(ctx context.Context, appID uuid.UUID, preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), - autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/clone", pathParameters)) - if versionCloneObject != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(versionCloneObject)) - } + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), + autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/clone", pathParameters), + autorest.WithJSON(versionCloneObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -119,9 +119,11 @@ func (client VersionsClient) CloneResponder(resp *http.Response) (result String, // Delete deletes an application version. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -func (client VersionsClient) Delete(ctx context.Context, appID uuid.UUID, versionID string) (result OperationStatus, err error) { +func (client VersionsClient) Delete(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VersionsClient.Delete") defer func() { @@ -132,7 +134,7 @@ func (client VersionsClient) Delete(ctx context.Context, appID uuid.UUID, versio tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePreparer(ctx, appID, versionID) + req, err := client.DeletePreparer(ctx, azureRegion, azureCloud, appID, versionID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Delete", nil, "Failure preparing request") return @@ -154,9 +156,10 @@ func (client VersionsClient) Delete(ctx context.Context, appID uuid.UUID, versio } // DeletePreparer prepares the Delete request. -func (client VersionsClient) DeletePreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) { +func (client VersionsClient) DeletePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -166,7 +169,7 @@ func (client VersionsClient) DeletePreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -191,12 +194,14 @@ func (client VersionsClient) DeleteResponder(resp *http.Response) (result Operat return } -// DeleteUnlabelledUtterance deleted an unlabelled utterance. +// DeleteUnlabelledUtterance deleted an unlabelled utterance in a version of the application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // utterance - the utterance text to delete. -func (client VersionsClient) DeleteUnlabelledUtterance(ctx context.Context, appID uuid.UUID, versionID string, utterance string) (result OperationStatus, err error) { +func (client VersionsClient) DeleteUnlabelledUtterance(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, utterance string) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VersionsClient.DeleteUnlabelledUtterance") defer func() { @@ -207,7 +212,7 @@ func (client VersionsClient) DeleteUnlabelledUtterance(ctx context.Context, appI tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteUnlabelledUtterancePreparer(ctx, appID, versionID, utterance) + req, err := client.DeleteUnlabelledUtterancePreparer(ctx, azureRegion, azureCloud, appID, versionID, utterance) if err != nil { err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "DeleteUnlabelledUtterance", nil, "Failure preparing request") return @@ -229,9 +234,10 @@ func (client VersionsClient) DeleteUnlabelledUtterance(ctx context.Context, appI } // DeleteUnlabelledUtterancePreparer prepares the DeleteUnlabelledUtterance request. -func (client VersionsClient) DeleteUnlabelledUtterancePreparer(ctx context.Context, appID uuid.UUID, versionID string, utterance string) (*http.Request, error) { +func (client VersionsClient) DeleteUnlabelledUtterancePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, utterance string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -242,7 +248,7 @@ func (client VersionsClient) DeleteUnlabelledUtterancePreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsDelete(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/suggest", pathParameters), autorest.WithJSON(utterance)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -270,9 +276,11 @@ func (client VersionsClient) DeleteUnlabelledUtteranceResponder(resp *http.Respo // Export exports a LUIS application to JSON format. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -func (client VersionsClient) Export(ctx context.Context, appID uuid.UUID, versionID string) (result LuisApp, err error) { +func (client VersionsClient) Export(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (result LuisApp, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VersionsClient.Export") defer func() { @@ -283,7 +291,7 @@ func (client VersionsClient) Export(ctx context.Context, appID uuid.UUID, versio tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ExportPreparer(ctx, appID, versionID) + req, err := client.ExportPreparer(ctx, azureRegion, azureCloud, appID, versionID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Export", nil, "Failure preparing request") return @@ -305,9 +313,10 @@ func (client VersionsClient) Export(ctx context.Context, appID uuid.UUID, versio } // ExportPreparer prepares the Export request. -func (client VersionsClient) ExportPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) { +func (client VersionsClient) ExportPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -317,7 +326,7 @@ func (client VersionsClient) ExportPreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/export", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -342,11 +351,14 @@ func (client VersionsClient) ExportResponder(resp *http.Response) (result LuisAp return } -// Get gets the version info. +// Get gets the version information such as date created, last modified date, endpoint URL, count of intents and +// entities, training and publishing status. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. -func (client VersionsClient) Get(ctx context.Context, appID uuid.UUID, versionID string) (result VersionInfo, err error) { +func (client VersionsClient) Get(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (result VersionInfo, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VersionsClient.Get") defer func() { @@ -357,7 +369,7 @@ func (client VersionsClient) Get(ctx context.Context, appID uuid.UUID, versionID tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPreparer(ctx, appID, versionID) + req, err := client.GetPreparer(ctx, azureRegion, azureCloud, appID, versionID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Get", nil, "Failure preparing request") return @@ -379,9 +391,10 @@ func (client VersionsClient) Get(ctx context.Context, appID uuid.UUID, versionID } // GetPreparer prepares the Get request. -func (client VersionsClient) GetPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) { +func (client VersionsClient) GetPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -391,7 +404,7 @@ func (client VersionsClient) GetPreparer(ctx context.Context, appID uuid.UUID, v preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -418,11 +431,13 @@ func (client VersionsClient) GetResponder(resp *http.Response) (result VersionIn // Import imports a new version into a LUIS application. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // luisApp - a LUIS application structure. // versionID - the new versionId to import. If not specified, the versionId will be read from the imported // object. -func (client VersionsClient) Import(ctx context.Context, appID uuid.UUID, luisApp LuisApp, versionID string) (result String, err error) { +func (client VersionsClient) Import(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, luisApp LuisApp, versionID string) (result String, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VersionsClient.Import") defer func() { @@ -433,7 +448,7 @@ func (client VersionsClient) Import(ctx context.Context, appID uuid.UUID, luisAp tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ImportPreparer(ctx, appID, luisApp, versionID) + req, err := client.ImportPreparer(ctx, azureRegion, azureCloud, appID, luisApp, versionID) if err != nil { err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Import", nil, "Failure preparing request") return @@ -455,9 +470,10 @@ func (client VersionsClient) Import(ctx context.Context, appID uuid.UUID, luisAp } // ImportPreparer prepares the Import request. -func (client VersionsClient) ImportPreparer(ctx context.Context, appID uuid.UUID, luisApp LuisApp, versionID string) (*http.Request, error) { +func (client VersionsClient) ImportPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, luisApp LuisApp, versionID string) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -472,7 +488,7 @@ func (client VersionsClient) ImportPreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/import", pathParameters), autorest.WithJSON(luisApp), autorest.WithQueryParameters(queryParameters)) @@ -499,12 +515,14 @@ func (client VersionsClient) ImportResponder(resp *http.Response) (result String return } -// List gets the application versions info. +// List gets a list of versions for this application ID. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // skip - the number of entries to skip. Default value is 0. // take - the number of entries to return. Maximum page size is 500. Default is 100. -func (client VersionsClient) List(ctx context.Context, appID uuid.UUID, skip *int32, take *int32) (result ListVersionInfo, err error) { +func (client VersionsClient) List(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, skip *int32, take *int32) (result ListVersionInfo, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VersionsClient.List") defer func() { @@ -527,7 +545,7 @@ func (client VersionsClient) List(ctx context.Context, appID uuid.UUID, skip *in return result, validation.NewError("authoring.VersionsClient", "List", err.Error()) } - req, err := client.ListPreparer(ctx, appID, skip, take) + req, err := client.ListPreparer(ctx, azureRegion, azureCloud, appID, skip, take) if err != nil { err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "List", nil, "Failure preparing request") return @@ -549,9 +567,10 @@ func (client VersionsClient) List(ctx context.Context, appID uuid.UUID, skip *in } // ListPreparer prepares the List request. -func (client VersionsClient) ListPreparer(ctx context.Context, appID uuid.UUID, skip *int32, take *int32) (*http.Request, error) { +func (client VersionsClient) ListPreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, skip *int32, take *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -572,7 +591,7 @@ func (client VersionsClient) ListPreparer(ctx context.Context, appID uuid.UUID, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -600,10 +619,12 @@ func (client VersionsClient) ListResponder(resp *http.Response) (result ListVers // Update updates the name or description of the application version. // Parameters: +// azureRegion - supported Azure regions for Cognitive Services endpoints +// azureCloud - supported Azure Clouds for Cognitive Services endpoints // appID - the application ID. // versionID - the version ID. // versionUpdateObject - a model containing Name and Description of the application. -func (client VersionsClient) Update(ctx context.Context, appID uuid.UUID, versionID string, versionUpdateObject TaskUpdateObject) (result OperationStatus, err error) { +func (client VersionsClient) Update(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, versionUpdateObject TaskUpdateObject) (result OperationStatus, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VersionsClient.Update") defer func() { @@ -614,7 +635,7 @@ func (client VersionsClient) Update(ctx context.Context, appID uuid.UUID, versio tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdatePreparer(ctx, appID, versionID, versionUpdateObject) + req, err := client.UpdatePreparer(ctx, azureRegion, azureCloud, appID, versionID, versionUpdateObject) if err != nil { err = autorest.NewErrorWithError(err, "authoring.VersionsClient", "Update", nil, "Failure preparing request") return @@ -636,9 +657,10 @@ func (client VersionsClient) Update(ctx context.Context, appID uuid.UUID, versio } // UpdatePreparer prepares the Update request. -func (client VersionsClient) UpdatePreparer(ctx context.Context, appID uuid.UUID, versionID string, versionUpdateObject TaskUpdateObject) (*http.Request, error) { +func (client VersionsClient) UpdatePreparer(ctx context.Context, azureRegion AzureRegions, azureCloud AzureClouds, appID uuid.UUID, versionID string, versionUpdateObject TaskUpdateObject) (*http.Request, error) { urlParameters := map[string]interface{}{ - "Endpoint": client.Endpoint, + "AzureCloud": azureCloud, + "AzureRegion": azureRegion, } pathParameters := map[string]interface{}{ @@ -649,7 +671,7 @@ func (client VersionsClient) UpdatePreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), + autorest.WithCustomBaseURL("http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/", pathParameters), autorest.WithJSON(versionUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) diff --git a/services/graphrbac/1.6/graphrbac/applications.go b/services/graphrbac/1.6/graphrbac/applications.go index 4d08abf3523b..36a3275fda91 100644 --- a/services/graphrbac/1.6/graphrbac/applications.go +++ b/services/graphrbac/1.6/graphrbac/applications.go @@ -142,8 +142,7 @@ func (client ApplicationsClient) Create(ctx context.Context, parameters Applicat } if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.DisplayName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.IdentifierUris", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.DisplayName", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewError("graphrbac.ApplicationsClient", "Create", err.Error()) } @@ -358,6 +357,81 @@ func (client ApplicationsClient) GetResponder(resp *http.Response) (result Appli return } +// GetServicePrincipalsIDByAppID gets an object id for a given application id from the current tenant. +// Parameters: +// applicationID - the application ID. +func (client ApplicationsClient) GetServicePrincipalsIDByAppID(ctx context.Context, applicationID string) (result ServicePrincipalObjectResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.GetServicePrincipalsIDByAppID") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetServicePrincipalsIDByAppIDPreparer(ctx, applicationID) + if err != nil { + err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "GetServicePrincipalsIDByAppID", nil, "Failure preparing request") + return + } + + resp, err := client.GetServicePrincipalsIDByAppIDSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "GetServicePrincipalsIDByAppID", resp, "Failure sending request") + return + } + + result, err = client.GetServicePrincipalsIDByAppIDResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "GetServicePrincipalsIDByAppID", resp, "Failure responding to request") + } + + return +} + +// GetServicePrincipalsIDByAppIDPreparer prepares the GetServicePrincipalsIDByAppID request. +func (client ApplicationsClient) GetServicePrincipalsIDByAppIDPreparer(ctx context.Context, applicationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationID": autorest.Encode("path", applicationID), + "tenantID": autorest.Encode("path", client.TenantID), + } + + const APIVersion = "1.6" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{tenantID}/servicePrincipalsByAppId/{applicationID}/objectId", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServicePrincipalsIDByAppIDSender sends the GetServicePrincipalsIDByAppID request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationsClient) GetServicePrincipalsIDByAppIDSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// GetServicePrincipalsIDByAppIDResponder handles the response to the GetServicePrincipalsIDByAppID request. The method always +// closes the http.Response Body. +func (client ApplicationsClient) GetServicePrincipalsIDByAppIDResponder(resp *http.Response) (result ServicePrincipalObjectResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // List lists applications by filter parameters. // Parameters: // filter - the filters to apply to the operation. diff --git a/services/graphrbac/1.6/graphrbac/graphrbacapi/interfaces.go b/services/graphrbac/1.6/graphrbac/graphrbacapi/interfaces.go index 96b0972c7117..6b16b91d0c94 100644 --- a/services/graphrbac/1.6/graphrbac/graphrbacapi/interfaces.go +++ b/services/graphrbac/1.6/graphrbac/graphrbacapi/interfaces.go @@ -38,6 +38,7 @@ type ApplicationsClientAPI interface { Create(ctx context.Context, parameters graphrbac.ApplicationCreateParameters) (result graphrbac.Application, err error) Delete(ctx context.Context, applicationObjectID string) (result autorest.Response, err error) Get(ctx context.Context, applicationObjectID string) (result graphrbac.Application, err error) + GetServicePrincipalsIDByAppID(ctx context.Context, applicationID string) (result graphrbac.ServicePrincipalObjectResult, err error) List(ctx context.Context, filter string) (result graphrbac.ApplicationListResultPage, err error) ListKeyCredentials(ctx context.Context, applicationObjectID string) (result graphrbac.KeyCredentialListResult, err error) ListNext(ctx context.Context, nextLink string) (result graphrbac.ApplicationListResult, err error) diff --git a/services/graphrbac/1.6/graphrbac/models.go b/services/graphrbac/1.6/graphrbac/models.go index 1e93c642e35a..0a3c359f0410 100644 --- a/services/graphrbac/1.6/graphrbac/models.go +++ b/services/graphrbac/1.6/graphrbac/models.go @@ -3655,6 +3655,15 @@ func NewServicePrincipalListResultPage(getNextPage func(context.Context, Service return ServicePrincipalListResultPage{fn: getNextPage} } +// ServicePrincipalObjectResult service Principal Object Result. +type ServicePrincipalObjectResult struct { + autorest.Response `json:"-"` + // Value - The Object ID of the service principal with the specified application ID. + Value *string `json:"value,omitempty"` + // OdataMetadata - The URL representing edm equivalent. + OdataMetadata *string `json:"odata.metadata,omitempty"` +} + // ServicePrincipalUpdateParameters request parameters for update an existing service principal. type ServicePrincipalUpdateParameters struct { // AccountEnabled - whether or not the service principal account is enabled diff --git a/services/machinelearning/mgmt/2017-01-01/webservices/models.go b/services/machinelearning/mgmt/2017-01-01/webservices/models.go index f8da6501b7d9..468fbccb5e22 100644 --- a/services/machinelearning/mgmt/2017-01-01/webservices/models.go +++ b/services/machinelearning/mgmt/2017-01-01/webservices/models.go @@ -746,6 +746,147 @@ type Parameter struct { CertificateThumbprint *string `json:"certificateThumbprint,omitempty"` } +// PatchedResource azure resource. +type PatchedResource struct { + // ID - Specifies the resource ID. + ID *string `json:"id,omitempty"` + // Name - Specifies the name of the resource. + Name *string `json:"name,omitempty"` + // Location - Specifies the location of the resource. + Location *string `json:"location,omitempty"` + // Type - Specifies the type of the resource. + Type *string `json:"type,omitempty"` + // Tags - Contains resource tags defined as key/value pairs. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for PatchedResource. +func (pr PatchedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pr.ID != nil { + objectMap["id"] = pr.ID + } + if pr.Name != nil { + objectMap["name"] = pr.Name + } + if pr.Location != nil { + objectMap["location"] = pr.Location + } + if pr.Type != nil { + objectMap["type"] = pr.Type + } + if pr.Tags != nil { + objectMap["tags"] = pr.Tags + } + return json.Marshal(objectMap) +} + +// PatchedWebService instance of an Patched Azure ML web service resource. +type PatchedWebService struct { + // Properties - Contains the property payload that describes the web service. + Properties BasicProperties `json:"properties,omitempty"` + // ID - Specifies the resource ID. + ID *string `json:"id,omitempty"` + // Name - Specifies the name of the resource. + Name *string `json:"name,omitempty"` + // Location - Specifies the location of the resource. + Location *string `json:"location,omitempty"` + // Type - Specifies the type of the resource. + Type *string `json:"type,omitempty"` + // Tags - Contains resource tags defined as key/value pairs. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for PatchedWebService. +func (pws PatchedWebService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = pws.Properties + if pws.ID != nil { + objectMap["id"] = pws.ID + } + if pws.Name != nil { + objectMap["name"] = pws.Name + } + if pws.Location != nil { + objectMap["location"] = pws.Location + } + if pws.Type != nil { + objectMap["type"] = pws.Type + } + if pws.Tags != nil { + objectMap["tags"] = pws.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PatchedWebService struct. +func (pws *PatchedWebService) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicProperties(*v) + if err != nil { + return err + } + pws.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pws.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pws.Name = &name + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pws.Location = &location + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pws.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pws.Tags = tags + } + } + } + + return nil +} + // PatchFuture an abstraction for monitoring and retrieving the results of a long-running operation. type PatchFuture struct { azure.Future diff --git a/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go b/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go index 2947123ad50c..6da8a09bc377 100644 --- a/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go +++ b/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go @@ -632,7 +632,7 @@ func (client Client) ListKeysResponder(resp *http.Response) (result Keys, err er // resourceGroupName - name of the resource group in which the web service is located. // webServiceName - the name of the web service. // patchPayload - the payload to use to patch the web service. -func (client Client) Patch(ctx context.Context, resourceGroupName string, webServiceName string, patchPayload WebService) (result PatchFuture, err error) { +func (client Client) Patch(ctx context.Context, resourceGroupName string, webServiceName string, patchPayload PatchedWebService) (result PatchFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.Patch") defer func() { @@ -659,7 +659,7 @@ func (client Client) Patch(ctx context.Context, resourceGroupName string, webSer } // PatchPreparer prepares the Patch request. -func (client Client) PatchPreparer(ctx context.Context, resourceGroupName string, webServiceName string, patchPayload WebService) (*http.Request, error) { +func (client Client) PatchPreparer(ctx context.Context, resourceGroupName string, webServiceName string, patchPayload PatchedWebService) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), diff --git a/services/machinelearning/mgmt/2017-01-01/webservices/webservicesapi/interfaces.go b/services/machinelearning/mgmt/2017-01-01/webservices/webservicesapi/interfaces.go index f10dc00c2e0d..b6f293e9733f 100644 --- a/services/machinelearning/mgmt/2017-01-01/webservices/webservicesapi/interfaces.go +++ b/services/machinelearning/mgmt/2017-01-01/webservices/webservicesapi/interfaces.go @@ -37,7 +37,7 @@ type ClientAPI interface { ListByResourceGroup(ctx context.Context, resourceGroupName string, skiptoken string) (result webservices.PaginatedWebServicesListPage, err error) ListBySubscriptionID(ctx context.Context, skiptoken string) (result webservices.PaginatedWebServicesListPage, err error) ListKeys(ctx context.Context, resourceGroupName string, webServiceName string) (result webservices.Keys, err error) - Patch(ctx context.Context, resourceGroupName string, webServiceName string, patchPayload webservices.WebService) (result webservices.PatchFuture, err error) + Patch(ctx context.Context, resourceGroupName string, webServiceName string, patchPayload webservices.PatchedWebService) (result webservices.PatchFuture, err error) Remove(ctx context.Context, resourceGroupName string, webServiceName string) (result webservices.RemoveFuture, err error) } diff --git a/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/marketplaceagreements.go b/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/marketplaceagreements.go index 84abe9d3f718..88c698bcc9fc 100644 --- a/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/marketplaceagreements.go +++ b/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/marketplaceagreements.go @@ -92,7 +92,7 @@ func (client MarketplaceAgreementsClient) CancelPreparer(ctx context.Context, pu } preparer := autorest.CreatePreparer( - autorest.AsPut(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}/cancel", pathParameters), autorest.WithQueryParameters(queryParameters)) @@ -485,7 +485,7 @@ func (client MarketplaceAgreementsClient) SignPreparer(ctx context.Context, publ } preparer := autorest.CreatePreparer( - autorest.AsPut(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}/sign", pathParameters), autorest.WithQueryParameters(queryParameters)) diff --git a/services/preview/cognitiveservices/v1.0/anomalydetector/anomalydetectorapi/interfaces.go b/services/preview/cognitiveservices/v1.0/anomalydetector/anomalydetectorapi/interfaces.go new file mode 100644 index 000000000000..f57b8a48443e --- /dev/null +++ b/services/preview/cognitiveservices/v1.0/anomalydetector/anomalydetectorapi/interfaces.go @@ -0,0 +1,31 @@ +package anomalydetectorapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/preview/cognitiveservices/v1.0/anomalydetector" +) + +// BaseClientAPI contains the set of methods on the BaseClient type. +type BaseClientAPI interface { + EntireDetect(ctx context.Context, body anomalydetector.Request) (result anomalydetector.EntireDetectResponse, err error) + LastDetect(ctx context.Context, body anomalydetector.Request) (result anomalydetector.LastDetectResponse, err error) +} + +var _ BaseClientAPI = (*anomalydetector.BaseClient)(nil) diff --git a/services/preview/cognitiveservices/v1.0/anomalydetector/client.go b/services/preview/cognitiveservices/v1.0/anomalydetector/client.go new file mode 100644 index 000000000000..a7f9c10fc8d4 --- /dev/null +++ b/services/preview/cognitiveservices/v1.0/anomalydetector/client.go @@ -0,0 +1,208 @@ +// Package anomalydetector implements the Azure ARM Anomalydetector service API version 1.0. +// +// The Anomaly Detector API detects anomalies automatically in time series data. It supports two functionalities, one +// is for detecting the whole series with model trained by the timeseries, another is detecting last point with model +// trained by points before. By using this service, business customers can discover incidents and establish a logic +// flow for root cause analysis. +package anomalydetector + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// BaseClient is the base client for Anomalydetector. +type BaseClient struct { + autorest.Client + Endpoint string +} + +// New creates an instance of the BaseClient client. +func New(endpoint string) BaseClient { + return NewWithoutDefaults(endpoint) +} + +// NewWithoutDefaults creates an instance of the BaseClient client. +func NewWithoutDefaults(endpoint string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + Endpoint: endpoint, + } +} + +// EntireDetect this operation generates a model using an entire series, each point is detected with the same model. +// With this method, points before and after a certain point are used to determine whether it is an anomaly. The entire +// detection can give user an overall status of the time series. +// Parameters: +// body - time series points and period if needed. Advanced model parameters can also be set in the request. +func (client BaseClient) EntireDetect(ctx context.Context, body Request) (result EntireDetectResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.EntireDetect") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.Series", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("anomalydetector.BaseClient", "EntireDetect", err.Error()) + } + + req, err := client.EntireDetectPreparer(ctx, body) + if err != nil { + err = autorest.NewErrorWithError(err, "anomalydetector.BaseClient", "EntireDetect", nil, "Failure preparing request") + return + } + + resp, err := client.EntireDetectSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "anomalydetector.BaseClient", "EntireDetect", resp, "Failure sending request") + return + } + + result, err = client.EntireDetectResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "anomalydetector.BaseClient", "EntireDetect", resp, "Failure responding to request") + } + + return +} + +// EntireDetectPreparer prepares the EntireDetect request. +func (client BaseClient) EntireDetectPreparer(ctx context.Context, body Request) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithCustomBaseURL("{Endpoint}/anomalydetector/v1.0", urlParameters), + autorest.WithPath("/timeseries/entire/detect"), + autorest.WithJSON(body)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// EntireDetectSender sends the EntireDetect request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) EntireDetectSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// EntireDetectResponder handles the response to the EntireDetect request. The method always +// closes the http.Response Body. +func (client BaseClient) EntireDetectResponder(resp *http.Response) (result EntireDetectResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// LastDetect this operation generates a model using points before the latest one. With this method, only historical +// points are used to determine whether the target point is an anomaly. The latest point detecting operation matches +// the scenario of real-time monitoring of business metrics. +// Parameters: +// body - time series points and period if needed. Advanced model parameters can also be set in the request. +func (client BaseClient) LastDetect(ctx context.Context, body Request) (result LastDetectResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.LastDetect") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.Series", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("anomalydetector.BaseClient", "LastDetect", err.Error()) + } + + req, err := client.LastDetectPreparer(ctx, body) + if err != nil { + err = autorest.NewErrorWithError(err, "anomalydetector.BaseClient", "LastDetect", nil, "Failure preparing request") + return + } + + resp, err := client.LastDetectSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "anomalydetector.BaseClient", "LastDetect", resp, "Failure sending request") + return + } + + result, err = client.LastDetectResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "anomalydetector.BaseClient", "LastDetect", resp, "Failure responding to request") + } + + return +} + +// LastDetectPreparer prepares the LastDetect request. +func (client BaseClient) LastDetectPreparer(ctx context.Context, body Request) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithCustomBaseURL("{Endpoint}/anomalydetector/v1.0", urlParameters), + autorest.WithPath("/timeseries/last/detect"), + autorest.WithJSON(body)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// LastDetectSender sends the LastDetect request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) LastDetectSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// LastDetectResponder handles the response to the LastDetect request. The method always +// closes the http.Response Body. +func (client BaseClient) LastDetectResponder(resp *http.Response) (result LastDetectResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/cognitiveservices/v1.0/anomalydetector/models.go b/services/preview/cognitiveservices/v1.0/anomalydetector/models.go new file mode 100644 index 000000000000..e82f87857fdb --- /dev/null +++ b/services/preview/cognitiveservices/v1.0/anomalydetector/models.go @@ -0,0 +1,121 @@ +package anomalydetector + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/cognitiveservices/v1.0/anomalydetector" + +// Granularity enumerates the values for granularity. +type Granularity string + +const ( + // Daily ... + Daily Granularity = "daily" + // Hourly ... + Hourly Granularity = "hourly" + // Minutely ... + Minutely Granularity = "minutely" + // Monthly ... + Monthly Granularity = "monthly" + // Weekly ... + Weekly Granularity = "weekly" + // Yearly ... + Yearly Granularity = "yearly" +) + +// PossibleGranularityValues returns an array of possible values for the Granularity const type. +func PossibleGranularityValues() []Granularity { + return []Granularity{Daily, Hourly, Minutely, Monthly, Weekly, Yearly} +} + +// APIError error information returned by the API. +type APIError struct { + // Code - The error code. + Code interface{} `json:"code,omitempty"` + // Message - A message explaining the error reported by the service. + Message *string `json:"message,omitempty"` +} + +// EntireDetectResponse ... +type EntireDetectResponse struct { + autorest.Response `json:"-"` + // Period - Frequency extracted from the series, zero means no recurrent pattern has been found. + Period *int32 `json:"period,omitempty"` + // ExpectedValues - ExpectedValues contain expected value for each input point. The index of the array is consistent with the input series. + ExpectedValues *[]float64 `json:"expectedValues,omitempty"` + // UpperMargins - UpperMargins contain upper margin of each input point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. Anomalies in response can be filtered by upperBoundary and lowerBoundary. By adjusting marginScale value, less significant anomalies can be filtered in client side. The index of the array is consistent with the input series. + UpperMargins *[]float64 `json:"upperMargins,omitempty"` + // LowerMargins - LowerMargins contain lower margin of each input point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. Points between the boundary can be marked as normal ones in client side. The index of the array is consistent with the input series. + LowerMargins *[]float64 `json:"lowerMargins,omitempty"` + // IsAnomaly - IsAnomaly contains anomaly properties for each input point. True means an anomaly either negative or positive has been detected. The index of the array is consistent with the input series. + IsAnomaly *[]bool `json:"isAnomaly,omitempty"` + // IsNegativeAnomaly - IsNegativeAnomaly contains anomaly status in negative direction for each input point. True means a negative anomaly has been detected. A negative anomaly means the point is detected as an anomaly and its real value is smaller than the expected one. The index of the array is consistent with the input series. + IsNegativeAnomaly *[]bool `json:"isNegativeAnomaly,omitempty"` + // IsPositiveAnomaly - IsPositiveAnomaly contain anomaly status in positive direction for each input point. True means a positive anomaly has been detected. A positive anomaly means the point is detected as an anomaly and its real value is larger than the expected one. The index of the array is consistent with the input series. + IsPositiveAnomaly *[]bool `json:"isPositiveAnomaly,omitempty"` +} + +// LastDetectResponse ... +type LastDetectResponse struct { + autorest.Response `json:"-"` + // Period - Frequency extracted from the series, zero means no recurrent pattern has been found. + Period *int32 `json:"period,omitempty"` + // SuggestedWindow - Suggested input series points needed for detecting the latest point. + SuggestedWindow *int32 `json:"suggestedWindow,omitempty"` + // ExpectedValue - Expected value of the latest point. + ExpectedValue *float64 `json:"expectedValue,omitempty"` + // UpperMargin - Upper margin of the latest point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. If the value of latest point is between upperBoundary and lowerBoundary, it should be treated as normal value. By adjusting marginScale value, anomaly status of latest point can be changed. + UpperMargin *float64 `json:"upperMargin,omitempty"` + // LowerMargin - Lower margin of the latest point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. + LowerMargin *float64 `json:"lowerMargin,omitempty"` + // IsAnomaly - Anomaly status of the latest point, true means the latest point is an anomaly either in negative direction or positive direction. + IsAnomaly *bool `json:"isAnomaly,omitempty"` + // IsNegativeAnomaly - Anomaly status in negative direction of the latest point. True means the latest point is an anomaly and its real value is smaller than the expected one. + IsNegativeAnomaly *bool `json:"isNegativeAnomaly,omitempty"` + // IsPositiveAnomaly - Anomaly status in positive direction of the latest point. True means the latest point is an anomaly and its real value is larger than the expected one. + IsPositiveAnomaly *bool `json:"isPositiveAnomaly,omitempty"` +} + +// Point ... +type Point struct { + // Timestamp - Timestamp of a data point (ISO8601 format). + Timestamp *date.Time `json:"timestamp,omitempty"` + // Value - The measurement of that point, should be float. + Value *float64 `json:"value,omitempty"` +} + +// Request ... +type Request struct { + // Series - Time series data points. Points should be sorted by timestamp in ascending order to match the anomaly detection result. If the data is not sorted correctly or there is duplicated timestamp, the API will not work. In such case, an error message will be returned. + Series *[]Point `json:"series,omitempty"` + // Granularity - Can only be one of yearly, monthly, weekly, daily, hourly or minutely. Granularity is used for verify whether input series is valid. Possible values include: 'Yearly', 'Monthly', 'Weekly', 'Daily', 'Hourly', 'Minutely' + Granularity Granularity `json:"granularity,omitempty"` + // CustomInterval - Custom Interval is used to set non-standard time interval, for example, if the series is 5 minutes, request can be set as {"granularity":"minutely", "customInterval":5}. + CustomInterval *int32 `json:"customInterval,omitempty"` + // Period - Optional argument, periodic value of a time series. If the value is null or does not present, the API will determine the period automatically. + Period *int32 `json:"period,omitempty"` + // MaxAnomalyRatio - Optional argument, advanced model parameter, max anomaly ratio in a time series. + MaxAnomalyRatio *float64 `json:"maxAnomalyRatio,omitempty"` + // Sensitivity - Optional argument, advanced model parameter, between 0-99, the lower the value is, the larger the margin value will be which means less anomalies will be accepted. + Sensitivity *int32 `json:"sensitivity,omitempty"` +} diff --git a/services/preview/cognitiveservices/v1.0/anomalydetector/version.go b/services/preview/cognitiveservices/v1.0/anomalydetector/version.go new file mode 100644 index 000000000000..7ba25aa0af9e --- /dev/null +++ b/services/preview/cognitiveservices/v1.0/anomalydetector/version.go @@ -0,0 +1,30 @@ +package anomalydetector + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " anomalydetector/1.0" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/preview/netapp/mgmt/2017-08-15/netapp/models.go b/services/preview/netapp/mgmt/2017-08-15/netapp/models.go index e2a7eeaffbd9..ab918840e5dc 100644 --- a/services/preview/netapp/mgmt/2017-08-15/netapp/models.go +++ b/services/preview/netapp/mgmt/2017-08-15/netapp/models.go @@ -32,17 +32,17 @@ const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/netapp/mgmt/201 type ServiceLevel string const ( - // Extreme Extreme service level - Extreme ServiceLevel = "Extreme" // Premium Premium service level Premium ServiceLevel = "Premium" // Standard Standard service level Standard ServiceLevel = "Standard" + // Ultra Ultra service level + Ultra ServiceLevel = "Ultra" ) // PossibleServiceLevelValues returns an array of possible values for the ServiceLevel const type. func PossibleServiceLevelValues() []ServiceLevel { - return []ServiceLevel{Extreme, Premium, Standard} + return []ServiceLevel{Premium, Standard, Ultra} } // Account netApp account resource @@ -164,14 +164,119 @@ type AccountList struct { // AccountPatch netApp account patch resource type AccountPatch struct { + // Location - Resource location + Location *string `json:"location,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` + // Name - Resource name + Name *string `json:"name,omitempty"` + // Type - Resource type + Type *string `json:"type,omitempty"` // Tags - Resource tags Tags interface{} `json:"tags,omitempty"` + // AccountProperties - NetApp Account properties + *AccountProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for AccountPatch. +func (ap AccountPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ap.Location != nil { + objectMap["location"] = ap.Location + } + if ap.ID != nil { + objectMap["id"] = ap.ID + } + if ap.Name != nil { + objectMap["name"] = ap.Name + } + if ap.Type != nil { + objectMap["type"] = ap.Type + } + if ap.Tags != nil { + objectMap["tags"] = ap.Tags + } + if ap.AccountProperties != nil { + objectMap["properties"] = ap.AccountProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AccountPatch struct. +func (ap *AccountPatch) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ap.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ap.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ap.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ap.Type = &typeVar + } + case "tags": + if v != nil { + var tags interface{} + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ap.Tags = tags + } + case "properties": + if v != nil { + var accountProperties AccountProperties + err = json.Unmarshal(*v, &accountProperties) + if err != nil { + return err + } + ap.AccountProperties = &accountProperties + } + } + } + + return nil } // AccountProperties netApp account properties type AccountProperties struct { // ProvisioningState - Azure lifecycle management ProvisioningState *string `json:"provisioningState,omitempty"` + // ActiveDirectories - Active Directories + ActiveDirectories *ActiveDirectories `json:"activeDirectories,omitempty"` } // AccountsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running @@ -226,6 +331,26 @@ func (future *AccountsDeleteFuture) Result(client AccountsClient) (ar autorest.R return } +// ActiveDirectories active Directories +type ActiveDirectories struct { + // ActiveDirectoryID - Id of the Active Directory + ActiveDirectoryID *string `json:"activeDirectoryId,omitempty"` + // Username - Username of Active Directory domain administrator + Username *string `json:"username,omitempty"` + // Password - Plain text password of Active Directory domain administrator + Password *string `json:"password,omitempty"` + // Domain - Name of the Active Directory domain + Domain *string `json:"domain,omitempty"` + // DNS - Comma separated list of DNS server IP addresses for the Active Directory domain + DNS *string `json:"dNS,omitempty"` + // Status - Status of the Active Directory + Status *string `json:"status,omitempty"` + // SMBServerName - NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes + SMBServerName *string `json:"sMBServerName,omitempty"` + // OrganizationalUnit - The Organizational Unit (OU) within the Windows Active Directory + OrganizationalUnit *string `json:"organizationalUnit,omitempty"` +} + // CapacityPool capacity pool resource type CapacityPool struct { autorest.Response `json:"-"` @@ -345,8 +470,111 @@ type CapacityPoolList struct { // CapacityPoolPatch capacity pool patch resource type CapacityPoolPatch struct { + // Location - Resource location + Location *string `json:"location,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` + // Name - Resource name + Name *string `json:"name,omitempty"` + // Type - Resource type + Type *string `json:"type,omitempty"` // Tags - Resource tags Tags interface{} `json:"tags,omitempty"` + // PoolPatchProperties - Capacity pool properties + *PoolPatchProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for CapacityPoolPatch. +func (cpp CapacityPoolPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cpp.Location != nil { + objectMap["location"] = cpp.Location + } + if cpp.ID != nil { + objectMap["id"] = cpp.ID + } + if cpp.Name != nil { + objectMap["name"] = cpp.Name + } + if cpp.Type != nil { + objectMap["type"] = cpp.Type + } + if cpp.Tags != nil { + objectMap["tags"] = cpp.Tags + } + if cpp.PoolPatchProperties != nil { + objectMap["properties"] = cpp.PoolPatchProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CapacityPoolPatch struct. +func (cpp *CapacityPoolPatch) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cpp.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cpp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cpp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cpp.Type = &typeVar + } + case "tags": + if v != nil { + var tags interface{} + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cpp.Tags = tags + } + case "properties": + if v != nil { + var poolPatchProperties PoolPatchProperties + err = json.Unmarshal(*v, &poolPatchProperties) + if err != nil { + return err + } + cpp.PoolPatchProperties = &poolPatchProperties + } + } + } + + return nil } // Dimension dimension of blobs, possibly be blob type or access tier. @@ -365,6 +593,24 @@ type Error struct { Message *string `json:"message,omitempty"` } +// ExportPolicyRule volume Export Policy Rule +type ExportPolicyRule struct { + // RuleIndex - Order index + RuleIndex *int32 `json:"ruleIndex,omitempty"` + // UnixReadOnly - Read only access + UnixReadOnly *bool `json:"unixReadOnly,omitempty"` + // UnixReadWrite - Read and write access + UnixReadWrite *bool `json:"unixReadWrite,omitempty"` + // Cifs - Allows CIFS protocol + Cifs *bool `json:"cifs,omitempty"` + // Nfsv3 - Allows NFSv3 protocol + Nfsv3 *bool `json:"nfsv3,omitempty"` + // Nfsv4 - Allows NFSv4 protocol + Nfsv4 *bool `json:"nfsv4,omitempty"` + // AllowedClients - Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names + AllowedClients *string `json:"allowedClients,omitempty"` +} + // MetricSpecification metric specification of operation. type MetricSpecification struct { // Name - Name of metric specification. @@ -497,8 +743,8 @@ type MountTargetProperties struct { FileSystemID *string `json:"fileSystemId,omitempty"` // IPAddress - The mount target's IPv4 address IPAddress *string `json:"ipAddress,omitempty"` - // VlanID - Vlan Id - VlanID *int32 `json:"vlanId,omitempty"` + // Subnet - The subnet + Subnet *string `json:"subnet,omitempty"` // StartIP - The start of IPv4 address range to use when creating a new mount target StartIP *string `json:"startIp,omitempty"` // EndIP - The end of IPv4 address range to use when creating a new mount target @@ -507,6 +753,8 @@ type MountTargetProperties struct { Gateway *string `json:"gateway,omitempty"` // Netmask - The netmask of the IPv4 address range to use when creating a new mount target Netmask *string `json:"netmask,omitempty"` + // SmbServerFqdn - The SMB server's Fully Qualified Domain Name, FQDN + SmbServerFqdn *string `json:"smbServerFqdn,omitempty"` // ProvisioningState - Azure lifecycle management ProvisioningState *string `json:"provisioningState,omitempty"` } @@ -618,13 +866,21 @@ type OperationProperties struct { ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` } +// PoolPatchProperties patchable pool properties +type PoolPatchProperties struct { + // Size - Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104). + Size *int64 `json:"size,omitempty"` + // ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra' + ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"` +} + // PoolProperties pool properties type PoolProperties struct { // PoolID - UUID v4 used to identify the Pool PoolID *string `json:"poolId,omitempty"` // Size - Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104). Size *int64 `json:"size,omitempty"` - // ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Extreme' + // ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra' ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"` // ProvisioningState - Azure lifecycle management ProvisioningState *string `json:"provisioningState,omitempty"` @@ -1102,10 +1358,12 @@ func (vp *VolumePatch) UnmarshalJSON(body []byte) error { // VolumePatchProperties patchable volume properties type VolumePatchProperties struct { - // ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Extreme' + // ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra' ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"` // UsageThreshold - Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. UsageThreshold *int64 `json:"usageThreshold,omitempty"` + // ExportPolicy - Export policy rule + ExportPolicy *ExportPolicyRule `json:"exportPolicy,omitempty"` } // VolumeProperties volume properties @@ -1114,10 +1372,12 @@ type VolumeProperties struct { FileSystemID *string `json:"fileSystemId,omitempty"` // CreationToken - A unique file path for the volume. Used when creating mount targets CreationToken *string `json:"creationToken,omitempty"` - // ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Extreme' + // ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra' ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"` // UsageThreshold - Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. UsageThreshold *int64 `json:"usageThreshold,omitempty"` + // ExportPolicy - Export policy rule + ExportPolicy *ExportPolicyRule `json:"exportPolicy,omitempty"` // ProvisioningState - Azure lifecycle management ProvisioningState *string `json:"provisioningState,omitempty"` // SubnetID - The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes