1// +build go1.13
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5// Code generated by Microsoft (R) AutoRest Code Generator.
6// Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
8package armcompute
9
10import (
11	"context"
12	"github.com/Azure/azure-sdk-for-go/sdk/azcore"
13	"reflect"
14)
15
16// AvailabilitySetListResultPager provides iteration over AvailabilitySetListResult pages.
17type AvailabilitySetListResultPager interface {
18	azcore.Pager
19
20	// PageResponse returns the current AvailabilitySetListResultResponse.
21	PageResponse() AvailabilitySetListResultResponse
22}
23
24type availabilitySetListResultCreateRequest func(context.Context) (*azcore.Request, error)
25
26type availabilitySetListResultHandleError func(*azcore.Response) error
27
28type availabilitySetListResultHandleResponse func(*azcore.Response) (AvailabilitySetListResultResponse, error)
29
30type availabilitySetListResultAdvancePage func(context.Context, AvailabilitySetListResultResponse) (*azcore.Request, error)
31
32type availabilitySetListResultPager struct {
33	// the pipeline for making the request
34	pipeline azcore.Pipeline
35	// creates the initial request (non-LRO case)
36	requester availabilitySetListResultCreateRequest
37	// callback for handling response errors
38	errorer availabilitySetListResultHandleError
39	// callback for handling the HTTP response
40	responder availabilitySetListResultHandleResponse
41	// callback for advancing to the next page
42	advancer availabilitySetListResultAdvancePage
43	// contains the current response
44	current AvailabilitySetListResultResponse
45	// status codes for successful retrieval
46	statusCodes []int
47	// any error encountered
48	err error
49}
50
51func (p *availabilitySetListResultPager) Err() error {
52	return p.err
53}
54
55func (p *availabilitySetListResultPager) NextPage(ctx context.Context) bool {
56	var req *azcore.Request
57	var err error
58	if !reflect.ValueOf(p.current).IsZero() {
59		if p.current.AvailabilitySetListResult.NextLink == nil || len(*p.current.AvailabilitySetListResult.NextLink) == 0 {
60			return false
61		}
62		req, err = p.advancer(ctx, p.current)
63	} else {
64		req, err = p.requester(ctx)
65	}
66	if err != nil {
67		p.err = err
68		return false
69	}
70	resp, err := p.pipeline.Do(req)
71	if err != nil {
72		p.err = err
73		return false
74	}
75	if !resp.HasStatusCode(p.statusCodes...) {
76		p.err = p.errorer(resp)
77		return false
78	}
79	result, err := p.responder(resp)
80	if err != nil {
81		p.err = err
82		return false
83	}
84	p.current = result
85	return true
86}
87
88func (p *availabilitySetListResultPager) PageResponse() AvailabilitySetListResultResponse {
89	return p.current
90}
91
92// CloudServiceListResultPager provides iteration over CloudServiceListResult pages.
93type CloudServiceListResultPager interface {
94	azcore.Pager
95
96	// PageResponse returns the current CloudServiceListResultResponse.
97	PageResponse() CloudServiceListResultResponse
98}
99
100type cloudServiceListResultCreateRequest func(context.Context) (*azcore.Request, error)
101
102type cloudServiceListResultHandleError func(*azcore.Response) error
103
104type cloudServiceListResultHandleResponse func(*azcore.Response) (CloudServiceListResultResponse, error)
105
106type cloudServiceListResultAdvancePage func(context.Context, CloudServiceListResultResponse) (*azcore.Request, error)
107
108type cloudServiceListResultPager struct {
109	// the pipeline for making the request
110	pipeline azcore.Pipeline
111	// creates the initial request (non-LRO case)
112	requester cloudServiceListResultCreateRequest
113	// callback for handling response errors
114	errorer cloudServiceListResultHandleError
115	// callback for handling the HTTP response
116	responder cloudServiceListResultHandleResponse
117	// callback for advancing to the next page
118	advancer cloudServiceListResultAdvancePage
119	// contains the current response
120	current CloudServiceListResultResponse
121	// status codes for successful retrieval
122	statusCodes []int
123	// any error encountered
124	err error
125}
126
127func (p *cloudServiceListResultPager) Err() error {
128	return p.err
129}
130
131func (p *cloudServiceListResultPager) NextPage(ctx context.Context) bool {
132	var req *azcore.Request
133	var err error
134	if !reflect.ValueOf(p.current).IsZero() {
135		if p.current.CloudServiceListResult.NextLink == nil || len(*p.current.CloudServiceListResult.NextLink) == 0 {
136			return false
137		}
138		req, err = p.advancer(ctx, p.current)
139	} else {
140		req, err = p.requester(ctx)
141	}
142	if err != nil {
143		p.err = err
144		return false
145	}
146	resp, err := p.pipeline.Do(req)
147	if err != nil {
148		p.err = err
149		return false
150	}
151	if !resp.HasStatusCode(p.statusCodes...) {
152		p.err = p.errorer(resp)
153		return false
154	}
155	result, err := p.responder(resp)
156	if err != nil {
157		p.err = err
158		return false
159	}
160	p.current = result
161	return true
162}
163
164func (p *cloudServiceListResultPager) PageResponse() CloudServiceListResultResponse {
165	return p.current
166}
167
168// CloudServiceRoleListResultPager provides iteration over CloudServiceRoleListResult pages.
169type CloudServiceRoleListResultPager interface {
170	azcore.Pager
171
172	// PageResponse returns the current CloudServiceRoleListResultResponse.
173	PageResponse() CloudServiceRoleListResultResponse
174}
175
176type cloudServiceRoleListResultCreateRequest func(context.Context) (*azcore.Request, error)
177
178type cloudServiceRoleListResultHandleError func(*azcore.Response) error
179
180type cloudServiceRoleListResultHandleResponse func(*azcore.Response) (CloudServiceRoleListResultResponse, error)
181
182type cloudServiceRoleListResultAdvancePage func(context.Context, CloudServiceRoleListResultResponse) (*azcore.Request, error)
183
184type cloudServiceRoleListResultPager struct {
185	// the pipeline for making the request
186	pipeline azcore.Pipeline
187	// creates the initial request (non-LRO case)
188	requester cloudServiceRoleListResultCreateRequest
189	// callback for handling response errors
190	errorer cloudServiceRoleListResultHandleError
191	// callback for handling the HTTP response
192	responder cloudServiceRoleListResultHandleResponse
193	// callback for advancing to the next page
194	advancer cloudServiceRoleListResultAdvancePage
195	// contains the current response
196	current CloudServiceRoleListResultResponse
197	// status codes for successful retrieval
198	statusCodes []int
199	// any error encountered
200	err error
201}
202
203func (p *cloudServiceRoleListResultPager) Err() error {
204	return p.err
205}
206
207func (p *cloudServiceRoleListResultPager) NextPage(ctx context.Context) bool {
208	var req *azcore.Request
209	var err error
210	if !reflect.ValueOf(p.current).IsZero() {
211		if p.current.CloudServiceRoleListResult.NextLink == nil || len(*p.current.CloudServiceRoleListResult.NextLink) == 0 {
212			return false
213		}
214		req, err = p.advancer(ctx, p.current)
215	} else {
216		req, err = p.requester(ctx)
217	}
218	if err != nil {
219		p.err = err
220		return false
221	}
222	resp, err := p.pipeline.Do(req)
223	if err != nil {
224		p.err = err
225		return false
226	}
227	if !resp.HasStatusCode(p.statusCodes...) {
228		p.err = p.errorer(resp)
229		return false
230	}
231	result, err := p.responder(resp)
232	if err != nil {
233		p.err = err
234		return false
235	}
236	p.current = result
237	return true
238}
239
240func (p *cloudServiceRoleListResultPager) PageResponse() CloudServiceRoleListResultResponse {
241	return p.current
242}
243
244// DedicatedHostGroupListResultPager provides iteration over DedicatedHostGroupListResult pages.
245type DedicatedHostGroupListResultPager interface {
246	azcore.Pager
247
248	// PageResponse returns the current DedicatedHostGroupListResultResponse.
249	PageResponse() DedicatedHostGroupListResultResponse
250}
251
252type dedicatedHostGroupListResultCreateRequest func(context.Context) (*azcore.Request, error)
253
254type dedicatedHostGroupListResultHandleError func(*azcore.Response) error
255
256type dedicatedHostGroupListResultHandleResponse func(*azcore.Response) (DedicatedHostGroupListResultResponse, error)
257
258type dedicatedHostGroupListResultAdvancePage func(context.Context, DedicatedHostGroupListResultResponse) (*azcore.Request, error)
259
260type dedicatedHostGroupListResultPager struct {
261	// the pipeline for making the request
262	pipeline azcore.Pipeline
263	// creates the initial request (non-LRO case)
264	requester dedicatedHostGroupListResultCreateRequest
265	// callback for handling response errors
266	errorer dedicatedHostGroupListResultHandleError
267	// callback for handling the HTTP response
268	responder dedicatedHostGroupListResultHandleResponse
269	// callback for advancing to the next page
270	advancer dedicatedHostGroupListResultAdvancePage
271	// contains the current response
272	current DedicatedHostGroupListResultResponse
273	// status codes for successful retrieval
274	statusCodes []int
275	// any error encountered
276	err error
277}
278
279func (p *dedicatedHostGroupListResultPager) Err() error {
280	return p.err
281}
282
283func (p *dedicatedHostGroupListResultPager) NextPage(ctx context.Context) bool {
284	var req *azcore.Request
285	var err error
286	if !reflect.ValueOf(p.current).IsZero() {
287		if p.current.DedicatedHostGroupListResult.NextLink == nil || len(*p.current.DedicatedHostGroupListResult.NextLink) == 0 {
288			return false
289		}
290		req, err = p.advancer(ctx, p.current)
291	} else {
292		req, err = p.requester(ctx)
293	}
294	if err != nil {
295		p.err = err
296		return false
297	}
298	resp, err := p.pipeline.Do(req)
299	if err != nil {
300		p.err = err
301		return false
302	}
303	if !resp.HasStatusCode(p.statusCodes...) {
304		p.err = p.errorer(resp)
305		return false
306	}
307	result, err := p.responder(resp)
308	if err != nil {
309		p.err = err
310		return false
311	}
312	p.current = result
313	return true
314}
315
316func (p *dedicatedHostGroupListResultPager) PageResponse() DedicatedHostGroupListResultResponse {
317	return p.current
318}
319
320// DedicatedHostListResultPager provides iteration over DedicatedHostListResult pages.
321type DedicatedHostListResultPager interface {
322	azcore.Pager
323
324	// PageResponse returns the current DedicatedHostListResultResponse.
325	PageResponse() DedicatedHostListResultResponse
326}
327
328type dedicatedHostListResultCreateRequest func(context.Context) (*azcore.Request, error)
329
330type dedicatedHostListResultHandleError func(*azcore.Response) error
331
332type dedicatedHostListResultHandleResponse func(*azcore.Response) (DedicatedHostListResultResponse, error)
333
334type dedicatedHostListResultAdvancePage func(context.Context, DedicatedHostListResultResponse) (*azcore.Request, error)
335
336type dedicatedHostListResultPager struct {
337	// the pipeline for making the request
338	pipeline azcore.Pipeline
339	// creates the initial request (non-LRO case)
340	requester dedicatedHostListResultCreateRequest
341	// callback for handling response errors
342	errorer dedicatedHostListResultHandleError
343	// callback for handling the HTTP response
344	responder dedicatedHostListResultHandleResponse
345	// callback for advancing to the next page
346	advancer dedicatedHostListResultAdvancePage
347	// contains the current response
348	current DedicatedHostListResultResponse
349	// status codes for successful retrieval
350	statusCodes []int
351	// any error encountered
352	err error
353}
354
355func (p *dedicatedHostListResultPager) Err() error {
356	return p.err
357}
358
359func (p *dedicatedHostListResultPager) NextPage(ctx context.Context) bool {
360	var req *azcore.Request
361	var err error
362	if !reflect.ValueOf(p.current).IsZero() {
363		if p.current.DedicatedHostListResult.NextLink == nil || len(*p.current.DedicatedHostListResult.NextLink) == 0 {
364			return false
365		}
366		req, err = p.advancer(ctx, p.current)
367	} else {
368		req, err = p.requester(ctx)
369	}
370	if err != nil {
371		p.err = err
372		return false
373	}
374	resp, err := p.pipeline.Do(req)
375	if err != nil {
376		p.err = err
377		return false
378	}
379	if !resp.HasStatusCode(p.statusCodes...) {
380		p.err = p.errorer(resp)
381		return false
382	}
383	result, err := p.responder(resp)
384	if err != nil {
385		p.err = err
386		return false
387	}
388	p.current = result
389	return true
390}
391
392func (p *dedicatedHostListResultPager) PageResponse() DedicatedHostListResultResponse {
393	return p.current
394}
395
396// DiskAccessListPager provides iteration over DiskAccessList pages.
397type DiskAccessListPager interface {
398	azcore.Pager
399
400	// PageResponse returns the current DiskAccessListResponse.
401	PageResponse() DiskAccessListResponse
402}
403
404type diskAccessListCreateRequest func(context.Context) (*azcore.Request, error)
405
406type diskAccessListHandleError func(*azcore.Response) error
407
408type diskAccessListHandleResponse func(*azcore.Response) (DiskAccessListResponse, error)
409
410type diskAccessListAdvancePage func(context.Context, DiskAccessListResponse) (*azcore.Request, error)
411
412type diskAccessListPager struct {
413	// the pipeline for making the request
414	pipeline azcore.Pipeline
415	// creates the initial request (non-LRO case)
416	requester diskAccessListCreateRequest
417	// callback for handling response errors
418	errorer diskAccessListHandleError
419	// callback for handling the HTTP response
420	responder diskAccessListHandleResponse
421	// callback for advancing to the next page
422	advancer diskAccessListAdvancePage
423	// contains the current response
424	current DiskAccessListResponse
425	// status codes for successful retrieval
426	statusCodes []int
427	// any error encountered
428	err error
429}
430
431func (p *diskAccessListPager) Err() error {
432	return p.err
433}
434
435func (p *diskAccessListPager) NextPage(ctx context.Context) bool {
436	var req *azcore.Request
437	var err error
438	if !reflect.ValueOf(p.current).IsZero() {
439		if p.current.DiskAccessList.NextLink == nil || len(*p.current.DiskAccessList.NextLink) == 0 {
440			return false
441		}
442		req, err = p.advancer(ctx, p.current)
443	} else {
444		req, err = p.requester(ctx)
445	}
446	if err != nil {
447		p.err = err
448		return false
449	}
450	resp, err := p.pipeline.Do(req)
451	if err != nil {
452		p.err = err
453		return false
454	}
455	if !resp.HasStatusCode(p.statusCodes...) {
456		p.err = p.errorer(resp)
457		return false
458	}
459	result, err := p.responder(resp)
460	if err != nil {
461		p.err = err
462		return false
463	}
464	p.current = result
465	return true
466}
467
468func (p *diskAccessListPager) PageResponse() DiskAccessListResponse {
469	return p.current
470}
471
472// DiskEncryptionSetListPager provides iteration over DiskEncryptionSetList pages.
473type DiskEncryptionSetListPager interface {
474	azcore.Pager
475
476	// PageResponse returns the current DiskEncryptionSetListResponse.
477	PageResponse() DiskEncryptionSetListResponse
478}
479
480type diskEncryptionSetListCreateRequest func(context.Context) (*azcore.Request, error)
481
482type diskEncryptionSetListHandleError func(*azcore.Response) error
483
484type diskEncryptionSetListHandleResponse func(*azcore.Response) (DiskEncryptionSetListResponse, error)
485
486type diskEncryptionSetListAdvancePage func(context.Context, DiskEncryptionSetListResponse) (*azcore.Request, error)
487
488type diskEncryptionSetListPager struct {
489	// the pipeline for making the request
490	pipeline azcore.Pipeline
491	// creates the initial request (non-LRO case)
492	requester diskEncryptionSetListCreateRequest
493	// callback for handling response errors
494	errorer diskEncryptionSetListHandleError
495	// callback for handling the HTTP response
496	responder diskEncryptionSetListHandleResponse
497	// callback for advancing to the next page
498	advancer diskEncryptionSetListAdvancePage
499	// contains the current response
500	current DiskEncryptionSetListResponse
501	// status codes for successful retrieval
502	statusCodes []int
503	// any error encountered
504	err error
505}
506
507func (p *diskEncryptionSetListPager) Err() error {
508	return p.err
509}
510
511func (p *diskEncryptionSetListPager) NextPage(ctx context.Context) bool {
512	var req *azcore.Request
513	var err error
514	if !reflect.ValueOf(p.current).IsZero() {
515		if p.current.DiskEncryptionSetList.NextLink == nil || len(*p.current.DiskEncryptionSetList.NextLink) == 0 {
516			return false
517		}
518		req, err = p.advancer(ctx, p.current)
519	} else {
520		req, err = p.requester(ctx)
521	}
522	if err != nil {
523		p.err = err
524		return false
525	}
526	resp, err := p.pipeline.Do(req)
527	if err != nil {
528		p.err = err
529		return false
530	}
531	if !resp.HasStatusCode(p.statusCodes...) {
532		p.err = p.errorer(resp)
533		return false
534	}
535	result, err := p.responder(resp)
536	if err != nil {
537		p.err = err
538		return false
539	}
540	p.current = result
541	return true
542}
543
544func (p *diskEncryptionSetListPager) PageResponse() DiskEncryptionSetListResponse {
545	return p.current
546}
547
548// DiskListPager provides iteration over DiskList pages.
549type DiskListPager interface {
550	azcore.Pager
551
552	// PageResponse returns the current DiskListResponse.
553	PageResponse() DiskListResponse
554}
555
556type diskListCreateRequest func(context.Context) (*azcore.Request, error)
557
558type diskListHandleError func(*azcore.Response) error
559
560type diskListHandleResponse func(*azcore.Response) (DiskListResponse, error)
561
562type diskListAdvancePage func(context.Context, DiskListResponse) (*azcore.Request, error)
563
564type diskListPager struct {
565	// the pipeline for making the request
566	pipeline azcore.Pipeline
567	// creates the initial request (non-LRO case)
568	requester diskListCreateRequest
569	// callback for handling response errors
570	errorer diskListHandleError
571	// callback for handling the HTTP response
572	responder diskListHandleResponse
573	// callback for advancing to the next page
574	advancer diskListAdvancePage
575	// contains the current response
576	current DiskListResponse
577	// status codes for successful retrieval
578	statusCodes []int
579	// any error encountered
580	err error
581}
582
583func (p *diskListPager) Err() error {
584	return p.err
585}
586
587func (p *diskListPager) NextPage(ctx context.Context) bool {
588	var req *azcore.Request
589	var err error
590	if !reflect.ValueOf(p.current).IsZero() {
591		if p.current.DiskList.NextLink == nil || len(*p.current.DiskList.NextLink) == 0 {
592			return false
593		}
594		req, err = p.advancer(ctx, p.current)
595	} else {
596		req, err = p.requester(ctx)
597	}
598	if err != nil {
599		p.err = err
600		return false
601	}
602	resp, err := p.pipeline.Do(req)
603	if err != nil {
604		p.err = err
605		return false
606	}
607	if !resp.HasStatusCode(p.statusCodes...) {
608		p.err = p.errorer(resp)
609		return false
610	}
611	result, err := p.responder(resp)
612	if err != nil {
613		p.err = err
614		return false
615	}
616	p.current = result
617	return true
618}
619
620func (p *diskListPager) PageResponse() DiskListResponse {
621	return p.current
622}
623
624// DiskRestorePointListPager provides iteration over DiskRestorePointList pages.
625type DiskRestorePointListPager interface {
626	azcore.Pager
627
628	// PageResponse returns the current DiskRestorePointListResponse.
629	PageResponse() DiskRestorePointListResponse
630}
631
632type diskRestorePointListCreateRequest func(context.Context) (*azcore.Request, error)
633
634type diskRestorePointListHandleError func(*azcore.Response) error
635
636type diskRestorePointListHandleResponse func(*azcore.Response) (DiskRestorePointListResponse, error)
637
638type diskRestorePointListAdvancePage func(context.Context, DiskRestorePointListResponse) (*azcore.Request, error)
639
640type diskRestorePointListPager struct {
641	// the pipeline for making the request
642	pipeline azcore.Pipeline
643	// creates the initial request (non-LRO case)
644	requester diskRestorePointListCreateRequest
645	// callback for handling response errors
646	errorer diskRestorePointListHandleError
647	// callback for handling the HTTP response
648	responder diskRestorePointListHandleResponse
649	// callback for advancing to the next page
650	advancer diskRestorePointListAdvancePage
651	// contains the current response
652	current DiskRestorePointListResponse
653	// status codes for successful retrieval
654	statusCodes []int
655	// any error encountered
656	err error
657}
658
659func (p *diskRestorePointListPager) Err() error {
660	return p.err
661}
662
663func (p *diskRestorePointListPager) NextPage(ctx context.Context) bool {
664	var req *azcore.Request
665	var err error
666	if !reflect.ValueOf(p.current).IsZero() {
667		if p.current.DiskRestorePointList.NextLink == nil || len(*p.current.DiskRestorePointList.NextLink) == 0 {
668			return false
669		}
670		req, err = p.advancer(ctx, p.current)
671	} else {
672		req, err = p.requester(ctx)
673	}
674	if err != nil {
675		p.err = err
676		return false
677	}
678	resp, err := p.pipeline.Do(req)
679	if err != nil {
680		p.err = err
681		return false
682	}
683	if !resp.HasStatusCode(p.statusCodes...) {
684		p.err = p.errorer(resp)
685		return false
686	}
687	result, err := p.responder(resp)
688	if err != nil {
689		p.err = err
690		return false
691	}
692	p.current = result
693	return true
694}
695
696func (p *diskRestorePointListPager) PageResponse() DiskRestorePointListResponse {
697	return p.current
698}
699
700// GalleryApplicationListPager provides iteration over GalleryApplicationList pages.
701type GalleryApplicationListPager interface {
702	azcore.Pager
703
704	// PageResponse returns the current GalleryApplicationListResponse.
705	PageResponse() GalleryApplicationListResponse
706}
707
708type galleryApplicationListCreateRequest func(context.Context) (*azcore.Request, error)
709
710type galleryApplicationListHandleError func(*azcore.Response) error
711
712type galleryApplicationListHandleResponse func(*azcore.Response) (GalleryApplicationListResponse, error)
713
714type galleryApplicationListAdvancePage func(context.Context, GalleryApplicationListResponse) (*azcore.Request, error)
715
716type galleryApplicationListPager struct {
717	// the pipeline for making the request
718	pipeline azcore.Pipeline
719	// creates the initial request (non-LRO case)
720	requester galleryApplicationListCreateRequest
721	// callback for handling response errors
722	errorer galleryApplicationListHandleError
723	// callback for handling the HTTP response
724	responder galleryApplicationListHandleResponse
725	// callback for advancing to the next page
726	advancer galleryApplicationListAdvancePage
727	// contains the current response
728	current GalleryApplicationListResponse
729	// status codes for successful retrieval
730	statusCodes []int
731	// any error encountered
732	err error
733}
734
735func (p *galleryApplicationListPager) Err() error {
736	return p.err
737}
738
739func (p *galleryApplicationListPager) NextPage(ctx context.Context) bool {
740	var req *azcore.Request
741	var err error
742	if !reflect.ValueOf(p.current).IsZero() {
743		if p.current.GalleryApplicationList.NextLink == nil || len(*p.current.GalleryApplicationList.NextLink) == 0 {
744			return false
745		}
746		req, err = p.advancer(ctx, p.current)
747	} else {
748		req, err = p.requester(ctx)
749	}
750	if err != nil {
751		p.err = err
752		return false
753	}
754	resp, err := p.pipeline.Do(req)
755	if err != nil {
756		p.err = err
757		return false
758	}
759	if !resp.HasStatusCode(p.statusCodes...) {
760		p.err = p.errorer(resp)
761		return false
762	}
763	result, err := p.responder(resp)
764	if err != nil {
765		p.err = err
766		return false
767	}
768	p.current = result
769	return true
770}
771
772func (p *galleryApplicationListPager) PageResponse() GalleryApplicationListResponse {
773	return p.current
774}
775
776// GalleryApplicationVersionListPager provides iteration over GalleryApplicationVersionList pages.
777type GalleryApplicationVersionListPager interface {
778	azcore.Pager
779
780	// PageResponse returns the current GalleryApplicationVersionListResponse.
781	PageResponse() GalleryApplicationVersionListResponse
782}
783
784type galleryApplicationVersionListCreateRequest func(context.Context) (*azcore.Request, error)
785
786type galleryApplicationVersionListHandleError func(*azcore.Response) error
787
788type galleryApplicationVersionListHandleResponse func(*azcore.Response) (GalleryApplicationVersionListResponse, error)
789
790type galleryApplicationVersionListAdvancePage func(context.Context, GalleryApplicationVersionListResponse) (*azcore.Request, error)
791
792type galleryApplicationVersionListPager struct {
793	// the pipeline for making the request
794	pipeline azcore.Pipeline
795	// creates the initial request (non-LRO case)
796	requester galleryApplicationVersionListCreateRequest
797	// callback for handling response errors
798	errorer galleryApplicationVersionListHandleError
799	// callback for handling the HTTP response
800	responder galleryApplicationVersionListHandleResponse
801	// callback for advancing to the next page
802	advancer galleryApplicationVersionListAdvancePage
803	// contains the current response
804	current GalleryApplicationVersionListResponse
805	// status codes for successful retrieval
806	statusCodes []int
807	// any error encountered
808	err error
809}
810
811func (p *galleryApplicationVersionListPager) Err() error {
812	return p.err
813}
814
815func (p *galleryApplicationVersionListPager) NextPage(ctx context.Context) bool {
816	var req *azcore.Request
817	var err error
818	if !reflect.ValueOf(p.current).IsZero() {
819		if p.current.GalleryApplicationVersionList.NextLink == nil || len(*p.current.GalleryApplicationVersionList.NextLink) == 0 {
820			return false
821		}
822		req, err = p.advancer(ctx, p.current)
823	} else {
824		req, err = p.requester(ctx)
825	}
826	if err != nil {
827		p.err = err
828		return false
829	}
830	resp, err := p.pipeline.Do(req)
831	if err != nil {
832		p.err = err
833		return false
834	}
835	if !resp.HasStatusCode(p.statusCodes...) {
836		p.err = p.errorer(resp)
837		return false
838	}
839	result, err := p.responder(resp)
840	if err != nil {
841		p.err = err
842		return false
843	}
844	p.current = result
845	return true
846}
847
848func (p *galleryApplicationVersionListPager) PageResponse() GalleryApplicationVersionListResponse {
849	return p.current
850}
851
852// GalleryImageListPager provides iteration over GalleryImageList pages.
853type GalleryImageListPager interface {
854	azcore.Pager
855
856	// PageResponse returns the current GalleryImageListResponse.
857	PageResponse() GalleryImageListResponse
858}
859
860type galleryImageListCreateRequest func(context.Context) (*azcore.Request, error)
861
862type galleryImageListHandleError func(*azcore.Response) error
863
864type galleryImageListHandleResponse func(*azcore.Response) (GalleryImageListResponse, error)
865
866type galleryImageListAdvancePage func(context.Context, GalleryImageListResponse) (*azcore.Request, error)
867
868type galleryImageListPager struct {
869	// the pipeline for making the request
870	pipeline azcore.Pipeline
871	// creates the initial request (non-LRO case)
872	requester galleryImageListCreateRequest
873	// callback for handling response errors
874	errorer galleryImageListHandleError
875	// callback for handling the HTTP response
876	responder galleryImageListHandleResponse
877	// callback for advancing to the next page
878	advancer galleryImageListAdvancePage
879	// contains the current response
880	current GalleryImageListResponse
881	// status codes for successful retrieval
882	statusCodes []int
883	// any error encountered
884	err error
885}
886
887func (p *galleryImageListPager) Err() error {
888	return p.err
889}
890
891func (p *galleryImageListPager) NextPage(ctx context.Context) bool {
892	var req *azcore.Request
893	var err error
894	if !reflect.ValueOf(p.current).IsZero() {
895		if p.current.GalleryImageList.NextLink == nil || len(*p.current.GalleryImageList.NextLink) == 0 {
896			return false
897		}
898		req, err = p.advancer(ctx, p.current)
899	} else {
900		req, err = p.requester(ctx)
901	}
902	if err != nil {
903		p.err = err
904		return false
905	}
906	resp, err := p.pipeline.Do(req)
907	if err != nil {
908		p.err = err
909		return false
910	}
911	if !resp.HasStatusCode(p.statusCodes...) {
912		p.err = p.errorer(resp)
913		return false
914	}
915	result, err := p.responder(resp)
916	if err != nil {
917		p.err = err
918		return false
919	}
920	p.current = result
921	return true
922}
923
924func (p *galleryImageListPager) PageResponse() GalleryImageListResponse {
925	return p.current
926}
927
928// GalleryImageVersionListPager provides iteration over GalleryImageVersionList pages.
929type GalleryImageVersionListPager interface {
930	azcore.Pager
931
932	// PageResponse returns the current GalleryImageVersionListResponse.
933	PageResponse() GalleryImageVersionListResponse
934}
935
936type galleryImageVersionListCreateRequest func(context.Context) (*azcore.Request, error)
937
938type galleryImageVersionListHandleError func(*azcore.Response) error
939
940type galleryImageVersionListHandleResponse func(*azcore.Response) (GalleryImageVersionListResponse, error)
941
942type galleryImageVersionListAdvancePage func(context.Context, GalleryImageVersionListResponse) (*azcore.Request, error)
943
944type galleryImageVersionListPager struct {
945	// the pipeline for making the request
946	pipeline azcore.Pipeline
947	// creates the initial request (non-LRO case)
948	requester galleryImageVersionListCreateRequest
949	// callback for handling response errors
950	errorer galleryImageVersionListHandleError
951	// callback for handling the HTTP response
952	responder galleryImageVersionListHandleResponse
953	// callback for advancing to the next page
954	advancer galleryImageVersionListAdvancePage
955	// contains the current response
956	current GalleryImageVersionListResponse
957	// status codes for successful retrieval
958	statusCodes []int
959	// any error encountered
960	err error
961}
962
963func (p *galleryImageVersionListPager) Err() error {
964	return p.err
965}
966
967func (p *galleryImageVersionListPager) NextPage(ctx context.Context) bool {
968	var req *azcore.Request
969	var err error
970	if !reflect.ValueOf(p.current).IsZero() {
971		if p.current.GalleryImageVersionList.NextLink == nil || len(*p.current.GalleryImageVersionList.NextLink) == 0 {
972			return false
973		}
974		req, err = p.advancer(ctx, p.current)
975	} else {
976		req, err = p.requester(ctx)
977	}
978	if err != nil {
979		p.err = err
980		return false
981	}
982	resp, err := p.pipeline.Do(req)
983	if err != nil {
984		p.err = err
985		return false
986	}
987	if !resp.HasStatusCode(p.statusCodes...) {
988		p.err = p.errorer(resp)
989		return false
990	}
991	result, err := p.responder(resp)
992	if err != nil {
993		p.err = err
994		return false
995	}
996	p.current = result
997	return true
998}
999
1000func (p *galleryImageVersionListPager) PageResponse() GalleryImageVersionListResponse {
1001	return p.current
1002}
1003
1004// GalleryListPager provides iteration over GalleryList pages.
1005type GalleryListPager interface {
1006	azcore.Pager
1007
1008	// PageResponse returns the current GalleryListResponse.
1009	PageResponse() GalleryListResponse
1010}
1011
1012type galleryListCreateRequest func(context.Context) (*azcore.Request, error)
1013
1014type galleryListHandleError func(*azcore.Response) error
1015
1016type galleryListHandleResponse func(*azcore.Response) (GalleryListResponse, error)
1017
1018type galleryListAdvancePage func(context.Context, GalleryListResponse) (*azcore.Request, error)
1019
1020type galleryListPager struct {
1021	// the pipeline for making the request
1022	pipeline azcore.Pipeline
1023	// creates the initial request (non-LRO case)
1024	requester galleryListCreateRequest
1025	// callback for handling response errors
1026	errorer galleryListHandleError
1027	// callback for handling the HTTP response
1028	responder galleryListHandleResponse
1029	// callback for advancing to the next page
1030	advancer galleryListAdvancePage
1031	// contains the current response
1032	current GalleryListResponse
1033	// status codes for successful retrieval
1034	statusCodes []int
1035	// any error encountered
1036	err error
1037}
1038
1039func (p *galleryListPager) Err() error {
1040	return p.err
1041}
1042
1043func (p *galleryListPager) NextPage(ctx context.Context) bool {
1044	var req *azcore.Request
1045	var err error
1046	if !reflect.ValueOf(p.current).IsZero() {
1047		if p.current.GalleryList.NextLink == nil || len(*p.current.GalleryList.NextLink) == 0 {
1048			return false
1049		}
1050		req, err = p.advancer(ctx, p.current)
1051	} else {
1052		req, err = p.requester(ctx)
1053	}
1054	if err != nil {
1055		p.err = err
1056		return false
1057	}
1058	resp, err := p.pipeline.Do(req)
1059	if err != nil {
1060		p.err = err
1061		return false
1062	}
1063	if !resp.HasStatusCode(p.statusCodes...) {
1064		p.err = p.errorer(resp)
1065		return false
1066	}
1067	result, err := p.responder(resp)
1068	if err != nil {
1069		p.err = err
1070		return false
1071	}
1072	p.current = result
1073	return true
1074}
1075
1076func (p *galleryListPager) PageResponse() GalleryListResponse {
1077	return p.current
1078}
1079
1080// ImageListResultPager provides iteration over ImageListResult pages.
1081type ImageListResultPager interface {
1082	azcore.Pager
1083
1084	// PageResponse returns the current ImageListResultResponse.
1085	PageResponse() ImageListResultResponse
1086}
1087
1088type imageListResultCreateRequest func(context.Context) (*azcore.Request, error)
1089
1090type imageListResultHandleError func(*azcore.Response) error
1091
1092type imageListResultHandleResponse func(*azcore.Response) (ImageListResultResponse, error)
1093
1094type imageListResultAdvancePage func(context.Context, ImageListResultResponse) (*azcore.Request, error)
1095
1096type imageListResultPager struct {
1097	// the pipeline for making the request
1098	pipeline azcore.Pipeline
1099	// creates the initial request (non-LRO case)
1100	requester imageListResultCreateRequest
1101	// callback for handling response errors
1102	errorer imageListResultHandleError
1103	// callback for handling the HTTP response
1104	responder imageListResultHandleResponse
1105	// callback for advancing to the next page
1106	advancer imageListResultAdvancePage
1107	// contains the current response
1108	current ImageListResultResponse
1109	// status codes for successful retrieval
1110	statusCodes []int
1111	// any error encountered
1112	err error
1113}
1114
1115func (p *imageListResultPager) Err() error {
1116	return p.err
1117}
1118
1119func (p *imageListResultPager) NextPage(ctx context.Context) bool {
1120	var req *azcore.Request
1121	var err error
1122	if !reflect.ValueOf(p.current).IsZero() {
1123		if p.current.ImageListResult.NextLink == nil || len(*p.current.ImageListResult.NextLink) == 0 {
1124			return false
1125		}
1126		req, err = p.advancer(ctx, p.current)
1127	} else {
1128		req, err = p.requester(ctx)
1129	}
1130	if err != nil {
1131		p.err = err
1132		return false
1133	}
1134	resp, err := p.pipeline.Do(req)
1135	if err != nil {
1136		p.err = err
1137		return false
1138	}
1139	if !resp.HasStatusCode(p.statusCodes...) {
1140		p.err = p.errorer(resp)
1141		return false
1142	}
1143	result, err := p.responder(resp)
1144	if err != nil {
1145		p.err = err
1146		return false
1147	}
1148	p.current = result
1149	return true
1150}
1151
1152func (p *imageListResultPager) PageResponse() ImageListResultResponse {
1153	return p.current
1154}
1155
1156// ListUsagesResultPager provides iteration over ListUsagesResult pages.
1157type ListUsagesResultPager interface {
1158	azcore.Pager
1159
1160	// PageResponse returns the current ListUsagesResultResponse.
1161	PageResponse() ListUsagesResultResponse
1162}
1163
1164type listUsagesResultCreateRequest func(context.Context) (*azcore.Request, error)
1165
1166type listUsagesResultHandleError func(*azcore.Response) error
1167
1168type listUsagesResultHandleResponse func(*azcore.Response) (ListUsagesResultResponse, error)
1169
1170type listUsagesResultAdvancePage func(context.Context, ListUsagesResultResponse) (*azcore.Request, error)
1171
1172type listUsagesResultPager struct {
1173	// the pipeline for making the request
1174	pipeline azcore.Pipeline
1175	// creates the initial request (non-LRO case)
1176	requester listUsagesResultCreateRequest
1177	// callback for handling response errors
1178	errorer listUsagesResultHandleError
1179	// callback for handling the HTTP response
1180	responder listUsagesResultHandleResponse
1181	// callback for advancing to the next page
1182	advancer listUsagesResultAdvancePage
1183	// contains the current response
1184	current ListUsagesResultResponse
1185	// status codes for successful retrieval
1186	statusCodes []int
1187	// any error encountered
1188	err error
1189}
1190
1191func (p *listUsagesResultPager) Err() error {
1192	return p.err
1193}
1194
1195func (p *listUsagesResultPager) NextPage(ctx context.Context) bool {
1196	var req *azcore.Request
1197	var err error
1198	if !reflect.ValueOf(p.current).IsZero() {
1199		if p.current.ListUsagesResult.NextLink == nil || len(*p.current.ListUsagesResult.NextLink) == 0 {
1200			return false
1201		}
1202		req, err = p.advancer(ctx, p.current)
1203	} else {
1204		req, err = p.requester(ctx)
1205	}
1206	if err != nil {
1207		p.err = err
1208		return false
1209	}
1210	resp, err := p.pipeline.Do(req)
1211	if err != nil {
1212		p.err = err
1213		return false
1214	}
1215	if !resp.HasStatusCode(p.statusCodes...) {
1216		p.err = p.errorer(resp)
1217		return false
1218	}
1219	result, err := p.responder(resp)
1220	if err != nil {
1221		p.err = err
1222		return false
1223	}
1224	p.current = result
1225	return true
1226}
1227
1228func (p *listUsagesResultPager) PageResponse() ListUsagesResultResponse {
1229	return p.current
1230}
1231
1232// OSFamilyListResultPager provides iteration over OSFamilyListResult pages.
1233type OSFamilyListResultPager interface {
1234	azcore.Pager
1235
1236	// PageResponse returns the current OSFamilyListResultResponse.
1237	PageResponse() OSFamilyListResultResponse
1238}
1239
1240type osFamilyListResultCreateRequest func(context.Context) (*azcore.Request, error)
1241
1242type osFamilyListResultHandleError func(*azcore.Response) error
1243
1244type osFamilyListResultHandleResponse func(*azcore.Response) (OSFamilyListResultResponse, error)
1245
1246type osFamilyListResultAdvancePage func(context.Context, OSFamilyListResultResponse) (*azcore.Request, error)
1247
1248type osFamilyListResultPager struct {
1249	// the pipeline for making the request
1250	pipeline azcore.Pipeline
1251	// creates the initial request (non-LRO case)
1252	requester osFamilyListResultCreateRequest
1253	// callback for handling response errors
1254	errorer osFamilyListResultHandleError
1255	// callback for handling the HTTP response
1256	responder osFamilyListResultHandleResponse
1257	// callback for advancing to the next page
1258	advancer osFamilyListResultAdvancePage
1259	// contains the current response
1260	current OSFamilyListResultResponse
1261	// status codes for successful retrieval
1262	statusCodes []int
1263	// any error encountered
1264	err error
1265}
1266
1267func (p *osFamilyListResultPager) Err() error {
1268	return p.err
1269}
1270
1271func (p *osFamilyListResultPager) NextPage(ctx context.Context) bool {
1272	var req *azcore.Request
1273	var err error
1274	if !reflect.ValueOf(p.current).IsZero() {
1275		if p.current.OSFamilyListResult.NextLink == nil || len(*p.current.OSFamilyListResult.NextLink) == 0 {
1276			return false
1277		}
1278		req, err = p.advancer(ctx, p.current)
1279	} else {
1280		req, err = p.requester(ctx)
1281	}
1282	if err != nil {
1283		p.err = err
1284		return false
1285	}
1286	resp, err := p.pipeline.Do(req)
1287	if err != nil {
1288		p.err = err
1289		return false
1290	}
1291	if !resp.HasStatusCode(p.statusCodes...) {
1292		p.err = p.errorer(resp)
1293		return false
1294	}
1295	result, err := p.responder(resp)
1296	if err != nil {
1297		p.err = err
1298		return false
1299	}
1300	p.current = result
1301	return true
1302}
1303
1304func (p *osFamilyListResultPager) PageResponse() OSFamilyListResultResponse {
1305	return p.current
1306}
1307
1308// OSVersionListResultPager provides iteration over OSVersionListResult pages.
1309type OSVersionListResultPager interface {
1310	azcore.Pager
1311
1312	// PageResponse returns the current OSVersionListResultResponse.
1313	PageResponse() OSVersionListResultResponse
1314}
1315
1316type osVersionListResultCreateRequest func(context.Context) (*azcore.Request, error)
1317
1318type osVersionListResultHandleError func(*azcore.Response) error
1319
1320type osVersionListResultHandleResponse func(*azcore.Response) (OSVersionListResultResponse, error)
1321
1322type osVersionListResultAdvancePage func(context.Context, OSVersionListResultResponse) (*azcore.Request, error)
1323
1324type osVersionListResultPager struct {
1325	// the pipeline for making the request
1326	pipeline azcore.Pipeline
1327	// creates the initial request (non-LRO case)
1328	requester osVersionListResultCreateRequest
1329	// callback for handling response errors
1330	errorer osVersionListResultHandleError
1331	// callback for handling the HTTP response
1332	responder osVersionListResultHandleResponse
1333	// callback for advancing to the next page
1334	advancer osVersionListResultAdvancePage
1335	// contains the current response
1336	current OSVersionListResultResponse
1337	// status codes for successful retrieval
1338	statusCodes []int
1339	// any error encountered
1340	err error
1341}
1342
1343func (p *osVersionListResultPager) Err() error {
1344	return p.err
1345}
1346
1347func (p *osVersionListResultPager) NextPage(ctx context.Context) bool {
1348	var req *azcore.Request
1349	var err error
1350	if !reflect.ValueOf(p.current).IsZero() {
1351		if p.current.OSVersionListResult.NextLink == nil || len(*p.current.OSVersionListResult.NextLink) == 0 {
1352			return false
1353		}
1354		req, err = p.advancer(ctx, p.current)
1355	} else {
1356		req, err = p.requester(ctx)
1357	}
1358	if err != nil {
1359		p.err = err
1360		return false
1361	}
1362	resp, err := p.pipeline.Do(req)
1363	if err != nil {
1364		p.err = err
1365		return false
1366	}
1367	if !resp.HasStatusCode(p.statusCodes...) {
1368		p.err = p.errorer(resp)
1369		return false
1370	}
1371	result, err := p.responder(resp)
1372	if err != nil {
1373		p.err = err
1374		return false
1375	}
1376	p.current = result
1377	return true
1378}
1379
1380func (p *osVersionListResultPager) PageResponse() OSVersionListResultResponse {
1381	return p.current
1382}
1383
1384// PrivateEndpointConnectionListResultPager provides iteration over PrivateEndpointConnectionListResult pages.
1385type PrivateEndpointConnectionListResultPager interface {
1386	azcore.Pager
1387
1388	// PageResponse returns the current PrivateEndpointConnectionListResultResponse.
1389	PageResponse() PrivateEndpointConnectionListResultResponse
1390}
1391
1392type privateEndpointConnectionListResultCreateRequest func(context.Context) (*azcore.Request, error)
1393
1394type privateEndpointConnectionListResultHandleError func(*azcore.Response) error
1395
1396type privateEndpointConnectionListResultHandleResponse func(*azcore.Response) (PrivateEndpointConnectionListResultResponse, error)
1397
1398type privateEndpointConnectionListResultAdvancePage func(context.Context, PrivateEndpointConnectionListResultResponse) (*azcore.Request, error)
1399
1400type privateEndpointConnectionListResultPager struct {
1401	// the pipeline for making the request
1402	pipeline azcore.Pipeline
1403	// creates the initial request (non-LRO case)
1404	requester privateEndpointConnectionListResultCreateRequest
1405	// callback for handling response errors
1406	errorer privateEndpointConnectionListResultHandleError
1407	// callback for handling the HTTP response
1408	responder privateEndpointConnectionListResultHandleResponse
1409	// callback for advancing to the next page
1410	advancer privateEndpointConnectionListResultAdvancePage
1411	// contains the current response
1412	current PrivateEndpointConnectionListResultResponse
1413	// status codes for successful retrieval
1414	statusCodes []int
1415	// any error encountered
1416	err error
1417}
1418
1419func (p *privateEndpointConnectionListResultPager) Err() error {
1420	return p.err
1421}
1422
1423func (p *privateEndpointConnectionListResultPager) NextPage(ctx context.Context) bool {
1424	var req *azcore.Request
1425	var err error
1426	if !reflect.ValueOf(p.current).IsZero() {
1427		if p.current.PrivateEndpointConnectionListResult.NextLink == nil || len(*p.current.PrivateEndpointConnectionListResult.NextLink) == 0 {
1428			return false
1429		}
1430		req, err = p.advancer(ctx, p.current)
1431	} else {
1432		req, err = p.requester(ctx)
1433	}
1434	if err != nil {
1435		p.err = err
1436		return false
1437	}
1438	resp, err := p.pipeline.Do(req)
1439	if err != nil {
1440		p.err = err
1441		return false
1442	}
1443	if !resp.HasStatusCode(p.statusCodes...) {
1444		p.err = p.errorer(resp)
1445		return false
1446	}
1447	result, err := p.responder(resp)
1448	if err != nil {
1449		p.err = err
1450		return false
1451	}
1452	p.current = result
1453	return true
1454}
1455
1456func (p *privateEndpointConnectionListResultPager) PageResponse() PrivateEndpointConnectionListResultResponse {
1457	return p.current
1458}
1459
1460// ProximityPlacementGroupListResultPager provides iteration over ProximityPlacementGroupListResult pages.
1461type ProximityPlacementGroupListResultPager interface {
1462	azcore.Pager
1463
1464	// PageResponse returns the current ProximityPlacementGroupListResultResponse.
1465	PageResponse() ProximityPlacementGroupListResultResponse
1466}
1467
1468type proximityPlacementGroupListResultCreateRequest func(context.Context) (*azcore.Request, error)
1469
1470type proximityPlacementGroupListResultHandleError func(*azcore.Response) error
1471
1472type proximityPlacementGroupListResultHandleResponse func(*azcore.Response) (ProximityPlacementGroupListResultResponse, error)
1473
1474type proximityPlacementGroupListResultAdvancePage func(context.Context, ProximityPlacementGroupListResultResponse) (*azcore.Request, error)
1475
1476type proximityPlacementGroupListResultPager struct {
1477	// the pipeline for making the request
1478	pipeline azcore.Pipeline
1479	// creates the initial request (non-LRO case)
1480	requester proximityPlacementGroupListResultCreateRequest
1481	// callback for handling response errors
1482	errorer proximityPlacementGroupListResultHandleError
1483	// callback for handling the HTTP response
1484	responder proximityPlacementGroupListResultHandleResponse
1485	// callback for advancing to the next page
1486	advancer proximityPlacementGroupListResultAdvancePage
1487	// contains the current response
1488	current ProximityPlacementGroupListResultResponse
1489	// status codes for successful retrieval
1490	statusCodes []int
1491	// any error encountered
1492	err error
1493}
1494
1495func (p *proximityPlacementGroupListResultPager) Err() error {
1496	return p.err
1497}
1498
1499func (p *proximityPlacementGroupListResultPager) NextPage(ctx context.Context) bool {
1500	var req *azcore.Request
1501	var err error
1502	if !reflect.ValueOf(p.current).IsZero() {
1503		if p.current.ProximityPlacementGroupListResult.NextLink == nil || len(*p.current.ProximityPlacementGroupListResult.NextLink) == 0 {
1504			return false
1505		}
1506		req, err = p.advancer(ctx, p.current)
1507	} else {
1508		req, err = p.requester(ctx)
1509	}
1510	if err != nil {
1511		p.err = err
1512		return false
1513	}
1514	resp, err := p.pipeline.Do(req)
1515	if err != nil {
1516		p.err = err
1517		return false
1518	}
1519	if !resp.HasStatusCode(p.statusCodes...) {
1520		p.err = p.errorer(resp)
1521		return false
1522	}
1523	result, err := p.responder(resp)
1524	if err != nil {
1525		p.err = err
1526		return false
1527	}
1528	p.current = result
1529	return true
1530}
1531
1532func (p *proximityPlacementGroupListResultPager) PageResponse() ProximityPlacementGroupListResultResponse {
1533	return p.current
1534}
1535
1536// ResourceSKUsResultPager provides iteration over ResourceSKUsResult pages.
1537type ResourceSKUsResultPager interface {
1538	azcore.Pager
1539
1540	// PageResponse returns the current ResourceSKUsResultResponse.
1541	PageResponse() ResourceSKUsResultResponse
1542}
1543
1544type resourceSKUsResultCreateRequest func(context.Context) (*azcore.Request, error)
1545
1546type resourceSKUsResultHandleError func(*azcore.Response) error
1547
1548type resourceSKUsResultHandleResponse func(*azcore.Response) (ResourceSKUsResultResponse, error)
1549
1550type resourceSKUsResultAdvancePage func(context.Context, ResourceSKUsResultResponse) (*azcore.Request, error)
1551
1552type resourceSKUsResultPager struct {
1553	// the pipeline for making the request
1554	pipeline azcore.Pipeline
1555	// creates the initial request (non-LRO case)
1556	requester resourceSKUsResultCreateRequest
1557	// callback for handling response errors
1558	errorer resourceSKUsResultHandleError
1559	// callback for handling the HTTP response
1560	responder resourceSKUsResultHandleResponse
1561	// callback for advancing to the next page
1562	advancer resourceSKUsResultAdvancePage
1563	// contains the current response
1564	current ResourceSKUsResultResponse
1565	// status codes for successful retrieval
1566	statusCodes []int
1567	// any error encountered
1568	err error
1569}
1570
1571func (p *resourceSKUsResultPager) Err() error {
1572	return p.err
1573}
1574
1575func (p *resourceSKUsResultPager) NextPage(ctx context.Context) bool {
1576	var req *azcore.Request
1577	var err error
1578	if !reflect.ValueOf(p.current).IsZero() {
1579		if p.current.ResourceSKUsResult.NextLink == nil || len(*p.current.ResourceSKUsResult.NextLink) == 0 {
1580			return false
1581		}
1582		req, err = p.advancer(ctx, p.current)
1583	} else {
1584		req, err = p.requester(ctx)
1585	}
1586	if err != nil {
1587		p.err = err
1588		return false
1589	}
1590	resp, err := p.pipeline.Do(req)
1591	if err != nil {
1592		p.err = err
1593		return false
1594	}
1595	if !resp.HasStatusCode(p.statusCodes...) {
1596		p.err = p.errorer(resp)
1597		return false
1598	}
1599	result, err := p.responder(resp)
1600	if err != nil {
1601		p.err = err
1602		return false
1603	}
1604	p.current = result
1605	return true
1606}
1607
1608func (p *resourceSKUsResultPager) PageResponse() ResourceSKUsResultResponse {
1609	return p.current
1610}
1611
1612// ResourceURIListPager provides iteration over ResourceURIList pages.
1613type ResourceURIListPager interface {
1614	azcore.Pager
1615
1616	// PageResponse returns the current ResourceURIListResponse.
1617	PageResponse() ResourceURIListResponse
1618}
1619
1620type resourceURIListCreateRequest func(context.Context) (*azcore.Request, error)
1621
1622type resourceURIListHandleError func(*azcore.Response) error
1623
1624type resourceURIListHandleResponse func(*azcore.Response) (ResourceURIListResponse, error)
1625
1626type resourceURIListAdvancePage func(context.Context, ResourceURIListResponse) (*azcore.Request, error)
1627
1628type resourceURIListPager struct {
1629	// the pipeline for making the request
1630	pipeline azcore.Pipeline
1631	// creates the initial request (non-LRO case)
1632	requester resourceURIListCreateRequest
1633	// callback for handling response errors
1634	errorer resourceURIListHandleError
1635	// callback for handling the HTTP response
1636	responder resourceURIListHandleResponse
1637	// callback for advancing to the next page
1638	advancer resourceURIListAdvancePage
1639	// contains the current response
1640	current ResourceURIListResponse
1641	// status codes for successful retrieval
1642	statusCodes []int
1643	// any error encountered
1644	err error
1645}
1646
1647func (p *resourceURIListPager) Err() error {
1648	return p.err
1649}
1650
1651func (p *resourceURIListPager) NextPage(ctx context.Context) bool {
1652	var req *azcore.Request
1653	var err error
1654	if !reflect.ValueOf(p.current).IsZero() {
1655		if p.current.ResourceURIList.NextLink == nil || len(*p.current.ResourceURIList.NextLink) == 0 {
1656			return false
1657		}
1658		req, err = p.advancer(ctx, p.current)
1659	} else {
1660		req, err = p.requester(ctx)
1661	}
1662	if err != nil {
1663		p.err = err
1664		return false
1665	}
1666	resp, err := p.pipeline.Do(req)
1667	if err != nil {
1668		p.err = err
1669		return false
1670	}
1671	if !resp.HasStatusCode(p.statusCodes...) {
1672		p.err = p.errorer(resp)
1673		return false
1674	}
1675	result, err := p.responder(resp)
1676	if err != nil {
1677		p.err = err
1678		return false
1679	}
1680	p.current = result
1681	return true
1682}
1683
1684func (p *resourceURIListPager) PageResponse() ResourceURIListResponse {
1685	return p.current
1686}
1687
1688// RestorePointCollectionListResultPager provides iteration over RestorePointCollectionListResult pages.
1689type RestorePointCollectionListResultPager interface {
1690	azcore.Pager
1691
1692	// PageResponse returns the current RestorePointCollectionListResultResponse.
1693	PageResponse() RestorePointCollectionListResultResponse
1694}
1695
1696type restorePointCollectionListResultCreateRequest func(context.Context) (*azcore.Request, error)
1697
1698type restorePointCollectionListResultHandleError func(*azcore.Response) error
1699
1700type restorePointCollectionListResultHandleResponse func(*azcore.Response) (RestorePointCollectionListResultResponse, error)
1701
1702type restorePointCollectionListResultAdvancePage func(context.Context, RestorePointCollectionListResultResponse) (*azcore.Request, error)
1703
1704type restorePointCollectionListResultPager struct {
1705	// the pipeline for making the request
1706	pipeline azcore.Pipeline
1707	// creates the initial request (non-LRO case)
1708	requester restorePointCollectionListResultCreateRequest
1709	// callback for handling response errors
1710	errorer restorePointCollectionListResultHandleError
1711	// callback for handling the HTTP response
1712	responder restorePointCollectionListResultHandleResponse
1713	// callback for advancing to the next page
1714	advancer restorePointCollectionListResultAdvancePage
1715	// contains the current response
1716	current RestorePointCollectionListResultResponse
1717	// status codes for successful retrieval
1718	statusCodes []int
1719	// any error encountered
1720	err error
1721}
1722
1723func (p *restorePointCollectionListResultPager) Err() error {
1724	return p.err
1725}
1726
1727func (p *restorePointCollectionListResultPager) NextPage(ctx context.Context) bool {
1728	var req *azcore.Request
1729	var err error
1730	if !reflect.ValueOf(p.current).IsZero() {
1731		if p.current.RestorePointCollectionListResult.NextLink == nil || len(*p.current.RestorePointCollectionListResult.NextLink) == 0 {
1732			return false
1733		}
1734		req, err = p.advancer(ctx, p.current)
1735	} else {
1736		req, err = p.requester(ctx)
1737	}
1738	if err != nil {
1739		p.err = err
1740		return false
1741	}
1742	resp, err := p.pipeline.Do(req)
1743	if err != nil {
1744		p.err = err
1745		return false
1746	}
1747	if !resp.HasStatusCode(p.statusCodes...) {
1748		p.err = p.errorer(resp)
1749		return false
1750	}
1751	result, err := p.responder(resp)
1752	if err != nil {
1753		p.err = err
1754		return false
1755	}
1756	p.current = result
1757	return true
1758}
1759
1760func (p *restorePointCollectionListResultPager) PageResponse() RestorePointCollectionListResultResponse {
1761	return p.current
1762}
1763
1764// RoleInstanceListResultPager provides iteration over RoleInstanceListResult pages.
1765type RoleInstanceListResultPager interface {
1766	azcore.Pager
1767
1768	// PageResponse returns the current RoleInstanceListResultResponse.
1769	PageResponse() RoleInstanceListResultResponse
1770}
1771
1772type roleInstanceListResultCreateRequest func(context.Context) (*azcore.Request, error)
1773
1774type roleInstanceListResultHandleError func(*azcore.Response) error
1775
1776type roleInstanceListResultHandleResponse func(*azcore.Response) (RoleInstanceListResultResponse, error)
1777
1778type roleInstanceListResultAdvancePage func(context.Context, RoleInstanceListResultResponse) (*azcore.Request, error)
1779
1780type roleInstanceListResultPager struct {
1781	// the pipeline for making the request
1782	pipeline azcore.Pipeline
1783	// creates the initial request (non-LRO case)
1784	requester roleInstanceListResultCreateRequest
1785	// callback for handling response errors
1786	errorer roleInstanceListResultHandleError
1787	// callback for handling the HTTP response
1788	responder roleInstanceListResultHandleResponse
1789	// callback for advancing to the next page
1790	advancer roleInstanceListResultAdvancePage
1791	// contains the current response
1792	current RoleInstanceListResultResponse
1793	// status codes for successful retrieval
1794	statusCodes []int
1795	// any error encountered
1796	err error
1797}
1798
1799func (p *roleInstanceListResultPager) Err() error {
1800	return p.err
1801}
1802
1803func (p *roleInstanceListResultPager) NextPage(ctx context.Context) bool {
1804	var req *azcore.Request
1805	var err error
1806	if !reflect.ValueOf(p.current).IsZero() {
1807		if p.current.RoleInstanceListResult.NextLink == nil || len(*p.current.RoleInstanceListResult.NextLink) == 0 {
1808			return false
1809		}
1810		req, err = p.advancer(ctx, p.current)
1811	} else {
1812		req, err = p.requester(ctx)
1813	}
1814	if err != nil {
1815		p.err = err
1816		return false
1817	}
1818	resp, err := p.pipeline.Do(req)
1819	if err != nil {
1820		p.err = err
1821		return false
1822	}
1823	if !resp.HasStatusCode(p.statusCodes...) {
1824		p.err = p.errorer(resp)
1825		return false
1826	}
1827	result, err := p.responder(resp)
1828	if err != nil {
1829		p.err = err
1830		return false
1831	}
1832	p.current = result
1833	return true
1834}
1835
1836func (p *roleInstanceListResultPager) PageResponse() RoleInstanceListResultResponse {
1837	return p.current
1838}
1839
1840// RunCommandListResultPager provides iteration over RunCommandListResult pages.
1841type RunCommandListResultPager interface {
1842	azcore.Pager
1843
1844	// PageResponse returns the current RunCommandListResultResponse.
1845	PageResponse() RunCommandListResultResponse
1846}
1847
1848type runCommandListResultCreateRequest func(context.Context) (*azcore.Request, error)
1849
1850type runCommandListResultHandleError func(*azcore.Response) error
1851
1852type runCommandListResultHandleResponse func(*azcore.Response) (RunCommandListResultResponse, error)
1853
1854type runCommandListResultAdvancePage func(context.Context, RunCommandListResultResponse) (*azcore.Request, error)
1855
1856type runCommandListResultPager struct {
1857	// the pipeline for making the request
1858	pipeline azcore.Pipeline
1859	// creates the initial request (non-LRO case)
1860	requester runCommandListResultCreateRequest
1861	// callback for handling response errors
1862	errorer runCommandListResultHandleError
1863	// callback for handling the HTTP response
1864	responder runCommandListResultHandleResponse
1865	// callback for advancing to the next page
1866	advancer runCommandListResultAdvancePage
1867	// contains the current response
1868	current RunCommandListResultResponse
1869	// status codes for successful retrieval
1870	statusCodes []int
1871	// any error encountered
1872	err error
1873}
1874
1875func (p *runCommandListResultPager) Err() error {
1876	return p.err
1877}
1878
1879func (p *runCommandListResultPager) NextPage(ctx context.Context) bool {
1880	var req *azcore.Request
1881	var err error
1882	if !reflect.ValueOf(p.current).IsZero() {
1883		if p.current.RunCommandListResult.NextLink == nil || len(*p.current.RunCommandListResult.NextLink) == 0 {
1884			return false
1885		}
1886		req, err = p.advancer(ctx, p.current)
1887	} else {
1888		req, err = p.requester(ctx)
1889	}
1890	if err != nil {
1891		p.err = err
1892		return false
1893	}
1894	resp, err := p.pipeline.Do(req)
1895	if err != nil {
1896		p.err = err
1897		return false
1898	}
1899	if !resp.HasStatusCode(p.statusCodes...) {
1900		p.err = p.errorer(resp)
1901		return false
1902	}
1903	result, err := p.responder(resp)
1904	if err != nil {
1905		p.err = err
1906		return false
1907	}
1908	p.current = result
1909	return true
1910}
1911
1912func (p *runCommandListResultPager) PageResponse() RunCommandListResultResponse {
1913	return p.current
1914}
1915
1916// SSHPublicKeysGroupListResultPager provides iteration over SSHPublicKeysGroupListResult pages.
1917type SSHPublicKeysGroupListResultPager interface {
1918	azcore.Pager
1919
1920	// PageResponse returns the current SSHPublicKeysGroupListResultResponse.
1921	PageResponse() SSHPublicKeysGroupListResultResponse
1922}
1923
1924type sshPublicKeysGroupListResultCreateRequest func(context.Context) (*azcore.Request, error)
1925
1926type sshPublicKeysGroupListResultHandleError func(*azcore.Response) error
1927
1928type sshPublicKeysGroupListResultHandleResponse func(*azcore.Response) (SSHPublicKeysGroupListResultResponse, error)
1929
1930type sshPublicKeysGroupListResultAdvancePage func(context.Context, SSHPublicKeysGroupListResultResponse) (*azcore.Request, error)
1931
1932type sshPublicKeysGroupListResultPager struct {
1933	// the pipeline for making the request
1934	pipeline azcore.Pipeline
1935	// creates the initial request (non-LRO case)
1936	requester sshPublicKeysGroupListResultCreateRequest
1937	// callback for handling response errors
1938	errorer sshPublicKeysGroupListResultHandleError
1939	// callback for handling the HTTP response
1940	responder sshPublicKeysGroupListResultHandleResponse
1941	// callback for advancing to the next page
1942	advancer sshPublicKeysGroupListResultAdvancePage
1943	// contains the current response
1944	current SSHPublicKeysGroupListResultResponse
1945	// status codes for successful retrieval
1946	statusCodes []int
1947	// any error encountered
1948	err error
1949}
1950
1951func (p *sshPublicKeysGroupListResultPager) Err() error {
1952	return p.err
1953}
1954
1955func (p *sshPublicKeysGroupListResultPager) NextPage(ctx context.Context) bool {
1956	var req *azcore.Request
1957	var err error
1958	if !reflect.ValueOf(p.current).IsZero() {
1959		if p.current.SSHPublicKeysGroupListResult.NextLink == nil || len(*p.current.SSHPublicKeysGroupListResult.NextLink) == 0 {
1960			return false
1961		}
1962		req, err = p.advancer(ctx, p.current)
1963	} else {
1964		req, err = p.requester(ctx)
1965	}
1966	if err != nil {
1967		p.err = err
1968		return false
1969	}
1970	resp, err := p.pipeline.Do(req)
1971	if err != nil {
1972		p.err = err
1973		return false
1974	}
1975	if !resp.HasStatusCode(p.statusCodes...) {
1976		p.err = p.errorer(resp)
1977		return false
1978	}
1979	result, err := p.responder(resp)
1980	if err != nil {
1981		p.err = err
1982		return false
1983	}
1984	p.current = result
1985	return true
1986}
1987
1988func (p *sshPublicKeysGroupListResultPager) PageResponse() SSHPublicKeysGroupListResultResponse {
1989	return p.current
1990}
1991
1992// SharedGalleryImageListPager provides iteration over SharedGalleryImageList pages.
1993type SharedGalleryImageListPager interface {
1994	azcore.Pager
1995
1996	// PageResponse returns the current SharedGalleryImageListResponse.
1997	PageResponse() SharedGalleryImageListResponse
1998}
1999
2000type sharedGalleryImageListCreateRequest func(context.Context) (*azcore.Request, error)
2001
2002type sharedGalleryImageListHandleError func(*azcore.Response) error
2003
2004type sharedGalleryImageListHandleResponse func(*azcore.Response) (SharedGalleryImageListResponse, error)
2005
2006type sharedGalleryImageListAdvancePage func(context.Context, SharedGalleryImageListResponse) (*azcore.Request, error)
2007
2008type sharedGalleryImageListPager struct {
2009	// the pipeline for making the request
2010	pipeline azcore.Pipeline
2011	// creates the initial request (non-LRO case)
2012	requester sharedGalleryImageListCreateRequest
2013	// callback for handling response errors
2014	errorer sharedGalleryImageListHandleError
2015	// callback for handling the HTTP response
2016	responder sharedGalleryImageListHandleResponse
2017	// callback for advancing to the next page
2018	advancer sharedGalleryImageListAdvancePage
2019	// contains the current response
2020	current SharedGalleryImageListResponse
2021	// status codes for successful retrieval
2022	statusCodes []int
2023	// any error encountered
2024	err error
2025}
2026
2027func (p *sharedGalleryImageListPager) Err() error {
2028	return p.err
2029}
2030
2031func (p *sharedGalleryImageListPager) NextPage(ctx context.Context) bool {
2032	var req *azcore.Request
2033	var err error
2034	if !reflect.ValueOf(p.current).IsZero() {
2035		if p.current.SharedGalleryImageList.NextLink == nil || len(*p.current.SharedGalleryImageList.NextLink) == 0 {
2036			return false
2037		}
2038		req, err = p.advancer(ctx, p.current)
2039	} else {
2040		req, err = p.requester(ctx)
2041	}
2042	if err != nil {
2043		p.err = err
2044		return false
2045	}
2046	resp, err := p.pipeline.Do(req)
2047	if err != nil {
2048		p.err = err
2049		return false
2050	}
2051	if !resp.HasStatusCode(p.statusCodes...) {
2052		p.err = p.errorer(resp)
2053		return false
2054	}
2055	result, err := p.responder(resp)
2056	if err != nil {
2057		p.err = err
2058		return false
2059	}
2060	p.current = result
2061	return true
2062}
2063
2064func (p *sharedGalleryImageListPager) PageResponse() SharedGalleryImageListResponse {
2065	return p.current
2066}
2067
2068// SharedGalleryImageVersionListPager provides iteration over SharedGalleryImageVersionList pages.
2069type SharedGalleryImageVersionListPager interface {
2070	azcore.Pager
2071
2072	// PageResponse returns the current SharedGalleryImageVersionListResponse.
2073	PageResponse() SharedGalleryImageVersionListResponse
2074}
2075
2076type sharedGalleryImageVersionListCreateRequest func(context.Context) (*azcore.Request, error)
2077
2078type sharedGalleryImageVersionListHandleError func(*azcore.Response) error
2079
2080type sharedGalleryImageVersionListHandleResponse func(*azcore.Response) (SharedGalleryImageVersionListResponse, error)
2081
2082type sharedGalleryImageVersionListAdvancePage func(context.Context, SharedGalleryImageVersionListResponse) (*azcore.Request, error)
2083
2084type sharedGalleryImageVersionListPager struct {
2085	// the pipeline for making the request
2086	pipeline azcore.Pipeline
2087	// creates the initial request (non-LRO case)
2088	requester sharedGalleryImageVersionListCreateRequest
2089	// callback for handling response errors
2090	errorer sharedGalleryImageVersionListHandleError
2091	// callback for handling the HTTP response
2092	responder sharedGalleryImageVersionListHandleResponse
2093	// callback for advancing to the next page
2094	advancer sharedGalleryImageVersionListAdvancePage
2095	// contains the current response
2096	current SharedGalleryImageVersionListResponse
2097	// status codes for successful retrieval
2098	statusCodes []int
2099	// any error encountered
2100	err error
2101}
2102
2103func (p *sharedGalleryImageVersionListPager) Err() error {
2104	return p.err
2105}
2106
2107func (p *sharedGalleryImageVersionListPager) NextPage(ctx context.Context) bool {
2108	var req *azcore.Request
2109	var err error
2110	if !reflect.ValueOf(p.current).IsZero() {
2111		if p.current.SharedGalleryImageVersionList.NextLink == nil || len(*p.current.SharedGalleryImageVersionList.NextLink) == 0 {
2112			return false
2113		}
2114		req, err = p.advancer(ctx, p.current)
2115	} else {
2116		req, err = p.requester(ctx)
2117	}
2118	if err != nil {
2119		p.err = err
2120		return false
2121	}
2122	resp, err := p.pipeline.Do(req)
2123	if err != nil {
2124		p.err = err
2125		return false
2126	}
2127	if !resp.HasStatusCode(p.statusCodes...) {
2128		p.err = p.errorer(resp)
2129		return false
2130	}
2131	result, err := p.responder(resp)
2132	if err != nil {
2133		p.err = err
2134		return false
2135	}
2136	p.current = result
2137	return true
2138}
2139
2140func (p *sharedGalleryImageVersionListPager) PageResponse() SharedGalleryImageVersionListResponse {
2141	return p.current
2142}
2143
2144// SharedGalleryListPager provides iteration over SharedGalleryList pages.
2145type SharedGalleryListPager interface {
2146	azcore.Pager
2147
2148	// PageResponse returns the current SharedGalleryListResponse.
2149	PageResponse() SharedGalleryListResponse
2150}
2151
2152type sharedGalleryListCreateRequest func(context.Context) (*azcore.Request, error)
2153
2154type sharedGalleryListHandleError func(*azcore.Response) error
2155
2156type sharedGalleryListHandleResponse func(*azcore.Response) (SharedGalleryListResponse, error)
2157
2158type sharedGalleryListAdvancePage func(context.Context, SharedGalleryListResponse) (*azcore.Request, error)
2159
2160type sharedGalleryListPager struct {
2161	// the pipeline for making the request
2162	pipeline azcore.Pipeline
2163	// creates the initial request (non-LRO case)
2164	requester sharedGalleryListCreateRequest
2165	// callback for handling response errors
2166	errorer sharedGalleryListHandleError
2167	// callback for handling the HTTP response
2168	responder sharedGalleryListHandleResponse
2169	// callback for advancing to the next page
2170	advancer sharedGalleryListAdvancePage
2171	// contains the current response
2172	current SharedGalleryListResponse
2173	// status codes for successful retrieval
2174	statusCodes []int
2175	// any error encountered
2176	err error
2177}
2178
2179func (p *sharedGalleryListPager) Err() error {
2180	return p.err
2181}
2182
2183func (p *sharedGalleryListPager) NextPage(ctx context.Context) bool {
2184	var req *azcore.Request
2185	var err error
2186	if !reflect.ValueOf(p.current).IsZero() {
2187		if p.current.SharedGalleryList.NextLink == nil || len(*p.current.SharedGalleryList.NextLink) == 0 {
2188			return false
2189		}
2190		req, err = p.advancer(ctx, p.current)
2191	} else {
2192		req, err = p.requester(ctx)
2193	}
2194	if err != nil {
2195		p.err = err
2196		return false
2197	}
2198	resp, err := p.pipeline.Do(req)
2199	if err != nil {
2200		p.err = err
2201		return false
2202	}
2203	if !resp.HasStatusCode(p.statusCodes...) {
2204		p.err = p.errorer(resp)
2205		return false
2206	}
2207	result, err := p.responder(resp)
2208	if err != nil {
2209		p.err = err
2210		return false
2211	}
2212	p.current = result
2213	return true
2214}
2215
2216func (p *sharedGalleryListPager) PageResponse() SharedGalleryListResponse {
2217	return p.current
2218}
2219
2220// SnapshotListPager provides iteration over SnapshotList pages.
2221type SnapshotListPager interface {
2222	azcore.Pager
2223
2224	// PageResponse returns the current SnapshotListResponse.
2225	PageResponse() SnapshotListResponse
2226}
2227
2228type snapshotListCreateRequest func(context.Context) (*azcore.Request, error)
2229
2230type snapshotListHandleError func(*azcore.Response) error
2231
2232type snapshotListHandleResponse func(*azcore.Response) (SnapshotListResponse, error)
2233
2234type snapshotListAdvancePage func(context.Context, SnapshotListResponse) (*azcore.Request, error)
2235
2236type snapshotListPager struct {
2237	// the pipeline for making the request
2238	pipeline azcore.Pipeline
2239	// creates the initial request (non-LRO case)
2240	requester snapshotListCreateRequest
2241	// callback for handling response errors
2242	errorer snapshotListHandleError
2243	// callback for handling the HTTP response
2244	responder snapshotListHandleResponse
2245	// callback for advancing to the next page
2246	advancer snapshotListAdvancePage
2247	// contains the current response
2248	current SnapshotListResponse
2249	// status codes for successful retrieval
2250	statusCodes []int
2251	// any error encountered
2252	err error
2253}
2254
2255func (p *snapshotListPager) Err() error {
2256	return p.err
2257}
2258
2259func (p *snapshotListPager) NextPage(ctx context.Context) bool {
2260	var req *azcore.Request
2261	var err error
2262	if !reflect.ValueOf(p.current).IsZero() {
2263		if p.current.SnapshotList.NextLink == nil || len(*p.current.SnapshotList.NextLink) == 0 {
2264			return false
2265		}
2266		req, err = p.advancer(ctx, p.current)
2267	} else {
2268		req, err = p.requester(ctx)
2269	}
2270	if err != nil {
2271		p.err = err
2272		return false
2273	}
2274	resp, err := p.pipeline.Do(req)
2275	if err != nil {
2276		p.err = err
2277		return false
2278	}
2279	if !resp.HasStatusCode(p.statusCodes...) {
2280		p.err = p.errorer(resp)
2281		return false
2282	}
2283	result, err := p.responder(resp)
2284	if err != nil {
2285		p.err = err
2286		return false
2287	}
2288	p.current = result
2289	return true
2290}
2291
2292func (p *snapshotListPager) PageResponse() SnapshotListResponse {
2293	return p.current
2294}
2295
2296// UpdateDomainListResultPager provides iteration over UpdateDomainListResult pages.
2297type UpdateDomainListResultPager interface {
2298	azcore.Pager
2299
2300	// PageResponse returns the current UpdateDomainListResultResponse.
2301	PageResponse() UpdateDomainListResultResponse
2302}
2303
2304type updateDomainListResultCreateRequest func(context.Context) (*azcore.Request, error)
2305
2306type updateDomainListResultHandleError func(*azcore.Response) error
2307
2308type updateDomainListResultHandleResponse func(*azcore.Response) (UpdateDomainListResultResponse, error)
2309
2310type updateDomainListResultAdvancePage func(context.Context, UpdateDomainListResultResponse) (*azcore.Request, error)
2311
2312type updateDomainListResultPager struct {
2313	// the pipeline for making the request
2314	pipeline azcore.Pipeline
2315	// creates the initial request (non-LRO case)
2316	requester updateDomainListResultCreateRequest
2317	// callback for handling response errors
2318	errorer updateDomainListResultHandleError
2319	// callback for handling the HTTP response
2320	responder updateDomainListResultHandleResponse
2321	// callback for advancing to the next page
2322	advancer updateDomainListResultAdvancePage
2323	// contains the current response
2324	current UpdateDomainListResultResponse
2325	// status codes for successful retrieval
2326	statusCodes []int
2327	// any error encountered
2328	err error
2329}
2330
2331func (p *updateDomainListResultPager) Err() error {
2332	return p.err
2333}
2334
2335func (p *updateDomainListResultPager) NextPage(ctx context.Context) bool {
2336	var req *azcore.Request
2337	var err error
2338	if !reflect.ValueOf(p.current).IsZero() {
2339		if p.current.UpdateDomainListResult.NextLink == nil || len(*p.current.UpdateDomainListResult.NextLink) == 0 {
2340			return false
2341		}
2342		req, err = p.advancer(ctx, p.current)
2343	} else {
2344		req, err = p.requester(ctx)
2345	}
2346	if err != nil {
2347		p.err = err
2348		return false
2349	}
2350	resp, err := p.pipeline.Do(req)
2351	if err != nil {
2352		p.err = err
2353		return false
2354	}
2355	if !resp.HasStatusCode(p.statusCodes...) {
2356		p.err = p.errorer(resp)
2357		return false
2358	}
2359	result, err := p.responder(resp)
2360	if err != nil {
2361		p.err = err
2362		return false
2363	}
2364	p.current = result
2365	return true
2366}
2367
2368func (p *updateDomainListResultPager) PageResponse() UpdateDomainListResultResponse {
2369	return p.current
2370}
2371
2372// VirtualMachineListResultPager provides iteration over VirtualMachineListResult pages.
2373type VirtualMachineListResultPager interface {
2374	azcore.Pager
2375
2376	// PageResponse returns the current VirtualMachineListResultResponse.
2377	PageResponse() VirtualMachineListResultResponse
2378}
2379
2380type virtualMachineListResultCreateRequest func(context.Context) (*azcore.Request, error)
2381
2382type virtualMachineListResultHandleError func(*azcore.Response) error
2383
2384type virtualMachineListResultHandleResponse func(*azcore.Response) (VirtualMachineListResultResponse, error)
2385
2386type virtualMachineListResultAdvancePage func(context.Context, VirtualMachineListResultResponse) (*azcore.Request, error)
2387
2388type virtualMachineListResultPager struct {
2389	// the pipeline for making the request
2390	pipeline azcore.Pipeline
2391	// creates the initial request (non-LRO case)
2392	requester virtualMachineListResultCreateRequest
2393	// callback for handling response errors
2394	errorer virtualMachineListResultHandleError
2395	// callback for handling the HTTP response
2396	responder virtualMachineListResultHandleResponse
2397	// callback for advancing to the next page
2398	advancer virtualMachineListResultAdvancePage
2399	// contains the current response
2400	current VirtualMachineListResultResponse
2401	// status codes for successful retrieval
2402	statusCodes []int
2403	// any error encountered
2404	err error
2405}
2406
2407func (p *virtualMachineListResultPager) Err() error {
2408	return p.err
2409}
2410
2411func (p *virtualMachineListResultPager) NextPage(ctx context.Context) bool {
2412	var req *azcore.Request
2413	var err error
2414	if !reflect.ValueOf(p.current).IsZero() {
2415		if p.current.VirtualMachineListResult.NextLink == nil || len(*p.current.VirtualMachineListResult.NextLink) == 0 {
2416			return false
2417		}
2418		req, err = p.advancer(ctx, p.current)
2419	} else {
2420		req, err = p.requester(ctx)
2421	}
2422	if err != nil {
2423		p.err = err
2424		return false
2425	}
2426	resp, err := p.pipeline.Do(req)
2427	if err != nil {
2428		p.err = err
2429		return false
2430	}
2431	if !resp.HasStatusCode(p.statusCodes...) {
2432		p.err = p.errorer(resp)
2433		return false
2434	}
2435	result, err := p.responder(resp)
2436	if err != nil {
2437		p.err = err
2438		return false
2439	}
2440	p.current = result
2441	return true
2442}
2443
2444func (p *virtualMachineListResultPager) PageResponse() VirtualMachineListResultResponse {
2445	return p.current
2446}
2447
2448// VirtualMachineRunCommandsListResultPager provides iteration over VirtualMachineRunCommandsListResult pages.
2449type VirtualMachineRunCommandsListResultPager interface {
2450	azcore.Pager
2451
2452	// PageResponse returns the current VirtualMachineRunCommandsListResultResponse.
2453	PageResponse() VirtualMachineRunCommandsListResultResponse
2454}
2455
2456type virtualMachineRunCommandsListResultCreateRequest func(context.Context) (*azcore.Request, error)
2457
2458type virtualMachineRunCommandsListResultHandleError func(*azcore.Response) error
2459
2460type virtualMachineRunCommandsListResultHandleResponse func(*azcore.Response) (VirtualMachineRunCommandsListResultResponse, error)
2461
2462type virtualMachineRunCommandsListResultAdvancePage func(context.Context, VirtualMachineRunCommandsListResultResponse) (*azcore.Request, error)
2463
2464type virtualMachineRunCommandsListResultPager struct {
2465	// the pipeline for making the request
2466	pipeline azcore.Pipeline
2467	// creates the initial request (non-LRO case)
2468	requester virtualMachineRunCommandsListResultCreateRequest
2469	// callback for handling response errors
2470	errorer virtualMachineRunCommandsListResultHandleError
2471	// callback for handling the HTTP response
2472	responder virtualMachineRunCommandsListResultHandleResponse
2473	// callback for advancing to the next page
2474	advancer virtualMachineRunCommandsListResultAdvancePage
2475	// contains the current response
2476	current VirtualMachineRunCommandsListResultResponse
2477	// status codes for successful retrieval
2478	statusCodes []int
2479	// any error encountered
2480	err error
2481}
2482
2483func (p *virtualMachineRunCommandsListResultPager) Err() error {
2484	return p.err
2485}
2486
2487func (p *virtualMachineRunCommandsListResultPager) NextPage(ctx context.Context) bool {
2488	var req *azcore.Request
2489	var err error
2490	if !reflect.ValueOf(p.current).IsZero() {
2491		if p.current.VirtualMachineRunCommandsListResult.NextLink == nil || len(*p.current.VirtualMachineRunCommandsListResult.NextLink) == 0 {
2492			return false
2493		}
2494		req, err = p.advancer(ctx, p.current)
2495	} else {
2496		req, err = p.requester(ctx)
2497	}
2498	if err != nil {
2499		p.err = err
2500		return false
2501	}
2502	resp, err := p.pipeline.Do(req)
2503	if err != nil {
2504		p.err = err
2505		return false
2506	}
2507	if !resp.HasStatusCode(p.statusCodes...) {
2508		p.err = p.errorer(resp)
2509		return false
2510	}
2511	result, err := p.responder(resp)
2512	if err != nil {
2513		p.err = err
2514		return false
2515	}
2516	p.current = result
2517	return true
2518}
2519
2520func (p *virtualMachineRunCommandsListResultPager) PageResponse() VirtualMachineRunCommandsListResultResponse {
2521	return p.current
2522}
2523
2524// VirtualMachineScaleSetExtensionListResultPager provides iteration over VirtualMachineScaleSetExtensionListResult pages.
2525type VirtualMachineScaleSetExtensionListResultPager interface {
2526	azcore.Pager
2527
2528	// PageResponse returns the current VirtualMachineScaleSetExtensionListResultResponse.
2529	PageResponse() VirtualMachineScaleSetExtensionListResultResponse
2530}
2531
2532type virtualMachineScaleSetExtensionListResultCreateRequest func(context.Context) (*azcore.Request, error)
2533
2534type virtualMachineScaleSetExtensionListResultHandleError func(*azcore.Response) error
2535
2536type virtualMachineScaleSetExtensionListResultHandleResponse func(*azcore.Response) (VirtualMachineScaleSetExtensionListResultResponse, error)
2537
2538type virtualMachineScaleSetExtensionListResultAdvancePage func(context.Context, VirtualMachineScaleSetExtensionListResultResponse) (*azcore.Request, error)
2539
2540type virtualMachineScaleSetExtensionListResultPager struct {
2541	// the pipeline for making the request
2542	pipeline azcore.Pipeline
2543	// creates the initial request (non-LRO case)
2544	requester virtualMachineScaleSetExtensionListResultCreateRequest
2545	// callback for handling response errors
2546	errorer virtualMachineScaleSetExtensionListResultHandleError
2547	// callback for handling the HTTP response
2548	responder virtualMachineScaleSetExtensionListResultHandleResponse
2549	// callback for advancing to the next page
2550	advancer virtualMachineScaleSetExtensionListResultAdvancePage
2551	// contains the current response
2552	current VirtualMachineScaleSetExtensionListResultResponse
2553	// status codes for successful retrieval
2554	statusCodes []int
2555	// any error encountered
2556	err error
2557}
2558
2559func (p *virtualMachineScaleSetExtensionListResultPager) Err() error {
2560	return p.err
2561}
2562
2563func (p *virtualMachineScaleSetExtensionListResultPager) NextPage(ctx context.Context) bool {
2564	var req *azcore.Request
2565	var err error
2566	if !reflect.ValueOf(p.current).IsZero() {
2567		if p.current.VirtualMachineScaleSetExtensionListResult.NextLink == nil || len(*p.current.VirtualMachineScaleSetExtensionListResult.NextLink) == 0 {
2568			return false
2569		}
2570		req, err = p.advancer(ctx, p.current)
2571	} else {
2572		req, err = p.requester(ctx)
2573	}
2574	if err != nil {
2575		p.err = err
2576		return false
2577	}
2578	resp, err := p.pipeline.Do(req)
2579	if err != nil {
2580		p.err = err
2581		return false
2582	}
2583	if !resp.HasStatusCode(p.statusCodes...) {
2584		p.err = p.errorer(resp)
2585		return false
2586	}
2587	result, err := p.responder(resp)
2588	if err != nil {
2589		p.err = err
2590		return false
2591	}
2592	p.current = result
2593	return true
2594}
2595
2596func (p *virtualMachineScaleSetExtensionListResultPager) PageResponse() VirtualMachineScaleSetExtensionListResultResponse {
2597	return p.current
2598}
2599
2600// VirtualMachineScaleSetListOSUpgradeHistoryPager provides iteration over VirtualMachineScaleSetListOSUpgradeHistory pages.
2601type VirtualMachineScaleSetListOSUpgradeHistoryPager interface {
2602	azcore.Pager
2603
2604	// PageResponse returns the current VirtualMachineScaleSetListOSUpgradeHistoryResponse.
2605	PageResponse() VirtualMachineScaleSetListOSUpgradeHistoryResponse
2606}
2607
2608type virtualMachineScaleSetListOSUpgradeHistoryCreateRequest func(context.Context) (*azcore.Request, error)
2609
2610type virtualMachineScaleSetListOSUpgradeHistoryHandleError func(*azcore.Response) error
2611
2612type virtualMachineScaleSetListOSUpgradeHistoryHandleResponse func(*azcore.Response) (VirtualMachineScaleSetListOSUpgradeHistoryResponse, error)
2613
2614type virtualMachineScaleSetListOSUpgradeHistoryAdvancePage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistoryResponse) (*azcore.Request, error)
2615
2616type virtualMachineScaleSetListOSUpgradeHistoryPager struct {
2617	// the pipeline for making the request
2618	pipeline azcore.Pipeline
2619	// creates the initial request (non-LRO case)
2620	requester virtualMachineScaleSetListOSUpgradeHistoryCreateRequest
2621	// callback for handling response errors
2622	errorer virtualMachineScaleSetListOSUpgradeHistoryHandleError
2623	// callback for handling the HTTP response
2624	responder virtualMachineScaleSetListOSUpgradeHistoryHandleResponse
2625	// callback for advancing to the next page
2626	advancer virtualMachineScaleSetListOSUpgradeHistoryAdvancePage
2627	// contains the current response
2628	current VirtualMachineScaleSetListOSUpgradeHistoryResponse
2629	// status codes for successful retrieval
2630	statusCodes []int
2631	// any error encountered
2632	err error
2633}
2634
2635func (p *virtualMachineScaleSetListOSUpgradeHistoryPager) Err() error {
2636	return p.err
2637}
2638
2639func (p *virtualMachineScaleSetListOSUpgradeHistoryPager) NextPage(ctx context.Context) bool {
2640	var req *azcore.Request
2641	var err error
2642	if !reflect.ValueOf(p.current).IsZero() {
2643		if p.current.VirtualMachineScaleSetListOSUpgradeHistory.NextLink == nil || len(*p.current.VirtualMachineScaleSetListOSUpgradeHistory.NextLink) == 0 {
2644			return false
2645		}
2646		req, err = p.advancer(ctx, p.current)
2647	} else {
2648		req, err = p.requester(ctx)
2649	}
2650	if err != nil {
2651		p.err = err
2652		return false
2653	}
2654	resp, err := p.pipeline.Do(req)
2655	if err != nil {
2656		p.err = err
2657		return false
2658	}
2659	if !resp.HasStatusCode(p.statusCodes...) {
2660		p.err = p.errorer(resp)
2661		return false
2662	}
2663	result, err := p.responder(resp)
2664	if err != nil {
2665		p.err = err
2666		return false
2667	}
2668	p.current = result
2669	return true
2670}
2671
2672func (p *virtualMachineScaleSetListOSUpgradeHistoryPager) PageResponse() VirtualMachineScaleSetListOSUpgradeHistoryResponse {
2673	return p.current
2674}
2675
2676// VirtualMachineScaleSetListResultPager provides iteration over VirtualMachineScaleSetListResult pages.
2677type VirtualMachineScaleSetListResultPager interface {
2678	azcore.Pager
2679
2680	// PageResponse returns the current VirtualMachineScaleSetListResultResponse.
2681	PageResponse() VirtualMachineScaleSetListResultResponse
2682}
2683
2684type virtualMachineScaleSetListResultCreateRequest func(context.Context) (*azcore.Request, error)
2685
2686type virtualMachineScaleSetListResultHandleError func(*azcore.Response) error
2687
2688type virtualMachineScaleSetListResultHandleResponse func(*azcore.Response) (VirtualMachineScaleSetListResultResponse, error)
2689
2690type virtualMachineScaleSetListResultAdvancePage func(context.Context, VirtualMachineScaleSetListResultResponse) (*azcore.Request, error)
2691
2692type virtualMachineScaleSetListResultPager struct {
2693	// the pipeline for making the request
2694	pipeline azcore.Pipeline
2695	// creates the initial request (non-LRO case)
2696	requester virtualMachineScaleSetListResultCreateRequest
2697	// callback for handling response errors
2698	errorer virtualMachineScaleSetListResultHandleError
2699	// callback for handling the HTTP response
2700	responder virtualMachineScaleSetListResultHandleResponse
2701	// callback for advancing to the next page
2702	advancer virtualMachineScaleSetListResultAdvancePage
2703	// contains the current response
2704	current VirtualMachineScaleSetListResultResponse
2705	// status codes for successful retrieval
2706	statusCodes []int
2707	// any error encountered
2708	err error
2709}
2710
2711func (p *virtualMachineScaleSetListResultPager) Err() error {
2712	return p.err
2713}
2714
2715func (p *virtualMachineScaleSetListResultPager) NextPage(ctx context.Context) bool {
2716	var req *azcore.Request
2717	var err error
2718	if !reflect.ValueOf(p.current).IsZero() {
2719		if p.current.VirtualMachineScaleSetListResult.NextLink == nil || len(*p.current.VirtualMachineScaleSetListResult.NextLink) == 0 {
2720			return false
2721		}
2722		req, err = p.advancer(ctx, p.current)
2723	} else {
2724		req, err = p.requester(ctx)
2725	}
2726	if err != nil {
2727		p.err = err
2728		return false
2729	}
2730	resp, err := p.pipeline.Do(req)
2731	if err != nil {
2732		p.err = err
2733		return false
2734	}
2735	if !resp.HasStatusCode(p.statusCodes...) {
2736		p.err = p.errorer(resp)
2737		return false
2738	}
2739	result, err := p.responder(resp)
2740	if err != nil {
2741		p.err = err
2742		return false
2743	}
2744	p.current = result
2745	return true
2746}
2747
2748func (p *virtualMachineScaleSetListResultPager) PageResponse() VirtualMachineScaleSetListResultResponse {
2749	return p.current
2750}
2751
2752// VirtualMachineScaleSetListSKUsResultPager provides iteration over VirtualMachineScaleSetListSKUsResult pages.
2753type VirtualMachineScaleSetListSKUsResultPager interface {
2754	azcore.Pager
2755
2756	// PageResponse returns the current VirtualMachineScaleSetListSKUsResultResponse.
2757	PageResponse() VirtualMachineScaleSetListSKUsResultResponse
2758}
2759
2760type virtualMachineScaleSetListSKUsResultCreateRequest func(context.Context) (*azcore.Request, error)
2761
2762type virtualMachineScaleSetListSKUsResultHandleError func(*azcore.Response) error
2763
2764type virtualMachineScaleSetListSKUsResultHandleResponse func(*azcore.Response) (VirtualMachineScaleSetListSKUsResultResponse, error)
2765
2766type virtualMachineScaleSetListSKUsResultAdvancePage func(context.Context, VirtualMachineScaleSetListSKUsResultResponse) (*azcore.Request, error)
2767
2768type virtualMachineScaleSetListSKUsResultPager struct {
2769	// the pipeline for making the request
2770	pipeline azcore.Pipeline
2771	// creates the initial request (non-LRO case)
2772	requester virtualMachineScaleSetListSKUsResultCreateRequest
2773	// callback for handling response errors
2774	errorer virtualMachineScaleSetListSKUsResultHandleError
2775	// callback for handling the HTTP response
2776	responder virtualMachineScaleSetListSKUsResultHandleResponse
2777	// callback for advancing to the next page
2778	advancer virtualMachineScaleSetListSKUsResultAdvancePage
2779	// contains the current response
2780	current VirtualMachineScaleSetListSKUsResultResponse
2781	// status codes for successful retrieval
2782	statusCodes []int
2783	// any error encountered
2784	err error
2785}
2786
2787func (p *virtualMachineScaleSetListSKUsResultPager) Err() error {
2788	return p.err
2789}
2790
2791func (p *virtualMachineScaleSetListSKUsResultPager) NextPage(ctx context.Context) bool {
2792	var req *azcore.Request
2793	var err error
2794	if !reflect.ValueOf(p.current).IsZero() {
2795		if p.current.VirtualMachineScaleSetListSKUsResult.NextLink == nil || len(*p.current.VirtualMachineScaleSetListSKUsResult.NextLink) == 0 {
2796			return false
2797		}
2798		req, err = p.advancer(ctx, p.current)
2799	} else {
2800		req, err = p.requester(ctx)
2801	}
2802	if err != nil {
2803		p.err = err
2804		return false
2805	}
2806	resp, err := p.pipeline.Do(req)
2807	if err != nil {
2808		p.err = err
2809		return false
2810	}
2811	if !resp.HasStatusCode(p.statusCodes...) {
2812		p.err = p.errorer(resp)
2813		return false
2814	}
2815	result, err := p.responder(resp)
2816	if err != nil {
2817		p.err = err
2818		return false
2819	}
2820	p.current = result
2821	return true
2822}
2823
2824func (p *virtualMachineScaleSetListSKUsResultPager) PageResponse() VirtualMachineScaleSetListSKUsResultResponse {
2825	return p.current
2826}
2827
2828// VirtualMachineScaleSetListWithLinkResultPager provides iteration over VirtualMachineScaleSetListWithLinkResult pages.
2829type VirtualMachineScaleSetListWithLinkResultPager interface {
2830	azcore.Pager
2831
2832	// PageResponse returns the current VirtualMachineScaleSetListWithLinkResultResponse.
2833	PageResponse() VirtualMachineScaleSetListWithLinkResultResponse
2834}
2835
2836type virtualMachineScaleSetListWithLinkResultCreateRequest func(context.Context) (*azcore.Request, error)
2837
2838type virtualMachineScaleSetListWithLinkResultHandleError func(*azcore.Response) error
2839
2840type virtualMachineScaleSetListWithLinkResultHandleResponse func(*azcore.Response) (VirtualMachineScaleSetListWithLinkResultResponse, error)
2841
2842type virtualMachineScaleSetListWithLinkResultAdvancePage func(context.Context, VirtualMachineScaleSetListWithLinkResultResponse) (*azcore.Request, error)
2843
2844type virtualMachineScaleSetListWithLinkResultPager struct {
2845	// the pipeline for making the request
2846	pipeline azcore.Pipeline
2847	// creates the initial request (non-LRO case)
2848	requester virtualMachineScaleSetListWithLinkResultCreateRequest
2849	// callback for handling response errors
2850	errorer virtualMachineScaleSetListWithLinkResultHandleError
2851	// callback for handling the HTTP response
2852	responder virtualMachineScaleSetListWithLinkResultHandleResponse
2853	// callback for advancing to the next page
2854	advancer virtualMachineScaleSetListWithLinkResultAdvancePage
2855	// contains the current response
2856	current VirtualMachineScaleSetListWithLinkResultResponse
2857	// status codes for successful retrieval
2858	statusCodes []int
2859	// any error encountered
2860	err error
2861}
2862
2863func (p *virtualMachineScaleSetListWithLinkResultPager) Err() error {
2864	return p.err
2865}
2866
2867func (p *virtualMachineScaleSetListWithLinkResultPager) NextPage(ctx context.Context) bool {
2868	var req *azcore.Request
2869	var err error
2870	if !reflect.ValueOf(p.current).IsZero() {
2871		if p.current.VirtualMachineScaleSetListWithLinkResult.NextLink == nil || len(*p.current.VirtualMachineScaleSetListWithLinkResult.NextLink) == 0 {
2872			return false
2873		}
2874		req, err = p.advancer(ctx, p.current)
2875	} else {
2876		req, err = p.requester(ctx)
2877	}
2878	if err != nil {
2879		p.err = err
2880		return false
2881	}
2882	resp, err := p.pipeline.Do(req)
2883	if err != nil {
2884		p.err = err
2885		return false
2886	}
2887	if !resp.HasStatusCode(p.statusCodes...) {
2888		p.err = p.errorer(resp)
2889		return false
2890	}
2891	result, err := p.responder(resp)
2892	if err != nil {
2893		p.err = err
2894		return false
2895	}
2896	p.current = result
2897	return true
2898}
2899
2900func (p *virtualMachineScaleSetListWithLinkResultPager) PageResponse() VirtualMachineScaleSetListWithLinkResultResponse {
2901	return p.current
2902}
2903
2904// VirtualMachineScaleSetVMListResultPager provides iteration over VirtualMachineScaleSetVMListResult pages.
2905type VirtualMachineScaleSetVMListResultPager interface {
2906	azcore.Pager
2907
2908	// PageResponse returns the current VirtualMachineScaleSetVMListResultResponse.
2909	PageResponse() VirtualMachineScaleSetVMListResultResponse
2910}
2911
2912type virtualMachineScaleSetVMListResultCreateRequest func(context.Context) (*azcore.Request, error)
2913
2914type virtualMachineScaleSetVMListResultHandleError func(*azcore.Response) error
2915
2916type virtualMachineScaleSetVMListResultHandleResponse func(*azcore.Response) (VirtualMachineScaleSetVMListResultResponse, error)
2917
2918type virtualMachineScaleSetVMListResultAdvancePage func(context.Context, VirtualMachineScaleSetVMListResultResponse) (*azcore.Request, error)
2919
2920type virtualMachineScaleSetVMListResultPager struct {
2921	// the pipeline for making the request
2922	pipeline azcore.Pipeline
2923	// creates the initial request (non-LRO case)
2924	requester virtualMachineScaleSetVMListResultCreateRequest
2925	// callback for handling response errors
2926	errorer virtualMachineScaleSetVMListResultHandleError
2927	// callback for handling the HTTP response
2928	responder virtualMachineScaleSetVMListResultHandleResponse
2929	// callback for advancing to the next page
2930	advancer virtualMachineScaleSetVMListResultAdvancePage
2931	// contains the current response
2932	current VirtualMachineScaleSetVMListResultResponse
2933	// status codes for successful retrieval
2934	statusCodes []int
2935	// any error encountered
2936	err error
2937}
2938
2939func (p *virtualMachineScaleSetVMListResultPager) Err() error {
2940	return p.err
2941}
2942
2943func (p *virtualMachineScaleSetVMListResultPager) NextPage(ctx context.Context) bool {
2944	var req *azcore.Request
2945	var err error
2946	if !reflect.ValueOf(p.current).IsZero() {
2947		if p.current.VirtualMachineScaleSetVMListResult.NextLink == nil || len(*p.current.VirtualMachineScaleSetVMListResult.NextLink) == 0 {
2948			return false
2949		}
2950		req, err = p.advancer(ctx, p.current)
2951	} else {
2952		req, err = p.requester(ctx)
2953	}
2954	if err != nil {
2955		p.err = err
2956		return false
2957	}
2958	resp, err := p.pipeline.Do(req)
2959	if err != nil {
2960		p.err = err
2961		return false
2962	}
2963	if !resp.HasStatusCode(p.statusCodes...) {
2964		p.err = p.errorer(resp)
2965		return false
2966	}
2967	result, err := p.responder(resp)
2968	if err != nil {
2969		p.err = err
2970		return false
2971	}
2972	p.current = result
2973	return true
2974}
2975
2976func (p *virtualMachineScaleSetVMListResultPager) PageResponse() VirtualMachineScaleSetVMListResultResponse {
2977	return p.current
2978}
2979