From 84b5aad9506b0ef19d22ff1cea9ca847ac6b3596 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 24 Jul 2018 19:03:13 +0000 Subject: [PATCH 1/2] Generated from 8dfedc91e10fb96edb9aff8158500e9d369ab36a [Cognitive Services] Update endpoint URL template for LUIS. --- .../cognitiveservices/luis/runtime/models.go | 19 +- .../luis/authoring/models.go | 69 +- .../cognitiveservices/luis/runtime/models.go | 19 +- .../v2.0/luis/authoring/apps.go | 129 +++- .../v2.0/luis/authoring/client.go | 19 +- .../v2.0/luis/authoring/examples.go | 33 +- .../v2.0/luis/authoring/features.go | 45 +- .../v2.0/luis/authoring/model.go | 645 +++++++++++++++--- .../v2.0/luis/authoring/pattern.go | 57 +- .../v2.0/luis/authoring/permissions.go | 33 +- .../v2.0/luis/authoring/train.go | 21 +- .../v2.0/luis/authoring/versions.go | 57 +- .../v2.0/luis/runtime/client.go | 19 +- .../v2.0/luis/runtime/prediction.go | 15 +- 14 files changed, 859 insertions(+), 321 deletions(-) diff --git a/profiles/latest/cognitiveservices/luis/runtime/models.go b/profiles/latest/cognitiveservices/luis/runtime/models.go index 34a66a34301c..b75896518791 100644 --- a/profiles/latest/cognitiveservices/luis/runtime/models.go +++ b/profiles/latest/cognitiveservices/luis/runtime/models.go @@ -21,10 +21,6 @@ package runtime import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/runtime" -const ( - DefaultBaseURI = original.DefaultBaseURI -) - type BaseClient = original.BaseClient type APIError = original.APIError type CompositeChildModel = original.CompositeChildModel @@ -37,17 +33,14 @@ type LuisResult = original.LuisResult type Sentiment = original.Sentiment type PredictionClient = original.PredictionClient -func New() BaseClient { - return original.New() -} -func NewWithBaseURI(baseURI string) BaseClient { - return original.NewWithBaseURI(baseURI) +func New(endpoint string) BaseClient { + return original.New(endpoint) } -func NewPredictionClient() PredictionClient { - return original.NewPredictionClient() +func NewWithoutDefaults(endpoint string) BaseClient { + return original.NewWithoutDefaults(endpoint) } -func NewPredictionClientWithBaseURI(baseURI string) PredictionClient { - return original.NewPredictionClientWithBaseURI(baseURI) +func NewPredictionClient(endpoint string) PredictionClient { + return original.NewPredictionClient(endpoint) } func UserAgent() string { return original.UserAgent() + " profiles/latest" diff --git a/profiles/preview/cognitiveservices/luis/authoring/models.go b/profiles/preview/cognitiveservices/luis/authoring/models.go index 8b408f2f9902..79264d9fa522 100644 --- a/profiles/preview/cognitiveservices/luis/authoring/models.go +++ b/profiles/preview/cognitiveservices/luis/authoring/models.go @@ -22,11 +22,6 @@ package authoring import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring" type AppsClient = original.AppsClient - -const ( - DefaultBaseURI = original.DefaultBaseURI -) - type BaseClient = original.BaseClient type ExamplesClient = original.ExamplesClient type FeaturesClient = original.FeaturesClient @@ -359,35 +354,23 @@ type PermissionsClient = original.PermissionsClient type TrainClient = original.TrainClient type VersionsClient = original.VersionsClient -func NewAppsClient() AppsClient { - return original.NewAppsClient() -} -func NewAppsClientWithBaseURI(baseURI string) AppsClient { - return original.NewAppsClientWithBaseURI(baseURI) -} -func New() BaseClient { - return original.New() +func NewAppsClient(endpoint string) AppsClient { + return original.NewAppsClient(endpoint) } -func NewWithBaseURI(baseURI string) BaseClient { - return original.NewWithBaseURI(baseURI) +func New(endpoint string) BaseClient { + return original.New(endpoint) } -func NewExamplesClient() ExamplesClient { - return original.NewExamplesClient() +func NewWithoutDefaults(endpoint string) BaseClient { + return original.NewWithoutDefaults(endpoint) } -func NewExamplesClientWithBaseURI(baseURI string) ExamplesClient { - return original.NewExamplesClientWithBaseURI(baseURI) +func NewExamplesClient(endpoint string) ExamplesClient { + return original.NewExamplesClient(endpoint) } -func NewFeaturesClient() FeaturesClient { - return original.NewFeaturesClient() +func NewFeaturesClient(endpoint string) FeaturesClient { + return original.NewFeaturesClient(endpoint) } -func NewFeaturesClientWithBaseURI(baseURI string) FeaturesClient { - return original.NewFeaturesClientWithBaseURI(baseURI) -} -func NewModelClient() ModelClient { - return original.NewModelClient() -} -func NewModelClientWithBaseURI(baseURI string) ModelClient { - return original.NewModelClientWithBaseURI(baseURI) +func NewModelClient(endpoint string) ModelClient { + return original.NewModelClient(endpoint) } func PossibleOperationStatusTypeValues() []OperationStatusType { return original.PossibleOperationStatusTypeValues() @@ -434,23 +417,14 @@ func PossibleStatus1Values() []Status1 { func PossibleTrainingStatusValues() []TrainingStatus { return original.PossibleTrainingStatusValues() } -func NewPatternClient() PatternClient { - return original.NewPatternClient() -} -func NewPatternClientWithBaseURI(baseURI string) PatternClient { - return original.NewPatternClientWithBaseURI(baseURI) +func NewPatternClient(endpoint string) PatternClient { + return original.NewPatternClient(endpoint) } -func NewPermissionsClient() PermissionsClient { - return original.NewPermissionsClient() +func NewPermissionsClient(endpoint string) PermissionsClient { + return original.NewPermissionsClient(endpoint) } -func NewPermissionsClientWithBaseURI(baseURI string) PermissionsClient { - return original.NewPermissionsClientWithBaseURI(baseURI) -} -func NewTrainClient() TrainClient { - return original.NewTrainClient() -} -func NewTrainClientWithBaseURI(baseURI string) TrainClient { - return original.NewTrainClientWithBaseURI(baseURI) +func NewTrainClient(endpoint string) TrainClient { + return original.NewTrainClient(endpoint) } func UserAgent() string { return original.UserAgent() + " profiles/preview" @@ -458,9 +432,6 @@ func UserAgent() string { func Version() string { return original.Version() } -func NewVersionsClient() VersionsClient { - return original.NewVersionsClient() -} -func NewVersionsClientWithBaseURI(baseURI string) VersionsClient { - return original.NewVersionsClientWithBaseURI(baseURI) +func NewVersionsClient(endpoint string) VersionsClient { + return original.NewVersionsClient(endpoint) } diff --git a/profiles/preview/cognitiveservices/luis/runtime/models.go b/profiles/preview/cognitiveservices/luis/runtime/models.go index cc82d1ff52a0..5be80b7fca27 100644 --- a/profiles/preview/cognitiveservices/luis/runtime/models.go +++ b/profiles/preview/cognitiveservices/luis/runtime/models.go @@ -21,10 +21,6 @@ package runtime import original "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/runtime" -const ( - DefaultBaseURI = original.DefaultBaseURI -) - type BaseClient = original.BaseClient type APIError = original.APIError type CompositeChildModel = original.CompositeChildModel @@ -37,17 +33,14 @@ type LuisResult = original.LuisResult type Sentiment = original.Sentiment type PredictionClient = original.PredictionClient -func New() BaseClient { - return original.New() -} -func NewWithBaseURI(baseURI string) BaseClient { - return original.NewWithBaseURI(baseURI) +func New(endpoint string) BaseClient { + return original.New(endpoint) } -func NewPredictionClient() PredictionClient { - return original.NewPredictionClient() +func NewWithoutDefaults(endpoint string) BaseClient { + return original.NewWithoutDefaults(endpoint) } -func NewPredictionClientWithBaseURI(baseURI string) PredictionClient { - return original.NewPredictionClientWithBaseURI(baseURI) +func NewPredictionClient(endpoint string) PredictionClient { + return original.NewPredictionClient(endpoint) } func UserAgent() string { return original.UserAgent() + " profiles/preview" diff --git a/services/cognitiveservices/v2.0/luis/authoring/apps.go b/services/cognitiveservices/v2.0/luis/authoring/apps.go index a107adaaa064..dd4811aecef6 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/apps.go +++ b/services/cognitiveservices/v2.0/luis/authoring/apps.go @@ -32,13 +32,8 @@ type AppsClient struct { } // NewAppsClient creates an instance of the AppsClient client. -func NewAppsClient() AppsClient { - return NewAppsClientWithBaseURI(DefaultBaseURI) -} - -// NewAppsClientWithBaseURI creates an instance of the AppsClient client. -func NewAppsClientWithBaseURI(baseURI string) AppsClient { - return AppsClient{NewWithBaseURI(baseURI)} +func NewAppsClient(endpoint string) AppsClient { + return AppsClient{New(endpoint)} } // Add creates a new LUIS app. @@ -77,10 +72,14 @@ 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/"), autorest.WithJSON(applicationCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -133,10 +132,14 @@ 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/customprebuiltdomains"), autorest.WithJSON(prebuiltDomainCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -189,13 +192,17 @@ func (client AppsClient) Delete(ctx context.Context, appID uuid.UUID) (result Op // DeletePreparer prepares the Delete request. func (client AppsClient) DeletePreparer(ctx context.Context, appID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -247,13 +254,17 @@ 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/querylogs", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -304,13 +315,17 @@ 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -362,13 +377,17 @@ 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/publishsettings", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -420,13 +439,17 @@ 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/settings", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -480,6 +503,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + queryParameters := map[string]interface{}{} if len(appName) > 0 { queryParameters["appName"] = autorest.Encode("query", appName) @@ -488,7 +515,7 @@ func (client AppsClient) ImportPreparer(ctx context.Context, luisApp LuisApp, ap preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/import"), autorest.WithJSON(luisApp), autorest.WithQueryParameters(queryParameters)) @@ -555,6 +582,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + queryParameters := map[string]interface{}{} if skip != nil { queryParameters["skip"] = autorest.Encode("query", *skip) @@ -569,7 +600,7 @@ func (client AppsClient) ListPreparer(ctx context.Context, skip *int32, take *in preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/"), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -620,9 +651,13 @@ func (client AppsClient) ListAvailableCustomPrebuiltDomains(ctx context.Context) // ListAvailableCustomPrebuiltDomainsPreparer prepares the ListAvailableCustomPrebuiltDomains request. func (client AppsClient) ListAvailableCustomPrebuiltDomainsPreparer(ctx context.Context) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/customprebuiltdomains")) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -674,13 +709,17 @@ func (client AppsClient) ListAvailableCustomPrebuiltDomainsForCulture(ctx contex // ListAvailableCustomPrebuiltDomainsForCulturePreparer prepares the ListAvailableCustomPrebuiltDomainsForCulture request. func (client AppsClient) ListAvailableCustomPrebuiltDomainsForCulturePreparer(ctx context.Context, culture string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "culture": autorest.Encode("path", culture), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/customprebuiltdomains/{culture}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -730,9 +769,13 @@ func (client AppsClient) ListCortanaEndpoints(ctx context.Context) (result Perso // ListCortanaEndpointsPreparer prepares the ListCortanaEndpoints request. func (client AppsClient) ListCortanaEndpointsPreparer(ctx context.Context) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/assistants")) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -782,9 +825,13 @@ 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/domains")) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -836,13 +883,17 @@ 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/endpoints", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -892,9 +943,13 @@ func (client AppsClient) ListSupportedCultures(ctx context.Context) (result List // ListSupportedCulturesPreparer prepares the ListSupportedCultures request. func (client AppsClient) ListSupportedCulturesPreparer(ctx context.Context) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/cultures")) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -944,9 +999,13 @@ func (client AppsClient) ListUsageScenarios(ctx context.Context) (result ListStr // ListUsageScenariosPreparer prepares the ListUsageScenarios request. func (client AppsClient) ListUsageScenariosPreparer(ctx context.Context) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPath("/apps/usagescenarios")) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1000,6 +1059,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } @@ -1007,7 +1070,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.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/publish", pathParameters), autorest.WithJSON(applicationPublishObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1061,6 +1124,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } @@ -1068,7 +1135,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.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}", pathParameters), autorest.WithJSON(applicationUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1122,6 +1189,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } @@ -1129,7 +1200,7 @@ func (client AppsClient) UpdatePublishSettingsPreparer(ctx context.Context, appI preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/publishsettings", pathParameters), autorest.WithJSON(publishSettingUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1183,6 +1254,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } @@ -1190,7 +1265,7 @@ func (client AppsClient) UpdateSettingsPreparer(ctx context.Context, appID uuid. preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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/client.go b/services/cognitiveservices/v2.0/luis/authoring/client.go index 241729bb0d76..58feb2308a04 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/client.go +++ b/services/cognitiveservices/v2.0/luis/authoring/client.go @@ -24,26 +24,21 @@ import ( "github.com/Azure/go-autorest/autorest" ) -const ( - // DefaultBaseURI is the default URI used for the service Authoring - DefaultBaseURI = "https://api.cognitive.microsoft.com/luis/api/v2.0" -) - // BaseClient is the base client for Authoring. type BaseClient struct { autorest.Client - BaseURI string + Endpoint string } // New creates an instance of the BaseClient client. -func New() BaseClient { - return NewWithBaseURI(DefaultBaseURI) +func New(endpoint string) BaseClient { + return NewWithoutDefaults(endpoint) } -// NewWithBaseURI creates an instance of the BaseClient client. -func NewWithBaseURI(baseURI string) BaseClient { +// NewWithoutDefaults creates an instance of the BaseClient client. +func NewWithoutDefaults(endpoint string) BaseClient { return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, + Client: autorest.NewClientWithUserAgent(UserAgent()), + Endpoint: endpoint, } } diff --git a/services/cognitiveservices/v2.0/luis/authoring/examples.go b/services/cognitiveservices/v2.0/luis/authoring/examples.go index 67aada26b7b4..78c13d96130e 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/examples.go +++ b/services/cognitiveservices/v2.0/luis/authoring/examples.go @@ -32,13 +32,8 @@ type ExamplesClient struct { } // NewExamplesClient creates an instance of the ExamplesClient client. -func NewExamplesClient() ExamplesClient { - return NewExamplesClientWithBaseURI(DefaultBaseURI) -} - -// NewExamplesClientWithBaseURI creates an instance of the ExamplesClient client. -func NewExamplesClientWithBaseURI(baseURI string) ExamplesClient { - return ExamplesClient{NewWithBaseURI(baseURI)} +func NewExamplesClient(endpoint string) ExamplesClient { + return ExamplesClient{New(endpoint)} } // Add adds a labeled example to the application. @@ -70,6 +65,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -78,7 +77,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.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/example", pathParameters), autorest.WithJSON(exampleLabelObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -139,6 +138,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -147,7 +150,7 @@ func (client ExamplesClient) BatchPreparer(ctx context.Context, appID uuid.UUID, preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/examples", pathParameters), autorest.WithJSON(exampleLabelObjectArray)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -202,6 +205,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "exampleId": autorest.Encode("path", exampleID), @@ -210,7 +217,7 @@ func (client ExamplesClient) DeletePreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/examples/{exampleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -277,6 +284,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -296,7 +307,7 @@ func (client ExamplesClient) ListPreparer(ctx context.Context, appID uuid.UUID, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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 a919d84b2550..e405445db1f1 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/features.go +++ b/services/cognitiveservices/v2.0/luis/authoring/features.go @@ -32,13 +32,8 @@ type FeaturesClient struct { } // NewFeaturesClient creates an instance of the FeaturesClient client. -func NewFeaturesClient() FeaturesClient { - return NewFeaturesClientWithBaseURI(DefaultBaseURI) -} - -// NewFeaturesClientWithBaseURI creates an instance of the FeaturesClient client. -func NewFeaturesClientWithBaseURI(baseURI string) FeaturesClient { - return FeaturesClient{NewWithBaseURI(baseURI)} +func NewFeaturesClient(endpoint string) FeaturesClient { + return FeaturesClient{New(endpoint)} } // AddPhraseList creates a new phraselist feature. @@ -71,6 +66,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -79,7 +78,7 @@ func (client FeaturesClient) AddPhraseListPreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists", pathParameters), autorest.WithJSON(phraselistCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -134,6 +133,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "phraselistId": autorest.Encode("path", phraselistID), @@ -142,7 +145,7 @@ func (client FeaturesClient) DeletePhraseListPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists/{phraselistId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -196,6 +199,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "phraselistId": autorest.Encode("path", phraselistID), @@ -204,7 +211,7 @@ func (client FeaturesClient) GetPhraseListPreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists/{phraselistId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -271,6 +278,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -290,7 +301,7 @@ func (client FeaturesClient) ListPreparer(ctx context.Context, appID uuid.UUID, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/features", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -358,6 +369,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -377,7 +392,7 @@ func (client FeaturesClient) ListPhraseListsPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/phraselists", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -434,6 +449,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "phraselistId": autorest.Encode("path", phraselistID), @@ -443,7 +462,7 @@ func (client FeaturesClient) UpdatePhraseListPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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 cfc3b7c7a3a5..c2c25a3d40a7 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/model.go +++ b/services/cognitiveservices/v2.0/luis/authoring/model.go @@ -32,13 +32,8 @@ type ModelClient struct { } // NewModelClient creates an instance of the ModelClient client. -func NewModelClient() ModelClient { - return NewModelClientWithBaseURI(DefaultBaseURI) -} - -// NewModelClientWithBaseURI creates an instance of the ModelClient client. -func NewModelClientWithBaseURI(baseURI string) ModelClient { - return ModelClient{NewWithBaseURI(baseURI)} +func NewModelClient(endpoint string) ModelClient { + return ModelClient{New(endpoint)} } // AddClosedList adds a closed list model to the application. @@ -71,6 +66,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -79,7 +78,7 @@ func (client ModelClient) AddClosedListPreparer(ctx context.Context, appID uuid. preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists", pathParameters), autorest.WithJSON(closedListModelCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -134,6 +133,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -142,7 +145,7 @@ func (client ModelClient) AddCompositeEntityPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities", pathParameters), autorest.WithJSON(compositeModelCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -198,6 +201,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "cEntityId": autorest.Encode("path", cEntityID), @@ -207,7 +214,7 @@ func (client ModelClient) AddCompositeEntityChildPreparer(ctx context.Context, a preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -262,6 +269,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -270,7 +281,7 @@ func (client ModelClient) AddCustomPrebuiltDomainPreparer(ctx context.Context, a preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltdomains", pathParameters), autorest.WithJSON(prebuiltDomainObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -326,6 +337,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -334,7 +349,7 @@ func (client ModelClient) AddCustomPrebuiltEntityPreparer(ctx context.Context, a preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities", pathParameters), autorest.WithJSON(prebuiltDomainModelCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -390,6 +405,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -398,7 +417,7 @@ func (client ModelClient) AddCustomPrebuiltIntentPreparer(ctx context.Context, a preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltintents", pathParameters), autorest.WithJSON(prebuiltDomainModelCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -453,6 +472,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -461,7 +484,7 @@ func (client ModelClient) AddEntityPreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities", pathParameters), autorest.WithJSON(modelCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -517,6 +540,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -526,7 +553,7 @@ func (client ModelClient) AddExplicitListItemPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -581,6 +608,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -589,7 +620,7 @@ func (client ModelClient) AddHierarchicalEntityPreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities", pathParameters), autorest.WithJSON(hierarchicalModelCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -645,6 +676,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "hEntityId": autorest.Encode("path", hEntityID), @@ -654,7 +689,7 @@ func (client ModelClient) AddHierarchicalEntityChildPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -709,6 +744,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -717,7 +756,7 @@ func (client ModelClient) AddIntentPreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents", pathParameters), autorest.WithJSON(intentCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -778,6 +817,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -786,7 +829,7 @@ func (client ModelClient) AddPrebuiltPreparer(ctx context.Context, appID uuid.UU preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts", pathParameters), autorest.WithJSON(prebuiltExtractorNames)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -842,6 +885,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "clEntityId": autorest.Encode("path", clEntityID), @@ -851,7 +898,7 @@ func (client ModelClient) AddSubListPreparer(ctx context.Context, appID uuid.UUI preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -907,6 +954,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -916,7 +967,7 @@ func (client ModelClient) CreateClosedListEntityRolePreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -972,6 +1023,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "cEntityId": autorest.Encode("path", cEntityID), @@ -981,7 +1036,7 @@ func (client ModelClient) CreateCompositeEntityRolePreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -1037,6 +1092,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -1046,7 +1105,7 @@ func (client ModelClient) CreateCustomPrebuiltEntityRolePreparer(ctx context.Con preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -1102,6 +1161,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -1111,7 +1174,7 @@ func (client ModelClient) CreateEntityRolePreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -1167,6 +1230,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "hEntityId": autorest.Encode("path", hEntityID), @@ -1176,7 +1243,7 @@ func (client ModelClient) CreateHierarchicalEntityRolePreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -1232,6 +1299,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -1240,7 +1311,7 @@ func (client ModelClient) CreatePatternAnyEntityModelPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities", pathParameters), autorest.WithJSON(extractorCreateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1296,6 +1367,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -1305,7 +1380,7 @@ func (client ModelClient) CreatePatternAnyEntityRolePreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -1361,6 +1436,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -1370,7 +1449,7 @@ func (client ModelClient) CreatePrebuiltEntityRolePreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -1426,6 +1505,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -1434,7 +1517,7 @@ func (client ModelClient) CreateRegexEntityModelPreparer(ctx context.Context, ap preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities", pathParameters), autorest.WithJSON(regexEntityExtractorCreateObj)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -1490,6 +1573,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -1499,7 +1586,7 @@ func (client ModelClient) CreateRegexEntityRolePreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -1554,6 +1641,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "clEntityId": autorest.Encode("path", clEntityID), @@ -1562,7 +1653,7 @@ func (client ModelClient) DeleteClosedListPreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1617,6 +1708,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -1626,7 +1721,7 @@ func (client ModelClient) DeleteClosedListEntityRolePreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1680,6 +1775,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "cEntityId": autorest.Encode("path", cEntityID), @@ -1688,7 +1787,7 @@ func (client ModelClient) DeleteCompositeEntityPreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1743,6 +1842,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "cChildId": autorest.Encode("path", cChildID), @@ -1752,7 +1855,7 @@ func (client ModelClient) DeleteCompositeEntityChildPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children/{cChildId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1807,6 +1910,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "cEntityId": autorest.Encode("path", cEntityID), @@ -1816,7 +1923,7 @@ func (client ModelClient) DeleteCompositeEntityRolePreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1871,6 +1978,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -1880,7 +1991,7 @@ func (client ModelClient) DeleteCustomEntityRolePreparer(ctx context.Context, ap preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1934,6 +2045,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "domainName": autorest.Encode("path", domainName), @@ -1942,7 +2057,7 @@ func (client ModelClient) DeleteCustomPrebuiltDomainPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltdomains/{domainName}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1996,6 +2111,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -2004,7 +2123,7 @@ func (client ModelClient) DeleteEntityPreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2059,6 +2178,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -2068,7 +2191,7 @@ func (client ModelClient) DeleteEntityRolePreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2123,6 +2246,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -2132,7 +2259,7 @@ func (client ModelClient) DeleteExplicitListItemPreparer(ctx context.Context, ap preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2186,6 +2313,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "hEntityId": autorest.Encode("path", hEntityID), @@ -2194,7 +2325,7 @@ func (client ModelClient) DeleteHierarchicalEntityPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2249,6 +2380,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "hChildId": autorest.Encode("path", hChildID), @@ -2258,7 +2393,7 @@ func (client ModelClient) DeleteHierarchicalEntityChildPreparer(ctx context.Cont preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2313,6 +2448,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "hEntityId": autorest.Encode("path", hEntityID), @@ -2322,7 +2461,7 @@ func (client ModelClient) DeleteHierarchicalEntityRolePreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2378,6 +2517,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "intentId": autorest.Encode("path", intentID), @@ -2393,7 +2536,7 @@ func (client ModelClient) DeleteIntentPreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -2448,6 +2591,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -2456,7 +2603,7 @@ func (client ModelClient) DeletePatternAnyEntityModelPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2511,6 +2658,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -2520,7 +2671,7 @@ func (client ModelClient) DeletePatternAnyEntityRolePreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2574,6 +2725,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "prebuiltId": autorest.Encode("path", prebuiltID), @@ -2582,7 +2737,7 @@ func (client ModelClient) DeletePrebuiltPreparer(ctx context.Context, appID uuid preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2637,6 +2792,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -2646,7 +2805,7 @@ func (client ModelClient) DeletePrebuiltEntityRolePreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2700,6 +2859,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "regexEntityId": autorest.Encode("path", regexEntityID), @@ -2708,7 +2871,7 @@ func (client ModelClient) DeleteRegexEntityModelPreparer(ctx context.Context, ap preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2763,6 +2926,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -2772,7 +2939,7 @@ func (client ModelClient) DeleteRegexEntityRolePreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2827,6 +2994,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "clEntityId": autorest.Encode("path", clEntityID), @@ -2836,7 +3007,7 @@ func (client ModelClient) DeleteSubListPreparer(ctx context.Context, appID uuid. preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2904,6 +3075,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "modelId": autorest.Encode("path", modelID), @@ -2924,7 +3099,7 @@ func (client ModelClient) ExamplesMethodPreparer(ctx context.Context, appID uuid preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -2979,6 +3154,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "clEntityId": autorest.Encode("path", clEntityID), @@ -2987,7 +3166,7 @@ func (client ModelClient) GetClosedListPreparer(ctx context.Context, appID uuid. preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3042,6 +3221,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -3051,7 +3234,7 @@ func (client ModelClient) GetClosedListEntityRolePreparer(ctx context.Context, a preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3105,6 +3288,10 @@ func (client ModelClient) GetClosedListEntityRoles(ctx context.Context, appID uu // GetClosedListEntityRolesPreparer prepares the GetClosedListEntityRoles request. func (client ModelClient) GetClosedListEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -3113,7 +3300,7 @@ func (client ModelClient) GetClosedListEntityRolesPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3167,6 +3354,10 @@ func (client ModelClient) GetCompositeEntity(ctx context.Context, appID uuid.UUI // GetCompositeEntityPreparer prepares the GetCompositeEntity request. func (client ModelClient) GetCompositeEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "cEntityId": autorest.Encode("path", cEntityID), @@ -3175,7 +3366,7 @@ func (client ModelClient) GetCompositeEntityPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3230,6 +3421,10 @@ func (client ModelClient) GetCompositeEntityRole(ctx context.Context, appID uuid // 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "cEntityId": autorest.Encode("path", cEntityID), @@ -3239,7 +3434,7 @@ func (client ModelClient) GetCompositeEntityRolePreparer(ctx context.Context, ap preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3293,6 +3488,10 @@ func (client ModelClient) GetCompositeEntityRoles(ctx context.Context, appID uui // GetCompositeEntityRolesPreparer prepares the GetCompositeEntityRoles request. func (client ModelClient) GetCompositeEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "cEntityId": autorest.Encode("path", cEntityID), @@ -3301,7 +3500,7 @@ func (client ModelClient) GetCompositeEntityRolesPreparer(ctx context.Context, a preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3356,6 +3555,10 @@ func (client ModelClient) GetCustomEntityRole(ctx context.Context, appID uuid.UU // 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -3365,7 +3568,7 @@ func (client ModelClient) GetCustomEntityRolePreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3419,6 +3622,10 @@ func (client ModelClient) GetCustomPrebuiltEntityRoles(ctx context.Context, appI // GetCustomPrebuiltEntityRolesPreparer prepares the GetCustomPrebuiltEntityRoles request. func (client ModelClient) GetCustomPrebuiltEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -3427,7 +3634,7 @@ func (client ModelClient) GetCustomPrebuiltEntityRolesPreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3481,6 +3688,10 @@ func (client ModelClient) GetEntity(ctx context.Context, appID uuid.UUID, versio // GetEntityPreparer prepares the GetEntity request. func (client ModelClient) GetEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -3489,7 +3700,7 @@ func (client ModelClient) GetEntityPreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3544,6 +3755,10 @@ func (client ModelClient) GetEntityRole(ctx context.Context, appID uuid.UUID, ve // 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -3553,7 +3768,7 @@ func (client ModelClient) GetEntityRolePreparer(ctx context.Context, appID uuid. preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3607,6 +3822,10 @@ func (client ModelClient) GetEntityRoles(ctx context.Context, appID uuid.UUID, v // GetEntityRolesPreparer prepares the GetEntityRoles request. func (client ModelClient) GetEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -3615,7 +3834,7 @@ func (client ModelClient) GetEntityRolesPreparer(ctx context.Context, appID uuid preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3679,6 +3898,10 @@ func (client ModelClient) GetEntitySuggestions(ctx context.Context, appID uuid.U // 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -3694,7 +3917,7 @@ func (client ModelClient) GetEntitySuggestionsPreparer(ctx context.Context, appI preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -3749,6 +3972,10 @@ func (client ModelClient) GetExplicitList(ctx context.Context, appID uuid.UUID, // GetExplicitListPreparer prepares the GetExplicitList request. func (client ModelClient) GetExplicitListPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -3757,7 +3984,7 @@ func (client ModelClient) GetExplicitListPreparer(ctx context.Context, appID uui preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3812,6 +4039,10 @@ func (client ModelClient) GetExplicitListItem(ctx context.Context, appID uuid.UU // 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -3821,7 +4052,7 @@ func (client ModelClient) GetExplicitListItemPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3875,6 +4106,10 @@ func (client ModelClient) GetHierarchicalEntity(ctx context.Context, appID uuid. // GetHierarchicalEntityPreparer prepares the GetHierarchicalEntity request. func (client ModelClient) GetHierarchicalEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "hEntityId": autorest.Encode("path", hEntityID), @@ -3883,7 +4118,7 @@ func (client ModelClient) GetHierarchicalEntityPreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -3938,6 +4173,10 @@ func (client ModelClient) GetHierarchicalEntityChild(ctx context.Context, appID // 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "hChildId": autorest.Encode("path", hChildID), @@ -3947,7 +4186,7 @@ func (client ModelClient) GetHierarchicalEntityChildPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -4002,6 +4241,10 @@ func (client ModelClient) GetHierarchicalEntityRole(ctx context.Context, appID u // 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "hEntityId": autorest.Encode("path", hEntityID), @@ -4011,7 +4254,7 @@ func (client ModelClient) GetHierarchicalEntityRolePreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -4065,6 +4308,10 @@ func (client ModelClient) GetHierarchicalEntityRoles(ctx context.Context, appID // GetHierarchicalEntityRolesPreparer prepares the GetHierarchicalEntityRoles request. func (client ModelClient) GetHierarchicalEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "hEntityId": autorest.Encode("path", hEntityID), @@ -4073,7 +4320,7 @@ func (client ModelClient) GetHierarchicalEntityRolesPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -4127,6 +4374,10 @@ func (client ModelClient) GetIntent(ctx context.Context, appID uuid.UUID, versio // GetIntentPreparer prepares the GetIntent request. func (client ModelClient) GetIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "intentId": autorest.Encode("path", intentID), @@ -4135,7 +4386,7 @@ func (client ModelClient) GetIntentPreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -4199,6 +4450,10 @@ func (client ModelClient) GetIntentSuggestions(ctx context.Context, appID uuid.U // 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "intentId": autorest.Encode("path", intentID), @@ -4214,7 +4469,7 @@ func (client ModelClient) GetIntentSuggestionsPreparer(ctx context.Context, appI preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -4269,6 +4524,10 @@ func (client ModelClient) GetPatternAnyEntityInfo(ctx context.Context, appID uui // GetPatternAnyEntityInfoPreparer prepares the GetPatternAnyEntityInfo request. func (client ModelClient) GetPatternAnyEntityInfoPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -4277,7 +4536,7 @@ func (client ModelClient) GetPatternAnyEntityInfoPreparer(ctx context.Context, a preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -4344,6 +4603,10 @@ func (client ModelClient) GetPatternAnyEntityInfos(ctx context.Context, appID uu // GetPatternAnyEntityInfosPreparer prepares the GetPatternAnyEntityInfos request. func (client ModelClient) GetPatternAnyEntityInfosPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -4363,7 +4626,7 @@ func (client ModelClient) GetPatternAnyEntityInfosPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -4419,6 +4682,10 @@ func (client ModelClient) GetPatternAnyEntityRole(ctx context.Context, appID uui // 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -4428,7 +4695,7 @@ func (client ModelClient) GetPatternAnyEntityRolePreparer(ctx context.Context, a preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -4482,6 +4749,10 @@ func (client ModelClient) GetPatternAnyEntityRoles(ctx context.Context, appID uu // GetPatternAnyEntityRolesPreparer prepares the GetPatternAnyEntityRoles request. func (client ModelClient) GetPatternAnyEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -4490,7 +4761,7 @@ func (client ModelClient) GetPatternAnyEntityRolesPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -4544,6 +4815,10 @@ func (client ModelClient) GetPrebuilt(ctx context.Context, appID uuid.UUID, vers // 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), @@ -4552,7 +4827,7 @@ func (client ModelClient) GetPrebuiltPreparer(ctx context.Context, appID uuid.UU preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -4607,6 +4882,10 @@ func (client ModelClient) GetPrebuiltEntityRole(ctx context.Context, appID uuid. // 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -4616,7 +4895,7 @@ func (client ModelClient) GetPrebuiltEntityRolePreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -4670,6 +4949,10 @@ func (client ModelClient) GetPrebuiltEntityRoles(ctx context.Context, appID uuid // GetPrebuiltEntityRolesPreparer prepares the GetPrebuiltEntityRoles request. func (client ModelClient) GetPrebuiltEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -4678,7 +4961,7 @@ func (client ModelClient) GetPrebuiltEntityRolesPreparer(ctx context.Context, ap preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -4732,6 +5015,10 @@ func (client ModelClient) GetRegexEntityEntityInfo(ctx context.Context, appID uu // GetRegexEntityEntityInfoPreparer prepares the GetRegexEntityEntityInfo request. func (client ModelClient) GetRegexEntityEntityInfoPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "regexEntityId": autorest.Encode("path", regexEntityID), @@ -4740,7 +5027,7 @@ func (client ModelClient) GetRegexEntityEntityInfoPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -4807,6 +5094,10 @@ func (client ModelClient) GetRegexEntityInfos(ctx context.Context, appID uuid.UU // GetRegexEntityInfosPreparer prepares the GetRegexEntityInfos request. func (client ModelClient) GetRegexEntityInfosPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -4826,7 +5117,7 @@ func (client ModelClient) GetRegexEntityInfosPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -4882,6 +5173,10 @@ func (client ModelClient) GetRegexEntityRole(ctx context.Context, appID uuid.UUI // 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -4891,7 +5186,7 @@ func (client ModelClient) GetRegexEntityRolePreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -4945,6 +5240,10 @@ func (client ModelClient) GetRegexEntityRoles(ctx context.Context, appID uuid.UU // GetRegexEntityRolesPreparer prepares the GetRegexEntityRoles request. func (client ModelClient) GetRegexEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -4953,7 +5252,7 @@ func (client ModelClient) GetRegexEntityRolesPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -5020,6 +5319,10 @@ func (client ModelClient) ListClosedLists(ctx context.Context, appID uuid.UUID, // ListClosedListsPreparer prepares the ListClosedLists request. func (client ModelClient) ListClosedListsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -5039,7 +5342,7 @@ func (client ModelClient) ListClosedListsPreparer(ctx context.Context, appID uui preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -5107,6 +5410,10 @@ func (client ModelClient) ListCompositeEntities(ctx context.Context, appID uuid. // ListCompositeEntitiesPreparer prepares the ListCompositeEntities request. func (client ModelClient) ListCompositeEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -5126,7 +5433,7 @@ func (client ModelClient) ListCompositeEntitiesPreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -5180,6 +5487,10 @@ func (client ModelClient) ListCustomPrebuiltEntities(ctx context.Context, appID // ListCustomPrebuiltEntitiesPreparer prepares the ListCustomPrebuiltEntities request. func (client ModelClient) ListCustomPrebuiltEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -5187,7 +5498,7 @@ func (client ModelClient) ListCustomPrebuiltEntitiesPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -5240,6 +5551,10 @@ func (client ModelClient) ListCustomPrebuiltIntents(ctx context.Context, appID u // ListCustomPrebuiltIntentsPreparer prepares the ListCustomPrebuiltIntents request. func (client ModelClient) ListCustomPrebuiltIntentsPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -5247,7 +5562,7 @@ func (client ModelClient) ListCustomPrebuiltIntentsPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltintents", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -5300,6 +5615,10 @@ func (client ModelClient) ListCustomPrebuiltModels(ctx context.Context, appID uu // ListCustomPrebuiltModelsPreparer prepares the ListCustomPrebuiltModels request. func (client ModelClient) ListCustomPrebuiltModelsPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -5307,7 +5626,7 @@ func (client ModelClient) ListCustomPrebuiltModelsPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltmodels", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -5374,6 +5693,10 @@ func (client ModelClient) ListEntities(ctx context.Context, appID uuid.UUID, ver // ListEntitiesPreparer prepares the ListEntities request. func (client ModelClient) ListEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -5393,7 +5716,7 @@ func (client ModelClient) ListEntitiesPreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -5461,6 +5784,10 @@ func (client ModelClient) ListHierarchicalEntities(ctx context.Context, appID uu // ListHierarchicalEntitiesPreparer prepares the ListHierarchicalEntities request. func (client ModelClient) ListHierarchicalEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -5480,7 +5807,7 @@ func (client ModelClient) ListHierarchicalEntitiesPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -5548,6 +5875,10 @@ func (client ModelClient) ListIntents(ctx context.Context, appID uuid.UUID, vers // ListIntentsPreparer prepares the ListIntents request. func (client ModelClient) ListIntentsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -5567,7 +5898,7 @@ func (client ModelClient) ListIntentsPreparer(ctx context.Context, appID uuid.UU preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -5635,6 +5966,10 @@ func (client ModelClient) ListModels(ctx context.Context, appID uuid.UUID, versi // ListModelsPreparer prepares the ListModels request. func (client ModelClient) ListModelsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -5654,7 +5989,7 @@ func (client ModelClient) ListModelsPreparer(ctx context.Context, appID uuid.UUI preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/models", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -5708,6 +6043,10 @@ func (client ModelClient) ListPrebuiltEntities(ctx context.Context, appID uuid.U // ListPrebuiltEntitiesPreparer prepares the ListPrebuiltEntities request. func (client ModelClient) ListPrebuiltEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -5715,7 +6054,7 @@ func (client ModelClient) ListPrebuiltEntitiesPreparer(ctx context.Context, appI preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/listprebuilts", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -5782,6 +6121,10 @@ func (client ModelClient) ListPrebuilts(ctx context.Context, appID uuid.UUID, ve // ListPrebuiltsPreparer prepares the ListPrebuilts request. func (client ModelClient) ListPrebuiltsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -5801,7 +6144,7 @@ func (client ModelClient) ListPrebuiltsPreparer(ctx context.Context, appID uuid. preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -5857,6 +6200,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "clEntityId": autorest.Encode("path", clEntityID), @@ -5866,7 +6213,7 @@ func (client ModelClient) PatchClosedListPreparer(ctx context.Context, appID uui preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters), autorest.WithJSON(closedListModelPatchObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -5922,6 +6269,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "clEntityId": autorest.Encode("path", clEntityID), @@ -5931,7 +6282,7 @@ func (client ModelClient) UpdateClosedListPreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters), autorest.WithJSON(closedListModelUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -5988,6 +6339,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -5998,7 +6353,7 @@ func (client ModelClient) UpdateClosedListEntityRolePreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -6054,6 +6409,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "cEntityId": autorest.Encode("path", cEntityID), @@ -6063,7 +6422,7 @@ func (client ModelClient) UpdateCompositeEntityPreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters), autorest.WithJSON(compositeModelUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -6120,6 +6479,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "cEntityId": autorest.Encode("path", cEntityID), @@ -6130,7 +6493,7 @@ func (client ModelClient) UpdateCompositeEntityRolePreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -6187,6 +6550,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -6197,7 +6564,7 @@ func (client ModelClient) UpdateCustomPrebuiltEntityRolePreparer(ctx context.Con preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -6253,6 +6620,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -6262,7 +6633,7 @@ func (client ModelClient) UpdateEntityPreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters), autorest.WithJSON(modelUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -6319,6 +6690,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -6329,7 +6704,7 @@ func (client ModelClient) UpdateEntityRolePreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -6386,6 +6761,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -6396,7 +6775,7 @@ func (client ModelClient) UpdateExplicitListItemPreparer(ctx context.Context, ap preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -6452,6 +6831,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "hEntityId": autorest.Encode("path", hEntityID), @@ -6461,7 +6844,7 @@ func (client ModelClient) UpdateHierarchicalEntityPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters), autorest.WithJSON(hierarchicalModelUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -6518,6 +6901,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "hChildId": autorest.Encode("path", hChildID), @@ -6528,7 +6915,7 @@ func (client ModelClient) UpdateHierarchicalEntityChildPreparer(ctx context.Cont preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -6585,6 +6972,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "hEntityId": autorest.Encode("path", hEntityID), @@ -6595,7 +6986,7 @@ func (client ModelClient) UpdateHierarchicalEntityRolePreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -6651,6 +7042,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "intentId": autorest.Encode("path", intentID), @@ -6660,7 +7055,7 @@ func (client ModelClient) UpdateIntentPreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters), autorest.WithJSON(modelUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -6716,6 +7111,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -6725,7 +7124,7 @@ func (client ModelClient) UpdatePatternAnyEntityModelPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters), autorest.WithJSON(patternAnyUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -6782,6 +7181,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -6792,7 +7195,7 @@ func (client ModelClient) UpdatePatternAnyEntityRolePreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -6849,6 +7252,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -6859,7 +7266,7 @@ func (client ModelClient) UpdatePrebuiltEntityRolePreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -6915,6 +7322,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "regexEntityId": autorest.Encode("path", regexEntityID), @@ -6924,7 +7335,7 @@ func (client ModelClient) UpdateRegexEntityModelPreparer(ctx context.Context, ap preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters), autorest.WithJSON(regexEntityUpdateObject)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -6981,6 +7392,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "entityId": autorest.Encode("path", entityID), @@ -6991,7 +7406,7 @@ func (client ModelClient) UpdateRegexEntityRolePreparer(ctx context.Context, app preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -7048,6 +7463,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "clEntityId": autorest.Encode("path", clEntityID), @@ -7058,7 +7477,7 @@ func (client ModelClient) UpdateSubListPreparer(ctx context.Context, appID uuid. preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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/pattern.go b/services/cognitiveservices/v2.0/luis/authoring/pattern.go index c2587fa46b25..8d9993a8053d 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/pattern.go +++ b/services/cognitiveservices/v2.0/luis/authoring/pattern.go @@ -32,13 +32,8 @@ type PatternClient struct { } // NewPatternClient creates an instance of the PatternClient client. -func NewPatternClient() PatternClient { - return NewPatternClientWithBaseURI(DefaultBaseURI) -} - -// NewPatternClientWithBaseURI creates an instance of the PatternClient client. -func NewPatternClientWithBaseURI(baseURI string) PatternClient { - return PatternClient{NewWithBaseURI(baseURI)} +func NewPatternClient(endpoint string) PatternClient { + return PatternClient{New(endpoint)} } // AddPattern sends the add pattern request. @@ -70,6 +65,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -78,7 +77,7 @@ func (client PatternClient) AddPatternPreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrule", pathParameters), autorest.WithJSON(pattern)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -139,6 +138,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -147,7 +150,7 @@ func (client PatternClient) BatchAddPatternsPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters), autorest.WithJSON(patterns)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -202,6 +205,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "patternId": autorest.Encode("path", patternID), @@ -210,7 +217,7 @@ func (client PatternClient) DeletePatternPreparer(ctx context.Context, appID uui preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules/{patternId}", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -270,6 +277,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -278,7 +289,7 @@ func (client PatternClient) DeletePatternsPreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters), autorest.WithJSON(patternIds)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -347,6 +358,10 @@ func (client PatternClient) GetIntentPatterns(ctx context.Context, appID uuid.UU // 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "intentId": autorest.Encode("path", intentID), @@ -367,7 +382,7 @@ func (client PatternClient) GetIntentPatternsPreparer(ctx context.Context, appID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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)) @@ -435,6 +450,10 @@ func (client PatternClient) GetPatterns(ctx context.Context, appID uuid.UUID, ve // GetPatternsPreparer prepares the GetPatterns request. func (client PatternClient) GetPatternsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -454,7 +473,7 @@ func (client PatternClient) GetPatternsPreparer(ctx context.Context, appID uuid. preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -510,6 +529,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "patternId": autorest.Encode("path", patternID), @@ -519,7 +542,7 @@ func (client PatternClient) UpdatePatternPreparer(ctx context.Context, appID uui preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternrules/{patternId}", pathParameters), autorest.WithJSON(pattern)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -580,6 +603,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -588,7 +615,7 @@ func (client PatternClient) UpdatePatternsPreparer(ctx context.Context, appID uu preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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 fe56047dcd16..870101b5963b 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/permissions.go +++ b/services/cognitiveservices/v2.0/luis/authoring/permissions.go @@ -31,13 +31,8 @@ type PermissionsClient struct { } // NewPermissionsClient creates an instance of the PermissionsClient client. -func NewPermissionsClient() PermissionsClient { - return NewPermissionsClientWithBaseURI(DefaultBaseURI) -} - -// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client. -func NewPermissionsClientWithBaseURI(baseURI string) PermissionsClient { - return PermissionsClient{NewWithBaseURI(baseURI)} +func NewPermissionsClient(endpoint string) PermissionsClient { + return PermissionsClient{New(endpoint)} } // Add adds a user to the allowed list of users to access this LUIS application. Users are added using their email @@ -69,6 +64,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } @@ -76,7 +75,7 @@ func (client PermissionsClient) AddPreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/permissions", pathParameters), autorest.WithJSON(userToAdd)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -131,6 +130,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } @@ -138,7 +141,7 @@ func (client PermissionsClient) DeletePreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/permissions", pathParameters), autorest.WithJSON(userToDelete)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -191,13 +194,17 @@ 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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/permissions", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -251,6 +258,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } @@ -258,7 +269,7 @@ func (client PermissionsClient) UpdatePreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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/train.go b/services/cognitiveservices/v2.0/luis/authoring/train.go index d6428a6ab740..ecc5d4c29ecc 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/train.go +++ b/services/cognitiveservices/v2.0/luis/authoring/train.go @@ -31,13 +31,8 @@ type TrainClient struct { } // NewTrainClient creates an instance of the TrainClient client. -func NewTrainClient() TrainClient { - return NewTrainClientWithBaseURI(DefaultBaseURI) -} - -// NewTrainClientWithBaseURI creates an instance of the TrainClient client. -func NewTrainClientWithBaseURI(baseURI string) TrainClient { - return TrainClient{NewWithBaseURI(baseURI)} +func NewTrainClient(endpoint string) TrainClient { + return TrainClient{New(endpoint)} } // GetStatus gets the training status of all models (intents and entities) for the specified LUIS app. You must call @@ -70,6 +65,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -77,7 +76,7 @@ func (client TrainClient) GetStatusPreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/train", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -134,6 +133,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -141,7 +144,7 @@ func (client TrainClient) TrainVersionPreparer(ctx context.Context, appID uuid.U preparer := autorest.CreatePreparer( autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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 644a3347d09f..c0f568915a72 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/versions.go +++ b/services/cognitiveservices/v2.0/luis/authoring/versions.go @@ -32,13 +32,8 @@ type VersionsClient struct { } // NewVersionsClient creates an instance of the VersionsClient client. -func NewVersionsClient() VersionsClient { - return NewVersionsClientWithBaseURI(DefaultBaseURI) -} - -// NewVersionsClientWithBaseURI creates an instance of the VersionsClient client. -func NewVersionsClientWithBaseURI(baseURI string) VersionsClient { - return VersionsClient{NewWithBaseURI(baseURI)} +func NewVersionsClient(endpoint string) VersionsClient { + return VersionsClient{New(endpoint)} } // Clone creates a new version using the current snapshot of the selected application version. @@ -70,6 +65,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -78,7 +77,7 @@ func (client VersionsClient) ClonePreparer(ctx context.Context, appID uuid.UUID, preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/clone", pathParameters)) if versionCloneObject != nil { preparer = autorest.DecoratePreparer(preparer, @@ -135,6 +134,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -142,7 +145,7 @@ func (client VersionsClient) DeletePreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -196,6 +199,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -204,7 +211,7 @@ func (client VersionsClient) DeleteUnlabelledUtterancePreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/suggest", pathParameters), autorest.WithJSON(utterance)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -258,6 +265,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -265,7 +276,7 @@ func (client VersionsClient) ExportPreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/export", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -318,6 +329,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -325,7 +340,7 @@ func (client VersionsClient) GetPreparer(ctx context.Context, appID uuid.UUID, v preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/", pathParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -380,6 +395,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } @@ -392,7 +411,7 @@ func (client VersionsClient) ImportPreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions/import", pathParameters), autorest.WithJSON(luisApp), autorest.WithQueryParameters(queryParameters)) @@ -460,6 +479,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } @@ -478,7 +501,7 @@ func (client VersionsClient) ListPreparer(ctx context.Context, appID uuid.UUID, preparer := autorest.CreatePreparer( autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/api/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}/versions", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -533,6 +556,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) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), "versionId": autorest.Encode("path", versionID), @@ -541,7 +568,7 @@ func (client VersionsClient) UpdatePreparer(ctx context.Context, appID uuid.UUID preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/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/cognitiveservices/v2.0/luis/runtime/client.go b/services/cognitiveservices/v2.0/luis/runtime/client.go index de8bbd89961c..78bb8156cd57 100644 --- a/services/cognitiveservices/v2.0/luis/runtime/client.go +++ b/services/cognitiveservices/v2.0/luis/runtime/client.go @@ -24,26 +24,21 @@ import ( "github.com/Azure/go-autorest/autorest" ) -const ( - // DefaultBaseURI is the default URI used for the service Runtime - DefaultBaseURI = "https://api.cognitive.microsoft.com/luis/v2.0" -) - // BaseClient is the base client for Runtime. type BaseClient struct { autorest.Client - BaseURI string + Endpoint string } // New creates an instance of the BaseClient client. -func New() BaseClient { - return NewWithBaseURI(DefaultBaseURI) +func New(endpoint string) BaseClient { + return NewWithoutDefaults(endpoint) } -// NewWithBaseURI creates an instance of the BaseClient client. -func NewWithBaseURI(baseURI string) BaseClient { +// NewWithoutDefaults creates an instance of the BaseClient client. +func NewWithoutDefaults(endpoint string) BaseClient { return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, + Client: autorest.NewClientWithUserAgent(UserAgent()), + Endpoint: endpoint, } } diff --git a/services/cognitiveservices/v2.0/luis/runtime/prediction.go b/services/cognitiveservices/v2.0/luis/runtime/prediction.go index 63ba1bcf1299..992b1634c5e4 100644 --- a/services/cognitiveservices/v2.0/luis/runtime/prediction.go +++ b/services/cognitiveservices/v2.0/luis/runtime/prediction.go @@ -31,13 +31,8 @@ type PredictionClient struct { } // NewPredictionClient creates an instance of the PredictionClient client. -func NewPredictionClient() PredictionClient { - return NewPredictionClientWithBaseURI(DefaultBaseURI) -} - -// NewPredictionClientWithBaseURI creates an instance of the PredictionClient client. -func NewPredictionClientWithBaseURI(baseURI string) PredictionClient { - return PredictionClient{NewWithBaseURI(baseURI)} +func NewPredictionClient(endpoint string) PredictionClient { + return PredictionClient{New(endpoint)} } // Resolve gets predictions for a given utterance, in the form of intents and entities. The current maximum query size @@ -81,6 +76,10 @@ func (client PredictionClient) Resolve(ctx context.Context, appID string, query // ResolvePreparer prepares the Resolve request. func (client PredictionClient) ResolvePreparer(ctx context.Context, appID string, query string, timezoneOffset *float64, verbose *bool, staging *bool, spellCheck *bool, bingSpellCheckSubscriptionKey string, logParameter *bool) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "Endpoint": client.Endpoint, + } + pathParameters := map[string]interface{}{ "appId": autorest.Encode("path", appID), } @@ -108,7 +107,7 @@ func (client PredictionClient) ResolvePreparer(ctx context.Context, appID string preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), + autorest.WithCustomBaseURL("{Endpoint}/luis/v2.0", urlParameters), autorest.WithPathParameters("/apps/{appId}", pathParameters), autorest.WithJSON(query), autorest.WithQueryParameters(queryParameters)) From 8a03ceaedb0ecab88c5f91efe6727c222a47194d Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 7 Aug 2018 18:04:20 +0000 Subject: [PATCH 2/2] Generated from 8dfedc91e10fb96edb9aff8158500e9d369ab36a [Cognitive Services] Update endpoint URL template for LUIS. --- Gopkg.lock | 107 ++++++++++++++++-- .../v2.0/luis/runtime/models.go | 12 +- 2 files changed, 103 insertions(+), 16 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index b3b5c0683f15..3127e1299afe 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -2,6 +2,7 @@ [[projects]] + digest = "1:e222cbd536d9e0850e7297290c431aea75ba087c70d6f98525e95b9f2d02a627" name = "github.com/Azure/go-autorest" packages = [ "autorest", @@ -11,52 +12,64 @@ "autorest/date", "autorest/to", "autorest/validation", - "version" + "version", ] + pruneopts = "" revision = "bca49d5b51a50dc5bb17bbf6204c711c6dbded06" version = "v10.14.0" [[projects]] + digest = "1:6098222470fe0172157ce9bbef5d2200df4edde17ee649c5d6e48330e4afa4c6" name = "github.com/dgrijalva/jwt-go" packages = ["."] + pruneopts = "" revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e" version = "v3.2.0" [[projects]] + branch = "master" + digest = "1:7f175a633086a933d1940a7e7dc2154a0070a7c25fb4a2f671f3eef1a34d1fd7" name = "github.com/dimchansky/utfbom" packages = ["."] + pruneopts = "" revision = "5448fe645cb1964ba70ac8f9f2ffe975e61a536c" - version = "v1.0.0" [[projects]] branch = "master" + digest = "1:e736daced8bc48a910e0634540bc5cd63f1eea1b20fed65f8d82c8ad65eb10b2" name = "github.com/dnaeon/go-vcr" packages = [ "cassette", - "recorder" + "recorder", ] + pruneopts = "" revision = "8b144be0744f013a1b44386058f1fcb3ba98177d" [[projects]] + digest = "1:eb53021a8aa3f599d29c7102e65026242bdedce998a54837dc67f14b6a97c5fd" name = "github.com/fsnotify/fsnotify" packages = ["."] + pruneopts = "" revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9" version = "v1.4.7" [[projects]] branch = "master" + digest = "1:c1e35087694b689ce1cf4f4277612b6ac0b55725fa791271ae0e3ddcd1cc0c7b" name = "github.com/globalsign/mgo" packages = [ ".", "bson", "internal/json", "internal/sasl", - "internal/scram" + "internal/scram", ] + pruneopts = "" revision = "113d3961e7311526535a1ef7042196563d442761" [[projects]] branch = "master" + digest = "1:9b7c5846d70f425d7fe279595e32a20994c6075e87be03b5c367ed07280877c5" name = "github.com/hashicorp/hcl" packages = [ ".", @@ -68,143 +81,187 @@ "hcl/token", "json/parser", "json/scanner", - "json/token" + "json/token", ] + pruneopts = "" revision = "ef8a98b0bbce4a65b5aa4c368430a80ddc533168" [[projects]] + digest = "1:870d441fe217b8e689d7949fef6e43efbc787e50f200cb1e70dbca9204a1d6be" name = "github.com/inconshreveable/mousetrap" packages = ["."] + pruneopts = "" revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" version = "v1.0" [[projects]] + digest = "1:3108ec0946181c60040ff51b811908f89d03e521e2b4ade5ef5c65b3c0e911ae" name = "github.com/kr/pretty" packages = ["."] + pruneopts = "" revision = "73f6ac0b30a98e433b289500d779f50c1a6f0712" version = "v0.1.0" [[projects]] + digest = "1:11b056b4421396ab14e384ab8ab8c2079b03f1e51aa5eb4d9b81f9e0d1aa8fbf" name = "github.com/kr/text" packages = ["."] + pruneopts = "" revision = "e2ffdb16a802fe2bb95e2e35ff34f0e53aeef34f" version = "v0.1.0" [[projects]] + digest = "1:961dc3b1d11f969370533390fdf203813162980c858e1dabe827b60940c909a5" name = "github.com/magiconair/properties" packages = ["."] + pruneopts = "" revision = "c2353362d570a7bfa228149c62842019201cfb71" version = "v1.8.0" [[projects]] + digest = "1:71a28fe7d86ace8e51192c97eb4fd376c27ae0ed3a6ff46b41a6da76a0785d78" name = "github.com/marstr/collection" packages = ["."] + pruneopts = "" revision = "871b1cfa2ab97d3d8f54a034280907896190c346" version = "v0.3.3" [[projects]] branch = "master" + digest = "1:5a07891ac7651f2b0db3ca615f88ca80e38a41c0c9f60a6fb123b8cbe3d8d386" name = "github.com/marstr/goalias" packages = ["model"] + pruneopts = "" revision = "8dff9a14db648bfdd58d45515d3eaaee23aad078" [[projects]] + digest = "1:f95025d583786875a71183888acc9d0987fc96f12d4f5afab3d7558797ea1c5a" name = "github.com/marstr/guid" packages = ["."] + pruneopts = "" revision = "8bd9a64bf37eb297b492a4101fb28e80ac0b290f" version = "v1.1.0" [[projects]] branch = "master" + digest = "1:72da3dc7eddc1f4695da12df937debc7dcf027b1c0f57ec415fdad097cef7c43" name = "github.com/marstr/randname" packages = ["."] + pruneopts = "" revision = "48a63b6052f1f9373db9388a658da30c6ab53db1" [[projects]] branch = "master" + digest = "1:99651e95333755cbe5c9768c1b80031300acca64a80870b40309202b32585a5a" name = "github.com/mitchellh/go-homedir" packages = ["."] + pruneopts = "" revision = "3864e76763d94a6df2f9960b16a20a33da9f9a66" [[projects]] branch = "master" + digest = "1:f43ed2c836208c14f45158fd01577c985688a4d11cf9fd475a939819fef3b321" name = "github.com/mitchellh/mapstructure" packages = ["."] + pruneopts = "" revision = "f15292f7a699fcc1a38a80977f80a046874ba8ac" [[projects]] + digest = "1:894aef961c056b6d85d12bac890bf60c44e99b46292888bfa66caf529f804457" name = "github.com/pelletier/go-toml" packages = ["."] + pruneopts = "" revision = "c01d1270ff3e442a8a57cddc1c92dc1138598194" version = "v1.2.0" [[projects]] + digest = "1:7f569d906bdd20d906b606415b7d794f798f91a62fcfb6a4daa6d50690fb7a3f" name = "github.com/satori/go.uuid" packages = ["."] + pruneopts = "" revision = "f58768cc1a7a7e77a3bd49e98cdd21419399b6a3" version = "v1.2.0" [[projects]] + digest = "1:615c827f6a892973a587c754ae5fad7acfc4352657aff23d0238fe0ba2a154df" name = "github.com/shopspring/decimal" packages = ["."] + pruneopts = "" revision = "cd690d0c9e2447b1ef2a129a6b7b49077da89b8e" version = "1.1.0" [[projects]] + digest = "1:7ba2551c9a8de293bc575dbe2c0d862c52252d26f267f784547f059f512471c8" name = "github.com/spf13/afero" packages = [ ".", - "mem" + "mem", ] + pruneopts = "" revision = "787d034dfe70e44075ccc060d346146ef53270ad" version = "v1.1.1" [[projects]] + digest = "1:d0b38ba6da419a6d4380700218eeec8623841d44a856bb57369c172fbf692ab4" name = "github.com/spf13/cast" packages = ["."] + pruneopts = "" revision = "8965335b8c7107321228e3e3702cab9832751bac" version = "v1.2.0" [[projects]] + digest = "1:a1403cc8a94b8d7956ee5e9694badef0e7b051af289caad1cf668331e3ffa4f6" name = "github.com/spf13/cobra" packages = ["."] + pruneopts = "" revision = "ef82de70bb3f60c65fb8eebacbb2d122ef517385" version = "v0.0.3" [[projects]] branch = "master" + digest = "1:104517520aab91164020ab6524a5d6b7cafc641b2e42ac6236f6ac1deac4f66a" name = "github.com/spf13/jwalterweatherman" packages = ["."] + pruneopts = "" revision = "7c0cea34c8ece3fbeb2b27ab9b59511d360fb394" [[projects]] + digest = "1:8e243c568f36b09031ec18dff5f7d2769dcf5ca4d624ea511c8e3197dc3d352d" name = "github.com/spf13/pflag" packages = ["."] + pruneopts = "" revision = "583c0c0531f06d5278b7d917446061adc344b5cd" version = "v1.0.1" [[projects]] + digest = "1:3dab237cd3263a290d771d133fed777bb56c22e380b00ebe92e6531d5c8d3d0c" name = "github.com/spf13/viper" packages = ["."] + pruneopts = "" revision = "b5e8006cbee93ec955a89ab31e0e3ce3204f3736" version = "v1.0.2" [[projects]] branch = "master" + digest = "1:cae234a803b78380e4d769db6036b9fcc8c08ed4ff862571ffc1a958edc1f629" name = "golang.org/x/crypto" packages = [ "pkcs12", - "pkcs12/internal/rc2" + "pkcs12/internal/rc2", ] + pruneopts = "" revision = "c126467f60eb25f8f27e5a981f32a87e3965053f" [[projects]] branch = "master" + digest = "1:677e38cad6833ad266ec843739d167755eda1e6f2d8af1c63102b0426ad820db" name = "golang.org/x/sys" packages = ["unix"] + pruneopts = "" revision = "ac767d655b305d4e9612f5f6e33120b9176c4ad4" [[projects]] + digest = "1:5acd3512b047305d49e8763eef7ba423901e85d5dd2fd1e71778a0ea8de10bd4" name = "golang.org/x/text" packages = [ "internal/gen", @@ -212,36 +269,66 @@ "internal/ucd", "transform", "unicode/cldr", - "unicode/norm" + "unicode/norm", ] + pruneopts = "" revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" version = "v0.3.0" [[projects]] branch = "master" + digest = "1:0a7c4519ae77a3efda26ca65984efe97392362bc3c6591f23775178f785d1d59" name = "golang.org/x/tools" packages = [ "go/ast/astutil", "imports", - "internal/fastwalk" + "internal/fastwalk", ] + pruneopts = "" revision = "ded554d0681e0cba3cf074977cdc12e2c0906fe6" [[projects]] branch = "v1" + digest = "1:1d01f96bc2293b56c3dec797b8f976d7613fb30ce92bfbc994130404f7f7f031" name = "gopkg.in/check.v1" packages = ["."] + pruneopts = "" revision = "788fd78401277ebd861206a03c884797c6ec5541" [[projects]] + digest = "1:f0620375dd1f6251d9973b5f2596228cc8042e887cd7f827e4220bc1ce8c30e2" name = "gopkg.in/yaml.v2" packages = ["."] + pruneopts = "" revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183" version = "v2.2.1" [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "d76b8f370cdfbf2fbf0d0999210fb1fed0794d980a88da3df57112d5f5a439dc" + input-imports = [ + "github.com/Azure/go-autorest/autorest", + "github.com/Azure/go-autorest/autorest/adal", + "github.com/Azure/go-autorest/autorest/azure", + "github.com/Azure/go-autorest/autorest/azure/auth", + "github.com/Azure/go-autorest/autorest/date", + "github.com/Azure/go-autorest/autorest/to", + "github.com/Azure/go-autorest/autorest/validation", + "github.com/dnaeon/go-vcr/cassette", + "github.com/dnaeon/go-vcr/recorder", + "github.com/globalsign/mgo", + "github.com/marstr/collection", + "github.com/marstr/goalias/model", + "github.com/marstr/guid", + "github.com/marstr/randname", + "github.com/mitchellh/go-homedir", + "github.com/satori/go.uuid", + "github.com/shopspring/decimal", + "github.com/spf13/cobra", + "github.com/spf13/viper", + "golang.org/x/crypto/pkcs12", + "golang.org/x/tools/imports", + "gopkg.in/check.v1", + ] solver-name = "gps-cdcl" solver-version = 1 diff --git a/services/cognitiveservices/v2.0/luis/runtime/models.go b/services/cognitiveservices/v2.0/luis/runtime/models.go index 70f72909b3c6..4657ac9c8942 100644 --- a/services/cognitiveservices/v2.0/luis/runtime/models.go +++ b/services/cognitiveservices/v2.0/luis/runtime/models.go @@ -57,9 +57,9 @@ type EntityModel struct { // Type - Type of the entity, as defined in LUIS. Type *string `json:"type,omitempty"` // StartIndex - The position of the first character of the matched entity within the utterance. - StartIndex *float64 `json:"startIndex,omitempty"` + StartIndex *int32 `json:"startIndex,omitempty"` // EndIndex - The position of the last character of the matched entity within the utterance. - EndIndex *float64 `json:"endIndex,omitempty"` + EndIndex *int32 `json:"endIndex,omitempty"` } // MarshalJSON is the custom marshaler for EntityModel. @@ -94,9 +94,9 @@ type EntityWithResolution struct { // Type - Type of the entity, as defined in LUIS. Type *string `json:"type,omitempty"` // StartIndex - The position of the first character of the matched entity within the utterance. - StartIndex *float64 `json:"startIndex,omitempty"` + StartIndex *int32 `json:"startIndex,omitempty"` // EndIndex - The position of the last character of the matched entity within the utterance. - EndIndex *float64 `json:"endIndex,omitempty"` + EndIndex *int32 `json:"endIndex,omitempty"` } // MarshalJSON is the custom marshaler for EntityWithResolution. @@ -132,9 +132,9 @@ type EntityWithScore struct { // Type - Type of the entity, as defined in LUIS. Type *string `json:"type,omitempty"` // StartIndex - The position of the first character of the matched entity within the utterance. - StartIndex *float64 `json:"startIndex,omitempty"` + StartIndex *int32 `json:"startIndex,omitempty"` // EndIndex - The position of the last character of the matched entity within the utterance. - EndIndex *float64 `json:"endIndex,omitempty"` + EndIndex *int32 `json:"endIndex,omitempty"` } // MarshalJSON is the custom marshaler for EntityWithScore.