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/armcore"
13	"github.com/Azure/azure-sdk-for-go/sdk/azcore"
14	"net/http"
15	"time"
16)
17
18// AccessURIPoller provides polling facilities until the operation completes
19type AccessURIPoller interface {
20	Done() bool
21	Poll(ctx context.Context) (*http.Response, error)
22	FinalResponse(ctx context.Context) (AccessURIResponse, error)
23	ResumeToken() (string, error)
24}
25
26type accessUriPoller struct {
27	// the client for making the request
28	pipeline azcore.Pipeline
29	pt       armcore.Poller
30}
31
32// Done returns true if there was an error or polling has reached a terminal state
33func (p *accessUriPoller) Done() bool {
34	return p.pt.Done()
35}
36
37// Poll will send poll the service endpoint and return an http.Response or error received from the service
38func (p *accessUriPoller) Poll(ctx context.Context) (*http.Response, error) {
39	return p.pt.Poll(ctx, p.pipeline)
40}
41
42func (p *accessUriPoller) FinalResponse(ctx context.Context) (AccessURIResponse, error) {
43	respType := AccessURIResponse{AccessURI: &AccessURI{}}
44	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.AccessURI)
45	if err != nil {
46		return AccessURIResponse{}, err
47	}
48	respType.RawResponse = resp
49	return respType, nil
50}
51
52// ResumeToken generates the string token that can be used with the ResumeAccessURIPoller method
53// on the client to create a new poller from the data held in the current poller type
54func (p *accessUriPoller) ResumeToken() (string, error) {
55	return p.pt.ResumeToken()
56}
57
58func (p *accessUriPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (AccessURIResponse, error) {
59	respType := AccessURIResponse{AccessURI: &AccessURI{}}
60	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.AccessURI)
61	if err != nil {
62		return AccessURIResponse{}, err
63	}
64	respType.RawResponse = resp
65	return respType, nil
66}
67
68// ContainerServicePoller provides polling facilities until the operation completes
69type ContainerServicePoller interface {
70	Done() bool
71	Poll(ctx context.Context) (*http.Response, error)
72	FinalResponse(ctx context.Context) (ContainerServiceResponse, error)
73	ResumeToken() (string, error)
74}
75
76type containerServicePoller struct {
77	// the client for making the request
78	pipeline azcore.Pipeline
79	pt       armcore.Poller
80}
81
82// Done returns true if there was an error or polling has reached a terminal state
83func (p *containerServicePoller) Done() bool {
84	return p.pt.Done()
85}
86
87// Poll will send poll the service endpoint and return an http.Response or error received from the service
88func (p *containerServicePoller) Poll(ctx context.Context) (*http.Response, error) {
89	return p.pt.Poll(ctx, p.pipeline)
90}
91
92func (p *containerServicePoller) FinalResponse(ctx context.Context) (ContainerServiceResponse, error) {
93	respType := ContainerServiceResponse{ContainerService: &ContainerService{}}
94	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.ContainerService)
95	if err != nil {
96		return ContainerServiceResponse{}, err
97	}
98	respType.RawResponse = resp
99	return respType, nil
100}
101
102// ResumeToken generates the string token that can be used with the ResumeContainerServicePoller method
103// on the client to create a new poller from the data held in the current poller type
104func (p *containerServicePoller) ResumeToken() (string, error) {
105	return p.pt.ResumeToken()
106}
107
108func (p *containerServicePoller) pollUntilDone(ctx context.Context, frequency time.Duration) (ContainerServiceResponse, error) {
109	respType := ContainerServiceResponse{ContainerService: &ContainerService{}}
110	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.ContainerService)
111	if err != nil {
112		return ContainerServiceResponse{}, err
113	}
114	respType.RawResponse = resp
115	return respType, nil
116}
117
118// DedicatedHostPoller provides polling facilities until the operation completes
119type DedicatedHostPoller interface {
120	Done() bool
121	Poll(ctx context.Context) (*http.Response, error)
122	FinalResponse(ctx context.Context) (DedicatedHostResponse, error)
123	ResumeToken() (string, error)
124}
125
126type dedicatedHostPoller struct {
127	// the client for making the request
128	pipeline azcore.Pipeline
129	pt       armcore.Poller
130}
131
132// Done returns true if there was an error or polling has reached a terminal state
133func (p *dedicatedHostPoller) Done() bool {
134	return p.pt.Done()
135}
136
137// Poll will send poll the service endpoint and return an http.Response or error received from the service
138func (p *dedicatedHostPoller) Poll(ctx context.Context) (*http.Response, error) {
139	return p.pt.Poll(ctx, p.pipeline)
140}
141
142func (p *dedicatedHostPoller) FinalResponse(ctx context.Context) (DedicatedHostResponse, error) {
143	respType := DedicatedHostResponse{DedicatedHost: &DedicatedHost{}}
144	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.DedicatedHost)
145	if err != nil {
146		return DedicatedHostResponse{}, err
147	}
148	respType.RawResponse = resp
149	return respType, nil
150}
151
152// ResumeToken generates the string token that can be used with the ResumeDedicatedHostPoller method
153// on the client to create a new poller from the data held in the current poller type
154func (p *dedicatedHostPoller) ResumeToken() (string, error) {
155	return p.pt.ResumeToken()
156}
157
158func (p *dedicatedHostPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (DedicatedHostResponse, error) {
159	respType := DedicatedHostResponse{DedicatedHost: &DedicatedHost{}}
160	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.DedicatedHost)
161	if err != nil {
162		return DedicatedHostResponse{}, err
163	}
164	respType.RawResponse = resp
165	return respType, nil
166}
167
168// DiskAccessPoller provides polling facilities until the operation completes
169type DiskAccessPoller interface {
170	Done() bool
171	Poll(ctx context.Context) (*http.Response, error)
172	FinalResponse(ctx context.Context) (DiskAccessResponse, error)
173	ResumeToken() (string, error)
174}
175
176type diskAccessPoller struct {
177	// the client for making the request
178	pipeline azcore.Pipeline
179	pt       armcore.Poller
180}
181
182// Done returns true if there was an error or polling has reached a terminal state
183func (p *diskAccessPoller) Done() bool {
184	return p.pt.Done()
185}
186
187// Poll will send poll the service endpoint and return an http.Response or error received from the service
188func (p *diskAccessPoller) Poll(ctx context.Context) (*http.Response, error) {
189	return p.pt.Poll(ctx, p.pipeline)
190}
191
192func (p *diskAccessPoller) FinalResponse(ctx context.Context) (DiskAccessResponse, error) {
193	respType := DiskAccessResponse{DiskAccess: &DiskAccess{}}
194	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.DiskAccess)
195	if err != nil {
196		return DiskAccessResponse{}, err
197	}
198	respType.RawResponse = resp
199	return respType, nil
200}
201
202// ResumeToken generates the string token that can be used with the ResumeDiskAccessPoller method
203// on the client to create a new poller from the data held in the current poller type
204func (p *diskAccessPoller) ResumeToken() (string, error) {
205	return p.pt.ResumeToken()
206}
207
208func (p *diskAccessPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (DiskAccessResponse, error) {
209	respType := DiskAccessResponse{DiskAccess: &DiskAccess{}}
210	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.DiskAccess)
211	if err != nil {
212		return DiskAccessResponse{}, err
213	}
214	respType.RawResponse = resp
215	return respType, nil
216}
217
218// DiskEncryptionSetPoller provides polling facilities until the operation completes
219type DiskEncryptionSetPoller interface {
220	Done() bool
221	Poll(ctx context.Context) (*http.Response, error)
222	FinalResponse(ctx context.Context) (DiskEncryptionSetResponse, error)
223	ResumeToken() (string, error)
224}
225
226type diskEncryptionSetPoller struct {
227	// the client for making the request
228	pipeline azcore.Pipeline
229	pt       armcore.Poller
230}
231
232// Done returns true if there was an error or polling has reached a terminal state
233func (p *diskEncryptionSetPoller) Done() bool {
234	return p.pt.Done()
235}
236
237// Poll will send poll the service endpoint and return an http.Response or error received from the service
238func (p *diskEncryptionSetPoller) Poll(ctx context.Context) (*http.Response, error) {
239	return p.pt.Poll(ctx, p.pipeline)
240}
241
242func (p *diskEncryptionSetPoller) FinalResponse(ctx context.Context) (DiskEncryptionSetResponse, error) {
243	respType := DiskEncryptionSetResponse{DiskEncryptionSet: &DiskEncryptionSet{}}
244	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.DiskEncryptionSet)
245	if err != nil {
246		return DiskEncryptionSetResponse{}, err
247	}
248	respType.RawResponse = resp
249	return respType, nil
250}
251
252// ResumeToken generates the string token that can be used with the ResumeDiskEncryptionSetPoller method
253// on the client to create a new poller from the data held in the current poller type
254func (p *diskEncryptionSetPoller) ResumeToken() (string, error) {
255	return p.pt.ResumeToken()
256}
257
258func (p *diskEncryptionSetPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (DiskEncryptionSetResponse, error) {
259	respType := DiskEncryptionSetResponse{DiskEncryptionSet: &DiskEncryptionSet{}}
260	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.DiskEncryptionSet)
261	if err != nil {
262		return DiskEncryptionSetResponse{}, err
263	}
264	respType.RawResponse = resp
265	return respType, nil
266}
267
268// DiskPoller provides polling facilities until the operation completes
269type DiskPoller interface {
270	Done() bool
271	Poll(ctx context.Context) (*http.Response, error)
272	FinalResponse(ctx context.Context) (DiskResponse, error)
273	ResumeToken() (string, error)
274}
275
276type diskPoller struct {
277	// the client for making the request
278	pipeline azcore.Pipeline
279	pt       armcore.Poller
280}
281
282// Done returns true if there was an error or polling has reached a terminal state
283func (p *diskPoller) Done() bool {
284	return p.pt.Done()
285}
286
287// Poll will send poll the service endpoint and return an http.Response or error received from the service
288func (p *diskPoller) Poll(ctx context.Context) (*http.Response, error) {
289	return p.pt.Poll(ctx, p.pipeline)
290}
291
292func (p *diskPoller) FinalResponse(ctx context.Context) (DiskResponse, error) {
293	respType := DiskResponse{Disk: &Disk{}}
294	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.Disk)
295	if err != nil {
296		return DiskResponse{}, err
297	}
298	respType.RawResponse = resp
299	return respType, nil
300}
301
302// ResumeToken generates the string token that can be used with the ResumeDiskPoller method
303// on the client to create a new poller from the data held in the current poller type
304func (p *diskPoller) ResumeToken() (string, error) {
305	return p.pt.ResumeToken()
306}
307
308func (p *diskPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (DiskResponse, error) {
309	respType := DiskResponse{Disk: &Disk{}}
310	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.Disk)
311	if err != nil {
312		return DiskResponse{}, err
313	}
314	respType.RawResponse = resp
315	return respType, nil
316}
317
318// GalleryApplicationPoller provides polling facilities until the operation completes
319type GalleryApplicationPoller interface {
320	Done() bool
321	Poll(ctx context.Context) (*http.Response, error)
322	FinalResponse(ctx context.Context) (GalleryApplicationResponse, error)
323	ResumeToken() (string, error)
324}
325
326type galleryApplicationPoller struct {
327	// the client for making the request
328	pipeline azcore.Pipeline
329	pt       armcore.Poller
330}
331
332// Done returns true if there was an error or polling has reached a terminal state
333func (p *galleryApplicationPoller) Done() bool {
334	return p.pt.Done()
335}
336
337// Poll will send poll the service endpoint and return an http.Response or error received from the service
338func (p *galleryApplicationPoller) Poll(ctx context.Context) (*http.Response, error) {
339	return p.pt.Poll(ctx, p.pipeline)
340}
341
342func (p *galleryApplicationPoller) FinalResponse(ctx context.Context) (GalleryApplicationResponse, error) {
343	respType := GalleryApplicationResponse{GalleryApplication: &GalleryApplication{}}
344	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.GalleryApplication)
345	if err != nil {
346		return GalleryApplicationResponse{}, err
347	}
348	respType.RawResponse = resp
349	return respType, nil
350}
351
352// ResumeToken generates the string token that can be used with the ResumeGalleryApplicationPoller method
353// on the client to create a new poller from the data held in the current poller type
354func (p *galleryApplicationPoller) ResumeToken() (string, error) {
355	return p.pt.ResumeToken()
356}
357
358func (p *galleryApplicationPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (GalleryApplicationResponse, error) {
359	respType := GalleryApplicationResponse{GalleryApplication: &GalleryApplication{}}
360	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.GalleryApplication)
361	if err != nil {
362		return GalleryApplicationResponse{}, err
363	}
364	respType.RawResponse = resp
365	return respType, nil
366}
367
368// GalleryApplicationVersionPoller provides polling facilities until the operation completes
369type GalleryApplicationVersionPoller interface {
370	Done() bool
371	Poll(ctx context.Context) (*http.Response, error)
372	FinalResponse(ctx context.Context) (GalleryApplicationVersionResponse, error)
373	ResumeToken() (string, error)
374}
375
376type galleryApplicationVersionPoller struct {
377	// the client for making the request
378	pipeline azcore.Pipeline
379	pt       armcore.Poller
380}
381
382// Done returns true if there was an error or polling has reached a terminal state
383func (p *galleryApplicationVersionPoller) Done() bool {
384	return p.pt.Done()
385}
386
387// Poll will send poll the service endpoint and return an http.Response or error received from the service
388func (p *galleryApplicationVersionPoller) Poll(ctx context.Context) (*http.Response, error) {
389	return p.pt.Poll(ctx, p.pipeline)
390}
391
392func (p *galleryApplicationVersionPoller) FinalResponse(ctx context.Context) (GalleryApplicationVersionResponse, error) {
393	respType := GalleryApplicationVersionResponse{GalleryApplicationVersion: &GalleryApplicationVersion{}}
394	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.GalleryApplicationVersion)
395	if err != nil {
396		return GalleryApplicationVersionResponse{}, err
397	}
398	respType.RawResponse = resp
399	return respType, nil
400}
401
402// ResumeToken generates the string token that can be used with the ResumeGalleryApplicationVersionPoller method
403// on the client to create a new poller from the data held in the current poller type
404func (p *galleryApplicationVersionPoller) ResumeToken() (string, error) {
405	return p.pt.ResumeToken()
406}
407
408func (p *galleryApplicationVersionPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (GalleryApplicationVersionResponse, error) {
409	respType := GalleryApplicationVersionResponse{GalleryApplicationVersion: &GalleryApplicationVersion{}}
410	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.GalleryApplicationVersion)
411	if err != nil {
412		return GalleryApplicationVersionResponse{}, err
413	}
414	respType.RawResponse = resp
415	return respType, nil
416}
417
418// GalleryImagePoller provides polling facilities until the operation completes
419type GalleryImagePoller interface {
420	Done() bool
421	Poll(ctx context.Context) (*http.Response, error)
422	FinalResponse(ctx context.Context) (GalleryImageResponse, error)
423	ResumeToken() (string, error)
424}
425
426type galleryImagePoller struct {
427	// the client for making the request
428	pipeline azcore.Pipeline
429	pt       armcore.Poller
430}
431
432// Done returns true if there was an error or polling has reached a terminal state
433func (p *galleryImagePoller) Done() bool {
434	return p.pt.Done()
435}
436
437// Poll will send poll the service endpoint and return an http.Response or error received from the service
438func (p *galleryImagePoller) Poll(ctx context.Context) (*http.Response, error) {
439	return p.pt.Poll(ctx, p.pipeline)
440}
441
442func (p *galleryImagePoller) FinalResponse(ctx context.Context) (GalleryImageResponse, error) {
443	respType := GalleryImageResponse{GalleryImage: &GalleryImage{}}
444	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.GalleryImage)
445	if err != nil {
446		return GalleryImageResponse{}, err
447	}
448	respType.RawResponse = resp
449	return respType, nil
450}
451
452// ResumeToken generates the string token that can be used with the ResumeGalleryImagePoller method
453// on the client to create a new poller from the data held in the current poller type
454func (p *galleryImagePoller) ResumeToken() (string, error) {
455	return p.pt.ResumeToken()
456}
457
458func (p *galleryImagePoller) pollUntilDone(ctx context.Context, frequency time.Duration) (GalleryImageResponse, error) {
459	respType := GalleryImageResponse{GalleryImage: &GalleryImage{}}
460	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.GalleryImage)
461	if err != nil {
462		return GalleryImageResponse{}, err
463	}
464	respType.RawResponse = resp
465	return respType, nil
466}
467
468// GalleryImageVersionPoller provides polling facilities until the operation completes
469type GalleryImageVersionPoller interface {
470	Done() bool
471	Poll(ctx context.Context) (*http.Response, error)
472	FinalResponse(ctx context.Context) (GalleryImageVersionResponse, error)
473	ResumeToken() (string, error)
474}
475
476type galleryImageVersionPoller struct {
477	// the client for making the request
478	pipeline azcore.Pipeline
479	pt       armcore.Poller
480}
481
482// Done returns true if there was an error or polling has reached a terminal state
483func (p *galleryImageVersionPoller) Done() bool {
484	return p.pt.Done()
485}
486
487// Poll will send poll the service endpoint and return an http.Response or error received from the service
488func (p *galleryImageVersionPoller) Poll(ctx context.Context) (*http.Response, error) {
489	return p.pt.Poll(ctx, p.pipeline)
490}
491
492func (p *galleryImageVersionPoller) FinalResponse(ctx context.Context) (GalleryImageVersionResponse, error) {
493	respType := GalleryImageVersionResponse{GalleryImageVersion: &GalleryImageVersion{}}
494	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.GalleryImageVersion)
495	if err != nil {
496		return GalleryImageVersionResponse{}, err
497	}
498	respType.RawResponse = resp
499	return respType, nil
500}
501
502// ResumeToken generates the string token that can be used with the ResumeGalleryImageVersionPoller method
503// on the client to create a new poller from the data held in the current poller type
504func (p *galleryImageVersionPoller) ResumeToken() (string, error) {
505	return p.pt.ResumeToken()
506}
507
508func (p *galleryImageVersionPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (GalleryImageVersionResponse, error) {
509	respType := GalleryImageVersionResponse{GalleryImageVersion: &GalleryImageVersion{}}
510	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.GalleryImageVersion)
511	if err != nil {
512		return GalleryImageVersionResponse{}, err
513	}
514	respType.RawResponse = resp
515	return respType, nil
516}
517
518// GalleryPoller provides polling facilities until the operation completes
519type GalleryPoller interface {
520	Done() bool
521	Poll(ctx context.Context) (*http.Response, error)
522	FinalResponse(ctx context.Context) (GalleryResponse, error)
523	ResumeToken() (string, error)
524}
525
526type galleryPoller struct {
527	// the client for making the request
528	pipeline azcore.Pipeline
529	pt       armcore.Poller
530}
531
532// Done returns true if there was an error or polling has reached a terminal state
533func (p *galleryPoller) Done() bool {
534	return p.pt.Done()
535}
536
537// Poll will send poll the service endpoint and return an http.Response or error received from the service
538func (p *galleryPoller) Poll(ctx context.Context) (*http.Response, error) {
539	return p.pt.Poll(ctx, p.pipeline)
540}
541
542func (p *galleryPoller) FinalResponse(ctx context.Context) (GalleryResponse, error) {
543	respType := GalleryResponse{Gallery: &Gallery{}}
544	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.Gallery)
545	if err != nil {
546		return GalleryResponse{}, err
547	}
548	respType.RawResponse = resp
549	return respType, nil
550}
551
552// ResumeToken generates the string token that can be used with the ResumeGalleryPoller method
553// on the client to create a new poller from the data held in the current poller type
554func (p *galleryPoller) ResumeToken() (string, error) {
555	return p.pt.ResumeToken()
556}
557
558func (p *galleryPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (GalleryResponse, error) {
559	respType := GalleryResponse{Gallery: &Gallery{}}
560	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.Gallery)
561	if err != nil {
562		return GalleryResponse{}, err
563	}
564	respType.RawResponse = resp
565	return respType, nil
566}
567
568// HTTPPoller provides polling facilities until the operation completes
569type HTTPPoller interface {
570	Done() bool
571	Poll(ctx context.Context) (*http.Response, error)
572	FinalResponse(ctx context.Context) (*http.Response, error)
573	ResumeToken() (string, error)
574}
575
576type httpPoller struct {
577	// the client for making the request
578	pipeline azcore.Pipeline
579	pt       armcore.Poller
580}
581
582// Done returns true if there was an error or polling has reached a terminal state
583func (p *httpPoller) Done() bool {
584	return p.pt.Done()
585}
586
587// Poll will send poll the service endpoint and return an http.Response or error received from the service
588func (p *httpPoller) Poll(ctx context.Context) (*http.Response, error) {
589	return p.pt.Poll(ctx, p.pipeline)
590}
591
592func (p *httpPoller) FinalResponse(ctx context.Context) (*http.Response, error) {
593	return p.pt.FinalResponse(ctx, p.pipeline, nil)
594}
595
596// ResumeToken generates the string token that can be used with the ResumeHTTPPoller method
597// on the client to create a new poller from the data held in the current poller type
598func (p *httpPoller) ResumeToken() (string, error) {
599	return p.pt.ResumeToken()
600}
601
602func (p *httpPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (*http.Response, error) {
603	return p.pt.PollUntilDone(ctx, frequency, p.pipeline, nil)
604}
605
606// ImagePoller provides polling facilities until the operation completes
607type ImagePoller interface {
608	Done() bool
609	Poll(ctx context.Context) (*http.Response, error)
610	FinalResponse(ctx context.Context) (ImageResponse, error)
611	ResumeToken() (string, error)
612}
613
614type imagePoller struct {
615	// the client for making the request
616	pipeline azcore.Pipeline
617	pt       armcore.Poller
618}
619
620// Done returns true if there was an error or polling has reached a terminal state
621func (p *imagePoller) Done() bool {
622	return p.pt.Done()
623}
624
625// Poll will send poll the service endpoint and return an http.Response or error received from the service
626func (p *imagePoller) Poll(ctx context.Context) (*http.Response, error) {
627	return p.pt.Poll(ctx, p.pipeline)
628}
629
630func (p *imagePoller) FinalResponse(ctx context.Context) (ImageResponse, error) {
631	respType := ImageResponse{Image: &Image{}}
632	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.Image)
633	if err != nil {
634		return ImageResponse{}, err
635	}
636	respType.RawResponse = resp
637	return respType, nil
638}
639
640// ResumeToken generates the string token that can be used with the ResumeImagePoller method
641// on the client to create a new poller from the data held in the current poller type
642func (p *imagePoller) ResumeToken() (string, error) {
643	return p.pt.ResumeToken()
644}
645
646func (p *imagePoller) pollUntilDone(ctx context.Context, frequency time.Duration) (ImageResponse, error) {
647	respType := ImageResponse{Image: &Image{}}
648	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.Image)
649	if err != nil {
650		return ImageResponse{}, err
651	}
652	respType.RawResponse = resp
653	return respType, nil
654}
655
656// LogAnalyticsOperationResultPoller provides polling facilities until the operation completes
657type LogAnalyticsOperationResultPoller interface {
658	Done() bool
659	Poll(ctx context.Context) (*http.Response, error)
660	FinalResponse(ctx context.Context) (LogAnalyticsOperationResultResponse, error)
661	ResumeToken() (string, error)
662}
663
664type logAnalyticsOperationResultPoller struct {
665	// the client for making the request
666	pipeline azcore.Pipeline
667	pt       armcore.Poller
668}
669
670// Done returns true if there was an error or polling has reached a terminal state
671func (p *logAnalyticsOperationResultPoller) Done() bool {
672	return p.pt.Done()
673}
674
675// Poll will send poll the service endpoint and return an http.Response or error received from the service
676func (p *logAnalyticsOperationResultPoller) Poll(ctx context.Context) (*http.Response, error) {
677	return p.pt.Poll(ctx, p.pipeline)
678}
679
680func (p *logAnalyticsOperationResultPoller) FinalResponse(ctx context.Context) (LogAnalyticsOperationResultResponse, error) {
681	respType := LogAnalyticsOperationResultResponse{LogAnalyticsOperationResult: &LogAnalyticsOperationResult{}}
682	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.LogAnalyticsOperationResult)
683	if err != nil {
684		return LogAnalyticsOperationResultResponse{}, err
685	}
686	respType.RawResponse = resp
687	return respType, nil
688}
689
690// ResumeToken generates the string token that can be used with the ResumeLogAnalyticsOperationResultPoller method
691// on the client to create a new poller from the data held in the current poller type
692func (p *logAnalyticsOperationResultPoller) ResumeToken() (string, error) {
693	return p.pt.ResumeToken()
694}
695
696func (p *logAnalyticsOperationResultPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (LogAnalyticsOperationResultResponse, error) {
697	respType := LogAnalyticsOperationResultResponse{LogAnalyticsOperationResult: &LogAnalyticsOperationResult{}}
698	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.LogAnalyticsOperationResult)
699	if err != nil {
700		return LogAnalyticsOperationResultResponse{}, err
701	}
702	respType.RawResponse = resp
703	return respType, nil
704}
705
706// PrivateEndpointConnectionPoller provides polling facilities until the operation completes
707type PrivateEndpointConnectionPoller interface {
708	Done() bool
709	Poll(ctx context.Context) (*http.Response, error)
710	FinalResponse(ctx context.Context) (PrivateEndpointConnectionResponse, error)
711	ResumeToken() (string, error)
712}
713
714type privateEndpointConnectionPoller struct {
715	// the client for making the request
716	pipeline azcore.Pipeline
717	pt       armcore.Poller
718}
719
720// Done returns true if there was an error or polling has reached a terminal state
721func (p *privateEndpointConnectionPoller) Done() bool {
722	return p.pt.Done()
723}
724
725// Poll will send poll the service endpoint and return an http.Response or error received from the service
726func (p *privateEndpointConnectionPoller) Poll(ctx context.Context) (*http.Response, error) {
727	return p.pt.Poll(ctx, p.pipeline)
728}
729
730func (p *privateEndpointConnectionPoller) FinalResponse(ctx context.Context) (PrivateEndpointConnectionResponse, error) {
731	respType := PrivateEndpointConnectionResponse{PrivateEndpointConnection: &PrivateEndpointConnection{}}
732	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.PrivateEndpointConnection)
733	if err != nil {
734		return PrivateEndpointConnectionResponse{}, err
735	}
736	respType.RawResponse = resp
737	return respType, nil
738}
739
740// ResumeToken generates the string token that can be used with the ResumePrivateEndpointConnectionPoller method
741// on the client to create a new poller from the data held in the current poller type
742func (p *privateEndpointConnectionPoller) ResumeToken() (string, error) {
743	return p.pt.ResumeToken()
744}
745
746func (p *privateEndpointConnectionPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (PrivateEndpointConnectionResponse, error) {
747	respType := PrivateEndpointConnectionResponse{PrivateEndpointConnection: &PrivateEndpointConnection{}}
748	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.PrivateEndpointConnection)
749	if err != nil {
750		return PrivateEndpointConnectionResponse{}, err
751	}
752	respType.RawResponse = resp
753	return respType, nil
754}
755
756// RunCommandResultPoller provides polling facilities until the operation completes
757type RunCommandResultPoller interface {
758	Done() bool
759	Poll(ctx context.Context) (*http.Response, error)
760	FinalResponse(ctx context.Context) (RunCommandResultResponse, error)
761	ResumeToken() (string, error)
762}
763
764type runCommandResultPoller struct {
765	// the client for making the request
766	pipeline azcore.Pipeline
767	pt       armcore.Poller
768}
769
770// Done returns true if there was an error or polling has reached a terminal state
771func (p *runCommandResultPoller) Done() bool {
772	return p.pt.Done()
773}
774
775// Poll will send poll the service endpoint and return an http.Response or error received from the service
776func (p *runCommandResultPoller) Poll(ctx context.Context) (*http.Response, error) {
777	return p.pt.Poll(ctx, p.pipeline)
778}
779
780func (p *runCommandResultPoller) FinalResponse(ctx context.Context) (RunCommandResultResponse, error) {
781	respType := RunCommandResultResponse{RunCommandResult: &RunCommandResult{}}
782	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.RunCommandResult)
783	if err != nil {
784		return RunCommandResultResponse{}, err
785	}
786	respType.RawResponse = resp
787	return respType, nil
788}
789
790// ResumeToken generates the string token that can be used with the ResumeRunCommandResultPoller method
791// on the client to create a new poller from the data held in the current poller type
792func (p *runCommandResultPoller) ResumeToken() (string, error) {
793	return p.pt.ResumeToken()
794}
795
796func (p *runCommandResultPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (RunCommandResultResponse, error) {
797	respType := RunCommandResultResponse{RunCommandResult: &RunCommandResult{}}
798	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.RunCommandResult)
799	if err != nil {
800		return RunCommandResultResponse{}, err
801	}
802	respType.RawResponse = resp
803	return respType, nil
804}
805
806// SharingUpdatePoller provides polling facilities until the operation completes
807type SharingUpdatePoller interface {
808	Done() bool
809	Poll(ctx context.Context) (*http.Response, error)
810	FinalResponse(ctx context.Context) (SharingUpdateResponse, error)
811	ResumeToken() (string, error)
812}
813
814type sharingUpdatePoller struct {
815	// the client for making the request
816	pipeline azcore.Pipeline
817	pt       armcore.Poller
818}
819
820// Done returns true if there was an error or polling has reached a terminal state
821func (p *sharingUpdatePoller) Done() bool {
822	return p.pt.Done()
823}
824
825// Poll will send poll the service endpoint and return an http.Response or error received from the service
826func (p *sharingUpdatePoller) Poll(ctx context.Context) (*http.Response, error) {
827	return p.pt.Poll(ctx, p.pipeline)
828}
829
830func (p *sharingUpdatePoller) FinalResponse(ctx context.Context) (SharingUpdateResponse, error) {
831	respType := SharingUpdateResponse{SharingUpdate: &SharingUpdate{}}
832	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.SharingUpdate)
833	if err != nil {
834		return SharingUpdateResponse{}, err
835	}
836	respType.RawResponse = resp
837	return respType, nil
838}
839
840// ResumeToken generates the string token that can be used with the ResumeSharingUpdatePoller method
841// on the client to create a new poller from the data held in the current poller type
842func (p *sharingUpdatePoller) ResumeToken() (string, error) {
843	return p.pt.ResumeToken()
844}
845
846func (p *sharingUpdatePoller) pollUntilDone(ctx context.Context, frequency time.Duration) (SharingUpdateResponse, error) {
847	respType := SharingUpdateResponse{SharingUpdate: &SharingUpdate{}}
848	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.SharingUpdate)
849	if err != nil {
850		return SharingUpdateResponse{}, err
851	}
852	respType.RawResponse = resp
853	return respType, nil
854}
855
856// SnapshotPoller provides polling facilities until the operation completes
857type SnapshotPoller interface {
858	Done() bool
859	Poll(ctx context.Context) (*http.Response, error)
860	FinalResponse(ctx context.Context) (SnapshotResponse, error)
861	ResumeToken() (string, error)
862}
863
864type snapshotPoller struct {
865	// the client for making the request
866	pipeline azcore.Pipeline
867	pt       armcore.Poller
868}
869
870// Done returns true if there was an error or polling has reached a terminal state
871func (p *snapshotPoller) Done() bool {
872	return p.pt.Done()
873}
874
875// Poll will send poll the service endpoint and return an http.Response or error received from the service
876func (p *snapshotPoller) Poll(ctx context.Context) (*http.Response, error) {
877	return p.pt.Poll(ctx, p.pipeline)
878}
879
880func (p *snapshotPoller) FinalResponse(ctx context.Context) (SnapshotResponse, error) {
881	respType := SnapshotResponse{Snapshot: &Snapshot{}}
882	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.Snapshot)
883	if err != nil {
884		return SnapshotResponse{}, err
885	}
886	respType.RawResponse = resp
887	return respType, nil
888}
889
890// ResumeToken generates the string token that can be used with the ResumeSnapshotPoller method
891// on the client to create a new poller from the data held in the current poller type
892func (p *snapshotPoller) ResumeToken() (string, error) {
893	return p.pt.ResumeToken()
894}
895
896func (p *snapshotPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (SnapshotResponse, error) {
897	respType := SnapshotResponse{Snapshot: &Snapshot{}}
898	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.Snapshot)
899	if err != nil {
900		return SnapshotResponse{}, err
901	}
902	respType.RawResponse = resp
903	return respType, nil
904}
905
906// VirtualMachineAssessPatchesResultPoller provides polling facilities until the operation completes
907type VirtualMachineAssessPatchesResultPoller interface {
908	Done() bool
909	Poll(ctx context.Context) (*http.Response, error)
910	FinalResponse(ctx context.Context) (VirtualMachineAssessPatchesResultResponse, error)
911	ResumeToken() (string, error)
912}
913
914type virtualMachineAssessPatchesResultPoller struct {
915	// the client for making the request
916	pipeline azcore.Pipeline
917	pt       armcore.Poller
918}
919
920// Done returns true if there was an error or polling has reached a terminal state
921func (p *virtualMachineAssessPatchesResultPoller) Done() bool {
922	return p.pt.Done()
923}
924
925// Poll will send poll the service endpoint and return an http.Response or error received from the service
926func (p *virtualMachineAssessPatchesResultPoller) Poll(ctx context.Context) (*http.Response, error) {
927	return p.pt.Poll(ctx, p.pipeline)
928}
929
930func (p *virtualMachineAssessPatchesResultPoller) FinalResponse(ctx context.Context) (VirtualMachineAssessPatchesResultResponse, error) {
931	respType := VirtualMachineAssessPatchesResultResponse{VirtualMachineAssessPatchesResult: &VirtualMachineAssessPatchesResult{}}
932	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.VirtualMachineAssessPatchesResult)
933	if err != nil {
934		return VirtualMachineAssessPatchesResultResponse{}, err
935	}
936	respType.RawResponse = resp
937	return respType, nil
938}
939
940// ResumeToken generates the string token that can be used with the ResumeVirtualMachineAssessPatchesResultPoller method
941// on the client to create a new poller from the data held in the current poller type
942func (p *virtualMachineAssessPatchesResultPoller) ResumeToken() (string, error) {
943	return p.pt.ResumeToken()
944}
945
946func (p *virtualMachineAssessPatchesResultPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (VirtualMachineAssessPatchesResultResponse, error) {
947	respType := VirtualMachineAssessPatchesResultResponse{VirtualMachineAssessPatchesResult: &VirtualMachineAssessPatchesResult{}}
948	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.VirtualMachineAssessPatchesResult)
949	if err != nil {
950		return VirtualMachineAssessPatchesResultResponse{}, err
951	}
952	respType.RawResponse = resp
953	return respType, nil
954}
955
956// VirtualMachineCaptureResultPoller provides polling facilities until the operation completes
957type VirtualMachineCaptureResultPoller interface {
958	Done() bool
959	Poll(ctx context.Context) (*http.Response, error)
960	FinalResponse(ctx context.Context) (VirtualMachineCaptureResultResponse, error)
961	ResumeToken() (string, error)
962}
963
964type virtualMachineCaptureResultPoller struct {
965	// the client for making the request
966	pipeline azcore.Pipeline
967	pt       armcore.Poller
968}
969
970// Done returns true if there was an error or polling has reached a terminal state
971func (p *virtualMachineCaptureResultPoller) Done() bool {
972	return p.pt.Done()
973}
974
975// Poll will send poll the service endpoint and return an http.Response or error received from the service
976func (p *virtualMachineCaptureResultPoller) Poll(ctx context.Context) (*http.Response, error) {
977	return p.pt.Poll(ctx, p.pipeline)
978}
979
980func (p *virtualMachineCaptureResultPoller) FinalResponse(ctx context.Context) (VirtualMachineCaptureResultResponse, error) {
981	respType := VirtualMachineCaptureResultResponse{VirtualMachineCaptureResult: &VirtualMachineCaptureResult{}}
982	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.VirtualMachineCaptureResult)
983	if err != nil {
984		return VirtualMachineCaptureResultResponse{}, err
985	}
986	respType.RawResponse = resp
987	return respType, nil
988}
989
990// ResumeToken generates the string token that can be used with the ResumeVirtualMachineCaptureResultPoller method
991// on the client to create a new poller from the data held in the current poller type
992func (p *virtualMachineCaptureResultPoller) ResumeToken() (string, error) {
993	return p.pt.ResumeToken()
994}
995
996func (p *virtualMachineCaptureResultPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (VirtualMachineCaptureResultResponse, error) {
997	respType := VirtualMachineCaptureResultResponse{VirtualMachineCaptureResult: &VirtualMachineCaptureResult{}}
998	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.VirtualMachineCaptureResult)
999	if err != nil {
1000		return VirtualMachineCaptureResultResponse{}, err
1001	}
1002	respType.RawResponse = resp
1003	return respType, nil
1004}
1005
1006// VirtualMachineExtensionPoller provides polling facilities until the operation completes
1007type VirtualMachineExtensionPoller interface {
1008	Done() bool
1009	Poll(ctx context.Context) (*http.Response, error)
1010	FinalResponse(ctx context.Context) (VirtualMachineExtensionResponse, error)
1011	ResumeToken() (string, error)
1012}
1013
1014type virtualMachineExtensionPoller struct {
1015	// the client for making the request
1016	pipeline azcore.Pipeline
1017	pt       armcore.Poller
1018}
1019
1020// Done returns true if there was an error or polling has reached a terminal state
1021func (p *virtualMachineExtensionPoller) Done() bool {
1022	return p.pt.Done()
1023}
1024
1025// Poll will send poll the service endpoint and return an http.Response or error received from the service
1026func (p *virtualMachineExtensionPoller) Poll(ctx context.Context) (*http.Response, error) {
1027	return p.pt.Poll(ctx, p.pipeline)
1028}
1029
1030func (p *virtualMachineExtensionPoller) FinalResponse(ctx context.Context) (VirtualMachineExtensionResponse, error) {
1031	respType := VirtualMachineExtensionResponse{VirtualMachineExtension: &VirtualMachineExtension{}}
1032	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.VirtualMachineExtension)
1033	if err != nil {
1034		return VirtualMachineExtensionResponse{}, err
1035	}
1036	respType.RawResponse = resp
1037	return respType, nil
1038}
1039
1040// ResumeToken generates the string token that can be used with the ResumeVirtualMachineExtensionPoller method
1041// on the client to create a new poller from the data held in the current poller type
1042func (p *virtualMachineExtensionPoller) ResumeToken() (string, error) {
1043	return p.pt.ResumeToken()
1044}
1045
1046func (p *virtualMachineExtensionPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (VirtualMachineExtensionResponse, error) {
1047	respType := VirtualMachineExtensionResponse{VirtualMachineExtension: &VirtualMachineExtension{}}
1048	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.VirtualMachineExtension)
1049	if err != nil {
1050		return VirtualMachineExtensionResponse{}, err
1051	}
1052	respType.RawResponse = resp
1053	return respType, nil
1054}
1055
1056// VirtualMachinePoller provides polling facilities until the operation completes
1057type VirtualMachinePoller interface {
1058	Done() bool
1059	Poll(ctx context.Context) (*http.Response, error)
1060	FinalResponse(ctx context.Context) (VirtualMachineResponse, error)
1061	ResumeToken() (string, error)
1062}
1063
1064type virtualMachinePoller struct {
1065	// the client for making the request
1066	pipeline azcore.Pipeline
1067	pt       armcore.Poller
1068}
1069
1070// Done returns true if there was an error or polling has reached a terminal state
1071func (p *virtualMachinePoller) Done() bool {
1072	return p.pt.Done()
1073}
1074
1075// Poll will send poll the service endpoint and return an http.Response or error received from the service
1076func (p *virtualMachinePoller) Poll(ctx context.Context) (*http.Response, error) {
1077	return p.pt.Poll(ctx, p.pipeline)
1078}
1079
1080func (p *virtualMachinePoller) FinalResponse(ctx context.Context) (VirtualMachineResponse, error) {
1081	respType := VirtualMachineResponse{VirtualMachine: &VirtualMachine{}}
1082	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.VirtualMachine)
1083	if err != nil {
1084		return VirtualMachineResponse{}, err
1085	}
1086	respType.RawResponse = resp
1087	return respType, nil
1088}
1089
1090// ResumeToken generates the string token that can be used with the ResumeVirtualMachinePoller method
1091// on the client to create a new poller from the data held in the current poller type
1092func (p *virtualMachinePoller) ResumeToken() (string, error) {
1093	return p.pt.ResumeToken()
1094}
1095
1096func (p *virtualMachinePoller) pollUntilDone(ctx context.Context, frequency time.Duration) (VirtualMachineResponse, error) {
1097	respType := VirtualMachineResponse{VirtualMachine: &VirtualMachine{}}
1098	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.VirtualMachine)
1099	if err != nil {
1100		return VirtualMachineResponse{}, err
1101	}
1102	respType.RawResponse = resp
1103	return respType, nil
1104}
1105
1106// VirtualMachineRunCommandPoller provides polling facilities until the operation completes
1107type VirtualMachineRunCommandPoller interface {
1108	Done() bool
1109	Poll(ctx context.Context) (*http.Response, error)
1110	FinalResponse(ctx context.Context) (VirtualMachineRunCommandResponse, error)
1111	ResumeToken() (string, error)
1112}
1113
1114type virtualMachineRunCommandPoller struct {
1115	// the client for making the request
1116	pipeline azcore.Pipeline
1117	pt       armcore.Poller
1118}
1119
1120// Done returns true if there was an error or polling has reached a terminal state
1121func (p *virtualMachineRunCommandPoller) Done() bool {
1122	return p.pt.Done()
1123}
1124
1125// Poll will send poll the service endpoint and return an http.Response or error received from the service
1126func (p *virtualMachineRunCommandPoller) Poll(ctx context.Context) (*http.Response, error) {
1127	return p.pt.Poll(ctx, p.pipeline)
1128}
1129
1130func (p *virtualMachineRunCommandPoller) FinalResponse(ctx context.Context) (VirtualMachineRunCommandResponse, error) {
1131	respType := VirtualMachineRunCommandResponse{VirtualMachineRunCommand: &VirtualMachineRunCommand{}}
1132	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.VirtualMachineRunCommand)
1133	if err != nil {
1134		return VirtualMachineRunCommandResponse{}, err
1135	}
1136	respType.RawResponse = resp
1137	return respType, nil
1138}
1139
1140// ResumeToken generates the string token that can be used with the ResumeVirtualMachineRunCommandPoller method
1141// on the client to create a new poller from the data held in the current poller type
1142func (p *virtualMachineRunCommandPoller) ResumeToken() (string, error) {
1143	return p.pt.ResumeToken()
1144}
1145
1146func (p *virtualMachineRunCommandPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (VirtualMachineRunCommandResponse, error) {
1147	respType := VirtualMachineRunCommandResponse{VirtualMachineRunCommand: &VirtualMachineRunCommand{}}
1148	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.VirtualMachineRunCommand)
1149	if err != nil {
1150		return VirtualMachineRunCommandResponse{}, err
1151	}
1152	respType.RawResponse = resp
1153	return respType, nil
1154}
1155
1156// VirtualMachineScaleSetExtensionPoller provides polling facilities until the operation completes
1157type VirtualMachineScaleSetExtensionPoller interface {
1158	Done() bool
1159	Poll(ctx context.Context) (*http.Response, error)
1160	FinalResponse(ctx context.Context) (VirtualMachineScaleSetExtensionResponse, error)
1161	ResumeToken() (string, error)
1162}
1163
1164type virtualMachineScaleSetExtensionPoller struct {
1165	// the client for making the request
1166	pipeline azcore.Pipeline
1167	pt       armcore.Poller
1168}
1169
1170// Done returns true if there was an error or polling has reached a terminal state
1171func (p *virtualMachineScaleSetExtensionPoller) Done() bool {
1172	return p.pt.Done()
1173}
1174
1175// Poll will send poll the service endpoint and return an http.Response or error received from the service
1176func (p *virtualMachineScaleSetExtensionPoller) Poll(ctx context.Context) (*http.Response, error) {
1177	return p.pt.Poll(ctx, p.pipeline)
1178}
1179
1180func (p *virtualMachineScaleSetExtensionPoller) FinalResponse(ctx context.Context) (VirtualMachineScaleSetExtensionResponse, error) {
1181	respType := VirtualMachineScaleSetExtensionResponse{VirtualMachineScaleSetExtension: &VirtualMachineScaleSetExtension{}}
1182	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.VirtualMachineScaleSetExtension)
1183	if err != nil {
1184		return VirtualMachineScaleSetExtensionResponse{}, err
1185	}
1186	respType.RawResponse = resp
1187	return respType, nil
1188}
1189
1190// ResumeToken generates the string token that can be used with the ResumeVirtualMachineScaleSetExtensionPoller method
1191// on the client to create a new poller from the data held in the current poller type
1192func (p *virtualMachineScaleSetExtensionPoller) ResumeToken() (string, error) {
1193	return p.pt.ResumeToken()
1194}
1195
1196func (p *virtualMachineScaleSetExtensionPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (VirtualMachineScaleSetExtensionResponse, error) {
1197	respType := VirtualMachineScaleSetExtensionResponse{VirtualMachineScaleSetExtension: &VirtualMachineScaleSetExtension{}}
1198	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.VirtualMachineScaleSetExtension)
1199	if err != nil {
1200		return VirtualMachineScaleSetExtensionResponse{}, err
1201	}
1202	respType.RawResponse = resp
1203	return respType, nil
1204}
1205
1206// VirtualMachineScaleSetPoller provides polling facilities until the operation completes
1207type VirtualMachineScaleSetPoller interface {
1208	Done() bool
1209	Poll(ctx context.Context) (*http.Response, error)
1210	FinalResponse(ctx context.Context) (VirtualMachineScaleSetResponse, error)
1211	ResumeToken() (string, error)
1212}
1213
1214type virtualMachineScaleSetPoller struct {
1215	// the client for making the request
1216	pipeline azcore.Pipeline
1217	pt       armcore.Poller
1218}
1219
1220// Done returns true if there was an error or polling has reached a terminal state
1221func (p *virtualMachineScaleSetPoller) Done() bool {
1222	return p.pt.Done()
1223}
1224
1225// Poll will send poll the service endpoint and return an http.Response or error received from the service
1226func (p *virtualMachineScaleSetPoller) Poll(ctx context.Context) (*http.Response, error) {
1227	return p.pt.Poll(ctx, p.pipeline)
1228}
1229
1230func (p *virtualMachineScaleSetPoller) FinalResponse(ctx context.Context) (VirtualMachineScaleSetResponse, error) {
1231	respType := VirtualMachineScaleSetResponse{VirtualMachineScaleSet: &VirtualMachineScaleSet{}}
1232	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.VirtualMachineScaleSet)
1233	if err != nil {
1234		return VirtualMachineScaleSetResponse{}, err
1235	}
1236	respType.RawResponse = resp
1237	return respType, nil
1238}
1239
1240// ResumeToken generates the string token that can be used with the ResumeVirtualMachineScaleSetPoller method
1241// on the client to create a new poller from the data held in the current poller type
1242func (p *virtualMachineScaleSetPoller) ResumeToken() (string, error) {
1243	return p.pt.ResumeToken()
1244}
1245
1246func (p *virtualMachineScaleSetPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (VirtualMachineScaleSetResponse, error) {
1247	respType := VirtualMachineScaleSetResponse{VirtualMachineScaleSet: &VirtualMachineScaleSet{}}
1248	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.VirtualMachineScaleSet)
1249	if err != nil {
1250		return VirtualMachineScaleSetResponse{}, err
1251	}
1252	respType.RawResponse = resp
1253	return respType, nil
1254}
1255
1256// VirtualMachineScaleSetVMExtensionPoller provides polling facilities until the operation completes
1257type VirtualMachineScaleSetVMExtensionPoller interface {
1258	Done() bool
1259	Poll(ctx context.Context) (*http.Response, error)
1260	FinalResponse(ctx context.Context) (VirtualMachineScaleSetVMExtensionResponse, error)
1261	ResumeToken() (string, error)
1262}
1263
1264type virtualMachineScaleSetVMExtensionPoller struct {
1265	// the client for making the request
1266	pipeline azcore.Pipeline
1267	pt       armcore.Poller
1268}
1269
1270// Done returns true if there was an error or polling has reached a terminal state
1271func (p *virtualMachineScaleSetVMExtensionPoller) Done() bool {
1272	return p.pt.Done()
1273}
1274
1275// Poll will send poll the service endpoint and return an http.Response or error received from the service
1276func (p *virtualMachineScaleSetVMExtensionPoller) Poll(ctx context.Context) (*http.Response, error) {
1277	return p.pt.Poll(ctx, p.pipeline)
1278}
1279
1280func (p *virtualMachineScaleSetVMExtensionPoller) FinalResponse(ctx context.Context) (VirtualMachineScaleSetVMExtensionResponse, error) {
1281	respType := VirtualMachineScaleSetVMExtensionResponse{VirtualMachineScaleSetVMExtension: &VirtualMachineScaleSetVMExtension{}}
1282	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.VirtualMachineScaleSetVMExtension)
1283	if err != nil {
1284		return VirtualMachineScaleSetVMExtensionResponse{}, err
1285	}
1286	respType.RawResponse = resp
1287	return respType, nil
1288}
1289
1290// ResumeToken generates the string token that can be used with the ResumeVirtualMachineScaleSetVMExtensionPoller method
1291// on the client to create a new poller from the data held in the current poller type
1292func (p *virtualMachineScaleSetVMExtensionPoller) ResumeToken() (string, error) {
1293	return p.pt.ResumeToken()
1294}
1295
1296func (p *virtualMachineScaleSetVMExtensionPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (VirtualMachineScaleSetVMExtensionResponse, error) {
1297	respType := VirtualMachineScaleSetVMExtensionResponse{VirtualMachineScaleSetVMExtension: &VirtualMachineScaleSetVMExtension{}}
1298	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.VirtualMachineScaleSetVMExtension)
1299	if err != nil {
1300		return VirtualMachineScaleSetVMExtensionResponse{}, err
1301	}
1302	respType.RawResponse = resp
1303	return respType, nil
1304}
1305
1306// VirtualMachineScaleSetVMPoller provides polling facilities until the operation completes
1307type VirtualMachineScaleSetVMPoller interface {
1308	Done() bool
1309	Poll(ctx context.Context) (*http.Response, error)
1310	FinalResponse(ctx context.Context) (VirtualMachineScaleSetVMResponse, error)
1311	ResumeToken() (string, error)
1312}
1313
1314type virtualMachineScaleSetVMPoller struct {
1315	// the client for making the request
1316	pipeline azcore.Pipeline
1317	pt       armcore.Poller
1318}
1319
1320// Done returns true if there was an error or polling has reached a terminal state
1321func (p *virtualMachineScaleSetVMPoller) Done() bool {
1322	return p.pt.Done()
1323}
1324
1325// Poll will send poll the service endpoint and return an http.Response or error received from the service
1326func (p *virtualMachineScaleSetVMPoller) Poll(ctx context.Context) (*http.Response, error) {
1327	return p.pt.Poll(ctx, p.pipeline)
1328}
1329
1330func (p *virtualMachineScaleSetVMPoller) FinalResponse(ctx context.Context) (VirtualMachineScaleSetVMResponse, error) {
1331	respType := VirtualMachineScaleSetVMResponse{VirtualMachineScaleSetVM: &VirtualMachineScaleSetVM{}}
1332	resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.VirtualMachineScaleSetVM)
1333	if err != nil {
1334		return VirtualMachineScaleSetVMResponse{}, err
1335	}
1336	respType.RawResponse = resp
1337	return respType, nil
1338}
1339
1340// ResumeToken generates the string token that can be used with the ResumeVirtualMachineScaleSetVMPoller method
1341// on the client to create a new poller from the data held in the current poller type
1342func (p *virtualMachineScaleSetVMPoller) ResumeToken() (string, error) {
1343	return p.pt.ResumeToken()
1344}
1345
1346func (p *virtualMachineScaleSetVMPoller) pollUntilDone(ctx context.Context, frequency time.Duration) (VirtualMachineScaleSetVMResponse, error) {
1347	respType := VirtualMachineScaleSetVMResponse{VirtualMachineScaleSetVM: &VirtualMachineScaleSetVM{}}
1348	resp, err := p.pt.PollUntilDone(ctx, frequency, p.pipeline, respType.VirtualMachineScaleSetVM)
1349	if err != nil {
1350		return VirtualMachineScaleSetVMResponse{}, err
1351	}
1352	respType.RawResponse = resp
1353	return respType, nil
1354}
1355