...

Source file src/github.com/Azure/azure-sdk-for-go/services/preview/cognitiveservices/v3.0/luis/authoring/model.go

Documentation: github.com/Azure/azure-sdk-for-go/services/preview/cognitiveservices/v3.0/luis/authoring

     1  package authoring
     2  
     3  // Copyright (c) Microsoft Corporation. All rights reserved.
     4  // Licensed under the MIT License. See License.txt in the project root for license information.
     5  //
     6  // Code generated by Microsoft (R) AutoRest Code Generator.
     7  // Changes may cause incorrect behavior and will be lost if the code is regenerated.
     8  
     9  import (
    10  	"context"
    11  	"github.com/Azure/go-autorest/autorest"
    12  	"github.com/Azure/go-autorest/autorest/azure"
    13  	"github.com/Azure/go-autorest/autorest/validation"
    14  	"github.com/Azure/go-autorest/tracing"
    15  	"github.com/gofrs/uuid"
    16  	"net/http"
    17  )
    18  
    19  // ModelClient is the client for the Model methods of the Authoring service.
    20  type ModelClient struct {
    21  	BaseClient
    22  }
    23  
    24  // NewModelClient creates an instance of the ModelClient client.
    25  func NewModelClient(endpoint string) ModelClient {
    26  	return ModelClient{New(endpoint)}
    27  }
    28  
    29  // AddClosedList adds a list entity model to a version of the application.
    30  // Parameters:
    31  // appID - the application ID.
    32  // versionID - the version ID.
    33  // closedListModelCreateObject - a model containing the name and words for the new list entity extractor.
    34  func (client ModelClient) AddClosedList(ctx context.Context, appID uuid.UUID, versionID string, closedListModelCreateObject ClosedListModelCreateObject) (result UUID, err error) {
    35  	if tracing.IsEnabled() {
    36  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddClosedList")
    37  		defer func() {
    38  			sc := -1
    39  			if result.Response.Response != nil {
    40  				sc = result.Response.Response.StatusCode
    41  			}
    42  			tracing.EndSpan(ctx, sc, err)
    43  		}()
    44  	}
    45  	req, err := client.AddClosedListPreparer(ctx, appID, versionID, closedListModelCreateObject)
    46  	if err != nil {
    47  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddClosedList", nil, "Failure preparing request")
    48  		return
    49  	}
    50  
    51  	resp, err := client.AddClosedListSender(req)
    52  	if err != nil {
    53  		result.Response = autorest.Response{Response: resp}
    54  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddClosedList", resp, "Failure sending request")
    55  		return
    56  	}
    57  
    58  	result, err = client.AddClosedListResponder(resp)
    59  	if err != nil {
    60  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddClosedList", resp, "Failure responding to request")
    61  		return
    62  	}
    63  
    64  	return
    65  }
    66  
    67  // AddClosedListPreparer prepares the AddClosedList request.
    68  func (client ModelClient) AddClosedListPreparer(ctx context.Context, appID uuid.UUID, versionID string, closedListModelCreateObject ClosedListModelCreateObject) (*http.Request, error) {
    69  	urlParameters := map[string]interface{}{
    70  		"Endpoint": client.Endpoint,
    71  	}
    72  
    73  	pathParameters := map[string]interface{}{
    74  		"appId":     autorest.Encode("path", appID),
    75  		"versionId": autorest.Encode("path", versionID),
    76  	}
    77  
    78  	preparer := autorest.CreatePreparer(
    79  		autorest.AsContentType("application/json; charset=utf-8"),
    80  		autorest.AsPost(),
    81  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
    82  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists", pathParameters),
    83  		autorest.WithJSON(closedListModelCreateObject))
    84  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
    85  }
    86  
    87  // AddClosedListSender sends the AddClosedList request. The method will close the
    88  // http.Response Body if it receives an error.
    89  func (client ModelClient) AddClosedListSender(req *http.Request) (*http.Response, error) {
    90  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
    91  }
    92  
    93  // AddClosedListResponder handles the response to the AddClosedList request. The method always
    94  // closes the http.Response Body.
    95  func (client ModelClient) AddClosedListResponder(resp *http.Response) (result UUID, err error) {
    96  	err = autorest.Respond(
    97  		resp,
    98  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
    99  		autorest.ByUnmarshallingJSON(&result.Value),
   100  		autorest.ByClosing())
   101  	result.Response = autorest.Response{Response: resp}
   102  	return
   103  }
   104  
   105  // AddCompositeEntityChild creates a single child in an existing composite entity model in a version of the
   106  // application.
   107  // Parameters:
   108  // appID - the application ID.
   109  // versionID - the version ID.
   110  // cEntityID - the composite entity extractor ID.
   111  // compositeChildModelCreateObject - a model object containing the name of the new composite child model.
   112  func (client ModelClient) AddCompositeEntityChild(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeChildModelCreateObject CompositeChildModelCreateObject) (result UUID, err error) {
   113  	if tracing.IsEnabled() {
   114  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddCompositeEntityChild")
   115  		defer func() {
   116  			sc := -1
   117  			if result.Response.Response != nil {
   118  				sc = result.Response.Response.StatusCode
   119  			}
   120  			tracing.EndSpan(ctx, sc, err)
   121  		}()
   122  	}
   123  	req, err := client.AddCompositeEntityChildPreparer(ctx, appID, versionID, cEntityID, compositeChildModelCreateObject)
   124  	if err != nil {
   125  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCompositeEntityChild", nil, "Failure preparing request")
   126  		return
   127  	}
   128  
   129  	resp, err := client.AddCompositeEntityChildSender(req)
   130  	if err != nil {
   131  		result.Response = autorest.Response{Response: resp}
   132  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCompositeEntityChild", resp, "Failure sending request")
   133  		return
   134  	}
   135  
   136  	result, err = client.AddCompositeEntityChildResponder(resp)
   137  	if err != nil {
   138  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCompositeEntityChild", resp, "Failure responding to request")
   139  		return
   140  	}
   141  
   142  	return
   143  }
   144  
   145  // AddCompositeEntityChildPreparer prepares the AddCompositeEntityChild request.
   146  func (client ModelClient) AddCompositeEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeChildModelCreateObject CompositeChildModelCreateObject) (*http.Request, error) {
   147  	urlParameters := map[string]interface{}{
   148  		"Endpoint": client.Endpoint,
   149  	}
   150  
   151  	pathParameters := map[string]interface{}{
   152  		"appId":     autorest.Encode("path", appID),
   153  		"cEntityId": autorest.Encode("path", cEntityID),
   154  		"versionId": autorest.Encode("path", versionID),
   155  	}
   156  
   157  	preparer := autorest.CreatePreparer(
   158  		autorest.AsContentType("application/json; charset=utf-8"),
   159  		autorest.AsPost(),
   160  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
   161  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children", pathParameters),
   162  		autorest.WithJSON(compositeChildModelCreateObject))
   163  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   164  }
   165  
   166  // AddCompositeEntityChildSender sends the AddCompositeEntityChild request. The method will close the
   167  // http.Response Body if it receives an error.
   168  func (client ModelClient) AddCompositeEntityChildSender(req *http.Request) (*http.Response, error) {
   169  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   170  }
   171  
   172  // AddCompositeEntityChildResponder handles the response to the AddCompositeEntityChild request. The method always
   173  // closes the http.Response Body.
   174  func (client ModelClient) AddCompositeEntityChildResponder(resp *http.Response) (result UUID, err error) {
   175  	err = autorest.Respond(
   176  		resp,
   177  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
   178  		autorest.ByUnmarshallingJSON(&result.Value),
   179  		autorest.ByClosing())
   180  	result.Response = autorest.Response{Response: resp}
   181  	return
   182  }
   183  
   184  // AddCustomPrebuiltDomain adds a customizable prebuilt domain along with all of its intent and entity models in a
   185  // version of the application.
   186  // Parameters:
   187  // appID - the application ID.
   188  // versionID - the version ID.
   189  // prebuiltDomainObject - a prebuilt domain create object containing the name of the domain.
   190  func (client ModelClient) AddCustomPrebuiltDomain(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainObject PrebuiltDomainCreateBaseObject) (result ListUUID, err error) {
   191  	if tracing.IsEnabled() {
   192  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddCustomPrebuiltDomain")
   193  		defer func() {
   194  			sc := -1
   195  			if result.Response.Response != nil {
   196  				sc = result.Response.Response.StatusCode
   197  			}
   198  			tracing.EndSpan(ctx, sc, err)
   199  		}()
   200  	}
   201  	req, err := client.AddCustomPrebuiltDomainPreparer(ctx, appID, versionID, prebuiltDomainObject)
   202  	if err != nil {
   203  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltDomain", nil, "Failure preparing request")
   204  		return
   205  	}
   206  
   207  	resp, err := client.AddCustomPrebuiltDomainSender(req)
   208  	if err != nil {
   209  		result.Response = autorest.Response{Response: resp}
   210  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltDomain", resp, "Failure sending request")
   211  		return
   212  	}
   213  
   214  	result, err = client.AddCustomPrebuiltDomainResponder(resp)
   215  	if err != nil {
   216  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltDomain", resp, "Failure responding to request")
   217  		return
   218  	}
   219  
   220  	return
   221  }
   222  
   223  // AddCustomPrebuiltDomainPreparer prepares the AddCustomPrebuiltDomain request.
   224  func (client ModelClient) AddCustomPrebuiltDomainPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainObject PrebuiltDomainCreateBaseObject) (*http.Request, error) {
   225  	urlParameters := map[string]interface{}{
   226  		"Endpoint": client.Endpoint,
   227  	}
   228  
   229  	pathParameters := map[string]interface{}{
   230  		"appId":     autorest.Encode("path", appID),
   231  		"versionId": autorest.Encode("path", versionID),
   232  	}
   233  
   234  	preparer := autorest.CreatePreparer(
   235  		autorest.AsContentType("application/json; charset=utf-8"),
   236  		autorest.AsPost(),
   237  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
   238  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltdomains", pathParameters),
   239  		autorest.WithJSON(prebuiltDomainObject))
   240  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   241  }
   242  
   243  // AddCustomPrebuiltDomainSender sends the AddCustomPrebuiltDomain request. The method will close the
   244  // http.Response Body if it receives an error.
   245  func (client ModelClient) AddCustomPrebuiltDomainSender(req *http.Request) (*http.Response, error) {
   246  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   247  }
   248  
   249  // AddCustomPrebuiltDomainResponder handles the response to the AddCustomPrebuiltDomain request. The method always
   250  // closes the http.Response Body.
   251  func (client ModelClient) AddCustomPrebuiltDomainResponder(resp *http.Response) (result ListUUID, err error) {
   252  	err = autorest.Respond(
   253  		resp,
   254  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
   255  		autorest.ByUnmarshallingJSON(&result.Value),
   256  		autorest.ByClosing())
   257  	result.Response = autorest.Response{Response: resp}
   258  	return
   259  }
   260  
   261  // AddCustomPrebuiltEntity adds a prebuilt entity model to a version of the application.
   262  // Parameters:
   263  // appID - the application ID.
   264  // versionID - the version ID.
   265  // prebuiltDomainModelCreateObject - a model object containing the name of the prebuilt entity and the name of
   266  // the domain to which this model belongs.
   267  func (client ModelClient) AddCustomPrebuiltEntity(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (result UUID, err error) {
   268  	if tracing.IsEnabled() {
   269  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddCustomPrebuiltEntity")
   270  		defer func() {
   271  			sc := -1
   272  			if result.Response.Response != nil {
   273  				sc = result.Response.Response.StatusCode
   274  			}
   275  			tracing.EndSpan(ctx, sc, err)
   276  		}()
   277  	}
   278  	req, err := client.AddCustomPrebuiltEntityPreparer(ctx, appID, versionID, prebuiltDomainModelCreateObject)
   279  	if err != nil {
   280  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltEntity", nil, "Failure preparing request")
   281  		return
   282  	}
   283  
   284  	resp, err := client.AddCustomPrebuiltEntitySender(req)
   285  	if err != nil {
   286  		result.Response = autorest.Response{Response: resp}
   287  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltEntity", resp, "Failure sending request")
   288  		return
   289  	}
   290  
   291  	result, err = client.AddCustomPrebuiltEntityResponder(resp)
   292  	if err != nil {
   293  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltEntity", resp, "Failure responding to request")
   294  		return
   295  	}
   296  
   297  	return
   298  }
   299  
   300  // AddCustomPrebuiltEntityPreparer prepares the AddCustomPrebuiltEntity request.
   301  func (client ModelClient) AddCustomPrebuiltEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (*http.Request, error) {
   302  	urlParameters := map[string]interface{}{
   303  		"Endpoint": client.Endpoint,
   304  	}
   305  
   306  	pathParameters := map[string]interface{}{
   307  		"appId":     autorest.Encode("path", appID),
   308  		"versionId": autorest.Encode("path", versionID),
   309  	}
   310  
   311  	preparer := autorest.CreatePreparer(
   312  		autorest.AsContentType("application/json; charset=utf-8"),
   313  		autorest.AsPost(),
   314  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
   315  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities", pathParameters),
   316  		autorest.WithJSON(prebuiltDomainModelCreateObject))
   317  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   318  }
   319  
   320  // AddCustomPrebuiltEntitySender sends the AddCustomPrebuiltEntity request. The method will close the
   321  // http.Response Body if it receives an error.
   322  func (client ModelClient) AddCustomPrebuiltEntitySender(req *http.Request) (*http.Response, error) {
   323  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   324  }
   325  
   326  // AddCustomPrebuiltEntityResponder handles the response to the AddCustomPrebuiltEntity request. The method always
   327  // closes the http.Response Body.
   328  func (client ModelClient) AddCustomPrebuiltEntityResponder(resp *http.Response) (result UUID, err error) {
   329  	err = autorest.Respond(
   330  		resp,
   331  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
   332  		autorest.ByUnmarshallingJSON(&result.Value),
   333  		autorest.ByClosing())
   334  	result.Response = autorest.Response{Response: resp}
   335  	return
   336  }
   337  
   338  // AddCustomPrebuiltIntent adds a customizable prebuilt intent model to a version of the application.
   339  // Parameters:
   340  // appID - the application ID.
   341  // versionID - the version ID.
   342  // prebuiltDomainModelCreateObject - a model object containing the name of the customizable prebuilt intent and
   343  // the name of the domain to which this model belongs.
   344  func (client ModelClient) AddCustomPrebuiltIntent(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (result UUID, err error) {
   345  	if tracing.IsEnabled() {
   346  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddCustomPrebuiltIntent")
   347  		defer func() {
   348  			sc := -1
   349  			if result.Response.Response != nil {
   350  				sc = result.Response.Response.StatusCode
   351  			}
   352  			tracing.EndSpan(ctx, sc, err)
   353  		}()
   354  	}
   355  	req, err := client.AddCustomPrebuiltIntentPreparer(ctx, appID, versionID, prebuiltDomainModelCreateObject)
   356  	if err != nil {
   357  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltIntent", nil, "Failure preparing request")
   358  		return
   359  	}
   360  
   361  	resp, err := client.AddCustomPrebuiltIntentSender(req)
   362  	if err != nil {
   363  		result.Response = autorest.Response{Response: resp}
   364  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltIntent", resp, "Failure sending request")
   365  		return
   366  	}
   367  
   368  	result, err = client.AddCustomPrebuiltIntentResponder(resp)
   369  	if err != nil {
   370  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddCustomPrebuiltIntent", resp, "Failure responding to request")
   371  		return
   372  	}
   373  
   374  	return
   375  }
   376  
   377  // AddCustomPrebuiltIntentPreparer prepares the AddCustomPrebuiltIntent request.
   378  func (client ModelClient) AddCustomPrebuiltIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltDomainModelCreateObject PrebuiltDomainModelCreateObject) (*http.Request, error) {
   379  	urlParameters := map[string]interface{}{
   380  		"Endpoint": client.Endpoint,
   381  	}
   382  
   383  	pathParameters := map[string]interface{}{
   384  		"appId":     autorest.Encode("path", appID),
   385  		"versionId": autorest.Encode("path", versionID),
   386  	}
   387  
   388  	preparer := autorest.CreatePreparer(
   389  		autorest.AsContentType("application/json; charset=utf-8"),
   390  		autorest.AsPost(),
   391  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
   392  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltintents", pathParameters),
   393  		autorest.WithJSON(prebuiltDomainModelCreateObject))
   394  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   395  }
   396  
   397  // AddCustomPrebuiltIntentSender sends the AddCustomPrebuiltIntent request. The method will close the
   398  // http.Response Body if it receives an error.
   399  func (client ModelClient) AddCustomPrebuiltIntentSender(req *http.Request) (*http.Response, error) {
   400  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   401  }
   402  
   403  // AddCustomPrebuiltIntentResponder handles the response to the AddCustomPrebuiltIntent request. The method always
   404  // closes the http.Response Body.
   405  func (client ModelClient) AddCustomPrebuiltIntentResponder(resp *http.Response) (result UUID, err error) {
   406  	err = autorest.Respond(
   407  		resp,
   408  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
   409  		autorest.ByUnmarshallingJSON(&result.Value),
   410  		autorest.ByClosing())
   411  	result.Response = autorest.Response{Response: resp}
   412  	return
   413  }
   414  
   415  // AddEntity adds an entity extractor to a version of the application.
   416  // Parameters:
   417  // appID - the application ID.
   418  // versionID - the version ID.
   419  // entityModelCreateObject - a model object containing the name of the new entity extractor and its children.
   420  func (client ModelClient) AddEntity(ctx context.Context, appID uuid.UUID, versionID string, entityModelCreateObject EntityModelCreateObject) (result UUID, err error) {
   421  	if tracing.IsEnabled() {
   422  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddEntity")
   423  		defer func() {
   424  			sc := -1
   425  			if result.Response.Response != nil {
   426  				sc = result.Response.Response.StatusCode
   427  			}
   428  			tracing.EndSpan(ctx, sc, err)
   429  		}()
   430  	}
   431  	req, err := client.AddEntityPreparer(ctx, appID, versionID, entityModelCreateObject)
   432  	if err != nil {
   433  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddEntity", nil, "Failure preparing request")
   434  		return
   435  	}
   436  
   437  	resp, err := client.AddEntitySender(req)
   438  	if err != nil {
   439  		result.Response = autorest.Response{Response: resp}
   440  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddEntity", resp, "Failure sending request")
   441  		return
   442  	}
   443  
   444  	result, err = client.AddEntityResponder(resp)
   445  	if err != nil {
   446  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddEntity", resp, "Failure responding to request")
   447  		return
   448  	}
   449  
   450  	return
   451  }
   452  
   453  // AddEntityPreparer prepares the AddEntity request.
   454  func (client ModelClient) AddEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityModelCreateObject EntityModelCreateObject) (*http.Request, error) {
   455  	urlParameters := map[string]interface{}{
   456  		"Endpoint": client.Endpoint,
   457  	}
   458  
   459  	pathParameters := map[string]interface{}{
   460  		"appId":     autorest.Encode("path", appID),
   461  		"versionId": autorest.Encode("path", versionID),
   462  	}
   463  
   464  	preparer := autorest.CreatePreparer(
   465  		autorest.AsContentType("application/json; charset=utf-8"),
   466  		autorest.AsPost(),
   467  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
   468  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities", pathParameters),
   469  		autorest.WithJSON(entityModelCreateObject))
   470  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   471  }
   472  
   473  // AddEntitySender sends the AddEntity request. The method will close the
   474  // http.Response Body if it receives an error.
   475  func (client ModelClient) AddEntitySender(req *http.Request) (*http.Response, error) {
   476  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   477  }
   478  
   479  // AddEntityResponder handles the response to the AddEntity request. The method always
   480  // closes the http.Response Body.
   481  func (client ModelClient) AddEntityResponder(resp *http.Response) (result UUID, err error) {
   482  	err = autorest.Respond(
   483  		resp,
   484  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
   485  		autorest.ByUnmarshallingJSON(&result.Value),
   486  		autorest.ByClosing())
   487  	result.Response = autorest.Response{Response: resp}
   488  	return
   489  }
   490  
   491  // AddEntityChild creates a single child in an existing entity model hierarchy in a version of the application.
   492  // Parameters:
   493  // appID - the application ID.
   494  // versionID - the version ID.
   495  // entityID - the entity extractor ID.
   496  // childEntityModelCreateObject - a model object containing the name of the new child model and its children.
   497  func (client ModelClient) AddEntityChild(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, childEntityModelCreateObject ChildEntityModelCreateObject) (result UUID, err error) {
   498  	if tracing.IsEnabled() {
   499  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddEntityChild")
   500  		defer func() {
   501  			sc := -1
   502  			if result.Response.Response != nil {
   503  				sc = result.Response.Response.StatusCode
   504  			}
   505  			tracing.EndSpan(ctx, sc, err)
   506  		}()
   507  	}
   508  	req, err := client.AddEntityChildPreparer(ctx, appID, versionID, entityID, childEntityModelCreateObject)
   509  	if err != nil {
   510  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddEntityChild", nil, "Failure preparing request")
   511  		return
   512  	}
   513  
   514  	resp, err := client.AddEntityChildSender(req)
   515  	if err != nil {
   516  		result.Response = autorest.Response{Response: resp}
   517  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddEntityChild", resp, "Failure sending request")
   518  		return
   519  	}
   520  
   521  	result, err = client.AddEntityChildResponder(resp)
   522  	if err != nil {
   523  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddEntityChild", resp, "Failure responding to request")
   524  		return
   525  	}
   526  
   527  	return
   528  }
   529  
   530  // AddEntityChildPreparer prepares the AddEntityChild request.
   531  func (client ModelClient) AddEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, childEntityModelCreateObject ChildEntityModelCreateObject) (*http.Request, error) {
   532  	urlParameters := map[string]interface{}{
   533  		"Endpoint": client.Endpoint,
   534  	}
   535  
   536  	pathParameters := map[string]interface{}{
   537  		"appId":     autorest.Encode("path", appID),
   538  		"entityId":  autorest.Encode("path", entityID),
   539  		"versionId": autorest.Encode("path", versionID),
   540  	}
   541  
   542  	preparer := autorest.CreatePreparer(
   543  		autorest.AsContentType("application/json; charset=utf-8"),
   544  		autorest.AsPost(),
   545  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
   546  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/children", pathParameters),
   547  		autorest.WithJSON(childEntityModelCreateObject))
   548  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   549  }
   550  
   551  // AddEntityChildSender sends the AddEntityChild request. The method will close the
   552  // http.Response Body if it receives an error.
   553  func (client ModelClient) AddEntityChildSender(req *http.Request) (*http.Response, error) {
   554  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   555  }
   556  
   557  // AddEntityChildResponder handles the response to the AddEntityChild request. The method always
   558  // closes the http.Response Body.
   559  func (client ModelClient) AddEntityChildResponder(resp *http.Response) (result UUID, err error) {
   560  	err = autorest.Respond(
   561  		resp,
   562  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
   563  		autorest.ByUnmarshallingJSON(&result.Value),
   564  		autorest.ByClosing())
   565  	result.Response = autorest.Response{Response: resp}
   566  	return
   567  }
   568  
   569  // AddExplicitListItem sends the add explicit list item request.
   570  // Parameters:
   571  // appID - the application ID.
   572  // versionID - the version ID.
   573  // entityID - the Pattern.Any entity extractor ID.
   574  // item - the new explicit list item.
   575  func (client ModelClient) AddExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, item ExplicitListItemCreateObject) (result Int32, err error) {
   576  	if tracing.IsEnabled() {
   577  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddExplicitListItem")
   578  		defer func() {
   579  			sc := -1
   580  			if result.Response.Response != nil {
   581  				sc = result.Response.Response.StatusCode
   582  			}
   583  			tracing.EndSpan(ctx, sc, err)
   584  		}()
   585  	}
   586  	req, err := client.AddExplicitListItemPreparer(ctx, appID, versionID, entityID, item)
   587  	if err != nil {
   588  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddExplicitListItem", nil, "Failure preparing request")
   589  		return
   590  	}
   591  
   592  	resp, err := client.AddExplicitListItemSender(req)
   593  	if err != nil {
   594  		result.Response = autorest.Response{Response: resp}
   595  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddExplicitListItem", resp, "Failure sending request")
   596  		return
   597  	}
   598  
   599  	result, err = client.AddExplicitListItemResponder(resp)
   600  	if err != nil {
   601  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddExplicitListItem", resp, "Failure responding to request")
   602  		return
   603  	}
   604  
   605  	return
   606  }
   607  
   608  // AddExplicitListItemPreparer prepares the AddExplicitListItem request.
   609  func (client ModelClient) AddExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, item ExplicitListItemCreateObject) (*http.Request, error) {
   610  	urlParameters := map[string]interface{}{
   611  		"Endpoint": client.Endpoint,
   612  	}
   613  
   614  	pathParameters := map[string]interface{}{
   615  		"appId":     autorest.Encode("path", appID),
   616  		"entityId":  autorest.Encode("path", entityID),
   617  		"versionId": autorest.Encode("path", versionID),
   618  	}
   619  
   620  	preparer := autorest.CreatePreparer(
   621  		autorest.AsContentType("application/json; charset=utf-8"),
   622  		autorest.AsPost(),
   623  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
   624  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist", pathParameters),
   625  		autorest.WithJSON(item))
   626  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   627  }
   628  
   629  // AddExplicitListItemSender sends the AddExplicitListItem request. The method will close the
   630  // http.Response Body if it receives an error.
   631  func (client ModelClient) AddExplicitListItemSender(req *http.Request) (*http.Response, error) {
   632  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   633  }
   634  
   635  // AddExplicitListItemResponder handles the response to the AddExplicitListItem request. The method always
   636  // closes the http.Response Body.
   637  func (client ModelClient) AddExplicitListItemResponder(resp *http.Response) (result Int32, err error) {
   638  	err = autorest.Respond(
   639  		resp,
   640  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
   641  		autorest.ByUnmarshallingJSON(&result.Value),
   642  		autorest.ByClosing())
   643  	result.Response = autorest.Response{Response: resp}
   644  	return
   645  }
   646  
   647  // AddIntent adds an intent to a version of the application.
   648  // Parameters:
   649  // appID - the application ID.
   650  // versionID - the version ID.
   651  // intentCreateObject - a model object containing the name of the new intent.
   652  func (client ModelClient) AddIntent(ctx context.Context, appID uuid.UUID, versionID string, intentCreateObject ModelCreateObject) (result UUID, err error) {
   653  	if tracing.IsEnabled() {
   654  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddIntent")
   655  		defer func() {
   656  			sc := -1
   657  			if result.Response.Response != nil {
   658  				sc = result.Response.Response.StatusCode
   659  			}
   660  			tracing.EndSpan(ctx, sc, err)
   661  		}()
   662  	}
   663  	req, err := client.AddIntentPreparer(ctx, appID, versionID, intentCreateObject)
   664  	if err != nil {
   665  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddIntent", nil, "Failure preparing request")
   666  		return
   667  	}
   668  
   669  	resp, err := client.AddIntentSender(req)
   670  	if err != nil {
   671  		result.Response = autorest.Response{Response: resp}
   672  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddIntent", resp, "Failure sending request")
   673  		return
   674  	}
   675  
   676  	result, err = client.AddIntentResponder(resp)
   677  	if err != nil {
   678  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddIntent", resp, "Failure responding to request")
   679  		return
   680  	}
   681  
   682  	return
   683  }
   684  
   685  // AddIntentPreparer prepares the AddIntent request.
   686  func (client ModelClient) AddIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentCreateObject ModelCreateObject) (*http.Request, error) {
   687  	urlParameters := map[string]interface{}{
   688  		"Endpoint": client.Endpoint,
   689  	}
   690  
   691  	pathParameters := map[string]interface{}{
   692  		"appId":     autorest.Encode("path", appID),
   693  		"versionId": autorest.Encode("path", versionID),
   694  	}
   695  
   696  	preparer := autorest.CreatePreparer(
   697  		autorest.AsContentType("application/json; charset=utf-8"),
   698  		autorest.AsPost(),
   699  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
   700  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents", pathParameters),
   701  		autorest.WithJSON(intentCreateObject))
   702  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   703  }
   704  
   705  // AddIntentSender sends the AddIntent request. The method will close the
   706  // http.Response Body if it receives an error.
   707  func (client ModelClient) AddIntentSender(req *http.Request) (*http.Response, error) {
   708  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   709  }
   710  
   711  // AddIntentResponder handles the response to the AddIntent request. The method always
   712  // closes the http.Response Body.
   713  func (client ModelClient) AddIntentResponder(resp *http.Response) (result UUID, err error) {
   714  	err = autorest.Respond(
   715  		resp,
   716  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
   717  		autorest.ByUnmarshallingJSON(&result.Value),
   718  		autorest.ByClosing())
   719  	result.Response = autorest.Response{Response: resp}
   720  	return
   721  }
   722  
   723  // AddPrebuilt adds a list of prebuilt entities to a version of the application.
   724  // Parameters:
   725  // appID - the application ID.
   726  // versionID - the version ID.
   727  // prebuiltExtractorNames - an array of prebuilt entity extractor names.
   728  func (client ModelClient) AddPrebuilt(ctx context.Context, appID uuid.UUID, versionID string, prebuiltExtractorNames []string) (result ListPrebuiltEntityExtractor, err error) {
   729  	if tracing.IsEnabled() {
   730  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddPrebuilt")
   731  		defer func() {
   732  			sc := -1
   733  			if result.Response.Response != nil {
   734  				sc = result.Response.Response.StatusCode
   735  			}
   736  			tracing.EndSpan(ctx, sc, err)
   737  		}()
   738  	}
   739  	if err := validation.Validate([]validation.Validation{
   740  		{TargetValue: prebuiltExtractorNames,
   741  			Constraints: []validation.Constraint{{Target: "prebuiltExtractorNames", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
   742  		return result, validation.NewError("authoring.ModelClient", "AddPrebuilt", err.Error())
   743  	}
   744  
   745  	req, err := client.AddPrebuiltPreparer(ctx, appID, versionID, prebuiltExtractorNames)
   746  	if err != nil {
   747  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddPrebuilt", nil, "Failure preparing request")
   748  		return
   749  	}
   750  
   751  	resp, err := client.AddPrebuiltSender(req)
   752  	if err != nil {
   753  		result.Response = autorest.Response{Response: resp}
   754  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddPrebuilt", resp, "Failure sending request")
   755  		return
   756  	}
   757  
   758  	result, err = client.AddPrebuiltResponder(resp)
   759  	if err != nil {
   760  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddPrebuilt", resp, "Failure responding to request")
   761  		return
   762  	}
   763  
   764  	return
   765  }
   766  
   767  // AddPrebuiltPreparer prepares the AddPrebuilt request.
   768  func (client ModelClient) AddPrebuiltPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltExtractorNames []string) (*http.Request, error) {
   769  	urlParameters := map[string]interface{}{
   770  		"Endpoint": client.Endpoint,
   771  	}
   772  
   773  	pathParameters := map[string]interface{}{
   774  		"appId":     autorest.Encode("path", appID),
   775  		"versionId": autorest.Encode("path", versionID),
   776  	}
   777  
   778  	preparer := autorest.CreatePreparer(
   779  		autorest.AsContentType("application/json; charset=utf-8"),
   780  		autorest.AsPost(),
   781  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
   782  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts", pathParameters),
   783  		autorest.WithJSON(prebuiltExtractorNames))
   784  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   785  }
   786  
   787  // AddPrebuiltSender sends the AddPrebuilt request. The method will close the
   788  // http.Response Body if it receives an error.
   789  func (client ModelClient) AddPrebuiltSender(req *http.Request) (*http.Response, error) {
   790  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   791  }
   792  
   793  // AddPrebuiltResponder handles the response to the AddPrebuilt request. The method always
   794  // closes the http.Response Body.
   795  func (client ModelClient) AddPrebuiltResponder(resp *http.Response) (result ListPrebuiltEntityExtractor, err error) {
   796  	err = autorest.Respond(
   797  		resp,
   798  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
   799  		autorest.ByUnmarshallingJSON(&result.Value),
   800  		autorest.ByClosing())
   801  	result.Response = autorest.Response{Response: resp}
   802  	return
   803  }
   804  
   805  // AddSubList adds a sublist to an existing list entity in a version of the application.
   806  // Parameters:
   807  // appID - the application ID.
   808  // versionID - the version ID.
   809  // clEntityID - the list entity extractor ID.
   810  // wordListCreateObject - words list.
   811  func (client ModelClient) AddSubList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, wordListCreateObject WordListObject) (result Int64, err error) {
   812  	if tracing.IsEnabled() {
   813  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.AddSubList")
   814  		defer func() {
   815  			sc := -1
   816  			if result.Response.Response != nil {
   817  				sc = result.Response.Response.StatusCode
   818  			}
   819  			tracing.EndSpan(ctx, sc, err)
   820  		}()
   821  	}
   822  	req, err := client.AddSubListPreparer(ctx, appID, versionID, clEntityID, wordListCreateObject)
   823  	if err != nil {
   824  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddSubList", nil, "Failure preparing request")
   825  		return
   826  	}
   827  
   828  	resp, err := client.AddSubListSender(req)
   829  	if err != nil {
   830  		result.Response = autorest.Response{Response: resp}
   831  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddSubList", resp, "Failure sending request")
   832  		return
   833  	}
   834  
   835  	result, err = client.AddSubListResponder(resp)
   836  	if err != nil {
   837  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "AddSubList", resp, "Failure responding to request")
   838  		return
   839  	}
   840  
   841  	return
   842  }
   843  
   844  // AddSubListPreparer prepares the AddSubList request.
   845  func (client ModelClient) AddSubListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, wordListCreateObject WordListObject) (*http.Request, error) {
   846  	urlParameters := map[string]interface{}{
   847  		"Endpoint": client.Endpoint,
   848  	}
   849  
   850  	pathParameters := map[string]interface{}{
   851  		"appId":      autorest.Encode("path", appID),
   852  		"clEntityId": autorest.Encode("path", clEntityID),
   853  		"versionId":  autorest.Encode("path", versionID),
   854  	}
   855  
   856  	preparer := autorest.CreatePreparer(
   857  		autorest.AsContentType("application/json; charset=utf-8"),
   858  		autorest.AsPost(),
   859  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
   860  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists", pathParameters),
   861  		autorest.WithJSON(wordListCreateObject))
   862  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   863  }
   864  
   865  // AddSubListSender sends the AddSubList request. The method will close the
   866  // http.Response Body if it receives an error.
   867  func (client ModelClient) AddSubListSender(req *http.Request) (*http.Response, error) {
   868  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   869  }
   870  
   871  // AddSubListResponder handles the response to the AddSubList request. The method always
   872  // closes the http.Response Body.
   873  func (client ModelClient) AddSubListResponder(resp *http.Response) (result Int64, err error) {
   874  	err = autorest.Respond(
   875  		resp,
   876  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
   877  		autorest.ByUnmarshallingJSON(&result.Value),
   878  		autorest.ByClosing())
   879  	result.Response = autorest.Response{Response: resp}
   880  	return
   881  }
   882  
   883  // CreateClosedListEntityRole sends the create closed list entity role request.
   884  // Parameters:
   885  // appID - the application ID.
   886  // versionID - the version ID.
   887  // entityID - the entity model ID.
   888  // entityRoleCreateObject - an entity role object containing the name of role.
   889  func (client ModelClient) CreateClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
   890  	if tracing.IsEnabled() {
   891  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreateClosedListEntityRole")
   892  		defer func() {
   893  			sc := -1
   894  			if result.Response.Response != nil {
   895  				sc = result.Response.Response.StatusCode
   896  			}
   897  			tracing.EndSpan(ctx, sc, err)
   898  		}()
   899  	}
   900  	req, err := client.CreateClosedListEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
   901  	if err != nil {
   902  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateClosedListEntityRole", nil, "Failure preparing request")
   903  		return
   904  	}
   905  
   906  	resp, err := client.CreateClosedListEntityRoleSender(req)
   907  	if err != nil {
   908  		result.Response = autorest.Response{Response: resp}
   909  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateClosedListEntityRole", resp, "Failure sending request")
   910  		return
   911  	}
   912  
   913  	result, err = client.CreateClosedListEntityRoleResponder(resp)
   914  	if err != nil {
   915  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateClosedListEntityRole", resp, "Failure responding to request")
   916  		return
   917  	}
   918  
   919  	return
   920  }
   921  
   922  // CreateClosedListEntityRolePreparer prepares the CreateClosedListEntityRole request.
   923  func (client ModelClient) CreateClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
   924  	urlParameters := map[string]interface{}{
   925  		"Endpoint": client.Endpoint,
   926  	}
   927  
   928  	pathParameters := map[string]interface{}{
   929  		"appId":     autorest.Encode("path", appID),
   930  		"entityId":  autorest.Encode("path", entityID),
   931  		"versionId": autorest.Encode("path", versionID),
   932  	}
   933  
   934  	preparer := autorest.CreatePreparer(
   935  		autorest.AsContentType("application/json; charset=utf-8"),
   936  		autorest.AsPost(),
   937  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
   938  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles", pathParameters),
   939  		autorest.WithJSON(entityRoleCreateObject))
   940  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
   941  }
   942  
   943  // CreateClosedListEntityRoleSender sends the CreateClosedListEntityRole request. The method will close the
   944  // http.Response Body if it receives an error.
   945  func (client ModelClient) CreateClosedListEntityRoleSender(req *http.Request) (*http.Response, error) {
   946  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
   947  }
   948  
   949  // CreateClosedListEntityRoleResponder handles the response to the CreateClosedListEntityRole request. The method always
   950  // closes the http.Response Body.
   951  func (client ModelClient) CreateClosedListEntityRoleResponder(resp *http.Response) (result UUID, err error) {
   952  	err = autorest.Respond(
   953  		resp,
   954  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
   955  		autorest.ByUnmarshallingJSON(&result.Value),
   956  		autorest.ByClosing())
   957  	result.Response = autorest.Response{Response: resp}
   958  	return
   959  }
   960  
   961  // CreateCompositeEntityRole sends the create composite entity role request.
   962  // Parameters:
   963  // appID - the application ID.
   964  // versionID - the version ID.
   965  // cEntityID - the composite entity extractor ID.
   966  // entityRoleCreateObject - an entity role object containing the name of role.
   967  func (client ModelClient) CreateCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
   968  	if tracing.IsEnabled() {
   969  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreateCompositeEntityRole")
   970  		defer func() {
   971  			sc := -1
   972  			if result.Response.Response != nil {
   973  				sc = result.Response.Response.StatusCode
   974  			}
   975  			tracing.EndSpan(ctx, sc, err)
   976  		}()
   977  	}
   978  	req, err := client.CreateCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, entityRoleCreateObject)
   979  	if err != nil {
   980  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateCompositeEntityRole", nil, "Failure preparing request")
   981  		return
   982  	}
   983  
   984  	resp, err := client.CreateCompositeEntityRoleSender(req)
   985  	if err != nil {
   986  		result.Response = autorest.Response{Response: resp}
   987  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateCompositeEntityRole", resp, "Failure sending request")
   988  		return
   989  	}
   990  
   991  	result, err = client.CreateCompositeEntityRoleResponder(resp)
   992  	if err != nil {
   993  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateCompositeEntityRole", resp, "Failure responding to request")
   994  		return
   995  	}
   996  
   997  	return
   998  }
   999  
  1000  // CreateCompositeEntityRolePreparer prepares the CreateCompositeEntityRole request.
  1001  func (client ModelClient) CreateCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
  1002  	urlParameters := map[string]interface{}{
  1003  		"Endpoint": client.Endpoint,
  1004  	}
  1005  
  1006  	pathParameters := map[string]interface{}{
  1007  		"appId":     autorest.Encode("path", appID),
  1008  		"cEntityId": autorest.Encode("path", cEntityID),
  1009  		"versionId": autorest.Encode("path", versionID),
  1010  	}
  1011  
  1012  	preparer := autorest.CreatePreparer(
  1013  		autorest.AsContentType("application/json; charset=utf-8"),
  1014  		autorest.AsPost(),
  1015  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  1016  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles", pathParameters),
  1017  		autorest.WithJSON(entityRoleCreateObject))
  1018  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  1019  }
  1020  
  1021  // CreateCompositeEntityRoleSender sends the CreateCompositeEntityRole request. The method will close the
  1022  // http.Response Body if it receives an error.
  1023  func (client ModelClient) CreateCompositeEntityRoleSender(req *http.Request) (*http.Response, error) {
  1024  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1025  }
  1026  
  1027  // CreateCompositeEntityRoleResponder handles the response to the CreateCompositeEntityRole request. The method always
  1028  // closes the http.Response Body.
  1029  func (client ModelClient) CreateCompositeEntityRoleResponder(resp *http.Response) (result UUID, err error) {
  1030  	err = autorest.Respond(
  1031  		resp,
  1032  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
  1033  		autorest.ByUnmarshallingJSON(&result.Value),
  1034  		autorest.ByClosing())
  1035  	result.Response = autorest.Response{Response: resp}
  1036  	return
  1037  }
  1038  
  1039  // CreateCustomPrebuiltEntityRole sends the create custom prebuilt entity role request.
  1040  // Parameters:
  1041  // appID - the application ID.
  1042  // versionID - the version ID.
  1043  // entityID - the entity model ID.
  1044  // entityRoleCreateObject - an entity role object containing the name of role.
  1045  func (client ModelClient) CreateCustomPrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
  1046  	if tracing.IsEnabled() {
  1047  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreateCustomPrebuiltEntityRole")
  1048  		defer func() {
  1049  			sc := -1
  1050  			if result.Response.Response != nil {
  1051  				sc = result.Response.Response.StatusCode
  1052  			}
  1053  			tracing.EndSpan(ctx, sc, err)
  1054  		}()
  1055  	}
  1056  	req, err := client.CreateCustomPrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
  1057  	if err != nil {
  1058  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateCustomPrebuiltEntityRole", nil, "Failure preparing request")
  1059  		return
  1060  	}
  1061  
  1062  	resp, err := client.CreateCustomPrebuiltEntityRoleSender(req)
  1063  	if err != nil {
  1064  		result.Response = autorest.Response{Response: resp}
  1065  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateCustomPrebuiltEntityRole", resp, "Failure sending request")
  1066  		return
  1067  	}
  1068  
  1069  	result, err = client.CreateCustomPrebuiltEntityRoleResponder(resp)
  1070  	if err != nil {
  1071  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateCustomPrebuiltEntityRole", resp, "Failure responding to request")
  1072  		return
  1073  	}
  1074  
  1075  	return
  1076  }
  1077  
  1078  // CreateCustomPrebuiltEntityRolePreparer prepares the CreateCustomPrebuiltEntityRole request.
  1079  func (client ModelClient) CreateCustomPrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
  1080  	urlParameters := map[string]interface{}{
  1081  		"Endpoint": client.Endpoint,
  1082  	}
  1083  
  1084  	pathParameters := map[string]interface{}{
  1085  		"appId":     autorest.Encode("path", appID),
  1086  		"entityId":  autorest.Encode("path", entityID),
  1087  		"versionId": autorest.Encode("path", versionID),
  1088  	}
  1089  
  1090  	preparer := autorest.CreatePreparer(
  1091  		autorest.AsContentType("application/json; charset=utf-8"),
  1092  		autorest.AsPost(),
  1093  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  1094  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles", pathParameters),
  1095  		autorest.WithJSON(entityRoleCreateObject))
  1096  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  1097  }
  1098  
  1099  // CreateCustomPrebuiltEntityRoleSender sends the CreateCustomPrebuiltEntityRole request. The method will close the
  1100  // http.Response Body if it receives an error.
  1101  func (client ModelClient) CreateCustomPrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
  1102  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1103  }
  1104  
  1105  // CreateCustomPrebuiltEntityRoleResponder handles the response to the CreateCustomPrebuiltEntityRole request. The method always
  1106  // closes the http.Response Body.
  1107  func (client ModelClient) CreateCustomPrebuiltEntityRoleResponder(resp *http.Response) (result UUID, err error) {
  1108  	err = autorest.Respond(
  1109  		resp,
  1110  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
  1111  		autorest.ByUnmarshallingJSON(&result.Value),
  1112  		autorest.ByClosing())
  1113  	result.Response = autorest.Response{Response: resp}
  1114  	return
  1115  }
  1116  
  1117  // CreateEntityRole sends the create entity role request.
  1118  // Parameters:
  1119  // appID - the application ID.
  1120  // versionID - the version ID.
  1121  // entityID - the entity model ID.
  1122  // entityRoleCreateObject - an entity role object containing the name of role.
  1123  func (client ModelClient) CreateEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
  1124  	if tracing.IsEnabled() {
  1125  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreateEntityRole")
  1126  		defer func() {
  1127  			sc := -1
  1128  			if result.Response.Response != nil {
  1129  				sc = result.Response.Response.StatusCode
  1130  			}
  1131  			tracing.EndSpan(ctx, sc, err)
  1132  		}()
  1133  	}
  1134  	req, err := client.CreateEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
  1135  	if err != nil {
  1136  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateEntityRole", nil, "Failure preparing request")
  1137  		return
  1138  	}
  1139  
  1140  	resp, err := client.CreateEntityRoleSender(req)
  1141  	if err != nil {
  1142  		result.Response = autorest.Response{Response: resp}
  1143  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateEntityRole", resp, "Failure sending request")
  1144  		return
  1145  	}
  1146  
  1147  	result, err = client.CreateEntityRoleResponder(resp)
  1148  	if err != nil {
  1149  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateEntityRole", resp, "Failure responding to request")
  1150  		return
  1151  	}
  1152  
  1153  	return
  1154  }
  1155  
  1156  // CreateEntityRolePreparer prepares the CreateEntityRole request.
  1157  func (client ModelClient) CreateEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
  1158  	urlParameters := map[string]interface{}{
  1159  		"Endpoint": client.Endpoint,
  1160  	}
  1161  
  1162  	pathParameters := map[string]interface{}{
  1163  		"appId":     autorest.Encode("path", appID),
  1164  		"entityId":  autorest.Encode("path", entityID),
  1165  		"versionId": autorest.Encode("path", versionID),
  1166  	}
  1167  
  1168  	preparer := autorest.CreatePreparer(
  1169  		autorest.AsContentType("application/json; charset=utf-8"),
  1170  		autorest.AsPost(),
  1171  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  1172  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles", pathParameters),
  1173  		autorest.WithJSON(entityRoleCreateObject))
  1174  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  1175  }
  1176  
  1177  // CreateEntityRoleSender sends the CreateEntityRole request. The method will close the
  1178  // http.Response Body if it receives an error.
  1179  func (client ModelClient) CreateEntityRoleSender(req *http.Request) (*http.Response, error) {
  1180  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1181  }
  1182  
  1183  // CreateEntityRoleResponder handles the response to the CreateEntityRole request. The method always
  1184  // closes the http.Response Body.
  1185  func (client ModelClient) CreateEntityRoleResponder(resp *http.Response) (result UUID, err error) {
  1186  	err = autorest.Respond(
  1187  		resp,
  1188  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
  1189  		autorest.ByUnmarshallingJSON(&result.Value),
  1190  		autorest.ByClosing())
  1191  	result.Response = autorest.Response{Response: resp}
  1192  	return
  1193  }
  1194  
  1195  // CreateHierarchicalEntityRole sends the create hierarchical entity role request.
  1196  // Parameters:
  1197  // appID - the application ID.
  1198  // versionID - the version ID.
  1199  // hEntityID - the hierarchical entity extractor ID.
  1200  // entityRoleCreateObject - an entity role object containing the name of role.
  1201  func (client ModelClient) CreateHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
  1202  	if tracing.IsEnabled() {
  1203  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreateHierarchicalEntityRole")
  1204  		defer func() {
  1205  			sc := -1
  1206  			if result.Response.Response != nil {
  1207  				sc = result.Response.Response.StatusCode
  1208  			}
  1209  			tracing.EndSpan(ctx, sc, err)
  1210  		}()
  1211  	}
  1212  	req, err := client.CreateHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, entityRoleCreateObject)
  1213  	if err != nil {
  1214  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateHierarchicalEntityRole", nil, "Failure preparing request")
  1215  		return
  1216  	}
  1217  
  1218  	resp, err := client.CreateHierarchicalEntityRoleSender(req)
  1219  	if err != nil {
  1220  		result.Response = autorest.Response{Response: resp}
  1221  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateHierarchicalEntityRole", resp, "Failure sending request")
  1222  		return
  1223  	}
  1224  
  1225  	result, err = client.CreateHierarchicalEntityRoleResponder(resp)
  1226  	if err != nil {
  1227  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateHierarchicalEntityRole", resp, "Failure responding to request")
  1228  		return
  1229  	}
  1230  
  1231  	return
  1232  }
  1233  
  1234  // CreateHierarchicalEntityRolePreparer prepares the CreateHierarchicalEntityRole request.
  1235  func (client ModelClient) CreateHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
  1236  	urlParameters := map[string]interface{}{
  1237  		"Endpoint": client.Endpoint,
  1238  	}
  1239  
  1240  	pathParameters := map[string]interface{}{
  1241  		"appId":     autorest.Encode("path", appID),
  1242  		"hEntityId": autorest.Encode("path", hEntityID),
  1243  		"versionId": autorest.Encode("path", versionID),
  1244  	}
  1245  
  1246  	preparer := autorest.CreatePreparer(
  1247  		autorest.AsContentType("application/json; charset=utf-8"),
  1248  		autorest.AsPost(),
  1249  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  1250  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles", pathParameters),
  1251  		autorest.WithJSON(entityRoleCreateObject))
  1252  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  1253  }
  1254  
  1255  // CreateHierarchicalEntityRoleSender sends the CreateHierarchicalEntityRole request. The method will close the
  1256  // http.Response Body if it receives an error.
  1257  func (client ModelClient) CreateHierarchicalEntityRoleSender(req *http.Request) (*http.Response, error) {
  1258  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1259  }
  1260  
  1261  // CreateHierarchicalEntityRoleResponder handles the response to the CreateHierarchicalEntityRole request. The method always
  1262  // closes the http.Response Body.
  1263  func (client ModelClient) CreateHierarchicalEntityRoleResponder(resp *http.Response) (result UUID, err error) {
  1264  	err = autorest.Respond(
  1265  		resp,
  1266  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
  1267  		autorest.ByUnmarshallingJSON(&result.Value),
  1268  		autorest.ByClosing())
  1269  	result.Response = autorest.Response{Response: resp}
  1270  	return
  1271  }
  1272  
  1273  // CreatePatternAnyEntityModel sends the create pattern any entity model request.
  1274  // Parameters:
  1275  // appID - the application ID.
  1276  // versionID - the version ID.
  1277  // extractorCreateObject - a model object containing the name and explicit list for the new Pattern.Any entity
  1278  // extractor.
  1279  func (client ModelClient) CreatePatternAnyEntityModel(ctx context.Context, appID uuid.UUID, versionID string, extractorCreateObject PatternAnyModelCreateObject) (result UUID, err error) {
  1280  	if tracing.IsEnabled() {
  1281  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreatePatternAnyEntityModel")
  1282  		defer func() {
  1283  			sc := -1
  1284  			if result.Response.Response != nil {
  1285  				sc = result.Response.Response.StatusCode
  1286  			}
  1287  			tracing.EndSpan(ctx, sc, err)
  1288  		}()
  1289  	}
  1290  	req, err := client.CreatePatternAnyEntityModelPreparer(ctx, appID, versionID, extractorCreateObject)
  1291  	if err != nil {
  1292  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePatternAnyEntityModel", nil, "Failure preparing request")
  1293  		return
  1294  	}
  1295  
  1296  	resp, err := client.CreatePatternAnyEntityModelSender(req)
  1297  	if err != nil {
  1298  		result.Response = autorest.Response{Response: resp}
  1299  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePatternAnyEntityModel", resp, "Failure sending request")
  1300  		return
  1301  	}
  1302  
  1303  	result, err = client.CreatePatternAnyEntityModelResponder(resp)
  1304  	if err != nil {
  1305  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePatternAnyEntityModel", resp, "Failure responding to request")
  1306  		return
  1307  	}
  1308  
  1309  	return
  1310  }
  1311  
  1312  // CreatePatternAnyEntityModelPreparer prepares the CreatePatternAnyEntityModel request.
  1313  func (client ModelClient) CreatePatternAnyEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, extractorCreateObject PatternAnyModelCreateObject) (*http.Request, error) {
  1314  	urlParameters := map[string]interface{}{
  1315  		"Endpoint": client.Endpoint,
  1316  	}
  1317  
  1318  	pathParameters := map[string]interface{}{
  1319  		"appId":     autorest.Encode("path", appID),
  1320  		"versionId": autorest.Encode("path", versionID),
  1321  	}
  1322  
  1323  	preparer := autorest.CreatePreparer(
  1324  		autorest.AsContentType("application/json; charset=utf-8"),
  1325  		autorest.AsPost(),
  1326  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  1327  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities", pathParameters),
  1328  		autorest.WithJSON(extractorCreateObject))
  1329  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  1330  }
  1331  
  1332  // CreatePatternAnyEntityModelSender sends the CreatePatternAnyEntityModel request. The method will close the
  1333  // http.Response Body if it receives an error.
  1334  func (client ModelClient) CreatePatternAnyEntityModelSender(req *http.Request) (*http.Response, error) {
  1335  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1336  }
  1337  
  1338  // CreatePatternAnyEntityModelResponder handles the response to the CreatePatternAnyEntityModel request. The method always
  1339  // closes the http.Response Body.
  1340  func (client ModelClient) CreatePatternAnyEntityModelResponder(resp *http.Response) (result UUID, err error) {
  1341  	err = autorest.Respond(
  1342  		resp,
  1343  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
  1344  		autorest.ByUnmarshallingJSON(&result.Value),
  1345  		autorest.ByClosing())
  1346  	result.Response = autorest.Response{Response: resp}
  1347  	return
  1348  }
  1349  
  1350  // CreatePatternAnyEntityRole sends the create pattern any entity role request.
  1351  // Parameters:
  1352  // appID - the application ID.
  1353  // versionID - the version ID.
  1354  // entityID - the entity model ID.
  1355  // entityRoleCreateObject - an entity role object containing the name of role.
  1356  func (client ModelClient) CreatePatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
  1357  	if tracing.IsEnabled() {
  1358  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreatePatternAnyEntityRole")
  1359  		defer func() {
  1360  			sc := -1
  1361  			if result.Response.Response != nil {
  1362  				sc = result.Response.Response.StatusCode
  1363  			}
  1364  			tracing.EndSpan(ctx, sc, err)
  1365  		}()
  1366  	}
  1367  	req, err := client.CreatePatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
  1368  	if err != nil {
  1369  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePatternAnyEntityRole", nil, "Failure preparing request")
  1370  		return
  1371  	}
  1372  
  1373  	resp, err := client.CreatePatternAnyEntityRoleSender(req)
  1374  	if err != nil {
  1375  		result.Response = autorest.Response{Response: resp}
  1376  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePatternAnyEntityRole", resp, "Failure sending request")
  1377  		return
  1378  	}
  1379  
  1380  	result, err = client.CreatePatternAnyEntityRoleResponder(resp)
  1381  	if err != nil {
  1382  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePatternAnyEntityRole", resp, "Failure responding to request")
  1383  		return
  1384  	}
  1385  
  1386  	return
  1387  }
  1388  
  1389  // CreatePatternAnyEntityRolePreparer prepares the CreatePatternAnyEntityRole request.
  1390  func (client ModelClient) CreatePatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
  1391  	urlParameters := map[string]interface{}{
  1392  		"Endpoint": client.Endpoint,
  1393  	}
  1394  
  1395  	pathParameters := map[string]interface{}{
  1396  		"appId":     autorest.Encode("path", appID),
  1397  		"entityId":  autorest.Encode("path", entityID),
  1398  		"versionId": autorest.Encode("path", versionID),
  1399  	}
  1400  
  1401  	preparer := autorest.CreatePreparer(
  1402  		autorest.AsContentType("application/json; charset=utf-8"),
  1403  		autorest.AsPost(),
  1404  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  1405  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles", pathParameters),
  1406  		autorest.WithJSON(entityRoleCreateObject))
  1407  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  1408  }
  1409  
  1410  // CreatePatternAnyEntityRoleSender sends the CreatePatternAnyEntityRole request. The method will close the
  1411  // http.Response Body if it receives an error.
  1412  func (client ModelClient) CreatePatternAnyEntityRoleSender(req *http.Request) (*http.Response, error) {
  1413  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1414  }
  1415  
  1416  // CreatePatternAnyEntityRoleResponder handles the response to the CreatePatternAnyEntityRole request. The method always
  1417  // closes the http.Response Body.
  1418  func (client ModelClient) CreatePatternAnyEntityRoleResponder(resp *http.Response) (result UUID, err error) {
  1419  	err = autorest.Respond(
  1420  		resp,
  1421  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
  1422  		autorest.ByUnmarshallingJSON(&result.Value),
  1423  		autorest.ByClosing())
  1424  	result.Response = autorest.Response{Response: resp}
  1425  	return
  1426  }
  1427  
  1428  // CreatePrebuiltEntityRole sends the create prebuilt entity role request.
  1429  // Parameters:
  1430  // appID - the application ID.
  1431  // versionID - the version ID.
  1432  // entityID - the entity model ID.
  1433  // entityRoleCreateObject - an entity role object containing the name of role.
  1434  func (client ModelClient) CreatePrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
  1435  	if tracing.IsEnabled() {
  1436  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreatePrebuiltEntityRole")
  1437  		defer func() {
  1438  			sc := -1
  1439  			if result.Response.Response != nil {
  1440  				sc = result.Response.Response.StatusCode
  1441  			}
  1442  			tracing.EndSpan(ctx, sc, err)
  1443  		}()
  1444  	}
  1445  	req, err := client.CreatePrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
  1446  	if err != nil {
  1447  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePrebuiltEntityRole", nil, "Failure preparing request")
  1448  		return
  1449  	}
  1450  
  1451  	resp, err := client.CreatePrebuiltEntityRoleSender(req)
  1452  	if err != nil {
  1453  		result.Response = autorest.Response{Response: resp}
  1454  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePrebuiltEntityRole", resp, "Failure sending request")
  1455  		return
  1456  	}
  1457  
  1458  	result, err = client.CreatePrebuiltEntityRoleResponder(resp)
  1459  	if err != nil {
  1460  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreatePrebuiltEntityRole", resp, "Failure responding to request")
  1461  		return
  1462  	}
  1463  
  1464  	return
  1465  }
  1466  
  1467  // CreatePrebuiltEntityRolePreparer prepares the CreatePrebuiltEntityRole request.
  1468  func (client ModelClient) CreatePrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
  1469  	urlParameters := map[string]interface{}{
  1470  		"Endpoint": client.Endpoint,
  1471  	}
  1472  
  1473  	pathParameters := map[string]interface{}{
  1474  		"appId":     autorest.Encode("path", appID),
  1475  		"entityId":  autorest.Encode("path", entityID),
  1476  		"versionId": autorest.Encode("path", versionID),
  1477  	}
  1478  
  1479  	preparer := autorest.CreatePreparer(
  1480  		autorest.AsContentType("application/json; charset=utf-8"),
  1481  		autorest.AsPost(),
  1482  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  1483  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles", pathParameters),
  1484  		autorest.WithJSON(entityRoleCreateObject))
  1485  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  1486  }
  1487  
  1488  // CreatePrebuiltEntityRoleSender sends the CreatePrebuiltEntityRole request. The method will close the
  1489  // http.Response Body if it receives an error.
  1490  func (client ModelClient) CreatePrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
  1491  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1492  }
  1493  
  1494  // CreatePrebuiltEntityRoleResponder handles the response to the CreatePrebuiltEntityRole request. The method always
  1495  // closes the http.Response Body.
  1496  func (client ModelClient) CreatePrebuiltEntityRoleResponder(resp *http.Response) (result UUID, err error) {
  1497  	err = autorest.Respond(
  1498  		resp,
  1499  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
  1500  		autorest.ByUnmarshallingJSON(&result.Value),
  1501  		autorest.ByClosing())
  1502  	result.Response = autorest.Response{Response: resp}
  1503  	return
  1504  }
  1505  
  1506  // CreateRegexEntityModel sends the create regex entity model request.
  1507  // Parameters:
  1508  // appID - the application ID.
  1509  // versionID - the version ID.
  1510  // regexEntityExtractorCreateObj - a model object containing the name and regex pattern for the new regular
  1511  // expression entity extractor.
  1512  func (client ModelClient) CreateRegexEntityModel(ctx context.Context, appID uuid.UUID, versionID string, regexEntityExtractorCreateObj RegexModelCreateObject) (result UUID, err error) {
  1513  	if tracing.IsEnabled() {
  1514  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreateRegexEntityModel")
  1515  		defer func() {
  1516  			sc := -1
  1517  			if result.Response.Response != nil {
  1518  				sc = result.Response.Response.StatusCode
  1519  			}
  1520  			tracing.EndSpan(ctx, sc, err)
  1521  		}()
  1522  	}
  1523  	req, err := client.CreateRegexEntityModelPreparer(ctx, appID, versionID, regexEntityExtractorCreateObj)
  1524  	if err != nil {
  1525  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateRegexEntityModel", nil, "Failure preparing request")
  1526  		return
  1527  	}
  1528  
  1529  	resp, err := client.CreateRegexEntityModelSender(req)
  1530  	if err != nil {
  1531  		result.Response = autorest.Response{Response: resp}
  1532  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateRegexEntityModel", resp, "Failure sending request")
  1533  		return
  1534  	}
  1535  
  1536  	result, err = client.CreateRegexEntityModelResponder(resp)
  1537  	if err != nil {
  1538  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateRegexEntityModel", resp, "Failure responding to request")
  1539  		return
  1540  	}
  1541  
  1542  	return
  1543  }
  1544  
  1545  // CreateRegexEntityModelPreparer prepares the CreateRegexEntityModel request.
  1546  func (client ModelClient) CreateRegexEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityExtractorCreateObj RegexModelCreateObject) (*http.Request, error) {
  1547  	urlParameters := map[string]interface{}{
  1548  		"Endpoint": client.Endpoint,
  1549  	}
  1550  
  1551  	pathParameters := map[string]interface{}{
  1552  		"appId":     autorest.Encode("path", appID),
  1553  		"versionId": autorest.Encode("path", versionID),
  1554  	}
  1555  
  1556  	preparer := autorest.CreatePreparer(
  1557  		autorest.AsContentType("application/json; charset=utf-8"),
  1558  		autorest.AsPost(),
  1559  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  1560  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities", pathParameters),
  1561  		autorest.WithJSON(regexEntityExtractorCreateObj))
  1562  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  1563  }
  1564  
  1565  // CreateRegexEntityModelSender sends the CreateRegexEntityModel request. The method will close the
  1566  // http.Response Body if it receives an error.
  1567  func (client ModelClient) CreateRegexEntityModelSender(req *http.Request) (*http.Response, error) {
  1568  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1569  }
  1570  
  1571  // CreateRegexEntityModelResponder handles the response to the CreateRegexEntityModel request. The method always
  1572  // closes the http.Response Body.
  1573  func (client ModelClient) CreateRegexEntityModelResponder(resp *http.Response) (result UUID, err error) {
  1574  	err = autorest.Respond(
  1575  		resp,
  1576  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
  1577  		autorest.ByUnmarshallingJSON(&result.Value),
  1578  		autorest.ByClosing())
  1579  	result.Response = autorest.Response{Response: resp}
  1580  	return
  1581  }
  1582  
  1583  // CreateRegexEntityRole sends the create regex entity role request.
  1584  // Parameters:
  1585  // appID - the application ID.
  1586  // versionID - the version ID.
  1587  // entityID - the entity model ID.
  1588  // entityRoleCreateObject - an entity role object containing the name of role.
  1589  func (client ModelClient) CreateRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (result UUID, err error) {
  1590  	if tracing.IsEnabled() {
  1591  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.CreateRegexEntityRole")
  1592  		defer func() {
  1593  			sc := -1
  1594  			if result.Response.Response != nil {
  1595  				sc = result.Response.Response.StatusCode
  1596  			}
  1597  			tracing.EndSpan(ctx, sc, err)
  1598  		}()
  1599  	}
  1600  	req, err := client.CreateRegexEntityRolePreparer(ctx, appID, versionID, entityID, entityRoleCreateObject)
  1601  	if err != nil {
  1602  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateRegexEntityRole", nil, "Failure preparing request")
  1603  		return
  1604  	}
  1605  
  1606  	resp, err := client.CreateRegexEntityRoleSender(req)
  1607  	if err != nil {
  1608  		result.Response = autorest.Response{Response: resp}
  1609  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateRegexEntityRole", resp, "Failure sending request")
  1610  		return
  1611  	}
  1612  
  1613  	result, err = client.CreateRegexEntityRoleResponder(resp)
  1614  	if err != nil {
  1615  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "CreateRegexEntityRole", resp, "Failure responding to request")
  1616  		return
  1617  	}
  1618  
  1619  	return
  1620  }
  1621  
  1622  // CreateRegexEntityRolePreparer prepares the CreateRegexEntityRole request.
  1623  func (client ModelClient) CreateRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityRoleCreateObject EntityRoleCreateObject) (*http.Request, error) {
  1624  	urlParameters := map[string]interface{}{
  1625  		"Endpoint": client.Endpoint,
  1626  	}
  1627  
  1628  	pathParameters := map[string]interface{}{
  1629  		"appId":     autorest.Encode("path", appID),
  1630  		"entityId":  autorest.Encode("path", entityID),
  1631  		"versionId": autorest.Encode("path", versionID),
  1632  	}
  1633  
  1634  	preparer := autorest.CreatePreparer(
  1635  		autorest.AsContentType("application/json; charset=utf-8"),
  1636  		autorest.AsPost(),
  1637  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  1638  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles", pathParameters),
  1639  		autorest.WithJSON(entityRoleCreateObject))
  1640  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  1641  }
  1642  
  1643  // CreateRegexEntityRoleSender sends the CreateRegexEntityRole request. The method will close the
  1644  // http.Response Body if it receives an error.
  1645  func (client ModelClient) CreateRegexEntityRoleSender(req *http.Request) (*http.Response, error) {
  1646  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1647  }
  1648  
  1649  // CreateRegexEntityRoleResponder handles the response to the CreateRegexEntityRole request. The method always
  1650  // closes the http.Response Body.
  1651  func (client ModelClient) CreateRegexEntityRoleResponder(resp *http.Response) (result UUID, err error) {
  1652  	err = autorest.Respond(
  1653  		resp,
  1654  		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
  1655  		autorest.ByUnmarshallingJSON(&result.Value),
  1656  		autorest.ByClosing())
  1657  	result.Response = autorest.Response{Response: resp}
  1658  	return
  1659  }
  1660  
  1661  // DeleteClosedList deletes a list entity model from a version of the application.
  1662  // Parameters:
  1663  // appID - the application ID.
  1664  // versionID - the version ID.
  1665  // clEntityID - the list entity model ID.
  1666  func (client ModelClient) DeleteClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (result OperationStatus, err error) {
  1667  	if tracing.IsEnabled() {
  1668  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteClosedList")
  1669  		defer func() {
  1670  			sc := -1
  1671  			if result.Response.Response != nil {
  1672  				sc = result.Response.Response.StatusCode
  1673  			}
  1674  			tracing.EndSpan(ctx, sc, err)
  1675  		}()
  1676  	}
  1677  	req, err := client.DeleteClosedListPreparer(ctx, appID, versionID, clEntityID)
  1678  	if err != nil {
  1679  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteClosedList", nil, "Failure preparing request")
  1680  		return
  1681  	}
  1682  
  1683  	resp, err := client.DeleteClosedListSender(req)
  1684  	if err != nil {
  1685  		result.Response = autorest.Response{Response: resp}
  1686  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteClosedList", resp, "Failure sending request")
  1687  		return
  1688  	}
  1689  
  1690  	result, err = client.DeleteClosedListResponder(resp)
  1691  	if err != nil {
  1692  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteClosedList", resp, "Failure responding to request")
  1693  		return
  1694  	}
  1695  
  1696  	return
  1697  }
  1698  
  1699  // DeleteClosedListPreparer prepares the DeleteClosedList request.
  1700  func (client ModelClient) DeleteClosedListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (*http.Request, error) {
  1701  	urlParameters := map[string]interface{}{
  1702  		"Endpoint": client.Endpoint,
  1703  	}
  1704  
  1705  	pathParameters := map[string]interface{}{
  1706  		"appId":      autorest.Encode("path", appID),
  1707  		"clEntityId": autorest.Encode("path", clEntityID),
  1708  		"versionId":  autorest.Encode("path", versionID),
  1709  	}
  1710  
  1711  	preparer := autorest.CreatePreparer(
  1712  		autorest.AsDelete(),
  1713  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  1714  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters))
  1715  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  1716  }
  1717  
  1718  // DeleteClosedListSender sends the DeleteClosedList request. The method will close the
  1719  // http.Response Body if it receives an error.
  1720  func (client ModelClient) DeleteClosedListSender(req *http.Request) (*http.Response, error) {
  1721  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1722  }
  1723  
  1724  // DeleteClosedListResponder handles the response to the DeleteClosedList request. The method always
  1725  // closes the http.Response Body.
  1726  func (client ModelClient) DeleteClosedListResponder(resp *http.Response) (result OperationStatus, err error) {
  1727  	err = autorest.Respond(
  1728  		resp,
  1729  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  1730  		autorest.ByUnmarshallingJSON(&result),
  1731  		autorest.ByClosing())
  1732  	result.Response = autorest.Response{Response: resp}
  1733  	return
  1734  }
  1735  
  1736  // DeleteClosedListEntityRole sends the delete closed list entity role request.
  1737  // Parameters:
  1738  // appID - the application ID.
  1739  // versionID - the version ID.
  1740  // entityID - the entity ID.
  1741  // roleID - the entity role Id.
  1742  func (client ModelClient) DeleteClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
  1743  	if tracing.IsEnabled() {
  1744  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteClosedListEntityRole")
  1745  		defer func() {
  1746  			sc := -1
  1747  			if result.Response.Response != nil {
  1748  				sc = result.Response.Response.StatusCode
  1749  			}
  1750  			tracing.EndSpan(ctx, sc, err)
  1751  		}()
  1752  	}
  1753  	req, err := client.DeleteClosedListEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
  1754  	if err != nil {
  1755  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteClosedListEntityRole", nil, "Failure preparing request")
  1756  		return
  1757  	}
  1758  
  1759  	resp, err := client.DeleteClosedListEntityRoleSender(req)
  1760  	if err != nil {
  1761  		result.Response = autorest.Response{Response: resp}
  1762  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteClosedListEntityRole", resp, "Failure sending request")
  1763  		return
  1764  	}
  1765  
  1766  	result, err = client.DeleteClosedListEntityRoleResponder(resp)
  1767  	if err != nil {
  1768  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteClosedListEntityRole", resp, "Failure responding to request")
  1769  		return
  1770  	}
  1771  
  1772  	return
  1773  }
  1774  
  1775  // DeleteClosedListEntityRolePreparer prepares the DeleteClosedListEntityRole request.
  1776  func (client ModelClient) DeleteClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  1777  	urlParameters := map[string]interface{}{
  1778  		"Endpoint": client.Endpoint,
  1779  	}
  1780  
  1781  	pathParameters := map[string]interface{}{
  1782  		"appId":     autorest.Encode("path", appID),
  1783  		"entityId":  autorest.Encode("path", entityID),
  1784  		"roleId":    autorest.Encode("path", roleID),
  1785  		"versionId": autorest.Encode("path", versionID),
  1786  	}
  1787  
  1788  	preparer := autorest.CreatePreparer(
  1789  		autorest.AsDelete(),
  1790  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  1791  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters))
  1792  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  1793  }
  1794  
  1795  // DeleteClosedListEntityRoleSender sends the DeleteClosedListEntityRole request. The method will close the
  1796  // http.Response Body if it receives an error.
  1797  func (client ModelClient) DeleteClosedListEntityRoleSender(req *http.Request) (*http.Response, error) {
  1798  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1799  }
  1800  
  1801  // DeleteClosedListEntityRoleResponder handles the response to the DeleteClosedListEntityRole request. The method always
  1802  // closes the http.Response Body.
  1803  func (client ModelClient) DeleteClosedListEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  1804  	err = autorest.Respond(
  1805  		resp,
  1806  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  1807  		autorest.ByUnmarshallingJSON(&result),
  1808  		autorest.ByClosing())
  1809  	result.Response = autorest.Response{Response: resp}
  1810  	return
  1811  }
  1812  
  1813  // DeleteCompositeEntity deletes a composite entity from a version of the application.
  1814  // Parameters:
  1815  // appID - the application ID.
  1816  // versionID - the version ID.
  1817  // cEntityID - the composite entity extractor ID.
  1818  func (client ModelClient) DeleteCompositeEntity(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result OperationStatus, err error) {
  1819  	if tracing.IsEnabled() {
  1820  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteCompositeEntity")
  1821  		defer func() {
  1822  			sc := -1
  1823  			if result.Response.Response != nil {
  1824  				sc = result.Response.Response.StatusCode
  1825  			}
  1826  			tracing.EndSpan(ctx, sc, err)
  1827  		}()
  1828  	}
  1829  	req, err := client.DeleteCompositeEntityPreparer(ctx, appID, versionID, cEntityID)
  1830  	if err != nil {
  1831  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntity", nil, "Failure preparing request")
  1832  		return
  1833  	}
  1834  
  1835  	resp, err := client.DeleteCompositeEntitySender(req)
  1836  	if err != nil {
  1837  		result.Response = autorest.Response{Response: resp}
  1838  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntity", resp, "Failure sending request")
  1839  		return
  1840  	}
  1841  
  1842  	result, err = client.DeleteCompositeEntityResponder(resp)
  1843  	if err != nil {
  1844  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntity", resp, "Failure responding to request")
  1845  		return
  1846  	}
  1847  
  1848  	return
  1849  }
  1850  
  1851  // DeleteCompositeEntityPreparer prepares the DeleteCompositeEntity request.
  1852  func (client ModelClient) DeleteCompositeEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (*http.Request, error) {
  1853  	urlParameters := map[string]interface{}{
  1854  		"Endpoint": client.Endpoint,
  1855  	}
  1856  
  1857  	pathParameters := map[string]interface{}{
  1858  		"appId":     autorest.Encode("path", appID),
  1859  		"cEntityId": autorest.Encode("path", cEntityID),
  1860  		"versionId": autorest.Encode("path", versionID),
  1861  	}
  1862  
  1863  	preparer := autorest.CreatePreparer(
  1864  		autorest.AsDelete(),
  1865  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  1866  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters))
  1867  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  1868  }
  1869  
  1870  // DeleteCompositeEntitySender sends the DeleteCompositeEntity request. The method will close the
  1871  // http.Response Body if it receives an error.
  1872  func (client ModelClient) DeleteCompositeEntitySender(req *http.Request) (*http.Response, error) {
  1873  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1874  }
  1875  
  1876  // DeleteCompositeEntityResponder handles the response to the DeleteCompositeEntity request. The method always
  1877  // closes the http.Response Body.
  1878  func (client ModelClient) DeleteCompositeEntityResponder(resp *http.Response) (result OperationStatus, err error) {
  1879  	err = autorest.Respond(
  1880  		resp,
  1881  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  1882  		autorest.ByUnmarshallingJSON(&result),
  1883  		autorest.ByClosing())
  1884  	result.Response = autorest.Response{Response: resp}
  1885  	return
  1886  }
  1887  
  1888  // DeleteCompositeEntityChild deletes a composite entity extractor child from a version of the application.
  1889  // Parameters:
  1890  // appID - the application ID.
  1891  // versionID - the version ID.
  1892  // cEntityID - the composite entity extractor ID.
  1893  // cChildID - the hierarchical entity extractor child ID.
  1894  func (client ModelClient) DeleteCompositeEntityChild(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, cChildID uuid.UUID) (result OperationStatus, err error) {
  1895  	if tracing.IsEnabled() {
  1896  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteCompositeEntityChild")
  1897  		defer func() {
  1898  			sc := -1
  1899  			if result.Response.Response != nil {
  1900  				sc = result.Response.Response.StatusCode
  1901  			}
  1902  			tracing.EndSpan(ctx, sc, err)
  1903  		}()
  1904  	}
  1905  	req, err := client.DeleteCompositeEntityChildPreparer(ctx, appID, versionID, cEntityID, cChildID)
  1906  	if err != nil {
  1907  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntityChild", nil, "Failure preparing request")
  1908  		return
  1909  	}
  1910  
  1911  	resp, err := client.DeleteCompositeEntityChildSender(req)
  1912  	if err != nil {
  1913  		result.Response = autorest.Response{Response: resp}
  1914  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntityChild", resp, "Failure sending request")
  1915  		return
  1916  	}
  1917  
  1918  	result, err = client.DeleteCompositeEntityChildResponder(resp)
  1919  	if err != nil {
  1920  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntityChild", resp, "Failure responding to request")
  1921  		return
  1922  	}
  1923  
  1924  	return
  1925  }
  1926  
  1927  // DeleteCompositeEntityChildPreparer prepares the DeleteCompositeEntityChild request.
  1928  func (client ModelClient) DeleteCompositeEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, cChildID uuid.UUID) (*http.Request, error) {
  1929  	urlParameters := map[string]interface{}{
  1930  		"Endpoint": client.Endpoint,
  1931  	}
  1932  
  1933  	pathParameters := map[string]interface{}{
  1934  		"appId":     autorest.Encode("path", appID),
  1935  		"cChildId":  autorest.Encode("path", cChildID),
  1936  		"cEntityId": autorest.Encode("path", cEntityID),
  1937  		"versionId": autorest.Encode("path", versionID),
  1938  	}
  1939  
  1940  	preparer := autorest.CreatePreparer(
  1941  		autorest.AsDelete(),
  1942  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  1943  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children/{cChildId}", pathParameters))
  1944  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  1945  }
  1946  
  1947  // DeleteCompositeEntityChildSender sends the DeleteCompositeEntityChild request. The method will close the
  1948  // http.Response Body if it receives an error.
  1949  func (client ModelClient) DeleteCompositeEntityChildSender(req *http.Request) (*http.Response, error) {
  1950  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  1951  }
  1952  
  1953  // DeleteCompositeEntityChildResponder handles the response to the DeleteCompositeEntityChild request. The method always
  1954  // closes the http.Response Body.
  1955  func (client ModelClient) DeleteCompositeEntityChildResponder(resp *http.Response) (result OperationStatus, err error) {
  1956  	err = autorest.Respond(
  1957  		resp,
  1958  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  1959  		autorest.ByUnmarshallingJSON(&result),
  1960  		autorest.ByClosing())
  1961  	result.Response = autorest.Response{Response: resp}
  1962  	return
  1963  }
  1964  
  1965  // DeleteCompositeEntityRole sends the delete composite entity role request.
  1966  // Parameters:
  1967  // appID - the application ID.
  1968  // versionID - the version ID.
  1969  // cEntityID - the composite entity extractor ID.
  1970  // roleID - the entity role Id.
  1971  func (client ModelClient) DeleteCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
  1972  	if tracing.IsEnabled() {
  1973  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteCompositeEntityRole")
  1974  		defer func() {
  1975  			sc := -1
  1976  			if result.Response.Response != nil {
  1977  				sc = result.Response.Response.StatusCode
  1978  			}
  1979  			tracing.EndSpan(ctx, sc, err)
  1980  		}()
  1981  	}
  1982  	req, err := client.DeleteCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, roleID)
  1983  	if err != nil {
  1984  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntityRole", nil, "Failure preparing request")
  1985  		return
  1986  	}
  1987  
  1988  	resp, err := client.DeleteCompositeEntityRoleSender(req)
  1989  	if err != nil {
  1990  		result.Response = autorest.Response{Response: resp}
  1991  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntityRole", resp, "Failure sending request")
  1992  		return
  1993  	}
  1994  
  1995  	result, err = client.DeleteCompositeEntityRoleResponder(resp)
  1996  	if err != nil {
  1997  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCompositeEntityRole", resp, "Failure responding to request")
  1998  		return
  1999  	}
  2000  
  2001  	return
  2002  }
  2003  
  2004  // DeleteCompositeEntityRolePreparer prepares the DeleteCompositeEntityRole request.
  2005  func (client ModelClient) DeleteCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  2006  	urlParameters := map[string]interface{}{
  2007  		"Endpoint": client.Endpoint,
  2008  	}
  2009  
  2010  	pathParameters := map[string]interface{}{
  2011  		"appId":     autorest.Encode("path", appID),
  2012  		"cEntityId": autorest.Encode("path", cEntityID),
  2013  		"roleId":    autorest.Encode("path", roleID),
  2014  		"versionId": autorest.Encode("path", versionID),
  2015  	}
  2016  
  2017  	preparer := autorest.CreatePreparer(
  2018  		autorest.AsDelete(),
  2019  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  2020  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters))
  2021  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  2022  }
  2023  
  2024  // DeleteCompositeEntityRoleSender sends the DeleteCompositeEntityRole request. The method will close the
  2025  // http.Response Body if it receives an error.
  2026  func (client ModelClient) DeleteCompositeEntityRoleSender(req *http.Request) (*http.Response, error) {
  2027  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2028  }
  2029  
  2030  // DeleteCompositeEntityRoleResponder handles the response to the DeleteCompositeEntityRole request. The method always
  2031  // closes the http.Response Body.
  2032  func (client ModelClient) DeleteCompositeEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  2033  	err = autorest.Respond(
  2034  		resp,
  2035  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  2036  		autorest.ByUnmarshallingJSON(&result),
  2037  		autorest.ByClosing())
  2038  	result.Response = autorest.Response{Response: resp}
  2039  	return
  2040  }
  2041  
  2042  // DeleteCustomEntityRole sends the delete custom entity role request.
  2043  // Parameters:
  2044  // appID - the application ID.
  2045  // versionID - the version ID.
  2046  // entityID - the entity ID.
  2047  // roleID - the entity role Id.
  2048  func (client ModelClient) DeleteCustomEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
  2049  	if tracing.IsEnabled() {
  2050  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteCustomEntityRole")
  2051  		defer func() {
  2052  			sc := -1
  2053  			if result.Response.Response != nil {
  2054  				sc = result.Response.Response.StatusCode
  2055  			}
  2056  			tracing.EndSpan(ctx, sc, err)
  2057  		}()
  2058  	}
  2059  	req, err := client.DeleteCustomEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
  2060  	if err != nil {
  2061  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCustomEntityRole", nil, "Failure preparing request")
  2062  		return
  2063  	}
  2064  
  2065  	resp, err := client.DeleteCustomEntityRoleSender(req)
  2066  	if err != nil {
  2067  		result.Response = autorest.Response{Response: resp}
  2068  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCustomEntityRole", resp, "Failure sending request")
  2069  		return
  2070  	}
  2071  
  2072  	result, err = client.DeleteCustomEntityRoleResponder(resp)
  2073  	if err != nil {
  2074  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCustomEntityRole", resp, "Failure responding to request")
  2075  		return
  2076  	}
  2077  
  2078  	return
  2079  }
  2080  
  2081  // DeleteCustomEntityRolePreparer prepares the DeleteCustomEntityRole request.
  2082  func (client ModelClient) DeleteCustomEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  2083  	urlParameters := map[string]interface{}{
  2084  		"Endpoint": client.Endpoint,
  2085  	}
  2086  
  2087  	pathParameters := map[string]interface{}{
  2088  		"appId":     autorest.Encode("path", appID),
  2089  		"entityId":  autorest.Encode("path", entityID),
  2090  		"roleId":    autorest.Encode("path", roleID),
  2091  		"versionId": autorest.Encode("path", versionID),
  2092  	}
  2093  
  2094  	preparer := autorest.CreatePreparer(
  2095  		autorest.AsDelete(),
  2096  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  2097  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters))
  2098  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  2099  }
  2100  
  2101  // DeleteCustomEntityRoleSender sends the DeleteCustomEntityRole request. The method will close the
  2102  // http.Response Body if it receives an error.
  2103  func (client ModelClient) DeleteCustomEntityRoleSender(req *http.Request) (*http.Response, error) {
  2104  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2105  }
  2106  
  2107  // DeleteCustomEntityRoleResponder handles the response to the DeleteCustomEntityRole request. The method always
  2108  // closes the http.Response Body.
  2109  func (client ModelClient) DeleteCustomEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  2110  	err = autorest.Respond(
  2111  		resp,
  2112  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  2113  		autorest.ByUnmarshallingJSON(&result),
  2114  		autorest.ByClosing())
  2115  	result.Response = autorest.Response{Response: resp}
  2116  	return
  2117  }
  2118  
  2119  // DeleteCustomPrebuiltDomain deletes a prebuilt domain's models in a version of the application.
  2120  // Parameters:
  2121  // appID - the application ID.
  2122  // versionID - the version ID.
  2123  // domainName - domain name.
  2124  func (client ModelClient) DeleteCustomPrebuiltDomain(ctx context.Context, appID uuid.UUID, versionID string, domainName string) (result OperationStatus, err error) {
  2125  	if tracing.IsEnabled() {
  2126  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteCustomPrebuiltDomain")
  2127  		defer func() {
  2128  			sc := -1
  2129  			if result.Response.Response != nil {
  2130  				sc = result.Response.Response.StatusCode
  2131  			}
  2132  			tracing.EndSpan(ctx, sc, err)
  2133  		}()
  2134  	}
  2135  	req, err := client.DeleteCustomPrebuiltDomainPreparer(ctx, appID, versionID, domainName)
  2136  	if err != nil {
  2137  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCustomPrebuiltDomain", nil, "Failure preparing request")
  2138  		return
  2139  	}
  2140  
  2141  	resp, err := client.DeleteCustomPrebuiltDomainSender(req)
  2142  	if err != nil {
  2143  		result.Response = autorest.Response{Response: resp}
  2144  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCustomPrebuiltDomain", resp, "Failure sending request")
  2145  		return
  2146  	}
  2147  
  2148  	result, err = client.DeleteCustomPrebuiltDomainResponder(resp)
  2149  	if err != nil {
  2150  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteCustomPrebuiltDomain", resp, "Failure responding to request")
  2151  		return
  2152  	}
  2153  
  2154  	return
  2155  }
  2156  
  2157  // DeleteCustomPrebuiltDomainPreparer prepares the DeleteCustomPrebuiltDomain request.
  2158  func (client ModelClient) DeleteCustomPrebuiltDomainPreparer(ctx context.Context, appID uuid.UUID, versionID string, domainName string) (*http.Request, error) {
  2159  	urlParameters := map[string]interface{}{
  2160  		"Endpoint": client.Endpoint,
  2161  	}
  2162  
  2163  	pathParameters := map[string]interface{}{
  2164  		"appId":      autorest.Encode("path", appID),
  2165  		"domainName": autorest.Encode("path", domainName),
  2166  		"versionId":  autorest.Encode("path", versionID),
  2167  	}
  2168  
  2169  	preparer := autorest.CreatePreparer(
  2170  		autorest.AsDelete(),
  2171  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  2172  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltdomains/{domainName}", pathParameters))
  2173  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  2174  }
  2175  
  2176  // DeleteCustomPrebuiltDomainSender sends the DeleteCustomPrebuiltDomain request. The method will close the
  2177  // http.Response Body if it receives an error.
  2178  func (client ModelClient) DeleteCustomPrebuiltDomainSender(req *http.Request) (*http.Response, error) {
  2179  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2180  }
  2181  
  2182  // DeleteCustomPrebuiltDomainResponder handles the response to the DeleteCustomPrebuiltDomain request. The method always
  2183  // closes the http.Response Body.
  2184  func (client ModelClient) DeleteCustomPrebuiltDomainResponder(resp *http.Response) (result OperationStatus, err error) {
  2185  	err = autorest.Respond(
  2186  		resp,
  2187  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  2188  		autorest.ByUnmarshallingJSON(&result),
  2189  		autorest.ByClosing())
  2190  	result.Response = autorest.Response{Response: resp}
  2191  	return
  2192  }
  2193  
  2194  // DeleteEntity deletes an entity or a child from a version of the application.
  2195  // Parameters:
  2196  // appID - the application ID.
  2197  // versionID - the version ID.
  2198  // entityID - the entity extractor or the child entity extractor ID.
  2199  func (client ModelClient) DeleteEntity(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result OperationStatus, err error) {
  2200  	if tracing.IsEnabled() {
  2201  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteEntity")
  2202  		defer func() {
  2203  			sc := -1
  2204  			if result.Response.Response != nil {
  2205  				sc = result.Response.Response.StatusCode
  2206  			}
  2207  			tracing.EndSpan(ctx, sc, err)
  2208  		}()
  2209  	}
  2210  	req, err := client.DeleteEntityPreparer(ctx, appID, versionID, entityID)
  2211  	if err != nil {
  2212  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntity", nil, "Failure preparing request")
  2213  		return
  2214  	}
  2215  
  2216  	resp, err := client.DeleteEntitySender(req)
  2217  	if err != nil {
  2218  		result.Response = autorest.Response{Response: resp}
  2219  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntity", resp, "Failure sending request")
  2220  		return
  2221  	}
  2222  
  2223  	result, err = client.DeleteEntityResponder(resp)
  2224  	if err != nil {
  2225  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntity", resp, "Failure responding to request")
  2226  		return
  2227  	}
  2228  
  2229  	return
  2230  }
  2231  
  2232  // DeleteEntityPreparer prepares the DeleteEntity request.
  2233  func (client ModelClient) DeleteEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
  2234  	urlParameters := map[string]interface{}{
  2235  		"Endpoint": client.Endpoint,
  2236  	}
  2237  
  2238  	pathParameters := map[string]interface{}{
  2239  		"appId":     autorest.Encode("path", appID),
  2240  		"entityId":  autorest.Encode("path", entityID),
  2241  		"versionId": autorest.Encode("path", versionID),
  2242  	}
  2243  
  2244  	preparer := autorest.CreatePreparer(
  2245  		autorest.AsDelete(),
  2246  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  2247  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters))
  2248  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  2249  }
  2250  
  2251  // DeleteEntitySender sends the DeleteEntity request. The method will close the
  2252  // http.Response Body if it receives an error.
  2253  func (client ModelClient) DeleteEntitySender(req *http.Request) (*http.Response, error) {
  2254  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2255  }
  2256  
  2257  // DeleteEntityResponder handles the response to the DeleteEntity request. The method always
  2258  // closes the http.Response Body.
  2259  func (client ModelClient) DeleteEntityResponder(resp *http.Response) (result OperationStatus, err error) {
  2260  	err = autorest.Respond(
  2261  		resp,
  2262  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  2263  		autorest.ByUnmarshallingJSON(&result),
  2264  		autorest.ByClosing())
  2265  	result.Response = autorest.Response{Response: resp}
  2266  	return
  2267  }
  2268  
  2269  // DeleteEntityFeature deletes a relation from the feature relations used by the entity in a version of the
  2270  // application.
  2271  // Parameters:
  2272  // appID - the application ID.
  2273  // versionID - the version ID.
  2274  // entityID - the entity extractor ID.
  2275  // featureRelationDeleteObject - a feature information object containing the feature relation to delete.
  2276  func (client ModelClient) DeleteEntityFeature(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, featureRelationDeleteObject ModelFeatureInformation) (result OperationStatus, err error) {
  2277  	if tracing.IsEnabled() {
  2278  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteEntityFeature")
  2279  		defer func() {
  2280  			sc := -1
  2281  			if result.Response.Response != nil {
  2282  				sc = result.Response.Response.StatusCode
  2283  			}
  2284  			tracing.EndSpan(ctx, sc, err)
  2285  		}()
  2286  	}
  2287  	req, err := client.DeleteEntityFeaturePreparer(ctx, appID, versionID, entityID, featureRelationDeleteObject)
  2288  	if err != nil {
  2289  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntityFeature", nil, "Failure preparing request")
  2290  		return
  2291  	}
  2292  
  2293  	resp, err := client.DeleteEntityFeatureSender(req)
  2294  	if err != nil {
  2295  		result.Response = autorest.Response{Response: resp}
  2296  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntityFeature", resp, "Failure sending request")
  2297  		return
  2298  	}
  2299  
  2300  	result, err = client.DeleteEntityFeatureResponder(resp)
  2301  	if err != nil {
  2302  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntityFeature", resp, "Failure responding to request")
  2303  		return
  2304  	}
  2305  
  2306  	return
  2307  }
  2308  
  2309  // DeleteEntityFeaturePreparer prepares the DeleteEntityFeature request.
  2310  func (client ModelClient) DeleteEntityFeaturePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, featureRelationDeleteObject ModelFeatureInformation) (*http.Request, error) {
  2311  	urlParameters := map[string]interface{}{
  2312  		"Endpoint": client.Endpoint,
  2313  	}
  2314  
  2315  	pathParameters := map[string]interface{}{
  2316  		"appId":     autorest.Encode("path", appID),
  2317  		"entityId":  autorest.Encode("path", entityID),
  2318  		"versionId": autorest.Encode("path", versionID),
  2319  	}
  2320  
  2321  	preparer := autorest.CreatePreparer(
  2322  		autorest.AsContentType("application/json; charset=utf-8"),
  2323  		autorest.AsDelete(),
  2324  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  2325  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/features", pathParameters),
  2326  		autorest.WithJSON(featureRelationDeleteObject))
  2327  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  2328  }
  2329  
  2330  // DeleteEntityFeatureSender sends the DeleteEntityFeature request. The method will close the
  2331  // http.Response Body if it receives an error.
  2332  func (client ModelClient) DeleteEntityFeatureSender(req *http.Request) (*http.Response, error) {
  2333  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2334  }
  2335  
  2336  // DeleteEntityFeatureResponder handles the response to the DeleteEntityFeature request. The method always
  2337  // closes the http.Response Body.
  2338  func (client ModelClient) DeleteEntityFeatureResponder(resp *http.Response) (result OperationStatus, err error) {
  2339  	err = autorest.Respond(
  2340  		resp,
  2341  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  2342  		autorest.ByUnmarshallingJSON(&result),
  2343  		autorest.ByClosing())
  2344  	result.Response = autorest.Response{Response: resp}
  2345  	return
  2346  }
  2347  
  2348  // DeleteEntityRole sends the delete entity role request.
  2349  // Parameters:
  2350  // appID - the application ID.
  2351  // versionID - the version ID.
  2352  // entityID - the entity ID.
  2353  // roleID - the entity role Id.
  2354  func (client ModelClient) DeleteEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
  2355  	if tracing.IsEnabled() {
  2356  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteEntityRole")
  2357  		defer func() {
  2358  			sc := -1
  2359  			if result.Response.Response != nil {
  2360  				sc = result.Response.Response.StatusCode
  2361  			}
  2362  			tracing.EndSpan(ctx, sc, err)
  2363  		}()
  2364  	}
  2365  	req, err := client.DeleteEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
  2366  	if err != nil {
  2367  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntityRole", nil, "Failure preparing request")
  2368  		return
  2369  	}
  2370  
  2371  	resp, err := client.DeleteEntityRoleSender(req)
  2372  	if err != nil {
  2373  		result.Response = autorest.Response{Response: resp}
  2374  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntityRole", resp, "Failure sending request")
  2375  		return
  2376  	}
  2377  
  2378  	result, err = client.DeleteEntityRoleResponder(resp)
  2379  	if err != nil {
  2380  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteEntityRole", resp, "Failure responding to request")
  2381  		return
  2382  	}
  2383  
  2384  	return
  2385  }
  2386  
  2387  // DeleteEntityRolePreparer prepares the DeleteEntityRole request.
  2388  func (client ModelClient) DeleteEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  2389  	urlParameters := map[string]interface{}{
  2390  		"Endpoint": client.Endpoint,
  2391  	}
  2392  
  2393  	pathParameters := map[string]interface{}{
  2394  		"appId":     autorest.Encode("path", appID),
  2395  		"entityId":  autorest.Encode("path", entityID),
  2396  		"roleId":    autorest.Encode("path", roleID),
  2397  		"versionId": autorest.Encode("path", versionID),
  2398  	}
  2399  
  2400  	preparer := autorest.CreatePreparer(
  2401  		autorest.AsDelete(),
  2402  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  2403  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters))
  2404  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  2405  }
  2406  
  2407  // DeleteEntityRoleSender sends the DeleteEntityRole request. The method will close the
  2408  // http.Response Body if it receives an error.
  2409  func (client ModelClient) DeleteEntityRoleSender(req *http.Request) (*http.Response, error) {
  2410  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2411  }
  2412  
  2413  // DeleteEntityRoleResponder handles the response to the DeleteEntityRole request. The method always
  2414  // closes the http.Response Body.
  2415  func (client ModelClient) DeleteEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  2416  	err = autorest.Respond(
  2417  		resp,
  2418  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  2419  		autorest.ByUnmarshallingJSON(&result),
  2420  		autorest.ByClosing())
  2421  	result.Response = autorest.Response{Response: resp}
  2422  	return
  2423  }
  2424  
  2425  // DeleteExplicitListItem sends the delete explicit list item request.
  2426  // Parameters:
  2427  // appID - the application ID.
  2428  // versionID - the version ID.
  2429  // entityID - the pattern.any entity id.
  2430  // itemID - the explicit list item which will be deleted.
  2431  func (client ModelClient) DeleteExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (result OperationStatus, err error) {
  2432  	if tracing.IsEnabled() {
  2433  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteExplicitListItem")
  2434  		defer func() {
  2435  			sc := -1
  2436  			if result.Response.Response != nil {
  2437  				sc = result.Response.Response.StatusCode
  2438  			}
  2439  			tracing.EndSpan(ctx, sc, err)
  2440  		}()
  2441  	}
  2442  	req, err := client.DeleteExplicitListItemPreparer(ctx, appID, versionID, entityID, itemID)
  2443  	if err != nil {
  2444  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteExplicitListItem", nil, "Failure preparing request")
  2445  		return
  2446  	}
  2447  
  2448  	resp, err := client.DeleteExplicitListItemSender(req)
  2449  	if err != nil {
  2450  		result.Response = autorest.Response{Response: resp}
  2451  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteExplicitListItem", resp, "Failure sending request")
  2452  		return
  2453  	}
  2454  
  2455  	result, err = client.DeleteExplicitListItemResponder(resp)
  2456  	if err != nil {
  2457  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteExplicitListItem", resp, "Failure responding to request")
  2458  		return
  2459  	}
  2460  
  2461  	return
  2462  }
  2463  
  2464  // DeleteExplicitListItemPreparer prepares the DeleteExplicitListItem request.
  2465  func (client ModelClient) DeleteExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (*http.Request, error) {
  2466  	urlParameters := map[string]interface{}{
  2467  		"Endpoint": client.Endpoint,
  2468  	}
  2469  
  2470  	pathParameters := map[string]interface{}{
  2471  		"appId":     autorest.Encode("path", appID),
  2472  		"entityId":  autorest.Encode("path", entityID),
  2473  		"itemId":    autorest.Encode("path", itemID),
  2474  		"versionId": autorest.Encode("path", versionID),
  2475  	}
  2476  
  2477  	preparer := autorest.CreatePreparer(
  2478  		autorest.AsDelete(),
  2479  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  2480  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters))
  2481  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  2482  }
  2483  
  2484  // DeleteExplicitListItemSender sends the DeleteExplicitListItem request. The method will close the
  2485  // http.Response Body if it receives an error.
  2486  func (client ModelClient) DeleteExplicitListItemSender(req *http.Request) (*http.Response, error) {
  2487  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2488  }
  2489  
  2490  // DeleteExplicitListItemResponder handles the response to the DeleteExplicitListItem request. The method always
  2491  // closes the http.Response Body.
  2492  func (client ModelClient) DeleteExplicitListItemResponder(resp *http.Response) (result OperationStatus, err error) {
  2493  	err = autorest.Respond(
  2494  		resp,
  2495  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  2496  		autorest.ByUnmarshallingJSON(&result),
  2497  		autorest.ByClosing())
  2498  	result.Response = autorest.Response{Response: resp}
  2499  	return
  2500  }
  2501  
  2502  // DeleteHierarchicalEntity deletes a hierarchical entity from a version of the application.
  2503  // Parameters:
  2504  // appID - the application ID.
  2505  // versionID - the version ID.
  2506  // hEntityID - the hierarchical entity extractor ID.
  2507  func (client ModelClient) DeleteHierarchicalEntity(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result OperationStatus, err error) {
  2508  	if tracing.IsEnabled() {
  2509  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteHierarchicalEntity")
  2510  		defer func() {
  2511  			sc := -1
  2512  			if result.Response.Response != nil {
  2513  				sc = result.Response.Response.StatusCode
  2514  			}
  2515  			tracing.EndSpan(ctx, sc, err)
  2516  		}()
  2517  	}
  2518  	req, err := client.DeleteHierarchicalEntityPreparer(ctx, appID, versionID, hEntityID)
  2519  	if err != nil {
  2520  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntity", nil, "Failure preparing request")
  2521  		return
  2522  	}
  2523  
  2524  	resp, err := client.DeleteHierarchicalEntitySender(req)
  2525  	if err != nil {
  2526  		result.Response = autorest.Response{Response: resp}
  2527  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntity", resp, "Failure sending request")
  2528  		return
  2529  	}
  2530  
  2531  	result, err = client.DeleteHierarchicalEntityResponder(resp)
  2532  	if err != nil {
  2533  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntity", resp, "Failure responding to request")
  2534  		return
  2535  	}
  2536  
  2537  	return
  2538  }
  2539  
  2540  // DeleteHierarchicalEntityPreparer prepares the DeleteHierarchicalEntity request.
  2541  func (client ModelClient) DeleteHierarchicalEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (*http.Request, error) {
  2542  	urlParameters := map[string]interface{}{
  2543  		"Endpoint": client.Endpoint,
  2544  	}
  2545  
  2546  	pathParameters := map[string]interface{}{
  2547  		"appId":     autorest.Encode("path", appID),
  2548  		"hEntityId": autorest.Encode("path", hEntityID),
  2549  		"versionId": autorest.Encode("path", versionID),
  2550  	}
  2551  
  2552  	preparer := autorest.CreatePreparer(
  2553  		autorest.AsDelete(),
  2554  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  2555  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters))
  2556  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  2557  }
  2558  
  2559  // DeleteHierarchicalEntitySender sends the DeleteHierarchicalEntity request. The method will close the
  2560  // http.Response Body if it receives an error.
  2561  func (client ModelClient) DeleteHierarchicalEntitySender(req *http.Request) (*http.Response, error) {
  2562  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2563  }
  2564  
  2565  // DeleteHierarchicalEntityResponder handles the response to the DeleteHierarchicalEntity request. The method always
  2566  // closes the http.Response Body.
  2567  func (client ModelClient) DeleteHierarchicalEntityResponder(resp *http.Response) (result OperationStatus, err error) {
  2568  	err = autorest.Respond(
  2569  		resp,
  2570  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  2571  		autorest.ByUnmarshallingJSON(&result),
  2572  		autorest.ByClosing())
  2573  	result.Response = autorest.Response{Response: resp}
  2574  	return
  2575  }
  2576  
  2577  // DeleteHierarchicalEntityChild deletes a hierarchical entity extractor child in a version of the application.
  2578  // Parameters:
  2579  // appID - the application ID.
  2580  // versionID - the version ID.
  2581  // hEntityID - the hierarchical entity extractor ID.
  2582  // hChildID - the hierarchical entity extractor child ID.
  2583  func (client ModelClient) DeleteHierarchicalEntityChild(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (result OperationStatus, err error) {
  2584  	if tracing.IsEnabled() {
  2585  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteHierarchicalEntityChild")
  2586  		defer func() {
  2587  			sc := -1
  2588  			if result.Response.Response != nil {
  2589  				sc = result.Response.Response.StatusCode
  2590  			}
  2591  			tracing.EndSpan(ctx, sc, err)
  2592  		}()
  2593  	}
  2594  	req, err := client.DeleteHierarchicalEntityChildPreparer(ctx, appID, versionID, hEntityID, hChildID)
  2595  	if err != nil {
  2596  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntityChild", nil, "Failure preparing request")
  2597  		return
  2598  	}
  2599  
  2600  	resp, err := client.DeleteHierarchicalEntityChildSender(req)
  2601  	if err != nil {
  2602  		result.Response = autorest.Response{Response: resp}
  2603  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntityChild", resp, "Failure sending request")
  2604  		return
  2605  	}
  2606  
  2607  	result, err = client.DeleteHierarchicalEntityChildResponder(resp)
  2608  	if err != nil {
  2609  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntityChild", resp, "Failure responding to request")
  2610  		return
  2611  	}
  2612  
  2613  	return
  2614  }
  2615  
  2616  // DeleteHierarchicalEntityChildPreparer prepares the DeleteHierarchicalEntityChild request.
  2617  func (client ModelClient) DeleteHierarchicalEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (*http.Request, error) {
  2618  	urlParameters := map[string]interface{}{
  2619  		"Endpoint": client.Endpoint,
  2620  	}
  2621  
  2622  	pathParameters := map[string]interface{}{
  2623  		"appId":     autorest.Encode("path", appID),
  2624  		"hChildId":  autorest.Encode("path", hChildID),
  2625  		"hEntityId": autorest.Encode("path", hEntityID),
  2626  		"versionId": autorest.Encode("path", versionID),
  2627  	}
  2628  
  2629  	preparer := autorest.CreatePreparer(
  2630  		autorest.AsDelete(),
  2631  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  2632  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", pathParameters))
  2633  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  2634  }
  2635  
  2636  // DeleteHierarchicalEntityChildSender sends the DeleteHierarchicalEntityChild request. The method will close the
  2637  // http.Response Body if it receives an error.
  2638  func (client ModelClient) DeleteHierarchicalEntityChildSender(req *http.Request) (*http.Response, error) {
  2639  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2640  }
  2641  
  2642  // DeleteHierarchicalEntityChildResponder handles the response to the DeleteHierarchicalEntityChild request. The method always
  2643  // closes the http.Response Body.
  2644  func (client ModelClient) DeleteHierarchicalEntityChildResponder(resp *http.Response) (result OperationStatus, err error) {
  2645  	err = autorest.Respond(
  2646  		resp,
  2647  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  2648  		autorest.ByUnmarshallingJSON(&result),
  2649  		autorest.ByClosing())
  2650  	result.Response = autorest.Response{Response: resp}
  2651  	return
  2652  }
  2653  
  2654  // DeleteHierarchicalEntityRole sends the delete hierarchical entity role request.
  2655  // Parameters:
  2656  // appID - the application ID.
  2657  // versionID - the version ID.
  2658  // hEntityID - the hierarchical entity extractor ID.
  2659  // roleID - the entity role Id.
  2660  func (client ModelClient) DeleteHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
  2661  	if tracing.IsEnabled() {
  2662  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteHierarchicalEntityRole")
  2663  		defer func() {
  2664  			sc := -1
  2665  			if result.Response.Response != nil {
  2666  				sc = result.Response.Response.StatusCode
  2667  			}
  2668  			tracing.EndSpan(ctx, sc, err)
  2669  		}()
  2670  	}
  2671  	req, err := client.DeleteHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, roleID)
  2672  	if err != nil {
  2673  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntityRole", nil, "Failure preparing request")
  2674  		return
  2675  	}
  2676  
  2677  	resp, err := client.DeleteHierarchicalEntityRoleSender(req)
  2678  	if err != nil {
  2679  		result.Response = autorest.Response{Response: resp}
  2680  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntityRole", resp, "Failure sending request")
  2681  		return
  2682  	}
  2683  
  2684  	result, err = client.DeleteHierarchicalEntityRoleResponder(resp)
  2685  	if err != nil {
  2686  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteHierarchicalEntityRole", resp, "Failure responding to request")
  2687  		return
  2688  	}
  2689  
  2690  	return
  2691  }
  2692  
  2693  // DeleteHierarchicalEntityRolePreparer prepares the DeleteHierarchicalEntityRole request.
  2694  func (client ModelClient) DeleteHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  2695  	urlParameters := map[string]interface{}{
  2696  		"Endpoint": client.Endpoint,
  2697  	}
  2698  
  2699  	pathParameters := map[string]interface{}{
  2700  		"appId":     autorest.Encode("path", appID),
  2701  		"hEntityId": autorest.Encode("path", hEntityID),
  2702  		"roleId":    autorest.Encode("path", roleID),
  2703  		"versionId": autorest.Encode("path", versionID),
  2704  	}
  2705  
  2706  	preparer := autorest.CreatePreparer(
  2707  		autorest.AsDelete(),
  2708  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  2709  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters))
  2710  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  2711  }
  2712  
  2713  // DeleteHierarchicalEntityRoleSender sends the DeleteHierarchicalEntityRole request. The method will close the
  2714  // http.Response Body if it receives an error.
  2715  func (client ModelClient) DeleteHierarchicalEntityRoleSender(req *http.Request) (*http.Response, error) {
  2716  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2717  }
  2718  
  2719  // DeleteHierarchicalEntityRoleResponder handles the response to the DeleteHierarchicalEntityRole request. The method always
  2720  // closes the http.Response Body.
  2721  func (client ModelClient) DeleteHierarchicalEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  2722  	err = autorest.Respond(
  2723  		resp,
  2724  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  2725  		autorest.ByUnmarshallingJSON(&result),
  2726  		autorest.ByClosing())
  2727  	result.Response = autorest.Response{Response: resp}
  2728  	return
  2729  }
  2730  
  2731  // DeleteIntent deletes an intent from a version of the application.
  2732  // Parameters:
  2733  // appID - the application ID.
  2734  // versionID - the version ID.
  2735  // intentID - the intent classifier ID.
  2736  // deleteUtterances - if true, deletes the intent's example utterances. If false, moves the example utterances
  2737  // to the None intent. The default value is false.
  2738  func (client ModelClient) DeleteIntent(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, deleteUtterances *bool) (result OperationStatus, err error) {
  2739  	if tracing.IsEnabled() {
  2740  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteIntent")
  2741  		defer func() {
  2742  			sc := -1
  2743  			if result.Response.Response != nil {
  2744  				sc = result.Response.Response.StatusCode
  2745  			}
  2746  			tracing.EndSpan(ctx, sc, err)
  2747  		}()
  2748  	}
  2749  	req, err := client.DeleteIntentPreparer(ctx, appID, versionID, intentID, deleteUtterances)
  2750  	if err != nil {
  2751  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteIntent", nil, "Failure preparing request")
  2752  		return
  2753  	}
  2754  
  2755  	resp, err := client.DeleteIntentSender(req)
  2756  	if err != nil {
  2757  		result.Response = autorest.Response{Response: resp}
  2758  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteIntent", resp, "Failure sending request")
  2759  		return
  2760  	}
  2761  
  2762  	result, err = client.DeleteIntentResponder(resp)
  2763  	if err != nil {
  2764  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteIntent", resp, "Failure responding to request")
  2765  		return
  2766  	}
  2767  
  2768  	return
  2769  }
  2770  
  2771  // DeleteIntentPreparer prepares the DeleteIntent request.
  2772  func (client ModelClient) DeleteIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, deleteUtterances *bool) (*http.Request, error) {
  2773  	urlParameters := map[string]interface{}{
  2774  		"Endpoint": client.Endpoint,
  2775  	}
  2776  
  2777  	pathParameters := map[string]interface{}{
  2778  		"appId":     autorest.Encode("path", appID),
  2779  		"intentId":  autorest.Encode("path", intentID),
  2780  		"versionId": autorest.Encode("path", versionID),
  2781  	}
  2782  
  2783  	queryParameters := map[string]interface{}{}
  2784  	if deleteUtterances != nil {
  2785  		queryParameters["deleteUtterances"] = autorest.Encode("query", *deleteUtterances)
  2786  	} else {
  2787  		queryParameters["deleteUtterances"] = autorest.Encode("query", false)
  2788  	}
  2789  
  2790  	preparer := autorest.CreatePreparer(
  2791  		autorest.AsDelete(),
  2792  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  2793  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters),
  2794  		autorest.WithQueryParameters(queryParameters))
  2795  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  2796  }
  2797  
  2798  // DeleteIntentSender sends the DeleteIntent request. The method will close the
  2799  // http.Response Body if it receives an error.
  2800  func (client ModelClient) DeleteIntentSender(req *http.Request) (*http.Response, error) {
  2801  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2802  }
  2803  
  2804  // DeleteIntentResponder handles the response to the DeleteIntent request. The method always
  2805  // closes the http.Response Body.
  2806  func (client ModelClient) DeleteIntentResponder(resp *http.Response) (result OperationStatus, err error) {
  2807  	err = autorest.Respond(
  2808  		resp,
  2809  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  2810  		autorest.ByUnmarshallingJSON(&result),
  2811  		autorest.ByClosing())
  2812  	result.Response = autorest.Response{Response: resp}
  2813  	return
  2814  }
  2815  
  2816  // DeleteIntentFeature deletes a relation from the feature relations used by the intent in a version of the
  2817  // application.
  2818  // Parameters:
  2819  // appID - the application ID.
  2820  // versionID - the version ID.
  2821  // intentID - the intent classifier ID.
  2822  // featureRelationDeleteObject - a feature information object containing the feature relation to delete.
  2823  func (client ModelClient) DeleteIntentFeature(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, featureRelationDeleteObject ModelFeatureInformation) (result OperationStatus, err error) {
  2824  	if tracing.IsEnabled() {
  2825  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteIntentFeature")
  2826  		defer func() {
  2827  			sc := -1
  2828  			if result.Response.Response != nil {
  2829  				sc = result.Response.Response.StatusCode
  2830  			}
  2831  			tracing.EndSpan(ctx, sc, err)
  2832  		}()
  2833  	}
  2834  	req, err := client.DeleteIntentFeaturePreparer(ctx, appID, versionID, intentID, featureRelationDeleteObject)
  2835  	if err != nil {
  2836  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteIntentFeature", nil, "Failure preparing request")
  2837  		return
  2838  	}
  2839  
  2840  	resp, err := client.DeleteIntentFeatureSender(req)
  2841  	if err != nil {
  2842  		result.Response = autorest.Response{Response: resp}
  2843  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteIntentFeature", resp, "Failure sending request")
  2844  		return
  2845  	}
  2846  
  2847  	result, err = client.DeleteIntentFeatureResponder(resp)
  2848  	if err != nil {
  2849  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteIntentFeature", resp, "Failure responding to request")
  2850  		return
  2851  	}
  2852  
  2853  	return
  2854  }
  2855  
  2856  // DeleteIntentFeaturePreparer prepares the DeleteIntentFeature request.
  2857  func (client ModelClient) DeleteIntentFeaturePreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, featureRelationDeleteObject ModelFeatureInformation) (*http.Request, error) {
  2858  	urlParameters := map[string]interface{}{
  2859  		"Endpoint": client.Endpoint,
  2860  	}
  2861  
  2862  	pathParameters := map[string]interface{}{
  2863  		"appId":     autorest.Encode("path", appID),
  2864  		"intentId":  autorest.Encode("path", intentID),
  2865  		"versionId": autorest.Encode("path", versionID),
  2866  	}
  2867  
  2868  	preparer := autorest.CreatePreparer(
  2869  		autorest.AsContentType("application/json; charset=utf-8"),
  2870  		autorest.AsDelete(),
  2871  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  2872  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/features", pathParameters),
  2873  		autorest.WithJSON(featureRelationDeleteObject))
  2874  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  2875  }
  2876  
  2877  // DeleteIntentFeatureSender sends the DeleteIntentFeature request. The method will close the
  2878  // http.Response Body if it receives an error.
  2879  func (client ModelClient) DeleteIntentFeatureSender(req *http.Request) (*http.Response, error) {
  2880  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2881  }
  2882  
  2883  // DeleteIntentFeatureResponder handles the response to the DeleteIntentFeature request. The method always
  2884  // closes the http.Response Body.
  2885  func (client ModelClient) DeleteIntentFeatureResponder(resp *http.Response) (result OperationStatus, err error) {
  2886  	err = autorest.Respond(
  2887  		resp,
  2888  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  2889  		autorest.ByUnmarshallingJSON(&result),
  2890  		autorest.ByClosing())
  2891  	result.Response = autorest.Response{Response: resp}
  2892  	return
  2893  }
  2894  
  2895  // DeletePatternAnyEntityModel sends the delete pattern any entity model request.
  2896  // Parameters:
  2897  // appID - the application ID.
  2898  // versionID - the version ID.
  2899  // entityID - the Pattern.Any entity extractor ID.
  2900  func (client ModelClient) DeletePatternAnyEntityModel(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result OperationStatus, err error) {
  2901  	if tracing.IsEnabled() {
  2902  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeletePatternAnyEntityModel")
  2903  		defer func() {
  2904  			sc := -1
  2905  			if result.Response.Response != nil {
  2906  				sc = result.Response.Response.StatusCode
  2907  			}
  2908  			tracing.EndSpan(ctx, sc, err)
  2909  		}()
  2910  	}
  2911  	req, err := client.DeletePatternAnyEntityModelPreparer(ctx, appID, versionID, entityID)
  2912  	if err != nil {
  2913  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePatternAnyEntityModel", nil, "Failure preparing request")
  2914  		return
  2915  	}
  2916  
  2917  	resp, err := client.DeletePatternAnyEntityModelSender(req)
  2918  	if err != nil {
  2919  		result.Response = autorest.Response{Response: resp}
  2920  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePatternAnyEntityModel", resp, "Failure sending request")
  2921  		return
  2922  	}
  2923  
  2924  	result, err = client.DeletePatternAnyEntityModelResponder(resp)
  2925  	if err != nil {
  2926  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePatternAnyEntityModel", resp, "Failure responding to request")
  2927  		return
  2928  	}
  2929  
  2930  	return
  2931  }
  2932  
  2933  // DeletePatternAnyEntityModelPreparer prepares the DeletePatternAnyEntityModel request.
  2934  func (client ModelClient) DeletePatternAnyEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
  2935  	urlParameters := map[string]interface{}{
  2936  		"Endpoint": client.Endpoint,
  2937  	}
  2938  
  2939  	pathParameters := map[string]interface{}{
  2940  		"appId":     autorest.Encode("path", appID),
  2941  		"entityId":  autorest.Encode("path", entityID),
  2942  		"versionId": autorest.Encode("path", versionID),
  2943  	}
  2944  
  2945  	preparer := autorest.CreatePreparer(
  2946  		autorest.AsDelete(),
  2947  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  2948  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters))
  2949  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  2950  }
  2951  
  2952  // DeletePatternAnyEntityModelSender sends the DeletePatternAnyEntityModel request. The method will close the
  2953  // http.Response Body if it receives an error.
  2954  func (client ModelClient) DeletePatternAnyEntityModelSender(req *http.Request) (*http.Response, error) {
  2955  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  2956  }
  2957  
  2958  // DeletePatternAnyEntityModelResponder handles the response to the DeletePatternAnyEntityModel request. The method always
  2959  // closes the http.Response Body.
  2960  func (client ModelClient) DeletePatternAnyEntityModelResponder(resp *http.Response) (result OperationStatus, err error) {
  2961  	err = autorest.Respond(
  2962  		resp,
  2963  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  2964  		autorest.ByUnmarshallingJSON(&result),
  2965  		autorest.ByClosing())
  2966  	result.Response = autorest.Response{Response: resp}
  2967  	return
  2968  }
  2969  
  2970  // DeletePatternAnyEntityRole sends the delete pattern any entity role request.
  2971  // Parameters:
  2972  // appID - the application ID.
  2973  // versionID - the version ID.
  2974  // entityID - the entity ID.
  2975  // roleID - the entity role Id.
  2976  func (client ModelClient) DeletePatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
  2977  	if tracing.IsEnabled() {
  2978  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeletePatternAnyEntityRole")
  2979  		defer func() {
  2980  			sc := -1
  2981  			if result.Response.Response != nil {
  2982  				sc = result.Response.Response.StatusCode
  2983  			}
  2984  			tracing.EndSpan(ctx, sc, err)
  2985  		}()
  2986  	}
  2987  	req, err := client.DeletePatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
  2988  	if err != nil {
  2989  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePatternAnyEntityRole", nil, "Failure preparing request")
  2990  		return
  2991  	}
  2992  
  2993  	resp, err := client.DeletePatternAnyEntityRoleSender(req)
  2994  	if err != nil {
  2995  		result.Response = autorest.Response{Response: resp}
  2996  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePatternAnyEntityRole", resp, "Failure sending request")
  2997  		return
  2998  	}
  2999  
  3000  	result, err = client.DeletePatternAnyEntityRoleResponder(resp)
  3001  	if err != nil {
  3002  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePatternAnyEntityRole", resp, "Failure responding to request")
  3003  		return
  3004  	}
  3005  
  3006  	return
  3007  }
  3008  
  3009  // DeletePatternAnyEntityRolePreparer prepares the DeletePatternAnyEntityRole request.
  3010  func (client ModelClient) DeletePatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  3011  	urlParameters := map[string]interface{}{
  3012  		"Endpoint": client.Endpoint,
  3013  	}
  3014  
  3015  	pathParameters := map[string]interface{}{
  3016  		"appId":     autorest.Encode("path", appID),
  3017  		"entityId":  autorest.Encode("path", entityID),
  3018  		"roleId":    autorest.Encode("path", roleID),
  3019  		"versionId": autorest.Encode("path", versionID),
  3020  	}
  3021  
  3022  	preparer := autorest.CreatePreparer(
  3023  		autorest.AsDelete(),
  3024  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  3025  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters))
  3026  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  3027  }
  3028  
  3029  // DeletePatternAnyEntityRoleSender sends the DeletePatternAnyEntityRole request. The method will close the
  3030  // http.Response Body if it receives an error.
  3031  func (client ModelClient) DeletePatternAnyEntityRoleSender(req *http.Request) (*http.Response, error) {
  3032  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3033  }
  3034  
  3035  // DeletePatternAnyEntityRoleResponder handles the response to the DeletePatternAnyEntityRole request. The method always
  3036  // closes the http.Response Body.
  3037  func (client ModelClient) DeletePatternAnyEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  3038  	err = autorest.Respond(
  3039  		resp,
  3040  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  3041  		autorest.ByUnmarshallingJSON(&result),
  3042  		autorest.ByClosing())
  3043  	result.Response = autorest.Response{Response: resp}
  3044  	return
  3045  }
  3046  
  3047  // DeletePrebuilt deletes a prebuilt entity extractor from a version of the application.
  3048  // Parameters:
  3049  // appID - the application ID.
  3050  // versionID - the version ID.
  3051  // prebuiltID - the prebuilt entity extractor ID.
  3052  func (client ModelClient) DeletePrebuilt(ctx context.Context, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (result OperationStatus, err error) {
  3053  	if tracing.IsEnabled() {
  3054  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeletePrebuilt")
  3055  		defer func() {
  3056  			sc := -1
  3057  			if result.Response.Response != nil {
  3058  				sc = result.Response.Response.StatusCode
  3059  			}
  3060  			tracing.EndSpan(ctx, sc, err)
  3061  		}()
  3062  	}
  3063  	req, err := client.DeletePrebuiltPreparer(ctx, appID, versionID, prebuiltID)
  3064  	if err != nil {
  3065  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePrebuilt", nil, "Failure preparing request")
  3066  		return
  3067  	}
  3068  
  3069  	resp, err := client.DeletePrebuiltSender(req)
  3070  	if err != nil {
  3071  		result.Response = autorest.Response{Response: resp}
  3072  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePrebuilt", resp, "Failure sending request")
  3073  		return
  3074  	}
  3075  
  3076  	result, err = client.DeletePrebuiltResponder(resp)
  3077  	if err != nil {
  3078  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePrebuilt", resp, "Failure responding to request")
  3079  		return
  3080  	}
  3081  
  3082  	return
  3083  }
  3084  
  3085  // DeletePrebuiltPreparer prepares the DeletePrebuilt request.
  3086  func (client ModelClient) DeletePrebuiltPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (*http.Request, error) {
  3087  	urlParameters := map[string]interface{}{
  3088  		"Endpoint": client.Endpoint,
  3089  	}
  3090  
  3091  	pathParameters := map[string]interface{}{
  3092  		"appId":      autorest.Encode("path", appID),
  3093  		"prebuiltId": autorest.Encode("path", prebuiltID),
  3094  		"versionId":  autorest.Encode("path", versionID),
  3095  	}
  3096  
  3097  	preparer := autorest.CreatePreparer(
  3098  		autorest.AsDelete(),
  3099  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  3100  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}", pathParameters))
  3101  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  3102  }
  3103  
  3104  // DeletePrebuiltSender sends the DeletePrebuilt request. The method will close the
  3105  // http.Response Body if it receives an error.
  3106  func (client ModelClient) DeletePrebuiltSender(req *http.Request) (*http.Response, error) {
  3107  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3108  }
  3109  
  3110  // DeletePrebuiltResponder handles the response to the DeletePrebuilt request. The method always
  3111  // closes the http.Response Body.
  3112  func (client ModelClient) DeletePrebuiltResponder(resp *http.Response) (result OperationStatus, err error) {
  3113  	err = autorest.Respond(
  3114  		resp,
  3115  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  3116  		autorest.ByUnmarshallingJSON(&result),
  3117  		autorest.ByClosing())
  3118  	result.Response = autorest.Response{Response: resp}
  3119  	return
  3120  }
  3121  
  3122  // DeletePrebuiltEntityRole sends the delete prebuilt entity role request.
  3123  // Parameters:
  3124  // appID - the application ID.
  3125  // versionID - the version ID.
  3126  // entityID - the entity ID.
  3127  // roleID - the entity role Id.
  3128  func (client ModelClient) DeletePrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
  3129  	if tracing.IsEnabled() {
  3130  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeletePrebuiltEntityRole")
  3131  		defer func() {
  3132  			sc := -1
  3133  			if result.Response.Response != nil {
  3134  				sc = result.Response.Response.StatusCode
  3135  			}
  3136  			tracing.EndSpan(ctx, sc, err)
  3137  		}()
  3138  	}
  3139  	req, err := client.DeletePrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
  3140  	if err != nil {
  3141  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePrebuiltEntityRole", nil, "Failure preparing request")
  3142  		return
  3143  	}
  3144  
  3145  	resp, err := client.DeletePrebuiltEntityRoleSender(req)
  3146  	if err != nil {
  3147  		result.Response = autorest.Response{Response: resp}
  3148  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePrebuiltEntityRole", resp, "Failure sending request")
  3149  		return
  3150  	}
  3151  
  3152  	result, err = client.DeletePrebuiltEntityRoleResponder(resp)
  3153  	if err != nil {
  3154  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeletePrebuiltEntityRole", resp, "Failure responding to request")
  3155  		return
  3156  	}
  3157  
  3158  	return
  3159  }
  3160  
  3161  // DeletePrebuiltEntityRolePreparer prepares the DeletePrebuiltEntityRole request.
  3162  func (client ModelClient) DeletePrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  3163  	urlParameters := map[string]interface{}{
  3164  		"Endpoint": client.Endpoint,
  3165  	}
  3166  
  3167  	pathParameters := map[string]interface{}{
  3168  		"appId":     autorest.Encode("path", appID),
  3169  		"entityId":  autorest.Encode("path", entityID),
  3170  		"roleId":    autorest.Encode("path", roleID),
  3171  		"versionId": autorest.Encode("path", versionID),
  3172  	}
  3173  
  3174  	preparer := autorest.CreatePreparer(
  3175  		autorest.AsDelete(),
  3176  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  3177  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters))
  3178  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  3179  }
  3180  
  3181  // DeletePrebuiltEntityRoleSender sends the DeletePrebuiltEntityRole request. The method will close the
  3182  // http.Response Body if it receives an error.
  3183  func (client ModelClient) DeletePrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
  3184  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3185  }
  3186  
  3187  // DeletePrebuiltEntityRoleResponder handles the response to the DeletePrebuiltEntityRole request. The method always
  3188  // closes the http.Response Body.
  3189  func (client ModelClient) DeletePrebuiltEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  3190  	err = autorest.Respond(
  3191  		resp,
  3192  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  3193  		autorest.ByUnmarshallingJSON(&result),
  3194  		autorest.ByClosing())
  3195  	result.Response = autorest.Response{Response: resp}
  3196  	return
  3197  }
  3198  
  3199  // DeleteRegexEntityModel sends the delete regex entity model request.
  3200  // Parameters:
  3201  // appID - the application ID.
  3202  // versionID - the version ID.
  3203  // regexEntityID - the regular expression entity extractor ID.
  3204  func (client ModelClient) DeleteRegexEntityModel(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (result OperationStatus, err error) {
  3205  	if tracing.IsEnabled() {
  3206  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteRegexEntityModel")
  3207  		defer func() {
  3208  			sc := -1
  3209  			if result.Response.Response != nil {
  3210  				sc = result.Response.Response.StatusCode
  3211  			}
  3212  			tracing.EndSpan(ctx, sc, err)
  3213  		}()
  3214  	}
  3215  	req, err := client.DeleteRegexEntityModelPreparer(ctx, appID, versionID, regexEntityID)
  3216  	if err != nil {
  3217  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteRegexEntityModel", nil, "Failure preparing request")
  3218  		return
  3219  	}
  3220  
  3221  	resp, err := client.DeleteRegexEntityModelSender(req)
  3222  	if err != nil {
  3223  		result.Response = autorest.Response{Response: resp}
  3224  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteRegexEntityModel", resp, "Failure sending request")
  3225  		return
  3226  	}
  3227  
  3228  	result, err = client.DeleteRegexEntityModelResponder(resp)
  3229  	if err != nil {
  3230  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteRegexEntityModel", resp, "Failure responding to request")
  3231  		return
  3232  	}
  3233  
  3234  	return
  3235  }
  3236  
  3237  // DeleteRegexEntityModelPreparer prepares the DeleteRegexEntityModel request.
  3238  func (client ModelClient) DeleteRegexEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (*http.Request, error) {
  3239  	urlParameters := map[string]interface{}{
  3240  		"Endpoint": client.Endpoint,
  3241  	}
  3242  
  3243  	pathParameters := map[string]interface{}{
  3244  		"appId":         autorest.Encode("path", appID),
  3245  		"regexEntityId": autorest.Encode("path", regexEntityID),
  3246  		"versionId":     autorest.Encode("path", versionID),
  3247  	}
  3248  
  3249  	preparer := autorest.CreatePreparer(
  3250  		autorest.AsDelete(),
  3251  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  3252  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters))
  3253  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  3254  }
  3255  
  3256  // DeleteRegexEntityModelSender sends the DeleteRegexEntityModel request. The method will close the
  3257  // http.Response Body if it receives an error.
  3258  func (client ModelClient) DeleteRegexEntityModelSender(req *http.Request) (*http.Response, error) {
  3259  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3260  }
  3261  
  3262  // DeleteRegexEntityModelResponder handles the response to the DeleteRegexEntityModel request. The method always
  3263  // closes the http.Response Body.
  3264  func (client ModelClient) DeleteRegexEntityModelResponder(resp *http.Response) (result OperationStatus, err error) {
  3265  	err = autorest.Respond(
  3266  		resp,
  3267  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  3268  		autorest.ByUnmarshallingJSON(&result),
  3269  		autorest.ByClosing())
  3270  	result.Response = autorest.Response{Response: resp}
  3271  	return
  3272  }
  3273  
  3274  // DeleteRegexEntityRole sends the delete regex entity role request.
  3275  // Parameters:
  3276  // appID - the application ID.
  3277  // versionID - the version ID.
  3278  // entityID - the entity ID.
  3279  // roleID - the entity role Id.
  3280  func (client ModelClient) DeleteRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result OperationStatus, err error) {
  3281  	if tracing.IsEnabled() {
  3282  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteRegexEntityRole")
  3283  		defer func() {
  3284  			sc := -1
  3285  			if result.Response.Response != nil {
  3286  				sc = result.Response.Response.StatusCode
  3287  			}
  3288  			tracing.EndSpan(ctx, sc, err)
  3289  		}()
  3290  	}
  3291  	req, err := client.DeleteRegexEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
  3292  	if err != nil {
  3293  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteRegexEntityRole", nil, "Failure preparing request")
  3294  		return
  3295  	}
  3296  
  3297  	resp, err := client.DeleteRegexEntityRoleSender(req)
  3298  	if err != nil {
  3299  		result.Response = autorest.Response{Response: resp}
  3300  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteRegexEntityRole", resp, "Failure sending request")
  3301  		return
  3302  	}
  3303  
  3304  	result, err = client.DeleteRegexEntityRoleResponder(resp)
  3305  	if err != nil {
  3306  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteRegexEntityRole", resp, "Failure responding to request")
  3307  		return
  3308  	}
  3309  
  3310  	return
  3311  }
  3312  
  3313  // DeleteRegexEntityRolePreparer prepares the DeleteRegexEntityRole request.
  3314  func (client ModelClient) DeleteRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  3315  	urlParameters := map[string]interface{}{
  3316  		"Endpoint": client.Endpoint,
  3317  	}
  3318  
  3319  	pathParameters := map[string]interface{}{
  3320  		"appId":     autorest.Encode("path", appID),
  3321  		"entityId":  autorest.Encode("path", entityID),
  3322  		"roleId":    autorest.Encode("path", roleID),
  3323  		"versionId": autorest.Encode("path", versionID),
  3324  	}
  3325  
  3326  	preparer := autorest.CreatePreparer(
  3327  		autorest.AsDelete(),
  3328  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  3329  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters))
  3330  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  3331  }
  3332  
  3333  // DeleteRegexEntityRoleSender sends the DeleteRegexEntityRole request. The method will close the
  3334  // http.Response Body if it receives an error.
  3335  func (client ModelClient) DeleteRegexEntityRoleSender(req *http.Request) (*http.Response, error) {
  3336  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3337  }
  3338  
  3339  // DeleteRegexEntityRoleResponder handles the response to the DeleteRegexEntityRole request. The method always
  3340  // closes the http.Response Body.
  3341  func (client ModelClient) DeleteRegexEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  3342  	err = autorest.Respond(
  3343  		resp,
  3344  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  3345  		autorest.ByUnmarshallingJSON(&result),
  3346  		autorest.ByClosing())
  3347  	result.Response = autorest.Response{Response: resp}
  3348  	return
  3349  }
  3350  
  3351  // DeleteSubList deletes a sublist of a specific list entity model from a version of the application.
  3352  // Parameters:
  3353  // appID - the application ID.
  3354  // versionID - the version ID.
  3355  // clEntityID - the list entity extractor ID.
  3356  // subListID - the sublist ID.
  3357  func (client ModelClient) DeleteSubList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int64) (result OperationStatus, err error) {
  3358  	if tracing.IsEnabled() {
  3359  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.DeleteSubList")
  3360  		defer func() {
  3361  			sc := -1
  3362  			if result.Response.Response != nil {
  3363  				sc = result.Response.Response.StatusCode
  3364  			}
  3365  			tracing.EndSpan(ctx, sc, err)
  3366  		}()
  3367  	}
  3368  	req, err := client.DeleteSubListPreparer(ctx, appID, versionID, clEntityID, subListID)
  3369  	if err != nil {
  3370  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteSubList", nil, "Failure preparing request")
  3371  		return
  3372  	}
  3373  
  3374  	resp, err := client.DeleteSubListSender(req)
  3375  	if err != nil {
  3376  		result.Response = autorest.Response{Response: resp}
  3377  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteSubList", resp, "Failure sending request")
  3378  		return
  3379  	}
  3380  
  3381  	result, err = client.DeleteSubListResponder(resp)
  3382  	if err != nil {
  3383  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "DeleteSubList", resp, "Failure responding to request")
  3384  		return
  3385  	}
  3386  
  3387  	return
  3388  }
  3389  
  3390  // DeleteSubListPreparer prepares the DeleteSubList request.
  3391  func (client ModelClient) DeleteSubListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int64) (*http.Request, error) {
  3392  	urlParameters := map[string]interface{}{
  3393  		"Endpoint": client.Endpoint,
  3394  	}
  3395  
  3396  	pathParameters := map[string]interface{}{
  3397  		"appId":      autorest.Encode("path", appID),
  3398  		"clEntityId": autorest.Encode("path", clEntityID),
  3399  		"subListId":  autorest.Encode("path", subListID),
  3400  		"versionId":  autorest.Encode("path", versionID),
  3401  	}
  3402  
  3403  	preparer := autorest.CreatePreparer(
  3404  		autorest.AsDelete(),
  3405  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  3406  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}", pathParameters))
  3407  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  3408  }
  3409  
  3410  // DeleteSubListSender sends the DeleteSubList request. The method will close the
  3411  // http.Response Body if it receives an error.
  3412  func (client ModelClient) DeleteSubListSender(req *http.Request) (*http.Response, error) {
  3413  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3414  }
  3415  
  3416  // DeleteSubListResponder handles the response to the DeleteSubList request. The method always
  3417  // closes the http.Response Body.
  3418  func (client ModelClient) DeleteSubListResponder(resp *http.Response) (result OperationStatus, err error) {
  3419  	err = autorest.Respond(
  3420  		resp,
  3421  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  3422  		autorest.ByUnmarshallingJSON(&result),
  3423  		autorest.ByClosing())
  3424  	result.Response = autorest.Response{Response: resp}
  3425  	return
  3426  }
  3427  
  3428  // ExamplesMethod gets the example utterances for the given intent or entity model in a version of the application.
  3429  // Parameters:
  3430  // appID - the application ID.
  3431  // versionID - the version ID.
  3432  // modelID - the ID (GUID) of the model.
  3433  // skip - the number of entries to skip. Default value is 0.
  3434  // take - the number of entries to return. Maximum page size is 500. Default is 100.
  3435  func (client ModelClient) ExamplesMethod(ctx context.Context, appID uuid.UUID, versionID string, modelID string, skip *int32, take *int32) (result ListLabelTextObject, err error) {
  3436  	if tracing.IsEnabled() {
  3437  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ExamplesMethod")
  3438  		defer func() {
  3439  			sc := -1
  3440  			if result.Response.Response != nil {
  3441  				sc = result.Response.Response.StatusCode
  3442  			}
  3443  			tracing.EndSpan(ctx, sc, err)
  3444  		}()
  3445  	}
  3446  	if err := validation.Validate([]validation.Validation{
  3447  		{TargetValue: skip,
  3448  			Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
  3449  				Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}},
  3450  		{TargetValue: take,
  3451  			Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
  3452  				Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil},
  3453  					{Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
  3454  				}}}}}); err != nil {
  3455  		return result, validation.NewError("authoring.ModelClient", "ExamplesMethod", err.Error())
  3456  	}
  3457  
  3458  	req, err := client.ExamplesMethodPreparer(ctx, appID, versionID, modelID, skip, take)
  3459  	if err != nil {
  3460  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ExamplesMethod", nil, "Failure preparing request")
  3461  		return
  3462  	}
  3463  
  3464  	resp, err := client.ExamplesMethodSender(req)
  3465  	if err != nil {
  3466  		result.Response = autorest.Response{Response: resp}
  3467  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ExamplesMethod", resp, "Failure sending request")
  3468  		return
  3469  	}
  3470  
  3471  	result, err = client.ExamplesMethodResponder(resp)
  3472  	if err != nil {
  3473  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ExamplesMethod", resp, "Failure responding to request")
  3474  		return
  3475  	}
  3476  
  3477  	return
  3478  }
  3479  
  3480  // ExamplesMethodPreparer prepares the ExamplesMethod request.
  3481  func (client ModelClient) ExamplesMethodPreparer(ctx context.Context, appID uuid.UUID, versionID string, modelID string, skip *int32, take *int32) (*http.Request, error) {
  3482  	urlParameters := map[string]interface{}{
  3483  		"Endpoint": client.Endpoint,
  3484  	}
  3485  
  3486  	pathParameters := map[string]interface{}{
  3487  		"appId":     autorest.Encode("path", appID),
  3488  		"modelId":   autorest.Encode("path", modelID),
  3489  		"versionId": autorest.Encode("path", versionID),
  3490  	}
  3491  
  3492  	queryParameters := map[string]interface{}{}
  3493  	if skip != nil {
  3494  		queryParameters["skip"] = autorest.Encode("query", *skip)
  3495  	} else {
  3496  		queryParameters["skip"] = autorest.Encode("query", 0)
  3497  	}
  3498  	if take != nil {
  3499  		queryParameters["take"] = autorest.Encode("query", *take)
  3500  	} else {
  3501  		queryParameters["take"] = autorest.Encode("query", 100)
  3502  	}
  3503  
  3504  	preparer := autorest.CreatePreparer(
  3505  		autorest.AsGet(),
  3506  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  3507  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/models/{modelId}/examples", pathParameters),
  3508  		autorest.WithQueryParameters(queryParameters))
  3509  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  3510  }
  3511  
  3512  // ExamplesMethodSender sends the ExamplesMethod request. The method will close the
  3513  // http.Response Body if it receives an error.
  3514  func (client ModelClient) ExamplesMethodSender(req *http.Request) (*http.Response, error) {
  3515  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3516  }
  3517  
  3518  // ExamplesMethodResponder handles the response to the ExamplesMethod request. The method always
  3519  // closes the http.Response Body.
  3520  func (client ModelClient) ExamplesMethodResponder(resp *http.Response) (result ListLabelTextObject, err error) {
  3521  	err = autorest.Respond(
  3522  		resp,
  3523  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  3524  		autorest.ByUnmarshallingJSON(&result.Value),
  3525  		autorest.ByClosing())
  3526  	result.Response = autorest.Response{Response: resp}
  3527  	return
  3528  }
  3529  
  3530  // GetClosedList gets information about a list entity in a version of the application.
  3531  // Parameters:
  3532  // appID - the application ID.
  3533  // versionID - the version ID.
  3534  // clEntityID - the list model ID.
  3535  func (client ModelClient) GetClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (result ClosedListEntityExtractor, err error) {
  3536  	if tracing.IsEnabled() {
  3537  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetClosedList")
  3538  		defer func() {
  3539  			sc := -1
  3540  			if result.Response.Response != nil {
  3541  				sc = result.Response.Response.StatusCode
  3542  			}
  3543  			tracing.EndSpan(ctx, sc, err)
  3544  		}()
  3545  	}
  3546  	req, err := client.GetClosedListPreparer(ctx, appID, versionID, clEntityID)
  3547  	if err != nil {
  3548  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedList", nil, "Failure preparing request")
  3549  		return
  3550  	}
  3551  
  3552  	resp, err := client.GetClosedListSender(req)
  3553  	if err != nil {
  3554  		result.Response = autorest.Response{Response: resp}
  3555  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedList", resp, "Failure sending request")
  3556  		return
  3557  	}
  3558  
  3559  	result, err = client.GetClosedListResponder(resp)
  3560  	if err != nil {
  3561  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedList", resp, "Failure responding to request")
  3562  		return
  3563  	}
  3564  
  3565  	return
  3566  }
  3567  
  3568  // GetClosedListPreparer prepares the GetClosedList request.
  3569  func (client ModelClient) GetClosedListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID) (*http.Request, error) {
  3570  	urlParameters := map[string]interface{}{
  3571  		"Endpoint": client.Endpoint,
  3572  	}
  3573  
  3574  	pathParameters := map[string]interface{}{
  3575  		"appId":      autorest.Encode("path", appID),
  3576  		"clEntityId": autorest.Encode("path", clEntityID),
  3577  		"versionId":  autorest.Encode("path", versionID),
  3578  	}
  3579  
  3580  	preparer := autorest.CreatePreparer(
  3581  		autorest.AsGet(),
  3582  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  3583  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters))
  3584  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  3585  }
  3586  
  3587  // GetClosedListSender sends the GetClosedList request. The method will close the
  3588  // http.Response Body if it receives an error.
  3589  func (client ModelClient) GetClosedListSender(req *http.Request) (*http.Response, error) {
  3590  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3591  }
  3592  
  3593  // GetClosedListResponder handles the response to the GetClosedList request. The method always
  3594  // closes the http.Response Body.
  3595  func (client ModelClient) GetClosedListResponder(resp *http.Response) (result ClosedListEntityExtractor, err error) {
  3596  	err = autorest.Respond(
  3597  		resp,
  3598  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  3599  		autorest.ByUnmarshallingJSON(&result),
  3600  		autorest.ByClosing())
  3601  	result.Response = autorest.Response{Response: resp}
  3602  	return
  3603  }
  3604  
  3605  // GetClosedListEntityRole sends the get closed list entity role request.
  3606  // Parameters:
  3607  // appID - the application ID.
  3608  // versionID - the version ID.
  3609  // entityID - entity ID.
  3610  // roleID - entity role ID.
  3611  func (client ModelClient) GetClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
  3612  	if tracing.IsEnabled() {
  3613  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetClosedListEntityRole")
  3614  		defer func() {
  3615  			sc := -1
  3616  			if result.Response.Response != nil {
  3617  				sc = result.Response.Response.StatusCode
  3618  			}
  3619  			tracing.EndSpan(ctx, sc, err)
  3620  		}()
  3621  	}
  3622  	req, err := client.GetClosedListEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
  3623  	if err != nil {
  3624  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedListEntityRole", nil, "Failure preparing request")
  3625  		return
  3626  	}
  3627  
  3628  	resp, err := client.GetClosedListEntityRoleSender(req)
  3629  	if err != nil {
  3630  		result.Response = autorest.Response{Response: resp}
  3631  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedListEntityRole", resp, "Failure sending request")
  3632  		return
  3633  	}
  3634  
  3635  	result, err = client.GetClosedListEntityRoleResponder(resp)
  3636  	if err != nil {
  3637  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetClosedListEntityRole", resp, "Failure responding to request")
  3638  		return
  3639  	}
  3640  
  3641  	return
  3642  }
  3643  
  3644  // GetClosedListEntityRolePreparer prepares the GetClosedListEntityRole request.
  3645  func (client ModelClient) GetClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  3646  	urlParameters := map[string]interface{}{
  3647  		"Endpoint": client.Endpoint,
  3648  	}
  3649  
  3650  	pathParameters := map[string]interface{}{
  3651  		"appId":     autorest.Encode("path", appID),
  3652  		"entityId":  autorest.Encode("path", entityID),
  3653  		"roleId":    autorest.Encode("path", roleID),
  3654  		"versionId": autorest.Encode("path", versionID),
  3655  	}
  3656  
  3657  	preparer := autorest.CreatePreparer(
  3658  		autorest.AsGet(),
  3659  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  3660  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters))
  3661  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  3662  }
  3663  
  3664  // GetClosedListEntityRoleSender sends the GetClosedListEntityRole request. The method will close the
  3665  // http.Response Body if it receives an error.
  3666  func (client ModelClient) GetClosedListEntityRoleSender(req *http.Request) (*http.Response, error) {
  3667  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3668  }
  3669  
  3670  // GetClosedListEntityRoleResponder handles the response to the GetClosedListEntityRole request. The method always
  3671  // closes the http.Response Body.
  3672  func (client ModelClient) GetClosedListEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
  3673  	err = autorest.Respond(
  3674  		resp,
  3675  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  3676  		autorest.ByUnmarshallingJSON(&result),
  3677  		autorest.ByClosing())
  3678  	result.Response = autorest.Response{Response: resp}
  3679  	return
  3680  }
  3681  
  3682  // GetCompositeEntity gets information about a composite entity in a version of the application.
  3683  // Parameters:
  3684  // appID - the application ID.
  3685  // versionID - the version ID.
  3686  // cEntityID - the composite entity extractor ID.
  3687  func (client ModelClient) GetCompositeEntity(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result CompositeEntityExtractor, err error) {
  3688  	if tracing.IsEnabled() {
  3689  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetCompositeEntity")
  3690  		defer func() {
  3691  			sc := -1
  3692  			if result.Response.Response != nil {
  3693  				sc = result.Response.Response.StatusCode
  3694  			}
  3695  			tracing.EndSpan(ctx, sc, err)
  3696  		}()
  3697  	}
  3698  	req, err := client.GetCompositeEntityPreparer(ctx, appID, versionID, cEntityID)
  3699  	if err != nil {
  3700  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntity", nil, "Failure preparing request")
  3701  		return
  3702  	}
  3703  
  3704  	resp, err := client.GetCompositeEntitySender(req)
  3705  	if err != nil {
  3706  		result.Response = autorest.Response{Response: resp}
  3707  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntity", resp, "Failure sending request")
  3708  		return
  3709  	}
  3710  
  3711  	result, err = client.GetCompositeEntityResponder(resp)
  3712  	if err != nil {
  3713  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntity", resp, "Failure responding to request")
  3714  		return
  3715  	}
  3716  
  3717  	return
  3718  }
  3719  
  3720  // GetCompositeEntityPreparer prepares the GetCompositeEntity request.
  3721  func (client ModelClient) GetCompositeEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (*http.Request, error) {
  3722  	urlParameters := map[string]interface{}{
  3723  		"Endpoint": client.Endpoint,
  3724  	}
  3725  
  3726  	pathParameters := map[string]interface{}{
  3727  		"appId":     autorest.Encode("path", appID),
  3728  		"cEntityId": autorest.Encode("path", cEntityID),
  3729  		"versionId": autorest.Encode("path", versionID),
  3730  	}
  3731  
  3732  	preparer := autorest.CreatePreparer(
  3733  		autorest.AsGet(),
  3734  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  3735  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters))
  3736  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  3737  }
  3738  
  3739  // GetCompositeEntitySender sends the GetCompositeEntity request. The method will close the
  3740  // http.Response Body if it receives an error.
  3741  func (client ModelClient) GetCompositeEntitySender(req *http.Request) (*http.Response, error) {
  3742  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3743  }
  3744  
  3745  // GetCompositeEntityResponder handles the response to the GetCompositeEntity request. The method always
  3746  // closes the http.Response Body.
  3747  func (client ModelClient) GetCompositeEntityResponder(resp *http.Response) (result CompositeEntityExtractor, err error) {
  3748  	err = autorest.Respond(
  3749  		resp,
  3750  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  3751  		autorest.ByUnmarshallingJSON(&result),
  3752  		autorest.ByClosing())
  3753  	result.Response = autorest.Response{Response: resp}
  3754  	return
  3755  }
  3756  
  3757  // GetCompositeEntityRole sends the get composite entity role request.
  3758  // Parameters:
  3759  // appID - the application ID.
  3760  // versionID - the version ID.
  3761  // cEntityID - the composite entity extractor ID.
  3762  // roleID - entity role ID.
  3763  func (client ModelClient) GetCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
  3764  	if tracing.IsEnabled() {
  3765  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetCompositeEntityRole")
  3766  		defer func() {
  3767  			sc := -1
  3768  			if result.Response.Response != nil {
  3769  				sc = result.Response.Response.StatusCode
  3770  			}
  3771  			tracing.EndSpan(ctx, sc, err)
  3772  		}()
  3773  	}
  3774  	req, err := client.GetCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, roleID)
  3775  	if err != nil {
  3776  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRole", nil, "Failure preparing request")
  3777  		return
  3778  	}
  3779  
  3780  	resp, err := client.GetCompositeEntityRoleSender(req)
  3781  	if err != nil {
  3782  		result.Response = autorest.Response{Response: resp}
  3783  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRole", resp, "Failure sending request")
  3784  		return
  3785  	}
  3786  
  3787  	result, err = client.GetCompositeEntityRoleResponder(resp)
  3788  	if err != nil {
  3789  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCompositeEntityRole", resp, "Failure responding to request")
  3790  		return
  3791  	}
  3792  
  3793  	return
  3794  }
  3795  
  3796  // GetCompositeEntityRolePreparer prepares the GetCompositeEntityRole request.
  3797  func (client ModelClient) GetCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  3798  	urlParameters := map[string]interface{}{
  3799  		"Endpoint": client.Endpoint,
  3800  	}
  3801  
  3802  	pathParameters := map[string]interface{}{
  3803  		"appId":     autorest.Encode("path", appID),
  3804  		"cEntityId": autorest.Encode("path", cEntityID),
  3805  		"roleId":    autorest.Encode("path", roleID),
  3806  		"versionId": autorest.Encode("path", versionID),
  3807  	}
  3808  
  3809  	preparer := autorest.CreatePreparer(
  3810  		autorest.AsGet(),
  3811  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  3812  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters))
  3813  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  3814  }
  3815  
  3816  // GetCompositeEntityRoleSender sends the GetCompositeEntityRole request. The method will close the
  3817  // http.Response Body if it receives an error.
  3818  func (client ModelClient) GetCompositeEntityRoleSender(req *http.Request) (*http.Response, error) {
  3819  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3820  }
  3821  
  3822  // GetCompositeEntityRoleResponder handles the response to the GetCompositeEntityRole request. The method always
  3823  // closes the http.Response Body.
  3824  func (client ModelClient) GetCompositeEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
  3825  	err = autorest.Respond(
  3826  		resp,
  3827  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  3828  		autorest.ByUnmarshallingJSON(&result),
  3829  		autorest.ByClosing())
  3830  	result.Response = autorest.Response{Response: resp}
  3831  	return
  3832  }
  3833  
  3834  // GetCustomEntityRole sends the get custom entity role request.
  3835  // Parameters:
  3836  // appID - the application ID.
  3837  // versionID - the version ID.
  3838  // entityID - entity ID.
  3839  // roleID - entity role ID.
  3840  func (client ModelClient) GetCustomEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
  3841  	if tracing.IsEnabled() {
  3842  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetCustomEntityRole")
  3843  		defer func() {
  3844  			sc := -1
  3845  			if result.Response.Response != nil {
  3846  				sc = result.Response.Response.StatusCode
  3847  			}
  3848  			tracing.EndSpan(ctx, sc, err)
  3849  		}()
  3850  	}
  3851  	req, err := client.GetCustomEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
  3852  	if err != nil {
  3853  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomEntityRole", nil, "Failure preparing request")
  3854  		return
  3855  	}
  3856  
  3857  	resp, err := client.GetCustomEntityRoleSender(req)
  3858  	if err != nil {
  3859  		result.Response = autorest.Response{Response: resp}
  3860  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomEntityRole", resp, "Failure sending request")
  3861  		return
  3862  	}
  3863  
  3864  	result, err = client.GetCustomEntityRoleResponder(resp)
  3865  	if err != nil {
  3866  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetCustomEntityRole", resp, "Failure responding to request")
  3867  		return
  3868  	}
  3869  
  3870  	return
  3871  }
  3872  
  3873  // GetCustomEntityRolePreparer prepares the GetCustomEntityRole request.
  3874  func (client ModelClient) GetCustomEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  3875  	urlParameters := map[string]interface{}{
  3876  		"Endpoint": client.Endpoint,
  3877  	}
  3878  
  3879  	pathParameters := map[string]interface{}{
  3880  		"appId":     autorest.Encode("path", appID),
  3881  		"entityId":  autorest.Encode("path", entityID),
  3882  		"roleId":    autorest.Encode("path", roleID),
  3883  		"versionId": autorest.Encode("path", versionID),
  3884  	}
  3885  
  3886  	preparer := autorest.CreatePreparer(
  3887  		autorest.AsGet(),
  3888  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  3889  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters))
  3890  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  3891  }
  3892  
  3893  // GetCustomEntityRoleSender sends the GetCustomEntityRole request. The method will close the
  3894  // http.Response Body if it receives an error.
  3895  func (client ModelClient) GetCustomEntityRoleSender(req *http.Request) (*http.Response, error) {
  3896  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3897  }
  3898  
  3899  // GetCustomEntityRoleResponder handles the response to the GetCustomEntityRole request. The method always
  3900  // closes the http.Response Body.
  3901  func (client ModelClient) GetCustomEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
  3902  	err = autorest.Respond(
  3903  		resp,
  3904  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  3905  		autorest.ByUnmarshallingJSON(&result),
  3906  		autorest.ByClosing())
  3907  	result.Response = autorest.Response{Response: resp}
  3908  	return
  3909  }
  3910  
  3911  // GetEntity gets information about an entity model in a version of the application.
  3912  // Parameters:
  3913  // appID - the application ID.
  3914  // versionID - the version ID.
  3915  // entityID - the entity extractor ID.
  3916  func (client ModelClient) GetEntity(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result NDepthEntityExtractor, err error) {
  3917  	if tracing.IsEnabled() {
  3918  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetEntity")
  3919  		defer func() {
  3920  			sc := -1
  3921  			if result.Response.Response != nil {
  3922  				sc = result.Response.Response.StatusCode
  3923  			}
  3924  			tracing.EndSpan(ctx, sc, err)
  3925  		}()
  3926  	}
  3927  	req, err := client.GetEntityPreparer(ctx, appID, versionID, entityID)
  3928  	if err != nil {
  3929  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntity", nil, "Failure preparing request")
  3930  		return
  3931  	}
  3932  
  3933  	resp, err := client.GetEntitySender(req)
  3934  	if err != nil {
  3935  		result.Response = autorest.Response{Response: resp}
  3936  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntity", resp, "Failure sending request")
  3937  		return
  3938  	}
  3939  
  3940  	result, err = client.GetEntityResponder(resp)
  3941  	if err != nil {
  3942  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntity", resp, "Failure responding to request")
  3943  		return
  3944  	}
  3945  
  3946  	return
  3947  }
  3948  
  3949  // GetEntityPreparer prepares the GetEntity request.
  3950  func (client ModelClient) GetEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
  3951  	urlParameters := map[string]interface{}{
  3952  		"Endpoint": client.Endpoint,
  3953  	}
  3954  
  3955  	pathParameters := map[string]interface{}{
  3956  		"appId":     autorest.Encode("path", appID),
  3957  		"entityId":  autorest.Encode("path", entityID),
  3958  		"versionId": autorest.Encode("path", versionID),
  3959  	}
  3960  
  3961  	preparer := autorest.CreatePreparer(
  3962  		autorest.AsGet(),
  3963  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  3964  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters))
  3965  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  3966  }
  3967  
  3968  // GetEntitySender sends the GetEntity request. The method will close the
  3969  // http.Response Body if it receives an error.
  3970  func (client ModelClient) GetEntitySender(req *http.Request) (*http.Response, error) {
  3971  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  3972  }
  3973  
  3974  // GetEntityResponder handles the response to the GetEntity request. The method always
  3975  // closes the http.Response Body.
  3976  func (client ModelClient) GetEntityResponder(resp *http.Response) (result NDepthEntityExtractor, err error) {
  3977  	err = autorest.Respond(
  3978  		resp,
  3979  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  3980  		autorest.ByUnmarshallingJSON(&result),
  3981  		autorest.ByClosing())
  3982  	result.Response = autorest.Response{Response: resp}
  3983  	return
  3984  }
  3985  
  3986  // GetEntityFeatures gets the information of the features used by the entity in a version of the application.
  3987  // Parameters:
  3988  // appID - the application ID.
  3989  // versionID - the version ID.
  3990  // entityID - the entity extractor ID.
  3991  func (client ModelClient) GetEntityFeatures(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListModelFeatureInformation, err error) {
  3992  	if tracing.IsEnabled() {
  3993  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetEntityFeatures")
  3994  		defer func() {
  3995  			sc := -1
  3996  			if result.Response.Response != nil {
  3997  				sc = result.Response.Response.StatusCode
  3998  			}
  3999  			tracing.EndSpan(ctx, sc, err)
  4000  		}()
  4001  	}
  4002  	req, err := client.GetEntityFeaturesPreparer(ctx, appID, versionID, entityID)
  4003  	if err != nil {
  4004  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityFeatures", nil, "Failure preparing request")
  4005  		return
  4006  	}
  4007  
  4008  	resp, err := client.GetEntityFeaturesSender(req)
  4009  	if err != nil {
  4010  		result.Response = autorest.Response{Response: resp}
  4011  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityFeatures", resp, "Failure sending request")
  4012  		return
  4013  	}
  4014  
  4015  	result, err = client.GetEntityFeaturesResponder(resp)
  4016  	if err != nil {
  4017  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityFeatures", resp, "Failure responding to request")
  4018  		return
  4019  	}
  4020  
  4021  	return
  4022  }
  4023  
  4024  // GetEntityFeaturesPreparer prepares the GetEntityFeatures request.
  4025  func (client ModelClient) GetEntityFeaturesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
  4026  	urlParameters := map[string]interface{}{
  4027  		"Endpoint": client.Endpoint,
  4028  	}
  4029  
  4030  	pathParameters := map[string]interface{}{
  4031  		"appId":     autorest.Encode("path", appID),
  4032  		"entityId":  autorest.Encode("path", entityID),
  4033  		"versionId": autorest.Encode("path", versionID),
  4034  	}
  4035  
  4036  	preparer := autorest.CreatePreparer(
  4037  		autorest.AsGet(),
  4038  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  4039  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/features", pathParameters))
  4040  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  4041  }
  4042  
  4043  // GetEntityFeaturesSender sends the GetEntityFeatures request. The method will close the
  4044  // http.Response Body if it receives an error.
  4045  func (client ModelClient) GetEntityFeaturesSender(req *http.Request) (*http.Response, error) {
  4046  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4047  }
  4048  
  4049  // GetEntityFeaturesResponder handles the response to the GetEntityFeatures request. The method always
  4050  // closes the http.Response Body.
  4051  func (client ModelClient) GetEntityFeaturesResponder(resp *http.Response) (result ListModelFeatureInformation, err error) {
  4052  	err = autorest.Respond(
  4053  		resp,
  4054  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  4055  		autorest.ByUnmarshallingJSON(&result.Value),
  4056  		autorest.ByClosing())
  4057  	result.Response = autorest.Response{Response: resp}
  4058  	return
  4059  }
  4060  
  4061  // GetEntityRole sends the get entity role request.
  4062  // Parameters:
  4063  // appID - the application ID.
  4064  // versionID - the version ID.
  4065  // entityID - entity ID.
  4066  // roleID - entity role ID.
  4067  func (client ModelClient) GetEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
  4068  	if tracing.IsEnabled() {
  4069  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetEntityRole")
  4070  		defer func() {
  4071  			sc := -1
  4072  			if result.Response.Response != nil {
  4073  				sc = result.Response.Response.StatusCode
  4074  			}
  4075  			tracing.EndSpan(ctx, sc, err)
  4076  		}()
  4077  	}
  4078  	req, err := client.GetEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
  4079  	if err != nil {
  4080  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRole", nil, "Failure preparing request")
  4081  		return
  4082  	}
  4083  
  4084  	resp, err := client.GetEntityRoleSender(req)
  4085  	if err != nil {
  4086  		result.Response = autorest.Response{Response: resp}
  4087  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRole", resp, "Failure sending request")
  4088  		return
  4089  	}
  4090  
  4091  	result, err = client.GetEntityRoleResponder(resp)
  4092  	if err != nil {
  4093  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetEntityRole", resp, "Failure responding to request")
  4094  		return
  4095  	}
  4096  
  4097  	return
  4098  }
  4099  
  4100  // GetEntityRolePreparer prepares the GetEntityRole request.
  4101  func (client ModelClient) GetEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  4102  	urlParameters := map[string]interface{}{
  4103  		"Endpoint": client.Endpoint,
  4104  	}
  4105  
  4106  	pathParameters := map[string]interface{}{
  4107  		"appId":     autorest.Encode("path", appID),
  4108  		"entityId":  autorest.Encode("path", entityID),
  4109  		"roleId":    autorest.Encode("path", roleID),
  4110  		"versionId": autorest.Encode("path", versionID),
  4111  	}
  4112  
  4113  	preparer := autorest.CreatePreparer(
  4114  		autorest.AsGet(),
  4115  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  4116  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters))
  4117  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  4118  }
  4119  
  4120  // GetEntityRoleSender sends the GetEntityRole request. The method will close the
  4121  // http.Response Body if it receives an error.
  4122  func (client ModelClient) GetEntityRoleSender(req *http.Request) (*http.Response, error) {
  4123  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4124  }
  4125  
  4126  // GetEntityRoleResponder handles the response to the GetEntityRole request. The method always
  4127  // closes the http.Response Body.
  4128  func (client ModelClient) GetEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
  4129  	err = autorest.Respond(
  4130  		resp,
  4131  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  4132  		autorest.ByUnmarshallingJSON(&result),
  4133  		autorest.ByClosing())
  4134  	result.Response = autorest.Response{Response: resp}
  4135  	return
  4136  }
  4137  
  4138  // GetExplicitList sends the get explicit list request.
  4139  // Parameters:
  4140  // appID - the application ID.
  4141  // versionID - the version ID.
  4142  // entityID - the Pattern.Any entity id.
  4143  func (client ModelClient) GetExplicitList(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListExplicitListItem, err error) {
  4144  	if tracing.IsEnabled() {
  4145  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetExplicitList")
  4146  		defer func() {
  4147  			sc := -1
  4148  			if result.Response.Response != nil {
  4149  				sc = result.Response.Response.StatusCode
  4150  			}
  4151  			tracing.EndSpan(ctx, sc, err)
  4152  		}()
  4153  	}
  4154  	req, err := client.GetExplicitListPreparer(ctx, appID, versionID, entityID)
  4155  	if err != nil {
  4156  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitList", nil, "Failure preparing request")
  4157  		return
  4158  	}
  4159  
  4160  	resp, err := client.GetExplicitListSender(req)
  4161  	if err != nil {
  4162  		result.Response = autorest.Response{Response: resp}
  4163  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitList", resp, "Failure sending request")
  4164  		return
  4165  	}
  4166  
  4167  	result, err = client.GetExplicitListResponder(resp)
  4168  	if err != nil {
  4169  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitList", resp, "Failure responding to request")
  4170  		return
  4171  	}
  4172  
  4173  	return
  4174  }
  4175  
  4176  // GetExplicitListPreparer prepares the GetExplicitList request.
  4177  func (client ModelClient) GetExplicitListPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
  4178  	urlParameters := map[string]interface{}{
  4179  		"Endpoint": client.Endpoint,
  4180  	}
  4181  
  4182  	pathParameters := map[string]interface{}{
  4183  		"appId":     autorest.Encode("path", appID),
  4184  		"entityId":  autorest.Encode("path", entityID),
  4185  		"versionId": autorest.Encode("path", versionID),
  4186  	}
  4187  
  4188  	preparer := autorest.CreatePreparer(
  4189  		autorest.AsGet(),
  4190  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  4191  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist", pathParameters))
  4192  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  4193  }
  4194  
  4195  // GetExplicitListSender sends the GetExplicitList request. The method will close the
  4196  // http.Response Body if it receives an error.
  4197  func (client ModelClient) GetExplicitListSender(req *http.Request) (*http.Response, error) {
  4198  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4199  }
  4200  
  4201  // GetExplicitListResponder handles the response to the GetExplicitList request. The method always
  4202  // closes the http.Response Body.
  4203  func (client ModelClient) GetExplicitListResponder(resp *http.Response) (result ListExplicitListItem, err error) {
  4204  	err = autorest.Respond(
  4205  		resp,
  4206  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  4207  		autorest.ByUnmarshallingJSON(&result.Value),
  4208  		autorest.ByClosing())
  4209  	result.Response = autorest.Response{Response: resp}
  4210  	return
  4211  }
  4212  
  4213  // GetExplicitListItem sends the get explicit list item request.
  4214  // Parameters:
  4215  // appID - the application ID.
  4216  // versionID - the version ID.
  4217  // entityID - the Pattern.Any entity Id.
  4218  // itemID - the explicit list item Id.
  4219  func (client ModelClient) GetExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (result ExplicitListItem, err error) {
  4220  	if tracing.IsEnabled() {
  4221  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetExplicitListItem")
  4222  		defer func() {
  4223  			sc := -1
  4224  			if result.Response.Response != nil {
  4225  				sc = result.Response.Response.StatusCode
  4226  			}
  4227  			tracing.EndSpan(ctx, sc, err)
  4228  		}()
  4229  	}
  4230  	req, err := client.GetExplicitListItemPreparer(ctx, appID, versionID, entityID, itemID)
  4231  	if err != nil {
  4232  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitListItem", nil, "Failure preparing request")
  4233  		return
  4234  	}
  4235  
  4236  	resp, err := client.GetExplicitListItemSender(req)
  4237  	if err != nil {
  4238  		result.Response = autorest.Response{Response: resp}
  4239  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitListItem", resp, "Failure sending request")
  4240  		return
  4241  	}
  4242  
  4243  	result, err = client.GetExplicitListItemResponder(resp)
  4244  	if err != nil {
  4245  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetExplicitListItem", resp, "Failure responding to request")
  4246  		return
  4247  	}
  4248  
  4249  	return
  4250  }
  4251  
  4252  // GetExplicitListItemPreparer prepares the GetExplicitListItem request.
  4253  func (client ModelClient) GetExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64) (*http.Request, error) {
  4254  	urlParameters := map[string]interface{}{
  4255  		"Endpoint": client.Endpoint,
  4256  	}
  4257  
  4258  	pathParameters := map[string]interface{}{
  4259  		"appId":     autorest.Encode("path", appID),
  4260  		"entityId":  autorest.Encode("path", entityID),
  4261  		"itemId":    autorest.Encode("path", itemID),
  4262  		"versionId": autorest.Encode("path", versionID),
  4263  	}
  4264  
  4265  	preparer := autorest.CreatePreparer(
  4266  		autorest.AsGet(),
  4267  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  4268  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters))
  4269  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  4270  }
  4271  
  4272  // GetExplicitListItemSender sends the GetExplicitListItem request. The method will close the
  4273  // http.Response Body if it receives an error.
  4274  func (client ModelClient) GetExplicitListItemSender(req *http.Request) (*http.Response, error) {
  4275  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4276  }
  4277  
  4278  // GetExplicitListItemResponder handles the response to the GetExplicitListItem request. The method always
  4279  // closes the http.Response Body.
  4280  func (client ModelClient) GetExplicitListItemResponder(resp *http.Response) (result ExplicitListItem, err error) {
  4281  	err = autorest.Respond(
  4282  		resp,
  4283  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  4284  		autorest.ByUnmarshallingJSON(&result),
  4285  		autorest.ByClosing())
  4286  	result.Response = autorest.Response{Response: resp}
  4287  	return
  4288  }
  4289  
  4290  // GetHierarchicalEntity gets information about a hierarchical entity in a version of the application.
  4291  // Parameters:
  4292  // appID - the application ID.
  4293  // versionID - the version ID.
  4294  // hEntityID - the hierarchical entity extractor ID.
  4295  func (client ModelClient) GetHierarchicalEntity(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result HierarchicalEntityExtractor, err error) {
  4296  	if tracing.IsEnabled() {
  4297  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetHierarchicalEntity")
  4298  		defer func() {
  4299  			sc := -1
  4300  			if result.Response.Response != nil {
  4301  				sc = result.Response.Response.StatusCode
  4302  			}
  4303  			tracing.EndSpan(ctx, sc, err)
  4304  		}()
  4305  	}
  4306  	req, err := client.GetHierarchicalEntityPreparer(ctx, appID, versionID, hEntityID)
  4307  	if err != nil {
  4308  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntity", nil, "Failure preparing request")
  4309  		return
  4310  	}
  4311  
  4312  	resp, err := client.GetHierarchicalEntitySender(req)
  4313  	if err != nil {
  4314  		result.Response = autorest.Response{Response: resp}
  4315  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntity", resp, "Failure sending request")
  4316  		return
  4317  	}
  4318  
  4319  	result, err = client.GetHierarchicalEntityResponder(resp)
  4320  	if err != nil {
  4321  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntity", resp, "Failure responding to request")
  4322  		return
  4323  	}
  4324  
  4325  	return
  4326  }
  4327  
  4328  // GetHierarchicalEntityPreparer prepares the GetHierarchicalEntity request.
  4329  func (client ModelClient) GetHierarchicalEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (*http.Request, error) {
  4330  	urlParameters := map[string]interface{}{
  4331  		"Endpoint": client.Endpoint,
  4332  	}
  4333  
  4334  	pathParameters := map[string]interface{}{
  4335  		"appId":     autorest.Encode("path", appID),
  4336  		"hEntityId": autorest.Encode("path", hEntityID),
  4337  		"versionId": autorest.Encode("path", versionID),
  4338  	}
  4339  
  4340  	preparer := autorest.CreatePreparer(
  4341  		autorest.AsGet(),
  4342  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  4343  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters))
  4344  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  4345  }
  4346  
  4347  // GetHierarchicalEntitySender sends the GetHierarchicalEntity request. The method will close the
  4348  // http.Response Body if it receives an error.
  4349  func (client ModelClient) GetHierarchicalEntitySender(req *http.Request) (*http.Response, error) {
  4350  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4351  }
  4352  
  4353  // GetHierarchicalEntityResponder handles the response to the GetHierarchicalEntity request. The method always
  4354  // closes the http.Response Body.
  4355  func (client ModelClient) GetHierarchicalEntityResponder(resp *http.Response) (result HierarchicalEntityExtractor, err error) {
  4356  	err = autorest.Respond(
  4357  		resp,
  4358  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  4359  		autorest.ByUnmarshallingJSON(&result),
  4360  		autorest.ByClosing())
  4361  	result.Response = autorest.Response{Response: resp}
  4362  	return
  4363  }
  4364  
  4365  // GetHierarchicalEntityChild gets information about the child's model contained in an hierarchical entity child model
  4366  // in a version of the application.
  4367  // Parameters:
  4368  // appID - the application ID.
  4369  // versionID - the version ID.
  4370  // hEntityID - the hierarchical entity extractor ID.
  4371  // hChildID - the hierarchical entity extractor child ID.
  4372  func (client ModelClient) GetHierarchicalEntityChild(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (result HierarchicalChildEntity, err error) {
  4373  	if tracing.IsEnabled() {
  4374  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetHierarchicalEntityChild")
  4375  		defer func() {
  4376  			sc := -1
  4377  			if result.Response.Response != nil {
  4378  				sc = result.Response.Response.StatusCode
  4379  			}
  4380  			tracing.EndSpan(ctx, sc, err)
  4381  		}()
  4382  	}
  4383  	req, err := client.GetHierarchicalEntityChildPreparer(ctx, appID, versionID, hEntityID, hChildID)
  4384  	if err != nil {
  4385  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityChild", nil, "Failure preparing request")
  4386  		return
  4387  	}
  4388  
  4389  	resp, err := client.GetHierarchicalEntityChildSender(req)
  4390  	if err != nil {
  4391  		result.Response = autorest.Response{Response: resp}
  4392  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityChild", resp, "Failure sending request")
  4393  		return
  4394  	}
  4395  
  4396  	result, err = client.GetHierarchicalEntityChildResponder(resp)
  4397  	if err != nil {
  4398  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityChild", resp, "Failure responding to request")
  4399  		return
  4400  	}
  4401  
  4402  	return
  4403  }
  4404  
  4405  // GetHierarchicalEntityChildPreparer prepares the GetHierarchicalEntityChild request.
  4406  func (client ModelClient) GetHierarchicalEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID) (*http.Request, error) {
  4407  	urlParameters := map[string]interface{}{
  4408  		"Endpoint": client.Endpoint,
  4409  	}
  4410  
  4411  	pathParameters := map[string]interface{}{
  4412  		"appId":     autorest.Encode("path", appID),
  4413  		"hChildId":  autorest.Encode("path", hChildID),
  4414  		"hEntityId": autorest.Encode("path", hEntityID),
  4415  		"versionId": autorest.Encode("path", versionID),
  4416  	}
  4417  
  4418  	preparer := autorest.CreatePreparer(
  4419  		autorest.AsGet(),
  4420  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  4421  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", pathParameters))
  4422  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  4423  }
  4424  
  4425  // GetHierarchicalEntityChildSender sends the GetHierarchicalEntityChild request. The method will close the
  4426  // http.Response Body if it receives an error.
  4427  func (client ModelClient) GetHierarchicalEntityChildSender(req *http.Request) (*http.Response, error) {
  4428  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4429  }
  4430  
  4431  // GetHierarchicalEntityChildResponder handles the response to the GetHierarchicalEntityChild request. The method always
  4432  // closes the http.Response Body.
  4433  func (client ModelClient) GetHierarchicalEntityChildResponder(resp *http.Response) (result HierarchicalChildEntity, err error) {
  4434  	err = autorest.Respond(
  4435  		resp,
  4436  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  4437  		autorest.ByUnmarshallingJSON(&result),
  4438  		autorest.ByClosing())
  4439  	result.Response = autorest.Response{Response: resp}
  4440  	return
  4441  }
  4442  
  4443  // GetHierarchicalEntityRole sends the get hierarchical entity role request.
  4444  // Parameters:
  4445  // appID - the application ID.
  4446  // versionID - the version ID.
  4447  // hEntityID - the hierarchical entity extractor ID.
  4448  // roleID - entity role ID.
  4449  func (client ModelClient) GetHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
  4450  	if tracing.IsEnabled() {
  4451  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetHierarchicalEntityRole")
  4452  		defer func() {
  4453  			sc := -1
  4454  			if result.Response.Response != nil {
  4455  				sc = result.Response.Response.StatusCode
  4456  			}
  4457  			tracing.EndSpan(ctx, sc, err)
  4458  		}()
  4459  	}
  4460  	req, err := client.GetHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, roleID)
  4461  	if err != nil {
  4462  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRole", nil, "Failure preparing request")
  4463  		return
  4464  	}
  4465  
  4466  	resp, err := client.GetHierarchicalEntityRoleSender(req)
  4467  	if err != nil {
  4468  		result.Response = autorest.Response{Response: resp}
  4469  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRole", resp, "Failure sending request")
  4470  		return
  4471  	}
  4472  
  4473  	result, err = client.GetHierarchicalEntityRoleResponder(resp)
  4474  	if err != nil {
  4475  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetHierarchicalEntityRole", resp, "Failure responding to request")
  4476  		return
  4477  	}
  4478  
  4479  	return
  4480  }
  4481  
  4482  // GetHierarchicalEntityRolePreparer prepares the GetHierarchicalEntityRole request.
  4483  func (client ModelClient) GetHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  4484  	urlParameters := map[string]interface{}{
  4485  		"Endpoint": client.Endpoint,
  4486  	}
  4487  
  4488  	pathParameters := map[string]interface{}{
  4489  		"appId":     autorest.Encode("path", appID),
  4490  		"hEntityId": autorest.Encode("path", hEntityID),
  4491  		"roleId":    autorest.Encode("path", roleID),
  4492  		"versionId": autorest.Encode("path", versionID),
  4493  	}
  4494  
  4495  	preparer := autorest.CreatePreparer(
  4496  		autorest.AsGet(),
  4497  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  4498  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters))
  4499  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  4500  }
  4501  
  4502  // GetHierarchicalEntityRoleSender sends the GetHierarchicalEntityRole request. The method will close the
  4503  // http.Response Body if it receives an error.
  4504  func (client ModelClient) GetHierarchicalEntityRoleSender(req *http.Request) (*http.Response, error) {
  4505  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4506  }
  4507  
  4508  // GetHierarchicalEntityRoleResponder handles the response to the GetHierarchicalEntityRole request. The method always
  4509  // closes the http.Response Body.
  4510  func (client ModelClient) GetHierarchicalEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
  4511  	err = autorest.Respond(
  4512  		resp,
  4513  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  4514  		autorest.ByUnmarshallingJSON(&result),
  4515  		autorest.ByClosing())
  4516  	result.Response = autorest.Response{Response: resp}
  4517  	return
  4518  }
  4519  
  4520  // GetIntent gets information about the intent model in a version of the application.
  4521  // Parameters:
  4522  // appID - the application ID.
  4523  // versionID - the version ID.
  4524  // intentID - the intent classifier ID.
  4525  func (client ModelClient) GetIntent(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID) (result IntentClassifier, err error) {
  4526  	if tracing.IsEnabled() {
  4527  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetIntent")
  4528  		defer func() {
  4529  			sc := -1
  4530  			if result.Response.Response != nil {
  4531  				sc = result.Response.Response.StatusCode
  4532  			}
  4533  			tracing.EndSpan(ctx, sc, err)
  4534  		}()
  4535  	}
  4536  	req, err := client.GetIntentPreparer(ctx, appID, versionID, intentID)
  4537  	if err != nil {
  4538  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntent", nil, "Failure preparing request")
  4539  		return
  4540  	}
  4541  
  4542  	resp, err := client.GetIntentSender(req)
  4543  	if err != nil {
  4544  		result.Response = autorest.Response{Response: resp}
  4545  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntent", resp, "Failure sending request")
  4546  		return
  4547  	}
  4548  
  4549  	result, err = client.GetIntentResponder(resp)
  4550  	if err != nil {
  4551  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntent", resp, "Failure responding to request")
  4552  		return
  4553  	}
  4554  
  4555  	return
  4556  }
  4557  
  4558  // GetIntentPreparer prepares the GetIntent request.
  4559  func (client ModelClient) GetIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID) (*http.Request, error) {
  4560  	urlParameters := map[string]interface{}{
  4561  		"Endpoint": client.Endpoint,
  4562  	}
  4563  
  4564  	pathParameters := map[string]interface{}{
  4565  		"appId":     autorest.Encode("path", appID),
  4566  		"intentId":  autorest.Encode("path", intentID),
  4567  		"versionId": autorest.Encode("path", versionID),
  4568  	}
  4569  
  4570  	preparer := autorest.CreatePreparer(
  4571  		autorest.AsGet(),
  4572  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  4573  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters))
  4574  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  4575  }
  4576  
  4577  // GetIntentSender sends the GetIntent request. The method will close the
  4578  // http.Response Body if it receives an error.
  4579  func (client ModelClient) GetIntentSender(req *http.Request) (*http.Response, error) {
  4580  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4581  }
  4582  
  4583  // GetIntentResponder handles the response to the GetIntent request. The method always
  4584  // closes the http.Response Body.
  4585  func (client ModelClient) GetIntentResponder(resp *http.Response) (result IntentClassifier, err error) {
  4586  	err = autorest.Respond(
  4587  		resp,
  4588  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  4589  		autorest.ByUnmarshallingJSON(&result),
  4590  		autorest.ByClosing())
  4591  	result.Response = autorest.Response{Response: resp}
  4592  	return
  4593  }
  4594  
  4595  // GetIntentFeatures gets the information of the features used by the intent in a version of the application.
  4596  // Parameters:
  4597  // appID - the application ID.
  4598  // versionID - the version ID.
  4599  // intentID - the intent classifier ID.
  4600  func (client ModelClient) GetIntentFeatures(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID) (result ListModelFeatureInformation, err error) {
  4601  	if tracing.IsEnabled() {
  4602  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetIntentFeatures")
  4603  		defer func() {
  4604  			sc := -1
  4605  			if result.Response.Response != nil {
  4606  				sc = result.Response.Response.StatusCode
  4607  			}
  4608  			tracing.EndSpan(ctx, sc, err)
  4609  		}()
  4610  	}
  4611  	req, err := client.GetIntentFeaturesPreparer(ctx, appID, versionID, intentID)
  4612  	if err != nil {
  4613  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntentFeatures", nil, "Failure preparing request")
  4614  		return
  4615  	}
  4616  
  4617  	resp, err := client.GetIntentFeaturesSender(req)
  4618  	if err != nil {
  4619  		result.Response = autorest.Response{Response: resp}
  4620  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntentFeatures", resp, "Failure sending request")
  4621  		return
  4622  	}
  4623  
  4624  	result, err = client.GetIntentFeaturesResponder(resp)
  4625  	if err != nil {
  4626  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetIntentFeatures", resp, "Failure responding to request")
  4627  		return
  4628  	}
  4629  
  4630  	return
  4631  }
  4632  
  4633  // GetIntentFeaturesPreparer prepares the GetIntentFeatures request.
  4634  func (client ModelClient) GetIntentFeaturesPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID) (*http.Request, error) {
  4635  	urlParameters := map[string]interface{}{
  4636  		"Endpoint": client.Endpoint,
  4637  	}
  4638  
  4639  	pathParameters := map[string]interface{}{
  4640  		"appId":     autorest.Encode("path", appID),
  4641  		"intentId":  autorest.Encode("path", intentID),
  4642  		"versionId": autorest.Encode("path", versionID),
  4643  	}
  4644  
  4645  	preparer := autorest.CreatePreparer(
  4646  		autorest.AsGet(),
  4647  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  4648  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/features", pathParameters))
  4649  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  4650  }
  4651  
  4652  // GetIntentFeaturesSender sends the GetIntentFeatures request. The method will close the
  4653  // http.Response Body if it receives an error.
  4654  func (client ModelClient) GetIntentFeaturesSender(req *http.Request) (*http.Response, error) {
  4655  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4656  }
  4657  
  4658  // GetIntentFeaturesResponder handles the response to the GetIntentFeatures request. The method always
  4659  // closes the http.Response Body.
  4660  func (client ModelClient) GetIntentFeaturesResponder(resp *http.Response) (result ListModelFeatureInformation, err error) {
  4661  	err = autorest.Respond(
  4662  		resp,
  4663  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  4664  		autorest.ByUnmarshallingJSON(&result.Value),
  4665  		autorest.ByClosing())
  4666  	result.Response = autorest.Response{Response: resp}
  4667  	return
  4668  }
  4669  
  4670  // GetPatternAnyEntityInfo sends the get pattern any entity info request.
  4671  // Parameters:
  4672  // appID - the application ID.
  4673  // versionID - the version ID.
  4674  // entityID - the entity extractor ID.
  4675  func (client ModelClient) GetPatternAnyEntityInfo(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result PatternAnyEntityExtractor, err error) {
  4676  	if tracing.IsEnabled() {
  4677  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetPatternAnyEntityInfo")
  4678  		defer func() {
  4679  			sc := -1
  4680  			if result.Response.Response != nil {
  4681  				sc = result.Response.Response.StatusCode
  4682  			}
  4683  			tracing.EndSpan(ctx, sc, err)
  4684  		}()
  4685  	}
  4686  	req, err := client.GetPatternAnyEntityInfoPreparer(ctx, appID, versionID, entityID)
  4687  	if err != nil {
  4688  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfo", nil, "Failure preparing request")
  4689  		return
  4690  	}
  4691  
  4692  	resp, err := client.GetPatternAnyEntityInfoSender(req)
  4693  	if err != nil {
  4694  		result.Response = autorest.Response{Response: resp}
  4695  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfo", resp, "Failure sending request")
  4696  		return
  4697  	}
  4698  
  4699  	result, err = client.GetPatternAnyEntityInfoResponder(resp)
  4700  	if err != nil {
  4701  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityInfo", resp, "Failure responding to request")
  4702  		return
  4703  	}
  4704  
  4705  	return
  4706  }
  4707  
  4708  // GetPatternAnyEntityInfoPreparer prepares the GetPatternAnyEntityInfo request.
  4709  func (client ModelClient) GetPatternAnyEntityInfoPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
  4710  	urlParameters := map[string]interface{}{
  4711  		"Endpoint": client.Endpoint,
  4712  	}
  4713  
  4714  	pathParameters := map[string]interface{}{
  4715  		"appId":     autorest.Encode("path", appID),
  4716  		"entityId":  autorest.Encode("path", entityID),
  4717  		"versionId": autorest.Encode("path", versionID),
  4718  	}
  4719  
  4720  	preparer := autorest.CreatePreparer(
  4721  		autorest.AsGet(),
  4722  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  4723  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters))
  4724  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  4725  }
  4726  
  4727  // GetPatternAnyEntityInfoSender sends the GetPatternAnyEntityInfo request. The method will close the
  4728  // http.Response Body if it receives an error.
  4729  func (client ModelClient) GetPatternAnyEntityInfoSender(req *http.Request) (*http.Response, error) {
  4730  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4731  }
  4732  
  4733  // GetPatternAnyEntityInfoResponder handles the response to the GetPatternAnyEntityInfo request. The method always
  4734  // closes the http.Response Body.
  4735  func (client ModelClient) GetPatternAnyEntityInfoResponder(resp *http.Response) (result PatternAnyEntityExtractor, err error) {
  4736  	err = autorest.Respond(
  4737  		resp,
  4738  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  4739  		autorest.ByUnmarshallingJSON(&result),
  4740  		autorest.ByClosing())
  4741  	result.Response = autorest.Response{Response: resp}
  4742  	return
  4743  }
  4744  
  4745  // GetPatternAnyEntityRole sends the get pattern any entity role request.
  4746  // Parameters:
  4747  // appID - the application ID.
  4748  // versionID - the version ID.
  4749  // entityID - entity ID.
  4750  // roleID - entity role ID.
  4751  func (client ModelClient) GetPatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
  4752  	if tracing.IsEnabled() {
  4753  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetPatternAnyEntityRole")
  4754  		defer func() {
  4755  			sc := -1
  4756  			if result.Response.Response != nil {
  4757  				sc = result.Response.Response.StatusCode
  4758  			}
  4759  			tracing.EndSpan(ctx, sc, err)
  4760  		}()
  4761  	}
  4762  	req, err := client.GetPatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
  4763  	if err != nil {
  4764  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRole", nil, "Failure preparing request")
  4765  		return
  4766  	}
  4767  
  4768  	resp, err := client.GetPatternAnyEntityRoleSender(req)
  4769  	if err != nil {
  4770  		result.Response = autorest.Response{Response: resp}
  4771  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRole", resp, "Failure sending request")
  4772  		return
  4773  	}
  4774  
  4775  	result, err = client.GetPatternAnyEntityRoleResponder(resp)
  4776  	if err != nil {
  4777  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPatternAnyEntityRole", resp, "Failure responding to request")
  4778  		return
  4779  	}
  4780  
  4781  	return
  4782  }
  4783  
  4784  // GetPatternAnyEntityRolePreparer prepares the GetPatternAnyEntityRole request.
  4785  func (client ModelClient) GetPatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  4786  	urlParameters := map[string]interface{}{
  4787  		"Endpoint": client.Endpoint,
  4788  	}
  4789  
  4790  	pathParameters := map[string]interface{}{
  4791  		"appId":     autorest.Encode("path", appID),
  4792  		"entityId":  autorest.Encode("path", entityID),
  4793  		"roleId":    autorest.Encode("path", roleID),
  4794  		"versionId": autorest.Encode("path", versionID),
  4795  	}
  4796  
  4797  	preparer := autorest.CreatePreparer(
  4798  		autorest.AsGet(),
  4799  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  4800  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters))
  4801  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  4802  }
  4803  
  4804  // GetPatternAnyEntityRoleSender sends the GetPatternAnyEntityRole request. The method will close the
  4805  // http.Response Body if it receives an error.
  4806  func (client ModelClient) GetPatternAnyEntityRoleSender(req *http.Request) (*http.Response, error) {
  4807  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4808  }
  4809  
  4810  // GetPatternAnyEntityRoleResponder handles the response to the GetPatternAnyEntityRole request. The method always
  4811  // closes the http.Response Body.
  4812  func (client ModelClient) GetPatternAnyEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
  4813  	err = autorest.Respond(
  4814  		resp,
  4815  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  4816  		autorest.ByUnmarshallingJSON(&result),
  4817  		autorest.ByClosing())
  4818  	result.Response = autorest.Response{Response: resp}
  4819  	return
  4820  }
  4821  
  4822  // GetPrebuilt gets information about a prebuilt entity model in a version of the application.
  4823  // Parameters:
  4824  // appID - the application ID.
  4825  // versionID - the version ID.
  4826  // prebuiltID - the prebuilt entity extractor ID.
  4827  func (client ModelClient) GetPrebuilt(ctx context.Context, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (result PrebuiltEntityExtractor, err error) {
  4828  	if tracing.IsEnabled() {
  4829  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetPrebuilt")
  4830  		defer func() {
  4831  			sc := -1
  4832  			if result.Response.Response != nil {
  4833  				sc = result.Response.Response.StatusCode
  4834  			}
  4835  			tracing.EndSpan(ctx, sc, err)
  4836  		}()
  4837  	}
  4838  	req, err := client.GetPrebuiltPreparer(ctx, appID, versionID, prebuiltID)
  4839  	if err != nil {
  4840  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuilt", nil, "Failure preparing request")
  4841  		return
  4842  	}
  4843  
  4844  	resp, err := client.GetPrebuiltSender(req)
  4845  	if err != nil {
  4846  		result.Response = autorest.Response{Response: resp}
  4847  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuilt", resp, "Failure sending request")
  4848  		return
  4849  	}
  4850  
  4851  	result, err = client.GetPrebuiltResponder(resp)
  4852  	if err != nil {
  4853  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuilt", resp, "Failure responding to request")
  4854  		return
  4855  	}
  4856  
  4857  	return
  4858  }
  4859  
  4860  // GetPrebuiltPreparer prepares the GetPrebuilt request.
  4861  func (client ModelClient) GetPrebuiltPreparer(ctx context.Context, appID uuid.UUID, versionID string, prebuiltID uuid.UUID) (*http.Request, error) {
  4862  	urlParameters := map[string]interface{}{
  4863  		"Endpoint": client.Endpoint,
  4864  	}
  4865  
  4866  	pathParameters := map[string]interface{}{
  4867  		"appId":      autorest.Encode("path", appID),
  4868  		"prebuiltId": autorest.Encode("path", prebuiltID),
  4869  		"versionId":  autorest.Encode("path", versionID),
  4870  	}
  4871  
  4872  	preparer := autorest.CreatePreparer(
  4873  		autorest.AsGet(),
  4874  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  4875  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}", pathParameters))
  4876  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  4877  }
  4878  
  4879  // GetPrebuiltSender sends the GetPrebuilt request. The method will close the
  4880  // http.Response Body if it receives an error.
  4881  func (client ModelClient) GetPrebuiltSender(req *http.Request) (*http.Response, error) {
  4882  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4883  }
  4884  
  4885  // GetPrebuiltResponder handles the response to the GetPrebuilt request. The method always
  4886  // closes the http.Response Body.
  4887  func (client ModelClient) GetPrebuiltResponder(resp *http.Response) (result PrebuiltEntityExtractor, err error) {
  4888  	err = autorest.Respond(
  4889  		resp,
  4890  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  4891  		autorest.ByUnmarshallingJSON(&result),
  4892  		autorest.ByClosing())
  4893  	result.Response = autorest.Response{Response: resp}
  4894  	return
  4895  }
  4896  
  4897  // GetPrebuiltEntityRole sends the get prebuilt entity role request.
  4898  // Parameters:
  4899  // appID - the application ID.
  4900  // versionID - the version ID.
  4901  // entityID - entity ID.
  4902  // roleID - entity role ID.
  4903  func (client ModelClient) GetPrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
  4904  	if tracing.IsEnabled() {
  4905  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetPrebuiltEntityRole")
  4906  		defer func() {
  4907  			sc := -1
  4908  			if result.Response.Response != nil {
  4909  				sc = result.Response.Response.StatusCode
  4910  			}
  4911  			tracing.EndSpan(ctx, sc, err)
  4912  		}()
  4913  	}
  4914  	req, err := client.GetPrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
  4915  	if err != nil {
  4916  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRole", nil, "Failure preparing request")
  4917  		return
  4918  	}
  4919  
  4920  	resp, err := client.GetPrebuiltEntityRoleSender(req)
  4921  	if err != nil {
  4922  		result.Response = autorest.Response{Response: resp}
  4923  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRole", resp, "Failure sending request")
  4924  		return
  4925  	}
  4926  
  4927  	result, err = client.GetPrebuiltEntityRoleResponder(resp)
  4928  	if err != nil {
  4929  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetPrebuiltEntityRole", resp, "Failure responding to request")
  4930  		return
  4931  	}
  4932  
  4933  	return
  4934  }
  4935  
  4936  // GetPrebuiltEntityRolePreparer prepares the GetPrebuiltEntityRole request.
  4937  func (client ModelClient) GetPrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  4938  	urlParameters := map[string]interface{}{
  4939  		"Endpoint": client.Endpoint,
  4940  	}
  4941  
  4942  	pathParameters := map[string]interface{}{
  4943  		"appId":     autorest.Encode("path", appID),
  4944  		"entityId":  autorest.Encode("path", entityID),
  4945  		"roleId":    autorest.Encode("path", roleID),
  4946  		"versionId": autorest.Encode("path", versionID),
  4947  	}
  4948  
  4949  	preparer := autorest.CreatePreparer(
  4950  		autorest.AsGet(),
  4951  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  4952  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters))
  4953  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  4954  }
  4955  
  4956  // GetPrebuiltEntityRoleSender sends the GetPrebuiltEntityRole request. The method will close the
  4957  // http.Response Body if it receives an error.
  4958  func (client ModelClient) GetPrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
  4959  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  4960  }
  4961  
  4962  // GetPrebuiltEntityRoleResponder handles the response to the GetPrebuiltEntityRole request. The method always
  4963  // closes the http.Response Body.
  4964  func (client ModelClient) GetPrebuiltEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
  4965  	err = autorest.Respond(
  4966  		resp,
  4967  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  4968  		autorest.ByUnmarshallingJSON(&result),
  4969  		autorest.ByClosing())
  4970  	result.Response = autorest.Response{Response: resp}
  4971  	return
  4972  }
  4973  
  4974  // GetRegexEntityEntityInfo sends the get regex entity entity info request.
  4975  // Parameters:
  4976  // appID - the application ID.
  4977  // versionID - the version ID.
  4978  // regexEntityID - the regular expression entity model ID.
  4979  func (client ModelClient) GetRegexEntityEntityInfo(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (result RegexEntityExtractor, err error) {
  4980  	if tracing.IsEnabled() {
  4981  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetRegexEntityEntityInfo")
  4982  		defer func() {
  4983  			sc := -1
  4984  			if result.Response.Response != nil {
  4985  				sc = result.Response.Response.StatusCode
  4986  			}
  4987  			tracing.EndSpan(ctx, sc, err)
  4988  		}()
  4989  	}
  4990  	req, err := client.GetRegexEntityEntityInfoPreparer(ctx, appID, versionID, regexEntityID)
  4991  	if err != nil {
  4992  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityEntityInfo", nil, "Failure preparing request")
  4993  		return
  4994  	}
  4995  
  4996  	resp, err := client.GetRegexEntityEntityInfoSender(req)
  4997  	if err != nil {
  4998  		result.Response = autorest.Response{Response: resp}
  4999  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityEntityInfo", resp, "Failure sending request")
  5000  		return
  5001  	}
  5002  
  5003  	result, err = client.GetRegexEntityEntityInfoResponder(resp)
  5004  	if err != nil {
  5005  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityEntityInfo", resp, "Failure responding to request")
  5006  		return
  5007  	}
  5008  
  5009  	return
  5010  }
  5011  
  5012  // GetRegexEntityEntityInfoPreparer prepares the GetRegexEntityEntityInfo request.
  5013  func (client ModelClient) GetRegexEntityEntityInfoPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID) (*http.Request, error) {
  5014  	urlParameters := map[string]interface{}{
  5015  		"Endpoint": client.Endpoint,
  5016  	}
  5017  
  5018  	pathParameters := map[string]interface{}{
  5019  		"appId":         autorest.Encode("path", appID),
  5020  		"regexEntityId": autorest.Encode("path", regexEntityID),
  5021  		"versionId":     autorest.Encode("path", versionID),
  5022  	}
  5023  
  5024  	preparer := autorest.CreatePreparer(
  5025  		autorest.AsGet(),
  5026  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  5027  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters))
  5028  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  5029  }
  5030  
  5031  // GetRegexEntityEntityInfoSender sends the GetRegexEntityEntityInfo request. The method will close the
  5032  // http.Response Body if it receives an error.
  5033  func (client ModelClient) GetRegexEntityEntityInfoSender(req *http.Request) (*http.Response, error) {
  5034  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5035  }
  5036  
  5037  // GetRegexEntityEntityInfoResponder handles the response to the GetRegexEntityEntityInfo request. The method always
  5038  // closes the http.Response Body.
  5039  func (client ModelClient) GetRegexEntityEntityInfoResponder(resp *http.Response) (result RegexEntityExtractor, err error) {
  5040  	err = autorest.Respond(
  5041  		resp,
  5042  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  5043  		autorest.ByUnmarshallingJSON(&result),
  5044  		autorest.ByClosing())
  5045  	result.Response = autorest.Response{Response: resp}
  5046  	return
  5047  }
  5048  
  5049  // GetRegexEntityRole sends the get regex entity role request.
  5050  // Parameters:
  5051  // appID - the application ID.
  5052  // versionID - the version ID.
  5053  // entityID - entity ID.
  5054  // roleID - entity role ID.
  5055  func (client ModelClient) GetRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (result EntityRole, err error) {
  5056  	if tracing.IsEnabled() {
  5057  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.GetRegexEntityRole")
  5058  		defer func() {
  5059  			sc := -1
  5060  			if result.Response.Response != nil {
  5061  				sc = result.Response.Response.StatusCode
  5062  			}
  5063  			tracing.EndSpan(ctx, sc, err)
  5064  		}()
  5065  	}
  5066  	req, err := client.GetRegexEntityRolePreparer(ctx, appID, versionID, entityID, roleID)
  5067  	if err != nil {
  5068  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRole", nil, "Failure preparing request")
  5069  		return
  5070  	}
  5071  
  5072  	resp, err := client.GetRegexEntityRoleSender(req)
  5073  	if err != nil {
  5074  		result.Response = autorest.Response{Response: resp}
  5075  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRole", resp, "Failure sending request")
  5076  		return
  5077  	}
  5078  
  5079  	result, err = client.GetRegexEntityRoleResponder(resp)
  5080  	if err != nil {
  5081  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "GetRegexEntityRole", resp, "Failure responding to request")
  5082  		return
  5083  	}
  5084  
  5085  	return
  5086  }
  5087  
  5088  // GetRegexEntityRolePreparer prepares the GetRegexEntityRole request.
  5089  func (client ModelClient) GetRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID) (*http.Request, error) {
  5090  	urlParameters := map[string]interface{}{
  5091  		"Endpoint": client.Endpoint,
  5092  	}
  5093  
  5094  	pathParameters := map[string]interface{}{
  5095  		"appId":     autorest.Encode("path", appID),
  5096  		"entityId":  autorest.Encode("path", entityID),
  5097  		"roleId":    autorest.Encode("path", roleID),
  5098  		"versionId": autorest.Encode("path", versionID),
  5099  	}
  5100  
  5101  	preparer := autorest.CreatePreparer(
  5102  		autorest.AsGet(),
  5103  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  5104  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters))
  5105  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  5106  }
  5107  
  5108  // GetRegexEntityRoleSender sends the GetRegexEntityRole request. The method will close the
  5109  // http.Response Body if it receives an error.
  5110  func (client ModelClient) GetRegexEntityRoleSender(req *http.Request) (*http.Response, error) {
  5111  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5112  }
  5113  
  5114  // GetRegexEntityRoleResponder handles the response to the GetRegexEntityRole request. The method always
  5115  // closes the http.Response Body.
  5116  func (client ModelClient) GetRegexEntityRoleResponder(resp *http.Response) (result EntityRole, err error) {
  5117  	err = autorest.Respond(
  5118  		resp,
  5119  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  5120  		autorest.ByUnmarshallingJSON(&result),
  5121  		autorest.ByClosing())
  5122  	result.Response = autorest.Response{Response: resp}
  5123  	return
  5124  }
  5125  
  5126  // ListClosedListEntityRoles sends the list closed list entity roles request.
  5127  // Parameters:
  5128  // appID - the application ID.
  5129  // versionID - the version ID.
  5130  // entityID - entity Id
  5131  func (client ModelClient) ListClosedListEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
  5132  	if tracing.IsEnabled() {
  5133  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListClosedListEntityRoles")
  5134  		defer func() {
  5135  			sc := -1
  5136  			if result.Response.Response != nil {
  5137  				sc = result.Response.Response.StatusCode
  5138  			}
  5139  			tracing.EndSpan(ctx, sc, err)
  5140  		}()
  5141  	}
  5142  	req, err := client.ListClosedListEntityRolesPreparer(ctx, appID, versionID, entityID)
  5143  	if err != nil {
  5144  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedListEntityRoles", nil, "Failure preparing request")
  5145  		return
  5146  	}
  5147  
  5148  	resp, err := client.ListClosedListEntityRolesSender(req)
  5149  	if err != nil {
  5150  		result.Response = autorest.Response{Response: resp}
  5151  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedListEntityRoles", resp, "Failure sending request")
  5152  		return
  5153  	}
  5154  
  5155  	result, err = client.ListClosedListEntityRolesResponder(resp)
  5156  	if err != nil {
  5157  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedListEntityRoles", resp, "Failure responding to request")
  5158  		return
  5159  	}
  5160  
  5161  	return
  5162  }
  5163  
  5164  // ListClosedListEntityRolesPreparer prepares the ListClosedListEntityRoles request.
  5165  func (client ModelClient) ListClosedListEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
  5166  	urlParameters := map[string]interface{}{
  5167  		"Endpoint": client.Endpoint,
  5168  	}
  5169  
  5170  	pathParameters := map[string]interface{}{
  5171  		"appId":     autorest.Encode("path", appID),
  5172  		"entityId":  autorest.Encode("path", entityID),
  5173  		"versionId": autorest.Encode("path", versionID),
  5174  	}
  5175  
  5176  	preparer := autorest.CreatePreparer(
  5177  		autorest.AsGet(),
  5178  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  5179  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles", pathParameters))
  5180  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  5181  }
  5182  
  5183  // ListClosedListEntityRolesSender sends the ListClosedListEntityRoles request. The method will close the
  5184  // http.Response Body if it receives an error.
  5185  func (client ModelClient) ListClosedListEntityRolesSender(req *http.Request) (*http.Response, error) {
  5186  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5187  }
  5188  
  5189  // ListClosedListEntityRolesResponder handles the response to the ListClosedListEntityRoles request. The method always
  5190  // closes the http.Response Body.
  5191  func (client ModelClient) ListClosedListEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) {
  5192  	err = autorest.Respond(
  5193  		resp,
  5194  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  5195  		autorest.ByUnmarshallingJSON(&result.Value),
  5196  		autorest.ByClosing())
  5197  	result.Response = autorest.Response{Response: resp}
  5198  	return
  5199  }
  5200  
  5201  // ListClosedLists gets information about all the list entity models in a version of the application.
  5202  // Parameters:
  5203  // appID - the application ID.
  5204  // versionID - the version ID.
  5205  // skip - the number of entries to skip. Default value is 0.
  5206  // take - the number of entries to return. Maximum page size is 500. Default is 100.
  5207  func (client ModelClient) ListClosedLists(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListClosedListEntityExtractor, err error) {
  5208  	if tracing.IsEnabled() {
  5209  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListClosedLists")
  5210  		defer func() {
  5211  			sc := -1
  5212  			if result.Response.Response != nil {
  5213  				sc = result.Response.Response.StatusCode
  5214  			}
  5215  			tracing.EndSpan(ctx, sc, err)
  5216  		}()
  5217  	}
  5218  	if err := validation.Validate([]validation.Validation{
  5219  		{TargetValue: skip,
  5220  			Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
  5221  				Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}},
  5222  		{TargetValue: take,
  5223  			Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
  5224  				Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil},
  5225  					{Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
  5226  				}}}}}); err != nil {
  5227  		return result, validation.NewError("authoring.ModelClient", "ListClosedLists", err.Error())
  5228  	}
  5229  
  5230  	req, err := client.ListClosedListsPreparer(ctx, appID, versionID, skip, take)
  5231  	if err != nil {
  5232  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedLists", nil, "Failure preparing request")
  5233  		return
  5234  	}
  5235  
  5236  	resp, err := client.ListClosedListsSender(req)
  5237  	if err != nil {
  5238  		result.Response = autorest.Response{Response: resp}
  5239  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedLists", resp, "Failure sending request")
  5240  		return
  5241  	}
  5242  
  5243  	result, err = client.ListClosedListsResponder(resp)
  5244  	if err != nil {
  5245  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListClosedLists", resp, "Failure responding to request")
  5246  		return
  5247  	}
  5248  
  5249  	return
  5250  }
  5251  
  5252  // ListClosedListsPreparer prepares the ListClosedLists request.
  5253  func (client ModelClient) ListClosedListsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
  5254  	urlParameters := map[string]interface{}{
  5255  		"Endpoint": client.Endpoint,
  5256  	}
  5257  
  5258  	pathParameters := map[string]interface{}{
  5259  		"appId":     autorest.Encode("path", appID),
  5260  		"versionId": autorest.Encode("path", versionID),
  5261  	}
  5262  
  5263  	queryParameters := map[string]interface{}{}
  5264  	if skip != nil {
  5265  		queryParameters["skip"] = autorest.Encode("query", *skip)
  5266  	} else {
  5267  		queryParameters["skip"] = autorest.Encode("query", 0)
  5268  	}
  5269  	if take != nil {
  5270  		queryParameters["take"] = autorest.Encode("query", *take)
  5271  	} else {
  5272  		queryParameters["take"] = autorest.Encode("query", 100)
  5273  	}
  5274  
  5275  	preparer := autorest.CreatePreparer(
  5276  		autorest.AsGet(),
  5277  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  5278  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists", pathParameters),
  5279  		autorest.WithQueryParameters(queryParameters))
  5280  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  5281  }
  5282  
  5283  // ListClosedListsSender sends the ListClosedLists request. The method will close the
  5284  // http.Response Body if it receives an error.
  5285  func (client ModelClient) ListClosedListsSender(req *http.Request) (*http.Response, error) {
  5286  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5287  }
  5288  
  5289  // ListClosedListsResponder handles the response to the ListClosedLists request. The method always
  5290  // closes the http.Response Body.
  5291  func (client ModelClient) ListClosedListsResponder(resp *http.Response) (result ListClosedListEntityExtractor, err error) {
  5292  	err = autorest.Respond(
  5293  		resp,
  5294  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  5295  		autorest.ByUnmarshallingJSON(&result.Value),
  5296  		autorest.ByClosing())
  5297  	result.Response = autorest.Response{Response: resp}
  5298  	return
  5299  }
  5300  
  5301  // ListCompositeEntities gets information about all the composite entity models in a version of the application.
  5302  // Parameters:
  5303  // appID - the application ID.
  5304  // versionID - the version ID.
  5305  // skip - the number of entries to skip. Default value is 0.
  5306  // take - the number of entries to return. Maximum page size is 500. Default is 100.
  5307  func (client ModelClient) ListCompositeEntities(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListCompositeEntityExtractor, err error) {
  5308  	if tracing.IsEnabled() {
  5309  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCompositeEntities")
  5310  		defer func() {
  5311  			sc := -1
  5312  			if result.Response.Response != nil {
  5313  				sc = result.Response.Response.StatusCode
  5314  			}
  5315  			tracing.EndSpan(ctx, sc, err)
  5316  		}()
  5317  	}
  5318  	if err := validation.Validate([]validation.Validation{
  5319  		{TargetValue: skip,
  5320  			Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
  5321  				Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}},
  5322  		{TargetValue: take,
  5323  			Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
  5324  				Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil},
  5325  					{Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
  5326  				}}}}}); err != nil {
  5327  		return result, validation.NewError("authoring.ModelClient", "ListCompositeEntities", err.Error())
  5328  	}
  5329  
  5330  	req, err := client.ListCompositeEntitiesPreparer(ctx, appID, versionID, skip, take)
  5331  	if err != nil {
  5332  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntities", nil, "Failure preparing request")
  5333  		return
  5334  	}
  5335  
  5336  	resp, err := client.ListCompositeEntitiesSender(req)
  5337  	if err != nil {
  5338  		result.Response = autorest.Response{Response: resp}
  5339  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntities", resp, "Failure sending request")
  5340  		return
  5341  	}
  5342  
  5343  	result, err = client.ListCompositeEntitiesResponder(resp)
  5344  	if err != nil {
  5345  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntities", resp, "Failure responding to request")
  5346  		return
  5347  	}
  5348  
  5349  	return
  5350  }
  5351  
  5352  // ListCompositeEntitiesPreparer prepares the ListCompositeEntities request.
  5353  func (client ModelClient) ListCompositeEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
  5354  	urlParameters := map[string]interface{}{
  5355  		"Endpoint": client.Endpoint,
  5356  	}
  5357  
  5358  	pathParameters := map[string]interface{}{
  5359  		"appId":     autorest.Encode("path", appID),
  5360  		"versionId": autorest.Encode("path", versionID),
  5361  	}
  5362  
  5363  	queryParameters := map[string]interface{}{}
  5364  	if skip != nil {
  5365  		queryParameters["skip"] = autorest.Encode("query", *skip)
  5366  	} else {
  5367  		queryParameters["skip"] = autorest.Encode("query", 0)
  5368  	}
  5369  	if take != nil {
  5370  		queryParameters["take"] = autorest.Encode("query", *take)
  5371  	} else {
  5372  		queryParameters["take"] = autorest.Encode("query", 100)
  5373  	}
  5374  
  5375  	preparer := autorest.CreatePreparer(
  5376  		autorest.AsGet(),
  5377  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  5378  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities", pathParameters),
  5379  		autorest.WithQueryParameters(queryParameters))
  5380  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  5381  }
  5382  
  5383  // ListCompositeEntitiesSender sends the ListCompositeEntities request. The method will close the
  5384  // http.Response Body if it receives an error.
  5385  func (client ModelClient) ListCompositeEntitiesSender(req *http.Request) (*http.Response, error) {
  5386  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5387  }
  5388  
  5389  // ListCompositeEntitiesResponder handles the response to the ListCompositeEntities request. The method always
  5390  // closes the http.Response Body.
  5391  func (client ModelClient) ListCompositeEntitiesResponder(resp *http.Response) (result ListCompositeEntityExtractor, err error) {
  5392  	err = autorest.Respond(
  5393  		resp,
  5394  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  5395  		autorest.ByUnmarshallingJSON(&result.Value),
  5396  		autorest.ByClosing())
  5397  	result.Response = autorest.Response{Response: resp}
  5398  	return
  5399  }
  5400  
  5401  // ListCompositeEntityRoles sends the list composite entity roles request.
  5402  // Parameters:
  5403  // appID - the application ID.
  5404  // versionID - the version ID.
  5405  // cEntityID - the composite entity extractor ID.
  5406  func (client ModelClient) ListCompositeEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (result ListEntityRole, err error) {
  5407  	if tracing.IsEnabled() {
  5408  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCompositeEntityRoles")
  5409  		defer func() {
  5410  			sc := -1
  5411  			if result.Response.Response != nil {
  5412  				sc = result.Response.Response.StatusCode
  5413  			}
  5414  			tracing.EndSpan(ctx, sc, err)
  5415  		}()
  5416  	}
  5417  	req, err := client.ListCompositeEntityRolesPreparer(ctx, appID, versionID, cEntityID)
  5418  	if err != nil {
  5419  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntityRoles", nil, "Failure preparing request")
  5420  		return
  5421  	}
  5422  
  5423  	resp, err := client.ListCompositeEntityRolesSender(req)
  5424  	if err != nil {
  5425  		result.Response = autorest.Response{Response: resp}
  5426  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntityRoles", resp, "Failure sending request")
  5427  		return
  5428  	}
  5429  
  5430  	result, err = client.ListCompositeEntityRolesResponder(resp)
  5431  	if err != nil {
  5432  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCompositeEntityRoles", resp, "Failure responding to request")
  5433  		return
  5434  	}
  5435  
  5436  	return
  5437  }
  5438  
  5439  // ListCompositeEntityRolesPreparer prepares the ListCompositeEntityRoles request.
  5440  func (client ModelClient) ListCompositeEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID) (*http.Request, error) {
  5441  	urlParameters := map[string]interface{}{
  5442  		"Endpoint": client.Endpoint,
  5443  	}
  5444  
  5445  	pathParameters := map[string]interface{}{
  5446  		"appId":     autorest.Encode("path", appID),
  5447  		"cEntityId": autorest.Encode("path", cEntityID),
  5448  		"versionId": autorest.Encode("path", versionID),
  5449  	}
  5450  
  5451  	preparer := autorest.CreatePreparer(
  5452  		autorest.AsGet(),
  5453  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  5454  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles", pathParameters))
  5455  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  5456  }
  5457  
  5458  // ListCompositeEntityRolesSender sends the ListCompositeEntityRoles request. The method will close the
  5459  // http.Response Body if it receives an error.
  5460  func (client ModelClient) ListCompositeEntityRolesSender(req *http.Request) (*http.Response, error) {
  5461  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5462  }
  5463  
  5464  // ListCompositeEntityRolesResponder handles the response to the ListCompositeEntityRoles request. The method always
  5465  // closes the http.Response Body.
  5466  func (client ModelClient) ListCompositeEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) {
  5467  	err = autorest.Respond(
  5468  		resp,
  5469  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  5470  		autorest.ByUnmarshallingJSON(&result.Value),
  5471  		autorest.ByClosing())
  5472  	result.Response = autorest.Response{Response: resp}
  5473  	return
  5474  }
  5475  
  5476  // ListCustomPrebuiltEntities gets all prebuilt entities used in a version of the application.
  5477  // Parameters:
  5478  // appID - the application ID.
  5479  // versionID - the version ID.
  5480  func (client ModelClient) ListCustomPrebuiltEntities(ctx context.Context, appID uuid.UUID, versionID string) (result ListEntityExtractor, err error) {
  5481  	if tracing.IsEnabled() {
  5482  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCustomPrebuiltEntities")
  5483  		defer func() {
  5484  			sc := -1
  5485  			if result.Response.Response != nil {
  5486  				sc = result.Response.Response.StatusCode
  5487  			}
  5488  			tracing.EndSpan(ctx, sc, err)
  5489  		}()
  5490  	}
  5491  	req, err := client.ListCustomPrebuiltEntitiesPreparer(ctx, appID, versionID)
  5492  	if err != nil {
  5493  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntities", nil, "Failure preparing request")
  5494  		return
  5495  	}
  5496  
  5497  	resp, err := client.ListCustomPrebuiltEntitiesSender(req)
  5498  	if err != nil {
  5499  		result.Response = autorest.Response{Response: resp}
  5500  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntities", resp, "Failure sending request")
  5501  		return
  5502  	}
  5503  
  5504  	result, err = client.ListCustomPrebuiltEntitiesResponder(resp)
  5505  	if err != nil {
  5506  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntities", resp, "Failure responding to request")
  5507  		return
  5508  	}
  5509  
  5510  	return
  5511  }
  5512  
  5513  // ListCustomPrebuiltEntitiesPreparer prepares the ListCustomPrebuiltEntities request.
  5514  func (client ModelClient) ListCustomPrebuiltEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) {
  5515  	urlParameters := map[string]interface{}{
  5516  		"Endpoint": client.Endpoint,
  5517  	}
  5518  
  5519  	pathParameters := map[string]interface{}{
  5520  		"appId":     autorest.Encode("path", appID),
  5521  		"versionId": autorest.Encode("path", versionID),
  5522  	}
  5523  
  5524  	preparer := autorest.CreatePreparer(
  5525  		autorest.AsGet(),
  5526  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  5527  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities", pathParameters))
  5528  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  5529  }
  5530  
  5531  // ListCustomPrebuiltEntitiesSender sends the ListCustomPrebuiltEntities request. The method will close the
  5532  // http.Response Body if it receives an error.
  5533  func (client ModelClient) ListCustomPrebuiltEntitiesSender(req *http.Request) (*http.Response, error) {
  5534  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5535  }
  5536  
  5537  // ListCustomPrebuiltEntitiesResponder handles the response to the ListCustomPrebuiltEntities request. The method always
  5538  // closes the http.Response Body.
  5539  func (client ModelClient) ListCustomPrebuiltEntitiesResponder(resp *http.Response) (result ListEntityExtractor, err error) {
  5540  	err = autorest.Respond(
  5541  		resp,
  5542  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  5543  		autorest.ByUnmarshallingJSON(&result.Value),
  5544  		autorest.ByClosing())
  5545  	result.Response = autorest.Response{Response: resp}
  5546  	return
  5547  }
  5548  
  5549  // ListCustomPrebuiltEntityRoles sends the list custom prebuilt entity roles request.
  5550  // Parameters:
  5551  // appID - the application ID.
  5552  // versionID - the version ID.
  5553  // entityID - entity Id
  5554  func (client ModelClient) ListCustomPrebuiltEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
  5555  	if tracing.IsEnabled() {
  5556  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCustomPrebuiltEntityRoles")
  5557  		defer func() {
  5558  			sc := -1
  5559  			if result.Response.Response != nil {
  5560  				sc = result.Response.Response.StatusCode
  5561  			}
  5562  			tracing.EndSpan(ctx, sc, err)
  5563  		}()
  5564  	}
  5565  	req, err := client.ListCustomPrebuiltEntityRolesPreparer(ctx, appID, versionID, entityID)
  5566  	if err != nil {
  5567  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntityRoles", nil, "Failure preparing request")
  5568  		return
  5569  	}
  5570  
  5571  	resp, err := client.ListCustomPrebuiltEntityRolesSender(req)
  5572  	if err != nil {
  5573  		result.Response = autorest.Response{Response: resp}
  5574  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntityRoles", resp, "Failure sending request")
  5575  		return
  5576  	}
  5577  
  5578  	result, err = client.ListCustomPrebuiltEntityRolesResponder(resp)
  5579  	if err != nil {
  5580  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltEntityRoles", resp, "Failure responding to request")
  5581  		return
  5582  	}
  5583  
  5584  	return
  5585  }
  5586  
  5587  // ListCustomPrebuiltEntityRolesPreparer prepares the ListCustomPrebuiltEntityRoles request.
  5588  func (client ModelClient) ListCustomPrebuiltEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
  5589  	urlParameters := map[string]interface{}{
  5590  		"Endpoint": client.Endpoint,
  5591  	}
  5592  
  5593  	pathParameters := map[string]interface{}{
  5594  		"appId":     autorest.Encode("path", appID),
  5595  		"entityId":  autorest.Encode("path", entityID),
  5596  		"versionId": autorest.Encode("path", versionID),
  5597  	}
  5598  
  5599  	preparer := autorest.CreatePreparer(
  5600  		autorest.AsGet(),
  5601  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  5602  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles", pathParameters))
  5603  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  5604  }
  5605  
  5606  // ListCustomPrebuiltEntityRolesSender sends the ListCustomPrebuiltEntityRoles request. The method will close the
  5607  // http.Response Body if it receives an error.
  5608  func (client ModelClient) ListCustomPrebuiltEntityRolesSender(req *http.Request) (*http.Response, error) {
  5609  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5610  }
  5611  
  5612  // ListCustomPrebuiltEntityRolesResponder handles the response to the ListCustomPrebuiltEntityRoles request. The method always
  5613  // closes the http.Response Body.
  5614  func (client ModelClient) ListCustomPrebuiltEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) {
  5615  	err = autorest.Respond(
  5616  		resp,
  5617  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  5618  		autorest.ByUnmarshallingJSON(&result.Value),
  5619  		autorest.ByClosing())
  5620  	result.Response = autorest.Response{Response: resp}
  5621  	return
  5622  }
  5623  
  5624  // ListCustomPrebuiltIntents gets information about customizable prebuilt intents added to a version of the
  5625  // application.
  5626  // Parameters:
  5627  // appID - the application ID.
  5628  // versionID - the version ID.
  5629  func (client ModelClient) ListCustomPrebuiltIntents(ctx context.Context, appID uuid.UUID, versionID string) (result ListIntentClassifier, err error) {
  5630  	if tracing.IsEnabled() {
  5631  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCustomPrebuiltIntents")
  5632  		defer func() {
  5633  			sc := -1
  5634  			if result.Response.Response != nil {
  5635  				sc = result.Response.Response.StatusCode
  5636  			}
  5637  			tracing.EndSpan(ctx, sc, err)
  5638  		}()
  5639  	}
  5640  	req, err := client.ListCustomPrebuiltIntentsPreparer(ctx, appID, versionID)
  5641  	if err != nil {
  5642  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltIntents", nil, "Failure preparing request")
  5643  		return
  5644  	}
  5645  
  5646  	resp, err := client.ListCustomPrebuiltIntentsSender(req)
  5647  	if err != nil {
  5648  		result.Response = autorest.Response{Response: resp}
  5649  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltIntents", resp, "Failure sending request")
  5650  		return
  5651  	}
  5652  
  5653  	result, err = client.ListCustomPrebuiltIntentsResponder(resp)
  5654  	if err != nil {
  5655  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltIntents", resp, "Failure responding to request")
  5656  		return
  5657  	}
  5658  
  5659  	return
  5660  }
  5661  
  5662  // ListCustomPrebuiltIntentsPreparer prepares the ListCustomPrebuiltIntents request.
  5663  func (client ModelClient) ListCustomPrebuiltIntentsPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) {
  5664  	urlParameters := map[string]interface{}{
  5665  		"Endpoint": client.Endpoint,
  5666  	}
  5667  
  5668  	pathParameters := map[string]interface{}{
  5669  		"appId":     autorest.Encode("path", appID),
  5670  		"versionId": autorest.Encode("path", versionID),
  5671  	}
  5672  
  5673  	preparer := autorest.CreatePreparer(
  5674  		autorest.AsGet(),
  5675  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  5676  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltintents", pathParameters))
  5677  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  5678  }
  5679  
  5680  // ListCustomPrebuiltIntentsSender sends the ListCustomPrebuiltIntents request. The method will close the
  5681  // http.Response Body if it receives an error.
  5682  func (client ModelClient) ListCustomPrebuiltIntentsSender(req *http.Request) (*http.Response, error) {
  5683  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5684  }
  5685  
  5686  // ListCustomPrebuiltIntentsResponder handles the response to the ListCustomPrebuiltIntents request. The method always
  5687  // closes the http.Response Body.
  5688  func (client ModelClient) ListCustomPrebuiltIntentsResponder(resp *http.Response) (result ListIntentClassifier, err error) {
  5689  	err = autorest.Respond(
  5690  		resp,
  5691  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  5692  		autorest.ByUnmarshallingJSON(&result.Value),
  5693  		autorest.ByClosing())
  5694  	result.Response = autorest.Response{Response: resp}
  5695  	return
  5696  }
  5697  
  5698  // ListCustomPrebuiltModels gets all prebuilt intent and entity model information used in a version of this
  5699  // application.
  5700  // Parameters:
  5701  // appID - the application ID.
  5702  // versionID - the version ID.
  5703  func (client ModelClient) ListCustomPrebuiltModels(ctx context.Context, appID uuid.UUID, versionID string) (result ListCustomPrebuiltModel, err error) {
  5704  	if tracing.IsEnabled() {
  5705  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListCustomPrebuiltModels")
  5706  		defer func() {
  5707  			sc := -1
  5708  			if result.Response.Response != nil {
  5709  				sc = result.Response.Response.StatusCode
  5710  			}
  5711  			tracing.EndSpan(ctx, sc, err)
  5712  		}()
  5713  	}
  5714  	req, err := client.ListCustomPrebuiltModelsPreparer(ctx, appID, versionID)
  5715  	if err != nil {
  5716  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltModels", nil, "Failure preparing request")
  5717  		return
  5718  	}
  5719  
  5720  	resp, err := client.ListCustomPrebuiltModelsSender(req)
  5721  	if err != nil {
  5722  		result.Response = autorest.Response{Response: resp}
  5723  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltModels", resp, "Failure sending request")
  5724  		return
  5725  	}
  5726  
  5727  	result, err = client.ListCustomPrebuiltModelsResponder(resp)
  5728  	if err != nil {
  5729  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListCustomPrebuiltModels", resp, "Failure responding to request")
  5730  		return
  5731  	}
  5732  
  5733  	return
  5734  }
  5735  
  5736  // ListCustomPrebuiltModelsPreparer prepares the ListCustomPrebuiltModels request.
  5737  func (client ModelClient) ListCustomPrebuiltModelsPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) {
  5738  	urlParameters := map[string]interface{}{
  5739  		"Endpoint": client.Endpoint,
  5740  	}
  5741  
  5742  	pathParameters := map[string]interface{}{
  5743  		"appId":     autorest.Encode("path", appID),
  5744  		"versionId": autorest.Encode("path", versionID),
  5745  	}
  5746  
  5747  	preparer := autorest.CreatePreparer(
  5748  		autorest.AsGet(),
  5749  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  5750  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltmodels", pathParameters))
  5751  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  5752  }
  5753  
  5754  // ListCustomPrebuiltModelsSender sends the ListCustomPrebuiltModels request. The method will close the
  5755  // http.Response Body if it receives an error.
  5756  func (client ModelClient) ListCustomPrebuiltModelsSender(req *http.Request) (*http.Response, error) {
  5757  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5758  }
  5759  
  5760  // ListCustomPrebuiltModelsResponder handles the response to the ListCustomPrebuiltModels request. The method always
  5761  // closes the http.Response Body.
  5762  func (client ModelClient) ListCustomPrebuiltModelsResponder(resp *http.Response) (result ListCustomPrebuiltModel, err error) {
  5763  	err = autorest.Respond(
  5764  		resp,
  5765  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  5766  		autorest.ByUnmarshallingJSON(&result.Value),
  5767  		autorest.ByClosing())
  5768  	result.Response = autorest.Response{Response: resp}
  5769  	return
  5770  }
  5771  
  5772  // ListEntities gets information about all the simple entity models in a version of the application.
  5773  // Parameters:
  5774  // appID - the application ID.
  5775  // versionID - the version ID.
  5776  // skip - the number of entries to skip. Default value is 0.
  5777  // take - the number of entries to return. Maximum page size is 500. Default is 100.
  5778  func (client ModelClient) ListEntities(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListNDepthEntityExtractor, err error) {
  5779  	if tracing.IsEnabled() {
  5780  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListEntities")
  5781  		defer func() {
  5782  			sc := -1
  5783  			if result.Response.Response != nil {
  5784  				sc = result.Response.Response.StatusCode
  5785  			}
  5786  			tracing.EndSpan(ctx, sc, err)
  5787  		}()
  5788  	}
  5789  	if err := validation.Validate([]validation.Validation{
  5790  		{TargetValue: skip,
  5791  			Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
  5792  				Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}},
  5793  		{TargetValue: take,
  5794  			Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
  5795  				Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil},
  5796  					{Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
  5797  				}}}}}); err != nil {
  5798  		return result, validation.NewError("authoring.ModelClient", "ListEntities", err.Error())
  5799  	}
  5800  
  5801  	req, err := client.ListEntitiesPreparer(ctx, appID, versionID, skip, take)
  5802  	if err != nil {
  5803  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntities", nil, "Failure preparing request")
  5804  		return
  5805  	}
  5806  
  5807  	resp, err := client.ListEntitiesSender(req)
  5808  	if err != nil {
  5809  		result.Response = autorest.Response{Response: resp}
  5810  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntities", resp, "Failure sending request")
  5811  		return
  5812  	}
  5813  
  5814  	result, err = client.ListEntitiesResponder(resp)
  5815  	if err != nil {
  5816  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntities", resp, "Failure responding to request")
  5817  		return
  5818  	}
  5819  
  5820  	return
  5821  }
  5822  
  5823  // ListEntitiesPreparer prepares the ListEntities request.
  5824  func (client ModelClient) ListEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
  5825  	urlParameters := map[string]interface{}{
  5826  		"Endpoint": client.Endpoint,
  5827  	}
  5828  
  5829  	pathParameters := map[string]interface{}{
  5830  		"appId":     autorest.Encode("path", appID),
  5831  		"versionId": autorest.Encode("path", versionID),
  5832  	}
  5833  
  5834  	queryParameters := map[string]interface{}{}
  5835  	if skip != nil {
  5836  		queryParameters["skip"] = autorest.Encode("query", *skip)
  5837  	} else {
  5838  		queryParameters["skip"] = autorest.Encode("query", 0)
  5839  	}
  5840  	if take != nil {
  5841  		queryParameters["take"] = autorest.Encode("query", *take)
  5842  	} else {
  5843  		queryParameters["take"] = autorest.Encode("query", 100)
  5844  	}
  5845  
  5846  	preparer := autorest.CreatePreparer(
  5847  		autorest.AsGet(),
  5848  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  5849  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities", pathParameters),
  5850  		autorest.WithQueryParameters(queryParameters))
  5851  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  5852  }
  5853  
  5854  // ListEntitiesSender sends the ListEntities request. The method will close the
  5855  // http.Response Body if it receives an error.
  5856  func (client ModelClient) ListEntitiesSender(req *http.Request) (*http.Response, error) {
  5857  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5858  }
  5859  
  5860  // ListEntitiesResponder handles the response to the ListEntities request. The method always
  5861  // closes the http.Response Body.
  5862  func (client ModelClient) ListEntitiesResponder(resp *http.Response) (result ListNDepthEntityExtractor, err error) {
  5863  	err = autorest.Respond(
  5864  		resp,
  5865  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  5866  		autorest.ByUnmarshallingJSON(&result.Value),
  5867  		autorest.ByClosing())
  5868  	result.Response = autorest.Response{Response: resp}
  5869  	return
  5870  }
  5871  
  5872  // ListEntityRoles sends the list entity roles request.
  5873  // Parameters:
  5874  // appID - the application ID.
  5875  // versionID - the version ID.
  5876  // entityID - entity Id
  5877  func (client ModelClient) ListEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
  5878  	if tracing.IsEnabled() {
  5879  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListEntityRoles")
  5880  		defer func() {
  5881  			sc := -1
  5882  			if result.Response.Response != nil {
  5883  				sc = result.Response.Response.StatusCode
  5884  			}
  5885  			tracing.EndSpan(ctx, sc, err)
  5886  		}()
  5887  	}
  5888  	req, err := client.ListEntityRolesPreparer(ctx, appID, versionID, entityID)
  5889  	if err != nil {
  5890  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntityRoles", nil, "Failure preparing request")
  5891  		return
  5892  	}
  5893  
  5894  	resp, err := client.ListEntityRolesSender(req)
  5895  	if err != nil {
  5896  		result.Response = autorest.Response{Response: resp}
  5897  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntityRoles", resp, "Failure sending request")
  5898  		return
  5899  	}
  5900  
  5901  	result, err = client.ListEntityRolesResponder(resp)
  5902  	if err != nil {
  5903  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntityRoles", resp, "Failure responding to request")
  5904  		return
  5905  	}
  5906  
  5907  	return
  5908  }
  5909  
  5910  // ListEntityRolesPreparer prepares the ListEntityRoles request.
  5911  func (client ModelClient) ListEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
  5912  	urlParameters := map[string]interface{}{
  5913  		"Endpoint": client.Endpoint,
  5914  	}
  5915  
  5916  	pathParameters := map[string]interface{}{
  5917  		"appId":     autorest.Encode("path", appID),
  5918  		"entityId":  autorest.Encode("path", entityID),
  5919  		"versionId": autorest.Encode("path", versionID),
  5920  	}
  5921  
  5922  	preparer := autorest.CreatePreparer(
  5923  		autorest.AsGet(),
  5924  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  5925  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles", pathParameters))
  5926  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  5927  }
  5928  
  5929  // ListEntityRolesSender sends the ListEntityRoles request. The method will close the
  5930  // http.Response Body if it receives an error.
  5931  func (client ModelClient) ListEntityRolesSender(req *http.Request) (*http.Response, error) {
  5932  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  5933  }
  5934  
  5935  // ListEntityRolesResponder handles the response to the ListEntityRoles request. The method always
  5936  // closes the http.Response Body.
  5937  func (client ModelClient) ListEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) {
  5938  	err = autorest.Respond(
  5939  		resp,
  5940  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  5941  		autorest.ByUnmarshallingJSON(&result.Value),
  5942  		autorest.ByClosing())
  5943  	result.Response = autorest.Response{Response: resp}
  5944  	return
  5945  }
  5946  
  5947  // ListEntitySuggestions get suggested example utterances that would improve the accuracy of the entity model in a
  5948  // version of the application.
  5949  // Parameters:
  5950  // appID - the application ID.
  5951  // versionID - the version ID.
  5952  // entityID - the target entity extractor model to enhance.
  5953  // take - the number of entries to return. Maximum page size is 500. Default is 100.
  5954  // enableNestedChildren - toggles nested/flat format
  5955  func (client ModelClient) ListEntitySuggestions(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, take *int32, enableNestedChildren *bool) (result ListEntitiesSuggestionExample, err error) {
  5956  	if tracing.IsEnabled() {
  5957  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListEntitySuggestions")
  5958  		defer func() {
  5959  			sc := -1
  5960  			if result.Response.Response != nil {
  5961  				sc = result.Response.Response.StatusCode
  5962  			}
  5963  			tracing.EndSpan(ctx, sc, err)
  5964  		}()
  5965  	}
  5966  	if err := validation.Validate([]validation.Validation{
  5967  		{TargetValue: take,
  5968  			Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
  5969  				Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil},
  5970  					{Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
  5971  				}}}}}); err != nil {
  5972  		return result, validation.NewError("authoring.ModelClient", "ListEntitySuggestions", err.Error())
  5973  	}
  5974  
  5975  	req, err := client.ListEntitySuggestionsPreparer(ctx, appID, versionID, entityID, take, enableNestedChildren)
  5976  	if err != nil {
  5977  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntitySuggestions", nil, "Failure preparing request")
  5978  		return
  5979  	}
  5980  
  5981  	resp, err := client.ListEntitySuggestionsSender(req)
  5982  	if err != nil {
  5983  		result.Response = autorest.Response{Response: resp}
  5984  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntitySuggestions", resp, "Failure sending request")
  5985  		return
  5986  	}
  5987  
  5988  	result, err = client.ListEntitySuggestionsResponder(resp)
  5989  	if err != nil {
  5990  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListEntitySuggestions", resp, "Failure responding to request")
  5991  		return
  5992  	}
  5993  
  5994  	return
  5995  }
  5996  
  5997  // ListEntitySuggestionsPreparer prepares the ListEntitySuggestions request.
  5998  func (client ModelClient) ListEntitySuggestionsPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, take *int32, enableNestedChildren *bool) (*http.Request, error) {
  5999  	urlParameters := map[string]interface{}{
  6000  		"Endpoint": client.Endpoint,
  6001  	}
  6002  
  6003  	pathParameters := map[string]interface{}{
  6004  		"appId":     autorest.Encode("path", appID),
  6005  		"entityId":  autorest.Encode("path", entityID),
  6006  		"versionId": autorest.Encode("path", versionID),
  6007  	}
  6008  
  6009  	queryParameters := map[string]interface{}{}
  6010  	if take != nil {
  6011  		queryParameters["take"] = autorest.Encode("query", *take)
  6012  	} else {
  6013  		queryParameters["take"] = autorest.Encode("query", 100)
  6014  	}
  6015  	if enableNestedChildren != nil {
  6016  		queryParameters["enableNestedChildren"] = autorest.Encode("query", *enableNestedChildren)
  6017  	} else {
  6018  		queryParameters["enableNestedChildren"] = autorest.Encode("query", false)
  6019  	}
  6020  
  6021  	preparer := autorest.CreatePreparer(
  6022  		autorest.AsGet(),
  6023  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  6024  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/suggest", pathParameters),
  6025  		autorest.WithQueryParameters(queryParameters))
  6026  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  6027  }
  6028  
  6029  // ListEntitySuggestionsSender sends the ListEntitySuggestions request. The method will close the
  6030  // http.Response Body if it receives an error.
  6031  func (client ModelClient) ListEntitySuggestionsSender(req *http.Request) (*http.Response, error) {
  6032  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6033  }
  6034  
  6035  // ListEntitySuggestionsResponder handles the response to the ListEntitySuggestions request. The method always
  6036  // closes the http.Response Body.
  6037  func (client ModelClient) ListEntitySuggestionsResponder(resp *http.Response) (result ListEntitiesSuggestionExample, err error) {
  6038  	err = autorest.Respond(
  6039  		resp,
  6040  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  6041  		autorest.ByUnmarshallingJSON(&result.Value),
  6042  		autorest.ByClosing())
  6043  	result.Response = autorest.Response{Response: resp}
  6044  	return
  6045  }
  6046  
  6047  // ListHierarchicalEntities gets information about all the hierarchical entity models in a version of the application.
  6048  // Parameters:
  6049  // appID - the application ID.
  6050  // versionID - the version ID.
  6051  // skip - the number of entries to skip. Default value is 0.
  6052  // take - the number of entries to return. Maximum page size is 500. Default is 100.
  6053  func (client ModelClient) ListHierarchicalEntities(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListHierarchicalEntityExtractor, err error) {
  6054  	if tracing.IsEnabled() {
  6055  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListHierarchicalEntities")
  6056  		defer func() {
  6057  			sc := -1
  6058  			if result.Response.Response != nil {
  6059  				sc = result.Response.Response.StatusCode
  6060  			}
  6061  			tracing.EndSpan(ctx, sc, err)
  6062  		}()
  6063  	}
  6064  	if err := validation.Validate([]validation.Validation{
  6065  		{TargetValue: skip,
  6066  			Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
  6067  				Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}},
  6068  		{TargetValue: take,
  6069  			Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
  6070  				Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil},
  6071  					{Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
  6072  				}}}}}); err != nil {
  6073  		return result, validation.NewError("authoring.ModelClient", "ListHierarchicalEntities", err.Error())
  6074  	}
  6075  
  6076  	req, err := client.ListHierarchicalEntitiesPreparer(ctx, appID, versionID, skip, take)
  6077  	if err != nil {
  6078  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntities", nil, "Failure preparing request")
  6079  		return
  6080  	}
  6081  
  6082  	resp, err := client.ListHierarchicalEntitiesSender(req)
  6083  	if err != nil {
  6084  		result.Response = autorest.Response{Response: resp}
  6085  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntities", resp, "Failure sending request")
  6086  		return
  6087  	}
  6088  
  6089  	result, err = client.ListHierarchicalEntitiesResponder(resp)
  6090  	if err != nil {
  6091  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntities", resp, "Failure responding to request")
  6092  		return
  6093  	}
  6094  
  6095  	return
  6096  }
  6097  
  6098  // ListHierarchicalEntitiesPreparer prepares the ListHierarchicalEntities request.
  6099  func (client ModelClient) ListHierarchicalEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
  6100  	urlParameters := map[string]interface{}{
  6101  		"Endpoint": client.Endpoint,
  6102  	}
  6103  
  6104  	pathParameters := map[string]interface{}{
  6105  		"appId":     autorest.Encode("path", appID),
  6106  		"versionId": autorest.Encode("path", versionID),
  6107  	}
  6108  
  6109  	queryParameters := map[string]interface{}{}
  6110  	if skip != nil {
  6111  		queryParameters["skip"] = autorest.Encode("query", *skip)
  6112  	} else {
  6113  		queryParameters["skip"] = autorest.Encode("query", 0)
  6114  	}
  6115  	if take != nil {
  6116  		queryParameters["take"] = autorest.Encode("query", *take)
  6117  	} else {
  6118  		queryParameters["take"] = autorest.Encode("query", 100)
  6119  	}
  6120  
  6121  	preparer := autorest.CreatePreparer(
  6122  		autorest.AsGet(),
  6123  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  6124  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities", pathParameters),
  6125  		autorest.WithQueryParameters(queryParameters))
  6126  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  6127  }
  6128  
  6129  // ListHierarchicalEntitiesSender sends the ListHierarchicalEntities request. The method will close the
  6130  // http.Response Body if it receives an error.
  6131  func (client ModelClient) ListHierarchicalEntitiesSender(req *http.Request) (*http.Response, error) {
  6132  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6133  }
  6134  
  6135  // ListHierarchicalEntitiesResponder handles the response to the ListHierarchicalEntities request. The method always
  6136  // closes the http.Response Body.
  6137  func (client ModelClient) ListHierarchicalEntitiesResponder(resp *http.Response) (result ListHierarchicalEntityExtractor, err error) {
  6138  	err = autorest.Respond(
  6139  		resp,
  6140  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  6141  		autorest.ByUnmarshallingJSON(&result.Value),
  6142  		autorest.ByClosing())
  6143  	result.Response = autorest.Response{Response: resp}
  6144  	return
  6145  }
  6146  
  6147  // ListHierarchicalEntityRoles sends the list hierarchical entity roles request.
  6148  // Parameters:
  6149  // appID - the application ID.
  6150  // versionID - the version ID.
  6151  // hEntityID - the hierarchical entity extractor ID.
  6152  func (client ModelClient) ListHierarchicalEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (result ListEntityRole, err error) {
  6153  	if tracing.IsEnabled() {
  6154  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListHierarchicalEntityRoles")
  6155  		defer func() {
  6156  			sc := -1
  6157  			if result.Response.Response != nil {
  6158  				sc = result.Response.Response.StatusCode
  6159  			}
  6160  			tracing.EndSpan(ctx, sc, err)
  6161  		}()
  6162  	}
  6163  	req, err := client.ListHierarchicalEntityRolesPreparer(ctx, appID, versionID, hEntityID)
  6164  	if err != nil {
  6165  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntityRoles", nil, "Failure preparing request")
  6166  		return
  6167  	}
  6168  
  6169  	resp, err := client.ListHierarchicalEntityRolesSender(req)
  6170  	if err != nil {
  6171  		result.Response = autorest.Response{Response: resp}
  6172  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntityRoles", resp, "Failure sending request")
  6173  		return
  6174  	}
  6175  
  6176  	result, err = client.ListHierarchicalEntityRolesResponder(resp)
  6177  	if err != nil {
  6178  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListHierarchicalEntityRoles", resp, "Failure responding to request")
  6179  		return
  6180  	}
  6181  
  6182  	return
  6183  }
  6184  
  6185  // ListHierarchicalEntityRolesPreparer prepares the ListHierarchicalEntityRoles request.
  6186  func (client ModelClient) ListHierarchicalEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID) (*http.Request, error) {
  6187  	urlParameters := map[string]interface{}{
  6188  		"Endpoint": client.Endpoint,
  6189  	}
  6190  
  6191  	pathParameters := map[string]interface{}{
  6192  		"appId":     autorest.Encode("path", appID),
  6193  		"hEntityId": autorest.Encode("path", hEntityID),
  6194  		"versionId": autorest.Encode("path", versionID),
  6195  	}
  6196  
  6197  	preparer := autorest.CreatePreparer(
  6198  		autorest.AsGet(),
  6199  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  6200  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles", pathParameters))
  6201  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  6202  }
  6203  
  6204  // ListHierarchicalEntityRolesSender sends the ListHierarchicalEntityRoles request. The method will close the
  6205  // http.Response Body if it receives an error.
  6206  func (client ModelClient) ListHierarchicalEntityRolesSender(req *http.Request) (*http.Response, error) {
  6207  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6208  }
  6209  
  6210  // ListHierarchicalEntityRolesResponder handles the response to the ListHierarchicalEntityRoles request. The method always
  6211  // closes the http.Response Body.
  6212  func (client ModelClient) ListHierarchicalEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) {
  6213  	err = autorest.Respond(
  6214  		resp,
  6215  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  6216  		autorest.ByUnmarshallingJSON(&result.Value),
  6217  		autorest.ByClosing())
  6218  	result.Response = autorest.Response{Response: resp}
  6219  	return
  6220  }
  6221  
  6222  // ListIntents gets information about the intent models in a version of the application.
  6223  // Parameters:
  6224  // appID - the application ID.
  6225  // versionID - the version ID.
  6226  // skip - the number of entries to skip. Default value is 0.
  6227  // take - the number of entries to return. Maximum page size is 500. Default is 100.
  6228  func (client ModelClient) ListIntents(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListIntentClassifier, err error) {
  6229  	if tracing.IsEnabled() {
  6230  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListIntents")
  6231  		defer func() {
  6232  			sc := -1
  6233  			if result.Response.Response != nil {
  6234  				sc = result.Response.Response.StatusCode
  6235  			}
  6236  			tracing.EndSpan(ctx, sc, err)
  6237  		}()
  6238  	}
  6239  	if err := validation.Validate([]validation.Validation{
  6240  		{TargetValue: skip,
  6241  			Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
  6242  				Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}},
  6243  		{TargetValue: take,
  6244  			Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
  6245  				Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil},
  6246  					{Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
  6247  				}}}}}); err != nil {
  6248  		return result, validation.NewError("authoring.ModelClient", "ListIntents", err.Error())
  6249  	}
  6250  
  6251  	req, err := client.ListIntentsPreparer(ctx, appID, versionID, skip, take)
  6252  	if err != nil {
  6253  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntents", nil, "Failure preparing request")
  6254  		return
  6255  	}
  6256  
  6257  	resp, err := client.ListIntentsSender(req)
  6258  	if err != nil {
  6259  		result.Response = autorest.Response{Response: resp}
  6260  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntents", resp, "Failure sending request")
  6261  		return
  6262  	}
  6263  
  6264  	result, err = client.ListIntentsResponder(resp)
  6265  	if err != nil {
  6266  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntents", resp, "Failure responding to request")
  6267  		return
  6268  	}
  6269  
  6270  	return
  6271  }
  6272  
  6273  // ListIntentsPreparer prepares the ListIntents request.
  6274  func (client ModelClient) ListIntentsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
  6275  	urlParameters := map[string]interface{}{
  6276  		"Endpoint": client.Endpoint,
  6277  	}
  6278  
  6279  	pathParameters := map[string]interface{}{
  6280  		"appId":     autorest.Encode("path", appID),
  6281  		"versionId": autorest.Encode("path", versionID),
  6282  	}
  6283  
  6284  	queryParameters := map[string]interface{}{}
  6285  	if skip != nil {
  6286  		queryParameters["skip"] = autorest.Encode("query", *skip)
  6287  	} else {
  6288  		queryParameters["skip"] = autorest.Encode("query", 0)
  6289  	}
  6290  	if take != nil {
  6291  		queryParameters["take"] = autorest.Encode("query", *take)
  6292  	} else {
  6293  		queryParameters["take"] = autorest.Encode("query", 100)
  6294  	}
  6295  
  6296  	preparer := autorest.CreatePreparer(
  6297  		autorest.AsGet(),
  6298  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  6299  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents", pathParameters),
  6300  		autorest.WithQueryParameters(queryParameters))
  6301  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  6302  }
  6303  
  6304  // ListIntentsSender sends the ListIntents request. The method will close the
  6305  // http.Response Body if it receives an error.
  6306  func (client ModelClient) ListIntentsSender(req *http.Request) (*http.Response, error) {
  6307  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6308  }
  6309  
  6310  // ListIntentsResponder handles the response to the ListIntents request. The method always
  6311  // closes the http.Response Body.
  6312  func (client ModelClient) ListIntentsResponder(resp *http.Response) (result ListIntentClassifier, err error) {
  6313  	err = autorest.Respond(
  6314  		resp,
  6315  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  6316  		autorest.ByUnmarshallingJSON(&result.Value),
  6317  		autorest.ByClosing())
  6318  	result.Response = autorest.Response{Response: resp}
  6319  	return
  6320  }
  6321  
  6322  // ListIntentSuggestions suggests example utterances that would improve the accuracy of the intent model in a version
  6323  // of the application.
  6324  // Parameters:
  6325  // appID - the application ID.
  6326  // versionID - the version ID.
  6327  // intentID - the intent classifier ID.
  6328  // take - the number of entries to return. Maximum page size is 500. Default is 100.
  6329  // enableNestedChildren - toggles nested/flat format
  6330  func (client ModelClient) ListIntentSuggestions(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, take *int32, enableNestedChildren *bool) (result ListIntentsSuggestionExample, err error) {
  6331  	if tracing.IsEnabled() {
  6332  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListIntentSuggestions")
  6333  		defer func() {
  6334  			sc := -1
  6335  			if result.Response.Response != nil {
  6336  				sc = result.Response.Response.StatusCode
  6337  			}
  6338  			tracing.EndSpan(ctx, sc, err)
  6339  		}()
  6340  	}
  6341  	if err := validation.Validate([]validation.Validation{
  6342  		{TargetValue: take,
  6343  			Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
  6344  				Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil},
  6345  					{Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
  6346  				}}}}}); err != nil {
  6347  		return result, validation.NewError("authoring.ModelClient", "ListIntentSuggestions", err.Error())
  6348  	}
  6349  
  6350  	req, err := client.ListIntentSuggestionsPreparer(ctx, appID, versionID, intentID, take, enableNestedChildren)
  6351  	if err != nil {
  6352  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntentSuggestions", nil, "Failure preparing request")
  6353  		return
  6354  	}
  6355  
  6356  	resp, err := client.ListIntentSuggestionsSender(req)
  6357  	if err != nil {
  6358  		result.Response = autorest.Response{Response: resp}
  6359  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntentSuggestions", resp, "Failure sending request")
  6360  		return
  6361  	}
  6362  
  6363  	result, err = client.ListIntentSuggestionsResponder(resp)
  6364  	if err != nil {
  6365  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListIntentSuggestions", resp, "Failure responding to request")
  6366  		return
  6367  	}
  6368  
  6369  	return
  6370  }
  6371  
  6372  // ListIntentSuggestionsPreparer prepares the ListIntentSuggestions request.
  6373  func (client ModelClient) ListIntentSuggestionsPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, take *int32, enableNestedChildren *bool) (*http.Request, error) {
  6374  	urlParameters := map[string]interface{}{
  6375  		"Endpoint": client.Endpoint,
  6376  	}
  6377  
  6378  	pathParameters := map[string]interface{}{
  6379  		"appId":     autorest.Encode("path", appID),
  6380  		"intentId":  autorest.Encode("path", intentID),
  6381  		"versionId": autorest.Encode("path", versionID),
  6382  	}
  6383  
  6384  	queryParameters := map[string]interface{}{}
  6385  	if take != nil {
  6386  		queryParameters["take"] = autorest.Encode("query", *take)
  6387  	} else {
  6388  		queryParameters["take"] = autorest.Encode("query", 100)
  6389  	}
  6390  	if enableNestedChildren != nil {
  6391  		queryParameters["enableNestedChildren"] = autorest.Encode("query", *enableNestedChildren)
  6392  	} else {
  6393  		queryParameters["enableNestedChildren"] = autorest.Encode("query", false)
  6394  	}
  6395  
  6396  	preparer := autorest.CreatePreparer(
  6397  		autorest.AsGet(),
  6398  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  6399  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/suggest", pathParameters),
  6400  		autorest.WithQueryParameters(queryParameters))
  6401  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  6402  }
  6403  
  6404  // ListIntentSuggestionsSender sends the ListIntentSuggestions request. The method will close the
  6405  // http.Response Body if it receives an error.
  6406  func (client ModelClient) ListIntentSuggestionsSender(req *http.Request) (*http.Response, error) {
  6407  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6408  }
  6409  
  6410  // ListIntentSuggestionsResponder handles the response to the ListIntentSuggestions request. The method always
  6411  // closes the http.Response Body.
  6412  func (client ModelClient) ListIntentSuggestionsResponder(resp *http.Response) (result ListIntentsSuggestionExample, err error) {
  6413  	err = autorest.Respond(
  6414  		resp,
  6415  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  6416  		autorest.ByUnmarshallingJSON(&result.Value),
  6417  		autorest.ByClosing())
  6418  	result.Response = autorest.Response{Response: resp}
  6419  	return
  6420  }
  6421  
  6422  // ListModels gets information about all the intent and entity models in a version of the application.
  6423  // Parameters:
  6424  // appID - the application ID.
  6425  // versionID - the version ID.
  6426  // skip - the number of entries to skip. Default value is 0.
  6427  // take - the number of entries to return. Maximum page size is 500. Default is 100.
  6428  func (client ModelClient) ListModels(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListModelInfoResponse, err error) {
  6429  	if tracing.IsEnabled() {
  6430  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListModels")
  6431  		defer func() {
  6432  			sc := -1
  6433  			if result.Response.Response != nil {
  6434  				sc = result.Response.Response.StatusCode
  6435  			}
  6436  			tracing.EndSpan(ctx, sc, err)
  6437  		}()
  6438  	}
  6439  	if err := validation.Validate([]validation.Validation{
  6440  		{TargetValue: skip,
  6441  			Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
  6442  				Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}},
  6443  		{TargetValue: take,
  6444  			Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
  6445  				Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil},
  6446  					{Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
  6447  				}}}}}); err != nil {
  6448  		return result, validation.NewError("authoring.ModelClient", "ListModels", err.Error())
  6449  	}
  6450  
  6451  	req, err := client.ListModelsPreparer(ctx, appID, versionID, skip, take)
  6452  	if err != nil {
  6453  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListModels", nil, "Failure preparing request")
  6454  		return
  6455  	}
  6456  
  6457  	resp, err := client.ListModelsSender(req)
  6458  	if err != nil {
  6459  		result.Response = autorest.Response{Response: resp}
  6460  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListModels", resp, "Failure sending request")
  6461  		return
  6462  	}
  6463  
  6464  	result, err = client.ListModelsResponder(resp)
  6465  	if err != nil {
  6466  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListModels", resp, "Failure responding to request")
  6467  		return
  6468  	}
  6469  
  6470  	return
  6471  }
  6472  
  6473  // ListModelsPreparer prepares the ListModels request.
  6474  func (client ModelClient) ListModelsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
  6475  	urlParameters := map[string]interface{}{
  6476  		"Endpoint": client.Endpoint,
  6477  	}
  6478  
  6479  	pathParameters := map[string]interface{}{
  6480  		"appId":     autorest.Encode("path", appID),
  6481  		"versionId": autorest.Encode("path", versionID),
  6482  	}
  6483  
  6484  	queryParameters := map[string]interface{}{}
  6485  	if skip != nil {
  6486  		queryParameters["skip"] = autorest.Encode("query", *skip)
  6487  	} else {
  6488  		queryParameters["skip"] = autorest.Encode("query", 0)
  6489  	}
  6490  	if take != nil {
  6491  		queryParameters["take"] = autorest.Encode("query", *take)
  6492  	} else {
  6493  		queryParameters["take"] = autorest.Encode("query", 100)
  6494  	}
  6495  
  6496  	preparer := autorest.CreatePreparer(
  6497  		autorest.AsGet(),
  6498  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  6499  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/models", pathParameters),
  6500  		autorest.WithQueryParameters(queryParameters))
  6501  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  6502  }
  6503  
  6504  // ListModelsSender sends the ListModels request. The method will close the
  6505  // http.Response Body if it receives an error.
  6506  func (client ModelClient) ListModelsSender(req *http.Request) (*http.Response, error) {
  6507  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6508  }
  6509  
  6510  // ListModelsResponder handles the response to the ListModels request. The method always
  6511  // closes the http.Response Body.
  6512  func (client ModelClient) ListModelsResponder(resp *http.Response) (result ListModelInfoResponse, err error) {
  6513  	err = autorest.Respond(
  6514  		resp,
  6515  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  6516  		autorest.ByUnmarshallingJSON(&result.Value),
  6517  		autorest.ByClosing())
  6518  	result.Response = autorest.Response{Response: resp}
  6519  	return
  6520  }
  6521  
  6522  // ListPatternAnyEntityInfos sends the list pattern any entity infos request.
  6523  // Parameters:
  6524  // appID - the application ID.
  6525  // versionID - the version ID.
  6526  // skip - the number of entries to skip. Default value is 0.
  6527  // take - the number of entries to return. Maximum page size is 500. Default is 100.
  6528  func (client ModelClient) ListPatternAnyEntityInfos(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPatternAnyEntityExtractor, err error) {
  6529  	if tracing.IsEnabled() {
  6530  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListPatternAnyEntityInfos")
  6531  		defer func() {
  6532  			sc := -1
  6533  			if result.Response.Response != nil {
  6534  				sc = result.Response.Response.StatusCode
  6535  			}
  6536  			tracing.EndSpan(ctx, sc, err)
  6537  		}()
  6538  	}
  6539  	if err := validation.Validate([]validation.Validation{
  6540  		{TargetValue: skip,
  6541  			Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
  6542  				Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}},
  6543  		{TargetValue: take,
  6544  			Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
  6545  				Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil},
  6546  					{Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
  6547  				}}}}}); err != nil {
  6548  		return result, validation.NewError("authoring.ModelClient", "ListPatternAnyEntityInfos", err.Error())
  6549  	}
  6550  
  6551  	req, err := client.ListPatternAnyEntityInfosPreparer(ctx, appID, versionID, skip, take)
  6552  	if err != nil {
  6553  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPatternAnyEntityInfos", nil, "Failure preparing request")
  6554  		return
  6555  	}
  6556  
  6557  	resp, err := client.ListPatternAnyEntityInfosSender(req)
  6558  	if err != nil {
  6559  		result.Response = autorest.Response{Response: resp}
  6560  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPatternAnyEntityInfos", resp, "Failure sending request")
  6561  		return
  6562  	}
  6563  
  6564  	result, err = client.ListPatternAnyEntityInfosResponder(resp)
  6565  	if err != nil {
  6566  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPatternAnyEntityInfos", resp, "Failure responding to request")
  6567  		return
  6568  	}
  6569  
  6570  	return
  6571  }
  6572  
  6573  // ListPatternAnyEntityInfosPreparer prepares the ListPatternAnyEntityInfos request.
  6574  func (client ModelClient) ListPatternAnyEntityInfosPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
  6575  	urlParameters := map[string]interface{}{
  6576  		"Endpoint": client.Endpoint,
  6577  	}
  6578  
  6579  	pathParameters := map[string]interface{}{
  6580  		"appId":     autorest.Encode("path", appID),
  6581  		"versionId": autorest.Encode("path", versionID),
  6582  	}
  6583  
  6584  	queryParameters := map[string]interface{}{}
  6585  	if skip != nil {
  6586  		queryParameters["skip"] = autorest.Encode("query", *skip)
  6587  	} else {
  6588  		queryParameters["skip"] = autorest.Encode("query", 0)
  6589  	}
  6590  	if take != nil {
  6591  		queryParameters["take"] = autorest.Encode("query", *take)
  6592  	} else {
  6593  		queryParameters["take"] = autorest.Encode("query", 100)
  6594  	}
  6595  
  6596  	preparer := autorest.CreatePreparer(
  6597  		autorest.AsGet(),
  6598  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  6599  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities", pathParameters),
  6600  		autorest.WithQueryParameters(queryParameters))
  6601  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  6602  }
  6603  
  6604  // ListPatternAnyEntityInfosSender sends the ListPatternAnyEntityInfos request. The method will close the
  6605  // http.Response Body if it receives an error.
  6606  func (client ModelClient) ListPatternAnyEntityInfosSender(req *http.Request) (*http.Response, error) {
  6607  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6608  }
  6609  
  6610  // ListPatternAnyEntityInfosResponder handles the response to the ListPatternAnyEntityInfos request. The method always
  6611  // closes the http.Response Body.
  6612  func (client ModelClient) ListPatternAnyEntityInfosResponder(resp *http.Response) (result ListPatternAnyEntityExtractor, err error) {
  6613  	err = autorest.Respond(
  6614  		resp,
  6615  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  6616  		autorest.ByUnmarshallingJSON(&result.Value),
  6617  		autorest.ByClosing())
  6618  	result.Response = autorest.Response{Response: resp}
  6619  	return
  6620  }
  6621  
  6622  // ListPatternAnyEntityRoles sends the list pattern any entity roles request.
  6623  // Parameters:
  6624  // appID - the application ID.
  6625  // versionID - the version ID.
  6626  // entityID - entity Id
  6627  func (client ModelClient) ListPatternAnyEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
  6628  	if tracing.IsEnabled() {
  6629  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListPatternAnyEntityRoles")
  6630  		defer func() {
  6631  			sc := -1
  6632  			if result.Response.Response != nil {
  6633  				sc = result.Response.Response.StatusCode
  6634  			}
  6635  			tracing.EndSpan(ctx, sc, err)
  6636  		}()
  6637  	}
  6638  	req, err := client.ListPatternAnyEntityRolesPreparer(ctx, appID, versionID, entityID)
  6639  	if err != nil {
  6640  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPatternAnyEntityRoles", nil, "Failure preparing request")
  6641  		return
  6642  	}
  6643  
  6644  	resp, err := client.ListPatternAnyEntityRolesSender(req)
  6645  	if err != nil {
  6646  		result.Response = autorest.Response{Response: resp}
  6647  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPatternAnyEntityRoles", resp, "Failure sending request")
  6648  		return
  6649  	}
  6650  
  6651  	result, err = client.ListPatternAnyEntityRolesResponder(resp)
  6652  	if err != nil {
  6653  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPatternAnyEntityRoles", resp, "Failure responding to request")
  6654  		return
  6655  	}
  6656  
  6657  	return
  6658  }
  6659  
  6660  // ListPatternAnyEntityRolesPreparer prepares the ListPatternAnyEntityRoles request.
  6661  func (client ModelClient) ListPatternAnyEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
  6662  	urlParameters := map[string]interface{}{
  6663  		"Endpoint": client.Endpoint,
  6664  	}
  6665  
  6666  	pathParameters := map[string]interface{}{
  6667  		"appId":     autorest.Encode("path", appID),
  6668  		"entityId":  autorest.Encode("path", entityID),
  6669  		"versionId": autorest.Encode("path", versionID),
  6670  	}
  6671  
  6672  	preparer := autorest.CreatePreparer(
  6673  		autorest.AsGet(),
  6674  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  6675  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles", pathParameters))
  6676  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  6677  }
  6678  
  6679  // ListPatternAnyEntityRolesSender sends the ListPatternAnyEntityRoles request. The method will close the
  6680  // http.Response Body if it receives an error.
  6681  func (client ModelClient) ListPatternAnyEntityRolesSender(req *http.Request) (*http.Response, error) {
  6682  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6683  }
  6684  
  6685  // ListPatternAnyEntityRolesResponder handles the response to the ListPatternAnyEntityRoles request. The method always
  6686  // closes the http.Response Body.
  6687  func (client ModelClient) ListPatternAnyEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) {
  6688  	err = autorest.Respond(
  6689  		resp,
  6690  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  6691  		autorest.ByUnmarshallingJSON(&result.Value),
  6692  		autorest.ByClosing())
  6693  	result.Response = autorest.Response{Response: resp}
  6694  	return
  6695  }
  6696  
  6697  // ListPrebuiltEntities gets all the available prebuilt entities in a version of the application.
  6698  // Parameters:
  6699  // appID - the application ID.
  6700  // versionID - the version ID.
  6701  func (client ModelClient) ListPrebuiltEntities(ctx context.Context, appID uuid.UUID, versionID string) (result ListAvailablePrebuiltEntityModel, err error) {
  6702  	if tracing.IsEnabled() {
  6703  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListPrebuiltEntities")
  6704  		defer func() {
  6705  			sc := -1
  6706  			if result.Response.Response != nil {
  6707  				sc = result.Response.Response.StatusCode
  6708  			}
  6709  			tracing.EndSpan(ctx, sc, err)
  6710  		}()
  6711  	}
  6712  	req, err := client.ListPrebuiltEntitiesPreparer(ctx, appID, versionID)
  6713  	if err != nil {
  6714  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntities", nil, "Failure preparing request")
  6715  		return
  6716  	}
  6717  
  6718  	resp, err := client.ListPrebuiltEntitiesSender(req)
  6719  	if err != nil {
  6720  		result.Response = autorest.Response{Response: resp}
  6721  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntities", resp, "Failure sending request")
  6722  		return
  6723  	}
  6724  
  6725  	result, err = client.ListPrebuiltEntitiesResponder(resp)
  6726  	if err != nil {
  6727  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntities", resp, "Failure responding to request")
  6728  		return
  6729  	}
  6730  
  6731  	return
  6732  }
  6733  
  6734  // ListPrebuiltEntitiesPreparer prepares the ListPrebuiltEntities request.
  6735  func (client ModelClient) ListPrebuiltEntitiesPreparer(ctx context.Context, appID uuid.UUID, versionID string) (*http.Request, error) {
  6736  	urlParameters := map[string]interface{}{
  6737  		"Endpoint": client.Endpoint,
  6738  	}
  6739  
  6740  	pathParameters := map[string]interface{}{
  6741  		"appId":     autorest.Encode("path", appID),
  6742  		"versionId": autorest.Encode("path", versionID),
  6743  	}
  6744  
  6745  	preparer := autorest.CreatePreparer(
  6746  		autorest.AsGet(),
  6747  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  6748  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/listprebuilts", pathParameters))
  6749  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  6750  }
  6751  
  6752  // ListPrebuiltEntitiesSender sends the ListPrebuiltEntities request. The method will close the
  6753  // http.Response Body if it receives an error.
  6754  func (client ModelClient) ListPrebuiltEntitiesSender(req *http.Request) (*http.Response, error) {
  6755  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6756  }
  6757  
  6758  // ListPrebuiltEntitiesResponder handles the response to the ListPrebuiltEntities request. The method always
  6759  // closes the http.Response Body.
  6760  func (client ModelClient) ListPrebuiltEntitiesResponder(resp *http.Response) (result ListAvailablePrebuiltEntityModel, err error) {
  6761  	err = autorest.Respond(
  6762  		resp,
  6763  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  6764  		autorest.ByUnmarshallingJSON(&result.Value),
  6765  		autorest.ByClosing())
  6766  	result.Response = autorest.Response{Response: resp}
  6767  	return
  6768  }
  6769  
  6770  // ListPrebuiltEntityRoles sends the list prebuilt entity roles request.
  6771  // Parameters:
  6772  // appID - the application ID.
  6773  // versionID - the version ID.
  6774  // entityID - entity Id
  6775  func (client ModelClient) ListPrebuiltEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
  6776  	if tracing.IsEnabled() {
  6777  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListPrebuiltEntityRoles")
  6778  		defer func() {
  6779  			sc := -1
  6780  			if result.Response.Response != nil {
  6781  				sc = result.Response.Response.StatusCode
  6782  			}
  6783  			tracing.EndSpan(ctx, sc, err)
  6784  		}()
  6785  	}
  6786  	req, err := client.ListPrebuiltEntityRolesPreparer(ctx, appID, versionID, entityID)
  6787  	if err != nil {
  6788  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntityRoles", nil, "Failure preparing request")
  6789  		return
  6790  	}
  6791  
  6792  	resp, err := client.ListPrebuiltEntityRolesSender(req)
  6793  	if err != nil {
  6794  		result.Response = autorest.Response{Response: resp}
  6795  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntityRoles", resp, "Failure sending request")
  6796  		return
  6797  	}
  6798  
  6799  	result, err = client.ListPrebuiltEntityRolesResponder(resp)
  6800  	if err != nil {
  6801  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuiltEntityRoles", resp, "Failure responding to request")
  6802  		return
  6803  	}
  6804  
  6805  	return
  6806  }
  6807  
  6808  // ListPrebuiltEntityRolesPreparer prepares the ListPrebuiltEntityRoles request.
  6809  func (client ModelClient) ListPrebuiltEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
  6810  	urlParameters := map[string]interface{}{
  6811  		"Endpoint": client.Endpoint,
  6812  	}
  6813  
  6814  	pathParameters := map[string]interface{}{
  6815  		"appId":     autorest.Encode("path", appID),
  6816  		"entityId":  autorest.Encode("path", entityID),
  6817  		"versionId": autorest.Encode("path", versionID),
  6818  	}
  6819  
  6820  	preparer := autorest.CreatePreparer(
  6821  		autorest.AsGet(),
  6822  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  6823  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles", pathParameters))
  6824  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  6825  }
  6826  
  6827  // ListPrebuiltEntityRolesSender sends the ListPrebuiltEntityRoles request. The method will close the
  6828  // http.Response Body if it receives an error.
  6829  func (client ModelClient) ListPrebuiltEntityRolesSender(req *http.Request) (*http.Response, error) {
  6830  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6831  }
  6832  
  6833  // ListPrebuiltEntityRolesResponder handles the response to the ListPrebuiltEntityRoles request. The method always
  6834  // closes the http.Response Body.
  6835  func (client ModelClient) ListPrebuiltEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) {
  6836  	err = autorest.Respond(
  6837  		resp,
  6838  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  6839  		autorest.ByUnmarshallingJSON(&result.Value),
  6840  		autorest.ByClosing())
  6841  	result.Response = autorest.Response{Response: resp}
  6842  	return
  6843  }
  6844  
  6845  // ListPrebuilts gets information about all the prebuilt entities in a version of the application.
  6846  // Parameters:
  6847  // appID - the application ID.
  6848  // versionID - the version ID.
  6849  // skip - the number of entries to skip. Default value is 0.
  6850  // take - the number of entries to return. Maximum page size is 500. Default is 100.
  6851  func (client ModelClient) ListPrebuilts(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListPrebuiltEntityExtractor, err error) {
  6852  	if tracing.IsEnabled() {
  6853  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListPrebuilts")
  6854  		defer func() {
  6855  			sc := -1
  6856  			if result.Response.Response != nil {
  6857  				sc = result.Response.Response.StatusCode
  6858  			}
  6859  			tracing.EndSpan(ctx, sc, err)
  6860  		}()
  6861  	}
  6862  	if err := validation.Validate([]validation.Validation{
  6863  		{TargetValue: skip,
  6864  			Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
  6865  				Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}},
  6866  		{TargetValue: take,
  6867  			Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
  6868  				Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil},
  6869  					{Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
  6870  				}}}}}); err != nil {
  6871  		return result, validation.NewError("authoring.ModelClient", "ListPrebuilts", err.Error())
  6872  	}
  6873  
  6874  	req, err := client.ListPrebuiltsPreparer(ctx, appID, versionID, skip, take)
  6875  	if err != nil {
  6876  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuilts", nil, "Failure preparing request")
  6877  		return
  6878  	}
  6879  
  6880  	resp, err := client.ListPrebuiltsSender(req)
  6881  	if err != nil {
  6882  		result.Response = autorest.Response{Response: resp}
  6883  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuilts", resp, "Failure sending request")
  6884  		return
  6885  	}
  6886  
  6887  	result, err = client.ListPrebuiltsResponder(resp)
  6888  	if err != nil {
  6889  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListPrebuilts", resp, "Failure responding to request")
  6890  		return
  6891  	}
  6892  
  6893  	return
  6894  }
  6895  
  6896  // ListPrebuiltsPreparer prepares the ListPrebuilts request.
  6897  func (client ModelClient) ListPrebuiltsPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
  6898  	urlParameters := map[string]interface{}{
  6899  		"Endpoint": client.Endpoint,
  6900  	}
  6901  
  6902  	pathParameters := map[string]interface{}{
  6903  		"appId":     autorest.Encode("path", appID),
  6904  		"versionId": autorest.Encode("path", versionID),
  6905  	}
  6906  
  6907  	queryParameters := map[string]interface{}{}
  6908  	if skip != nil {
  6909  		queryParameters["skip"] = autorest.Encode("query", *skip)
  6910  	} else {
  6911  		queryParameters["skip"] = autorest.Encode("query", 0)
  6912  	}
  6913  	if take != nil {
  6914  		queryParameters["take"] = autorest.Encode("query", *take)
  6915  	} else {
  6916  		queryParameters["take"] = autorest.Encode("query", 100)
  6917  	}
  6918  
  6919  	preparer := autorest.CreatePreparer(
  6920  		autorest.AsGet(),
  6921  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  6922  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts", pathParameters),
  6923  		autorest.WithQueryParameters(queryParameters))
  6924  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  6925  }
  6926  
  6927  // ListPrebuiltsSender sends the ListPrebuilts request. The method will close the
  6928  // http.Response Body if it receives an error.
  6929  func (client ModelClient) ListPrebuiltsSender(req *http.Request) (*http.Response, error) {
  6930  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  6931  }
  6932  
  6933  // ListPrebuiltsResponder handles the response to the ListPrebuilts request. The method always
  6934  // closes the http.Response Body.
  6935  func (client ModelClient) ListPrebuiltsResponder(resp *http.Response) (result ListPrebuiltEntityExtractor, err error) {
  6936  	err = autorest.Respond(
  6937  		resp,
  6938  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  6939  		autorest.ByUnmarshallingJSON(&result.Value),
  6940  		autorest.ByClosing())
  6941  	result.Response = autorest.Response{Response: resp}
  6942  	return
  6943  }
  6944  
  6945  // ListRegexEntityInfos sends the list regex entity infos request.
  6946  // Parameters:
  6947  // appID - the application ID.
  6948  // versionID - the version ID.
  6949  // skip - the number of entries to skip. Default value is 0.
  6950  // take - the number of entries to return. Maximum page size is 500. Default is 100.
  6951  func (client ModelClient) ListRegexEntityInfos(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (result ListRegexEntityExtractor, err error) {
  6952  	if tracing.IsEnabled() {
  6953  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListRegexEntityInfos")
  6954  		defer func() {
  6955  			sc := -1
  6956  			if result.Response.Response != nil {
  6957  				sc = result.Response.Response.StatusCode
  6958  			}
  6959  			tracing.EndSpan(ctx, sc, err)
  6960  		}()
  6961  	}
  6962  	if err := validation.Validate([]validation.Validation{
  6963  		{TargetValue: skip,
  6964  			Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
  6965  				Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}},
  6966  		{TargetValue: take,
  6967  			Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false,
  6968  				Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil},
  6969  					{Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
  6970  				}}}}}); err != nil {
  6971  		return result, validation.NewError("authoring.ModelClient", "ListRegexEntityInfos", err.Error())
  6972  	}
  6973  
  6974  	req, err := client.ListRegexEntityInfosPreparer(ctx, appID, versionID, skip, take)
  6975  	if err != nil {
  6976  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListRegexEntityInfos", nil, "Failure preparing request")
  6977  		return
  6978  	}
  6979  
  6980  	resp, err := client.ListRegexEntityInfosSender(req)
  6981  	if err != nil {
  6982  		result.Response = autorest.Response{Response: resp}
  6983  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListRegexEntityInfos", resp, "Failure sending request")
  6984  		return
  6985  	}
  6986  
  6987  	result, err = client.ListRegexEntityInfosResponder(resp)
  6988  	if err != nil {
  6989  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListRegexEntityInfos", resp, "Failure responding to request")
  6990  		return
  6991  	}
  6992  
  6993  	return
  6994  }
  6995  
  6996  // ListRegexEntityInfosPreparer prepares the ListRegexEntityInfos request.
  6997  func (client ModelClient) ListRegexEntityInfosPreparer(ctx context.Context, appID uuid.UUID, versionID string, skip *int32, take *int32) (*http.Request, error) {
  6998  	urlParameters := map[string]interface{}{
  6999  		"Endpoint": client.Endpoint,
  7000  	}
  7001  
  7002  	pathParameters := map[string]interface{}{
  7003  		"appId":     autorest.Encode("path", appID),
  7004  		"versionId": autorest.Encode("path", versionID),
  7005  	}
  7006  
  7007  	queryParameters := map[string]interface{}{}
  7008  	if skip != nil {
  7009  		queryParameters["skip"] = autorest.Encode("query", *skip)
  7010  	} else {
  7011  		queryParameters["skip"] = autorest.Encode("query", 0)
  7012  	}
  7013  	if take != nil {
  7014  		queryParameters["take"] = autorest.Encode("query", *take)
  7015  	} else {
  7016  		queryParameters["take"] = autorest.Encode("query", 100)
  7017  	}
  7018  
  7019  	preparer := autorest.CreatePreparer(
  7020  		autorest.AsGet(),
  7021  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  7022  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities", pathParameters),
  7023  		autorest.WithQueryParameters(queryParameters))
  7024  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  7025  }
  7026  
  7027  // ListRegexEntityInfosSender sends the ListRegexEntityInfos request. The method will close the
  7028  // http.Response Body if it receives an error.
  7029  func (client ModelClient) ListRegexEntityInfosSender(req *http.Request) (*http.Response, error) {
  7030  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7031  }
  7032  
  7033  // ListRegexEntityInfosResponder handles the response to the ListRegexEntityInfos request. The method always
  7034  // closes the http.Response Body.
  7035  func (client ModelClient) ListRegexEntityInfosResponder(resp *http.Response) (result ListRegexEntityExtractor, err error) {
  7036  	err = autorest.Respond(
  7037  		resp,
  7038  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  7039  		autorest.ByUnmarshallingJSON(&result.Value),
  7040  		autorest.ByClosing())
  7041  	result.Response = autorest.Response{Response: resp}
  7042  	return
  7043  }
  7044  
  7045  // ListRegexEntityRoles sends the list regex entity roles request.
  7046  // Parameters:
  7047  // appID - the application ID.
  7048  // versionID - the version ID.
  7049  // entityID - entity Id
  7050  func (client ModelClient) ListRegexEntityRoles(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (result ListEntityRole, err error) {
  7051  	if tracing.IsEnabled() {
  7052  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ListRegexEntityRoles")
  7053  		defer func() {
  7054  			sc := -1
  7055  			if result.Response.Response != nil {
  7056  				sc = result.Response.Response.StatusCode
  7057  			}
  7058  			tracing.EndSpan(ctx, sc, err)
  7059  		}()
  7060  	}
  7061  	req, err := client.ListRegexEntityRolesPreparer(ctx, appID, versionID, entityID)
  7062  	if err != nil {
  7063  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListRegexEntityRoles", nil, "Failure preparing request")
  7064  		return
  7065  	}
  7066  
  7067  	resp, err := client.ListRegexEntityRolesSender(req)
  7068  	if err != nil {
  7069  		result.Response = autorest.Response{Response: resp}
  7070  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListRegexEntityRoles", resp, "Failure sending request")
  7071  		return
  7072  	}
  7073  
  7074  	result, err = client.ListRegexEntityRolesResponder(resp)
  7075  	if err != nil {
  7076  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ListRegexEntityRoles", resp, "Failure responding to request")
  7077  		return
  7078  	}
  7079  
  7080  	return
  7081  }
  7082  
  7083  // ListRegexEntityRolesPreparer prepares the ListRegexEntityRoles request.
  7084  func (client ModelClient) ListRegexEntityRolesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID) (*http.Request, error) {
  7085  	urlParameters := map[string]interface{}{
  7086  		"Endpoint": client.Endpoint,
  7087  	}
  7088  
  7089  	pathParameters := map[string]interface{}{
  7090  		"appId":     autorest.Encode("path", appID),
  7091  		"entityId":  autorest.Encode("path", entityID),
  7092  		"versionId": autorest.Encode("path", versionID),
  7093  	}
  7094  
  7095  	preparer := autorest.CreatePreparer(
  7096  		autorest.AsGet(),
  7097  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  7098  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles", pathParameters))
  7099  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  7100  }
  7101  
  7102  // ListRegexEntityRolesSender sends the ListRegexEntityRoles request. The method will close the
  7103  // http.Response Body if it receives an error.
  7104  func (client ModelClient) ListRegexEntityRolesSender(req *http.Request) (*http.Response, error) {
  7105  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7106  }
  7107  
  7108  // ListRegexEntityRolesResponder handles the response to the ListRegexEntityRoles request. The method always
  7109  // closes the http.Response Body.
  7110  func (client ModelClient) ListRegexEntityRolesResponder(resp *http.Response) (result ListEntityRole, err error) {
  7111  	err = autorest.Respond(
  7112  		resp,
  7113  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  7114  		autorest.ByUnmarshallingJSON(&result.Value),
  7115  		autorest.ByClosing())
  7116  	result.Response = autorest.Response{Response: resp}
  7117  	return
  7118  }
  7119  
  7120  // PatchClosedList adds a batch of sublists to an existing list entity in a version of the application.
  7121  // Parameters:
  7122  // appID - the application ID.
  7123  // versionID - the version ID.
  7124  // clEntityID - the list entity model ID.
  7125  // closedListModelPatchObject - a words list batch.
  7126  func (client ModelClient) PatchClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelPatchObject ClosedListModelPatchObject) (result OperationStatus, err error) {
  7127  	if tracing.IsEnabled() {
  7128  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.PatchClosedList")
  7129  		defer func() {
  7130  			sc := -1
  7131  			if result.Response.Response != nil {
  7132  				sc = result.Response.Response.StatusCode
  7133  			}
  7134  			tracing.EndSpan(ctx, sc, err)
  7135  		}()
  7136  	}
  7137  	req, err := client.PatchClosedListPreparer(ctx, appID, versionID, clEntityID, closedListModelPatchObject)
  7138  	if err != nil {
  7139  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "PatchClosedList", nil, "Failure preparing request")
  7140  		return
  7141  	}
  7142  
  7143  	resp, err := client.PatchClosedListSender(req)
  7144  	if err != nil {
  7145  		result.Response = autorest.Response{Response: resp}
  7146  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "PatchClosedList", resp, "Failure sending request")
  7147  		return
  7148  	}
  7149  
  7150  	result, err = client.PatchClosedListResponder(resp)
  7151  	if err != nil {
  7152  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "PatchClosedList", resp, "Failure responding to request")
  7153  		return
  7154  	}
  7155  
  7156  	return
  7157  }
  7158  
  7159  // PatchClosedListPreparer prepares the PatchClosedList request.
  7160  func (client ModelClient) PatchClosedListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelPatchObject ClosedListModelPatchObject) (*http.Request, error) {
  7161  	urlParameters := map[string]interface{}{
  7162  		"Endpoint": client.Endpoint,
  7163  	}
  7164  
  7165  	pathParameters := map[string]interface{}{
  7166  		"appId":      autorest.Encode("path", appID),
  7167  		"clEntityId": autorest.Encode("path", clEntityID),
  7168  		"versionId":  autorest.Encode("path", versionID),
  7169  	}
  7170  
  7171  	preparer := autorest.CreatePreparer(
  7172  		autorest.AsContentType("application/json; charset=utf-8"),
  7173  		autorest.AsPatch(),
  7174  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  7175  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters),
  7176  		autorest.WithJSON(closedListModelPatchObject))
  7177  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  7178  }
  7179  
  7180  // PatchClosedListSender sends the PatchClosedList request. The method will close the
  7181  // http.Response Body if it receives an error.
  7182  func (client ModelClient) PatchClosedListSender(req *http.Request) (*http.Response, error) {
  7183  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7184  }
  7185  
  7186  // PatchClosedListResponder handles the response to the PatchClosedList request. The method always
  7187  // closes the http.Response Body.
  7188  func (client ModelClient) PatchClosedListResponder(resp *http.Response) (result OperationStatus, err error) {
  7189  	err = autorest.Respond(
  7190  		resp,
  7191  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  7192  		autorest.ByUnmarshallingJSON(&result),
  7193  		autorest.ByClosing())
  7194  	result.Response = autorest.Response{Response: resp}
  7195  	return
  7196  }
  7197  
  7198  // ReplaceEntityFeatures updates the information of the features used by the entity in a version of the application.
  7199  // Parameters:
  7200  // appID - the application ID.
  7201  // versionID - the version ID.
  7202  // entityID - the entity extractor ID.
  7203  // featureRelationsUpdateObject - a list of feature information objects containing the new feature relations.
  7204  func (client ModelClient) ReplaceEntityFeatures(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, featureRelationsUpdateObject []ModelFeatureInformation) (result OperationStatus, err error) {
  7205  	if tracing.IsEnabled() {
  7206  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ReplaceEntityFeatures")
  7207  		defer func() {
  7208  			sc := -1
  7209  			if result.Response.Response != nil {
  7210  				sc = result.Response.Response.StatusCode
  7211  			}
  7212  			tracing.EndSpan(ctx, sc, err)
  7213  		}()
  7214  	}
  7215  	if err := validation.Validate([]validation.Validation{
  7216  		{TargetValue: featureRelationsUpdateObject,
  7217  			Constraints: []validation.Constraint{{Target: "featureRelationsUpdateObject", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
  7218  		return result, validation.NewError("authoring.ModelClient", "ReplaceEntityFeatures", err.Error())
  7219  	}
  7220  
  7221  	req, err := client.ReplaceEntityFeaturesPreparer(ctx, appID, versionID, entityID, featureRelationsUpdateObject)
  7222  	if err != nil {
  7223  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ReplaceEntityFeatures", nil, "Failure preparing request")
  7224  		return
  7225  	}
  7226  
  7227  	resp, err := client.ReplaceEntityFeaturesSender(req)
  7228  	if err != nil {
  7229  		result.Response = autorest.Response{Response: resp}
  7230  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ReplaceEntityFeatures", resp, "Failure sending request")
  7231  		return
  7232  	}
  7233  
  7234  	result, err = client.ReplaceEntityFeaturesResponder(resp)
  7235  	if err != nil {
  7236  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ReplaceEntityFeatures", resp, "Failure responding to request")
  7237  		return
  7238  	}
  7239  
  7240  	return
  7241  }
  7242  
  7243  // ReplaceEntityFeaturesPreparer prepares the ReplaceEntityFeatures request.
  7244  func (client ModelClient) ReplaceEntityFeaturesPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, featureRelationsUpdateObject []ModelFeatureInformation) (*http.Request, error) {
  7245  	urlParameters := map[string]interface{}{
  7246  		"Endpoint": client.Endpoint,
  7247  	}
  7248  
  7249  	pathParameters := map[string]interface{}{
  7250  		"appId":     autorest.Encode("path", appID),
  7251  		"entityId":  autorest.Encode("path", entityID),
  7252  		"versionId": autorest.Encode("path", versionID),
  7253  	}
  7254  
  7255  	preparer := autorest.CreatePreparer(
  7256  		autorest.AsContentType("application/json; charset=utf-8"),
  7257  		autorest.AsPut(),
  7258  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  7259  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/features", pathParameters),
  7260  		autorest.WithJSON(featureRelationsUpdateObject))
  7261  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  7262  }
  7263  
  7264  // ReplaceEntityFeaturesSender sends the ReplaceEntityFeatures request. The method will close the
  7265  // http.Response Body if it receives an error.
  7266  func (client ModelClient) ReplaceEntityFeaturesSender(req *http.Request) (*http.Response, error) {
  7267  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7268  }
  7269  
  7270  // ReplaceEntityFeaturesResponder handles the response to the ReplaceEntityFeatures request. The method always
  7271  // closes the http.Response Body.
  7272  func (client ModelClient) ReplaceEntityFeaturesResponder(resp *http.Response) (result OperationStatus, err error) {
  7273  	err = autorest.Respond(
  7274  		resp,
  7275  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  7276  		autorest.ByUnmarshallingJSON(&result),
  7277  		autorest.ByClosing())
  7278  	result.Response = autorest.Response{Response: resp}
  7279  	return
  7280  }
  7281  
  7282  // ReplaceIntentFeatures updates the information of the features used by the intent in a version of the application.
  7283  // Parameters:
  7284  // appID - the application ID.
  7285  // versionID - the version ID.
  7286  // intentID - the intent classifier ID.
  7287  // featureRelationsUpdateObject - a list of feature information objects containing the new feature relations.
  7288  func (client ModelClient) ReplaceIntentFeatures(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, featureRelationsUpdateObject []ModelFeatureInformation) (result OperationStatus, err error) {
  7289  	if tracing.IsEnabled() {
  7290  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.ReplaceIntentFeatures")
  7291  		defer func() {
  7292  			sc := -1
  7293  			if result.Response.Response != nil {
  7294  				sc = result.Response.Response.StatusCode
  7295  			}
  7296  			tracing.EndSpan(ctx, sc, err)
  7297  		}()
  7298  	}
  7299  	if err := validation.Validate([]validation.Validation{
  7300  		{TargetValue: featureRelationsUpdateObject,
  7301  			Constraints: []validation.Constraint{{Target: "featureRelationsUpdateObject", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
  7302  		return result, validation.NewError("authoring.ModelClient", "ReplaceIntentFeatures", err.Error())
  7303  	}
  7304  
  7305  	req, err := client.ReplaceIntentFeaturesPreparer(ctx, appID, versionID, intentID, featureRelationsUpdateObject)
  7306  	if err != nil {
  7307  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ReplaceIntentFeatures", nil, "Failure preparing request")
  7308  		return
  7309  	}
  7310  
  7311  	resp, err := client.ReplaceIntentFeaturesSender(req)
  7312  	if err != nil {
  7313  		result.Response = autorest.Response{Response: resp}
  7314  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ReplaceIntentFeatures", resp, "Failure sending request")
  7315  		return
  7316  	}
  7317  
  7318  	result, err = client.ReplaceIntentFeaturesResponder(resp)
  7319  	if err != nil {
  7320  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "ReplaceIntentFeatures", resp, "Failure responding to request")
  7321  		return
  7322  	}
  7323  
  7324  	return
  7325  }
  7326  
  7327  // ReplaceIntentFeaturesPreparer prepares the ReplaceIntentFeatures request.
  7328  func (client ModelClient) ReplaceIntentFeaturesPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, featureRelationsUpdateObject []ModelFeatureInformation) (*http.Request, error) {
  7329  	urlParameters := map[string]interface{}{
  7330  		"Endpoint": client.Endpoint,
  7331  	}
  7332  
  7333  	pathParameters := map[string]interface{}{
  7334  		"appId":     autorest.Encode("path", appID),
  7335  		"intentId":  autorest.Encode("path", intentID),
  7336  		"versionId": autorest.Encode("path", versionID),
  7337  	}
  7338  
  7339  	preparer := autorest.CreatePreparer(
  7340  		autorest.AsContentType("application/json; charset=utf-8"),
  7341  		autorest.AsPut(),
  7342  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  7343  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}/features", pathParameters),
  7344  		autorest.WithJSON(featureRelationsUpdateObject))
  7345  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  7346  }
  7347  
  7348  // ReplaceIntentFeaturesSender sends the ReplaceIntentFeatures request. The method will close the
  7349  // http.Response Body if it receives an error.
  7350  func (client ModelClient) ReplaceIntentFeaturesSender(req *http.Request) (*http.Response, error) {
  7351  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7352  }
  7353  
  7354  // ReplaceIntentFeaturesResponder handles the response to the ReplaceIntentFeatures request. The method always
  7355  // closes the http.Response Body.
  7356  func (client ModelClient) ReplaceIntentFeaturesResponder(resp *http.Response) (result OperationStatus, err error) {
  7357  	err = autorest.Respond(
  7358  		resp,
  7359  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  7360  		autorest.ByUnmarshallingJSON(&result),
  7361  		autorest.ByClosing())
  7362  	result.Response = autorest.Response{Response: resp}
  7363  	return
  7364  }
  7365  
  7366  // UpdateClosedList updates the list entity in a version of the application.
  7367  // Parameters:
  7368  // appID - the application ID.
  7369  // versionID - the version ID.
  7370  // clEntityID - the list model ID.
  7371  // closedListModelUpdateObject - the new list entity name and words list.
  7372  func (client ModelClient) UpdateClosedList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelUpdateObject ClosedListModelUpdateObject) (result OperationStatus, err error) {
  7373  	if tracing.IsEnabled() {
  7374  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateClosedList")
  7375  		defer func() {
  7376  			sc := -1
  7377  			if result.Response.Response != nil {
  7378  				sc = result.Response.Response.StatusCode
  7379  			}
  7380  			tracing.EndSpan(ctx, sc, err)
  7381  		}()
  7382  	}
  7383  	req, err := client.UpdateClosedListPreparer(ctx, appID, versionID, clEntityID, closedListModelUpdateObject)
  7384  	if err != nil {
  7385  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateClosedList", nil, "Failure preparing request")
  7386  		return
  7387  	}
  7388  
  7389  	resp, err := client.UpdateClosedListSender(req)
  7390  	if err != nil {
  7391  		result.Response = autorest.Response{Response: resp}
  7392  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateClosedList", resp, "Failure sending request")
  7393  		return
  7394  	}
  7395  
  7396  	result, err = client.UpdateClosedListResponder(resp)
  7397  	if err != nil {
  7398  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateClosedList", resp, "Failure responding to request")
  7399  		return
  7400  	}
  7401  
  7402  	return
  7403  }
  7404  
  7405  // UpdateClosedListPreparer prepares the UpdateClosedList request.
  7406  func (client ModelClient) UpdateClosedListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, closedListModelUpdateObject ClosedListModelUpdateObject) (*http.Request, error) {
  7407  	urlParameters := map[string]interface{}{
  7408  		"Endpoint": client.Endpoint,
  7409  	}
  7410  
  7411  	pathParameters := map[string]interface{}{
  7412  		"appId":      autorest.Encode("path", appID),
  7413  		"clEntityId": autorest.Encode("path", clEntityID),
  7414  		"versionId":  autorest.Encode("path", versionID),
  7415  	}
  7416  
  7417  	preparer := autorest.CreatePreparer(
  7418  		autorest.AsContentType("application/json; charset=utf-8"),
  7419  		autorest.AsPut(),
  7420  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  7421  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", pathParameters),
  7422  		autorest.WithJSON(closedListModelUpdateObject))
  7423  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  7424  }
  7425  
  7426  // UpdateClosedListSender sends the UpdateClosedList request. The method will close the
  7427  // http.Response Body if it receives an error.
  7428  func (client ModelClient) UpdateClosedListSender(req *http.Request) (*http.Response, error) {
  7429  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7430  }
  7431  
  7432  // UpdateClosedListResponder handles the response to the UpdateClosedList request. The method always
  7433  // closes the http.Response Body.
  7434  func (client ModelClient) UpdateClosedListResponder(resp *http.Response) (result OperationStatus, err error) {
  7435  	err = autorest.Respond(
  7436  		resp,
  7437  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  7438  		autorest.ByUnmarshallingJSON(&result),
  7439  		autorest.ByClosing())
  7440  	result.Response = autorest.Response{Response: resp}
  7441  	return
  7442  }
  7443  
  7444  // UpdateClosedListEntityRole sends the update closed list entity role request.
  7445  // Parameters:
  7446  // appID - the application ID.
  7447  // versionID - the version ID.
  7448  // entityID - the entity ID.
  7449  // roleID - the entity role ID.
  7450  // entityRoleUpdateObject - the new entity role.
  7451  func (client ModelClient) UpdateClosedListEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
  7452  	if tracing.IsEnabled() {
  7453  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateClosedListEntityRole")
  7454  		defer func() {
  7455  			sc := -1
  7456  			if result.Response.Response != nil {
  7457  				sc = result.Response.Response.StatusCode
  7458  			}
  7459  			tracing.EndSpan(ctx, sc, err)
  7460  		}()
  7461  	}
  7462  	req, err := client.UpdateClosedListEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
  7463  	if err != nil {
  7464  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateClosedListEntityRole", nil, "Failure preparing request")
  7465  		return
  7466  	}
  7467  
  7468  	resp, err := client.UpdateClosedListEntityRoleSender(req)
  7469  	if err != nil {
  7470  		result.Response = autorest.Response{Response: resp}
  7471  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateClosedListEntityRole", resp, "Failure sending request")
  7472  		return
  7473  	}
  7474  
  7475  	result, err = client.UpdateClosedListEntityRoleResponder(resp)
  7476  	if err != nil {
  7477  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateClosedListEntityRole", resp, "Failure responding to request")
  7478  		return
  7479  	}
  7480  
  7481  	return
  7482  }
  7483  
  7484  // UpdateClosedListEntityRolePreparer prepares the UpdateClosedListEntityRole request.
  7485  func (client ModelClient) UpdateClosedListEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
  7486  	urlParameters := map[string]interface{}{
  7487  		"Endpoint": client.Endpoint,
  7488  	}
  7489  
  7490  	pathParameters := map[string]interface{}{
  7491  		"appId":     autorest.Encode("path", appID),
  7492  		"entityId":  autorest.Encode("path", entityID),
  7493  		"roleId":    autorest.Encode("path", roleID),
  7494  		"versionId": autorest.Encode("path", versionID),
  7495  	}
  7496  
  7497  	preparer := autorest.CreatePreparer(
  7498  		autorest.AsContentType("application/json; charset=utf-8"),
  7499  		autorest.AsPut(),
  7500  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  7501  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", pathParameters),
  7502  		autorest.WithJSON(entityRoleUpdateObject))
  7503  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  7504  }
  7505  
  7506  // UpdateClosedListEntityRoleSender sends the UpdateClosedListEntityRole request. The method will close the
  7507  // http.Response Body if it receives an error.
  7508  func (client ModelClient) UpdateClosedListEntityRoleSender(req *http.Request) (*http.Response, error) {
  7509  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7510  }
  7511  
  7512  // UpdateClosedListEntityRoleResponder handles the response to the UpdateClosedListEntityRole request. The method always
  7513  // closes the http.Response Body.
  7514  func (client ModelClient) UpdateClosedListEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  7515  	err = autorest.Respond(
  7516  		resp,
  7517  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  7518  		autorest.ByUnmarshallingJSON(&result),
  7519  		autorest.ByClosing())
  7520  	result.Response = autorest.Response{Response: resp}
  7521  	return
  7522  }
  7523  
  7524  // UpdateCompositeEntity updates a composite entity in a version of the application.
  7525  // Parameters:
  7526  // appID - the application ID.
  7527  // versionID - the version ID.
  7528  // cEntityID - the composite entity extractor ID.
  7529  // compositeModelUpdateObject - a model object containing the new entity extractor name and children.
  7530  func (client ModelClient) UpdateCompositeEntity(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeModelUpdateObject CompositeEntityModel) (result OperationStatus, err error) {
  7531  	if tracing.IsEnabled() {
  7532  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateCompositeEntity")
  7533  		defer func() {
  7534  			sc := -1
  7535  			if result.Response.Response != nil {
  7536  				sc = result.Response.Response.StatusCode
  7537  			}
  7538  			tracing.EndSpan(ctx, sc, err)
  7539  		}()
  7540  	}
  7541  	req, err := client.UpdateCompositeEntityPreparer(ctx, appID, versionID, cEntityID, compositeModelUpdateObject)
  7542  	if err != nil {
  7543  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCompositeEntity", nil, "Failure preparing request")
  7544  		return
  7545  	}
  7546  
  7547  	resp, err := client.UpdateCompositeEntitySender(req)
  7548  	if err != nil {
  7549  		result.Response = autorest.Response{Response: resp}
  7550  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCompositeEntity", resp, "Failure sending request")
  7551  		return
  7552  	}
  7553  
  7554  	result, err = client.UpdateCompositeEntityResponder(resp)
  7555  	if err != nil {
  7556  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCompositeEntity", resp, "Failure responding to request")
  7557  		return
  7558  	}
  7559  
  7560  	return
  7561  }
  7562  
  7563  // UpdateCompositeEntityPreparer prepares the UpdateCompositeEntity request.
  7564  func (client ModelClient) UpdateCompositeEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, compositeModelUpdateObject CompositeEntityModel) (*http.Request, error) {
  7565  	urlParameters := map[string]interface{}{
  7566  		"Endpoint": client.Endpoint,
  7567  	}
  7568  
  7569  	pathParameters := map[string]interface{}{
  7570  		"appId":     autorest.Encode("path", appID),
  7571  		"cEntityId": autorest.Encode("path", cEntityID),
  7572  		"versionId": autorest.Encode("path", versionID),
  7573  	}
  7574  
  7575  	preparer := autorest.CreatePreparer(
  7576  		autorest.AsContentType("application/json; charset=utf-8"),
  7577  		autorest.AsPut(),
  7578  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  7579  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", pathParameters),
  7580  		autorest.WithJSON(compositeModelUpdateObject))
  7581  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  7582  }
  7583  
  7584  // UpdateCompositeEntitySender sends the UpdateCompositeEntity request. The method will close the
  7585  // http.Response Body if it receives an error.
  7586  func (client ModelClient) UpdateCompositeEntitySender(req *http.Request) (*http.Response, error) {
  7587  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7588  }
  7589  
  7590  // UpdateCompositeEntityResponder handles the response to the UpdateCompositeEntity request. The method always
  7591  // closes the http.Response Body.
  7592  func (client ModelClient) UpdateCompositeEntityResponder(resp *http.Response) (result OperationStatus, err error) {
  7593  	err = autorest.Respond(
  7594  		resp,
  7595  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  7596  		autorest.ByUnmarshallingJSON(&result),
  7597  		autorest.ByClosing())
  7598  	result.Response = autorest.Response{Response: resp}
  7599  	return
  7600  }
  7601  
  7602  // UpdateCompositeEntityRole sends the update composite entity role request.
  7603  // Parameters:
  7604  // appID - the application ID.
  7605  // versionID - the version ID.
  7606  // cEntityID - the composite entity extractor ID.
  7607  // roleID - the entity role ID.
  7608  // entityRoleUpdateObject - the new entity role.
  7609  func (client ModelClient) UpdateCompositeEntityRole(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
  7610  	if tracing.IsEnabled() {
  7611  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateCompositeEntityRole")
  7612  		defer func() {
  7613  			sc := -1
  7614  			if result.Response.Response != nil {
  7615  				sc = result.Response.Response.StatusCode
  7616  			}
  7617  			tracing.EndSpan(ctx, sc, err)
  7618  		}()
  7619  	}
  7620  	req, err := client.UpdateCompositeEntityRolePreparer(ctx, appID, versionID, cEntityID, roleID, entityRoleUpdateObject)
  7621  	if err != nil {
  7622  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCompositeEntityRole", nil, "Failure preparing request")
  7623  		return
  7624  	}
  7625  
  7626  	resp, err := client.UpdateCompositeEntityRoleSender(req)
  7627  	if err != nil {
  7628  		result.Response = autorest.Response{Response: resp}
  7629  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCompositeEntityRole", resp, "Failure sending request")
  7630  		return
  7631  	}
  7632  
  7633  	result, err = client.UpdateCompositeEntityRoleResponder(resp)
  7634  	if err != nil {
  7635  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCompositeEntityRole", resp, "Failure responding to request")
  7636  		return
  7637  	}
  7638  
  7639  	return
  7640  }
  7641  
  7642  // UpdateCompositeEntityRolePreparer prepares the UpdateCompositeEntityRole request.
  7643  func (client ModelClient) UpdateCompositeEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, cEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
  7644  	urlParameters := map[string]interface{}{
  7645  		"Endpoint": client.Endpoint,
  7646  	}
  7647  
  7648  	pathParameters := map[string]interface{}{
  7649  		"appId":     autorest.Encode("path", appID),
  7650  		"cEntityId": autorest.Encode("path", cEntityID),
  7651  		"roleId":    autorest.Encode("path", roleID),
  7652  		"versionId": autorest.Encode("path", versionID),
  7653  	}
  7654  
  7655  	preparer := autorest.CreatePreparer(
  7656  		autorest.AsContentType("application/json; charset=utf-8"),
  7657  		autorest.AsPut(),
  7658  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  7659  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", pathParameters),
  7660  		autorest.WithJSON(entityRoleUpdateObject))
  7661  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  7662  }
  7663  
  7664  // UpdateCompositeEntityRoleSender sends the UpdateCompositeEntityRole request. The method will close the
  7665  // http.Response Body if it receives an error.
  7666  func (client ModelClient) UpdateCompositeEntityRoleSender(req *http.Request) (*http.Response, error) {
  7667  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7668  }
  7669  
  7670  // UpdateCompositeEntityRoleResponder handles the response to the UpdateCompositeEntityRole request. The method always
  7671  // closes the http.Response Body.
  7672  func (client ModelClient) UpdateCompositeEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  7673  	err = autorest.Respond(
  7674  		resp,
  7675  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  7676  		autorest.ByUnmarshallingJSON(&result),
  7677  		autorest.ByClosing())
  7678  	result.Response = autorest.Response{Response: resp}
  7679  	return
  7680  }
  7681  
  7682  // UpdateCustomPrebuiltEntityRole sends the update custom prebuilt entity role request.
  7683  // Parameters:
  7684  // appID - the application ID.
  7685  // versionID - the version ID.
  7686  // entityID - the entity ID.
  7687  // roleID - the entity role ID.
  7688  // entityRoleUpdateObject - the new entity role.
  7689  func (client ModelClient) UpdateCustomPrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
  7690  	if tracing.IsEnabled() {
  7691  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateCustomPrebuiltEntityRole")
  7692  		defer func() {
  7693  			sc := -1
  7694  			if result.Response.Response != nil {
  7695  				sc = result.Response.Response.StatusCode
  7696  			}
  7697  			tracing.EndSpan(ctx, sc, err)
  7698  		}()
  7699  	}
  7700  	req, err := client.UpdateCustomPrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
  7701  	if err != nil {
  7702  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCustomPrebuiltEntityRole", nil, "Failure preparing request")
  7703  		return
  7704  	}
  7705  
  7706  	resp, err := client.UpdateCustomPrebuiltEntityRoleSender(req)
  7707  	if err != nil {
  7708  		result.Response = autorest.Response{Response: resp}
  7709  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCustomPrebuiltEntityRole", resp, "Failure sending request")
  7710  		return
  7711  	}
  7712  
  7713  	result, err = client.UpdateCustomPrebuiltEntityRoleResponder(resp)
  7714  	if err != nil {
  7715  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateCustomPrebuiltEntityRole", resp, "Failure responding to request")
  7716  		return
  7717  	}
  7718  
  7719  	return
  7720  }
  7721  
  7722  // UpdateCustomPrebuiltEntityRolePreparer prepares the UpdateCustomPrebuiltEntityRole request.
  7723  func (client ModelClient) UpdateCustomPrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
  7724  	urlParameters := map[string]interface{}{
  7725  		"Endpoint": client.Endpoint,
  7726  	}
  7727  
  7728  	pathParameters := map[string]interface{}{
  7729  		"appId":     autorest.Encode("path", appID),
  7730  		"entityId":  autorest.Encode("path", entityID),
  7731  		"roleId":    autorest.Encode("path", roleID),
  7732  		"versionId": autorest.Encode("path", versionID),
  7733  	}
  7734  
  7735  	preparer := autorest.CreatePreparer(
  7736  		autorest.AsContentType("application/json; charset=utf-8"),
  7737  		autorest.AsPut(),
  7738  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  7739  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", pathParameters),
  7740  		autorest.WithJSON(entityRoleUpdateObject))
  7741  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  7742  }
  7743  
  7744  // UpdateCustomPrebuiltEntityRoleSender sends the UpdateCustomPrebuiltEntityRole request. The method will close the
  7745  // http.Response Body if it receives an error.
  7746  func (client ModelClient) UpdateCustomPrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
  7747  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7748  }
  7749  
  7750  // UpdateCustomPrebuiltEntityRoleResponder handles the response to the UpdateCustomPrebuiltEntityRole request. The method always
  7751  // closes the http.Response Body.
  7752  func (client ModelClient) UpdateCustomPrebuiltEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  7753  	err = autorest.Respond(
  7754  		resp,
  7755  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  7756  		autorest.ByUnmarshallingJSON(&result),
  7757  		autorest.ByClosing())
  7758  	result.Response = autorest.Response{Response: resp}
  7759  	return
  7760  }
  7761  
  7762  // UpdateEntityChild updates the name of an entity extractor or the name and instanceOf model of a child entity
  7763  // extractor.
  7764  // Parameters:
  7765  // appID - the application ID.
  7766  // versionID - the version ID.
  7767  // entityID - the entity extractor or the child entity extractor ID.
  7768  // entityModelUpdateObject - a model object containing the name new entity extractor or the name and instance
  7769  // of model of a child entity extractor
  7770  func (client ModelClient) UpdateEntityChild(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityModelUpdateObject EntityModelUpdateObject) (result OperationStatus, err error) {
  7771  	if tracing.IsEnabled() {
  7772  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateEntityChild")
  7773  		defer func() {
  7774  			sc := -1
  7775  			if result.Response.Response != nil {
  7776  				sc = result.Response.Response.StatusCode
  7777  			}
  7778  			tracing.EndSpan(ctx, sc, err)
  7779  		}()
  7780  	}
  7781  	req, err := client.UpdateEntityChildPreparer(ctx, appID, versionID, entityID, entityModelUpdateObject)
  7782  	if err != nil {
  7783  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateEntityChild", nil, "Failure preparing request")
  7784  		return
  7785  	}
  7786  
  7787  	resp, err := client.UpdateEntityChildSender(req)
  7788  	if err != nil {
  7789  		result.Response = autorest.Response{Response: resp}
  7790  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateEntityChild", resp, "Failure sending request")
  7791  		return
  7792  	}
  7793  
  7794  	result, err = client.UpdateEntityChildResponder(resp)
  7795  	if err != nil {
  7796  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateEntityChild", resp, "Failure responding to request")
  7797  		return
  7798  	}
  7799  
  7800  	return
  7801  }
  7802  
  7803  // UpdateEntityChildPreparer prepares the UpdateEntityChild request.
  7804  func (client ModelClient) UpdateEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, entityModelUpdateObject EntityModelUpdateObject) (*http.Request, error) {
  7805  	urlParameters := map[string]interface{}{
  7806  		"Endpoint": client.Endpoint,
  7807  	}
  7808  
  7809  	pathParameters := map[string]interface{}{
  7810  		"appId":     autorest.Encode("path", appID),
  7811  		"entityId":  autorest.Encode("path", entityID),
  7812  		"versionId": autorest.Encode("path", versionID),
  7813  	}
  7814  
  7815  	preparer := autorest.CreatePreparer(
  7816  		autorest.AsContentType("application/json; charset=utf-8"),
  7817  		autorest.AsPatch(),
  7818  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  7819  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}", pathParameters),
  7820  		autorest.WithJSON(entityModelUpdateObject))
  7821  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  7822  }
  7823  
  7824  // UpdateEntityChildSender sends the UpdateEntityChild request. The method will close the
  7825  // http.Response Body if it receives an error.
  7826  func (client ModelClient) UpdateEntityChildSender(req *http.Request) (*http.Response, error) {
  7827  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7828  }
  7829  
  7830  // UpdateEntityChildResponder handles the response to the UpdateEntityChild request. The method always
  7831  // closes the http.Response Body.
  7832  func (client ModelClient) UpdateEntityChildResponder(resp *http.Response) (result OperationStatus, err error) {
  7833  	err = autorest.Respond(
  7834  		resp,
  7835  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  7836  		autorest.ByUnmarshallingJSON(&result),
  7837  		autorest.ByClosing())
  7838  	result.Response = autorest.Response{Response: resp}
  7839  	return
  7840  }
  7841  
  7842  // UpdateEntityRole sends the update entity role request.
  7843  // Parameters:
  7844  // appID - the application ID.
  7845  // versionID - the version ID.
  7846  // entityID - the entity ID.
  7847  // roleID - the entity role ID.
  7848  // entityRoleUpdateObject - the new entity role.
  7849  func (client ModelClient) UpdateEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
  7850  	if tracing.IsEnabled() {
  7851  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateEntityRole")
  7852  		defer func() {
  7853  			sc := -1
  7854  			if result.Response.Response != nil {
  7855  				sc = result.Response.Response.StatusCode
  7856  			}
  7857  			tracing.EndSpan(ctx, sc, err)
  7858  		}()
  7859  	}
  7860  	req, err := client.UpdateEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
  7861  	if err != nil {
  7862  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateEntityRole", nil, "Failure preparing request")
  7863  		return
  7864  	}
  7865  
  7866  	resp, err := client.UpdateEntityRoleSender(req)
  7867  	if err != nil {
  7868  		result.Response = autorest.Response{Response: resp}
  7869  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateEntityRole", resp, "Failure sending request")
  7870  		return
  7871  	}
  7872  
  7873  	result, err = client.UpdateEntityRoleResponder(resp)
  7874  	if err != nil {
  7875  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateEntityRole", resp, "Failure responding to request")
  7876  		return
  7877  	}
  7878  
  7879  	return
  7880  }
  7881  
  7882  // UpdateEntityRolePreparer prepares the UpdateEntityRole request.
  7883  func (client ModelClient) UpdateEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
  7884  	urlParameters := map[string]interface{}{
  7885  		"Endpoint": client.Endpoint,
  7886  	}
  7887  
  7888  	pathParameters := map[string]interface{}{
  7889  		"appId":     autorest.Encode("path", appID),
  7890  		"entityId":  autorest.Encode("path", entityID),
  7891  		"roleId":    autorest.Encode("path", roleID),
  7892  		"versionId": autorest.Encode("path", versionID),
  7893  	}
  7894  
  7895  	preparer := autorest.CreatePreparer(
  7896  		autorest.AsContentType("application/json; charset=utf-8"),
  7897  		autorest.AsPut(),
  7898  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  7899  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", pathParameters),
  7900  		autorest.WithJSON(entityRoleUpdateObject))
  7901  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  7902  }
  7903  
  7904  // UpdateEntityRoleSender sends the UpdateEntityRole request. The method will close the
  7905  // http.Response Body if it receives an error.
  7906  func (client ModelClient) UpdateEntityRoleSender(req *http.Request) (*http.Response, error) {
  7907  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7908  }
  7909  
  7910  // UpdateEntityRoleResponder handles the response to the UpdateEntityRole request. The method always
  7911  // closes the http.Response Body.
  7912  func (client ModelClient) UpdateEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  7913  	err = autorest.Respond(
  7914  		resp,
  7915  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  7916  		autorest.ByUnmarshallingJSON(&result),
  7917  		autorest.ByClosing())
  7918  	result.Response = autorest.Response{Response: resp}
  7919  	return
  7920  }
  7921  
  7922  // UpdateExplicitListItem sends the update explicit list item request.
  7923  // Parameters:
  7924  // appID - the application ID.
  7925  // versionID - the version ID.
  7926  // entityID - the Pattern.Any entity extractor ID.
  7927  // itemID - the explicit list item ID.
  7928  // item - the new explicit list item.
  7929  func (client ModelClient) UpdateExplicitListItem(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64, item ExplicitListItemUpdateObject) (result OperationStatus, err error) {
  7930  	if tracing.IsEnabled() {
  7931  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateExplicitListItem")
  7932  		defer func() {
  7933  			sc := -1
  7934  			if result.Response.Response != nil {
  7935  				sc = result.Response.Response.StatusCode
  7936  			}
  7937  			tracing.EndSpan(ctx, sc, err)
  7938  		}()
  7939  	}
  7940  	req, err := client.UpdateExplicitListItemPreparer(ctx, appID, versionID, entityID, itemID, item)
  7941  	if err != nil {
  7942  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateExplicitListItem", nil, "Failure preparing request")
  7943  		return
  7944  	}
  7945  
  7946  	resp, err := client.UpdateExplicitListItemSender(req)
  7947  	if err != nil {
  7948  		result.Response = autorest.Response{Response: resp}
  7949  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateExplicitListItem", resp, "Failure sending request")
  7950  		return
  7951  	}
  7952  
  7953  	result, err = client.UpdateExplicitListItemResponder(resp)
  7954  	if err != nil {
  7955  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateExplicitListItem", resp, "Failure responding to request")
  7956  		return
  7957  	}
  7958  
  7959  	return
  7960  }
  7961  
  7962  // UpdateExplicitListItemPreparer prepares the UpdateExplicitListItem request.
  7963  func (client ModelClient) UpdateExplicitListItemPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, itemID int64, item ExplicitListItemUpdateObject) (*http.Request, error) {
  7964  	urlParameters := map[string]interface{}{
  7965  		"Endpoint": client.Endpoint,
  7966  	}
  7967  
  7968  	pathParameters := map[string]interface{}{
  7969  		"appId":     autorest.Encode("path", appID),
  7970  		"entityId":  autorest.Encode("path", entityID),
  7971  		"itemId":    autorest.Encode("path", itemID),
  7972  		"versionId": autorest.Encode("path", versionID),
  7973  	}
  7974  
  7975  	preparer := autorest.CreatePreparer(
  7976  		autorest.AsContentType("application/json; charset=utf-8"),
  7977  		autorest.AsPut(),
  7978  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  7979  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", pathParameters),
  7980  		autorest.WithJSON(item))
  7981  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  7982  }
  7983  
  7984  // UpdateExplicitListItemSender sends the UpdateExplicitListItem request. The method will close the
  7985  // http.Response Body if it receives an error.
  7986  func (client ModelClient) UpdateExplicitListItemSender(req *http.Request) (*http.Response, error) {
  7987  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  7988  }
  7989  
  7990  // UpdateExplicitListItemResponder handles the response to the UpdateExplicitListItem request. The method always
  7991  // closes the http.Response Body.
  7992  func (client ModelClient) UpdateExplicitListItemResponder(resp *http.Response) (result OperationStatus, err error) {
  7993  	err = autorest.Respond(
  7994  		resp,
  7995  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  7996  		autorest.ByUnmarshallingJSON(&result),
  7997  		autorest.ByClosing())
  7998  	result.Response = autorest.Response{Response: resp}
  7999  	return
  8000  }
  8001  
  8002  // UpdateHierarchicalEntity updates the name of a hierarchical entity model in a version of the application.
  8003  // Parameters:
  8004  // appID - the application ID.
  8005  // versionID - the version ID.
  8006  // hEntityID - the hierarchical entity extractor ID.
  8007  // modelUpdateObject - model containing names of the hierarchical entity.
  8008  func (client ModelClient) UpdateHierarchicalEntity(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, modelUpdateObject ModelUpdateObject) (result OperationStatus, err error) {
  8009  	if tracing.IsEnabled() {
  8010  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateHierarchicalEntity")
  8011  		defer func() {
  8012  			sc := -1
  8013  			if result.Response.Response != nil {
  8014  				sc = result.Response.Response.StatusCode
  8015  			}
  8016  			tracing.EndSpan(ctx, sc, err)
  8017  		}()
  8018  	}
  8019  	req, err := client.UpdateHierarchicalEntityPreparer(ctx, appID, versionID, hEntityID, modelUpdateObject)
  8020  	if err != nil {
  8021  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntity", nil, "Failure preparing request")
  8022  		return
  8023  	}
  8024  
  8025  	resp, err := client.UpdateHierarchicalEntitySender(req)
  8026  	if err != nil {
  8027  		result.Response = autorest.Response{Response: resp}
  8028  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntity", resp, "Failure sending request")
  8029  		return
  8030  	}
  8031  
  8032  	result, err = client.UpdateHierarchicalEntityResponder(resp)
  8033  	if err != nil {
  8034  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntity", resp, "Failure responding to request")
  8035  		return
  8036  	}
  8037  
  8038  	return
  8039  }
  8040  
  8041  // UpdateHierarchicalEntityPreparer prepares the UpdateHierarchicalEntity request.
  8042  func (client ModelClient) UpdateHierarchicalEntityPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, modelUpdateObject ModelUpdateObject) (*http.Request, error) {
  8043  	urlParameters := map[string]interface{}{
  8044  		"Endpoint": client.Endpoint,
  8045  	}
  8046  
  8047  	pathParameters := map[string]interface{}{
  8048  		"appId":     autorest.Encode("path", appID),
  8049  		"hEntityId": autorest.Encode("path", hEntityID),
  8050  		"versionId": autorest.Encode("path", versionID),
  8051  	}
  8052  
  8053  	preparer := autorest.CreatePreparer(
  8054  		autorest.AsContentType("application/json; charset=utf-8"),
  8055  		autorest.AsPatch(),
  8056  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  8057  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", pathParameters),
  8058  		autorest.WithJSON(modelUpdateObject))
  8059  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  8060  }
  8061  
  8062  // UpdateHierarchicalEntitySender sends the UpdateHierarchicalEntity request. The method will close the
  8063  // http.Response Body if it receives an error.
  8064  func (client ModelClient) UpdateHierarchicalEntitySender(req *http.Request) (*http.Response, error) {
  8065  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8066  }
  8067  
  8068  // UpdateHierarchicalEntityResponder handles the response to the UpdateHierarchicalEntity request. The method always
  8069  // closes the http.Response Body.
  8070  func (client ModelClient) UpdateHierarchicalEntityResponder(resp *http.Response) (result OperationStatus, err error) {
  8071  	err = autorest.Respond(
  8072  		resp,
  8073  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  8074  		autorest.ByUnmarshallingJSON(&result),
  8075  		autorest.ByClosing())
  8076  	result.Response = autorest.Response{Response: resp}
  8077  	return
  8078  }
  8079  
  8080  // UpdateHierarchicalEntityChild renames a single child in an existing hierarchical entity model in a version of the
  8081  // application.
  8082  // Parameters:
  8083  // appID - the application ID.
  8084  // versionID - the version ID.
  8085  // hEntityID - the hierarchical entity extractor ID.
  8086  // hChildID - the hierarchical entity extractor child ID.
  8087  // hierarchicalChildModelUpdateObject - model object containing new name of the hierarchical entity child.
  8088  func (client ModelClient) UpdateHierarchicalEntityChild(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID, hierarchicalChildModelUpdateObject HierarchicalChildModelUpdateObject) (result OperationStatus, err error) {
  8089  	if tracing.IsEnabled() {
  8090  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateHierarchicalEntityChild")
  8091  		defer func() {
  8092  			sc := -1
  8093  			if result.Response.Response != nil {
  8094  				sc = result.Response.Response.StatusCode
  8095  			}
  8096  			tracing.EndSpan(ctx, sc, err)
  8097  		}()
  8098  	}
  8099  	req, err := client.UpdateHierarchicalEntityChildPreparer(ctx, appID, versionID, hEntityID, hChildID, hierarchicalChildModelUpdateObject)
  8100  	if err != nil {
  8101  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntityChild", nil, "Failure preparing request")
  8102  		return
  8103  	}
  8104  
  8105  	resp, err := client.UpdateHierarchicalEntityChildSender(req)
  8106  	if err != nil {
  8107  		result.Response = autorest.Response{Response: resp}
  8108  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntityChild", resp, "Failure sending request")
  8109  		return
  8110  	}
  8111  
  8112  	result, err = client.UpdateHierarchicalEntityChildResponder(resp)
  8113  	if err != nil {
  8114  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntityChild", resp, "Failure responding to request")
  8115  		return
  8116  	}
  8117  
  8118  	return
  8119  }
  8120  
  8121  // UpdateHierarchicalEntityChildPreparer prepares the UpdateHierarchicalEntityChild request.
  8122  func (client ModelClient) UpdateHierarchicalEntityChildPreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, hChildID uuid.UUID, hierarchicalChildModelUpdateObject HierarchicalChildModelUpdateObject) (*http.Request, error) {
  8123  	urlParameters := map[string]interface{}{
  8124  		"Endpoint": client.Endpoint,
  8125  	}
  8126  
  8127  	pathParameters := map[string]interface{}{
  8128  		"appId":     autorest.Encode("path", appID),
  8129  		"hChildId":  autorest.Encode("path", hChildID),
  8130  		"hEntityId": autorest.Encode("path", hEntityID),
  8131  		"versionId": autorest.Encode("path", versionID),
  8132  	}
  8133  
  8134  	preparer := autorest.CreatePreparer(
  8135  		autorest.AsContentType("application/json; charset=utf-8"),
  8136  		autorest.AsPatch(),
  8137  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  8138  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", pathParameters),
  8139  		autorest.WithJSON(hierarchicalChildModelUpdateObject))
  8140  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  8141  }
  8142  
  8143  // UpdateHierarchicalEntityChildSender sends the UpdateHierarchicalEntityChild request. The method will close the
  8144  // http.Response Body if it receives an error.
  8145  func (client ModelClient) UpdateHierarchicalEntityChildSender(req *http.Request) (*http.Response, error) {
  8146  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8147  }
  8148  
  8149  // UpdateHierarchicalEntityChildResponder handles the response to the UpdateHierarchicalEntityChild request. The method always
  8150  // closes the http.Response Body.
  8151  func (client ModelClient) UpdateHierarchicalEntityChildResponder(resp *http.Response) (result OperationStatus, err error) {
  8152  	err = autorest.Respond(
  8153  		resp,
  8154  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  8155  		autorest.ByUnmarshallingJSON(&result),
  8156  		autorest.ByClosing())
  8157  	result.Response = autorest.Response{Response: resp}
  8158  	return
  8159  }
  8160  
  8161  // UpdateHierarchicalEntityRole sends the update hierarchical entity role request.
  8162  // Parameters:
  8163  // appID - the application ID.
  8164  // versionID - the version ID.
  8165  // hEntityID - the hierarchical entity extractor ID.
  8166  // roleID - the entity role ID.
  8167  // entityRoleUpdateObject - the new entity role.
  8168  func (client ModelClient) UpdateHierarchicalEntityRole(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
  8169  	if tracing.IsEnabled() {
  8170  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateHierarchicalEntityRole")
  8171  		defer func() {
  8172  			sc := -1
  8173  			if result.Response.Response != nil {
  8174  				sc = result.Response.Response.StatusCode
  8175  			}
  8176  			tracing.EndSpan(ctx, sc, err)
  8177  		}()
  8178  	}
  8179  	req, err := client.UpdateHierarchicalEntityRolePreparer(ctx, appID, versionID, hEntityID, roleID, entityRoleUpdateObject)
  8180  	if err != nil {
  8181  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntityRole", nil, "Failure preparing request")
  8182  		return
  8183  	}
  8184  
  8185  	resp, err := client.UpdateHierarchicalEntityRoleSender(req)
  8186  	if err != nil {
  8187  		result.Response = autorest.Response{Response: resp}
  8188  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntityRole", resp, "Failure sending request")
  8189  		return
  8190  	}
  8191  
  8192  	result, err = client.UpdateHierarchicalEntityRoleResponder(resp)
  8193  	if err != nil {
  8194  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateHierarchicalEntityRole", resp, "Failure responding to request")
  8195  		return
  8196  	}
  8197  
  8198  	return
  8199  }
  8200  
  8201  // UpdateHierarchicalEntityRolePreparer prepares the UpdateHierarchicalEntityRole request.
  8202  func (client ModelClient) UpdateHierarchicalEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, hEntityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
  8203  	urlParameters := map[string]interface{}{
  8204  		"Endpoint": client.Endpoint,
  8205  	}
  8206  
  8207  	pathParameters := map[string]interface{}{
  8208  		"appId":     autorest.Encode("path", appID),
  8209  		"hEntityId": autorest.Encode("path", hEntityID),
  8210  		"roleId":    autorest.Encode("path", roleID),
  8211  		"versionId": autorest.Encode("path", versionID),
  8212  	}
  8213  
  8214  	preparer := autorest.CreatePreparer(
  8215  		autorest.AsContentType("application/json; charset=utf-8"),
  8216  		autorest.AsPut(),
  8217  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  8218  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", pathParameters),
  8219  		autorest.WithJSON(entityRoleUpdateObject))
  8220  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  8221  }
  8222  
  8223  // UpdateHierarchicalEntityRoleSender sends the UpdateHierarchicalEntityRole request. The method will close the
  8224  // http.Response Body if it receives an error.
  8225  func (client ModelClient) UpdateHierarchicalEntityRoleSender(req *http.Request) (*http.Response, error) {
  8226  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8227  }
  8228  
  8229  // UpdateHierarchicalEntityRoleResponder handles the response to the UpdateHierarchicalEntityRole request. The method always
  8230  // closes the http.Response Body.
  8231  func (client ModelClient) UpdateHierarchicalEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  8232  	err = autorest.Respond(
  8233  		resp,
  8234  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  8235  		autorest.ByUnmarshallingJSON(&result),
  8236  		autorest.ByClosing())
  8237  	result.Response = autorest.Response{Response: resp}
  8238  	return
  8239  }
  8240  
  8241  // UpdateIntent updates the name of an intent in a version of the application.
  8242  // Parameters:
  8243  // appID - the application ID.
  8244  // versionID - the version ID.
  8245  // intentID - the intent classifier ID.
  8246  // modelUpdateObject - a model object containing the new intent name.
  8247  func (client ModelClient) UpdateIntent(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, modelUpdateObject ModelUpdateObject) (result OperationStatus, err error) {
  8248  	if tracing.IsEnabled() {
  8249  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateIntent")
  8250  		defer func() {
  8251  			sc := -1
  8252  			if result.Response.Response != nil {
  8253  				sc = result.Response.Response.StatusCode
  8254  			}
  8255  			tracing.EndSpan(ctx, sc, err)
  8256  		}()
  8257  	}
  8258  	req, err := client.UpdateIntentPreparer(ctx, appID, versionID, intentID, modelUpdateObject)
  8259  	if err != nil {
  8260  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateIntent", nil, "Failure preparing request")
  8261  		return
  8262  	}
  8263  
  8264  	resp, err := client.UpdateIntentSender(req)
  8265  	if err != nil {
  8266  		result.Response = autorest.Response{Response: resp}
  8267  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateIntent", resp, "Failure sending request")
  8268  		return
  8269  	}
  8270  
  8271  	result, err = client.UpdateIntentResponder(resp)
  8272  	if err != nil {
  8273  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateIntent", resp, "Failure responding to request")
  8274  		return
  8275  	}
  8276  
  8277  	return
  8278  }
  8279  
  8280  // UpdateIntentPreparer prepares the UpdateIntent request.
  8281  func (client ModelClient) UpdateIntentPreparer(ctx context.Context, appID uuid.UUID, versionID string, intentID uuid.UUID, modelUpdateObject ModelUpdateObject) (*http.Request, error) {
  8282  	urlParameters := map[string]interface{}{
  8283  		"Endpoint": client.Endpoint,
  8284  	}
  8285  
  8286  	pathParameters := map[string]interface{}{
  8287  		"appId":     autorest.Encode("path", appID),
  8288  		"intentId":  autorest.Encode("path", intentID),
  8289  		"versionId": autorest.Encode("path", versionID),
  8290  	}
  8291  
  8292  	preparer := autorest.CreatePreparer(
  8293  		autorest.AsContentType("application/json; charset=utf-8"),
  8294  		autorest.AsPut(),
  8295  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  8296  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/intents/{intentId}", pathParameters),
  8297  		autorest.WithJSON(modelUpdateObject))
  8298  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  8299  }
  8300  
  8301  // UpdateIntentSender sends the UpdateIntent request. The method will close the
  8302  // http.Response Body if it receives an error.
  8303  func (client ModelClient) UpdateIntentSender(req *http.Request) (*http.Response, error) {
  8304  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8305  }
  8306  
  8307  // UpdateIntentResponder handles the response to the UpdateIntent request. The method always
  8308  // closes the http.Response Body.
  8309  func (client ModelClient) UpdateIntentResponder(resp *http.Response) (result OperationStatus, err error) {
  8310  	err = autorest.Respond(
  8311  		resp,
  8312  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  8313  		autorest.ByUnmarshallingJSON(&result),
  8314  		autorest.ByClosing())
  8315  	result.Response = autorest.Response{Response: resp}
  8316  	return
  8317  }
  8318  
  8319  // UpdatePatternAnyEntityModel sends the update pattern any entity model request.
  8320  // Parameters:
  8321  // appID - the application ID.
  8322  // versionID - the version ID.
  8323  // entityID - the Pattern.Any entity extractor ID.
  8324  // patternAnyUpdateObject - an object containing the explicit list of the Pattern.Any entity.
  8325  func (client ModelClient) UpdatePatternAnyEntityModel(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, patternAnyUpdateObject PatternAnyModelUpdateObject) (result OperationStatus, err error) {
  8326  	if tracing.IsEnabled() {
  8327  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdatePatternAnyEntityModel")
  8328  		defer func() {
  8329  			sc := -1
  8330  			if result.Response.Response != nil {
  8331  				sc = result.Response.Response.StatusCode
  8332  			}
  8333  			tracing.EndSpan(ctx, sc, err)
  8334  		}()
  8335  	}
  8336  	req, err := client.UpdatePatternAnyEntityModelPreparer(ctx, appID, versionID, entityID, patternAnyUpdateObject)
  8337  	if err != nil {
  8338  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePatternAnyEntityModel", nil, "Failure preparing request")
  8339  		return
  8340  	}
  8341  
  8342  	resp, err := client.UpdatePatternAnyEntityModelSender(req)
  8343  	if err != nil {
  8344  		result.Response = autorest.Response{Response: resp}
  8345  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePatternAnyEntityModel", resp, "Failure sending request")
  8346  		return
  8347  	}
  8348  
  8349  	result, err = client.UpdatePatternAnyEntityModelResponder(resp)
  8350  	if err != nil {
  8351  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePatternAnyEntityModel", resp, "Failure responding to request")
  8352  		return
  8353  	}
  8354  
  8355  	return
  8356  }
  8357  
  8358  // UpdatePatternAnyEntityModelPreparer prepares the UpdatePatternAnyEntityModel request.
  8359  func (client ModelClient) UpdatePatternAnyEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, patternAnyUpdateObject PatternAnyModelUpdateObject) (*http.Request, error) {
  8360  	urlParameters := map[string]interface{}{
  8361  		"Endpoint": client.Endpoint,
  8362  	}
  8363  
  8364  	pathParameters := map[string]interface{}{
  8365  		"appId":     autorest.Encode("path", appID),
  8366  		"entityId":  autorest.Encode("path", entityID),
  8367  		"versionId": autorest.Encode("path", versionID),
  8368  	}
  8369  
  8370  	preparer := autorest.CreatePreparer(
  8371  		autorest.AsContentType("application/json; charset=utf-8"),
  8372  		autorest.AsPut(),
  8373  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  8374  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", pathParameters),
  8375  		autorest.WithJSON(patternAnyUpdateObject))
  8376  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  8377  }
  8378  
  8379  // UpdatePatternAnyEntityModelSender sends the UpdatePatternAnyEntityModel request. The method will close the
  8380  // http.Response Body if it receives an error.
  8381  func (client ModelClient) UpdatePatternAnyEntityModelSender(req *http.Request) (*http.Response, error) {
  8382  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8383  }
  8384  
  8385  // UpdatePatternAnyEntityModelResponder handles the response to the UpdatePatternAnyEntityModel request. The method always
  8386  // closes the http.Response Body.
  8387  func (client ModelClient) UpdatePatternAnyEntityModelResponder(resp *http.Response) (result OperationStatus, err error) {
  8388  	err = autorest.Respond(
  8389  		resp,
  8390  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  8391  		autorest.ByUnmarshallingJSON(&result),
  8392  		autorest.ByClosing())
  8393  	result.Response = autorest.Response{Response: resp}
  8394  	return
  8395  }
  8396  
  8397  // UpdatePatternAnyEntityRole sends the update pattern any entity role request.
  8398  // Parameters:
  8399  // appID - the application ID.
  8400  // versionID - the version ID.
  8401  // entityID - the entity ID.
  8402  // roleID - the entity role ID.
  8403  // entityRoleUpdateObject - the new entity role.
  8404  func (client ModelClient) UpdatePatternAnyEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
  8405  	if tracing.IsEnabled() {
  8406  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdatePatternAnyEntityRole")
  8407  		defer func() {
  8408  			sc := -1
  8409  			if result.Response.Response != nil {
  8410  				sc = result.Response.Response.StatusCode
  8411  			}
  8412  			tracing.EndSpan(ctx, sc, err)
  8413  		}()
  8414  	}
  8415  	req, err := client.UpdatePatternAnyEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
  8416  	if err != nil {
  8417  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePatternAnyEntityRole", nil, "Failure preparing request")
  8418  		return
  8419  	}
  8420  
  8421  	resp, err := client.UpdatePatternAnyEntityRoleSender(req)
  8422  	if err != nil {
  8423  		result.Response = autorest.Response{Response: resp}
  8424  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePatternAnyEntityRole", resp, "Failure sending request")
  8425  		return
  8426  	}
  8427  
  8428  	result, err = client.UpdatePatternAnyEntityRoleResponder(resp)
  8429  	if err != nil {
  8430  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePatternAnyEntityRole", resp, "Failure responding to request")
  8431  		return
  8432  	}
  8433  
  8434  	return
  8435  }
  8436  
  8437  // UpdatePatternAnyEntityRolePreparer prepares the UpdatePatternAnyEntityRole request.
  8438  func (client ModelClient) UpdatePatternAnyEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
  8439  	urlParameters := map[string]interface{}{
  8440  		"Endpoint": client.Endpoint,
  8441  	}
  8442  
  8443  	pathParameters := map[string]interface{}{
  8444  		"appId":     autorest.Encode("path", appID),
  8445  		"entityId":  autorest.Encode("path", entityID),
  8446  		"roleId":    autorest.Encode("path", roleID),
  8447  		"versionId": autorest.Encode("path", versionID),
  8448  	}
  8449  
  8450  	preparer := autorest.CreatePreparer(
  8451  		autorest.AsContentType("application/json; charset=utf-8"),
  8452  		autorest.AsPut(),
  8453  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  8454  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", pathParameters),
  8455  		autorest.WithJSON(entityRoleUpdateObject))
  8456  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  8457  }
  8458  
  8459  // UpdatePatternAnyEntityRoleSender sends the UpdatePatternAnyEntityRole request. The method will close the
  8460  // http.Response Body if it receives an error.
  8461  func (client ModelClient) UpdatePatternAnyEntityRoleSender(req *http.Request) (*http.Response, error) {
  8462  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8463  }
  8464  
  8465  // UpdatePatternAnyEntityRoleResponder handles the response to the UpdatePatternAnyEntityRole request. The method always
  8466  // closes the http.Response Body.
  8467  func (client ModelClient) UpdatePatternAnyEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  8468  	err = autorest.Respond(
  8469  		resp,
  8470  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  8471  		autorest.ByUnmarshallingJSON(&result),
  8472  		autorest.ByClosing())
  8473  	result.Response = autorest.Response{Response: resp}
  8474  	return
  8475  }
  8476  
  8477  // UpdatePrebuiltEntityRole sends the update prebuilt entity role request.
  8478  // Parameters:
  8479  // appID - the application ID.
  8480  // versionID - the version ID.
  8481  // entityID - the entity ID.
  8482  // roleID - the entity role ID.
  8483  // entityRoleUpdateObject - the new entity role.
  8484  func (client ModelClient) UpdatePrebuiltEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
  8485  	if tracing.IsEnabled() {
  8486  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdatePrebuiltEntityRole")
  8487  		defer func() {
  8488  			sc := -1
  8489  			if result.Response.Response != nil {
  8490  				sc = result.Response.Response.StatusCode
  8491  			}
  8492  			tracing.EndSpan(ctx, sc, err)
  8493  		}()
  8494  	}
  8495  	req, err := client.UpdatePrebuiltEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
  8496  	if err != nil {
  8497  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePrebuiltEntityRole", nil, "Failure preparing request")
  8498  		return
  8499  	}
  8500  
  8501  	resp, err := client.UpdatePrebuiltEntityRoleSender(req)
  8502  	if err != nil {
  8503  		result.Response = autorest.Response{Response: resp}
  8504  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePrebuiltEntityRole", resp, "Failure sending request")
  8505  		return
  8506  	}
  8507  
  8508  	result, err = client.UpdatePrebuiltEntityRoleResponder(resp)
  8509  	if err != nil {
  8510  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdatePrebuiltEntityRole", resp, "Failure responding to request")
  8511  		return
  8512  	}
  8513  
  8514  	return
  8515  }
  8516  
  8517  // UpdatePrebuiltEntityRolePreparer prepares the UpdatePrebuiltEntityRole request.
  8518  func (client ModelClient) UpdatePrebuiltEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
  8519  	urlParameters := map[string]interface{}{
  8520  		"Endpoint": client.Endpoint,
  8521  	}
  8522  
  8523  	pathParameters := map[string]interface{}{
  8524  		"appId":     autorest.Encode("path", appID),
  8525  		"entityId":  autorest.Encode("path", entityID),
  8526  		"roleId":    autorest.Encode("path", roleID),
  8527  		"versionId": autorest.Encode("path", versionID),
  8528  	}
  8529  
  8530  	preparer := autorest.CreatePreparer(
  8531  		autorest.AsContentType("application/json; charset=utf-8"),
  8532  		autorest.AsPut(),
  8533  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  8534  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", pathParameters),
  8535  		autorest.WithJSON(entityRoleUpdateObject))
  8536  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  8537  }
  8538  
  8539  // UpdatePrebuiltEntityRoleSender sends the UpdatePrebuiltEntityRole request. The method will close the
  8540  // http.Response Body if it receives an error.
  8541  func (client ModelClient) UpdatePrebuiltEntityRoleSender(req *http.Request) (*http.Response, error) {
  8542  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8543  }
  8544  
  8545  // UpdatePrebuiltEntityRoleResponder handles the response to the UpdatePrebuiltEntityRole request. The method always
  8546  // closes the http.Response Body.
  8547  func (client ModelClient) UpdatePrebuiltEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  8548  	err = autorest.Respond(
  8549  		resp,
  8550  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  8551  		autorest.ByUnmarshallingJSON(&result),
  8552  		autorest.ByClosing())
  8553  	result.Response = autorest.Response{Response: resp}
  8554  	return
  8555  }
  8556  
  8557  // UpdateRegexEntityModel sends the update regex entity model request.
  8558  // Parameters:
  8559  // appID - the application ID.
  8560  // versionID - the version ID.
  8561  // regexEntityID - the regular expression entity extractor ID.
  8562  // regexEntityUpdateObject - an object containing the new entity name and regex pattern.
  8563  func (client ModelClient) UpdateRegexEntityModel(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID, regexEntityUpdateObject RegexModelUpdateObject) (result OperationStatus, err error) {
  8564  	if tracing.IsEnabled() {
  8565  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateRegexEntityModel")
  8566  		defer func() {
  8567  			sc := -1
  8568  			if result.Response.Response != nil {
  8569  				sc = result.Response.Response.StatusCode
  8570  			}
  8571  			tracing.EndSpan(ctx, sc, err)
  8572  		}()
  8573  	}
  8574  	req, err := client.UpdateRegexEntityModelPreparer(ctx, appID, versionID, regexEntityID, regexEntityUpdateObject)
  8575  	if err != nil {
  8576  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateRegexEntityModel", nil, "Failure preparing request")
  8577  		return
  8578  	}
  8579  
  8580  	resp, err := client.UpdateRegexEntityModelSender(req)
  8581  	if err != nil {
  8582  		result.Response = autorest.Response{Response: resp}
  8583  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateRegexEntityModel", resp, "Failure sending request")
  8584  		return
  8585  	}
  8586  
  8587  	result, err = client.UpdateRegexEntityModelResponder(resp)
  8588  	if err != nil {
  8589  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateRegexEntityModel", resp, "Failure responding to request")
  8590  		return
  8591  	}
  8592  
  8593  	return
  8594  }
  8595  
  8596  // UpdateRegexEntityModelPreparer prepares the UpdateRegexEntityModel request.
  8597  func (client ModelClient) UpdateRegexEntityModelPreparer(ctx context.Context, appID uuid.UUID, versionID string, regexEntityID uuid.UUID, regexEntityUpdateObject RegexModelUpdateObject) (*http.Request, error) {
  8598  	urlParameters := map[string]interface{}{
  8599  		"Endpoint": client.Endpoint,
  8600  	}
  8601  
  8602  	pathParameters := map[string]interface{}{
  8603  		"appId":         autorest.Encode("path", appID),
  8604  		"regexEntityId": autorest.Encode("path", regexEntityID),
  8605  		"versionId":     autorest.Encode("path", versionID),
  8606  	}
  8607  
  8608  	preparer := autorest.CreatePreparer(
  8609  		autorest.AsContentType("application/json; charset=utf-8"),
  8610  		autorest.AsPut(),
  8611  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  8612  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", pathParameters),
  8613  		autorest.WithJSON(regexEntityUpdateObject))
  8614  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  8615  }
  8616  
  8617  // UpdateRegexEntityModelSender sends the UpdateRegexEntityModel request. The method will close the
  8618  // http.Response Body if it receives an error.
  8619  func (client ModelClient) UpdateRegexEntityModelSender(req *http.Request) (*http.Response, error) {
  8620  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8621  }
  8622  
  8623  // UpdateRegexEntityModelResponder handles the response to the UpdateRegexEntityModel request. The method always
  8624  // closes the http.Response Body.
  8625  func (client ModelClient) UpdateRegexEntityModelResponder(resp *http.Response) (result OperationStatus, err error) {
  8626  	err = autorest.Respond(
  8627  		resp,
  8628  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  8629  		autorest.ByUnmarshallingJSON(&result),
  8630  		autorest.ByClosing())
  8631  	result.Response = autorest.Response{Response: resp}
  8632  	return
  8633  }
  8634  
  8635  // UpdateRegexEntityRole sends the update regex entity role request.
  8636  // Parameters:
  8637  // appID - the application ID.
  8638  // versionID - the version ID.
  8639  // entityID - the entity ID.
  8640  // roleID - the entity role ID.
  8641  // entityRoleUpdateObject - the new entity role.
  8642  func (client ModelClient) UpdateRegexEntityRole(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (result OperationStatus, err error) {
  8643  	if tracing.IsEnabled() {
  8644  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateRegexEntityRole")
  8645  		defer func() {
  8646  			sc := -1
  8647  			if result.Response.Response != nil {
  8648  				sc = result.Response.Response.StatusCode
  8649  			}
  8650  			tracing.EndSpan(ctx, sc, err)
  8651  		}()
  8652  	}
  8653  	req, err := client.UpdateRegexEntityRolePreparer(ctx, appID, versionID, entityID, roleID, entityRoleUpdateObject)
  8654  	if err != nil {
  8655  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateRegexEntityRole", nil, "Failure preparing request")
  8656  		return
  8657  	}
  8658  
  8659  	resp, err := client.UpdateRegexEntityRoleSender(req)
  8660  	if err != nil {
  8661  		result.Response = autorest.Response{Response: resp}
  8662  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateRegexEntityRole", resp, "Failure sending request")
  8663  		return
  8664  	}
  8665  
  8666  	result, err = client.UpdateRegexEntityRoleResponder(resp)
  8667  	if err != nil {
  8668  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateRegexEntityRole", resp, "Failure responding to request")
  8669  		return
  8670  	}
  8671  
  8672  	return
  8673  }
  8674  
  8675  // UpdateRegexEntityRolePreparer prepares the UpdateRegexEntityRole request.
  8676  func (client ModelClient) UpdateRegexEntityRolePreparer(ctx context.Context, appID uuid.UUID, versionID string, entityID uuid.UUID, roleID uuid.UUID, entityRoleUpdateObject EntityRoleUpdateObject) (*http.Request, error) {
  8677  	urlParameters := map[string]interface{}{
  8678  		"Endpoint": client.Endpoint,
  8679  	}
  8680  
  8681  	pathParameters := map[string]interface{}{
  8682  		"appId":     autorest.Encode("path", appID),
  8683  		"entityId":  autorest.Encode("path", entityID),
  8684  		"roleId":    autorest.Encode("path", roleID),
  8685  		"versionId": autorest.Encode("path", versionID),
  8686  	}
  8687  
  8688  	preparer := autorest.CreatePreparer(
  8689  		autorest.AsContentType("application/json; charset=utf-8"),
  8690  		autorest.AsPut(),
  8691  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  8692  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", pathParameters),
  8693  		autorest.WithJSON(entityRoleUpdateObject))
  8694  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  8695  }
  8696  
  8697  // UpdateRegexEntityRoleSender sends the UpdateRegexEntityRole request. The method will close the
  8698  // http.Response Body if it receives an error.
  8699  func (client ModelClient) UpdateRegexEntityRoleSender(req *http.Request) (*http.Response, error) {
  8700  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8701  }
  8702  
  8703  // UpdateRegexEntityRoleResponder handles the response to the UpdateRegexEntityRole request. The method always
  8704  // closes the http.Response Body.
  8705  func (client ModelClient) UpdateRegexEntityRoleResponder(resp *http.Response) (result OperationStatus, err error) {
  8706  	err = autorest.Respond(
  8707  		resp,
  8708  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  8709  		autorest.ByUnmarshallingJSON(&result),
  8710  		autorest.ByClosing())
  8711  	result.Response = autorest.Response{Response: resp}
  8712  	return
  8713  }
  8714  
  8715  // UpdateSubList updates one of the list entity's sublists in a version of the application.
  8716  // Parameters:
  8717  // appID - the application ID.
  8718  // versionID - the version ID.
  8719  // clEntityID - the list entity extractor ID.
  8720  // subListID - the sublist ID.
  8721  // wordListBaseUpdateObject - a sublist update object containing the new canonical form and the list of words.
  8722  func (client ModelClient) UpdateSubList(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int64, wordListBaseUpdateObject WordListBaseUpdateObject) (result OperationStatus, err error) {
  8723  	if tracing.IsEnabled() {
  8724  		ctx = tracing.StartSpan(ctx, fqdn+"/ModelClient.UpdateSubList")
  8725  		defer func() {
  8726  			sc := -1
  8727  			if result.Response.Response != nil {
  8728  				sc = result.Response.Response.StatusCode
  8729  			}
  8730  			tracing.EndSpan(ctx, sc, err)
  8731  		}()
  8732  	}
  8733  	req, err := client.UpdateSubListPreparer(ctx, appID, versionID, clEntityID, subListID, wordListBaseUpdateObject)
  8734  	if err != nil {
  8735  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateSubList", nil, "Failure preparing request")
  8736  		return
  8737  	}
  8738  
  8739  	resp, err := client.UpdateSubListSender(req)
  8740  	if err != nil {
  8741  		result.Response = autorest.Response{Response: resp}
  8742  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateSubList", resp, "Failure sending request")
  8743  		return
  8744  	}
  8745  
  8746  	result, err = client.UpdateSubListResponder(resp)
  8747  	if err != nil {
  8748  		err = autorest.NewErrorWithError(err, "authoring.ModelClient", "UpdateSubList", resp, "Failure responding to request")
  8749  		return
  8750  	}
  8751  
  8752  	return
  8753  }
  8754  
  8755  // UpdateSubListPreparer prepares the UpdateSubList request.
  8756  func (client ModelClient) UpdateSubListPreparer(ctx context.Context, appID uuid.UUID, versionID string, clEntityID uuid.UUID, subListID int64, wordListBaseUpdateObject WordListBaseUpdateObject) (*http.Request, error) {
  8757  	urlParameters := map[string]interface{}{
  8758  		"Endpoint": client.Endpoint,
  8759  	}
  8760  
  8761  	pathParameters := map[string]interface{}{
  8762  		"appId":      autorest.Encode("path", appID),
  8763  		"clEntityId": autorest.Encode("path", clEntityID),
  8764  		"subListId":  autorest.Encode("path", subListID),
  8765  		"versionId":  autorest.Encode("path", versionID),
  8766  	}
  8767  
  8768  	preparer := autorest.CreatePreparer(
  8769  		autorest.AsContentType("application/json; charset=utf-8"),
  8770  		autorest.AsPut(),
  8771  		autorest.WithCustomBaseURL("{Endpoint}/luis/authoring/v3.0-preview", urlParameters),
  8772  		autorest.WithPathParameters("/apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}", pathParameters),
  8773  		autorest.WithJSON(wordListBaseUpdateObject))
  8774  	return preparer.Prepare((&http.Request{}).WithContext(ctx))
  8775  }
  8776  
  8777  // UpdateSubListSender sends the UpdateSubList request. The method will close the
  8778  // http.Response Body if it receives an error.
  8779  func (client ModelClient) UpdateSubListSender(req *http.Request) (*http.Response, error) {
  8780  	return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
  8781  }
  8782  
  8783  // UpdateSubListResponder handles the response to the UpdateSubList request. The method always
  8784  // closes the http.Response Body.
  8785  func (client ModelClient) UpdateSubListResponder(resp *http.Response) (result OperationStatus, err error) {
  8786  	err = autorest.Respond(
  8787  		resp,
  8788  		azure.WithErrorUnlessStatusCode(http.StatusOK),
  8789  		autorest.ByUnmarshallingJSON(&result),
  8790  		autorest.ByClosing())
  8791  	result.Response = autorest.Response{Response: resp}
  8792  	return
  8793  }
  8794  

View as plain text