1package job
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	"github.com/satori/go.uuid"
26	"net/http"
27)
28
29// Client is the creates an Azure Data Lake Analytics job client.
30type Client struct {
31	BaseClient
32}
33
34// NewClient creates an instance of the Client client.
35func NewClient() Client {
36	return Client{New()}
37}
38
39// Build builds (compiles) the specified job in the specified Data Lake Analytics account for job correctness and
40// validation.
41// Parameters:
42// accountName - the Azure Data Lake Analytics account to execute job operations on.
43// parameters - the parameters to build a job.
44func (client Client) Build(ctx context.Context, accountName string, parameters BuildJobParameters) (result Information, err error) {
45	req, err := client.BuildPreparer(ctx, accountName, parameters)
46	if err != nil {
47		err = autorest.NewErrorWithError(err, "job.Client", "Build", nil, "Failure preparing request")
48		return
49	}
50
51	resp, err := client.BuildSender(req)
52	if err != nil {
53		result.Response = autorest.Response{Response: resp}
54		err = autorest.NewErrorWithError(err, "job.Client", "Build", resp, "Failure sending request")
55		return
56	}
57
58	result, err = client.BuildResponder(resp)
59	if err != nil {
60		err = autorest.NewErrorWithError(err, "job.Client", "Build", resp, "Failure responding to request")
61	}
62
63	return
64}
65
66// BuildPreparer prepares the Build request.
67func (client Client) BuildPreparer(ctx context.Context, accountName string, parameters BuildJobParameters) (*http.Request, error) {
68	urlParameters := map[string]interface{}{
69		"accountName":      accountName,
70		"adlaJobDnsSuffix": client.AdlaJobDNSSuffix,
71	}
72
73	const APIVersion = "2016-11-01"
74	queryParameters := map[string]interface{}{
75		"api-version": APIVersion,
76	}
77
78	preparer := autorest.CreatePreparer(
79		autorest.AsContentType("application/json; charset=utf-8"),
80		autorest.AsPost(),
81		autorest.WithCustomBaseURL("https://{accountName}.{adlaJobDnsSuffix}", urlParameters),
82		autorest.WithPath("/BuildJob"),
83		autorest.WithJSON(parameters),
84		autorest.WithQueryParameters(queryParameters))
85	return preparer.Prepare((&http.Request{}).WithContext(ctx))
86}
87
88// BuildSender sends the Build request. The method will close the
89// http.Response Body if it receives an error.
90func (client Client) BuildSender(req *http.Request) (*http.Response, error) {
91	return autorest.SendWithSender(client, req,
92		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
93}
94
95// BuildResponder handles the response to the Build request. The method always
96// closes the http.Response Body.
97func (client Client) BuildResponder(resp *http.Response) (result Information, err error) {
98	err = autorest.Respond(
99		resp,
100		client.ByInspecting(),
101		azure.WithErrorUnlessStatusCode(http.StatusOK),
102		autorest.ByUnmarshallingJSON(&result),
103		autorest.ByClosing())
104	result.Response = autorest.Response{Response: resp}
105	return
106}
107
108// Cancel cancels the running job specified by the job ID.
109// Parameters:
110// accountName - the Azure Data Lake Analytics account to execute job operations on.
111// jobIdentity - job identifier. Uniquely identifies the job across all jobs submitted to the service.
112func (client Client) Cancel(ctx context.Context, accountName string, jobIdentity uuid.UUID) (result autorest.Response, err error) {
113	req, err := client.CancelPreparer(ctx, accountName, jobIdentity)
114	if err != nil {
115		err = autorest.NewErrorWithError(err, "job.Client", "Cancel", nil, "Failure preparing request")
116		return
117	}
118
119	resp, err := client.CancelSender(req)
120	if err != nil {
121		result.Response = resp
122		err = autorest.NewErrorWithError(err, "job.Client", "Cancel", resp, "Failure sending request")
123		return
124	}
125
126	result, err = client.CancelResponder(resp)
127	if err != nil {
128		err = autorest.NewErrorWithError(err, "job.Client", "Cancel", resp, "Failure responding to request")
129	}
130
131	return
132}
133
134// CancelPreparer prepares the Cancel request.
135func (client Client) CancelPreparer(ctx context.Context, accountName string, jobIdentity uuid.UUID) (*http.Request, error) {
136	urlParameters := map[string]interface{}{
137		"accountName":      accountName,
138		"adlaJobDnsSuffix": client.AdlaJobDNSSuffix,
139	}
140
141	pathParameters := map[string]interface{}{
142		"jobIdentity": autorest.Encode("path", jobIdentity),
143	}
144
145	const APIVersion = "2016-11-01"
146	queryParameters := map[string]interface{}{
147		"api-version": APIVersion,
148	}
149
150	preparer := autorest.CreatePreparer(
151		autorest.AsPost(),
152		autorest.WithCustomBaseURL("https://{accountName}.{adlaJobDnsSuffix}", urlParameters),
153		autorest.WithPathParameters("/Jobs/{jobIdentity}/CancelJob", pathParameters),
154		autorest.WithQueryParameters(queryParameters))
155	return preparer.Prepare((&http.Request{}).WithContext(ctx))
156}
157
158// CancelSender sends the Cancel request. The method will close the
159// http.Response Body if it receives an error.
160func (client Client) CancelSender(req *http.Request) (*http.Response, error) {
161	return autorest.SendWithSender(client, req,
162		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
163}
164
165// CancelResponder handles the response to the Cancel request. The method always
166// closes the http.Response Body.
167func (client Client) CancelResponder(resp *http.Response) (result autorest.Response, err error) {
168	err = autorest.Respond(
169		resp,
170		client.ByInspecting(),
171		azure.WithErrorUnlessStatusCode(http.StatusOK),
172		autorest.ByClosing())
173	result.Response = resp
174	return
175}
176
177// Create submits a job to the specified Data Lake Analytics account.
178// Parameters:
179// accountName - the Azure Data Lake Analytics account to execute job operations on.
180// jobIdentity - job identifier. Uniquely identifies the job across all jobs submitted to the service.
181// parameters - the parameters to submit a job.
182func (client Client) Create(ctx context.Context, accountName string, jobIdentity uuid.UUID, parameters CreateJobParameters) (result Information, err error) {
183	if err := validation.Validate([]validation.Validation{
184		{TargetValue: parameters,
185			Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil},
186				{Target: "parameters.Related", Name: validation.Null, Rule: false,
187					Chain: []validation.Constraint{{Target: "parameters.Related.PipelineName", Name: validation.Null, Rule: false,
188						Chain: []validation.Constraint{{Target: "parameters.Related.PipelineName", Name: validation.MaxLength, Rule: 260, Chain: nil}}},
189						{Target: "parameters.Related.RecurrenceID", Name: validation.Null, Rule: true, Chain: nil},
190						{Target: "parameters.Related.RecurrenceName", Name: validation.Null, Rule: false,
191							Chain: []validation.Constraint{{Target: "parameters.Related.RecurrenceName", Name: validation.MaxLength, Rule: 260, Chain: nil}}},
192					}}}}}); err != nil {
193		return result, validation.NewError("job.Client", "Create", err.Error())
194	}
195
196	req, err := client.CreatePreparer(ctx, accountName, jobIdentity, parameters)
197	if err != nil {
198		err = autorest.NewErrorWithError(err, "job.Client", "Create", nil, "Failure preparing request")
199		return
200	}
201
202	resp, err := client.CreateSender(req)
203	if err != nil {
204		result.Response = autorest.Response{Response: resp}
205		err = autorest.NewErrorWithError(err, "job.Client", "Create", resp, "Failure sending request")
206		return
207	}
208
209	result, err = client.CreateResponder(resp)
210	if err != nil {
211		err = autorest.NewErrorWithError(err, "job.Client", "Create", resp, "Failure responding to request")
212	}
213
214	return
215}
216
217// CreatePreparer prepares the Create request.
218func (client Client) CreatePreparer(ctx context.Context, accountName string, jobIdentity uuid.UUID, parameters CreateJobParameters) (*http.Request, error) {
219	urlParameters := map[string]interface{}{
220		"accountName":      accountName,
221		"adlaJobDnsSuffix": client.AdlaJobDNSSuffix,
222	}
223
224	pathParameters := map[string]interface{}{
225		"jobIdentity": autorest.Encode("path", jobIdentity),
226	}
227
228	const APIVersion = "2016-11-01"
229	queryParameters := map[string]interface{}{
230		"api-version": APIVersion,
231	}
232
233	preparer := autorest.CreatePreparer(
234		autorest.AsContentType("application/json; charset=utf-8"),
235		autorest.AsPut(),
236		autorest.WithCustomBaseURL("https://{accountName}.{adlaJobDnsSuffix}", urlParameters),
237		autorest.WithPathParameters("/Jobs/{jobIdentity}", pathParameters),
238		autorest.WithJSON(parameters),
239		autorest.WithQueryParameters(queryParameters))
240	return preparer.Prepare((&http.Request{}).WithContext(ctx))
241}
242
243// CreateSender sends the Create request. The method will close the
244// http.Response Body if it receives an error.
245func (client Client) CreateSender(req *http.Request) (*http.Response, error) {
246	return autorest.SendWithSender(client, req,
247		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
248}
249
250// CreateResponder handles the response to the Create request. The method always
251// closes the http.Response Body.
252func (client Client) CreateResponder(resp *http.Response) (result Information, err error) {
253	err = autorest.Respond(
254		resp,
255		client.ByInspecting(),
256		azure.WithErrorUnlessStatusCode(http.StatusOK),
257		autorest.ByUnmarshallingJSON(&result),
258		autorest.ByClosing())
259	result.Response = autorest.Response{Response: resp}
260	return
261}
262
263// Get gets the job information for the specified job ID.
264// Parameters:
265// accountName - the Azure Data Lake Analytics account to execute job operations on.
266// jobIdentity - jobInfo ID.
267func (client Client) Get(ctx context.Context, accountName string, jobIdentity uuid.UUID) (result Information, err error) {
268	req, err := client.GetPreparer(ctx, accountName, jobIdentity)
269	if err != nil {
270		err = autorest.NewErrorWithError(err, "job.Client", "Get", nil, "Failure preparing request")
271		return
272	}
273
274	resp, err := client.GetSender(req)
275	if err != nil {
276		result.Response = autorest.Response{Response: resp}
277		err = autorest.NewErrorWithError(err, "job.Client", "Get", resp, "Failure sending request")
278		return
279	}
280
281	result, err = client.GetResponder(resp)
282	if err != nil {
283		err = autorest.NewErrorWithError(err, "job.Client", "Get", resp, "Failure responding to request")
284	}
285
286	return
287}
288
289// GetPreparer prepares the Get request.
290func (client Client) GetPreparer(ctx context.Context, accountName string, jobIdentity uuid.UUID) (*http.Request, error) {
291	urlParameters := map[string]interface{}{
292		"accountName":      accountName,
293		"adlaJobDnsSuffix": client.AdlaJobDNSSuffix,
294	}
295
296	pathParameters := map[string]interface{}{
297		"jobIdentity": autorest.Encode("path", jobIdentity),
298	}
299
300	const APIVersion = "2016-11-01"
301	queryParameters := map[string]interface{}{
302		"api-version": APIVersion,
303	}
304
305	preparer := autorest.CreatePreparer(
306		autorest.AsGet(),
307		autorest.WithCustomBaseURL("https://{accountName}.{adlaJobDnsSuffix}", urlParameters),
308		autorest.WithPathParameters("/Jobs/{jobIdentity}", pathParameters),
309		autorest.WithQueryParameters(queryParameters))
310	return preparer.Prepare((&http.Request{}).WithContext(ctx))
311}
312
313// GetSender sends the Get request. The method will close the
314// http.Response Body if it receives an error.
315func (client Client) GetSender(req *http.Request) (*http.Response, error) {
316	return autorest.SendWithSender(client, req,
317		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
318}
319
320// GetResponder handles the response to the Get request. The method always
321// closes the http.Response Body.
322func (client Client) GetResponder(resp *http.Response) (result Information, err error) {
323	err = autorest.Respond(
324		resp,
325		client.ByInspecting(),
326		azure.WithErrorUnlessStatusCode(http.StatusOK),
327		autorest.ByUnmarshallingJSON(&result),
328		autorest.ByClosing())
329	result.Response = autorest.Response{Response: resp}
330	return
331}
332
333// GetDebugDataPath gets the job debug data information specified by the job ID.
334// Parameters:
335// accountName - the Azure Data Lake Analytics account to execute job operations on.
336// jobIdentity - job identifier. Uniquely identifies the job across all jobs submitted to the service.
337func (client Client) GetDebugDataPath(ctx context.Context, accountName string, jobIdentity uuid.UUID) (result DataPath, err error) {
338	req, err := client.GetDebugDataPathPreparer(ctx, accountName, jobIdentity)
339	if err != nil {
340		err = autorest.NewErrorWithError(err, "job.Client", "GetDebugDataPath", nil, "Failure preparing request")
341		return
342	}
343
344	resp, err := client.GetDebugDataPathSender(req)
345	if err != nil {
346		result.Response = autorest.Response{Response: resp}
347		err = autorest.NewErrorWithError(err, "job.Client", "GetDebugDataPath", resp, "Failure sending request")
348		return
349	}
350
351	result, err = client.GetDebugDataPathResponder(resp)
352	if err != nil {
353		err = autorest.NewErrorWithError(err, "job.Client", "GetDebugDataPath", resp, "Failure responding to request")
354	}
355
356	return
357}
358
359// GetDebugDataPathPreparer prepares the GetDebugDataPath request.
360func (client Client) GetDebugDataPathPreparer(ctx context.Context, accountName string, jobIdentity uuid.UUID) (*http.Request, error) {
361	urlParameters := map[string]interface{}{
362		"accountName":      accountName,
363		"adlaJobDnsSuffix": client.AdlaJobDNSSuffix,
364	}
365
366	pathParameters := map[string]interface{}{
367		"jobIdentity": autorest.Encode("path", jobIdentity),
368	}
369
370	const APIVersion = "2016-11-01"
371	queryParameters := map[string]interface{}{
372		"api-version": APIVersion,
373	}
374
375	preparer := autorest.CreatePreparer(
376		autorest.AsGet(),
377		autorest.WithCustomBaseURL("https://{accountName}.{adlaJobDnsSuffix}", urlParameters),
378		autorest.WithPathParameters("/Jobs/{jobIdentity}/GetDebugDataPath", pathParameters),
379		autorest.WithQueryParameters(queryParameters))
380	return preparer.Prepare((&http.Request{}).WithContext(ctx))
381}
382
383// GetDebugDataPathSender sends the GetDebugDataPath request. The method will close the
384// http.Response Body if it receives an error.
385func (client Client) GetDebugDataPathSender(req *http.Request) (*http.Response, error) {
386	return autorest.SendWithSender(client, req,
387		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
388}
389
390// GetDebugDataPathResponder handles the response to the GetDebugDataPath request. The method always
391// closes the http.Response Body.
392func (client Client) GetDebugDataPathResponder(resp *http.Response) (result DataPath, err error) {
393	err = autorest.Respond(
394		resp,
395		client.ByInspecting(),
396		azure.WithErrorUnlessStatusCode(http.StatusOK),
397		autorest.ByUnmarshallingJSON(&result),
398		autorest.ByClosing())
399	result.Response = autorest.Response{Response: resp}
400	return
401}
402
403// GetStatistics gets statistics of the specified job.
404// Parameters:
405// accountName - the Azure Data Lake Analytics account to execute job operations on.
406// jobIdentity - job Information ID.
407func (client Client) GetStatistics(ctx context.Context, accountName string, jobIdentity uuid.UUID) (result Statistics, err error) {
408	req, err := client.GetStatisticsPreparer(ctx, accountName, jobIdentity)
409	if err != nil {
410		err = autorest.NewErrorWithError(err, "job.Client", "GetStatistics", nil, "Failure preparing request")
411		return
412	}
413
414	resp, err := client.GetStatisticsSender(req)
415	if err != nil {
416		result.Response = autorest.Response{Response: resp}
417		err = autorest.NewErrorWithError(err, "job.Client", "GetStatistics", resp, "Failure sending request")
418		return
419	}
420
421	result, err = client.GetStatisticsResponder(resp)
422	if err != nil {
423		err = autorest.NewErrorWithError(err, "job.Client", "GetStatistics", resp, "Failure responding to request")
424	}
425
426	return
427}
428
429// GetStatisticsPreparer prepares the GetStatistics request.
430func (client Client) GetStatisticsPreparer(ctx context.Context, accountName string, jobIdentity uuid.UUID) (*http.Request, error) {
431	urlParameters := map[string]interface{}{
432		"accountName":      accountName,
433		"adlaJobDnsSuffix": client.AdlaJobDNSSuffix,
434	}
435
436	pathParameters := map[string]interface{}{
437		"jobIdentity": autorest.Encode("path", jobIdentity),
438	}
439
440	const APIVersion = "2016-11-01"
441	queryParameters := map[string]interface{}{
442		"api-version": APIVersion,
443	}
444
445	preparer := autorest.CreatePreparer(
446		autorest.AsGet(),
447		autorest.WithCustomBaseURL("https://{accountName}.{adlaJobDnsSuffix}", urlParameters),
448		autorest.WithPathParameters("/Jobs/{jobIdentity}/GetStatistics", pathParameters),
449		autorest.WithQueryParameters(queryParameters))
450	return preparer.Prepare((&http.Request{}).WithContext(ctx))
451}
452
453// GetStatisticsSender sends the GetStatistics request. The method will close the
454// http.Response Body if it receives an error.
455func (client Client) GetStatisticsSender(req *http.Request) (*http.Response, error) {
456	return autorest.SendWithSender(client, req,
457		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
458}
459
460// GetStatisticsResponder handles the response to the GetStatistics request. The method always
461// closes the http.Response Body.
462func (client Client) GetStatisticsResponder(resp *http.Response) (result Statistics, err error) {
463	err = autorest.Respond(
464		resp,
465		client.ByInspecting(),
466		azure.WithErrorUnlessStatusCode(http.StatusOK),
467		autorest.ByUnmarshallingJSON(&result),
468		autorest.ByClosing())
469	result.Response = autorest.Response{Response: resp}
470	return
471}
472
473// List lists the jobs, if any, associated with the specified Data Lake Analytics account. The response includes a link
474// to the next page of results, if any.
475// Parameters:
476// accountName - the Azure Data Lake Analytics account to execute job operations on.
477// filter - oData filter. Optional.
478// top - the number of items to return. Optional.
479// skip - the number of items to skip over before returning elements. Optional.
480// selectParameter - oData Select statement. Limits the properties on each entry to just those requested, e.g.
481// Categories?$select=CategoryName,Description. Optional.
482// orderby - orderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or
483// "desc" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc.
484// Optional.
485// count - the Boolean value of true or false to request a count of the matching resources included with the
486// resources in the response, e.g. Categories?$count=true. Optional.
487func (client Client) List(ctx context.Context, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result InfoListResultPage, err error) {
488	if err := validation.Validate([]validation.Validation{
489		{TargetValue: top,
490			Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false,
491				Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}},
492		{TargetValue: skip,
493			Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
494				Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil {
495		return result, validation.NewError("job.Client", "List", err.Error())
496	}
497
498	result.fn = client.listNextResults
499	req, err := client.ListPreparer(ctx, accountName, filter, top, skip, selectParameter, orderby, count)
500	if err != nil {
501		err = autorest.NewErrorWithError(err, "job.Client", "List", nil, "Failure preparing request")
502		return
503	}
504
505	resp, err := client.ListSender(req)
506	if err != nil {
507		result.ilr.Response = autorest.Response{Response: resp}
508		err = autorest.NewErrorWithError(err, "job.Client", "List", resp, "Failure sending request")
509		return
510	}
511
512	result.ilr, err = client.ListResponder(resp)
513	if err != nil {
514		err = autorest.NewErrorWithError(err, "job.Client", "List", resp, "Failure responding to request")
515	}
516
517	return
518}
519
520// ListPreparer prepares the List request.
521func (client Client) ListPreparer(ctx context.Context, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (*http.Request, error) {
522	urlParameters := map[string]interface{}{
523		"accountName":      accountName,
524		"adlaJobDnsSuffix": client.AdlaJobDNSSuffix,
525	}
526
527	const APIVersion = "2016-11-01"
528	queryParameters := map[string]interface{}{
529		"api-version": APIVersion,
530	}
531	if len(filter) > 0 {
532		queryParameters["$filter"] = autorest.Encode("query", filter)
533	}
534	if top != nil {
535		queryParameters["$top"] = autorest.Encode("query", *top)
536	}
537	if skip != nil {
538		queryParameters["$skip"] = autorest.Encode("query", *skip)
539	}
540	if len(selectParameter) > 0 {
541		queryParameters["$select"] = autorest.Encode("query", selectParameter)
542	}
543	if len(orderby) > 0 {
544		queryParameters["$orderby"] = autorest.Encode("query", orderby)
545	}
546	if count != nil {
547		queryParameters["$count"] = autorest.Encode("query", *count)
548	}
549
550	preparer := autorest.CreatePreparer(
551		autorest.AsGet(),
552		autorest.WithCustomBaseURL("https://{accountName}.{adlaJobDnsSuffix}", urlParameters),
553		autorest.WithPath("/Jobs"),
554		autorest.WithQueryParameters(queryParameters))
555	return preparer.Prepare((&http.Request{}).WithContext(ctx))
556}
557
558// ListSender sends the List request. The method will close the
559// http.Response Body if it receives an error.
560func (client Client) ListSender(req *http.Request) (*http.Response, error) {
561	return autorest.SendWithSender(client, req,
562		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
563}
564
565// ListResponder handles the response to the List request. The method always
566// closes the http.Response Body.
567func (client Client) ListResponder(resp *http.Response) (result InfoListResult, err error) {
568	err = autorest.Respond(
569		resp,
570		client.ByInspecting(),
571		azure.WithErrorUnlessStatusCode(http.StatusOK),
572		autorest.ByUnmarshallingJSON(&result),
573		autorest.ByClosing())
574	result.Response = autorest.Response{Response: resp}
575	return
576}
577
578// listNextResults retrieves the next set of results, if any.
579func (client Client) listNextResults(lastResults InfoListResult) (result InfoListResult, err error) {
580	req, err := lastResults.infoListResultPreparer()
581	if err != nil {
582		return result, autorest.NewErrorWithError(err, "job.Client", "listNextResults", nil, "Failure preparing next results request")
583	}
584	if req == nil {
585		return
586	}
587	resp, err := client.ListSender(req)
588	if err != nil {
589		result.Response = autorest.Response{Response: resp}
590		return result, autorest.NewErrorWithError(err, "job.Client", "listNextResults", resp, "Failure sending next results request")
591	}
592	result, err = client.ListResponder(resp)
593	if err != nil {
594		err = autorest.NewErrorWithError(err, "job.Client", "listNextResults", resp, "Failure responding to next results request")
595	}
596	return
597}
598
599// ListComplete enumerates all values, automatically crossing page boundaries as required.
600func (client Client) ListComplete(ctx context.Context, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result InfoListResultIterator, err error) {
601	result.page, err = client.List(ctx, accountName, filter, top, skip, selectParameter, orderby, count)
602	return
603}
604