...

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

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

View as plain text