1package catalog
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"context"
22	"github.com/Azure/go-autorest/autorest"
23	"github.com/Azure/go-autorest/autorest/azure"
24	"github.com/Azure/go-autorest/autorest/validation"
25	"net/http"
26)
27
28// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
29// Client is the creates an Azure Data Lake Analytics catalog client.
30type Client struct {
31	BaseClient
32}
33
34// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
35// NewClient creates an instance of the Client client.
36func NewClient() Client {
37	return Client{New()}
38}
39
40// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
41// CreateSecret creates the specified secret for use with external data sources in the specified database.
42//
43// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
44// of the database in which to create the secret. secretName is the name of the secret. parameters is the
45// parameters required to create the secret (name and password)
46func (client Client) CreateSecret(ctx context.Context, accountName string, databaseName string, secretName string, parameters DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters) (result USQLSecret, err error) {
47	if err := validation.Validate([]validation.Validation{
48		{TargetValue: parameters,
49			Constraints: []validation.Constraint{{Target: "parameters.Password", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
50		return result, validation.NewError("catalog.Client", "CreateSecret", err.Error())
51	}
52
53	req, err := client.CreateSecretPreparer(ctx, accountName, databaseName, secretName, parameters)
54	if err != nil {
55		err = autorest.NewErrorWithError(err, "catalog.Client", "CreateSecret", nil, "Failure preparing request")
56		return
57	}
58
59	resp, err := client.CreateSecretSender(req)
60	if err != nil {
61		result.Response = autorest.Response{Response: resp}
62		err = autorest.NewErrorWithError(err, "catalog.Client", "CreateSecret", resp, "Failure sending request")
63		return
64	}
65
66	result, err = client.CreateSecretResponder(resp)
67	if err != nil {
68		err = autorest.NewErrorWithError(err, "catalog.Client", "CreateSecret", resp, "Failure responding to request")
69	}
70
71	return
72}
73
74// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
75// CreateSecretPreparer prepares the CreateSecret request.
76func (client Client) CreateSecretPreparer(ctx context.Context, accountName string, databaseName string, secretName string, parameters DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters) (*http.Request, error) {
77	urlParameters := map[string]interface{}{
78		"accountName":          accountName,
79		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
80	}
81
82	pathParameters := map[string]interface{}{
83		"databaseName": autorest.Encode("path", databaseName),
84		"secretName":   autorest.Encode("path", secretName),
85	}
86
87	const APIVersion = "2015-10-01-preview"
88	queryParameters := map[string]interface{}{
89		"api-version": APIVersion,
90	}
91
92	preparer := autorest.CreatePreparer(
93		autorest.AsContentType("application/json; charset=utf-8"),
94		autorest.AsPut(),
95		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
96		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/secrets/{secretName}", pathParameters),
97		autorest.WithJSON(parameters),
98		autorest.WithQueryParameters(queryParameters))
99	return preparer.Prepare((&http.Request{}).WithContext(ctx))
100}
101
102// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
103// CreateSecretSender sends the CreateSecret request. The method will close the
104// http.Response Body if it receives an error.
105func (client Client) CreateSecretSender(req *http.Request) (*http.Response, error) {
106	return autorest.SendWithSender(client, req,
107		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
108}
109
110// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
111// CreateSecretResponder handles the response to the CreateSecret request. The method always
112// closes the http.Response Body.
113func (client Client) CreateSecretResponder(resp *http.Response) (result USQLSecret, err error) {
114	err = autorest.Respond(
115		resp,
116		client.ByInspecting(),
117		azure.WithErrorUnlessStatusCode(http.StatusOK),
118		autorest.ByUnmarshallingJSON(&result),
119		autorest.ByClosing())
120	result.Response = autorest.Response{Response: resp}
121	return
122}
123
124// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
125// DeleteAllSecrets deletes all secrets in the specified database
126//
127// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
128// of the database containing the secret.
129func (client Client) DeleteAllSecrets(ctx context.Context, accountName string, databaseName string) (result autorest.Response, err error) {
130	req, err := client.DeleteAllSecretsPreparer(ctx, accountName, databaseName)
131	if err != nil {
132		err = autorest.NewErrorWithError(err, "catalog.Client", "DeleteAllSecrets", nil, "Failure preparing request")
133		return
134	}
135
136	resp, err := client.DeleteAllSecretsSender(req)
137	if err != nil {
138		result.Response = resp
139		err = autorest.NewErrorWithError(err, "catalog.Client", "DeleteAllSecrets", resp, "Failure sending request")
140		return
141	}
142
143	result, err = client.DeleteAllSecretsResponder(resp)
144	if err != nil {
145		err = autorest.NewErrorWithError(err, "catalog.Client", "DeleteAllSecrets", resp, "Failure responding to request")
146	}
147
148	return
149}
150
151// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
152// DeleteAllSecretsPreparer prepares the DeleteAllSecrets request.
153func (client Client) DeleteAllSecretsPreparer(ctx context.Context, accountName string, databaseName string) (*http.Request, error) {
154	urlParameters := map[string]interface{}{
155		"accountName":          accountName,
156		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
157	}
158
159	pathParameters := map[string]interface{}{
160		"databaseName": autorest.Encode("path", databaseName),
161	}
162
163	const APIVersion = "2015-10-01-preview"
164	queryParameters := map[string]interface{}{
165		"api-version": APIVersion,
166	}
167
168	preparer := autorest.CreatePreparer(
169		autorest.AsDelete(),
170		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
171		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/secrets", pathParameters),
172		autorest.WithQueryParameters(queryParameters))
173	return preparer.Prepare((&http.Request{}).WithContext(ctx))
174}
175
176// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
177// DeleteAllSecretsSender sends the DeleteAllSecrets request. The method will close the
178// http.Response Body if it receives an error.
179func (client Client) DeleteAllSecretsSender(req *http.Request) (*http.Response, error) {
180	return autorest.SendWithSender(client, req,
181		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
182}
183
184// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
185// DeleteAllSecretsResponder handles the response to the DeleteAllSecrets request. The method always
186// closes the http.Response Body.
187func (client Client) DeleteAllSecretsResponder(resp *http.Response) (result autorest.Response, err error) {
188	err = autorest.Respond(
189		resp,
190		client.ByInspecting(),
191		azure.WithErrorUnlessStatusCode(http.StatusOK),
192		autorest.ByClosing())
193	result.Response = resp
194	return
195}
196
197// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
198// DeleteSecret deletes the specified secret in the specified database
199//
200// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
201// of the database containing the secret. secretName is the name of the secret to delete
202func (client Client) DeleteSecret(ctx context.Context, accountName string, databaseName string, secretName string) (result autorest.Response, err error) {
203	req, err := client.DeleteSecretPreparer(ctx, accountName, databaseName, secretName)
204	if err != nil {
205		err = autorest.NewErrorWithError(err, "catalog.Client", "DeleteSecret", nil, "Failure preparing request")
206		return
207	}
208
209	resp, err := client.DeleteSecretSender(req)
210	if err != nil {
211		result.Response = resp
212		err = autorest.NewErrorWithError(err, "catalog.Client", "DeleteSecret", resp, "Failure sending request")
213		return
214	}
215
216	result, err = client.DeleteSecretResponder(resp)
217	if err != nil {
218		err = autorest.NewErrorWithError(err, "catalog.Client", "DeleteSecret", resp, "Failure responding to request")
219	}
220
221	return
222}
223
224// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
225// DeleteSecretPreparer prepares the DeleteSecret request.
226func (client Client) DeleteSecretPreparer(ctx context.Context, accountName string, databaseName string, secretName string) (*http.Request, error) {
227	urlParameters := map[string]interface{}{
228		"accountName":          accountName,
229		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
230	}
231
232	pathParameters := map[string]interface{}{
233		"databaseName": autorest.Encode("path", databaseName),
234		"secretName":   autorest.Encode("path", secretName),
235	}
236
237	const APIVersion = "2015-10-01-preview"
238	queryParameters := map[string]interface{}{
239		"api-version": APIVersion,
240	}
241
242	preparer := autorest.CreatePreparer(
243		autorest.AsDelete(),
244		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
245		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/secrets/{secretName}", pathParameters),
246		autorest.WithQueryParameters(queryParameters))
247	return preparer.Prepare((&http.Request{}).WithContext(ctx))
248}
249
250// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
251// DeleteSecretSender sends the DeleteSecret request. The method will close the
252// http.Response Body if it receives an error.
253func (client Client) DeleteSecretSender(req *http.Request) (*http.Response, error) {
254	return autorest.SendWithSender(client, req,
255		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
256}
257
258// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
259// DeleteSecretResponder handles the response to the DeleteSecret request. The method always
260// closes the http.Response Body.
261func (client Client) DeleteSecretResponder(resp *http.Response) (result autorest.Response, err error) {
262	err = autorest.Respond(
263		resp,
264		client.ByInspecting(),
265		azure.WithErrorUnlessStatusCode(http.StatusOK),
266		autorest.ByClosing())
267	result.Response = resp
268	return
269}
270
271// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
272// GetAssembly retrieves the specified assembly from the Data Lake Analytics catalog.
273//
274// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
275// of the database containing the assembly. assemblyName is the name of the assembly.
276func (client Client) GetAssembly(ctx context.Context, accountName string, databaseName string, assemblyName string) (result USQLAssembly, err error) {
277	req, err := client.GetAssemblyPreparer(ctx, accountName, databaseName, assemblyName)
278	if err != nil {
279		err = autorest.NewErrorWithError(err, "catalog.Client", "GetAssembly", nil, "Failure preparing request")
280		return
281	}
282
283	resp, err := client.GetAssemblySender(req)
284	if err != nil {
285		result.Response = autorest.Response{Response: resp}
286		err = autorest.NewErrorWithError(err, "catalog.Client", "GetAssembly", resp, "Failure sending request")
287		return
288	}
289
290	result, err = client.GetAssemblyResponder(resp)
291	if err != nil {
292		err = autorest.NewErrorWithError(err, "catalog.Client", "GetAssembly", resp, "Failure responding to request")
293	}
294
295	return
296}
297
298// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
299// GetAssemblyPreparer prepares the GetAssembly request.
300func (client Client) GetAssemblyPreparer(ctx context.Context, accountName string, databaseName string, assemblyName string) (*http.Request, error) {
301	urlParameters := map[string]interface{}{
302		"accountName":          accountName,
303		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
304	}
305
306	pathParameters := map[string]interface{}{
307		"assemblyName": autorest.Encode("path", assemblyName),
308		"databaseName": autorest.Encode("path", databaseName),
309	}
310
311	const APIVersion = "2015-10-01-preview"
312	queryParameters := map[string]interface{}{
313		"api-version": APIVersion,
314	}
315
316	preparer := autorest.CreatePreparer(
317		autorest.AsGet(),
318		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
319		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/assemblies/{assemblyName}", pathParameters),
320		autorest.WithQueryParameters(queryParameters))
321	return preparer.Prepare((&http.Request{}).WithContext(ctx))
322}
323
324// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
325// GetAssemblySender sends the GetAssembly request. The method will close the
326// http.Response Body if it receives an error.
327func (client Client) GetAssemblySender(req *http.Request) (*http.Response, error) {
328	return autorest.SendWithSender(client, req,
329		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
330}
331
332// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
333// GetAssemblyResponder handles the response to the GetAssembly request. The method always
334// closes the http.Response Body.
335func (client Client) GetAssemblyResponder(resp *http.Response) (result USQLAssembly, err error) {
336	err = autorest.Respond(
337		resp,
338		client.ByInspecting(),
339		azure.WithErrorUnlessStatusCode(http.StatusOK),
340		autorest.ByUnmarshallingJSON(&result),
341		autorest.ByClosing())
342	result.Response = autorest.Response{Response: resp}
343	return
344}
345
346// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
347// GetCredential retrieves the specified credential from the Data Lake Analytics catalog.
348//
349// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
350// of the database containing the schema. credentialName is the name of the credential.
351func (client Client) GetCredential(ctx context.Context, accountName string, databaseName string, credentialName string) (result USQLCredential, err error) {
352	req, err := client.GetCredentialPreparer(ctx, accountName, databaseName, credentialName)
353	if err != nil {
354		err = autorest.NewErrorWithError(err, "catalog.Client", "GetCredential", nil, "Failure preparing request")
355		return
356	}
357
358	resp, err := client.GetCredentialSender(req)
359	if err != nil {
360		result.Response = autorest.Response{Response: resp}
361		err = autorest.NewErrorWithError(err, "catalog.Client", "GetCredential", resp, "Failure sending request")
362		return
363	}
364
365	result, err = client.GetCredentialResponder(resp)
366	if err != nil {
367		err = autorest.NewErrorWithError(err, "catalog.Client", "GetCredential", resp, "Failure responding to request")
368	}
369
370	return
371}
372
373// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
374// GetCredentialPreparer prepares the GetCredential request.
375func (client Client) GetCredentialPreparer(ctx context.Context, accountName string, databaseName string, credentialName string) (*http.Request, error) {
376	urlParameters := map[string]interface{}{
377		"accountName":          accountName,
378		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
379	}
380
381	pathParameters := map[string]interface{}{
382		"credentialName": autorest.Encode("path", credentialName),
383		"databaseName":   autorest.Encode("path", databaseName),
384	}
385
386	const APIVersion = "2015-10-01-preview"
387	queryParameters := map[string]interface{}{
388		"api-version": APIVersion,
389	}
390
391	preparer := autorest.CreatePreparer(
392		autorest.AsGet(),
393		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
394		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/credentials/{credentialName}", pathParameters),
395		autorest.WithQueryParameters(queryParameters))
396	return preparer.Prepare((&http.Request{}).WithContext(ctx))
397}
398
399// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
400// GetCredentialSender sends the GetCredential request. The method will close the
401// http.Response Body if it receives an error.
402func (client Client) GetCredentialSender(req *http.Request) (*http.Response, error) {
403	return autorest.SendWithSender(client, req,
404		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
405}
406
407// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
408// GetCredentialResponder handles the response to the GetCredential request. The method always
409// closes the http.Response Body.
410func (client Client) GetCredentialResponder(resp *http.Response) (result USQLCredential, err error) {
411	err = autorest.Respond(
412		resp,
413		client.ByInspecting(),
414		azure.WithErrorUnlessStatusCode(http.StatusOK),
415		autorest.ByUnmarshallingJSON(&result),
416		autorest.ByClosing())
417	result.Response = autorest.Response{Response: resp}
418	return
419}
420
421// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
422// GetDatabase retrieves the specified database from the Data Lake Analytics catalog.
423//
424// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
425// of the database.
426func (client Client) GetDatabase(ctx context.Context, accountName string, databaseName string) (result USQLDatabase, err error) {
427	req, err := client.GetDatabasePreparer(ctx, accountName, databaseName)
428	if err != nil {
429		err = autorest.NewErrorWithError(err, "catalog.Client", "GetDatabase", nil, "Failure preparing request")
430		return
431	}
432
433	resp, err := client.GetDatabaseSender(req)
434	if err != nil {
435		result.Response = autorest.Response{Response: resp}
436		err = autorest.NewErrorWithError(err, "catalog.Client", "GetDatabase", resp, "Failure sending request")
437		return
438	}
439
440	result, err = client.GetDatabaseResponder(resp)
441	if err != nil {
442		err = autorest.NewErrorWithError(err, "catalog.Client", "GetDatabase", resp, "Failure responding to request")
443	}
444
445	return
446}
447
448// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
449// GetDatabasePreparer prepares the GetDatabase request.
450func (client Client) GetDatabasePreparer(ctx context.Context, accountName string, databaseName string) (*http.Request, error) {
451	urlParameters := map[string]interface{}{
452		"accountName":          accountName,
453		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
454	}
455
456	pathParameters := map[string]interface{}{
457		"databaseName": autorest.Encode("path", databaseName),
458	}
459
460	const APIVersion = "2015-10-01-preview"
461	queryParameters := map[string]interface{}{
462		"api-version": APIVersion,
463	}
464
465	preparer := autorest.CreatePreparer(
466		autorest.AsGet(),
467		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
468		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}", pathParameters),
469		autorest.WithQueryParameters(queryParameters))
470	return preparer.Prepare((&http.Request{}).WithContext(ctx))
471}
472
473// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
474// GetDatabaseSender sends the GetDatabase request. The method will close the
475// http.Response Body if it receives an error.
476func (client Client) GetDatabaseSender(req *http.Request) (*http.Response, error) {
477	return autorest.SendWithSender(client, req,
478		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
479}
480
481// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
482// GetDatabaseResponder handles the response to the GetDatabase request. The method always
483// closes the http.Response Body.
484func (client Client) GetDatabaseResponder(resp *http.Response) (result USQLDatabase, err error) {
485	err = autorest.Respond(
486		resp,
487		client.ByInspecting(),
488		azure.WithErrorUnlessStatusCode(http.StatusOK),
489		autorest.ByUnmarshallingJSON(&result),
490		autorest.ByClosing())
491	result.Response = autorest.Response{Response: resp}
492	return
493}
494
495// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
496// GetExternalDataSource retrieves the specified external data source from the Data Lake Analytics catalog.
497//
498// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
499// of the database containing the external data source. externalDataSourceName is the name of the external data
500// source.
501func (client Client) GetExternalDataSource(ctx context.Context, accountName string, databaseName string, externalDataSourceName string) (result USQLExternalDataSource, err error) {
502	req, err := client.GetExternalDataSourcePreparer(ctx, accountName, databaseName, externalDataSourceName)
503	if err != nil {
504		err = autorest.NewErrorWithError(err, "catalog.Client", "GetExternalDataSource", nil, "Failure preparing request")
505		return
506	}
507
508	resp, err := client.GetExternalDataSourceSender(req)
509	if err != nil {
510		result.Response = autorest.Response{Response: resp}
511		err = autorest.NewErrorWithError(err, "catalog.Client", "GetExternalDataSource", resp, "Failure sending request")
512		return
513	}
514
515	result, err = client.GetExternalDataSourceResponder(resp)
516	if err != nil {
517		err = autorest.NewErrorWithError(err, "catalog.Client", "GetExternalDataSource", resp, "Failure responding to request")
518	}
519
520	return
521}
522
523// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
524// GetExternalDataSourcePreparer prepares the GetExternalDataSource request.
525func (client Client) GetExternalDataSourcePreparer(ctx context.Context, accountName string, databaseName string, externalDataSourceName string) (*http.Request, error) {
526	urlParameters := map[string]interface{}{
527		"accountName":          accountName,
528		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
529	}
530
531	pathParameters := map[string]interface{}{
532		"databaseName":           autorest.Encode("path", databaseName),
533		"externalDataSourceName": autorest.Encode("path", externalDataSourceName),
534	}
535
536	const APIVersion = "2015-10-01-preview"
537	queryParameters := map[string]interface{}{
538		"api-version": APIVersion,
539	}
540
541	preparer := autorest.CreatePreparer(
542		autorest.AsGet(),
543		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
544		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/externaldatasources/{externalDataSourceName}", pathParameters),
545		autorest.WithQueryParameters(queryParameters))
546	return preparer.Prepare((&http.Request{}).WithContext(ctx))
547}
548
549// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
550// GetExternalDataSourceSender sends the GetExternalDataSource request. The method will close the
551// http.Response Body if it receives an error.
552func (client Client) GetExternalDataSourceSender(req *http.Request) (*http.Response, error) {
553	return autorest.SendWithSender(client, req,
554		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
555}
556
557// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
558// GetExternalDataSourceResponder handles the response to the GetExternalDataSource request. The method always
559// closes the http.Response Body.
560func (client Client) GetExternalDataSourceResponder(resp *http.Response) (result USQLExternalDataSource, err error) {
561	err = autorest.Respond(
562		resp,
563		client.ByInspecting(),
564		azure.WithErrorUnlessStatusCode(http.StatusOK),
565		autorest.ByUnmarshallingJSON(&result),
566		autorest.ByClosing())
567	result.Response = autorest.Response{Response: resp}
568	return
569}
570
571// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
572// GetProcedure retrieves the specified procedure from the Data Lake Analytics catalog.
573//
574// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
575// of the database containing the procedure. schemaName is the name of the schema containing the procedure.
576// procedureName is the name of the procedure.
577func (client Client) GetProcedure(ctx context.Context, accountName string, databaseName string, schemaName string, procedureName string) (result USQLProcedure, err error) {
578	req, err := client.GetProcedurePreparer(ctx, accountName, databaseName, schemaName, procedureName)
579	if err != nil {
580		err = autorest.NewErrorWithError(err, "catalog.Client", "GetProcedure", nil, "Failure preparing request")
581		return
582	}
583
584	resp, err := client.GetProcedureSender(req)
585	if err != nil {
586		result.Response = autorest.Response{Response: resp}
587		err = autorest.NewErrorWithError(err, "catalog.Client", "GetProcedure", resp, "Failure sending request")
588		return
589	}
590
591	result, err = client.GetProcedureResponder(resp)
592	if err != nil {
593		err = autorest.NewErrorWithError(err, "catalog.Client", "GetProcedure", resp, "Failure responding to request")
594	}
595
596	return
597}
598
599// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
600// GetProcedurePreparer prepares the GetProcedure request.
601func (client Client) GetProcedurePreparer(ctx context.Context, accountName string, databaseName string, schemaName string, procedureName string) (*http.Request, error) {
602	urlParameters := map[string]interface{}{
603		"accountName":          accountName,
604		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
605	}
606
607	pathParameters := map[string]interface{}{
608		"databaseName":  autorest.Encode("path", databaseName),
609		"procedureName": autorest.Encode("path", procedureName),
610		"schemaName":    autorest.Encode("path", schemaName),
611	}
612
613	const APIVersion = "2015-10-01-preview"
614	queryParameters := map[string]interface{}{
615		"api-version": APIVersion,
616	}
617
618	preparer := autorest.CreatePreparer(
619		autorest.AsGet(),
620		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
621		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/procedures/{procedureName}", pathParameters),
622		autorest.WithQueryParameters(queryParameters))
623	return preparer.Prepare((&http.Request{}).WithContext(ctx))
624}
625
626// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
627// GetProcedureSender sends the GetProcedure request. The method will close the
628// http.Response Body if it receives an error.
629func (client Client) GetProcedureSender(req *http.Request) (*http.Response, error) {
630	return autorest.SendWithSender(client, req,
631		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
632}
633
634// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
635// GetProcedureResponder handles the response to the GetProcedure request. The method always
636// closes the http.Response Body.
637func (client Client) GetProcedureResponder(resp *http.Response) (result USQLProcedure, err error) {
638	err = autorest.Respond(
639		resp,
640		client.ByInspecting(),
641		azure.WithErrorUnlessStatusCode(http.StatusOK),
642		autorest.ByUnmarshallingJSON(&result),
643		autorest.ByClosing())
644	result.Response = autorest.Response{Response: resp}
645	return
646}
647
648// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
649// GetSchema retrieves the specified schema from the Data Lake Analytics catalog.
650//
651// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
652// of the database containing the schema. schemaName is the name of the schema.
653func (client Client) GetSchema(ctx context.Context, accountName string, databaseName string, schemaName string) (result USQLSchema, err error) {
654	req, err := client.GetSchemaPreparer(ctx, accountName, databaseName, schemaName)
655	if err != nil {
656		err = autorest.NewErrorWithError(err, "catalog.Client", "GetSchema", nil, "Failure preparing request")
657		return
658	}
659
660	resp, err := client.GetSchemaSender(req)
661	if err != nil {
662		result.Response = autorest.Response{Response: resp}
663		err = autorest.NewErrorWithError(err, "catalog.Client", "GetSchema", resp, "Failure sending request")
664		return
665	}
666
667	result, err = client.GetSchemaResponder(resp)
668	if err != nil {
669		err = autorest.NewErrorWithError(err, "catalog.Client", "GetSchema", resp, "Failure responding to request")
670	}
671
672	return
673}
674
675// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
676// GetSchemaPreparer prepares the GetSchema request.
677func (client Client) GetSchemaPreparer(ctx context.Context, accountName string, databaseName string, schemaName string) (*http.Request, error) {
678	urlParameters := map[string]interface{}{
679		"accountName":          accountName,
680		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
681	}
682
683	pathParameters := map[string]interface{}{
684		"databaseName": autorest.Encode("path", databaseName),
685		"schemaName":   autorest.Encode("path", schemaName),
686	}
687
688	const APIVersion = "2015-10-01-preview"
689	queryParameters := map[string]interface{}{
690		"api-version": APIVersion,
691	}
692
693	preparer := autorest.CreatePreparer(
694		autorest.AsGet(),
695		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
696		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}", pathParameters),
697		autorest.WithQueryParameters(queryParameters))
698	return preparer.Prepare((&http.Request{}).WithContext(ctx))
699}
700
701// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
702// GetSchemaSender sends the GetSchema request. The method will close the
703// http.Response Body if it receives an error.
704func (client Client) GetSchemaSender(req *http.Request) (*http.Response, error) {
705	return autorest.SendWithSender(client, req,
706		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
707}
708
709// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
710// GetSchemaResponder handles the response to the GetSchema request. The method always
711// closes the http.Response Body.
712func (client Client) GetSchemaResponder(resp *http.Response) (result USQLSchema, err error) {
713	err = autorest.Respond(
714		resp,
715		client.ByInspecting(),
716		azure.WithErrorUnlessStatusCode(http.StatusOK),
717		autorest.ByUnmarshallingJSON(&result),
718		autorest.ByClosing())
719	result.Response = autorest.Response{Response: resp}
720	return
721}
722
723// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
724// GetSecret gets the specified secret in the specified database
725//
726// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
727// of the database containing the secret. secretName is the name of the secret to get
728func (client Client) GetSecret(ctx context.Context, accountName string, databaseName string, secretName string) (result USQLSecret, err error) {
729	req, err := client.GetSecretPreparer(ctx, accountName, databaseName, secretName)
730	if err != nil {
731		err = autorest.NewErrorWithError(err, "catalog.Client", "GetSecret", nil, "Failure preparing request")
732		return
733	}
734
735	resp, err := client.GetSecretSender(req)
736	if err != nil {
737		result.Response = autorest.Response{Response: resp}
738		err = autorest.NewErrorWithError(err, "catalog.Client", "GetSecret", resp, "Failure sending request")
739		return
740	}
741
742	result, err = client.GetSecretResponder(resp)
743	if err != nil {
744		err = autorest.NewErrorWithError(err, "catalog.Client", "GetSecret", resp, "Failure responding to request")
745	}
746
747	return
748}
749
750// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
751// GetSecretPreparer prepares the GetSecret request.
752func (client Client) GetSecretPreparer(ctx context.Context, accountName string, databaseName string, secretName string) (*http.Request, error) {
753	urlParameters := map[string]interface{}{
754		"accountName":          accountName,
755		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
756	}
757
758	pathParameters := map[string]interface{}{
759		"databaseName": autorest.Encode("path", databaseName),
760		"secretName":   autorest.Encode("path", secretName),
761	}
762
763	const APIVersion = "2015-10-01-preview"
764	queryParameters := map[string]interface{}{
765		"api-version": APIVersion,
766	}
767
768	preparer := autorest.CreatePreparer(
769		autorest.AsGet(),
770		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
771		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/secrets/{secretName}", pathParameters),
772		autorest.WithQueryParameters(queryParameters))
773	return preparer.Prepare((&http.Request{}).WithContext(ctx))
774}
775
776// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
777// GetSecretSender sends the GetSecret request. The method will close the
778// http.Response Body if it receives an error.
779func (client Client) GetSecretSender(req *http.Request) (*http.Response, error) {
780	return autorest.SendWithSender(client, req,
781		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
782}
783
784// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
785// GetSecretResponder handles the response to the GetSecret request. The method always
786// closes the http.Response Body.
787func (client Client) GetSecretResponder(resp *http.Response) (result USQLSecret, err error) {
788	err = autorest.Respond(
789		resp,
790		client.ByInspecting(),
791		azure.WithErrorUnlessStatusCode(http.StatusOK),
792		autorest.ByUnmarshallingJSON(&result),
793		autorest.ByClosing())
794	result.Response = autorest.Response{Response: resp}
795	return
796}
797
798// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
799// GetTable retrieves the specified table from the Data Lake Analytics catalog.
800//
801// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
802// of the database containing the table. schemaName is the name of the schema containing the table. tableName is
803// the name of the table.
804func (client Client) GetTable(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string) (result USQLTable, err error) {
805	req, err := client.GetTablePreparer(ctx, accountName, databaseName, schemaName, tableName)
806	if err != nil {
807		err = autorest.NewErrorWithError(err, "catalog.Client", "GetTable", nil, "Failure preparing request")
808		return
809	}
810
811	resp, err := client.GetTableSender(req)
812	if err != nil {
813		result.Response = autorest.Response{Response: resp}
814		err = autorest.NewErrorWithError(err, "catalog.Client", "GetTable", resp, "Failure sending request")
815		return
816	}
817
818	result, err = client.GetTableResponder(resp)
819	if err != nil {
820		err = autorest.NewErrorWithError(err, "catalog.Client", "GetTable", resp, "Failure responding to request")
821	}
822
823	return
824}
825
826// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
827// GetTablePreparer prepares the GetTable request.
828func (client Client) GetTablePreparer(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string) (*http.Request, error) {
829	urlParameters := map[string]interface{}{
830		"accountName":          accountName,
831		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
832	}
833
834	pathParameters := map[string]interface{}{
835		"databaseName": autorest.Encode("path", databaseName),
836		"schemaName":   autorest.Encode("path", schemaName),
837		"tableName":    autorest.Encode("path", tableName),
838	}
839
840	const APIVersion = "2015-10-01-preview"
841	queryParameters := map[string]interface{}{
842		"api-version": APIVersion,
843	}
844
845	preparer := autorest.CreatePreparer(
846		autorest.AsGet(),
847		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
848		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}", pathParameters),
849		autorest.WithQueryParameters(queryParameters))
850	return preparer.Prepare((&http.Request{}).WithContext(ctx))
851}
852
853// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
854// GetTableSender sends the GetTable request. The method will close the
855// http.Response Body if it receives an error.
856func (client Client) GetTableSender(req *http.Request) (*http.Response, error) {
857	return autorest.SendWithSender(client, req,
858		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
859}
860
861// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
862// GetTableResponder handles the response to the GetTable request. The method always
863// closes the http.Response Body.
864func (client Client) GetTableResponder(resp *http.Response) (result USQLTable, err error) {
865	err = autorest.Respond(
866		resp,
867		client.ByInspecting(),
868		azure.WithErrorUnlessStatusCode(http.StatusOK),
869		autorest.ByUnmarshallingJSON(&result),
870		autorest.ByClosing())
871	result.Response = autorest.Response{Response: resp}
872	return
873}
874
875// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
876// GetTablePartition retrieves the specified table partition from the Data Lake Analytics catalog.
877//
878// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
879// of the database containing the partition. schemaName is the name of the schema containing the partition.
880// tableName is the name of the table containing the partition. partitionName is the name of the table partition.
881func (client Client) GetTablePartition(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, partitionName string) (result USQLTablePartition, err error) {
882	req, err := client.GetTablePartitionPreparer(ctx, accountName, databaseName, schemaName, tableName, partitionName)
883	if err != nil {
884		err = autorest.NewErrorWithError(err, "catalog.Client", "GetTablePartition", nil, "Failure preparing request")
885		return
886	}
887
888	resp, err := client.GetTablePartitionSender(req)
889	if err != nil {
890		result.Response = autorest.Response{Response: resp}
891		err = autorest.NewErrorWithError(err, "catalog.Client", "GetTablePartition", resp, "Failure sending request")
892		return
893	}
894
895	result, err = client.GetTablePartitionResponder(resp)
896	if err != nil {
897		err = autorest.NewErrorWithError(err, "catalog.Client", "GetTablePartition", resp, "Failure responding to request")
898	}
899
900	return
901}
902
903// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
904// GetTablePartitionPreparer prepares the GetTablePartition request.
905func (client Client) GetTablePartitionPreparer(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, partitionName string) (*http.Request, error) {
906	urlParameters := map[string]interface{}{
907		"accountName":          accountName,
908		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
909	}
910
911	pathParameters := map[string]interface{}{
912		"databaseName":  autorest.Encode("path", databaseName),
913		"partitionName": autorest.Encode("path", partitionName),
914		"schemaName":    autorest.Encode("path", schemaName),
915		"tableName":     autorest.Encode("path", tableName),
916	}
917
918	const APIVersion = "2015-10-01-preview"
919	queryParameters := map[string]interface{}{
920		"api-version": APIVersion,
921	}
922
923	preparer := autorest.CreatePreparer(
924		autorest.AsGet(),
925		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
926		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/partitions/{partitionName}", pathParameters),
927		autorest.WithQueryParameters(queryParameters))
928	return preparer.Prepare((&http.Request{}).WithContext(ctx))
929}
930
931// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
932// GetTablePartitionSender sends the GetTablePartition request. The method will close the
933// http.Response Body if it receives an error.
934func (client Client) GetTablePartitionSender(req *http.Request) (*http.Response, error) {
935	return autorest.SendWithSender(client, req,
936		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
937}
938
939// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
940// GetTablePartitionResponder handles the response to the GetTablePartition request. The method always
941// closes the http.Response Body.
942func (client Client) GetTablePartitionResponder(resp *http.Response) (result USQLTablePartition, err error) {
943	err = autorest.Respond(
944		resp,
945		client.ByInspecting(),
946		azure.WithErrorUnlessStatusCode(http.StatusOK),
947		autorest.ByUnmarshallingJSON(&result),
948		autorest.ByClosing())
949	result.Response = autorest.Response{Response: resp}
950	return
951}
952
953// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
954// GetTableStatistic retrieves the specified table statistics from the Data Lake Analytics catalog.
955//
956// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
957// of the database containing the statistics. schemaName is the name of the schema containing the statistics.
958// tableName is the name of the table containing the statistics. statisticsName is the name of the table
959// statistics.
960func (client Client) GetTableStatistic(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, statisticsName string) (result USQLTableStatistics, err error) {
961	req, err := client.GetTableStatisticPreparer(ctx, accountName, databaseName, schemaName, tableName, statisticsName)
962	if err != nil {
963		err = autorest.NewErrorWithError(err, "catalog.Client", "GetTableStatistic", nil, "Failure preparing request")
964		return
965	}
966
967	resp, err := client.GetTableStatisticSender(req)
968	if err != nil {
969		result.Response = autorest.Response{Response: resp}
970		err = autorest.NewErrorWithError(err, "catalog.Client", "GetTableStatistic", resp, "Failure sending request")
971		return
972	}
973
974	result, err = client.GetTableStatisticResponder(resp)
975	if err != nil {
976		err = autorest.NewErrorWithError(err, "catalog.Client", "GetTableStatistic", resp, "Failure responding to request")
977	}
978
979	return
980}
981
982// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
983// GetTableStatisticPreparer prepares the GetTableStatistic request.
984func (client Client) GetTableStatisticPreparer(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, statisticsName string) (*http.Request, error) {
985	urlParameters := map[string]interface{}{
986		"accountName":          accountName,
987		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
988	}
989
990	pathParameters := map[string]interface{}{
991		"databaseName":   autorest.Encode("path", databaseName),
992		"schemaName":     autorest.Encode("path", schemaName),
993		"statisticsName": autorest.Encode("path", statisticsName),
994		"tableName":      autorest.Encode("path", tableName),
995	}
996
997	const APIVersion = "2015-10-01-preview"
998	queryParameters := map[string]interface{}{
999		"api-version": APIVersion,
1000	}
1001
1002	preparer := autorest.CreatePreparer(
1003		autorest.AsGet(),
1004		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
1005		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/statistics/{statisticsName}", pathParameters),
1006		autorest.WithQueryParameters(queryParameters))
1007	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1008}
1009
1010// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1011// GetTableStatisticSender sends the GetTableStatistic request. The method will close the
1012// http.Response Body if it receives an error.
1013func (client Client) GetTableStatisticSender(req *http.Request) (*http.Response, error) {
1014	return autorest.SendWithSender(client, req,
1015		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1016}
1017
1018// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1019// GetTableStatisticResponder handles the response to the GetTableStatistic request. The method always
1020// closes the http.Response Body.
1021func (client Client) GetTableStatisticResponder(resp *http.Response) (result USQLTableStatistics, err error) {
1022	err = autorest.Respond(
1023		resp,
1024		client.ByInspecting(),
1025		azure.WithErrorUnlessStatusCode(http.StatusOK),
1026		autorest.ByUnmarshallingJSON(&result),
1027		autorest.ByClosing())
1028	result.Response = autorest.Response{Response: resp}
1029	return
1030}
1031
1032// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1033// GetTableType retrieves the specified table type from the Data Lake Analytics catalog.
1034//
1035// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
1036// of the database containing the table type. schemaName is the name of the schema containing the table type.
1037// tableTypeName is the name of the table type to retrieve.
1038func (client Client) GetTableType(ctx context.Context, accountName string, databaseName string, schemaName string, tableTypeName string) (result USQLTableType, err error) {
1039	req, err := client.GetTableTypePreparer(ctx, accountName, databaseName, schemaName, tableTypeName)
1040	if err != nil {
1041		err = autorest.NewErrorWithError(err, "catalog.Client", "GetTableType", nil, "Failure preparing request")
1042		return
1043	}
1044
1045	resp, err := client.GetTableTypeSender(req)
1046	if err != nil {
1047		result.Response = autorest.Response{Response: resp}
1048		err = autorest.NewErrorWithError(err, "catalog.Client", "GetTableType", resp, "Failure sending request")
1049		return
1050	}
1051
1052	result, err = client.GetTableTypeResponder(resp)
1053	if err != nil {
1054		err = autorest.NewErrorWithError(err, "catalog.Client", "GetTableType", resp, "Failure responding to request")
1055	}
1056
1057	return
1058}
1059
1060// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1061// GetTableTypePreparer prepares the GetTableType request.
1062func (client Client) GetTableTypePreparer(ctx context.Context, accountName string, databaseName string, schemaName string, tableTypeName string) (*http.Request, error) {
1063	urlParameters := map[string]interface{}{
1064		"accountName":          accountName,
1065		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
1066	}
1067
1068	pathParameters := map[string]interface{}{
1069		"databaseName":  autorest.Encode("path", databaseName),
1070		"schemaName":    autorest.Encode("path", schemaName),
1071		"tableTypeName": autorest.Encode("path", tableTypeName),
1072	}
1073
1074	const APIVersion = "2015-10-01-preview"
1075	queryParameters := map[string]interface{}{
1076		"api-version": APIVersion,
1077	}
1078
1079	preparer := autorest.CreatePreparer(
1080		autorest.AsGet(),
1081		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
1082		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tabletypes/{tableTypeName}", pathParameters),
1083		autorest.WithQueryParameters(queryParameters))
1084	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1085}
1086
1087// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1088// GetTableTypeSender sends the GetTableType request. The method will close the
1089// http.Response Body if it receives an error.
1090func (client Client) GetTableTypeSender(req *http.Request) (*http.Response, error) {
1091	return autorest.SendWithSender(client, req,
1092		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1093}
1094
1095// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1096// GetTableTypeResponder handles the response to the GetTableType request. The method always
1097// closes the http.Response Body.
1098func (client Client) GetTableTypeResponder(resp *http.Response) (result USQLTableType, err error) {
1099	err = autorest.Respond(
1100		resp,
1101		client.ByInspecting(),
1102		azure.WithErrorUnlessStatusCode(http.StatusOK),
1103		autorest.ByUnmarshallingJSON(&result),
1104		autorest.ByClosing())
1105	result.Response = autorest.Response{Response: resp}
1106	return
1107}
1108
1109// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1110// GetTableValuedFunction retrieves the specified table valued function from the Data Lake Analytics catalog.
1111//
1112// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
1113// of the database containing the table valued function. schemaName is the name of the schema containing the table
1114// valued function. tableValuedFunctionName is the name of the tableValuedFunction.
1115func (client Client) GetTableValuedFunction(ctx context.Context, accountName string, databaseName string, schemaName string, tableValuedFunctionName string) (result USQLTableValuedFunction, err error) {
1116	req, err := client.GetTableValuedFunctionPreparer(ctx, accountName, databaseName, schemaName, tableValuedFunctionName)
1117	if err != nil {
1118		err = autorest.NewErrorWithError(err, "catalog.Client", "GetTableValuedFunction", nil, "Failure preparing request")
1119		return
1120	}
1121
1122	resp, err := client.GetTableValuedFunctionSender(req)
1123	if err != nil {
1124		result.Response = autorest.Response{Response: resp}
1125		err = autorest.NewErrorWithError(err, "catalog.Client", "GetTableValuedFunction", resp, "Failure sending request")
1126		return
1127	}
1128
1129	result, err = client.GetTableValuedFunctionResponder(resp)
1130	if err != nil {
1131		err = autorest.NewErrorWithError(err, "catalog.Client", "GetTableValuedFunction", resp, "Failure responding to request")
1132	}
1133
1134	return
1135}
1136
1137// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1138// GetTableValuedFunctionPreparer prepares the GetTableValuedFunction request.
1139func (client Client) GetTableValuedFunctionPreparer(ctx context.Context, accountName string, databaseName string, schemaName string, tableValuedFunctionName string) (*http.Request, error) {
1140	urlParameters := map[string]interface{}{
1141		"accountName":          accountName,
1142		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
1143	}
1144
1145	pathParameters := map[string]interface{}{
1146		"databaseName":            autorest.Encode("path", databaseName),
1147		"schemaName":              autorest.Encode("path", schemaName),
1148		"tableValuedFunctionName": autorest.Encode("path", tableValuedFunctionName),
1149	}
1150
1151	const APIVersion = "2015-10-01-preview"
1152	queryParameters := map[string]interface{}{
1153		"api-version": APIVersion,
1154	}
1155
1156	preparer := autorest.CreatePreparer(
1157		autorest.AsGet(),
1158		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
1159		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tablevaluedfunctions/{tableValuedFunctionName}", pathParameters),
1160		autorest.WithQueryParameters(queryParameters))
1161	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1162}
1163
1164// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1165// GetTableValuedFunctionSender sends the GetTableValuedFunction request. The method will close the
1166// http.Response Body if it receives an error.
1167func (client Client) GetTableValuedFunctionSender(req *http.Request) (*http.Response, error) {
1168	return autorest.SendWithSender(client, req,
1169		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1170}
1171
1172// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1173// GetTableValuedFunctionResponder handles the response to the GetTableValuedFunction request. The method always
1174// closes the http.Response Body.
1175func (client Client) GetTableValuedFunctionResponder(resp *http.Response) (result USQLTableValuedFunction, err error) {
1176	err = autorest.Respond(
1177		resp,
1178		client.ByInspecting(),
1179		azure.WithErrorUnlessStatusCode(http.StatusOK),
1180		autorest.ByUnmarshallingJSON(&result),
1181		autorest.ByClosing())
1182	result.Response = autorest.Response{Response: resp}
1183	return
1184}
1185
1186// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1187// GetView retrieves the specified view from the Data Lake Analytics catalog.
1188//
1189// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
1190// of the database containing the view. schemaName is the name of the schema containing the view. viewName is the
1191// name of the view.
1192func (client Client) GetView(ctx context.Context, accountName string, databaseName string, schemaName string, viewName string) (result USQLView, err error) {
1193	req, err := client.GetViewPreparer(ctx, accountName, databaseName, schemaName, viewName)
1194	if err != nil {
1195		err = autorest.NewErrorWithError(err, "catalog.Client", "GetView", nil, "Failure preparing request")
1196		return
1197	}
1198
1199	resp, err := client.GetViewSender(req)
1200	if err != nil {
1201		result.Response = autorest.Response{Response: resp}
1202		err = autorest.NewErrorWithError(err, "catalog.Client", "GetView", resp, "Failure sending request")
1203		return
1204	}
1205
1206	result, err = client.GetViewResponder(resp)
1207	if err != nil {
1208		err = autorest.NewErrorWithError(err, "catalog.Client", "GetView", resp, "Failure responding to request")
1209	}
1210
1211	return
1212}
1213
1214// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1215// GetViewPreparer prepares the GetView request.
1216func (client Client) GetViewPreparer(ctx context.Context, accountName string, databaseName string, schemaName string, viewName string) (*http.Request, error) {
1217	urlParameters := map[string]interface{}{
1218		"accountName":          accountName,
1219		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
1220	}
1221
1222	pathParameters := map[string]interface{}{
1223		"databaseName": autorest.Encode("path", databaseName),
1224		"schemaName":   autorest.Encode("path", schemaName),
1225		"viewName":     autorest.Encode("path", viewName),
1226	}
1227
1228	const APIVersion = "2015-10-01-preview"
1229	queryParameters := map[string]interface{}{
1230		"api-version": APIVersion,
1231	}
1232
1233	preparer := autorest.CreatePreparer(
1234		autorest.AsGet(),
1235		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
1236		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/views/{viewName}", pathParameters),
1237		autorest.WithQueryParameters(queryParameters))
1238	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1239}
1240
1241// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1242// GetViewSender sends the GetView request. The method will close the
1243// http.Response Body if it receives an error.
1244func (client Client) GetViewSender(req *http.Request) (*http.Response, error) {
1245	return autorest.SendWithSender(client, req,
1246		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1247}
1248
1249// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1250// GetViewResponder handles the response to the GetView request. The method always
1251// closes the http.Response Body.
1252func (client Client) GetViewResponder(resp *http.Response) (result USQLView, err error) {
1253	err = autorest.Respond(
1254		resp,
1255		client.ByInspecting(),
1256		azure.WithErrorUnlessStatusCode(http.StatusOK),
1257		autorest.ByUnmarshallingJSON(&result),
1258		autorest.ByClosing())
1259	result.Response = autorest.Response{Response: resp}
1260	return
1261}
1262
1263// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1264// ListAssemblies retrieves the list of assemblies from the Data Lake Analytics catalog.
1265//
1266// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
1267// of the database containing the assembly. filter is oData filter. Optional. top is the number of items to return.
1268// Optional. skip is the number of items to skip over before returning elements. Optional. expand is oData
1269// expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would
1270// expand Product data in line with each Category entry. Optional. selectParameter is oData Select statement.
1271// Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description.
1272// Optional. orderby is orderBy clause. One or more comma-separated expressions with an optional "asc" (the
1273// default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1274// desc. Optional. count is the Boolean value of true or false to request a count of the matching resources
1275// included with the resources in the response, e.g. Categories?$count=true. Optional.
1276func (client Client) ListAssemblies(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLAssemblyListPage, err error) {
1277	result.fn = client.listAssembliesNextResults
1278	req, err := client.ListAssembliesPreparer(ctx, accountName, databaseName, filter, top, skip, expand, selectParameter, orderby, count)
1279	if err != nil {
1280		err = autorest.NewErrorWithError(err, "catalog.Client", "ListAssemblies", nil, "Failure preparing request")
1281		return
1282	}
1283
1284	resp, err := client.ListAssembliesSender(req)
1285	if err != nil {
1286		result.ual.Response = autorest.Response{Response: resp}
1287		err = autorest.NewErrorWithError(err, "catalog.Client", "ListAssemblies", resp, "Failure sending request")
1288		return
1289	}
1290
1291	result.ual, err = client.ListAssembliesResponder(resp)
1292	if err != nil {
1293		err = autorest.NewErrorWithError(err, "catalog.Client", "ListAssemblies", resp, "Failure responding to request")
1294	}
1295
1296	return
1297}
1298
1299// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1300// ListAssembliesPreparer prepares the ListAssemblies request.
1301func (client Client) ListAssembliesPreparer(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (*http.Request, error) {
1302	urlParameters := map[string]interface{}{
1303		"accountName":          accountName,
1304		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
1305	}
1306
1307	pathParameters := map[string]interface{}{
1308		"databaseName": autorest.Encode("path", databaseName),
1309	}
1310
1311	const APIVersion = "2015-10-01-preview"
1312	queryParameters := map[string]interface{}{
1313		"api-version": APIVersion,
1314	}
1315	if len(filter) > 0 {
1316		queryParameters["$filter"] = autorest.Encode("query", filter)
1317	}
1318	if top != nil {
1319		queryParameters["$top"] = autorest.Encode("query", *top)
1320	}
1321	if skip != nil {
1322		queryParameters["$skip"] = autorest.Encode("query", *skip)
1323	}
1324	if len(expand) > 0 {
1325		queryParameters["$expand"] = autorest.Encode("query", expand)
1326	}
1327	if len(selectParameter) > 0 {
1328		queryParameters["$select"] = autorest.Encode("query", selectParameter)
1329	}
1330	if len(orderby) > 0 {
1331		queryParameters["$orderby"] = autorest.Encode("query", orderby)
1332	}
1333	if count != nil {
1334		queryParameters["$count"] = autorest.Encode("query", *count)
1335	}
1336
1337	preparer := autorest.CreatePreparer(
1338		autorest.AsGet(),
1339		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
1340		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/assemblies", pathParameters),
1341		autorest.WithQueryParameters(queryParameters))
1342	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1343}
1344
1345// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1346// ListAssembliesSender sends the ListAssemblies request. The method will close the
1347// http.Response Body if it receives an error.
1348func (client Client) ListAssembliesSender(req *http.Request) (*http.Response, error) {
1349	return autorest.SendWithSender(client, req,
1350		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1351}
1352
1353// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1354// ListAssembliesResponder handles the response to the ListAssemblies request. The method always
1355// closes the http.Response Body.
1356func (client Client) ListAssembliesResponder(resp *http.Response) (result USQLAssemblyList, err error) {
1357	err = autorest.Respond(
1358		resp,
1359		client.ByInspecting(),
1360		azure.WithErrorUnlessStatusCode(http.StatusOK),
1361		autorest.ByUnmarshallingJSON(&result),
1362		autorest.ByClosing())
1363	result.Response = autorest.Response{Response: resp}
1364	return
1365}
1366
1367// listAssembliesNextResults retrieves the next set of results, if any.
1368func (client Client) listAssembliesNextResults(lastResults USQLAssemblyList) (result USQLAssemblyList, err error) {
1369	req, err := lastResults.uSQLAssemblyListPreparer()
1370	if err != nil {
1371		return result, autorest.NewErrorWithError(err, "catalog.Client", "listAssembliesNextResults", nil, "Failure preparing next results request")
1372	}
1373	if req == nil {
1374		return
1375	}
1376	resp, err := client.ListAssembliesSender(req)
1377	if err != nil {
1378		result.Response = autorest.Response{Response: resp}
1379		return result, autorest.NewErrorWithError(err, "catalog.Client", "listAssembliesNextResults", resp, "Failure sending next results request")
1380	}
1381	result, err = client.ListAssembliesResponder(resp)
1382	if err != nil {
1383		err = autorest.NewErrorWithError(err, "catalog.Client", "listAssembliesNextResults", resp, "Failure responding to next results request")
1384	}
1385	return
1386}
1387
1388// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1389// ListAssembliesComplete enumerates all values, automatically crossing page boundaries as required.
1390func (client Client) ListAssembliesComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLAssemblyListIterator, err error) {
1391	result.page, err = client.ListAssemblies(ctx, accountName, databaseName, filter, top, skip, expand, selectParameter, orderby, count)
1392	return
1393}
1394
1395// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1396// ListCredentials retrieves the list of credentials from the Data Lake Analytics catalog.
1397//
1398// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
1399// of the database containing the schema. filter is oData filter. Optional. top is the number of items to return.
1400// Optional. skip is the number of items to skip over before returning elements. Optional. expand is oData
1401// expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would
1402// expand Product data in line with each Category entry. Optional. selectParameter is oData Select statement.
1403// Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description.
1404// Optional. orderby is orderBy clause. One or more comma-separated expressions with an optional "asc" (the
1405// default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1406// desc. Optional. count is the Boolean value of true or false to request a count of the matching resources
1407// included with the resources in the response, e.g. Categories?$count=true. Optional.
1408func (client Client) ListCredentials(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLCredentialListPage, err error) {
1409	result.fn = client.listCredentialsNextResults
1410	req, err := client.ListCredentialsPreparer(ctx, accountName, databaseName, filter, top, skip, expand, selectParameter, orderby, count)
1411	if err != nil {
1412		err = autorest.NewErrorWithError(err, "catalog.Client", "ListCredentials", nil, "Failure preparing request")
1413		return
1414	}
1415
1416	resp, err := client.ListCredentialsSender(req)
1417	if err != nil {
1418		result.ucl.Response = autorest.Response{Response: resp}
1419		err = autorest.NewErrorWithError(err, "catalog.Client", "ListCredentials", resp, "Failure sending request")
1420		return
1421	}
1422
1423	result.ucl, err = client.ListCredentialsResponder(resp)
1424	if err != nil {
1425		err = autorest.NewErrorWithError(err, "catalog.Client", "ListCredentials", resp, "Failure responding to request")
1426	}
1427
1428	return
1429}
1430
1431// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1432// ListCredentialsPreparer prepares the ListCredentials request.
1433func (client Client) ListCredentialsPreparer(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (*http.Request, error) {
1434	urlParameters := map[string]interface{}{
1435		"accountName":          accountName,
1436		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
1437	}
1438
1439	pathParameters := map[string]interface{}{
1440		"databaseName": autorest.Encode("path", databaseName),
1441	}
1442
1443	const APIVersion = "2015-10-01-preview"
1444	queryParameters := map[string]interface{}{
1445		"api-version": APIVersion,
1446	}
1447	if len(filter) > 0 {
1448		queryParameters["$filter"] = autorest.Encode("query", filter)
1449	}
1450	if top != nil {
1451		queryParameters["$top"] = autorest.Encode("query", *top)
1452	}
1453	if skip != nil {
1454		queryParameters["$skip"] = autorest.Encode("query", *skip)
1455	}
1456	if len(expand) > 0 {
1457		queryParameters["$expand"] = autorest.Encode("query", expand)
1458	}
1459	if len(selectParameter) > 0 {
1460		queryParameters["$select"] = autorest.Encode("query", selectParameter)
1461	}
1462	if len(orderby) > 0 {
1463		queryParameters["$orderby"] = autorest.Encode("query", orderby)
1464	}
1465	if count != nil {
1466		queryParameters["$count"] = autorest.Encode("query", *count)
1467	}
1468
1469	preparer := autorest.CreatePreparer(
1470		autorest.AsGet(),
1471		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
1472		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/credentials", pathParameters),
1473		autorest.WithQueryParameters(queryParameters))
1474	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1475}
1476
1477// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1478// ListCredentialsSender sends the ListCredentials request. The method will close the
1479// http.Response Body if it receives an error.
1480func (client Client) ListCredentialsSender(req *http.Request) (*http.Response, error) {
1481	return autorest.SendWithSender(client, req,
1482		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1483}
1484
1485// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1486// ListCredentialsResponder handles the response to the ListCredentials request. The method always
1487// closes the http.Response Body.
1488func (client Client) ListCredentialsResponder(resp *http.Response) (result USQLCredentialList, err error) {
1489	err = autorest.Respond(
1490		resp,
1491		client.ByInspecting(),
1492		azure.WithErrorUnlessStatusCode(http.StatusOK),
1493		autorest.ByUnmarshallingJSON(&result),
1494		autorest.ByClosing())
1495	result.Response = autorest.Response{Response: resp}
1496	return
1497}
1498
1499// listCredentialsNextResults retrieves the next set of results, if any.
1500func (client Client) listCredentialsNextResults(lastResults USQLCredentialList) (result USQLCredentialList, err error) {
1501	req, err := lastResults.uSQLCredentialListPreparer()
1502	if err != nil {
1503		return result, autorest.NewErrorWithError(err, "catalog.Client", "listCredentialsNextResults", nil, "Failure preparing next results request")
1504	}
1505	if req == nil {
1506		return
1507	}
1508	resp, err := client.ListCredentialsSender(req)
1509	if err != nil {
1510		result.Response = autorest.Response{Response: resp}
1511		return result, autorest.NewErrorWithError(err, "catalog.Client", "listCredentialsNextResults", resp, "Failure sending next results request")
1512	}
1513	result, err = client.ListCredentialsResponder(resp)
1514	if err != nil {
1515		err = autorest.NewErrorWithError(err, "catalog.Client", "listCredentialsNextResults", resp, "Failure responding to next results request")
1516	}
1517	return
1518}
1519
1520// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1521// ListCredentialsComplete enumerates all values, automatically crossing page boundaries as required.
1522func (client Client) ListCredentialsComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLCredentialListIterator, err error) {
1523	result.page, err = client.ListCredentials(ctx, accountName, databaseName, filter, top, skip, expand, selectParameter, orderby, count)
1524	return
1525}
1526
1527// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1528// ListDatabases retrieves the list of databases from the Data Lake Analytics catalog.
1529//
1530// accountName is the Azure Data Lake Analytics account to execute catalog operations on. filter is oData filter.
1531// Optional. top is the number of items to return. Optional. skip is the number of items to skip over before
1532// returning elements. Optional. expand is oData expansion. Expand related resources in line with the retrieved
1533// resources, e.g. Categories?$expand=Products would expand Product data in line with each Category entry.
1534// Optional. selectParameter is oData Select statement. Limits the properties on each entry to just those
1535// requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One or more
1536// comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the
1537// values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false
1538// to request a count of the matching resources included with the resources in the response, e.g.
1539// Categories?$count=true. Optional.
1540func (client Client) ListDatabases(ctx context.Context, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLDatabaseListPage, err error) {
1541	result.fn = client.listDatabasesNextResults
1542	req, err := client.ListDatabasesPreparer(ctx, accountName, filter, top, skip, expand, selectParameter, orderby, count)
1543	if err != nil {
1544		err = autorest.NewErrorWithError(err, "catalog.Client", "ListDatabases", nil, "Failure preparing request")
1545		return
1546	}
1547
1548	resp, err := client.ListDatabasesSender(req)
1549	if err != nil {
1550		result.udl.Response = autorest.Response{Response: resp}
1551		err = autorest.NewErrorWithError(err, "catalog.Client", "ListDatabases", resp, "Failure sending request")
1552		return
1553	}
1554
1555	result.udl, err = client.ListDatabasesResponder(resp)
1556	if err != nil {
1557		err = autorest.NewErrorWithError(err, "catalog.Client", "ListDatabases", resp, "Failure responding to request")
1558	}
1559
1560	return
1561}
1562
1563// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1564// ListDatabasesPreparer prepares the ListDatabases request.
1565func (client Client) ListDatabasesPreparer(ctx context.Context, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (*http.Request, error) {
1566	urlParameters := map[string]interface{}{
1567		"accountName":          accountName,
1568		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
1569	}
1570
1571	const APIVersion = "2015-10-01-preview"
1572	queryParameters := map[string]interface{}{
1573		"api-version": APIVersion,
1574	}
1575	if len(filter) > 0 {
1576		queryParameters["$filter"] = autorest.Encode("query", filter)
1577	}
1578	if top != nil {
1579		queryParameters["$top"] = autorest.Encode("query", *top)
1580	}
1581	if skip != nil {
1582		queryParameters["$skip"] = autorest.Encode("query", *skip)
1583	}
1584	if len(expand) > 0 {
1585		queryParameters["$expand"] = autorest.Encode("query", expand)
1586	}
1587	if len(selectParameter) > 0 {
1588		queryParameters["$select"] = autorest.Encode("query", selectParameter)
1589	}
1590	if len(orderby) > 0 {
1591		queryParameters["$orderby"] = autorest.Encode("query", orderby)
1592	}
1593	if count != nil {
1594		queryParameters["$count"] = autorest.Encode("query", *count)
1595	}
1596
1597	preparer := autorest.CreatePreparer(
1598		autorest.AsGet(),
1599		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
1600		autorest.WithPath("/catalog/usql/databases"),
1601		autorest.WithQueryParameters(queryParameters))
1602	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1603}
1604
1605// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1606// ListDatabasesSender sends the ListDatabases request. The method will close the
1607// http.Response Body if it receives an error.
1608func (client Client) ListDatabasesSender(req *http.Request) (*http.Response, error) {
1609	return autorest.SendWithSender(client, req,
1610		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1611}
1612
1613// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1614// ListDatabasesResponder handles the response to the ListDatabases request. The method always
1615// closes the http.Response Body.
1616func (client Client) ListDatabasesResponder(resp *http.Response) (result USQLDatabaseList, err error) {
1617	err = autorest.Respond(
1618		resp,
1619		client.ByInspecting(),
1620		azure.WithErrorUnlessStatusCode(http.StatusOK),
1621		autorest.ByUnmarshallingJSON(&result),
1622		autorest.ByClosing())
1623	result.Response = autorest.Response{Response: resp}
1624	return
1625}
1626
1627// listDatabasesNextResults retrieves the next set of results, if any.
1628func (client Client) listDatabasesNextResults(lastResults USQLDatabaseList) (result USQLDatabaseList, err error) {
1629	req, err := lastResults.uSQLDatabaseListPreparer()
1630	if err != nil {
1631		return result, autorest.NewErrorWithError(err, "catalog.Client", "listDatabasesNextResults", nil, "Failure preparing next results request")
1632	}
1633	if req == nil {
1634		return
1635	}
1636	resp, err := client.ListDatabasesSender(req)
1637	if err != nil {
1638		result.Response = autorest.Response{Response: resp}
1639		return result, autorest.NewErrorWithError(err, "catalog.Client", "listDatabasesNextResults", resp, "Failure sending next results request")
1640	}
1641	result, err = client.ListDatabasesResponder(resp)
1642	if err != nil {
1643		err = autorest.NewErrorWithError(err, "catalog.Client", "listDatabasesNextResults", resp, "Failure responding to next results request")
1644	}
1645	return
1646}
1647
1648// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1649// ListDatabasesComplete enumerates all values, automatically crossing page boundaries as required.
1650func (client Client) ListDatabasesComplete(ctx context.Context, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLDatabaseListIterator, err error) {
1651	result.page, err = client.ListDatabases(ctx, accountName, filter, top, skip, expand, selectParameter, orderby, count)
1652	return
1653}
1654
1655// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1656// ListExternalDataSources retrieves the list of external data sources from the Data Lake Analytics catalog.
1657//
1658// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
1659// of the database containing the external data sources. filter is oData filter. Optional. top is the number of
1660// items to return. Optional. skip is the number of items to skip over before returning elements. Optional. expand
1661// is oData expansion. Expand related resources in line with the retrieved resources, e.g.
1662// Categories?$expand=Products would expand Product data in line with each Category entry. Optional.
1663// selectParameter is oData Select statement. Limits the properties on each entry to just those requested, e.g.
1664// Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One or more comma-separated
1665// expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted,
1666// e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false to request a
1667// count of the matching resources included with the resources in the response, e.g. Categories?$count=true.
1668// Optional.
1669func (client Client) ListExternalDataSources(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLExternalDataSourceListPage, err error) {
1670	result.fn = client.listExternalDataSourcesNextResults
1671	req, err := client.ListExternalDataSourcesPreparer(ctx, accountName, databaseName, filter, top, skip, expand, selectParameter, orderby, count)
1672	if err != nil {
1673		err = autorest.NewErrorWithError(err, "catalog.Client", "ListExternalDataSources", nil, "Failure preparing request")
1674		return
1675	}
1676
1677	resp, err := client.ListExternalDataSourcesSender(req)
1678	if err != nil {
1679		result.uedsl.Response = autorest.Response{Response: resp}
1680		err = autorest.NewErrorWithError(err, "catalog.Client", "ListExternalDataSources", resp, "Failure sending request")
1681		return
1682	}
1683
1684	result.uedsl, err = client.ListExternalDataSourcesResponder(resp)
1685	if err != nil {
1686		err = autorest.NewErrorWithError(err, "catalog.Client", "ListExternalDataSources", resp, "Failure responding to request")
1687	}
1688
1689	return
1690}
1691
1692// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1693// ListExternalDataSourcesPreparer prepares the ListExternalDataSources request.
1694func (client Client) ListExternalDataSourcesPreparer(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (*http.Request, error) {
1695	urlParameters := map[string]interface{}{
1696		"accountName":          accountName,
1697		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
1698	}
1699
1700	pathParameters := map[string]interface{}{
1701		"databaseName": autorest.Encode("path", databaseName),
1702	}
1703
1704	const APIVersion = "2015-10-01-preview"
1705	queryParameters := map[string]interface{}{
1706		"api-version": APIVersion,
1707	}
1708	if len(filter) > 0 {
1709		queryParameters["$filter"] = autorest.Encode("query", filter)
1710	}
1711	if top != nil {
1712		queryParameters["$top"] = autorest.Encode("query", *top)
1713	}
1714	if skip != nil {
1715		queryParameters["$skip"] = autorest.Encode("query", *skip)
1716	}
1717	if len(expand) > 0 {
1718		queryParameters["$expand"] = autorest.Encode("query", expand)
1719	}
1720	if len(selectParameter) > 0 {
1721		queryParameters["$select"] = autorest.Encode("query", selectParameter)
1722	}
1723	if len(orderby) > 0 {
1724		queryParameters["$orderby"] = autorest.Encode("query", orderby)
1725	}
1726	if count != nil {
1727		queryParameters["$count"] = autorest.Encode("query", *count)
1728	}
1729
1730	preparer := autorest.CreatePreparer(
1731		autorest.AsGet(),
1732		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
1733		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/externaldatasources", pathParameters),
1734		autorest.WithQueryParameters(queryParameters))
1735	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1736}
1737
1738// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1739// ListExternalDataSourcesSender sends the ListExternalDataSources request. The method will close the
1740// http.Response Body if it receives an error.
1741func (client Client) ListExternalDataSourcesSender(req *http.Request) (*http.Response, error) {
1742	return autorest.SendWithSender(client, req,
1743		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1744}
1745
1746// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1747// ListExternalDataSourcesResponder handles the response to the ListExternalDataSources request. The method always
1748// closes the http.Response Body.
1749func (client Client) ListExternalDataSourcesResponder(resp *http.Response) (result USQLExternalDataSourceList, err error) {
1750	err = autorest.Respond(
1751		resp,
1752		client.ByInspecting(),
1753		azure.WithErrorUnlessStatusCode(http.StatusOK),
1754		autorest.ByUnmarshallingJSON(&result),
1755		autorest.ByClosing())
1756	result.Response = autorest.Response{Response: resp}
1757	return
1758}
1759
1760// listExternalDataSourcesNextResults retrieves the next set of results, if any.
1761func (client Client) listExternalDataSourcesNextResults(lastResults USQLExternalDataSourceList) (result USQLExternalDataSourceList, err error) {
1762	req, err := lastResults.uSQLExternalDataSourceListPreparer()
1763	if err != nil {
1764		return result, autorest.NewErrorWithError(err, "catalog.Client", "listExternalDataSourcesNextResults", nil, "Failure preparing next results request")
1765	}
1766	if req == nil {
1767		return
1768	}
1769	resp, err := client.ListExternalDataSourcesSender(req)
1770	if err != nil {
1771		result.Response = autorest.Response{Response: resp}
1772		return result, autorest.NewErrorWithError(err, "catalog.Client", "listExternalDataSourcesNextResults", resp, "Failure sending next results request")
1773	}
1774	result, err = client.ListExternalDataSourcesResponder(resp)
1775	if err != nil {
1776		err = autorest.NewErrorWithError(err, "catalog.Client", "listExternalDataSourcesNextResults", resp, "Failure responding to next results request")
1777	}
1778	return
1779}
1780
1781// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1782// ListExternalDataSourcesComplete enumerates all values, automatically crossing page boundaries as required.
1783func (client Client) ListExternalDataSourcesComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLExternalDataSourceListIterator, err error) {
1784	result.page, err = client.ListExternalDataSources(ctx, accountName, databaseName, filter, top, skip, expand, selectParameter, orderby, count)
1785	return
1786}
1787
1788// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1789// ListProcedures retrieves the list of procedures from the Data Lake Analytics catalog.
1790//
1791// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
1792// of the database containing the procedures. schemaName is the name of the schema containing the procedures.
1793// filter is oData filter. Optional. top is the number of items to return. Optional. skip is the number of items to
1794// skip over before returning elements. Optional. expand is oData expansion. Expand related resources in line with
1795// the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category
1796// entry. Optional. selectParameter is oData Select statement. Limits the properties on each entry to just those
1797// requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One or more
1798// comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the
1799// values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false
1800// to request a count of the matching resources included with the resources in the response, e.g.
1801// Categories?$count=true. Optional.
1802func (client Client) ListProcedures(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLProcedureListPage, err error) {
1803	result.fn = client.listProceduresNextResults
1804	req, err := client.ListProceduresPreparer(ctx, accountName, databaseName, schemaName, filter, top, skip, expand, selectParameter, orderby, count)
1805	if err != nil {
1806		err = autorest.NewErrorWithError(err, "catalog.Client", "ListProcedures", nil, "Failure preparing request")
1807		return
1808	}
1809
1810	resp, err := client.ListProceduresSender(req)
1811	if err != nil {
1812		result.upl.Response = autorest.Response{Response: resp}
1813		err = autorest.NewErrorWithError(err, "catalog.Client", "ListProcedures", resp, "Failure sending request")
1814		return
1815	}
1816
1817	result.upl, err = client.ListProceduresResponder(resp)
1818	if err != nil {
1819		err = autorest.NewErrorWithError(err, "catalog.Client", "ListProcedures", resp, "Failure responding to request")
1820	}
1821
1822	return
1823}
1824
1825// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1826// ListProceduresPreparer prepares the ListProcedures request.
1827func (client Client) ListProceduresPreparer(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (*http.Request, error) {
1828	urlParameters := map[string]interface{}{
1829		"accountName":          accountName,
1830		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
1831	}
1832
1833	pathParameters := map[string]interface{}{
1834		"databaseName": autorest.Encode("path", databaseName),
1835		"schemaName":   autorest.Encode("path", schemaName),
1836	}
1837
1838	const APIVersion = "2015-10-01-preview"
1839	queryParameters := map[string]interface{}{
1840		"api-version": APIVersion,
1841	}
1842	if len(filter) > 0 {
1843		queryParameters["$filter"] = autorest.Encode("query", filter)
1844	}
1845	if top != nil {
1846		queryParameters["$top"] = autorest.Encode("query", *top)
1847	}
1848	if skip != nil {
1849		queryParameters["$skip"] = autorest.Encode("query", *skip)
1850	}
1851	if len(expand) > 0 {
1852		queryParameters["$expand"] = autorest.Encode("query", expand)
1853	}
1854	if len(selectParameter) > 0 {
1855		queryParameters["$select"] = autorest.Encode("query", selectParameter)
1856	}
1857	if len(orderby) > 0 {
1858		queryParameters["$orderby"] = autorest.Encode("query", orderby)
1859	}
1860	if count != nil {
1861		queryParameters["$count"] = autorest.Encode("query", *count)
1862	}
1863
1864	preparer := autorest.CreatePreparer(
1865		autorest.AsGet(),
1866		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
1867		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/procedures", pathParameters),
1868		autorest.WithQueryParameters(queryParameters))
1869	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1870}
1871
1872// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1873// ListProceduresSender sends the ListProcedures request. The method will close the
1874// http.Response Body if it receives an error.
1875func (client Client) ListProceduresSender(req *http.Request) (*http.Response, error) {
1876	return autorest.SendWithSender(client, req,
1877		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1878}
1879
1880// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1881// ListProceduresResponder handles the response to the ListProcedures request. The method always
1882// closes the http.Response Body.
1883func (client Client) ListProceduresResponder(resp *http.Response) (result USQLProcedureList, err error) {
1884	err = autorest.Respond(
1885		resp,
1886		client.ByInspecting(),
1887		azure.WithErrorUnlessStatusCode(http.StatusOK),
1888		autorest.ByUnmarshallingJSON(&result),
1889		autorest.ByClosing())
1890	result.Response = autorest.Response{Response: resp}
1891	return
1892}
1893
1894// listProceduresNextResults retrieves the next set of results, if any.
1895func (client Client) listProceduresNextResults(lastResults USQLProcedureList) (result USQLProcedureList, err error) {
1896	req, err := lastResults.uSQLProcedureListPreparer()
1897	if err != nil {
1898		return result, autorest.NewErrorWithError(err, "catalog.Client", "listProceduresNextResults", nil, "Failure preparing next results request")
1899	}
1900	if req == nil {
1901		return
1902	}
1903	resp, err := client.ListProceduresSender(req)
1904	if err != nil {
1905		result.Response = autorest.Response{Response: resp}
1906		return result, autorest.NewErrorWithError(err, "catalog.Client", "listProceduresNextResults", resp, "Failure sending next results request")
1907	}
1908	result, err = client.ListProceduresResponder(resp)
1909	if err != nil {
1910		err = autorest.NewErrorWithError(err, "catalog.Client", "listProceduresNextResults", resp, "Failure responding to next results request")
1911	}
1912	return
1913}
1914
1915// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1916// ListProceduresComplete enumerates all values, automatically crossing page boundaries as required.
1917func (client Client) ListProceduresComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLProcedureListIterator, err error) {
1918	result.page, err = client.ListProcedures(ctx, accountName, databaseName, schemaName, filter, top, skip, expand, selectParameter, orderby, count)
1919	return
1920}
1921
1922// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1923// ListSchemas retrieves the list of schemas from the Data Lake Analytics catalog.
1924//
1925// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
1926// of the database containing the schema. filter is oData filter. Optional. top is the number of items to return.
1927// Optional. skip is the number of items to skip over before returning elements. Optional. expand is oData
1928// expansion. Expand related resources in line with the retrieved resources, e.g. Categories?$expand=Products would
1929// expand Product data in line with each Category entry. Optional. selectParameter is oData Select statement.
1930// Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description.
1931// Optional. orderby is orderBy clause. One or more comma-separated expressions with an optional "asc" (the
1932// default) or "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1933// desc. Optional. count is the Boolean value of true or false to request a count of the matching resources
1934// included with the resources in the response, e.g. Categories?$count=true. Optional.
1935func (client Client) ListSchemas(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLSchemaListPage, err error) {
1936	result.fn = client.listSchemasNextResults
1937	req, err := client.ListSchemasPreparer(ctx, accountName, databaseName, filter, top, skip, expand, selectParameter, orderby, count)
1938	if err != nil {
1939		err = autorest.NewErrorWithError(err, "catalog.Client", "ListSchemas", nil, "Failure preparing request")
1940		return
1941	}
1942
1943	resp, err := client.ListSchemasSender(req)
1944	if err != nil {
1945		result.usl.Response = autorest.Response{Response: resp}
1946		err = autorest.NewErrorWithError(err, "catalog.Client", "ListSchemas", resp, "Failure sending request")
1947		return
1948	}
1949
1950	result.usl, err = client.ListSchemasResponder(resp)
1951	if err != nil {
1952		err = autorest.NewErrorWithError(err, "catalog.Client", "ListSchemas", resp, "Failure responding to request")
1953	}
1954
1955	return
1956}
1957
1958// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
1959// ListSchemasPreparer prepares the ListSchemas request.
1960func (client Client) ListSchemasPreparer(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (*http.Request, error) {
1961	urlParameters := map[string]interface{}{
1962		"accountName":          accountName,
1963		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
1964	}
1965
1966	pathParameters := map[string]interface{}{
1967		"databaseName": autorest.Encode("path", databaseName),
1968	}
1969
1970	const APIVersion = "2015-10-01-preview"
1971	queryParameters := map[string]interface{}{
1972		"api-version": APIVersion,
1973	}
1974	if len(filter) > 0 {
1975		queryParameters["$filter"] = autorest.Encode("query", filter)
1976	}
1977	if top != nil {
1978		queryParameters["$top"] = autorest.Encode("query", *top)
1979	}
1980	if skip != nil {
1981		queryParameters["$skip"] = autorest.Encode("query", *skip)
1982	}
1983	if len(expand) > 0 {
1984		queryParameters["$expand"] = autorest.Encode("query", expand)
1985	}
1986	if len(selectParameter) > 0 {
1987		queryParameters["$select"] = autorest.Encode("query", selectParameter)
1988	}
1989	if len(orderby) > 0 {
1990		queryParameters["$orderby"] = autorest.Encode("query", orderby)
1991	}
1992	if count != nil {
1993		queryParameters["$count"] = autorest.Encode("query", *count)
1994	}
1995
1996	preparer := autorest.CreatePreparer(
1997		autorest.AsGet(),
1998		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
1999		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas", pathParameters),
2000		autorest.WithQueryParameters(queryParameters))
2001	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2002}
2003
2004// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2005// ListSchemasSender sends the ListSchemas request. The method will close the
2006// http.Response Body if it receives an error.
2007func (client Client) ListSchemasSender(req *http.Request) (*http.Response, error) {
2008	return autorest.SendWithSender(client, req,
2009		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2010}
2011
2012// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2013// ListSchemasResponder handles the response to the ListSchemas request. The method always
2014// closes the http.Response Body.
2015func (client Client) ListSchemasResponder(resp *http.Response) (result USQLSchemaList, err error) {
2016	err = autorest.Respond(
2017		resp,
2018		client.ByInspecting(),
2019		azure.WithErrorUnlessStatusCode(http.StatusOK),
2020		autorest.ByUnmarshallingJSON(&result),
2021		autorest.ByClosing())
2022	result.Response = autorest.Response{Response: resp}
2023	return
2024}
2025
2026// listSchemasNextResults retrieves the next set of results, if any.
2027func (client Client) listSchemasNextResults(lastResults USQLSchemaList) (result USQLSchemaList, err error) {
2028	req, err := lastResults.uSQLSchemaListPreparer()
2029	if err != nil {
2030		return result, autorest.NewErrorWithError(err, "catalog.Client", "listSchemasNextResults", nil, "Failure preparing next results request")
2031	}
2032	if req == nil {
2033		return
2034	}
2035	resp, err := client.ListSchemasSender(req)
2036	if err != nil {
2037		result.Response = autorest.Response{Response: resp}
2038		return result, autorest.NewErrorWithError(err, "catalog.Client", "listSchemasNextResults", resp, "Failure sending next results request")
2039	}
2040	result, err = client.ListSchemasResponder(resp)
2041	if err != nil {
2042		err = autorest.NewErrorWithError(err, "catalog.Client", "listSchemasNextResults", resp, "Failure responding to next results request")
2043	}
2044	return
2045}
2046
2047// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2048// ListSchemasComplete enumerates all values, automatically crossing page boundaries as required.
2049func (client Client) ListSchemasComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLSchemaListIterator, err error) {
2050	result.page, err = client.ListSchemas(ctx, accountName, databaseName, filter, top, skip, expand, selectParameter, orderby, count)
2051	return
2052}
2053
2054// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2055// ListTablePartitions retrieves the list of table partitions from the Data Lake Analytics catalog.
2056//
2057// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
2058// of the database containing the partitions. schemaName is the name of the schema containing the partitions.
2059// tableName is the name of the table containing the partitions. filter is oData filter. Optional. top is the
2060// number of items to return. Optional. skip is the number of items to skip over before returning elements.
2061// Optional. expand is oData expansion. Expand related resources in line with the retrieved resources, e.g.
2062// Categories?$expand=Products would expand Product data in line with each Category entry. Optional.
2063// selectParameter is oData Select statement. Limits the properties on each entry to just those requested, e.g.
2064// Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One or more comma-separated
2065// expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted,
2066// e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false to request a
2067// count of the matching resources included with the resources in the response, e.g. Categories?$count=true.
2068// Optional.
2069func (client Client) ListTablePartitions(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLTablePartitionListPage, err error) {
2070	result.fn = client.listTablePartitionsNextResults
2071	req, err := client.ListTablePartitionsPreparer(ctx, accountName, databaseName, schemaName, tableName, filter, top, skip, expand, selectParameter, orderby, count)
2072	if err != nil {
2073		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTablePartitions", nil, "Failure preparing request")
2074		return
2075	}
2076
2077	resp, err := client.ListTablePartitionsSender(req)
2078	if err != nil {
2079		result.utpl.Response = autorest.Response{Response: resp}
2080		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTablePartitions", resp, "Failure sending request")
2081		return
2082	}
2083
2084	result.utpl, err = client.ListTablePartitionsResponder(resp)
2085	if err != nil {
2086		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTablePartitions", resp, "Failure responding to request")
2087	}
2088
2089	return
2090}
2091
2092// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2093// ListTablePartitionsPreparer prepares the ListTablePartitions request.
2094func (client Client) ListTablePartitionsPreparer(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (*http.Request, error) {
2095	urlParameters := map[string]interface{}{
2096		"accountName":          accountName,
2097		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
2098	}
2099
2100	pathParameters := map[string]interface{}{
2101		"databaseName": autorest.Encode("path", databaseName),
2102		"schemaName":   autorest.Encode("path", schemaName),
2103		"tableName":    autorest.Encode("path", tableName),
2104	}
2105
2106	const APIVersion = "2015-10-01-preview"
2107	queryParameters := map[string]interface{}{
2108		"api-version": APIVersion,
2109	}
2110	if len(filter) > 0 {
2111		queryParameters["$filter"] = autorest.Encode("query", filter)
2112	}
2113	if top != nil {
2114		queryParameters["$top"] = autorest.Encode("query", *top)
2115	}
2116	if skip != nil {
2117		queryParameters["$skip"] = autorest.Encode("query", *skip)
2118	}
2119	if len(expand) > 0 {
2120		queryParameters["$expand"] = autorest.Encode("query", expand)
2121	}
2122	if len(selectParameter) > 0 {
2123		queryParameters["$select"] = autorest.Encode("query", selectParameter)
2124	}
2125	if len(orderby) > 0 {
2126		queryParameters["$orderby"] = autorest.Encode("query", orderby)
2127	}
2128	if count != nil {
2129		queryParameters["$count"] = autorest.Encode("query", *count)
2130	}
2131
2132	preparer := autorest.CreatePreparer(
2133		autorest.AsGet(),
2134		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
2135		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/partitions", pathParameters),
2136		autorest.WithQueryParameters(queryParameters))
2137	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2138}
2139
2140// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2141// ListTablePartitionsSender sends the ListTablePartitions request. The method will close the
2142// http.Response Body if it receives an error.
2143func (client Client) ListTablePartitionsSender(req *http.Request) (*http.Response, error) {
2144	return autorest.SendWithSender(client, req,
2145		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2146}
2147
2148// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2149// ListTablePartitionsResponder handles the response to the ListTablePartitions request. The method always
2150// closes the http.Response Body.
2151func (client Client) ListTablePartitionsResponder(resp *http.Response) (result USQLTablePartitionList, err error) {
2152	err = autorest.Respond(
2153		resp,
2154		client.ByInspecting(),
2155		azure.WithErrorUnlessStatusCode(http.StatusOK),
2156		autorest.ByUnmarshallingJSON(&result),
2157		autorest.ByClosing())
2158	result.Response = autorest.Response{Response: resp}
2159	return
2160}
2161
2162// listTablePartitionsNextResults retrieves the next set of results, if any.
2163func (client Client) listTablePartitionsNextResults(lastResults USQLTablePartitionList) (result USQLTablePartitionList, err error) {
2164	req, err := lastResults.uSQLTablePartitionListPreparer()
2165	if err != nil {
2166		return result, autorest.NewErrorWithError(err, "catalog.Client", "listTablePartitionsNextResults", nil, "Failure preparing next results request")
2167	}
2168	if req == nil {
2169		return
2170	}
2171	resp, err := client.ListTablePartitionsSender(req)
2172	if err != nil {
2173		result.Response = autorest.Response{Response: resp}
2174		return result, autorest.NewErrorWithError(err, "catalog.Client", "listTablePartitionsNextResults", resp, "Failure sending next results request")
2175	}
2176	result, err = client.ListTablePartitionsResponder(resp)
2177	if err != nil {
2178		err = autorest.NewErrorWithError(err, "catalog.Client", "listTablePartitionsNextResults", resp, "Failure responding to next results request")
2179	}
2180	return
2181}
2182
2183// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2184// ListTablePartitionsComplete enumerates all values, automatically crossing page boundaries as required.
2185func (client Client) ListTablePartitionsComplete(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLTablePartitionListIterator, err error) {
2186	result.page, err = client.ListTablePartitions(ctx, accountName, databaseName, schemaName, tableName, filter, top, skip, expand, selectParameter, orderby, count)
2187	return
2188}
2189
2190// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2191// ListTables retrieves the list of tables from the Data Lake Analytics catalog.
2192//
2193// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
2194// of the database containing the tables. schemaName is the name of the schema containing the tables. filter is
2195// oData filter. Optional. top is the number of items to return. Optional. skip is the number of items to skip over
2196// before returning elements. Optional. expand is oData expansion. Expand related resources in line with the
2197// retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category
2198// entry. Optional. selectParameter is oData Select statement. Limits the properties on each entry to just those
2199// requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One or more
2200// comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the
2201// values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false
2202// to request a count of the matching resources included with the resources in the response, e.g.
2203// Categories?$count=true. Optional.
2204func (client Client) ListTables(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLTableListPage, err error) {
2205	result.fn = client.listTablesNextResults
2206	req, err := client.ListTablesPreparer(ctx, accountName, databaseName, schemaName, filter, top, skip, expand, selectParameter, orderby, count)
2207	if err != nil {
2208		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTables", nil, "Failure preparing request")
2209		return
2210	}
2211
2212	resp, err := client.ListTablesSender(req)
2213	if err != nil {
2214		result.utl.Response = autorest.Response{Response: resp}
2215		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTables", resp, "Failure sending request")
2216		return
2217	}
2218
2219	result.utl, err = client.ListTablesResponder(resp)
2220	if err != nil {
2221		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTables", resp, "Failure responding to request")
2222	}
2223
2224	return
2225}
2226
2227// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2228// ListTablesPreparer prepares the ListTables request.
2229func (client Client) ListTablesPreparer(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (*http.Request, error) {
2230	urlParameters := map[string]interface{}{
2231		"accountName":          accountName,
2232		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
2233	}
2234
2235	pathParameters := map[string]interface{}{
2236		"databaseName": autorest.Encode("path", databaseName),
2237		"schemaName":   autorest.Encode("path", schemaName),
2238	}
2239
2240	const APIVersion = "2015-10-01-preview"
2241	queryParameters := map[string]interface{}{
2242		"api-version": APIVersion,
2243	}
2244	if len(filter) > 0 {
2245		queryParameters["$filter"] = autorest.Encode("query", filter)
2246	}
2247	if top != nil {
2248		queryParameters["$top"] = autorest.Encode("query", *top)
2249	}
2250	if skip != nil {
2251		queryParameters["$skip"] = autorest.Encode("query", *skip)
2252	}
2253	if len(expand) > 0 {
2254		queryParameters["$expand"] = autorest.Encode("query", expand)
2255	}
2256	if len(selectParameter) > 0 {
2257		queryParameters["$select"] = autorest.Encode("query", selectParameter)
2258	}
2259	if len(orderby) > 0 {
2260		queryParameters["$orderby"] = autorest.Encode("query", orderby)
2261	}
2262	if count != nil {
2263		queryParameters["$count"] = autorest.Encode("query", *count)
2264	}
2265
2266	preparer := autorest.CreatePreparer(
2267		autorest.AsGet(),
2268		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
2269		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables", pathParameters),
2270		autorest.WithQueryParameters(queryParameters))
2271	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2272}
2273
2274// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2275// ListTablesSender sends the ListTables request. The method will close the
2276// http.Response Body if it receives an error.
2277func (client Client) ListTablesSender(req *http.Request) (*http.Response, error) {
2278	return autorest.SendWithSender(client, req,
2279		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2280}
2281
2282// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2283// ListTablesResponder handles the response to the ListTables request. The method always
2284// closes the http.Response Body.
2285func (client Client) ListTablesResponder(resp *http.Response) (result USQLTableList, err error) {
2286	err = autorest.Respond(
2287		resp,
2288		client.ByInspecting(),
2289		azure.WithErrorUnlessStatusCode(http.StatusOK),
2290		autorest.ByUnmarshallingJSON(&result),
2291		autorest.ByClosing())
2292	result.Response = autorest.Response{Response: resp}
2293	return
2294}
2295
2296// listTablesNextResults retrieves the next set of results, if any.
2297func (client Client) listTablesNextResults(lastResults USQLTableList) (result USQLTableList, err error) {
2298	req, err := lastResults.uSQLTableListPreparer()
2299	if err != nil {
2300		return result, autorest.NewErrorWithError(err, "catalog.Client", "listTablesNextResults", nil, "Failure preparing next results request")
2301	}
2302	if req == nil {
2303		return
2304	}
2305	resp, err := client.ListTablesSender(req)
2306	if err != nil {
2307		result.Response = autorest.Response{Response: resp}
2308		return result, autorest.NewErrorWithError(err, "catalog.Client", "listTablesNextResults", resp, "Failure sending next results request")
2309	}
2310	result, err = client.ListTablesResponder(resp)
2311	if err != nil {
2312		err = autorest.NewErrorWithError(err, "catalog.Client", "listTablesNextResults", resp, "Failure responding to next results request")
2313	}
2314	return
2315}
2316
2317// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2318// ListTablesComplete enumerates all values, automatically crossing page boundaries as required.
2319func (client Client) ListTablesComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLTableListIterator, err error) {
2320	result.page, err = client.ListTables(ctx, accountName, databaseName, schemaName, filter, top, skip, expand, selectParameter, orderby, count)
2321	return
2322}
2323
2324// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2325// ListTableStatistics retrieves the list of table statistics from the Data Lake Analytics catalog.
2326//
2327// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
2328// of the database containing the statistics. schemaName is the name of the schema containing the statistics.
2329// tableName is the name of the table containing the statistics. filter is oData filter. Optional. top is the
2330// number of items to return. Optional. skip is the number of items to skip over before returning elements.
2331// Optional. expand is oData expansion. Expand related resources in line with the retrieved resources, e.g.
2332// Categories?$expand=Products would expand Product data in line with each Category entry. Optional.
2333// selectParameter is oData Select statement. Limits the properties on each entry to just those requested, e.g.
2334// Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One or more comma-separated
2335// expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the values sorted,
2336// e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false to request a
2337// count of the matching resources included with the resources in the response, e.g. Categories?$count=true.
2338// Optional.
2339func (client Client) ListTableStatistics(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLTableStatisticsListPage, err error) {
2340	result.fn = client.listTableStatisticsNextResults
2341	req, err := client.ListTableStatisticsPreparer(ctx, accountName, databaseName, schemaName, tableName, filter, top, skip, expand, selectParameter, orderby, count)
2342	if err != nil {
2343		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTableStatistics", nil, "Failure preparing request")
2344		return
2345	}
2346
2347	resp, err := client.ListTableStatisticsSender(req)
2348	if err != nil {
2349		result.utsl.Response = autorest.Response{Response: resp}
2350		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTableStatistics", resp, "Failure sending request")
2351		return
2352	}
2353
2354	result.utsl, err = client.ListTableStatisticsResponder(resp)
2355	if err != nil {
2356		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTableStatistics", resp, "Failure responding to request")
2357	}
2358
2359	return
2360}
2361
2362// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2363// ListTableStatisticsPreparer prepares the ListTableStatistics request.
2364func (client Client) ListTableStatisticsPreparer(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (*http.Request, error) {
2365	urlParameters := map[string]interface{}{
2366		"accountName":          accountName,
2367		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
2368	}
2369
2370	pathParameters := map[string]interface{}{
2371		"databaseName": autorest.Encode("path", databaseName),
2372		"schemaName":   autorest.Encode("path", schemaName),
2373		"tableName":    autorest.Encode("path", tableName),
2374	}
2375
2376	const APIVersion = "2015-10-01-preview"
2377	queryParameters := map[string]interface{}{
2378		"api-version": APIVersion,
2379	}
2380	if len(filter) > 0 {
2381		queryParameters["$filter"] = autorest.Encode("query", filter)
2382	}
2383	if top != nil {
2384		queryParameters["$top"] = autorest.Encode("query", *top)
2385	}
2386	if skip != nil {
2387		queryParameters["$skip"] = autorest.Encode("query", *skip)
2388	}
2389	if len(expand) > 0 {
2390		queryParameters["$expand"] = autorest.Encode("query", expand)
2391	}
2392	if len(selectParameter) > 0 {
2393		queryParameters["$select"] = autorest.Encode("query", selectParameter)
2394	}
2395	if len(orderby) > 0 {
2396		queryParameters["$orderby"] = autorest.Encode("query", orderby)
2397	}
2398	if count != nil {
2399		queryParameters["$count"] = autorest.Encode("query", *count)
2400	}
2401
2402	preparer := autorest.CreatePreparer(
2403		autorest.AsGet(),
2404		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
2405		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/statistics", pathParameters),
2406		autorest.WithQueryParameters(queryParameters))
2407	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2408}
2409
2410// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2411// ListTableStatisticsSender sends the ListTableStatistics request. The method will close the
2412// http.Response Body if it receives an error.
2413func (client Client) ListTableStatisticsSender(req *http.Request) (*http.Response, error) {
2414	return autorest.SendWithSender(client, req,
2415		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2416}
2417
2418// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2419// ListTableStatisticsResponder handles the response to the ListTableStatistics request. The method always
2420// closes the http.Response Body.
2421func (client Client) ListTableStatisticsResponder(resp *http.Response) (result USQLTableStatisticsList, err error) {
2422	err = autorest.Respond(
2423		resp,
2424		client.ByInspecting(),
2425		azure.WithErrorUnlessStatusCode(http.StatusOK),
2426		autorest.ByUnmarshallingJSON(&result),
2427		autorest.ByClosing())
2428	result.Response = autorest.Response{Response: resp}
2429	return
2430}
2431
2432// listTableStatisticsNextResults retrieves the next set of results, if any.
2433func (client Client) listTableStatisticsNextResults(lastResults USQLTableStatisticsList) (result USQLTableStatisticsList, err error) {
2434	req, err := lastResults.uSQLTableStatisticsListPreparer()
2435	if err != nil {
2436		return result, autorest.NewErrorWithError(err, "catalog.Client", "listTableStatisticsNextResults", nil, "Failure preparing next results request")
2437	}
2438	if req == nil {
2439		return
2440	}
2441	resp, err := client.ListTableStatisticsSender(req)
2442	if err != nil {
2443		result.Response = autorest.Response{Response: resp}
2444		return result, autorest.NewErrorWithError(err, "catalog.Client", "listTableStatisticsNextResults", resp, "Failure sending next results request")
2445	}
2446	result, err = client.ListTableStatisticsResponder(resp)
2447	if err != nil {
2448		err = autorest.NewErrorWithError(err, "catalog.Client", "listTableStatisticsNextResults", resp, "Failure responding to next results request")
2449	}
2450	return
2451}
2452
2453// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2454// ListTableStatisticsComplete enumerates all values, automatically crossing page boundaries as required.
2455func (client Client) ListTableStatisticsComplete(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLTableStatisticsListIterator, err error) {
2456	result.page, err = client.ListTableStatistics(ctx, accountName, databaseName, schemaName, tableName, filter, top, skip, expand, selectParameter, orderby, count)
2457	return
2458}
2459
2460// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2461// ListTableTypes retrieves the list of table types from the Data Lake Analytics catalog.
2462//
2463// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
2464// of the database containing the table types. schemaName is the name of the schema containing the table types.
2465// filter is oData filter. Optional. top is the number of items to return. Optional. skip is the number of items to
2466// skip over before returning elements. Optional. expand is oData expansion. Expand related resources in line with
2467// the retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category
2468// entry. Optional. selectParameter is oData Select statement. Limits the properties on each entry to just those
2469// requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One or more
2470// comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the
2471// values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false
2472// to request a count of the matching resources included with the resources in the response, e.g.
2473// Categories?$count=true. Optional.
2474func (client Client) ListTableTypes(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLTableTypeListPage, err error) {
2475	result.fn = client.listTableTypesNextResults
2476	req, err := client.ListTableTypesPreparer(ctx, accountName, databaseName, schemaName, filter, top, skip, expand, selectParameter, orderby, count)
2477	if err != nil {
2478		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTableTypes", nil, "Failure preparing request")
2479		return
2480	}
2481
2482	resp, err := client.ListTableTypesSender(req)
2483	if err != nil {
2484		result.uttl.Response = autorest.Response{Response: resp}
2485		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTableTypes", resp, "Failure sending request")
2486		return
2487	}
2488
2489	result.uttl, err = client.ListTableTypesResponder(resp)
2490	if err != nil {
2491		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTableTypes", resp, "Failure responding to request")
2492	}
2493
2494	return
2495}
2496
2497// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2498// ListTableTypesPreparer prepares the ListTableTypes request.
2499func (client Client) ListTableTypesPreparer(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (*http.Request, error) {
2500	urlParameters := map[string]interface{}{
2501		"accountName":          accountName,
2502		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
2503	}
2504
2505	pathParameters := map[string]interface{}{
2506		"databaseName": autorest.Encode("path", databaseName),
2507		"schemaName":   autorest.Encode("path", schemaName),
2508	}
2509
2510	const APIVersion = "2015-10-01-preview"
2511	queryParameters := map[string]interface{}{
2512		"api-version": APIVersion,
2513	}
2514	if len(filter) > 0 {
2515		queryParameters["$filter"] = autorest.Encode("query", filter)
2516	}
2517	if top != nil {
2518		queryParameters["$top"] = autorest.Encode("query", *top)
2519	}
2520	if skip != nil {
2521		queryParameters["$skip"] = autorest.Encode("query", *skip)
2522	}
2523	if len(expand) > 0 {
2524		queryParameters["$expand"] = autorest.Encode("query", expand)
2525	}
2526	if len(selectParameter) > 0 {
2527		queryParameters["$select"] = autorest.Encode("query", selectParameter)
2528	}
2529	if len(orderby) > 0 {
2530		queryParameters["$orderby"] = autorest.Encode("query", orderby)
2531	}
2532	if count != nil {
2533		queryParameters["$count"] = autorest.Encode("query", *count)
2534	}
2535
2536	preparer := autorest.CreatePreparer(
2537		autorest.AsGet(),
2538		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
2539		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tabletypes", pathParameters),
2540		autorest.WithQueryParameters(queryParameters))
2541	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2542}
2543
2544// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2545// ListTableTypesSender sends the ListTableTypes request. The method will close the
2546// http.Response Body if it receives an error.
2547func (client Client) ListTableTypesSender(req *http.Request) (*http.Response, error) {
2548	return autorest.SendWithSender(client, req,
2549		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2550}
2551
2552// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2553// ListTableTypesResponder handles the response to the ListTableTypes request. The method always
2554// closes the http.Response Body.
2555func (client Client) ListTableTypesResponder(resp *http.Response) (result USQLTableTypeList, err error) {
2556	err = autorest.Respond(
2557		resp,
2558		client.ByInspecting(),
2559		azure.WithErrorUnlessStatusCode(http.StatusOK),
2560		autorest.ByUnmarshallingJSON(&result),
2561		autorest.ByClosing())
2562	result.Response = autorest.Response{Response: resp}
2563	return
2564}
2565
2566// listTableTypesNextResults retrieves the next set of results, if any.
2567func (client Client) listTableTypesNextResults(lastResults USQLTableTypeList) (result USQLTableTypeList, err error) {
2568	req, err := lastResults.uSQLTableTypeListPreparer()
2569	if err != nil {
2570		return result, autorest.NewErrorWithError(err, "catalog.Client", "listTableTypesNextResults", nil, "Failure preparing next results request")
2571	}
2572	if req == nil {
2573		return
2574	}
2575	resp, err := client.ListTableTypesSender(req)
2576	if err != nil {
2577		result.Response = autorest.Response{Response: resp}
2578		return result, autorest.NewErrorWithError(err, "catalog.Client", "listTableTypesNextResults", resp, "Failure sending next results request")
2579	}
2580	result, err = client.ListTableTypesResponder(resp)
2581	if err != nil {
2582		err = autorest.NewErrorWithError(err, "catalog.Client", "listTableTypesNextResults", resp, "Failure responding to next results request")
2583	}
2584	return
2585}
2586
2587// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2588// ListTableTypesComplete enumerates all values, automatically crossing page boundaries as required.
2589func (client Client) ListTableTypesComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLTableTypeListIterator, err error) {
2590	result.page, err = client.ListTableTypes(ctx, accountName, databaseName, schemaName, filter, top, skip, expand, selectParameter, orderby, count)
2591	return
2592}
2593
2594// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2595// ListTableValuedFunctions retrieves the list of table valued functions from the Data Lake Analytics catalog.
2596//
2597// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
2598// of the database containing the table valued functions. schemaName is the name of the schema containing the table
2599// valued functions. filter is oData filter. Optional. top is the number of items to return. Optional. skip is the
2600// number of items to skip over before returning elements. Optional. expand is oData expansion. Expand related
2601// resources in line with the retrieved resources, e.g. Categories?$expand=Products would expand Product data in
2602// line with each Category entry. Optional. selectParameter is oData Select statement. Limits the properties on
2603// each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is
2604// orderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending
2605// on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the
2606// Boolean value of true or false to request a count of the matching resources included with the resources in the
2607// response, e.g. Categories?$count=true. Optional.
2608func (client Client) ListTableValuedFunctions(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLTableValuedFunctionListPage, err error) {
2609	result.fn = client.listTableValuedFunctionsNextResults
2610	req, err := client.ListTableValuedFunctionsPreparer(ctx, accountName, databaseName, schemaName, filter, top, skip, expand, selectParameter, orderby, count)
2611	if err != nil {
2612		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTableValuedFunctions", nil, "Failure preparing request")
2613		return
2614	}
2615
2616	resp, err := client.ListTableValuedFunctionsSender(req)
2617	if err != nil {
2618		result.utvfl.Response = autorest.Response{Response: resp}
2619		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTableValuedFunctions", resp, "Failure sending request")
2620		return
2621	}
2622
2623	result.utvfl, err = client.ListTableValuedFunctionsResponder(resp)
2624	if err != nil {
2625		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTableValuedFunctions", resp, "Failure responding to request")
2626	}
2627
2628	return
2629}
2630
2631// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2632// ListTableValuedFunctionsPreparer prepares the ListTableValuedFunctions request.
2633func (client Client) ListTableValuedFunctionsPreparer(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (*http.Request, error) {
2634	urlParameters := map[string]interface{}{
2635		"accountName":          accountName,
2636		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
2637	}
2638
2639	pathParameters := map[string]interface{}{
2640		"databaseName": autorest.Encode("path", databaseName),
2641		"schemaName":   autorest.Encode("path", schemaName),
2642	}
2643
2644	const APIVersion = "2015-10-01-preview"
2645	queryParameters := map[string]interface{}{
2646		"api-version": APIVersion,
2647	}
2648	if len(filter) > 0 {
2649		queryParameters["$filter"] = autorest.Encode("query", filter)
2650	}
2651	if top != nil {
2652		queryParameters["$top"] = autorest.Encode("query", *top)
2653	}
2654	if skip != nil {
2655		queryParameters["$skip"] = autorest.Encode("query", *skip)
2656	}
2657	if len(expand) > 0 {
2658		queryParameters["$expand"] = autorest.Encode("query", expand)
2659	}
2660	if len(selectParameter) > 0 {
2661		queryParameters["$select"] = autorest.Encode("query", selectParameter)
2662	}
2663	if len(orderby) > 0 {
2664		queryParameters["$orderby"] = autorest.Encode("query", orderby)
2665	}
2666	if count != nil {
2667		queryParameters["$count"] = autorest.Encode("query", *count)
2668	}
2669
2670	preparer := autorest.CreatePreparer(
2671		autorest.AsGet(),
2672		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
2673		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tablevaluedfunctions", pathParameters),
2674		autorest.WithQueryParameters(queryParameters))
2675	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2676}
2677
2678// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2679// ListTableValuedFunctionsSender sends the ListTableValuedFunctions request. The method will close the
2680// http.Response Body if it receives an error.
2681func (client Client) ListTableValuedFunctionsSender(req *http.Request) (*http.Response, error) {
2682	return autorest.SendWithSender(client, req,
2683		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2684}
2685
2686// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2687// ListTableValuedFunctionsResponder handles the response to the ListTableValuedFunctions request. The method always
2688// closes the http.Response Body.
2689func (client Client) ListTableValuedFunctionsResponder(resp *http.Response) (result USQLTableValuedFunctionList, err error) {
2690	err = autorest.Respond(
2691		resp,
2692		client.ByInspecting(),
2693		azure.WithErrorUnlessStatusCode(http.StatusOK),
2694		autorest.ByUnmarshallingJSON(&result),
2695		autorest.ByClosing())
2696	result.Response = autorest.Response{Response: resp}
2697	return
2698}
2699
2700// listTableValuedFunctionsNextResults retrieves the next set of results, if any.
2701func (client Client) listTableValuedFunctionsNextResults(lastResults USQLTableValuedFunctionList) (result USQLTableValuedFunctionList, err error) {
2702	req, err := lastResults.uSQLTableValuedFunctionListPreparer()
2703	if err != nil {
2704		return result, autorest.NewErrorWithError(err, "catalog.Client", "listTableValuedFunctionsNextResults", nil, "Failure preparing next results request")
2705	}
2706	if req == nil {
2707		return
2708	}
2709	resp, err := client.ListTableValuedFunctionsSender(req)
2710	if err != nil {
2711		result.Response = autorest.Response{Response: resp}
2712		return result, autorest.NewErrorWithError(err, "catalog.Client", "listTableValuedFunctionsNextResults", resp, "Failure sending next results request")
2713	}
2714	result, err = client.ListTableValuedFunctionsResponder(resp)
2715	if err != nil {
2716		err = autorest.NewErrorWithError(err, "catalog.Client", "listTableValuedFunctionsNextResults", resp, "Failure responding to next results request")
2717	}
2718	return
2719}
2720
2721// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2722// ListTableValuedFunctionsComplete enumerates all values, automatically crossing page boundaries as required.
2723func (client Client) ListTableValuedFunctionsComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLTableValuedFunctionListIterator, err error) {
2724	result.page, err = client.ListTableValuedFunctions(ctx, accountName, databaseName, schemaName, filter, top, skip, expand, selectParameter, orderby, count)
2725	return
2726}
2727
2728// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2729// ListTypes retrieves the list of types within the specified database and schema from the Data Lake Analytics catalog.
2730//
2731// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
2732// of the database containing the types. schemaName is the name of the schema containing the types. filter is oData
2733// filter. Optional. top is the number of items to return. Optional. skip is the number of items to skip over
2734// before returning elements. Optional. expand is oData expansion. Expand related resources in line with the
2735// retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category
2736// entry. Optional. selectParameter is oData Select statement. Limits the properties on each entry to just those
2737// requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One or more
2738// comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the
2739// values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false
2740// to request a count of the matching resources included with the resources in the response, e.g.
2741// Categories?$count=true. Optional.
2742func (client Client) ListTypes(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLTypeListPage, err error) {
2743	result.fn = client.listTypesNextResults
2744	req, err := client.ListTypesPreparer(ctx, accountName, databaseName, schemaName, filter, top, skip, expand, selectParameter, orderby, count)
2745	if err != nil {
2746		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTypes", nil, "Failure preparing request")
2747		return
2748	}
2749
2750	resp, err := client.ListTypesSender(req)
2751	if err != nil {
2752		result.utl.Response = autorest.Response{Response: resp}
2753		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTypes", resp, "Failure sending request")
2754		return
2755	}
2756
2757	result.utl, err = client.ListTypesResponder(resp)
2758	if err != nil {
2759		err = autorest.NewErrorWithError(err, "catalog.Client", "ListTypes", resp, "Failure responding to request")
2760	}
2761
2762	return
2763}
2764
2765// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2766// ListTypesPreparer prepares the ListTypes request.
2767func (client Client) ListTypesPreparer(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (*http.Request, error) {
2768	urlParameters := map[string]interface{}{
2769		"accountName":          accountName,
2770		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
2771	}
2772
2773	pathParameters := map[string]interface{}{
2774		"databaseName": autorest.Encode("path", databaseName),
2775		"schemaName":   autorest.Encode("path", schemaName),
2776	}
2777
2778	const APIVersion = "2015-10-01-preview"
2779	queryParameters := map[string]interface{}{
2780		"api-version": APIVersion,
2781	}
2782	if len(filter) > 0 {
2783		queryParameters["$filter"] = autorest.Encode("query", filter)
2784	}
2785	if top != nil {
2786		queryParameters["$top"] = autorest.Encode("query", *top)
2787	}
2788	if skip != nil {
2789		queryParameters["$skip"] = autorest.Encode("query", *skip)
2790	}
2791	if len(expand) > 0 {
2792		queryParameters["$expand"] = autorest.Encode("query", expand)
2793	}
2794	if len(selectParameter) > 0 {
2795		queryParameters["$select"] = autorest.Encode("query", selectParameter)
2796	}
2797	if len(orderby) > 0 {
2798		queryParameters["$orderby"] = autorest.Encode("query", orderby)
2799	}
2800	if count != nil {
2801		queryParameters["$count"] = autorest.Encode("query", *count)
2802	}
2803
2804	preparer := autorest.CreatePreparer(
2805		autorest.AsGet(),
2806		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
2807		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/types", pathParameters),
2808		autorest.WithQueryParameters(queryParameters))
2809	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2810}
2811
2812// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2813// ListTypesSender sends the ListTypes request. The method will close the
2814// http.Response Body if it receives an error.
2815func (client Client) ListTypesSender(req *http.Request) (*http.Response, error) {
2816	return autorest.SendWithSender(client, req,
2817		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2818}
2819
2820// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2821// ListTypesResponder handles the response to the ListTypes request. The method always
2822// closes the http.Response Body.
2823func (client Client) ListTypesResponder(resp *http.Response) (result USQLTypeList, err error) {
2824	err = autorest.Respond(
2825		resp,
2826		client.ByInspecting(),
2827		azure.WithErrorUnlessStatusCode(http.StatusOK),
2828		autorest.ByUnmarshallingJSON(&result),
2829		autorest.ByClosing())
2830	result.Response = autorest.Response{Response: resp}
2831	return
2832}
2833
2834// listTypesNextResults retrieves the next set of results, if any.
2835func (client Client) listTypesNextResults(lastResults USQLTypeList) (result USQLTypeList, err error) {
2836	req, err := lastResults.uSQLTypeListPreparer()
2837	if err != nil {
2838		return result, autorest.NewErrorWithError(err, "catalog.Client", "listTypesNextResults", nil, "Failure preparing next results request")
2839	}
2840	if req == nil {
2841		return
2842	}
2843	resp, err := client.ListTypesSender(req)
2844	if err != nil {
2845		result.Response = autorest.Response{Response: resp}
2846		return result, autorest.NewErrorWithError(err, "catalog.Client", "listTypesNextResults", resp, "Failure sending next results request")
2847	}
2848	result, err = client.ListTypesResponder(resp)
2849	if err != nil {
2850		err = autorest.NewErrorWithError(err, "catalog.Client", "listTypesNextResults", resp, "Failure responding to next results request")
2851	}
2852	return
2853}
2854
2855// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2856// ListTypesComplete enumerates all values, automatically crossing page boundaries as required.
2857func (client Client) ListTypesComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLTypeListIterator, err error) {
2858	result.page, err = client.ListTypes(ctx, accountName, databaseName, schemaName, filter, top, skip, expand, selectParameter, orderby, count)
2859	return
2860}
2861
2862// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2863// ListViews retrieves the list of views from the Data Lake Analytics catalog.
2864//
2865// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
2866// of the database containing the views. schemaName is the name of the schema containing the views. filter is oData
2867// filter. Optional. top is the number of items to return. Optional. skip is the number of items to skip over
2868// before returning elements. Optional. expand is oData expansion. Expand related resources in line with the
2869// retrieved resources, e.g. Categories?$expand=Products would expand Product data in line with each Category
2870// entry. Optional. selectParameter is oData Select statement. Limits the properties on each entry to just those
2871// requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One or more
2872// comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the
2873// values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false
2874// to request a count of the matching resources included with the resources in the response, e.g.
2875// Categories?$count=true. Optional.
2876func (client Client) ListViews(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLViewListPage, err error) {
2877	result.fn = client.listViewsNextResults
2878	req, err := client.ListViewsPreparer(ctx, accountName, databaseName, schemaName, filter, top, skip, expand, selectParameter, orderby, count)
2879	if err != nil {
2880		err = autorest.NewErrorWithError(err, "catalog.Client", "ListViews", nil, "Failure preparing request")
2881		return
2882	}
2883
2884	resp, err := client.ListViewsSender(req)
2885	if err != nil {
2886		result.uvl.Response = autorest.Response{Response: resp}
2887		err = autorest.NewErrorWithError(err, "catalog.Client", "ListViews", resp, "Failure sending request")
2888		return
2889	}
2890
2891	result.uvl, err = client.ListViewsResponder(resp)
2892	if err != nil {
2893		err = autorest.NewErrorWithError(err, "catalog.Client", "ListViews", resp, "Failure responding to request")
2894	}
2895
2896	return
2897}
2898
2899// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2900// ListViewsPreparer prepares the ListViews request.
2901func (client Client) ListViewsPreparer(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (*http.Request, error) {
2902	urlParameters := map[string]interface{}{
2903		"accountName":          accountName,
2904		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
2905	}
2906
2907	pathParameters := map[string]interface{}{
2908		"databaseName": autorest.Encode("path", databaseName),
2909		"schemaName":   autorest.Encode("path", schemaName),
2910	}
2911
2912	const APIVersion = "2015-10-01-preview"
2913	queryParameters := map[string]interface{}{
2914		"api-version": APIVersion,
2915	}
2916	if len(filter) > 0 {
2917		queryParameters["$filter"] = autorest.Encode("query", filter)
2918	}
2919	if top != nil {
2920		queryParameters["$top"] = autorest.Encode("query", *top)
2921	}
2922	if skip != nil {
2923		queryParameters["$skip"] = autorest.Encode("query", *skip)
2924	}
2925	if len(expand) > 0 {
2926		queryParameters["$expand"] = autorest.Encode("query", expand)
2927	}
2928	if len(selectParameter) > 0 {
2929		queryParameters["$select"] = autorest.Encode("query", selectParameter)
2930	}
2931	if len(orderby) > 0 {
2932		queryParameters["$orderby"] = autorest.Encode("query", orderby)
2933	}
2934	if count != nil {
2935		queryParameters["$count"] = autorest.Encode("query", *count)
2936	}
2937
2938	preparer := autorest.CreatePreparer(
2939		autorest.AsGet(),
2940		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
2941		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/schemas/{schemaName}/views", pathParameters),
2942		autorest.WithQueryParameters(queryParameters))
2943	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2944}
2945
2946// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2947// ListViewsSender sends the ListViews request. The method will close the
2948// http.Response Body if it receives an error.
2949func (client Client) ListViewsSender(req *http.Request) (*http.Response, error) {
2950	return autorest.SendWithSender(client, req,
2951		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2952}
2953
2954// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2955// ListViewsResponder handles the response to the ListViews request. The method always
2956// closes the http.Response Body.
2957func (client Client) ListViewsResponder(resp *http.Response) (result USQLViewList, err error) {
2958	err = autorest.Respond(
2959		resp,
2960		client.ByInspecting(),
2961		azure.WithErrorUnlessStatusCode(http.StatusOK),
2962		autorest.ByUnmarshallingJSON(&result),
2963		autorest.ByClosing())
2964	result.Response = autorest.Response{Response: resp}
2965	return
2966}
2967
2968// listViewsNextResults retrieves the next set of results, if any.
2969func (client Client) listViewsNextResults(lastResults USQLViewList) (result USQLViewList, err error) {
2970	req, err := lastResults.uSQLViewListPreparer()
2971	if err != nil {
2972		return result, autorest.NewErrorWithError(err, "catalog.Client", "listViewsNextResults", nil, "Failure preparing next results request")
2973	}
2974	if req == nil {
2975		return
2976	}
2977	resp, err := client.ListViewsSender(req)
2978	if err != nil {
2979		result.Response = autorest.Response{Response: resp}
2980		return result, autorest.NewErrorWithError(err, "catalog.Client", "listViewsNextResults", resp, "Failure sending next results request")
2981	}
2982	result, err = client.ListViewsResponder(resp)
2983	if err != nil {
2984		err = autorest.NewErrorWithError(err, "catalog.Client", "listViewsNextResults", resp, "Failure responding to next results request")
2985	}
2986	return
2987}
2988
2989// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2990// ListViewsComplete enumerates all values, automatically crossing page boundaries as required.
2991func (client Client) ListViewsComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result USQLViewListIterator, err error) {
2992	result.page, err = client.ListViews(ctx, accountName, databaseName, schemaName, filter, top, skip, expand, selectParameter, orderby, count)
2993	return
2994}
2995
2996// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
2997// UpdateSecret modifies the specified secret for use with external data sources in the specified database
2998//
2999// accountName is the Azure Data Lake Analytics account to execute catalog operations on. databaseName is the name
3000// of the database containing the secret. secretName is the name of the secret. parameters is the parameters
3001// required to modify the secret (name and password)
3002func (client Client) UpdateSecret(ctx context.Context, accountName string, databaseName string, secretName string, parameters DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters) (result USQLSecret, err error) {
3003	req, err := client.UpdateSecretPreparer(ctx, accountName, databaseName, secretName, parameters)
3004	if err != nil {
3005		err = autorest.NewErrorWithError(err, "catalog.Client", "UpdateSecret", nil, "Failure preparing request")
3006		return
3007	}
3008
3009	resp, err := client.UpdateSecretSender(req)
3010	if err != nil {
3011		result.Response = autorest.Response{Response: resp}
3012		err = autorest.NewErrorWithError(err, "catalog.Client", "UpdateSecret", resp, "Failure sending request")
3013		return
3014	}
3015
3016	result, err = client.UpdateSecretResponder(resp)
3017	if err != nil {
3018		err = autorest.NewErrorWithError(err, "catalog.Client", "UpdateSecret", resp, "Failure responding to request")
3019	}
3020
3021	return
3022}
3023
3024// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
3025// UpdateSecretPreparer prepares the UpdateSecret request.
3026func (client Client) UpdateSecretPreparer(ctx context.Context, accountName string, databaseName string, secretName string, parameters DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters) (*http.Request, error) {
3027	urlParameters := map[string]interface{}{
3028		"accountName":          accountName,
3029		"adlaCatalogDnsSuffix": client.AdlaCatalogDNSSuffix,
3030	}
3031
3032	pathParameters := map[string]interface{}{
3033		"databaseName": autorest.Encode("path", databaseName),
3034		"secretName":   autorest.Encode("path", secretName),
3035	}
3036
3037	const APIVersion = "2015-10-01-preview"
3038	queryParameters := map[string]interface{}{
3039		"api-version": APIVersion,
3040	}
3041
3042	preparer := autorest.CreatePreparer(
3043		autorest.AsContentType("application/json; charset=utf-8"),
3044		autorest.AsPatch(),
3045		autorest.WithCustomBaseURL("https://{accountName}.{adlaCatalogDnsSuffix}", urlParameters),
3046		autorest.WithPathParameters("/catalog/usql/databases/{databaseName}/secrets/{secretName}", pathParameters),
3047		autorest.WithJSON(parameters),
3048		autorest.WithQueryParameters(queryParameters))
3049	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3050}
3051
3052// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
3053// UpdateSecretSender sends the UpdateSecret request. The method will close the
3054// http.Response Body if it receives an error.
3055func (client Client) UpdateSecretSender(req *http.Request) (*http.Response, error) {
3056	return autorest.SendWithSender(client, req,
3057		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3058}
3059
3060// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/2015-10-01-preview/catalog instead.
3061// UpdateSecretResponder handles the response to the UpdateSecret request. The method always
3062// closes the http.Response Body.
3063func (client Client) UpdateSecretResponder(resp *http.Response) (result USQLSecret, err error) {
3064	err = autorest.Respond(
3065		resp,
3066		client.ByInspecting(),
3067		azure.WithErrorUnlessStatusCode(http.StatusOK),
3068		autorest.ByUnmarshallingJSON(&result),
3069		autorest.ByClosing())
3070	result.Response = autorest.Response{Response: resp}
3071	return
3072}
3073