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 armnetwork 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// ApplicationGatewayBackendHealthOnDemandPoller provides polling facilities until the operation reaches a terminal state. 19type ApplicationGatewayBackendHealthOnDemandPoller interface { 20 azcore.Poller 21 // FinalResponse performs a final GET to the service and returns the final response 22 // for the polling operation. If there is an error performing the final GET then an error is returned. 23 // If the final GET succeeded then the final ApplicationGatewayBackendHealthOnDemandResponse will be returned. 24 FinalResponse(ctx context.Context) (ApplicationGatewayBackendHealthOnDemandResponse, error) 25} 26 27type applicationGatewayBackendHealthOnDemandPoller struct { 28 pt *armcore.LROPoller 29} 30 31func (p *applicationGatewayBackendHealthOnDemandPoller) Done() bool { 32 return p.pt.Done() 33} 34 35func (p *applicationGatewayBackendHealthOnDemandPoller) Poll(ctx context.Context) (*http.Response, error) { 36 return p.pt.Poll(ctx) 37} 38 39func (p *applicationGatewayBackendHealthOnDemandPoller) FinalResponse(ctx context.Context) (ApplicationGatewayBackendHealthOnDemandResponse, error) { 40 respType := ApplicationGatewayBackendHealthOnDemandResponse{ApplicationGatewayBackendHealthOnDemand: &ApplicationGatewayBackendHealthOnDemand{}} 41 resp, err := p.pt.FinalResponse(ctx, respType.ApplicationGatewayBackendHealthOnDemand) 42 if err != nil { 43 return ApplicationGatewayBackendHealthOnDemandResponse{}, err 44 } 45 respType.RawResponse = resp 46 return respType, nil 47} 48 49func (p *applicationGatewayBackendHealthOnDemandPoller) ResumeToken() (string, error) { 50 return p.pt.ResumeToken() 51} 52 53func (p *applicationGatewayBackendHealthOnDemandPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ApplicationGatewayBackendHealthOnDemandResponse, error) { 54 respType := ApplicationGatewayBackendHealthOnDemandResponse{ApplicationGatewayBackendHealthOnDemand: &ApplicationGatewayBackendHealthOnDemand{}} 55 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ApplicationGatewayBackendHealthOnDemand) 56 if err != nil { 57 return ApplicationGatewayBackendHealthOnDemandResponse{}, err 58 } 59 respType.RawResponse = resp 60 return respType, nil 61} 62 63// ApplicationGatewayBackendHealthPoller provides polling facilities until the operation reaches a terminal state. 64type ApplicationGatewayBackendHealthPoller interface { 65 azcore.Poller 66 // FinalResponse performs a final GET to the service and returns the final response 67 // for the polling operation. If there is an error performing the final GET then an error is returned. 68 // If the final GET succeeded then the final ApplicationGatewayBackendHealthResponse will be returned. 69 FinalResponse(ctx context.Context) (ApplicationGatewayBackendHealthResponse, error) 70} 71 72type applicationGatewayBackendHealthPoller struct { 73 pt *armcore.LROPoller 74} 75 76func (p *applicationGatewayBackendHealthPoller) Done() bool { 77 return p.pt.Done() 78} 79 80func (p *applicationGatewayBackendHealthPoller) Poll(ctx context.Context) (*http.Response, error) { 81 return p.pt.Poll(ctx) 82} 83 84func (p *applicationGatewayBackendHealthPoller) FinalResponse(ctx context.Context) (ApplicationGatewayBackendHealthResponse, error) { 85 respType := ApplicationGatewayBackendHealthResponse{ApplicationGatewayBackendHealth: &ApplicationGatewayBackendHealth{}} 86 resp, err := p.pt.FinalResponse(ctx, respType.ApplicationGatewayBackendHealth) 87 if err != nil { 88 return ApplicationGatewayBackendHealthResponse{}, err 89 } 90 respType.RawResponse = resp 91 return respType, nil 92} 93 94func (p *applicationGatewayBackendHealthPoller) ResumeToken() (string, error) { 95 return p.pt.ResumeToken() 96} 97 98func (p *applicationGatewayBackendHealthPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ApplicationGatewayBackendHealthResponse, error) { 99 respType := ApplicationGatewayBackendHealthResponse{ApplicationGatewayBackendHealth: &ApplicationGatewayBackendHealth{}} 100 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ApplicationGatewayBackendHealth) 101 if err != nil { 102 return ApplicationGatewayBackendHealthResponse{}, err 103 } 104 respType.RawResponse = resp 105 return respType, nil 106} 107 108// ApplicationGatewayPoller provides polling facilities until the operation reaches a terminal state. 109type ApplicationGatewayPoller interface { 110 azcore.Poller 111 // FinalResponse performs a final GET to the service and returns the final response 112 // for the polling operation. If there is an error performing the final GET then an error is returned. 113 // If the final GET succeeded then the final ApplicationGatewayResponse will be returned. 114 FinalResponse(ctx context.Context) (ApplicationGatewayResponse, error) 115} 116 117type applicationGatewayPoller struct { 118 pt *armcore.LROPoller 119} 120 121func (p *applicationGatewayPoller) Done() bool { 122 return p.pt.Done() 123} 124 125func (p *applicationGatewayPoller) Poll(ctx context.Context) (*http.Response, error) { 126 return p.pt.Poll(ctx) 127} 128 129func (p *applicationGatewayPoller) FinalResponse(ctx context.Context) (ApplicationGatewayResponse, error) { 130 respType := ApplicationGatewayResponse{ApplicationGateway: &ApplicationGateway{}} 131 resp, err := p.pt.FinalResponse(ctx, respType.ApplicationGateway) 132 if err != nil { 133 return ApplicationGatewayResponse{}, err 134 } 135 respType.RawResponse = resp 136 return respType, nil 137} 138 139func (p *applicationGatewayPoller) ResumeToken() (string, error) { 140 return p.pt.ResumeToken() 141} 142 143func (p *applicationGatewayPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ApplicationGatewayResponse, error) { 144 respType := ApplicationGatewayResponse{ApplicationGateway: &ApplicationGateway{}} 145 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ApplicationGateway) 146 if err != nil { 147 return ApplicationGatewayResponse{}, err 148 } 149 respType.RawResponse = resp 150 return respType, nil 151} 152 153// ApplicationGatewayPrivateEndpointConnectionPoller provides polling facilities until the operation reaches a terminal state. 154type ApplicationGatewayPrivateEndpointConnectionPoller interface { 155 azcore.Poller 156 // FinalResponse performs a final GET to the service and returns the final response 157 // for the polling operation. If there is an error performing the final GET then an error is returned. 158 // If the final GET succeeded then the final ApplicationGatewayPrivateEndpointConnectionResponse will be returned. 159 FinalResponse(ctx context.Context) (ApplicationGatewayPrivateEndpointConnectionResponse, error) 160} 161 162type applicationGatewayPrivateEndpointConnectionPoller struct { 163 pt *armcore.LROPoller 164} 165 166func (p *applicationGatewayPrivateEndpointConnectionPoller) Done() bool { 167 return p.pt.Done() 168} 169 170func (p *applicationGatewayPrivateEndpointConnectionPoller) Poll(ctx context.Context) (*http.Response, error) { 171 return p.pt.Poll(ctx) 172} 173 174func (p *applicationGatewayPrivateEndpointConnectionPoller) FinalResponse(ctx context.Context) (ApplicationGatewayPrivateEndpointConnectionResponse, error) { 175 respType := ApplicationGatewayPrivateEndpointConnectionResponse{ApplicationGatewayPrivateEndpointConnection: &ApplicationGatewayPrivateEndpointConnection{}} 176 resp, err := p.pt.FinalResponse(ctx, respType.ApplicationGatewayPrivateEndpointConnection) 177 if err != nil { 178 return ApplicationGatewayPrivateEndpointConnectionResponse{}, err 179 } 180 respType.RawResponse = resp 181 return respType, nil 182} 183 184func (p *applicationGatewayPrivateEndpointConnectionPoller) ResumeToken() (string, error) { 185 return p.pt.ResumeToken() 186} 187 188func (p *applicationGatewayPrivateEndpointConnectionPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ApplicationGatewayPrivateEndpointConnectionResponse, error) { 189 respType := ApplicationGatewayPrivateEndpointConnectionResponse{ApplicationGatewayPrivateEndpointConnection: &ApplicationGatewayPrivateEndpointConnection{}} 190 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ApplicationGatewayPrivateEndpointConnection) 191 if err != nil { 192 return ApplicationGatewayPrivateEndpointConnectionResponse{}, err 193 } 194 respType.RawResponse = resp 195 return respType, nil 196} 197 198// ApplicationSecurityGroupPoller provides polling facilities until the operation reaches a terminal state. 199type ApplicationSecurityGroupPoller interface { 200 azcore.Poller 201 // FinalResponse performs a final GET to the service and returns the final response 202 // for the polling operation. If there is an error performing the final GET then an error is returned. 203 // If the final GET succeeded then the final ApplicationSecurityGroupResponse will be returned. 204 FinalResponse(ctx context.Context) (ApplicationSecurityGroupResponse, error) 205} 206 207type applicationSecurityGroupPoller struct { 208 pt *armcore.LROPoller 209} 210 211func (p *applicationSecurityGroupPoller) Done() bool { 212 return p.pt.Done() 213} 214 215func (p *applicationSecurityGroupPoller) Poll(ctx context.Context) (*http.Response, error) { 216 return p.pt.Poll(ctx) 217} 218 219func (p *applicationSecurityGroupPoller) FinalResponse(ctx context.Context) (ApplicationSecurityGroupResponse, error) { 220 respType := ApplicationSecurityGroupResponse{ApplicationSecurityGroup: &ApplicationSecurityGroup{}} 221 resp, err := p.pt.FinalResponse(ctx, respType.ApplicationSecurityGroup) 222 if err != nil { 223 return ApplicationSecurityGroupResponse{}, err 224 } 225 respType.RawResponse = resp 226 return respType, nil 227} 228 229func (p *applicationSecurityGroupPoller) ResumeToken() (string, error) { 230 return p.pt.ResumeToken() 231} 232 233func (p *applicationSecurityGroupPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ApplicationSecurityGroupResponse, error) { 234 respType := ApplicationSecurityGroupResponse{ApplicationSecurityGroup: &ApplicationSecurityGroup{}} 235 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ApplicationSecurityGroup) 236 if err != nil { 237 return ApplicationSecurityGroupResponse{}, err 238 } 239 respType.RawResponse = resp 240 return respType, nil 241} 242 243// AvailableProvidersListPoller provides polling facilities until the operation reaches a terminal state. 244type AvailableProvidersListPoller interface { 245 azcore.Poller 246 // FinalResponse performs a final GET to the service and returns the final response 247 // for the polling operation. If there is an error performing the final GET then an error is returned. 248 // If the final GET succeeded then the final AvailableProvidersListResponse will be returned. 249 FinalResponse(ctx context.Context) (AvailableProvidersListResponse, error) 250} 251 252type availableProvidersListPoller struct { 253 pt *armcore.LROPoller 254} 255 256func (p *availableProvidersListPoller) Done() bool { 257 return p.pt.Done() 258} 259 260func (p *availableProvidersListPoller) Poll(ctx context.Context) (*http.Response, error) { 261 return p.pt.Poll(ctx) 262} 263 264func (p *availableProvidersListPoller) FinalResponse(ctx context.Context) (AvailableProvidersListResponse, error) { 265 respType := AvailableProvidersListResponse{AvailableProvidersList: &AvailableProvidersList{}} 266 resp, err := p.pt.FinalResponse(ctx, respType.AvailableProvidersList) 267 if err != nil { 268 return AvailableProvidersListResponse{}, err 269 } 270 respType.RawResponse = resp 271 return respType, nil 272} 273 274func (p *availableProvidersListPoller) ResumeToken() (string, error) { 275 return p.pt.ResumeToken() 276} 277 278func (p *availableProvidersListPoller) pollUntilDone(ctx context.Context, freq time.Duration) (AvailableProvidersListResponse, error) { 279 respType := AvailableProvidersListResponse{AvailableProvidersList: &AvailableProvidersList{}} 280 resp, err := p.pt.PollUntilDone(ctx, freq, respType.AvailableProvidersList) 281 if err != nil { 282 return AvailableProvidersListResponse{}, err 283 } 284 respType.RawResponse = resp 285 return respType, nil 286} 287 288// AzureFirewallPoller provides polling facilities until the operation reaches a terminal state. 289type AzureFirewallPoller interface { 290 azcore.Poller 291 // FinalResponse performs a final GET to the service and returns the final response 292 // for the polling operation. If there is an error performing the final GET then an error is returned. 293 // If the final GET succeeded then the final AzureFirewallResponse will be returned. 294 FinalResponse(ctx context.Context) (AzureFirewallResponse, error) 295} 296 297type azureFirewallPoller struct { 298 pt *armcore.LROPoller 299} 300 301func (p *azureFirewallPoller) Done() bool { 302 return p.pt.Done() 303} 304 305func (p *azureFirewallPoller) Poll(ctx context.Context) (*http.Response, error) { 306 return p.pt.Poll(ctx) 307} 308 309func (p *azureFirewallPoller) FinalResponse(ctx context.Context) (AzureFirewallResponse, error) { 310 respType := AzureFirewallResponse{AzureFirewall: &AzureFirewall{}} 311 resp, err := p.pt.FinalResponse(ctx, respType.AzureFirewall) 312 if err != nil { 313 return AzureFirewallResponse{}, err 314 } 315 respType.RawResponse = resp 316 return respType, nil 317} 318 319func (p *azureFirewallPoller) ResumeToken() (string, error) { 320 return p.pt.ResumeToken() 321} 322 323func (p *azureFirewallPoller) pollUntilDone(ctx context.Context, freq time.Duration) (AzureFirewallResponse, error) { 324 respType := AzureFirewallResponse{AzureFirewall: &AzureFirewall{}} 325 resp, err := p.pt.PollUntilDone(ctx, freq, respType.AzureFirewall) 326 if err != nil { 327 return AzureFirewallResponse{}, err 328 } 329 respType.RawResponse = resp 330 return respType, nil 331} 332 333// AzureReachabilityReportPoller provides polling facilities until the operation reaches a terminal state. 334type AzureReachabilityReportPoller interface { 335 azcore.Poller 336 // FinalResponse performs a final GET to the service and returns the final response 337 // for the polling operation. If there is an error performing the final GET then an error is returned. 338 // If the final GET succeeded then the final AzureReachabilityReportResponse will be returned. 339 FinalResponse(ctx context.Context) (AzureReachabilityReportResponse, error) 340} 341 342type azureReachabilityReportPoller struct { 343 pt *armcore.LROPoller 344} 345 346func (p *azureReachabilityReportPoller) Done() bool { 347 return p.pt.Done() 348} 349 350func (p *azureReachabilityReportPoller) Poll(ctx context.Context) (*http.Response, error) { 351 return p.pt.Poll(ctx) 352} 353 354func (p *azureReachabilityReportPoller) FinalResponse(ctx context.Context) (AzureReachabilityReportResponse, error) { 355 respType := AzureReachabilityReportResponse{AzureReachabilityReport: &AzureReachabilityReport{}} 356 resp, err := p.pt.FinalResponse(ctx, respType.AzureReachabilityReport) 357 if err != nil { 358 return AzureReachabilityReportResponse{}, err 359 } 360 respType.RawResponse = resp 361 return respType, nil 362} 363 364func (p *azureReachabilityReportPoller) ResumeToken() (string, error) { 365 return p.pt.ResumeToken() 366} 367 368func (p *azureReachabilityReportPoller) pollUntilDone(ctx context.Context, freq time.Duration) (AzureReachabilityReportResponse, error) { 369 respType := AzureReachabilityReportResponse{AzureReachabilityReport: &AzureReachabilityReport{}} 370 resp, err := p.pt.PollUntilDone(ctx, freq, respType.AzureReachabilityReport) 371 if err != nil { 372 return AzureReachabilityReportResponse{}, err 373 } 374 respType.RawResponse = resp 375 return respType, nil 376} 377 378// BackendAddressPoolPoller provides polling facilities until the operation reaches a terminal state. 379type BackendAddressPoolPoller interface { 380 azcore.Poller 381 // FinalResponse performs a final GET to the service and returns the final response 382 // for the polling operation. If there is an error performing the final GET then an error is returned. 383 // If the final GET succeeded then the final BackendAddressPoolResponse will be returned. 384 FinalResponse(ctx context.Context) (BackendAddressPoolResponse, error) 385} 386 387type backendAddressPoolPoller struct { 388 pt *armcore.LROPoller 389} 390 391func (p *backendAddressPoolPoller) Done() bool { 392 return p.pt.Done() 393} 394 395func (p *backendAddressPoolPoller) Poll(ctx context.Context) (*http.Response, error) { 396 return p.pt.Poll(ctx) 397} 398 399func (p *backendAddressPoolPoller) FinalResponse(ctx context.Context) (BackendAddressPoolResponse, error) { 400 respType := BackendAddressPoolResponse{BackendAddressPool: &BackendAddressPool{}} 401 resp, err := p.pt.FinalResponse(ctx, respType.BackendAddressPool) 402 if err != nil { 403 return BackendAddressPoolResponse{}, err 404 } 405 respType.RawResponse = resp 406 return respType, nil 407} 408 409func (p *backendAddressPoolPoller) ResumeToken() (string, error) { 410 return p.pt.ResumeToken() 411} 412 413func (p *backendAddressPoolPoller) pollUntilDone(ctx context.Context, freq time.Duration) (BackendAddressPoolResponse, error) { 414 respType := BackendAddressPoolResponse{BackendAddressPool: &BackendAddressPool{}} 415 resp, err := p.pt.PollUntilDone(ctx, freq, respType.BackendAddressPool) 416 if err != nil { 417 return BackendAddressPoolResponse{}, err 418 } 419 respType.RawResponse = resp 420 return respType, nil 421} 422 423// BastionActiveSessionListResultPagerPoller provides polling facilities until the operation reaches a terminal state. 424type BastionActiveSessionListResultPagerPoller interface { 425 azcore.Poller 426 // FinalResponse performs a final GET to the service and returns the final response 427 // for the polling operation. If there is an error performing the final GET then an error is returned. 428 // If the final GET succeeded then the final BastionActiveSessionListResultPager will be returned. 429 FinalResponse(ctx context.Context) (BastionActiveSessionListResultPager, error) 430} 431 432type bastionActiveSessionListResultPagerPoller struct { 433 pt *armcore.LROPoller 434 errHandler bastionActiveSessionListResultHandleError 435 respHandler bastionActiveSessionListResultHandleResponse 436 statusCodes []int 437} 438 439func (p *bastionActiveSessionListResultPagerPoller) Done() bool { 440 return p.pt.Done() 441} 442 443func (p *bastionActiveSessionListResultPagerPoller) Poll(ctx context.Context) (*http.Response, error) { 444 return p.pt.Poll(ctx) 445} 446 447func (p *bastionActiveSessionListResultPagerPoller) FinalResponse(ctx context.Context) (BastionActiveSessionListResultPager, error) { 448 respType := &bastionActiveSessionListResultPager{} 449 resp, err := p.pt.FinalResponse(ctx, respType) 450 if err != nil { 451 return nil, err 452 } 453 return p.handleResponse(&azcore.Response{Response: resp}) 454} 455 456func (p *bastionActiveSessionListResultPagerPoller) ResumeToken() (string, error) { 457 return p.pt.ResumeToken() 458} 459 460func (p *bastionActiveSessionListResultPagerPoller) pollUntilDone(ctx context.Context, freq time.Duration) (BastionActiveSessionListResultPager, error) { 461 respType := &bastionActiveSessionListResultPager{} 462 resp, err := p.pt.PollUntilDone(ctx, freq, respType) 463 if err != nil { 464 return nil, err 465 } 466 return p.handleResponse(&azcore.Response{Response: resp}) 467} 468 469func (p *bastionActiveSessionListResultPagerPoller) handleResponse(resp *azcore.Response) (BastionActiveSessionListResultPager, error) { 470 return &bastionActiveSessionListResultPager{ 471 pipeline: p.pt.Pipeline, 472 resp: resp, 473 errorer: p.errHandler, 474 responder: p.respHandler, 475 advancer: func(ctx context.Context, resp BastionActiveSessionListResultResponse) (*azcore.Request, error) { 476 return azcore.NewRequest(ctx, http.MethodGet, *resp.BastionActiveSessionListResult.NextLink) 477 }, 478 statusCodes: p.statusCodes, 479 }, nil 480} 481 482// BastionHostPoller provides polling facilities until the operation reaches a terminal state. 483type BastionHostPoller interface { 484 azcore.Poller 485 // FinalResponse performs a final GET to the service and returns the final response 486 // for the polling operation. If there is an error performing the final GET then an error is returned. 487 // If the final GET succeeded then the final BastionHostResponse will be returned. 488 FinalResponse(ctx context.Context) (BastionHostResponse, error) 489} 490 491type bastionHostPoller struct { 492 pt *armcore.LROPoller 493} 494 495func (p *bastionHostPoller) Done() bool { 496 return p.pt.Done() 497} 498 499func (p *bastionHostPoller) Poll(ctx context.Context) (*http.Response, error) { 500 return p.pt.Poll(ctx) 501} 502 503func (p *bastionHostPoller) FinalResponse(ctx context.Context) (BastionHostResponse, error) { 504 respType := BastionHostResponse{BastionHost: &BastionHost{}} 505 resp, err := p.pt.FinalResponse(ctx, respType.BastionHost) 506 if err != nil { 507 return BastionHostResponse{}, err 508 } 509 respType.RawResponse = resp 510 return respType, nil 511} 512 513func (p *bastionHostPoller) ResumeToken() (string, error) { 514 return p.pt.ResumeToken() 515} 516 517func (p *bastionHostPoller) pollUntilDone(ctx context.Context, freq time.Duration) (BastionHostResponse, error) { 518 respType := BastionHostResponse{BastionHost: &BastionHost{}} 519 resp, err := p.pt.PollUntilDone(ctx, freq, respType.BastionHost) 520 if err != nil { 521 return BastionHostResponse{}, err 522 } 523 respType.RawResponse = resp 524 return respType, nil 525} 526 527// BastionShareableLinkListResultPagerPoller provides polling facilities until the operation reaches a terminal state. 528type BastionShareableLinkListResultPagerPoller interface { 529 azcore.Poller 530 // FinalResponse performs a final GET to the service and returns the final response 531 // for the polling operation. If there is an error performing the final GET then an error is returned. 532 // If the final GET succeeded then the final BastionShareableLinkListResultPager will be returned. 533 FinalResponse(ctx context.Context) (BastionShareableLinkListResultPager, error) 534} 535 536type bastionShareableLinkListResultPagerPoller struct { 537 pt *armcore.LROPoller 538 errHandler bastionShareableLinkListResultHandleError 539 respHandler bastionShareableLinkListResultHandleResponse 540 statusCodes []int 541} 542 543func (p *bastionShareableLinkListResultPagerPoller) Done() bool { 544 return p.pt.Done() 545} 546 547func (p *bastionShareableLinkListResultPagerPoller) Poll(ctx context.Context) (*http.Response, error) { 548 return p.pt.Poll(ctx) 549} 550 551func (p *bastionShareableLinkListResultPagerPoller) FinalResponse(ctx context.Context) (BastionShareableLinkListResultPager, error) { 552 respType := &bastionShareableLinkListResultPager{} 553 resp, err := p.pt.FinalResponse(ctx, respType) 554 if err != nil { 555 return nil, err 556 } 557 return p.handleResponse(&azcore.Response{Response: resp}) 558} 559 560func (p *bastionShareableLinkListResultPagerPoller) ResumeToken() (string, error) { 561 return p.pt.ResumeToken() 562} 563 564func (p *bastionShareableLinkListResultPagerPoller) pollUntilDone(ctx context.Context, freq time.Duration) (BastionShareableLinkListResultPager, error) { 565 respType := &bastionShareableLinkListResultPager{} 566 resp, err := p.pt.PollUntilDone(ctx, freq, respType) 567 if err != nil { 568 return nil, err 569 } 570 return p.handleResponse(&azcore.Response{Response: resp}) 571} 572 573func (p *bastionShareableLinkListResultPagerPoller) handleResponse(resp *azcore.Response) (BastionShareableLinkListResultPager, error) { 574 return &bastionShareableLinkListResultPager{ 575 pipeline: p.pt.Pipeline, 576 resp: resp, 577 errorer: p.errHandler, 578 responder: p.respHandler, 579 advancer: func(ctx context.Context, resp BastionShareableLinkListResultResponse) (*azcore.Request, error) { 580 return azcore.NewRequest(ctx, http.MethodGet, *resp.BastionShareableLinkListResult.NextLink) 581 }, 582 statusCodes: p.statusCodes, 583 }, nil 584} 585 586// BgpConnectionPoller provides polling facilities until the operation reaches a terminal state. 587type BgpConnectionPoller interface { 588 azcore.Poller 589 // FinalResponse performs a final GET to the service and returns the final response 590 // for the polling operation. If there is an error performing the final GET then an error is returned. 591 // If the final GET succeeded then the final BgpConnectionResponse will be returned. 592 FinalResponse(ctx context.Context) (BgpConnectionResponse, error) 593} 594 595type bgpConnectionPoller struct { 596 pt *armcore.LROPoller 597} 598 599func (p *bgpConnectionPoller) Done() bool { 600 return p.pt.Done() 601} 602 603func (p *bgpConnectionPoller) Poll(ctx context.Context) (*http.Response, error) { 604 return p.pt.Poll(ctx) 605} 606 607func (p *bgpConnectionPoller) FinalResponse(ctx context.Context) (BgpConnectionResponse, error) { 608 respType := BgpConnectionResponse{BgpConnection: &BgpConnection{}} 609 resp, err := p.pt.FinalResponse(ctx, respType.BgpConnection) 610 if err != nil { 611 return BgpConnectionResponse{}, err 612 } 613 respType.RawResponse = resp 614 return respType, nil 615} 616 617func (p *bgpConnectionPoller) ResumeToken() (string, error) { 618 return p.pt.ResumeToken() 619} 620 621func (p *bgpConnectionPoller) pollUntilDone(ctx context.Context, freq time.Duration) (BgpConnectionResponse, error) { 622 respType := BgpConnectionResponse{BgpConnection: &BgpConnection{}} 623 resp, err := p.pt.PollUntilDone(ctx, freq, respType.BgpConnection) 624 if err != nil { 625 return BgpConnectionResponse{}, err 626 } 627 respType.RawResponse = resp 628 return respType, nil 629} 630 631// BgpPeerStatusListResultPoller provides polling facilities until the operation reaches a terminal state. 632type BgpPeerStatusListResultPoller interface { 633 azcore.Poller 634 // FinalResponse performs a final GET to the service and returns the final response 635 // for the polling operation. If there is an error performing the final GET then an error is returned. 636 // If the final GET succeeded then the final BgpPeerStatusListResultResponse will be returned. 637 FinalResponse(ctx context.Context) (BgpPeerStatusListResultResponse, error) 638} 639 640type bgpPeerStatusListResultPoller struct { 641 pt *armcore.LROPoller 642} 643 644func (p *bgpPeerStatusListResultPoller) Done() bool { 645 return p.pt.Done() 646} 647 648func (p *bgpPeerStatusListResultPoller) Poll(ctx context.Context) (*http.Response, error) { 649 return p.pt.Poll(ctx) 650} 651 652func (p *bgpPeerStatusListResultPoller) FinalResponse(ctx context.Context) (BgpPeerStatusListResultResponse, error) { 653 respType := BgpPeerStatusListResultResponse{BgpPeerStatusListResult: &BgpPeerStatusListResult{}} 654 resp, err := p.pt.FinalResponse(ctx, respType.BgpPeerStatusListResult) 655 if err != nil { 656 return BgpPeerStatusListResultResponse{}, err 657 } 658 respType.RawResponse = resp 659 return respType, nil 660} 661 662func (p *bgpPeerStatusListResultPoller) ResumeToken() (string, error) { 663 return p.pt.ResumeToken() 664} 665 666func (p *bgpPeerStatusListResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (BgpPeerStatusListResultResponse, error) { 667 respType := BgpPeerStatusListResultResponse{BgpPeerStatusListResult: &BgpPeerStatusListResult{}} 668 resp, err := p.pt.PollUntilDone(ctx, freq, respType.BgpPeerStatusListResult) 669 if err != nil { 670 return BgpPeerStatusListResultResponse{}, err 671 } 672 respType.RawResponse = resp 673 return respType, nil 674} 675 676// ConnectionMonitorQueryResultPoller provides polling facilities until the operation reaches a terminal state. 677type ConnectionMonitorQueryResultPoller interface { 678 azcore.Poller 679 // FinalResponse performs a final GET to the service and returns the final response 680 // for the polling operation. If there is an error performing the final GET then an error is returned. 681 // If the final GET succeeded then the final ConnectionMonitorQueryResultResponse will be returned. 682 FinalResponse(ctx context.Context) (ConnectionMonitorQueryResultResponse, error) 683} 684 685type connectionMonitorQueryResultPoller struct { 686 pt *armcore.LROPoller 687} 688 689func (p *connectionMonitorQueryResultPoller) Done() bool { 690 return p.pt.Done() 691} 692 693func (p *connectionMonitorQueryResultPoller) Poll(ctx context.Context) (*http.Response, error) { 694 return p.pt.Poll(ctx) 695} 696 697func (p *connectionMonitorQueryResultPoller) FinalResponse(ctx context.Context) (ConnectionMonitorQueryResultResponse, error) { 698 respType := ConnectionMonitorQueryResultResponse{ConnectionMonitorQueryResult: &ConnectionMonitorQueryResult{}} 699 resp, err := p.pt.FinalResponse(ctx, respType.ConnectionMonitorQueryResult) 700 if err != nil { 701 return ConnectionMonitorQueryResultResponse{}, err 702 } 703 respType.RawResponse = resp 704 return respType, nil 705} 706 707func (p *connectionMonitorQueryResultPoller) ResumeToken() (string, error) { 708 return p.pt.ResumeToken() 709} 710 711func (p *connectionMonitorQueryResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ConnectionMonitorQueryResultResponse, error) { 712 respType := ConnectionMonitorQueryResultResponse{ConnectionMonitorQueryResult: &ConnectionMonitorQueryResult{}} 713 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ConnectionMonitorQueryResult) 714 if err != nil { 715 return ConnectionMonitorQueryResultResponse{}, err 716 } 717 respType.RawResponse = resp 718 return respType, nil 719} 720 721// ConnectionMonitorResultPoller provides polling facilities until the operation reaches a terminal state. 722type ConnectionMonitorResultPoller interface { 723 azcore.Poller 724 // FinalResponse performs a final GET to the service and returns the final response 725 // for the polling operation. If there is an error performing the final GET then an error is returned. 726 // If the final GET succeeded then the final ConnectionMonitorResultResponse will be returned. 727 FinalResponse(ctx context.Context) (ConnectionMonitorResultResponse, error) 728} 729 730type connectionMonitorResultPoller struct { 731 pt *armcore.LROPoller 732} 733 734func (p *connectionMonitorResultPoller) Done() bool { 735 return p.pt.Done() 736} 737 738func (p *connectionMonitorResultPoller) Poll(ctx context.Context) (*http.Response, error) { 739 return p.pt.Poll(ctx) 740} 741 742func (p *connectionMonitorResultPoller) FinalResponse(ctx context.Context) (ConnectionMonitorResultResponse, error) { 743 respType := ConnectionMonitorResultResponse{ConnectionMonitorResult: &ConnectionMonitorResult{}} 744 resp, err := p.pt.FinalResponse(ctx, respType.ConnectionMonitorResult) 745 if err != nil { 746 return ConnectionMonitorResultResponse{}, err 747 } 748 respType.RawResponse = resp 749 return respType, nil 750} 751 752func (p *connectionMonitorResultPoller) ResumeToken() (string, error) { 753 return p.pt.ResumeToken() 754} 755 756func (p *connectionMonitorResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ConnectionMonitorResultResponse, error) { 757 respType := ConnectionMonitorResultResponse{ConnectionMonitorResult: &ConnectionMonitorResult{}} 758 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ConnectionMonitorResult) 759 if err != nil { 760 return ConnectionMonitorResultResponse{}, err 761 } 762 respType.RawResponse = resp 763 return respType, nil 764} 765 766// ConnectionResetSharedKeyPoller provides polling facilities until the operation reaches a terminal state. 767type ConnectionResetSharedKeyPoller interface { 768 azcore.Poller 769 // FinalResponse performs a final GET to the service and returns the final response 770 // for the polling operation. If there is an error performing the final GET then an error is returned. 771 // If the final GET succeeded then the final ConnectionResetSharedKeyResponse will be returned. 772 FinalResponse(ctx context.Context) (ConnectionResetSharedKeyResponse, error) 773} 774 775type connectionResetSharedKeyPoller struct { 776 pt *armcore.LROPoller 777} 778 779func (p *connectionResetSharedKeyPoller) Done() bool { 780 return p.pt.Done() 781} 782 783func (p *connectionResetSharedKeyPoller) Poll(ctx context.Context) (*http.Response, error) { 784 return p.pt.Poll(ctx) 785} 786 787func (p *connectionResetSharedKeyPoller) FinalResponse(ctx context.Context) (ConnectionResetSharedKeyResponse, error) { 788 respType := ConnectionResetSharedKeyResponse{ConnectionResetSharedKey: &ConnectionResetSharedKey{}} 789 resp, err := p.pt.FinalResponse(ctx, respType.ConnectionResetSharedKey) 790 if err != nil { 791 return ConnectionResetSharedKeyResponse{}, err 792 } 793 respType.RawResponse = resp 794 return respType, nil 795} 796 797func (p *connectionResetSharedKeyPoller) ResumeToken() (string, error) { 798 return p.pt.ResumeToken() 799} 800 801func (p *connectionResetSharedKeyPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ConnectionResetSharedKeyResponse, error) { 802 respType := ConnectionResetSharedKeyResponse{ConnectionResetSharedKey: &ConnectionResetSharedKey{}} 803 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ConnectionResetSharedKey) 804 if err != nil { 805 return ConnectionResetSharedKeyResponse{}, err 806 } 807 respType.RawResponse = resp 808 return respType, nil 809} 810 811// ConnectionSharedKeyPoller provides polling facilities until the operation reaches a terminal state. 812type ConnectionSharedKeyPoller interface { 813 azcore.Poller 814 // FinalResponse performs a final GET to the service and returns the final response 815 // for the polling operation. If there is an error performing the final GET then an error is returned. 816 // If the final GET succeeded then the final ConnectionSharedKeyResponse will be returned. 817 FinalResponse(ctx context.Context) (ConnectionSharedKeyResponse, error) 818} 819 820type connectionSharedKeyPoller struct { 821 pt *armcore.LROPoller 822} 823 824func (p *connectionSharedKeyPoller) Done() bool { 825 return p.pt.Done() 826} 827 828func (p *connectionSharedKeyPoller) Poll(ctx context.Context) (*http.Response, error) { 829 return p.pt.Poll(ctx) 830} 831 832func (p *connectionSharedKeyPoller) FinalResponse(ctx context.Context) (ConnectionSharedKeyResponse, error) { 833 respType := ConnectionSharedKeyResponse{ConnectionSharedKey: &ConnectionSharedKey{}} 834 resp, err := p.pt.FinalResponse(ctx, respType.ConnectionSharedKey) 835 if err != nil { 836 return ConnectionSharedKeyResponse{}, err 837 } 838 respType.RawResponse = resp 839 return respType, nil 840} 841 842func (p *connectionSharedKeyPoller) ResumeToken() (string, error) { 843 return p.pt.ResumeToken() 844} 845 846func (p *connectionSharedKeyPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ConnectionSharedKeyResponse, error) { 847 respType := ConnectionSharedKeyResponse{ConnectionSharedKey: &ConnectionSharedKey{}} 848 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ConnectionSharedKey) 849 if err != nil { 850 return ConnectionSharedKeyResponse{}, err 851 } 852 respType.RawResponse = resp 853 return respType, nil 854} 855 856// ConnectivityInformationPoller provides polling facilities until the operation reaches a terminal state. 857type ConnectivityInformationPoller interface { 858 azcore.Poller 859 // FinalResponse performs a final GET to the service and returns the final response 860 // for the polling operation. If there is an error performing the final GET then an error is returned. 861 // If the final GET succeeded then the final ConnectivityInformationResponse will be returned. 862 FinalResponse(ctx context.Context) (ConnectivityInformationResponse, error) 863} 864 865type connectivityInformationPoller struct { 866 pt *armcore.LROPoller 867} 868 869func (p *connectivityInformationPoller) Done() bool { 870 return p.pt.Done() 871} 872 873func (p *connectivityInformationPoller) Poll(ctx context.Context) (*http.Response, error) { 874 return p.pt.Poll(ctx) 875} 876 877func (p *connectivityInformationPoller) FinalResponse(ctx context.Context) (ConnectivityInformationResponse, error) { 878 respType := ConnectivityInformationResponse{ConnectivityInformation: &ConnectivityInformation{}} 879 resp, err := p.pt.FinalResponse(ctx, respType.ConnectivityInformation) 880 if err != nil { 881 return ConnectivityInformationResponse{}, err 882 } 883 respType.RawResponse = resp 884 return respType, nil 885} 886 887func (p *connectivityInformationPoller) ResumeToken() (string, error) { 888 return p.pt.ResumeToken() 889} 890 891func (p *connectivityInformationPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ConnectivityInformationResponse, error) { 892 respType := ConnectivityInformationResponse{ConnectivityInformation: &ConnectivityInformation{}} 893 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ConnectivityInformation) 894 if err != nil { 895 return ConnectivityInformationResponse{}, err 896 } 897 respType.RawResponse = resp 898 return respType, nil 899} 900 901// CustomIPPrefixPoller provides polling facilities until the operation reaches a terminal state. 902type CustomIPPrefixPoller interface { 903 azcore.Poller 904 // FinalResponse performs a final GET to the service and returns the final response 905 // for the polling operation. If there is an error performing the final GET then an error is returned. 906 // If the final GET succeeded then the final CustomIPPrefixResponse will be returned. 907 FinalResponse(ctx context.Context) (CustomIPPrefixResponse, error) 908} 909 910type customIPPrefixPoller struct { 911 pt *armcore.LROPoller 912} 913 914func (p *customIPPrefixPoller) Done() bool { 915 return p.pt.Done() 916} 917 918func (p *customIPPrefixPoller) Poll(ctx context.Context) (*http.Response, error) { 919 return p.pt.Poll(ctx) 920} 921 922func (p *customIPPrefixPoller) FinalResponse(ctx context.Context) (CustomIPPrefixResponse, error) { 923 respType := CustomIPPrefixResponse{CustomIPPrefix: &CustomIPPrefix{}} 924 resp, err := p.pt.FinalResponse(ctx, respType.CustomIPPrefix) 925 if err != nil { 926 return CustomIPPrefixResponse{}, err 927 } 928 respType.RawResponse = resp 929 return respType, nil 930} 931 932func (p *customIPPrefixPoller) ResumeToken() (string, error) { 933 return p.pt.ResumeToken() 934} 935 936func (p *customIPPrefixPoller) pollUntilDone(ctx context.Context, freq time.Duration) (CustomIPPrefixResponse, error) { 937 respType := CustomIPPrefixResponse{CustomIPPrefix: &CustomIPPrefix{}} 938 resp, err := p.pt.PollUntilDone(ctx, freq, respType.CustomIPPrefix) 939 if err != nil { 940 return CustomIPPrefixResponse{}, err 941 } 942 respType.RawResponse = resp 943 return respType, nil 944} 945 946// DdosCustomPolicyPoller provides polling facilities until the operation reaches a terminal state. 947type DdosCustomPolicyPoller interface { 948 azcore.Poller 949 // FinalResponse performs a final GET to the service and returns the final response 950 // for the polling operation. If there is an error performing the final GET then an error is returned. 951 // If the final GET succeeded then the final DdosCustomPolicyResponse will be returned. 952 FinalResponse(ctx context.Context) (DdosCustomPolicyResponse, error) 953} 954 955type ddosCustomPolicyPoller struct { 956 pt *armcore.LROPoller 957} 958 959func (p *ddosCustomPolicyPoller) Done() bool { 960 return p.pt.Done() 961} 962 963func (p *ddosCustomPolicyPoller) Poll(ctx context.Context) (*http.Response, error) { 964 return p.pt.Poll(ctx) 965} 966 967func (p *ddosCustomPolicyPoller) FinalResponse(ctx context.Context) (DdosCustomPolicyResponse, error) { 968 respType := DdosCustomPolicyResponse{DdosCustomPolicy: &DdosCustomPolicy{}} 969 resp, err := p.pt.FinalResponse(ctx, respType.DdosCustomPolicy) 970 if err != nil { 971 return DdosCustomPolicyResponse{}, err 972 } 973 respType.RawResponse = resp 974 return respType, nil 975} 976 977func (p *ddosCustomPolicyPoller) ResumeToken() (string, error) { 978 return p.pt.ResumeToken() 979} 980 981func (p *ddosCustomPolicyPoller) pollUntilDone(ctx context.Context, freq time.Duration) (DdosCustomPolicyResponse, error) { 982 respType := DdosCustomPolicyResponse{DdosCustomPolicy: &DdosCustomPolicy{}} 983 resp, err := p.pt.PollUntilDone(ctx, freq, respType.DdosCustomPolicy) 984 if err != nil { 985 return DdosCustomPolicyResponse{}, err 986 } 987 respType.RawResponse = resp 988 return respType, nil 989} 990 991// DdosProtectionPlanPoller provides polling facilities until the operation reaches a terminal state. 992type DdosProtectionPlanPoller interface { 993 azcore.Poller 994 // FinalResponse performs a final GET to the service and returns the final response 995 // for the polling operation. If there is an error performing the final GET then an error is returned. 996 // If the final GET succeeded then the final DdosProtectionPlanResponse will be returned. 997 FinalResponse(ctx context.Context) (DdosProtectionPlanResponse, error) 998} 999 1000type ddosProtectionPlanPoller struct { 1001 pt *armcore.LROPoller 1002} 1003 1004func (p *ddosProtectionPlanPoller) Done() bool { 1005 return p.pt.Done() 1006} 1007 1008func (p *ddosProtectionPlanPoller) Poll(ctx context.Context) (*http.Response, error) { 1009 return p.pt.Poll(ctx) 1010} 1011 1012func (p *ddosProtectionPlanPoller) FinalResponse(ctx context.Context) (DdosProtectionPlanResponse, error) { 1013 respType := DdosProtectionPlanResponse{DdosProtectionPlan: &DdosProtectionPlan{}} 1014 resp, err := p.pt.FinalResponse(ctx, respType.DdosProtectionPlan) 1015 if err != nil { 1016 return DdosProtectionPlanResponse{}, err 1017 } 1018 respType.RawResponse = resp 1019 return respType, nil 1020} 1021 1022func (p *ddosProtectionPlanPoller) ResumeToken() (string, error) { 1023 return p.pt.ResumeToken() 1024} 1025 1026func (p *ddosProtectionPlanPoller) pollUntilDone(ctx context.Context, freq time.Duration) (DdosProtectionPlanResponse, error) { 1027 respType := DdosProtectionPlanResponse{DdosProtectionPlan: &DdosProtectionPlan{}} 1028 resp, err := p.pt.PollUntilDone(ctx, freq, respType.DdosProtectionPlan) 1029 if err != nil { 1030 return DdosProtectionPlanResponse{}, err 1031 } 1032 respType.RawResponse = resp 1033 return respType, nil 1034} 1035 1036// DscpConfigurationPoller provides polling facilities until the operation reaches a terminal state. 1037type DscpConfigurationPoller interface { 1038 azcore.Poller 1039 // FinalResponse performs a final GET to the service and returns the final response 1040 // for the polling operation. If there is an error performing the final GET then an error is returned. 1041 // If the final GET succeeded then the final DscpConfigurationResponse will be returned. 1042 FinalResponse(ctx context.Context) (DscpConfigurationResponse, error) 1043} 1044 1045type dscpConfigurationPoller struct { 1046 pt *armcore.LROPoller 1047} 1048 1049func (p *dscpConfigurationPoller) Done() bool { 1050 return p.pt.Done() 1051} 1052 1053func (p *dscpConfigurationPoller) Poll(ctx context.Context) (*http.Response, error) { 1054 return p.pt.Poll(ctx) 1055} 1056 1057func (p *dscpConfigurationPoller) FinalResponse(ctx context.Context) (DscpConfigurationResponse, error) { 1058 respType := DscpConfigurationResponse{DscpConfiguration: &DscpConfiguration{}} 1059 resp, err := p.pt.FinalResponse(ctx, respType.DscpConfiguration) 1060 if err != nil { 1061 return DscpConfigurationResponse{}, err 1062 } 1063 respType.RawResponse = resp 1064 return respType, nil 1065} 1066 1067func (p *dscpConfigurationPoller) ResumeToken() (string, error) { 1068 return p.pt.ResumeToken() 1069} 1070 1071func (p *dscpConfigurationPoller) pollUntilDone(ctx context.Context, freq time.Duration) (DscpConfigurationResponse, error) { 1072 respType := DscpConfigurationResponse{DscpConfiguration: &DscpConfiguration{}} 1073 resp, err := p.pt.PollUntilDone(ctx, freq, respType.DscpConfiguration) 1074 if err != nil { 1075 return DscpConfigurationResponse{}, err 1076 } 1077 respType.RawResponse = resp 1078 return respType, nil 1079} 1080 1081// EffectiveNetworkSecurityGroupListResultPoller provides polling facilities until the operation reaches a terminal state. 1082type EffectiveNetworkSecurityGroupListResultPoller interface { 1083 azcore.Poller 1084 // FinalResponse performs a final GET to the service and returns the final response 1085 // for the polling operation. If there is an error performing the final GET then an error is returned. 1086 // If the final GET succeeded then the final EffectiveNetworkSecurityGroupListResultResponse will be returned. 1087 FinalResponse(ctx context.Context) (EffectiveNetworkSecurityGroupListResultResponse, error) 1088} 1089 1090type effectiveNetworkSecurityGroupListResultPoller struct { 1091 pt *armcore.LROPoller 1092} 1093 1094func (p *effectiveNetworkSecurityGroupListResultPoller) Done() bool { 1095 return p.pt.Done() 1096} 1097 1098func (p *effectiveNetworkSecurityGroupListResultPoller) Poll(ctx context.Context) (*http.Response, error) { 1099 return p.pt.Poll(ctx) 1100} 1101 1102func (p *effectiveNetworkSecurityGroupListResultPoller) FinalResponse(ctx context.Context) (EffectiveNetworkSecurityGroupListResultResponse, error) { 1103 respType := EffectiveNetworkSecurityGroupListResultResponse{EffectiveNetworkSecurityGroupListResult: &EffectiveNetworkSecurityGroupListResult{}} 1104 resp, err := p.pt.FinalResponse(ctx, respType.EffectiveNetworkSecurityGroupListResult) 1105 if err != nil { 1106 return EffectiveNetworkSecurityGroupListResultResponse{}, err 1107 } 1108 respType.RawResponse = resp 1109 return respType, nil 1110} 1111 1112func (p *effectiveNetworkSecurityGroupListResultPoller) ResumeToken() (string, error) { 1113 return p.pt.ResumeToken() 1114} 1115 1116func (p *effectiveNetworkSecurityGroupListResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (EffectiveNetworkSecurityGroupListResultResponse, error) { 1117 respType := EffectiveNetworkSecurityGroupListResultResponse{EffectiveNetworkSecurityGroupListResult: &EffectiveNetworkSecurityGroupListResult{}} 1118 resp, err := p.pt.PollUntilDone(ctx, freq, respType.EffectiveNetworkSecurityGroupListResult) 1119 if err != nil { 1120 return EffectiveNetworkSecurityGroupListResultResponse{}, err 1121 } 1122 respType.RawResponse = resp 1123 return respType, nil 1124} 1125 1126// EffectiveRouteListResultPoller provides polling facilities until the operation reaches a terminal state. 1127type EffectiveRouteListResultPoller interface { 1128 azcore.Poller 1129 // FinalResponse performs a final GET to the service and returns the final response 1130 // for the polling operation. If there is an error performing the final GET then an error is returned. 1131 // If the final GET succeeded then the final EffectiveRouteListResultResponse will be returned. 1132 FinalResponse(ctx context.Context) (EffectiveRouteListResultResponse, error) 1133} 1134 1135type effectiveRouteListResultPoller struct { 1136 pt *armcore.LROPoller 1137} 1138 1139func (p *effectiveRouteListResultPoller) Done() bool { 1140 return p.pt.Done() 1141} 1142 1143func (p *effectiveRouteListResultPoller) Poll(ctx context.Context) (*http.Response, error) { 1144 return p.pt.Poll(ctx) 1145} 1146 1147func (p *effectiveRouteListResultPoller) FinalResponse(ctx context.Context) (EffectiveRouteListResultResponse, error) { 1148 respType := EffectiveRouteListResultResponse{EffectiveRouteListResult: &EffectiveRouteListResult{}} 1149 resp, err := p.pt.FinalResponse(ctx, respType.EffectiveRouteListResult) 1150 if err != nil { 1151 return EffectiveRouteListResultResponse{}, err 1152 } 1153 respType.RawResponse = resp 1154 return respType, nil 1155} 1156 1157func (p *effectiveRouteListResultPoller) ResumeToken() (string, error) { 1158 return p.pt.ResumeToken() 1159} 1160 1161func (p *effectiveRouteListResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (EffectiveRouteListResultResponse, error) { 1162 respType := EffectiveRouteListResultResponse{EffectiveRouteListResult: &EffectiveRouteListResult{}} 1163 resp, err := p.pt.PollUntilDone(ctx, freq, respType.EffectiveRouteListResult) 1164 if err != nil { 1165 return EffectiveRouteListResultResponse{}, err 1166 } 1167 respType.RawResponse = resp 1168 return respType, nil 1169} 1170 1171// ExpressRouteCircuitAuthorizationPoller provides polling facilities until the operation reaches a terminal state. 1172type ExpressRouteCircuitAuthorizationPoller interface { 1173 azcore.Poller 1174 // FinalResponse performs a final GET to the service and returns the final response 1175 // for the polling operation. If there is an error performing the final GET then an error is returned. 1176 // If the final GET succeeded then the final ExpressRouteCircuitAuthorizationResponse will be returned. 1177 FinalResponse(ctx context.Context) (ExpressRouteCircuitAuthorizationResponse, error) 1178} 1179 1180type expressRouteCircuitAuthorizationPoller struct { 1181 pt *armcore.LROPoller 1182} 1183 1184func (p *expressRouteCircuitAuthorizationPoller) Done() bool { 1185 return p.pt.Done() 1186} 1187 1188func (p *expressRouteCircuitAuthorizationPoller) Poll(ctx context.Context) (*http.Response, error) { 1189 return p.pt.Poll(ctx) 1190} 1191 1192func (p *expressRouteCircuitAuthorizationPoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitAuthorizationResponse, error) { 1193 respType := ExpressRouteCircuitAuthorizationResponse{ExpressRouteCircuitAuthorization: &ExpressRouteCircuitAuthorization{}} 1194 resp, err := p.pt.FinalResponse(ctx, respType.ExpressRouteCircuitAuthorization) 1195 if err != nil { 1196 return ExpressRouteCircuitAuthorizationResponse{}, err 1197 } 1198 respType.RawResponse = resp 1199 return respType, nil 1200} 1201 1202func (p *expressRouteCircuitAuthorizationPoller) ResumeToken() (string, error) { 1203 return p.pt.ResumeToken() 1204} 1205 1206func (p *expressRouteCircuitAuthorizationPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitAuthorizationResponse, error) { 1207 respType := ExpressRouteCircuitAuthorizationResponse{ExpressRouteCircuitAuthorization: &ExpressRouteCircuitAuthorization{}} 1208 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ExpressRouteCircuitAuthorization) 1209 if err != nil { 1210 return ExpressRouteCircuitAuthorizationResponse{}, err 1211 } 1212 respType.RawResponse = resp 1213 return respType, nil 1214} 1215 1216// ExpressRouteCircuitConnectionPoller provides polling facilities until the operation reaches a terminal state. 1217type ExpressRouteCircuitConnectionPoller interface { 1218 azcore.Poller 1219 // FinalResponse performs a final GET to the service and returns the final response 1220 // for the polling operation. If there is an error performing the final GET then an error is returned. 1221 // If the final GET succeeded then the final ExpressRouteCircuitConnectionResponse will be returned. 1222 FinalResponse(ctx context.Context) (ExpressRouteCircuitConnectionResponse, error) 1223} 1224 1225type expressRouteCircuitConnectionPoller struct { 1226 pt *armcore.LROPoller 1227} 1228 1229func (p *expressRouteCircuitConnectionPoller) Done() bool { 1230 return p.pt.Done() 1231} 1232 1233func (p *expressRouteCircuitConnectionPoller) Poll(ctx context.Context) (*http.Response, error) { 1234 return p.pt.Poll(ctx) 1235} 1236 1237func (p *expressRouteCircuitConnectionPoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitConnectionResponse, error) { 1238 respType := ExpressRouteCircuitConnectionResponse{ExpressRouteCircuitConnection: &ExpressRouteCircuitConnection{}} 1239 resp, err := p.pt.FinalResponse(ctx, respType.ExpressRouteCircuitConnection) 1240 if err != nil { 1241 return ExpressRouteCircuitConnectionResponse{}, err 1242 } 1243 respType.RawResponse = resp 1244 return respType, nil 1245} 1246 1247func (p *expressRouteCircuitConnectionPoller) ResumeToken() (string, error) { 1248 return p.pt.ResumeToken() 1249} 1250 1251func (p *expressRouteCircuitConnectionPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitConnectionResponse, error) { 1252 respType := ExpressRouteCircuitConnectionResponse{ExpressRouteCircuitConnection: &ExpressRouteCircuitConnection{}} 1253 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ExpressRouteCircuitConnection) 1254 if err != nil { 1255 return ExpressRouteCircuitConnectionResponse{}, err 1256 } 1257 respType.RawResponse = resp 1258 return respType, nil 1259} 1260 1261// ExpressRouteCircuitPeeringPoller provides polling facilities until the operation reaches a terminal state. 1262type ExpressRouteCircuitPeeringPoller interface { 1263 azcore.Poller 1264 // FinalResponse performs a final GET to the service and returns the final response 1265 // for the polling operation. If there is an error performing the final GET then an error is returned. 1266 // If the final GET succeeded then the final ExpressRouteCircuitPeeringResponse will be returned. 1267 FinalResponse(ctx context.Context) (ExpressRouteCircuitPeeringResponse, error) 1268} 1269 1270type expressRouteCircuitPeeringPoller struct { 1271 pt *armcore.LROPoller 1272} 1273 1274func (p *expressRouteCircuitPeeringPoller) Done() bool { 1275 return p.pt.Done() 1276} 1277 1278func (p *expressRouteCircuitPeeringPoller) Poll(ctx context.Context) (*http.Response, error) { 1279 return p.pt.Poll(ctx) 1280} 1281 1282func (p *expressRouteCircuitPeeringPoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitPeeringResponse, error) { 1283 respType := ExpressRouteCircuitPeeringResponse{ExpressRouteCircuitPeering: &ExpressRouteCircuitPeering{}} 1284 resp, err := p.pt.FinalResponse(ctx, respType.ExpressRouteCircuitPeering) 1285 if err != nil { 1286 return ExpressRouteCircuitPeeringResponse{}, err 1287 } 1288 respType.RawResponse = resp 1289 return respType, nil 1290} 1291 1292func (p *expressRouteCircuitPeeringPoller) ResumeToken() (string, error) { 1293 return p.pt.ResumeToken() 1294} 1295 1296func (p *expressRouteCircuitPeeringPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitPeeringResponse, error) { 1297 respType := ExpressRouteCircuitPeeringResponse{ExpressRouteCircuitPeering: &ExpressRouteCircuitPeering{}} 1298 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ExpressRouteCircuitPeering) 1299 if err != nil { 1300 return ExpressRouteCircuitPeeringResponse{}, err 1301 } 1302 respType.RawResponse = resp 1303 return respType, nil 1304} 1305 1306// ExpressRouteCircuitPoller provides polling facilities until the operation reaches a terminal state. 1307type ExpressRouteCircuitPoller interface { 1308 azcore.Poller 1309 // FinalResponse performs a final GET to the service and returns the final response 1310 // for the polling operation. If there is an error performing the final GET then an error is returned. 1311 // If the final GET succeeded then the final ExpressRouteCircuitResponse will be returned. 1312 FinalResponse(ctx context.Context) (ExpressRouteCircuitResponse, error) 1313} 1314 1315type expressRouteCircuitPoller struct { 1316 pt *armcore.LROPoller 1317} 1318 1319func (p *expressRouteCircuitPoller) Done() bool { 1320 return p.pt.Done() 1321} 1322 1323func (p *expressRouteCircuitPoller) Poll(ctx context.Context) (*http.Response, error) { 1324 return p.pt.Poll(ctx) 1325} 1326 1327func (p *expressRouteCircuitPoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitResponse, error) { 1328 respType := ExpressRouteCircuitResponse{ExpressRouteCircuit: &ExpressRouteCircuit{}} 1329 resp, err := p.pt.FinalResponse(ctx, respType.ExpressRouteCircuit) 1330 if err != nil { 1331 return ExpressRouteCircuitResponse{}, err 1332 } 1333 respType.RawResponse = resp 1334 return respType, nil 1335} 1336 1337func (p *expressRouteCircuitPoller) ResumeToken() (string, error) { 1338 return p.pt.ResumeToken() 1339} 1340 1341func (p *expressRouteCircuitPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitResponse, error) { 1342 respType := ExpressRouteCircuitResponse{ExpressRouteCircuit: &ExpressRouteCircuit{}} 1343 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ExpressRouteCircuit) 1344 if err != nil { 1345 return ExpressRouteCircuitResponse{}, err 1346 } 1347 respType.RawResponse = resp 1348 return respType, nil 1349} 1350 1351// ExpressRouteCircuitsArpTableListResultPoller provides polling facilities until the operation reaches a terminal state. 1352type ExpressRouteCircuitsArpTableListResultPoller interface { 1353 azcore.Poller 1354 // FinalResponse performs a final GET to the service and returns the final response 1355 // for the polling operation. If there is an error performing the final GET then an error is returned. 1356 // If the final GET succeeded then the final ExpressRouteCircuitsArpTableListResultResponse will be returned. 1357 FinalResponse(ctx context.Context) (ExpressRouteCircuitsArpTableListResultResponse, error) 1358} 1359 1360type expressRouteCircuitsArpTableListResultPoller struct { 1361 pt *armcore.LROPoller 1362} 1363 1364func (p *expressRouteCircuitsArpTableListResultPoller) Done() bool { 1365 return p.pt.Done() 1366} 1367 1368func (p *expressRouteCircuitsArpTableListResultPoller) Poll(ctx context.Context) (*http.Response, error) { 1369 return p.pt.Poll(ctx) 1370} 1371 1372func (p *expressRouteCircuitsArpTableListResultPoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitsArpTableListResultResponse, error) { 1373 respType := ExpressRouteCircuitsArpTableListResultResponse{ExpressRouteCircuitsArpTableListResult: &ExpressRouteCircuitsArpTableListResult{}} 1374 resp, err := p.pt.FinalResponse(ctx, respType.ExpressRouteCircuitsArpTableListResult) 1375 if err != nil { 1376 return ExpressRouteCircuitsArpTableListResultResponse{}, err 1377 } 1378 respType.RawResponse = resp 1379 return respType, nil 1380} 1381 1382func (p *expressRouteCircuitsArpTableListResultPoller) ResumeToken() (string, error) { 1383 return p.pt.ResumeToken() 1384} 1385 1386func (p *expressRouteCircuitsArpTableListResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitsArpTableListResultResponse, error) { 1387 respType := ExpressRouteCircuitsArpTableListResultResponse{ExpressRouteCircuitsArpTableListResult: &ExpressRouteCircuitsArpTableListResult{}} 1388 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ExpressRouteCircuitsArpTableListResult) 1389 if err != nil { 1390 return ExpressRouteCircuitsArpTableListResultResponse{}, err 1391 } 1392 respType.RawResponse = resp 1393 return respType, nil 1394} 1395 1396// ExpressRouteCircuitsRoutesTableListResultPoller provides polling facilities until the operation reaches a terminal state. 1397type ExpressRouteCircuitsRoutesTableListResultPoller interface { 1398 azcore.Poller 1399 // FinalResponse performs a final GET to the service and returns the final response 1400 // for the polling operation. If there is an error performing the final GET then an error is returned. 1401 // If the final GET succeeded then the final ExpressRouteCircuitsRoutesTableListResultResponse will be returned. 1402 FinalResponse(ctx context.Context) (ExpressRouteCircuitsRoutesTableListResultResponse, error) 1403} 1404 1405type expressRouteCircuitsRoutesTableListResultPoller struct { 1406 pt *armcore.LROPoller 1407} 1408 1409func (p *expressRouteCircuitsRoutesTableListResultPoller) Done() bool { 1410 return p.pt.Done() 1411} 1412 1413func (p *expressRouteCircuitsRoutesTableListResultPoller) Poll(ctx context.Context) (*http.Response, error) { 1414 return p.pt.Poll(ctx) 1415} 1416 1417func (p *expressRouteCircuitsRoutesTableListResultPoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitsRoutesTableListResultResponse, error) { 1418 respType := ExpressRouteCircuitsRoutesTableListResultResponse{ExpressRouteCircuitsRoutesTableListResult: &ExpressRouteCircuitsRoutesTableListResult{}} 1419 resp, err := p.pt.FinalResponse(ctx, respType.ExpressRouteCircuitsRoutesTableListResult) 1420 if err != nil { 1421 return ExpressRouteCircuitsRoutesTableListResultResponse{}, err 1422 } 1423 respType.RawResponse = resp 1424 return respType, nil 1425} 1426 1427func (p *expressRouteCircuitsRoutesTableListResultPoller) ResumeToken() (string, error) { 1428 return p.pt.ResumeToken() 1429} 1430 1431func (p *expressRouteCircuitsRoutesTableListResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitsRoutesTableListResultResponse, error) { 1432 respType := ExpressRouteCircuitsRoutesTableListResultResponse{ExpressRouteCircuitsRoutesTableListResult: &ExpressRouteCircuitsRoutesTableListResult{}} 1433 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ExpressRouteCircuitsRoutesTableListResult) 1434 if err != nil { 1435 return ExpressRouteCircuitsRoutesTableListResultResponse{}, err 1436 } 1437 respType.RawResponse = resp 1438 return respType, nil 1439} 1440 1441// ExpressRouteCircuitsRoutesTableSummaryListResultPoller provides polling facilities until the operation reaches a terminal state. 1442type ExpressRouteCircuitsRoutesTableSummaryListResultPoller interface { 1443 azcore.Poller 1444 // FinalResponse performs a final GET to the service and returns the final response 1445 // for the polling operation. If there is an error performing the final GET then an error is returned. 1446 // If the final GET succeeded then the final ExpressRouteCircuitsRoutesTableSummaryListResultResponse will be returned. 1447 FinalResponse(ctx context.Context) (ExpressRouteCircuitsRoutesTableSummaryListResultResponse, error) 1448} 1449 1450type expressRouteCircuitsRoutesTableSummaryListResultPoller struct { 1451 pt *armcore.LROPoller 1452} 1453 1454func (p *expressRouteCircuitsRoutesTableSummaryListResultPoller) Done() bool { 1455 return p.pt.Done() 1456} 1457 1458func (p *expressRouteCircuitsRoutesTableSummaryListResultPoller) Poll(ctx context.Context) (*http.Response, error) { 1459 return p.pt.Poll(ctx) 1460} 1461 1462func (p *expressRouteCircuitsRoutesTableSummaryListResultPoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitsRoutesTableSummaryListResultResponse, error) { 1463 respType := ExpressRouteCircuitsRoutesTableSummaryListResultResponse{ExpressRouteCircuitsRoutesTableSummaryListResult: &ExpressRouteCircuitsRoutesTableSummaryListResult{}} 1464 resp, err := p.pt.FinalResponse(ctx, respType.ExpressRouteCircuitsRoutesTableSummaryListResult) 1465 if err != nil { 1466 return ExpressRouteCircuitsRoutesTableSummaryListResultResponse{}, err 1467 } 1468 respType.RawResponse = resp 1469 return respType, nil 1470} 1471 1472func (p *expressRouteCircuitsRoutesTableSummaryListResultPoller) ResumeToken() (string, error) { 1473 return p.pt.ResumeToken() 1474} 1475 1476func (p *expressRouteCircuitsRoutesTableSummaryListResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitsRoutesTableSummaryListResultResponse, error) { 1477 respType := ExpressRouteCircuitsRoutesTableSummaryListResultResponse{ExpressRouteCircuitsRoutesTableSummaryListResult: &ExpressRouteCircuitsRoutesTableSummaryListResult{}} 1478 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ExpressRouteCircuitsRoutesTableSummaryListResult) 1479 if err != nil { 1480 return ExpressRouteCircuitsRoutesTableSummaryListResultResponse{}, err 1481 } 1482 respType.RawResponse = resp 1483 return respType, nil 1484} 1485 1486// ExpressRouteConnectionPoller provides polling facilities until the operation reaches a terminal state. 1487type ExpressRouteConnectionPoller interface { 1488 azcore.Poller 1489 // FinalResponse performs a final GET to the service and returns the final response 1490 // for the polling operation. If there is an error performing the final GET then an error is returned. 1491 // If the final GET succeeded then the final ExpressRouteConnectionResponse will be returned. 1492 FinalResponse(ctx context.Context) (ExpressRouteConnectionResponse, error) 1493} 1494 1495type expressRouteConnectionPoller struct { 1496 pt *armcore.LROPoller 1497} 1498 1499func (p *expressRouteConnectionPoller) Done() bool { 1500 return p.pt.Done() 1501} 1502 1503func (p *expressRouteConnectionPoller) Poll(ctx context.Context) (*http.Response, error) { 1504 return p.pt.Poll(ctx) 1505} 1506 1507func (p *expressRouteConnectionPoller) FinalResponse(ctx context.Context) (ExpressRouteConnectionResponse, error) { 1508 respType := ExpressRouteConnectionResponse{ExpressRouteConnection: &ExpressRouteConnection{}} 1509 resp, err := p.pt.FinalResponse(ctx, respType.ExpressRouteConnection) 1510 if err != nil { 1511 return ExpressRouteConnectionResponse{}, err 1512 } 1513 respType.RawResponse = resp 1514 return respType, nil 1515} 1516 1517func (p *expressRouteConnectionPoller) ResumeToken() (string, error) { 1518 return p.pt.ResumeToken() 1519} 1520 1521func (p *expressRouteConnectionPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteConnectionResponse, error) { 1522 respType := ExpressRouteConnectionResponse{ExpressRouteConnection: &ExpressRouteConnection{}} 1523 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ExpressRouteConnection) 1524 if err != nil { 1525 return ExpressRouteConnectionResponse{}, err 1526 } 1527 respType.RawResponse = resp 1528 return respType, nil 1529} 1530 1531// ExpressRouteCrossConnectionPeeringPoller provides polling facilities until the operation reaches a terminal state. 1532type ExpressRouteCrossConnectionPeeringPoller interface { 1533 azcore.Poller 1534 // FinalResponse performs a final GET to the service and returns the final response 1535 // for the polling operation. If there is an error performing the final GET then an error is returned. 1536 // If the final GET succeeded then the final ExpressRouteCrossConnectionPeeringResponse will be returned. 1537 FinalResponse(ctx context.Context) (ExpressRouteCrossConnectionPeeringResponse, error) 1538} 1539 1540type expressRouteCrossConnectionPeeringPoller struct { 1541 pt *armcore.LROPoller 1542} 1543 1544func (p *expressRouteCrossConnectionPeeringPoller) Done() bool { 1545 return p.pt.Done() 1546} 1547 1548func (p *expressRouteCrossConnectionPeeringPoller) Poll(ctx context.Context) (*http.Response, error) { 1549 return p.pt.Poll(ctx) 1550} 1551 1552func (p *expressRouteCrossConnectionPeeringPoller) FinalResponse(ctx context.Context) (ExpressRouteCrossConnectionPeeringResponse, error) { 1553 respType := ExpressRouteCrossConnectionPeeringResponse{ExpressRouteCrossConnectionPeering: &ExpressRouteCrossConnectionPeering{}} 1554 resp, err := p.pt.FinalResponse(ctx, respType.ExpressRouteCrossConnectionPeering) 1555 if err != nil { 1556 return ExpressRouteCrossConnectionPeeringResponse{}, err 1557 } 1558 respType.RawResponse = resp 1559 return respType, nil 1560} 1561 1562func (p *expressRouteCrossConnectionPeeringPoller) ResumeToken() (string, error) { 1563 return p.pt.ResumeToken() 1564} 1565 1566func (p *expressRouteCrossConnectionPeeringPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCrossConnectionPeeringResponse, error) { 1567 respType := ExpressRouteCrossConnectionPeeringResponse{ExpressRouteCrossConnectionPeering: &ExpressRouteCrossConnectionPeering{}} 1568 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ExpressRouteCrossConnectionPeering) 1569 if err != nil { 1570 return ExpressRouteCrossConnectionPeeringResponse{}, err 1571 } 1572 respType.RawResponse = resp 1573 return respType, nil 1574} 1575 1576// ExpressRouteCrossConnectionPoller provides polling facilities until the operation reaches a terminal state. 1577type ExpressRouteCrossConnectionPoller interface { 1578 azcore.Poller 1579 // FinalResponse performs a final GET to the service and returns the final response 1580 // for the polling operation. If there is an error performing the final GET then an error is returned. 1581 // If the final GET succeeded then the final ExpressRouteCrossConnectionResponse will be returned. 1582 FinalResponse(ctx context.Context) (ExpressRouteCrossConnectionResponse, error) 1583} 1584 1585type expressRouteCrossConnectionPoller struct { 1586 pt *armcore.LROPoller 1587} 1588 1589func (p *expressRouteCrossConnectionPoller) Done() bool { 1590 return p.pt.Done() 1591} 1592 1593func (p *expressRouteCrossConnectionPoller) Poll(ctx context.Context) (*http.Response, error) { 1594 return p.pt.Poll(ctx) 1595} 1596 1597func (p *expressRouteCrossConnectionPoller) FinalResponse(ctx context.Context) (ExpressRouteCrossConnectionResponse, error) { 1598 respType := ExpressRouteCrossConnectionResponse{ExpressRouteCrossConnection: &ExpressRouteCrossConnection{}} 1599 resp, err := p.pt.FinalResponse(ctx, respType.ExpressRouteCrossConnection) 1600 if err != nil { 1601 return ExpressRouteCrossConnectionResponse{}, err 1602 } 1603 respType.RawResponse = resp 1604 return respType, nil 1605} 1606 1607func (p *expressRouteCrossConnectionPoller) ResumeToken() (string, error) { 1608 return p.pt.ResumeToken() 1609} 1610 1611func (p *expressRouteCrossConnectionPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCrossConnectionResponse, error) { 1612 respType := ExpressRouteCrossConnectionResponse{ExpressRouteCrossConnection: &ExpressRouteCrossConnection{}} 1613 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ExpressRouteCrossConnection) 1614 if err != nil { 1615 return ExpressRouteCrossConnectionResponse{}, err 1616 } 1617 respType.RawResponse = resp 1618 return respType, nil 1619} 1620 1621// ExpressRouteCrossConnectionsRoutesTableSummaryListResultPoller provides polling facilities until the operation reaches a terminal state. 1622type ExpressRouteCrossConnectionsRoutesTableSummaryListResultPoller interface { 1623 azcore.Poller 1624 // FinalResponse performs a final GET to the service and returns the final response 1625 // for the polling operation. If there is an error performing the final GET then an error is returned. 1626 // If the final GET succeeded then the final ExpressRouteCrossConnectionsRoutesTableSummaryListResultResponse will be returned. 1627 FinalResponse(ctx context.Context) (ExpressRouteCrossConnectionsRoutesTableSummaryListResultResponse, error) 1628} 1629 1630type expressRouteCrossConnectionsRoutesTableSummaryListResultPoller struct { 1631 pt *armcore.LROPoller 1632} 1633 1634func (p *expressRouteCrossConnectionsRoutesTableSummaryListResultPoller) Done() bool { 1635 return p.pt.Done() 1636} 1637 1638func (p *expressRouteCrossConnectionsRoutesTableSummaryListResultPoller) Poll(ctx context.Context) (*http.Response, error) { 1639 return p.pt.Poll(ctx) 1640} 1641 1642func (p *expressRouteCrossConnectionsRoutesTableSummaryListResultPoller) FinalResponse(ctx context.Context) (ExpressRouteCrossConnectionsRoutesTableSummaryListResultResponse, error) { 1643 respType := ExpressRouteCrossConnectionsRoutesTableSummaryListResultResponse{ExpressRouteCrossConnectionsRoutesTableSummaryListResult: &ExpressRouteCrossConnectionsRoutesTableSummaryListResult{}} 1644 resp, err := p.pt.FinalResponse(ctx, respType.ExpressRouteCrossConnectionsRoutesTableSummaryListResult) 1645 if err != nil { 1646 return ExpressRouteCrossConnectionsRoutesTableSummaryListResultResponse{}, err 1647 } 1648 respType.RawResponse = resp 1649 return respType, nil 1650} 1651 1652func (p *expressRouteCrossConnectionsRoutesTableSummaryListResultPoller) ResumeToken() (string, error) { 1653 return p.pt.ResumeToken() 1654} 1655 1656func (p *expressRouteCrossConnectionsRoutesTableSummaryListResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCrossConnectionsRoutesTableSummaryListResultResponse, error) { 1657 respType := ExpressRouteCrossConnectionsRoutesTableSummaryListResultResponse{ExpressRouteCrossConnectionsRoutesTableSummaryListResult: &ExpressRouteCrossConnectionsRoutesTableSummaryListResult{}} 1658 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ExpressRouteCrossConnectionsRoutesTableSummaryListResult) 1659 if err != nil { 1660 return ExpressRouteCrossConnectionsRoutesTableSummaryListResultResponse{}, err 1661 } 1662 respType.RawResponse = resp 1663 return respType, nil 1664} 1665 1666// ExpressRouteGatewayPoller provides polling facilities until the operation reaches a terminal state. 1667type ExpressRouteGatewayPoller interface { 1668 azcore.Poller 1669 // FinalResponse performs a final GET to the service and returns the final response 1670 // for the polling operation. If there is an error performing the final GET then an error is returned. 1671 // If the final GET succeeded then the final ExpressRouteGatewayResponse will be returned. 1672 FinalResponse(ctx context.Context) (ExpressRouteGatewayResponse, error) 1673} 1674 1675type expressRouteGatewayPoller struct { 1676 pt *armcore.LROPoller 1677} 1678 1679func (p *expressRouteGatewayPoller) Done() bool { 1680 return p.pt.Done() 1681} 1682 1683func (p *expressRouteGatewayPoller) Poll(ctx context.Context) (*http.Response, error) { 1684 return p.pt.Poll(ctx) 1685} 1686 1687func (p *expressRouteGatewayPoller) FinalResponse(ctx context.Context) (ExpressRouteGatewayResponse, error) { 1688 respType := ExpressRouteGatewayResponse{ExpressRouteGateway: &ExpressRouteGateway{}} 1689 resp, err := p.pt.FinalResponse(ctx, respType.ExpressRouteGateway) 1690 if err != nil { 1691 return ExpressRouteGatewayResponse{}, err 1692 } 1693 respType.RawResponse = resp 1694 return respType, nil 1695} 1696 1697func (p *expressRouteGatewayPoller) ResumeToken() (string, error) { 1698 return p.pt.ResumeToken() 1699} 1700 1701func (p *expressRouteGatewayPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteGatewayResponse, error) { 1702 respType := ExpressRouteGatewayResponse{ExpressRouteGateway: &ExpressRouteGateway{}} 1703 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ExpressRouteGateway) 1704 if err != nil { 1705 return ExpressRouteGatewayResponse{}, err 1706 } 1707 respType.RawResponse = resp 1708 return respType, nil 1709} 1710 1711// ExpressRoutePortPoller provides polling facilities until the operation reaches a terminal state. 1712type ExpressRoutePortPoller interface { 1713 azcore.Poller 1714 // FinalResponse performs a final GET to the service and returns the final response 1715 // for the polling operation. If there is an error performing the final GET then an error is returned. 1716 // If the final GET succeeded then the final ExpressRoutePortResponse will be returned. 1717 FinalResponse(ctx context.Context) (ExpressRoutePortResponse, error) 1718} 1719 1720type expressRoutePortPoller struct { 1721 pt *armcore.LROPoller 1722} 1723 1724func (p *expressRoutePortPoller) Done() bool { 1725 return p.pt.Done() 1726} 1727 1728func (p *expressRoutePortPoller) Poll(ctx context.Context) (*http.Response, error) { 1729 return p.pt.Poll(ctx) 1730} 1731 1732func (p *expressRoutePortPoller) FinalResponse(ctx context.Context) (ExpressRoutePortResponse, error) { 1733 respType := ExpressRoutePortResponse{ExpressRoutePort: &ExpressRoutePort{}} 1734 resp, err := p.pt.FinalResponse(ctx, respType.ExpressRoutePort) 1735 if err != nil { 1736 return ExpressRoutePortResponse{}, err 1737 } 1738 respType.RawResponse = resp 1739 return respType, nil 1740} 1741 1742func (p *expressRoutePortPoller) ResumeToken() (string, error) { 1743 return p.pt.ResumeToken() 1744} 1745 1746func (p *expressRoutePortPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ExpressRoutePortResponse, error) { 1747 respType := ExpressRoutePortResponse{ExpressRoutePort: &ExpressRoutePort{}} 1748 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ExpressRoutePort) 1749 if err != nil { 1750 return ExpressRoutePortResponse{}, err 1751 } 1752 respType.RawResponse = resp 1753 return respType, nil 1754} 1755 1756// FirewallPolicyPoller provides polling facilities until the operation reaches a terminal state. 1757type FirewallPolicyPoller interface { 1758 azcore.Poller 1759 // FinalResponse performs a final GET to the service and returns the final response 1760 // for the polling operation. If there is an error performing the final GET then an error is returned. 1761 // If the final GET succeeded then the final FirewallPolicyResponse will be returned. 1762 FinalResponse(ctx context.Context) (FirewallPolicyResponse, error) 1763} 1764 1765type firewallPolicyPoller struct { 1766 pt *armcore.LROPoller 1767} 1768 1769func (p *firewallPolicyPoller) Done() bool { 1770 return p.pt.Done() 1771} 1772 1773func (p *firewallPolicyPoller) Poll(ctx context.Context) (*http.Response, error) { 1774 return p.pt.Poll(ctx) 1775} 1776 1777func (p *firewallPolicyPoller) FinalResponse(ctx context.Context) (FirewallPolicyResponse, error) { 1778 respType := FirewallPolicyResponse{FirewallPolicy: &FirewallPolicy{}} 1779 resp, err := p.pt.FinalResponse(ctx, respType.FirewallPolicy) 1780 if err != nil { 1781 return FirewallPolicyResponse{}, err 1782 } 1783 respType.RawResponse = resp 1784 return respType, nil 1785} 1786 1787func (p *firewallPolicyPoller) ResumeToken() (string, error) { 1788 return p.pt.ResumeToken() 1789} 1790 1791func (p *firewallPolicyPoller) pollUntilDone(ctx context.Context, freq time.Duration) (FirewallPolicyResponse, error) { 1792 respType := FirewallPolicyResponse{FirewallPolicy: &FirewallPolicy{}} 1793 resp, err := p.pt.PollUntilDone(ctx, freq, respType.FirewallPolicy) 1794 if err != nil { 1795 return FirewallPolicyResponse{}, err 1796 } 1797 respType.RawResponse = resp 1798 return respType, nil 1799} 1800 1801// FirewallPolicyRuleCollectionGroupPoller provides polling facilities until the operation reaches a terminal state. 1802type FirewallPolicyRuleCollectionGroupPoller interface { 1803 azcore.Poller 1804 // FinalResponse performs a final GET to the service and returns the final response 1805 // for the polling operation. If there is an error performing the final GET then an error is returned. 1806 // If the final GET succeeded then the final FirewallPolicyRuleCollectionGroupResponse will be returned. 1807 FinalResponse(ctx context.Context) (FirewallPolicyRuleCollectionGroupResponse, error) 1808} 1809 1810type firewallPolicyRuleCollectionGroupPoller struct { 1811 pt *armcore.LROPoller 1812} 1813 1814func (p *firewallPolicyRuleCollectionGroupPoller) Done() bool { 1815 return p.pt.Done() 1816} 1817 1818func (p *firewallPolicyRuleCollectionGroupPoller) Poll(ctx context.Context) (*http.Response, error) { 1819 return p.pt.Poll(ctx) 1820} 1821 1822func (p *firewallPolicyRuleCollectionGroupPoller) FinalResponse(ctx context.Context) (FirewallPolicyRuleCollectionGroupResponse, error) { 1823 respType := FirewallPolicyRuleCollectionGroupResponse{FirewallPolicyRuleCollectionGroup: &FirewallPolicyRuleCollectionGroup{}} 1824 resp, err := p.pt.FinalResponse(ctx, respType.FirewallPolicyRuleCollectionGroup) 1825 if err != nil { 1826 return FirewallPolicyRuleCollectionGroupResponse{}, err 1827 } 1828 respType.RawResponse = resp 1829 return respType, nil 1830} 1831 1832func (p *firewallPolicyRuleCollectionGroupPoller) ResumeToken() (string, error) { 1833 return p.pt.ResumeToken() 1834} 1835 1836func (p *firewallPolicyRuleCollectionGroupPoller) pollUntilDone(ctx context.Context, freq time.Duration) (FirewallPolicyRuleCollectionGroupResponse, error) { 1837 respType := FirewallPolicyRuleCollectionGroupResponse{FirewallPolicyRuleCollectionGroup: &FirewallPolicyRuleCollectionGroup{}} 1838 resp, err := p.pt.PollUntilDone(ctx, freq, respType.FirewallPolicyRuleCollectionGroup) 1839 if err != nil { 1840 return FirewallPolicyRuleCollectionGroupResponse{}, err 1841 } 1842 respType.RawResponse = resp 1843 return respType, nil 1844} 1845 1846// FlowLogInformationPoller provides polling facilities until the operation reaches a terminal state. 1847type FlowLogInformationPoller interface { 1848 azcore.Poller 1849 // FinalResponse performs a final GET to the service and returns the final response 1850 // for the polling operation. If there is an error performing the final GET then an error is returned. 1851 // If the final GET succeeded then the final FlowLogInformationResponse will be returned. 1852 FinalResponse(ctx context.Context) (FlowLogInformationResponse, error) 1853} 1854 1855type flowLogInformationPoller struct { 1856 pt *armcore.LROPoller 1857} 1858 1859func (p *flowLogInformationPoller) Done() bool { 1860 return p.pt.Done() 1861} 1862 1863func (p *flowLogInformationPoller) Poll(ctx context.Context) (*http.Response, error) { 1864 return p.pt.Poll(ctx) 1865} 1866 1867func (p *flowLogInformationPoller) FinalResponse(ctx context.Context) (FlowLogInformationResponse, error) { 1868 respType := FlowLogInformationResponse{FlowLogInformation: &FlowLogInformation{}} 1869 resp, err := p.pt.FinalResponse(ctx, respType.FlowLogInformation) 1870 if err != nil { 1871 return FlowLogInformationResponse{}, err 1872 } 1873 respType.RawResponse = resp 1874 return respType, nil 1875} 1876 1877func (p *flowLogInformationPoller) ResumeToken() (string, error) { 1878 return p.pt.ResumeToken() 1879} 1880 1881func (p *flowLogInformationPoller) pollUntilDone(ctx context.Context, freq time.Duration) (FlowLogInformationResponse, error) { 1882 respType := FlowLogInformationResponse{FlowLogInformation: &FlowLogInformation{}} 1883 resp, err := p.pt.PollUntilDone(ctx, freq, respType.FlowLogInformation) 1884 if err != nil { 1885 return FlowLogInformationResponse{}, err 1886 } 1887 respType.RawResponse = resp 1888 return respType, nil 1889} 1890 1891// FlowLogPoller provides polling facilities until the operation reaches a terminal state. 1892type FlowLogPoller interface { 1893 azcore.Poller 1894 // FinalResponse performs a final GET to the service and returns the final response 1895 // for the polling operation. If there is an error performing the final GET then an error is returned. 1896 // If the final GET succeeded then the final FlowLogResponse will be returned. 1897 FinalResponse(ctx context.Context) (FlowLogResponse, error) 1898} 1899 1900type flowLogPoller struct { 1901 pt *armcore.LROPoller 1902} 1903 1904func (p *flowLogPoller) Done() bool { 1905 return p.pt.Done() 1906} 1907 1908func (p *flowLogPoller) Poll(ctx context.Context) (*http.Response, error) { 1909 return p.pt.Poll(ctx) 1910} 1911 1912func (p *flowLogPoller) FinalResponse(ctx context.Context) (FlowLogResponse, error) { 1913 respType := FlowLogResponse{FlowLog: &FlowLog{}} 1914 resp, err := p.pt.FinalResponse(ctx, respType.FlowLog) 1915 if err != nil { 1916 return FlowLogResponse{}, err 1917 } 1918 respType.RawResponse = resp 1919 return respType, nil 1920} 1921 1922func (p *flowLogPoller) ResumeToken() (string, error) { 1923 return p.pt.ResumeToken() 1924} 1925 1926func (p *flowLogPoller) pollUntilDone(ctx context.Context, freq time.Duration) (FlowLogResponse, error) { 1927 respType := FlowLogResponse{FlowLog: &FlowLog{}} 1928 resp, err := p.pt.PollUntilDone(ctx, freq, respType.FlowLog) 1929 if err != nil { 1930 return FlowLogResponse{}, err 1931 } 1932 respType.RawResponse = resp 1933 return respType, nil 1934} 1935 1936// GatewayRouteListResultPoller provides polling facilities until the operation reaches a terminal state. 1937type GatewayRouteListResultPoller interface { 1938 azcore.Poller 1939 // FinalResponse performs a final GET to the service and returns the final response 1940 // for the polling operation. If there is an error performing the final GET then an error is returned. 1941 // If the final GET succeeded then the final GatewayRouteListResultResponse will be returned. 1942 FinalResponse(ctx context.Context) (GatewayRouteListResultResponse, error) 1943} 1944 1945type gatewayRouteListResultPoller struct { 1946 pt *armcore.LROPoller 1947} 1948 1949func (p *gatewayRouteListResultPoller) Done() bool { 1950 return p.pt.Done() 1951} 1952 1953func (p *gatewayRouteListResultPoller) Poll(ctx context.Context) (*http.Response, error) { 1954 return p.pt.Poll(ctx) 1955} 1956 1957func (p *gatewayRouteListResultPoller) FinalResponse(ctx context.Context) (GatewayRouteListResultResponse, error) { 1958 respType := GatewayRouteListResultResponse{GatewayRouteListResult: &GatewayRouteListResult{}} 1959 resp, err := p.pt.FinalResponse(ctx, respType.GatewayRouteListResult) 1960 if err != nil { 1961 return GatewayRouteListResultResponse{}, err 1962 } 1963 respType.RawResponse = resp 1964 return respType, nil 1965} 1966 1967func (p *gatewayRouteListResultPoller) ResumeToken() (string, error) { 1968 return p.pt.ResumeToken() 1969} 1970 1971func (p *gatewayRouteListResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (GatewayRouteListResultResponse, error) { 1972 respType := GatewayRouteListResultResponse{GatewayRouteListResult: &GatewayRouteListResult{}} 1973 resp, err := p.pt.PollUntilDone(ctx, freq, respType.GatewayRouteListResult) 1974 if err != nil { 1975 return GatewayRouteListResultResponse{}, err 1976 } 1977 respType.RawResponse = resp 1978 return respType, nil 1979} 1980 1981// HTTPPoller provides polling facilities until the operation reaches a terminal state. 1982type HTTPPoller interface { 1983 azcore.Poller 1984 // FinalResponse performs a final GET to the service and returns the final response 1985 // for the polling operation. If there is an error performing the final GET then an error is returned. 1986 // If the final GET succeeded then the final *http.Response will be returned. 1987 FinalResponse(ctx context.Context) (*http.Response, error) 1988} 1989 1990type httpPoller struct { 1991 pt *armcore.LROPoller 1992} 1993 1994func (p *httpPoller) Done() bool { 1995 return p.pt.Done() 1996} 1997 1998func (p *httpPoller) Poll(ctx context.Context) (*http.Response, error) { 1999 return p.pt.Poll(ctx) 2000} 2001 2002func (p *httpPoller) FinalResponse(ctx context.Context) (*http.Response, error) { 2003 return p.pt.FinalResponse(ctx, nil) 2004} 2005 2006func (p *httpPoller) ResumeToken() (string, error) { 2007 return p.pt.ResumeToken() 2008} 2009 2010func (p *httpPoller) pollUntilDone(ctx context.Context, freq time.Duration) (*http.Response, error) { 2011 return p.pt.PollUntilDone(ctx, freq, nil) 2012} 2013 2014// HubIPConfigurationPoller provides polling facilities until the operation reaches a terminal state. 2015type HubIPConfigurationPoller interface { 2016 azcore.Poller 2017 // FinalResponse performs a final GET to the service and returns the final response 2018 // for the polling operation. If there is an error performing the final GET then an error is returned. 2019 // If the final GET succeeded then the final HubIPConfigurationResponse will be returned. 2020 FinalResponse(ctx context.Context) (HubIPConfigurationResponse, error) 2021} 2022 2023type hubIPConfigurationPoller struct { 2024 pt *armcore.LROPoller 2025} 2026 2027func (p *hubIPConfigurationPoller) Done() bool { 2028 return p.pt.Done() 2029} 2030 2031func (p *hubIPConfigurationPoller) Poll(ctx context.Context) (*http.Response, error) { 2032 return p.pt.Poll(ctx) 2033} 2034 2035func (p *hubIPConfigurationPoller) FinalResponse(ctx context.Context) (HubIPConfigurationResponse, error) { 2036 respType := HubIPConfigurationResponse{HubIPConfiguration: &HubIPConfiguration{}} 2037 resp, err := p.pt.FinalResponse(ctx, respType.HubIPConfiguration) 2038 if err != nil { 2039 return HubIPConfigurationResponse{}, err 2040 } 2041 respType.RawResponse = resp 2042 return respType, nil 2043} 2044 2045func (p *hubIPConfigurationPoller) ResumeToken() (string, error) { 2046 return p.pt.ResumeToken() 2047} 2048 2049func (p *hubIPConfigurationPoller) pollUntilDone(ctx context.Context, freq time.Duration) (HubIPConfigurationResponse, error) { 2050 respType := HubIPConfigurationResponse{HubIPConfiguration: &HubIPConfiguration{}} 2051 resp, err := p.pt.PollUntilDone(ctx, freq, respType.HubIPConfiguration) 2052 if err != nil { 2053 return HubIPConfigurationResponse{}, err 2054 } 2055 respType.RawResponse = resp 2056 return respType, nil 2057} 2058 2059// HubRouteTablePoller provides polling facilities until the operation reaches a terminal state. 2060type HubRouteTablePoller interface { 2061 azcore.Poller 2062 // FinalResponse performs a final GET to the service and returns the final response 2063 // for the polling operation. If there is an error performing the final GET then an error is returned. 2064 // If the final GET succeeded then the final HubRouteTableResponse will be returned. 2065 FinalResponse(ctx context.Context) (HubRouteTableResponse, error) 2066} 2067 2068type hubRouteTablePoller struct { 2069 pt *armcore.LROPoller 2070} 2071 2072func (p *hubRouteTablePoller) Done() bool { 2073 return p.pt.Done() 2074} 2075 2076func (p *hubRouteTablePoller) Poll(ctx context.Context) (*http.Response, error) { 2077 return p.pt.Poll(ctx) 2078} 2079 2080func (p *hubRouteTablePoller) FinalResponse(ctx context.Context) (HubRouteTableResponse, error) { 2081 respType := HubRouteTableResponse{HubRouteTable: &HubRouteTable{}} 2082 resp, err := p.pt.FinalResponse(ctx, respType.HubRouteTable) 2083 if err != nil { 2084 return HubRouteTableResponse{}, err 2085 } 2086 respType.RawResponse = resp 2087 return respType, nil 2088} 2089 2090func (p *hubRouteTablePoller) ResumeToken() (string, error) { 2091 return p.pt.ResumeToken() 2092} 2093 2094func (p *hubRouteTablePoller) pollUntilDone(ctx context.Context, freq time.Duration) (HubRouteTableResponse, error) { 2095 respType := HubRouteTableResponse{HubRouteTable: &HubRouteTable{}} 2096 resp, err := p.pt.PollUntilDone(ctx, freq, respType.HubRouteTable) 2097 if err != nil { 2098 return HubRouteTableResponse{}, err 2099 } 2100 respType.RawResponse = resp 2101 return respType, nil 2102} 2103 2104// HubVirtualNetworkConnectionPoller provides polling facilities until the operation reaches a terminal state. 2105type HubVirtualNetworkConnectionPoller interface { 2106 azcore.Poller 2107 // FinalResponse performs a final GET to the service and returns the final response 2108 // for the polling operation. If there is an error performing the final GET then an error is returned. 2109 // If the final GET succeeded then the final HubVirtualNetworkConnectionResponse will be returned. 2110 FinalResponse(ctx context.Context) (HubVirtualNetworkConnectionResponse, error) 2111} 2112 2113type hubVirtualNetworkConnectionPoller struct { 2114 pt *armcore.LROPoller 2115} 2116 2117func (p *hubVirtualNetworkConnectionPoller) Done() bool { 2118 return p.pt.Done() 2119} 2120 2121func (p *hubVirtualNetworkConnectionPoller) Poll(ctx context.Context) (*http.Response, error) { 2122 return p.pt.Poll(ctx) 2123} 2124 2125func (p *hubVirtualNetworkConnectionPoller) FinalResponse(ctx context.Context) (HubVirtualNetworkConnectionResponse, error) { 2126 respType := HubVirtualNetworkConnectionResponse{HubVirtualNetworkConnection: &HubVirtualNetworkConnection{}} 2127 resp, err := p.pt.FinalResponse(ctx, respType.HubVirtualNetworkConnection) 2128 if err != nil { 2129 return HubVirtualNetworkConnectionResponse{}, err 2130 } 2131 respType.RawResponse = resp 2132 return respType, nil 2133} 2134 2135func (p *hubVirtualNetworkConnectionPoller) ResumeToken() (string, error) { 2136 return p.pt.ResumeToken() 2137} 2138 2139func (p *hubVirtualNetworkConnectionPoller) pollUntilDone(ctx context.Context, freq time.Duration) (HubVirtualNetworkConnectionResponse, error) { 2140 respType := HubVirtualNetworkConnectionResponse{HubVirtualNetworkConnection: &HubVirtualNetworkConnection{}} 2141 resp, err := p.pt.PollUntilDone(ctx, freq, respType.HubVirtualNetworkConnection) 2142 if err != nil { 2143 return HubVirtualNetworkConnectionResponse{}, err 2144 } 2145 respType.RawResponse = resp 2146 return respType, nil 2147} 2148 2149// IPAllocationPoller provides polling facilities until the operation reaches a terminal state. 2150type IPAllocationPoller interface { 2151 azcore.Poller 2152 // FinalResponse performs a final GET to the service and returns the final response 2153 // for the polling operation. If there is an error performing the final GET then an error is returned. 2154 // If the final GET succeeded then the final IPAllocationResponse will be returned. 2155 FinalResponse(ctx context.Context) (IPAllocationResponse, error) 2156} 2157 2158type ipAllocationPoller struct { 2159 pt *armcore.LROPoller 2160} 2161 2162func (p *ipAllocationPoller) Done() bool { 2163 return p.pt.Done() 2164} 2165 2166func (p *ipAllocationPoller) Poll(ctx context.Context) (*http.Response, error) { 2167 return p.pt.Poll(ctx) 2168} 2169 2170func (p *ipAllocationPoller) FinalResponse(ctx context.Context) (IPAllocationResponse, error) { 2171 respType := IPAllocationResponse{IPAllocation: &IPAllocation{}} 2172 resp, err := p.pt.FinalResponse(ctx, respType.IPAllocation) 2173 if err != nil { 2174 return IPAllocationResponse{}, err 2175 } 2176 respType.RawResponse = resp 2177 return respType, nil 2178} 2179 2180func (p *ipAllocationPoller) ResumeToken() (string, error) { 2181 return p.pt.ResumeToken() 2182} 2183 2184func (p *ipAllocationPoller) pollUntilDone(ctx context.Context, freq time.Duration) (IPAllocationResponse, error) { 2185 respType := IPAllocationResponse{IPAllocation: &IPAllocation{}} 2186 resp, err := p.pt.PollUntilDone(ctx, freq, respType.IPAllocation) 2187 if err != nil { 2188 return IPAllocationResponse{}, err 2189 } 2190 respType.RawResponse = resp 2191 return respType, nil 2192} 2193 2194// IPGroupPoller provides polling facilities until the operation reaches a terminal state. 2195type IPGroupPoller interface { 2196 azcore.Poller 2197 // FinalResponse performs a final GET to the service and returns the final response 2198 // for the polling operation. If there is an error performing the final GET then an error is returned. 2199 // If the final GET succeeded then the final IPGroupResponse will be returned. 2200 FinalResponse(ctx context.Context) (IPGroupResponse, error) 2201} 2202 2203type ipGroupPoller struct { 2204 pt *armcore.LROPoller 2205} 2206 2207func (p *ipGroupPoller) Done() bool { 2208 return p.pt.Done() 2209} 2210 2211func (p *ipGroupPoller) Poll(ctx context.Context) (*http.Response, error) { 2212 return p.pt.Poll(ctx) 2213} 2214 2215func (p *ipGroupPoller) FinalResponse(ctx context.Context) (IPGroupResponse, error) { 2216 respType := IPGroupResponse{IPGroup: &IPGroup{}} 2217 resp, err := p.pt.FinalResponse(ctx, respType.IPGroup) 2218 if err != nil { 2219 return IPGroupResponse{}, err 2220 } 2221 respType.RawResponse = resp 2222 return respType, nil 2223} 2224 2225func (p *ipGroupPoller) ResumeToken() (string, error) { 2226 return p.pt.ResumeToken() 2227} 2228 2229func (p *ipGroupPoller) pollUntilDone(ctx context.Context, freq time.Duration) (IPGroupResponse, error) { 2230 respType := IPGroupResponse{IPGroup: &IPGroup{}} 2231 resp, err := p.pt.PollUntilDone(ctx, freq, respType.IPGroup) 2232 if err != nil { 2233 return IPGroupResponse{}, err 2234 } 2235 respType.RawResponse = resp 2236 return respType, nil 2237} 2238 2239// InboundNatRulePoller provides polling facilities until the operation reaches a terminal state. 2240type InboundNatRulePoller interface { 2241 azcore.Poller 2242 // FinalResponse performs a final GET to the service and returns the final response 2243 // for the polling operation. If there is an error performing the final GET then an error is returned. 2244 // If the final GET succeeded then the final InboundNatRuleResponse will be returned. 2245 FinalResponse(ctx context.Context) (InboundNatRuleResponse, error) 2246} 2247 2248type inboundNatRulePoller struct { 2249 pt *armcore.LROPoller 2250} 2251 2252func (p *inboundNatRulePoller) Done() bool { 2253 return p.pt.Done() 2254} 2255 2256func (p *inboundNatRulePoller) Poll(ctx context.Context) (*http.Response, error) { 2257 return p.pt.Poll(ctx) 2258} 2259 2260func (p *inboundNatRulePoller) FinalResponse(ctx context.Context) (InboundNatRuleResponse, error) { 2261 respType := InboundNatRuleResponse{InboundNatRule: &InboundNatRule{}} 2262 resp, err := p.pt.FinalResponse(ctx, respType.InboundNatRule) 2263 if err != nil { 2264 return InboundNatRuleResponse{}, err 2265 } 2266 respType.RawResponse = resp 2267 return respType, nil 2268} 2269 2270func (p *inboundNatRulePoller) ResumeToken() (string, error) { 2271 return p.pt.ResumeToken() 2272} 2273 2274func (p *inboundNatRulePoller) pollUntilDone(ctx context.Context, freq time.Duration) (InboundNatRuleResponse, error) { 2275 respType := InboundNatRuleResponse{InboundNatRule: &InboundNatRule{}} 2276 resp, err := p.pt.PollUntilDone(ctx, freq, respType.InboundNatRule) 2277 if err != nil { 2278 return InboundNatRuleResponse{}, err 2279 } 2280 respType.RawResponse = resp 2281 return respType, nil 2282} 2283 2284// InboundSecurityRulePoller provides polling facilities until the operation reaches a terminal state. 2285type InboundSecurityRulePoller interface { 2286 azcore.Poller 2287 // FinalResponse performs a final GET to the service and returns the final response 2288 // for the polling operation. If there is an error performing the final GET then an error is returned. 2289 // If the final GET succeeded then the final InboundSecurityRuleResponse will be returned. 2290 FinalResponse(ctx context.Context) (InboundSecurityRuleResponse, error) 2291} 2292 2293type inboundSecurityRulePoller struct { 2294 pt *armcore.LROPoller 2295} 2296 2297func (p *inboundSecurityRulePoller) Done() bool { 2298 return p.pt.Done() 2299} 2300 2301func (p *inboundSecurityRulePoller) Poll(ctx context.Context) (*http.Response, error) { 2302 return p.pt.Poll(ctx) 2303} 2304 2305func (p *inboundSecurityRulePoller) FinalResponse(ctx context.Context) (InboundSecurityRuleResponse, error) { 2306 respType := InboundSecurityRuleResponse{InboundSecurityRule: &InboundSecurityRule{}} 2307 resp, err := p.pt.FinalResponse(ctx, respType.InboundSecurityRule) 2308 if err != nil { 2309 return InboundSecurityRuleResponse{}, err 2310 } 2311 respType.RawResponse = resp 2312 return respType, nil 2313} 2314 2315func (p *inboundSecurityRulePoller) ResumeToken() (string, error) { 2316 return p.pt.ResumeToken() 2317} 2318 2319func (p *inboundSecurityRulePoller) pollUntilDone(ctx context.Context, freq time.Duration) (InboundSecurityRuleResponse, error) { 2320 respType := InboundSecurityRuleResponse{InboundSecurityRule: &InboundSecurityRule{}} 2321 resp, err := p.pt.PollUntilDone(ctx, freq, respType.InboundSecurityRule) 2322 if err != nil { 2323 return InboundSecurityRuleResponse{}, err 2324 } 2325 respType.RawResponse = resp 2326 return respType, nil 2327} 2328 2329// LoadBalancerPoller provides polling facilities until the operation reaches a terminal state. 2330type LoadBalancerPoller interface { 2331 azcore.Poller 2332 // FinalResponse performs a final GET to the service and returns the final response 2333 // for the polling operation. If there is an error performing the final GET then an error is returned. 2334 // If the final GET succeeded then the final LoadBalancerResponse will be returned. 2335 FinalResponse(ctx context.Context) (LoadBalancerResponse, error) 2336} 2337 2338type loadBalancerPoller struct { 2339 pt *armcore.LROPoller 2340} 2341 2342func (p *loadBalancerPoller) Done() bool { 2343 return p.pt.Done() 2344} 2345 2346func (p *loadBalancerPoller) Poll(ctx context.Context) (*http.Response, error) { 2347 return p.pt.Poll(ctx) 2348} 2349 2350func (p *loadBalancerPoller) FinalResponse(ctx context.Context) (LoadBalancerResponse, error) { 2351 respType := LoadBalancerResponse{LoadBalancer: &LoadBalancer{}} 2352 resp, err := p.pt.FinalResponse(ctx, respType.LoadBalancer) 2353 if err != nil { 2354 return LoadBalancerResponse{}, err 2355 } 2356 respType.RawResponse = resp 2357 return respType, nil 2358} 2359 2360func (p *loadBalancerPoller) ResumeToken() (string, error) { 2361 return p.pt.ResumeToken() 2362} 2363 2364func (p *loadBalancerPoller) pollUntilDone(ctx context.Context, freq time.Duration) (LoadBalancerResponse, error) { 2365 respType := LoadBalancerResponse{LoadBalancer: &LoadBalancer{}} 2366 resp, err := p.pt.PollUntilDone(ctx, freq, respType.LoadBalancer) 2367 if err != nil { 2368 return LoadBalancerResponse{}, err 2369 } 2370 respType.RawResponse = resp 2371 return respType, nil 2372} 2373 2374// LocalNetworkGatewayPoller provides polling facilities until the operation reaches a terminal state. 2375type LocalNetworkGatewayPoller interface { 2376 azcore.Poller 2377 // FinalResponse performs a final GET to the service and returns the final response 2378 // for the polling operation. If there is an error performing the final GET then an error is returned. 2379 // If the final GET succeeded then the final LocalNetworkGatewayResponse will be returned. 2380 FinalResponse(ctx context.Context) (LocalNetworkGatewayResponse, error) 2381} 2382 2383type localNetworkGatewayPoller struct { 2384 pt *armcore.LROPoller 2385} 2386 2387func (p *localNetworkGatewayPoller) Done() bool { 2388 return p.pt.Done() 2389} 2390 2391func (p *localNetworkGatewayPoller) Poll(ctx context.Context) (*http.Response, error) { 2392 return p.pt.Poll(ctx) 2393} 2394 2395func (p *localNetworkGatewayPoller) FinalResponse(ctx context.Context) (LocalNetworkGatewayResponse, error) { 2396 respType := LocalNetworkGatewayResponse{LocalNetworkGateway: &LocalNetworkGateway{}} 2397 resp, err := p.pt.FinalResponse(ctx, respType.LocalNetworkGateway) 2398 if err != nil { 2399 return LocalNetworkGatewayResponse{}, err 2400 } 2401 respType.RawResponse = resp 2402 return respType, nil 2403} 2404 2405func (p *localNetworkGatewayPoller) ResumeToken() (string, error) { 2406 return p.pt.ResumeToken() 2407} 2408 2409func (p *localNetworkGatewayPoller) pollUntilDone(ctx context.Context, freq time.Duration) (LocalNetworkGatewayResponse, error) { 2410 respType := LocalNetworkGatewayResponse{LocalNetworkGateway: &LocalNetworkGateway{}} 2411 resp, err := p.pt.PollUntilDone(ctx, freq, respType.LocalNetworkGateway) 2412 if err != nil { 2413 return LocalNetworkGatewayResponse{}, err 2414 } 2415 respType.RawResponse = resp 2416 return respType, nil 2417} 2418 2419// NatGatewayPoller provides polling facilities until the operation reaches a terminal state. 2420type NatGatewayPoller interface { 2421 azcore.Poller 2422 // FinalResponse performs a final GET to the service and returns the final response 2423 // for the polling operation. If there is an error performing the final GET then an error is returned. 2424 // If the final GET succeeded then the final NatGatewayResponse will be returned. 2425 FinalResponse(ctx context.Context) (NatGatewayResponse, error) 2426} 2427 2428type natGatewayPoller struct { 2429 pt *armcore.LROPoller 2430} 2431 2432func (p *natGatewayPoller) Done() bool { 2433 return p.pt.Done() 2434} 2435 2436func (p *natGatewayPoller) Poll(ctx context.Context) (*http.Response, error) { 2437 return p.pt.Poll(ctx) 2438} 2439 2440func (p *natGatewayPoller) FinalResponse(ctx context.Context) (NatGatewayResponse, error) { 2441 respType := NatGatewayResponse{NatGateway: &NatGateway{}} 2442 resp, err := p.pt.FinalResponse(ctx, respType.NatGateway) 2443 if err != nil { 2444 return NatGatewayResponse{}, err 2445 } 2446 respType.RawResponse = resp 2447 return respType, nil 2448} 2449 2450func (p *natGatewayPoller) ResumeToken() (string, error) { 2451 return p.pt.ResumeToken() 2452} 2453 2454func (p *natGatewayPoller) pollUntilDone(ctx context.Context, freq time.Duration) (NatGatewayResponse, error) { 2455 respType := NatGatewayResponse{NatGateway: &NatGateway{}} 2456 resp, err := p.pt.PollUntilDone(ctx, freq, respType.NatGateway) 2457 if err != nil { 2458 return NatGatewayResponse{}, err 2459 } 2460 respType.RawResponse = resp 2461 return respType, nil 2462} 2463 2464// NetworkConfigurationDiagnosticResponsePoller provides polling facilities until the operation reaches a terminal state. 2465type NetworkConfigurationDiagnosticResponsePoller interface { 2466 azcore.Poller 2467 // FinalResponse performs a final GET to the service and returns the final response 2468 // for the polling operation. If there is an error performing the final GET then an error is returned. 2469 // If the final GET succeeded then the final NetworkConfigurationDiagnosticResponseResponse will be returned. 2470 FinalResponse(ctx context.Context) (NetworkConfigurationDiagnosticResponseResponse, error) 2471} 2472 2473type networkConfigurationDiagnosticResponsePoller struct { 2474 pt *armcore.LROPoller 2475} 2476 2477func (p *networkConfigurationDiagnosticResponsePoller) Done() bool { 2478 return p.pt.Done() 2479} 2480 2481func (p *networkConfigurationDiagnosticResponsePoller) Poll(ctx context.Context) (*http.Response, error) { 2482 return p.pt.Poll(ctx) 2483} 2484 2485func (p *networkConfigurationDiagnosticResponsePoller) FinalResponse(ctx context.Context) (NetworkConfigurationDiagnosticResponseResponse, error) { 2486 respType := NetworkConfigurationDiagnosticResponseResponse{NetworkConfigurationDiagnosticResponse: &NetworkConfigurationDiagnosticResponse{}} 2487 resp, err := p.pt.FinalResponse(ctx, respType.NetworkConfigurationDiagnosticResponse) 2488 if err != nil { 2489 return NetworkConfigurationDiagnosticResponseResponse{}, err 2490 } 2491 respType.RawResponse = resp 2492 return respType, nil 2493} 2494 2495func (p *networkConfigurationDiagnosticResponsePoller) ResumeToken() (string, error) { 2496 return p.pt.ResumeToken() 2497} 2498 2499func (p *networkConfigurationDiagnosticResponsePoller) pollUntilDone(ctx context.Context, freq time.Duration) (NetworkConfigurationDiagnosticResponseResponse, error) { 2500 respType := NetworkConfigurationDiagnosticResponseResponse{NetworkConfigurationDiagnosticResponse: &NetworkConfigurationDiagnosticResponse{}} 2501 resp, err := p.pt.PollUntilDone(ctx, freq, respType.NetworkConfigurationDiagnosticResponse) 2502 if err != nil { 2503 return NetworkConfigurationDiagnosticResponseResponse{}, err 2504 } 2505 respType.RawResponse = resp 2506 return respType, nil 2507} 2508 2509// NetworkInterfacePoller provides polling facilities until the operation reaches a terminal state. 2510type NetworkInterfacePoller interface { 2511 azcore.Poller 2512 // FinalResponse performs a final GET to the service and returns the final response 2513 // for the polling operation. If there is an error performing the final GET then an error is returned. 2514 // If the final GET succeeded then the final NetworkInterfaceResponse will be returned. 2515 FinalResponse(ctx context.Context) (NetworkInterfaceResponse, error) 2516} 2517 2518type networkInterfacePoller struct { 2519 pt *armcore.LROPoller 2520} 2521 2522func (p *networkInterfacePoller) Done() bool { 2523 return p.pt.Done() 2524} 2525 2526func (p *networkInterfacePoller) Poll(ctx context.Context) (*http.Response, error) { 2527 return p.pt.Poll(ctx) 2528} 2529 2530func (p *networkInterfacePoller) FinalResponse(ctx context.Context) (NetworkInterfaceResponse, error) { 2531 respType := NetworkInterfaceResponse{NetworkInterface: &NetworkInterface{}} 2532 resp, err := p.pt.FinalResponse(ctx, respType.NetworkInterface) 2533 if err != nil { 2534 return NetworkInterfaceResponse{}, err 2535 } 2536 respType.RawResponse = resp 2537 return respType, nil 2538} 2539 2540func (p *networkInterfacePoller) ResumeToken() (string, error) { 2541 return p.pt.ResumeToken() 2542} 2543 2544func (p *networkInterfacePoller) pollUntilDone(ctx context.Context, freq time.Duration) (NetworkInterfaceResponse, error) { 2545 respType := NetworkInterfaceResponse{NetworkInterface: &NetworkInterface{}} 2546 resp, err := p.pt.PollUntilDone(ctx, freq, respType.NetworkInterface) 2547 if err != nil { 2548 return NetworkInterfaceResponse{}, err 2549 } 2550 respType.RawResponse = resp 2551 return respType, nil 2552} 2553 2554// NetworkInterfaceTapConfigurationPoller provides polling facilities until the operation reaches a terminal state. 2555type NetworkInterfaceTapConfigurationPoller interface { 2556 azcore.Poller 2557 // FinalResponse performs a final GET to the service and returns the final response 2558 // for the polling operation. If there is an error performing the final GET then an error is returned. 2559 // If the final GET succeeded then the final NetworkInterfaceTapConfigurationResponse will be returned. 2560 FinalResponse(ctx context.Context) (NetworkInterfaceTapConfigurationResponse, error) 2561} 2562 2563type networkInterfaceTapConfigurationPoller struct { 2564 pt *armcore.LROPoller 2565} 2566 2567func (p *networkInterfaceTapConfigurationPoller) Done() bool { 2568 return p.pt.Done() 2569} 2570 2571func (p *networkInterfaceTapConfigurationPoller) Poll(ctx context.Context) (*http.Response, error) { 2572 return p.pt.Poll(ctx) 2573} 2574 2575func (p *networkInterfaceTapConfigurationPoller) FinalResponse(ctx context.Context) (NetworkInterfaceTapConfigurationResponse, error) { 2576 respType := NetworkInterfaceTapConfigurationResponse{NetworkInterfaceTapConfiguration: &NetworkInterfaceTapConfiguration{}} 2577 resp, err := p.pt.FinalResponse(ctx, respType.NetworkInterfaceTapConfiguration) 2578 if err != nil { 2579 return NetworkInterfaceTapConfigurationResponse{}, err 2580 } 2581 respType.RawResponse = resp 2582 return respType, nil 2583} 2584 2585func (p *networkInterfaceTapConfigurationPoller) ResumeToken() (string, error) { 2586 return p.pt.ResumeToken() 2587} 2588 2589func (p *networkInterfaceTapConfigurationPoller) pollUntilDone(ctx context.Context, freq time.Duration) (NetworkInterfaceTapConfigurationResponse, error) { 2590 respType := NetworkInterfaceTapConfigurationResponse{NetworkInterfaceTapConfiguration: &NetworkInterfaceTapConfiguration{}} 2591 resp, err := p.pt.PollUntilDone(ctx, freq, respType.NetworkInterfaceTapConfiguration) 2592 if err != nil { 2593 return NetworkInterfaceTapConfigurationResponse{}, err 2594 } 2595 respType.RawResponse = resp 2596 return respType, nil 2597} 2598 2599// NetworkSecurityGroupPoller provides polling facilities until the operation reaches a terminal state. 2600type NetworkSecurityGroupPoller interface { 2601 azcore.Poller 2602 // FinalResponse performs a final GET to the service and returns the final response 2603 // for the polling operation. If there is an error performing the final GET then an error is returned. 2604 // If the final GET succeeded then the final NetworkSecurityGroupResponse will be returned. 2605 FinalResponse(ctx context.Context) (NetworkSecurityGroupResponse, error) 2606} 2607 2608type networkSecurityGroupPoller struct { 2609 pt *armcore.LROPoller 2610} 2611 2612func (p *networkSecurityGroupPoller) Done() bool { 2613 return p.pt.Done() 2614} 2615 2616func (p *networkSecurityGroupPoller) Poll(ctx context.Context) (*http.Response, error) { 2617 return p.pt.Poll(ctx) 2618} 2619 2620func (p *networkSecurityGroupPoller) FinalResponse(ctx context.Context) (NetworkSecurityGroupResponse, error) { 2621 respType := NetworkSecurityGroupResponse{NetworkSecurityGroup: &NetworkSecurityGroup{}} 2622 resp, err := p.pt.FinalResponse(ctx, respType.NetworkSecurityGroup) 2623 if err != nil { 2624 return NetworkSecurityGroupResponse{}, err 2625 } 2626 respType.RawResponse = resp 2627 return respType, nil 2628} 2629 2630func (p *networkSecurityGroupPoller) ResumeToken() (string, error) { 2631 return p.pt.ResumeToken() 2632} 2633 2634func (p *networkSecurityGroupPoller) pollUntilDone(ctx context.Context, freq time.Duration) (NetworkSecurityGroupResponse, error) { 2635 respType := NetworkSecurityGroupResponse{NetworkSecurityGroup: &NetworkSecurityGroup{}} 2636 resp, err := p.pt.PollUntilDone(ctx, freq, respType.NetworkSecurityGroup) 2637 if err != nil { 2638 return NetworkSecurityGroupResponse{}, err 2639 } 2640 respType.RawResponse = resp 2641 return respType, nil 2642} 2643 2644// NetworkVirtualAppliancePoller provides polling facilities until the operation reaches a terminal state. 2645type NetworkVirtualAppliancePoller interface { 2646 azcore.Poller 2647 // FinalResponse performs a final GET to the service and returns the final response 2648 // for the polling operation. If there is an error performing the final GET then an error is returned. 2649 // If the final GET succeeded then the final NetworkVirtualApplianceResponse will be returned. 2650 FinalResponse(ctx context.Context) (NetworkVirtualApplianceResponse, error) 2651} 2652 2653type networkVirtualAppliancePoller struct { 2654 pt *armcore.LROPoller 2655} 2656 2657func (p *networkVirtualAppliancePoller) Done() bool { 2658 return p.pt.Done() 2659} 2660 2661func (p *networkVirtualAppliancePoller) Poll(ctx context.Context) (*http.Response, error) { 2662 return p.pt.Poll(ctx) 2663} 2664 2665func (p *networkVirtualAppliancePoller) FinalResponse(ctx context.Context) (NetworkVirtualApplianceResponse, error) { 2666 respType := NetworkVirtualApplianceResponse{NetworkVirtualAppliance: &NetworkVirtualAppliance{}} 2667 resp, err := p.pt.FinalResponse(ctx, respType.NetworkVirtualAppliance) 2668 if err != nil { 2669 return NetworkVirtualApplianceResponse{}, err 2670 } 2671 respType.RawResponse = resp 2672 return respType, nil 2673} 2674 2675func (p *networkVirtualAppliancePoller) ResumeToken() (string, error) { 2676 return p.pt.ResumeToken() 2677} 2678 2679func (p *networkVirtualAppliancePoller) pollUntilDone(ctx context.Context, freq time.Duration) (NetworkVirtualApplianceResponse, error) { 2680 respType := NetworkVirtualApplianceResponse{NetworkVirtualAppliance: &NetworkVirtualAppliance{}} 2681 resp, err := p.pt.PollUntilDone(ctx, freq, respType.NetworkVirtualAppliance) 2682 if err != nil { 2683 return NetworkVirtualApplianceResponse{}, err 2684 } 2685 respType.RawResponse = resp 2686 return respType, nil 2687} 2688 2689// NextHopResultPoller provides polling facilities until the operation reaches a terminal state. 2690type NextHopResultPoller interface { 2691 azcore.Poller 2692 // FinalResponse performs a final GET to the service and returns the final response 2693 // for the polling operation. If there is an error performing the final GET then an error is returned. 2694 // If the final GET succeeded then the final NextHopResultResponse will be returned. 2695 FinalResponse(ctx context.Context) (NextHopResultResponse, error) 2696} 2697 2698type nextHopResultPoller struct { 2699 pt *armcore.LROPoller 2700} 2701 2702func (p *nextHopResultPoller) Done() bool { 2703 return p.pt.Done() 2704} 2705 2706func (p *nextHopResultPoller) Poll(ctx context.Context) (*http.Response, error) { 2707 return p.pt.Poll(ctx) 2708} 2709 2710func (p *nextHopResultPoller) FinalResponse(ctx context.Context) (NextHopResultResponse, error) { 2711 respType := NextHopResultResponse{NextHopResult: &NextHopResult{}} 2712 resp, err := p.pt.FinalResponse(ctx, respType.NextHopResult) 2713 if err != nil { 2714 return NextHopResultResponse{}, err 2715 } 2716 respType.RawResponse = resp 2717 return respType, nil 2718} 2719 2720func (p *nextHopResultPoller) ResumeToken() (string, error) { 2721 return p.pt.ResumeToken() 2722} 2723 2724func (p *nextHopResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (NextHopResultResponse, error) { 2725 respType := NextHopResultResponse{NextHopResult: &NextHopResult{}} 2726 resp, err := p.pt.PollUntilDone(ctx, freq, respType.NextHopResult) 2727 if err != nil { 2728 return NextHopResultResponse{}, err 2729 } 2730 respType.RawResponse = resp 2731 return respType, nil 2732} 2733 2734// P2SVPNConnectionHealthPoller provides polling facilities until the operation reaches a terminal state. 2735type P2SVPNConnectionHealthPoller interface { 2736 azcore.Poller 2737 // FinalResponse performs a final GET to the service and returns the final response 2738 // for the polling operation. If there is an error performing the final GET then an error is returned. 2739 // If the final GET succeeded then the final P2SVPNConnectionHealthResponse will be returned. 2740 FinalResponse(ctx context.Context) (P2SVPNConnectionHealthResponse, error) 2741} 2742 2743type p2SVPNConnectionHealthPoller struct { 2744 pt *armcore.LROPoller 2745} 2746 2747func (p *p2SVPNConnectionHealthPoller) Done() bool { 2748 return p.pt.Done() 2749} 2750 2751func (p *p2SVPNConnectionHealthPoller) Poll(ctx context.Context) (*http.Response, error) { 2752 return p.pt.Poll(ctx) 2753} 2754 2755func (p *p2SVPNConnectionHealthPoller) FinalResponse(ctx context.Context) (P2SVPNConnectionHealthResponse, error) { 2756 respType := P2SVPNConnectionHealthResponse{P2SVPNConnectionHealth: &P2SVPNConnectionHealth{}} 2757 resp, err := p.pt.FinalResponse(ctx, respType.P2SVPNConnectionHealth) 2758 if err != nil { 2759 return P2SVPNConnectionHealthResponse{}, err 2760 } 2761 respType.RawResponse = resp 2762 return respType, nil 2763} 2764 2765func (p *p2SVPNConnectionHealthPoller) ResumeToken() (string, error) { 2766 return p.pt.ResumeToken() 2767} 2768 2769func (p *p2SVPNConnectionHealthPoller) pollUntilDone(ctx context.Context, freq time.Duration) (P2SVPNConnectionHealthResponse, error) { 2770 respType := P2SVPNConnectionHealthResponse{P2SVPNConnectionHealth: &P2SVPNConnectionHealth{}} 2771 resp, err := p.pt.PollUntilDone(ctx, freq, respType.P2SVPNConnectionHealth) 2772 if err != nil { 2773 return P2SVPNConnectionHealthResponse{}, err 2774 } 2775 respType.RawResponse = resp 2776 return respType, nil 2777} 2778 2779// P2SVPNGatewayPoller provides polling facilities until the operation reaches a terminal state. 2780type P2SVPNGatewayPoller interface { 2781 azcore.Poller 2782 // FinalResponse performs a final GET to the service and returns the final response 2783 // for the polling operation. If there is an error performing the final GET then an error is returned. 2784 // If the final GET succeeded then the final P2SVPNGatewayResponse will be returned. 2785 FinalResponse(ctx context.Context) (P2SVPNGatewayResponse, error) 2786} 2787 2788type p2SVPNGatewayPoller struct { 2789 pt *armcore.LROPoller 2790} 2791 2792func (p *p2SVPNGatewayPoller) Done() bool { 2793 return p.pt.Done() 2794} 2795 2796func (p *p2SVPNGatewayPoller) Poll(ctx context.Context) (*http.Response, error) { 2797 return p.pt.Poll(ctx) 2798} 2799 2800func (p *p2SVPNGatewayPoller) FinalResponse(ctx context.Context) (P2SVPNGatewayResponse, error) { 2801 respType := P2SVPNGatewayResponse{P2SVPNGateway: &P2SVPNGateway{}} 2802 resp, err := p.pt.FinalResponse(ctx, respType.P2SVPNGateway) 2803 if err != nil { 2804 return P2SVPNGatewayResponse{}, err 2805 } 2806 respType.RawResponse = resp 2807 return respType, nil 2808} 2809 2810func (p *p2SVPNGatewayPoller) ResumeToken() (string, error) { 2811 return p.pt.ResumeToken() 2812} 2813 2814func (p *p2SVPNGatewayPoller) pollUntilDone(ctx context.Context, freq time.Duration) (P2SVPNGatewayResponse, error) { 2815 respType := P2SVPNGatewayResponse{P2SVPNGateway: &P2SVPNGateway{}} 2816 resp, err := p.pt.PollUntilDone(ctx, freq, respType.P2SVPNGateway) 2817 if err != nil { 2818 return P2SVPNGatewayResponse{}, err 2819 } 2820 respType.RawResponse = resp 2821 return respType, nil 2822} 2823 2824// PacketCaptureQueryStatusResultPoller provides polling facilities until the operation reaches a terminal state. 2825type PacketCaptureQueryStatusResultPoller interface { 2826 azcore.Poller 2827 // FinalResponse performs a final GET to the service and returns the final response 2828 // for the polling operation. If there is an error performing the final GET then an error is returned. 2829 // If the final GET succeeded then the final PacketCaptureQueryStatusResultResponse will be returned. 2830 FinalResponse(ctx context.Context) (PacketCaptureQueryStatusResultResponse, error) 2831} 2832 2833type packetCaptureQueryStatusResultPoller struct { 2834 pt *armcore.LROPoller 2835} 2836 2837func (p *packetCaptureQueryStatusResultPoller) Done() bool { 2838 return p.pt.Done() 2839} 2840 2841func (p *packetCaptureQueryStatusResultPoller) Poll(ctx context.Context) (*http.Response, error) { 2842 return p.pt.Poll(ctx) 2843} 2844 2845func (p *packetCaptureQueryStatusResultPoller) FinalResponse(ctx context.Context) (PacketCaptureQueryStatusResultResponse, error) { 2846 respType := PacketCaptureQueryStatusResultResponse{PacketCaptureQueryStatusResult: &PacketCaptureQueryStatusResult{}} 2847 resp, err := p.pt.FinalResponse(ctx, respType.PacketCaptureQueryStatusResult) 2848 if err != nil { 2849 return PacketCaptureQueryStatusResultResponse{}, err 2850 } 2851 respType.RawResponse = resp 2852 return respType, nil 2853} 2854 2855func (p *packetCaptureQueryStatusResultPoller) ResumeToken() (string, error) { 2856 return p.pt.ResumeToken() 2857} 2858 2859func (p *packetCaptureQueryStatusResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (PacketCaptureQueryStatusResultResponse, error) { 2860 respType := PacketCaptureQueryStatusResultResponse{PacketCaptureQueryStatusResult: &PacketCaptureQueryStatusResult{}} 2861 resp, err := p.pt.PollUntilDone(ctx, freq, respType.PacketCaptureQueryStatusResult) 2862 if err != nil { 2863 return PacketCaptureQueryStatusResultResponse{}, err 2864 } 2865 respType.RawResponse = resp 2866 return respType, nil 2867} 2868 2869// PacketCaptureResultPoller provides polling facilities until the operation reaches a terminal state. 2870type PacketCaptureResultPoller interface { 2871 azcore.Poller 2872 // FinalResponse performs a final GET to the service and returns the final response 2873 // for the polling operation. If there is an error performing the final GET then an error is returned. 2874 // If the final GET succeeded then the final PacketCaptureResultResponse will be returned. 2875 FinalResponse(ctx context.Context) (PacketCaptureResultResponse, error) 2876} 2877 2878type packetCaptureResultPoller struct { 2879 pt *armcore.LROPoller 2880} 2881 2882func (p *packetCaptureResultPoller) Done() bool { 2883 return p.pt.Done() 2884} 2885 2886func (p *packetCaptureResultPoller) Poll(ctx context.Context) (*http.Response, error) { 2887 return p.pt.Poll(ctx) 2888} 2889 2890func (p *packetCaptureResultPoller) FinalResponse(ctx context.Context) (PacketCaptureResultResponse, error) { 2891 respType := PacketCaptureResultResponse{PacketCaptureResult: &PacketCaptureResult{}} 2892 resp, err := p.pt.FinalResponse(ctx, respType.PacketCaptureResult) 2893 if err != nil { 2894 return PacketCaptureResultResponse{}, err 2895 } 2896 respType.RawResponse = resp 2897 return respType, nil 2898} 2899 2900func (p *packetCaptureResultPoller) ResumeToken() (string, error) { 2901 return p.pt.ResumeToken() 2902} 2903 2904func (p *packetCaptureResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (PacketCaptureResultResponse, error) { 2905 respType := PacketCaptureResultResponse{PacketCaptureResult: &PacketCaptureResult{}} 2906 resp, err := p.pt.PollUntilDone(ctx, freq, respType.PacketCaptureResult) 2907 if err != nil { 2908 return PacketCaptureResultResponse{}, err 2909 } 2910 respType.RawResponse = resp 2911 return respType, nil 2912} 2913 2914// PeerRouteListPoller provides polling facilities until the operation reaches a terminal state. 2915type PeerRouteListPoller interface { 2916 azcore.Poller 2917 // FinalResponse performs a final GET to the service and returns the final response 2918 // for the polling operation. If there is an error performing the final GET then an error is returned. 2919 // If the final GET succeeded then the final PeerRouteListResponse will be returned. 2920 FinalResponse(ctx context.Context) (PeerRouteListResponse, error) 2921} 2922 2923type peerRouteListPoller struct { 2924 pt *armcore.LROPoller 2925} 2926 2927func (p *peerRouteListPoller) Done() bool { 2928 return p.pt.Done() 2929} 2930 2931func (p *peerRouteListPoller) Poll(ctx context.Context) (*http.Response, error) { 2932 return p.pt.Poll(ctx) 2933} 2934 2935func (p *peerRouteListPoller) FinalResponse(ctx context.Context) (PeerRouteListResponse, error) { 2936 respType := PeerRouteListResponse{PeerRouteList: &PeerRouteList{}} 2937 resp, err := p.pt.FinalResponse(ctx, respType.PeerRouteList) 2938 if err != nil { 2939 return PeerRouteListResponse{}, err 2940 } 2941 respType.RawResponse = resp 2942 return respType, nil 2943} 2944 2945func (p *peerRouteListPoller) ResumeToken() (string, error) { 2946 return p.pt.ResumeToken() 2947} 2948 2949func (p *peerRouteListPoller) pollUntilDone(ctx context.Context, freq time.Duration) (PeerRouteListResponse, error) { 2950 respType := PeerRouteListResponse{PeerRouteList: &PeerRouteList{}} 2951 resp, err := p.pt.PollUntilDone(ctx, freq, respType.PeerRouteList) 2952 if err != nil { 2953 return PeerRouteListResponse{}, err 2954 } 2955 respType.RawResponse = resp 2956 return respType, nil 2957} 2958 2959// PrivateDNSZoneGroupPoller provides polling facilities until the operation reaches a terminal state. 2960type PrivateDNSZoneGroupPoller interface { 2961 azcore.Poller 2962 // FinalResponse performs a final GET to the service and returns the final response 2963 // for the polling operation. If there is an error performing the final GET then an error is returned. 2964 // If the final GET succeeded then the final PrivateDNSZoneGroupResponse will be returned. 2965 FinalResponse(ctx context.Context) (PrivateDNSZoneGroupResponse, error) 2966} 2967 2968type privateDNSZoneGroupPoller struct { 2969 pt *armcore.LROPoller 2970} 2971 2972func (p *privateDNSZoneGroupPoller) Done() bool { 2973 return p.pt.Done() 2974} 2975 2976func (p *privateDNSZoneGroupPoller) Poll(ctx context.Context) (*http.Response, error) { 2977 return p.pt.Poll(ctx) 2978} 2979 2980func (p *privateDNSZoneGroupPoller) FinalResponse(ctx context.Context) (PrivateDNSZoneGroupResponse, error) { 2981 respType := PrivateDNSZoneGroupResponse{PrivateDNSZoneGroup: &PrivateDNSZoneGroup{}} 2982 resp, err := p.pt.FinalResponse(ctx, respType.PrivateDNSZoneGroup) 2983 if err != nil { 2984 return PrivateDNSZoneGroupResponse{}, err 2985 } 2986 respType.RawResponse = resp 2987 return respType, nil 2988} 2989 2990func (p *privateDNSZoneGroupPoller) ResumeToken() (string, error) { 2991 return p.pt.ResumeToken() 2992} 2993 2994func (p *privateDNSZoneGroupPoller) pollUntilDone(ctx context.Context, freq time.Duration) (PrivateDNSZoneGroupResponse, error) { 2995 respType := PrivateDNSZoneGroupResponse{PrivateDNSZoneGroup: &PrivateDNSZoneGroup{}} 2996 resp, err := p.pt.PollUntilDone(ctx, freq, respType.PrivateDNSZoneGroup) 2997 if err != nil { 2998 return PrivateDNSZoneGroupResponse{}, err 2999 } 3000 respType.RawResponse = resp 3001 return respType, nil 3002} 3003 3004// PrivateEndpointPoller provides polling facilities until the operation reaches a terminal state. 3005type PrivateEndpointPoller interface { 3006 azcore.Poller 3007 // FinalResponse performs a final GET to the service and returns the final response 3008 // for the polling operation. If there is an error performing the final GET then an error is returned. 3009 // If the final GET succeeded then the final PrivateEndpointResponse will be returned. 3010 FinalResponse(ctx context.Context) (PrivateEndpointResponse, error) 3011} 3012 3013type privateEndpointPoller struct { 3014 pt *armcore.LROPoller 3015} 3016 3017func (p *privateEndpointPoller) Done() bool { 3018 return p.pt.Done() 3019} 3020 3021func (p *privateEndpointPoller) Poll(ctx context.Context) (*http.Response, error) { 3022 return p.pt.Poll(ctx) 3023} 3024 3025func (p *privateEndpointPoller) FinalResponse(ctx context.Context) (PrivateEndpointResponse, error) { 3026 respType := PrivateEndpointResponse{PrivateEndpoint: &PrivateEndpoint{}} 3027 resp, err := p.pt.FinalResponse(ctx, respType.PrivateEndpoint) 3028 if err != nil { 3029 return PrivateEndpointResponse{}, err 3030 } 3031 respType.RawResponse = resp 3032 return respType, nil 3033} 3034 3035func (p *privateEndpointPoller) ResumeToken() (string, error) { 3036 return p.pt.ResumeToken() 3037} 3038 3039func (p *privateEndpointPoller) pollUntilDone(ctx context.Context, freq time.Duration) (PrivateEndpointResponse, error) { 3040 respType := PrivateEndpointResponse{PrivateEndpoint: &PrivateEndpoint{}} 3041 resp, err := p.pt.PollUntilDone(ctx, freq, respType.PrivateEndpoint) 3042 if err != nil { 3043 return PrivateEndpointResponse{}, err 3044 } 3045 respType.RawResponse = resp 3046 return respType, nil 3047} 3048 3049// PrivateLinkServicePoller provides polling facilities until the operation reaches a terminal state. 3050type PrivateLinkServicePoller interface { 3051 azcore.Poller 3052 // FinalResponse performs a final GET to the service and returns the final response 3053 // for the polling operation. If there is an error performing the final GET then an error is returned. 3054 // If the final GET succeeded then the final PrivateLinkServiceResponse will be returned. 3055 FinalResponse(ctx context.Context) (PrivateLinkServiceResponse, error) 3056} 3057 3058type privateLinkServicePoller struct { 3059 pt *armcore.LROPoller 3060} 3061 3062func (p *privateLinkServicePoller) Done() bool { 3063 return p.pt.Done() 3064} 3065 3066func (p *privateLinkServicePoller) Poll(ctx context.Context) (*http.Response, error) { 3067 return p.pt.Poll(ctx) 3068} 3069 3070func (p *privateLinkServicePoller) FinalResponse(ctx context.Context) (PrivateLinkServiceResponse, error) { 3071 respType := PrivateLinkServiceResponse{PrivateLinkService: &PrivateLinkService{}} 3072 resp, err := p.pt.FinalResponse(ctx, respType.PrivateLinkService) 3073 if err != nil { 3074 return PrivateLinkServiceResponse{}, err 3075 } 3076 respType.RawResponse = resp 3077 return respType, nil 3078} 3079 3080func (p *privateLinkServicePoller) ResumeToken() (string, error) { 3081 return p.pt.ResumeToken() 3082} 3083 3084func (p *privateLinkServicePoller) pollUntilDone(ctx context.Context, freq time.Duration) (PrivateLinkServiceResponse, error) { 3085 respType := PrivateLinkServiceResponse{PrivateLinkService: &PrivateLinkService{}} 3086 resp, err := p.pt.PollUntilDone(ctx, freq, respType.PrivateLinkService) 3087 if err != nil { 3088 return PrivateLinkServiceResponse{}, err 3089 } 3090 respType.RawResponse = resp 3091 return respType, nil 3092} 3093 3094// PrivateLinkServiceVisibilityPoller provides polling facilities until the operation reaches a terminal state. 3095type PrivateLinkServiceVisibilityPoller interface { 3096 azcore.Poller 3097 // FinalResponse performs a final GET to the service and returns the final response 3098 // for the polling operation. If there is an error performing the final GET then an error is returned. 3099 // If the final GET succeeded then the final PrivateLinkServiceVisibilityResponse will be returned. 3100 FinalResponse(ctx context.Context) (PrivateLinkServiceVisibilityResponse, error) 3101} 3102 3103type privateLinkServiceVisibilityPoller struct { 3104 pt *armcore.LROPoller 3105} 3106 3107func (p *privateLinkServiceVisibilityPoller) Done() bool { 3108 return p.pt.Done() 3109} 3110 3111func (p *privateLinkServiceVisibilityPoller) Poll(ctx context.Context) (*http.Response, error) { 3112 return p.pt.Poll(ctx) 3113} 3114 3115func (p *privateLinkServiceVisibilityPoller) FinalResponse(ctx context.Context) (PrivateLinkServiceVisibilityResponse, error) { 3116 respType := PrivateLinkServiceVisibilityResponse{PrivateLinkServiceVisibility: &PrivateLinkServiceVisibility{}} 3117 resp, err := p.pt.FinalResponse(ctx, respType.PrivateLinkServiceVisibility) 3118 if err != nil { 3119 return PrivateLinkServiceVisibilityResponse{}, err 3120 } 3121 respType.RawResponse = resp 3122 return respType, nil 3123} 3124 3125func (p *privateLinkServiceVisibilityPoller) ResumeToken() (string, error) { 3126 return p.pt.ResumeToken() 3127} 3128 3129func (p *privateLinkServiceVisibilityPoller) pollUntilDone(ctx context.Context, freq time.Duration) (PrivateLinkServiceVisibilityResponse, error) { 3130 respType := PrivateLinkServiceVisibilityResponse{PrivateLinkServiceVisibility: &PrivateLinkServiceVisibility{}} 3131 resp, err := p.pt.PollUntilDone(ctx, freq, respType.PrivateLinkServiceVisibility) 3132 if err != nil { 3133 return PrivateLinkServiceVisibilityResponse{}, err 3134 } 3135 respType.RawResponse = resp 3136 return respType, nil 3137} 3138 3139// PublicIPAddressPoller provides polling facilities until the operation reaches a terminal state. 3140type PublicIPAddressPoller interface { 3141 azcore.Poller 3142 // FinalResponse performs a final GET to the service and returns the final response 3143 // for the polling operation. If there is an error performing the final GET then an error is returned. 3144 // If the final GET succeeded then the final PublicIPAddressResponse will be returned. 3145 FinalResponse(ctx context.Context) (PublicIPAddressResponse, error) 3146} 3147 3148type publicIPAddressPoller struct { 3149 pt *armcore.LROPoller 3150} 3151 3152func (p *publicIPAddressPoller) Done() bool { 3153 return p.pt.Done() 3154} 3155 3156func (p *publicIPAddressPoller) Poll(ctx context.Context) (*http.Response, error) { 3157 return p.pt.Poll(ctx) 3158} 3159 3160func (p *publicIPAddressPoller) FinalResponse(ctx context.Context) (PublicIPAddressResponse, error) { 3161 respType := PublicIPAddressResponse{PublicIPAddress: &PublicIPAddress{}} 3162 resp, err := p.pt.FinalResponse(ctx, respType.PublicIPAddress) 3163 if err != nil { 3164 return PublicIPAddressResponse{}, err 3165 } 3166 respType.RawResponse = resp 3167 return respType, nil 3168} 3169 3170func (p *publicIPAddressPoller) ResumeToken() (string, error) { 3171 return p.pt.ResumeToken() 3172} 3173 3174func (p *publicIPAddressPoller) pollUntilDone(ctx context.Context, freq time.Duration) (PublicIPAddressResponse, error) { 3175 respType := PublicIPAddressResponse{PublicIPAddress: &PublicIPAddress{}} 3176 resp, err := p.pt.PollUntilDone(ctx, freq, respType.PublicIPAddress) 3177 if err != nil { 3178 return PublicIPAddressResponse{}, err 3179 } 3180 respType.RawResponse = resp 3181 return respType, nil 3182} 3183 3184// PublicIPPrefixPoller provides polling facilities until the operation reaches a terminal state. 3185type PublicIPPrefixPoller interface { 3186 azcore.Poller 3187 // FinalResponse performs a final GET to the service and returns the final response 3188 // for the polling operation. If there is an error performing the final GET then an error is returned. 3189 // If the final GET succeeded then the final PublicIPPrefixResponse will be returned. 3190 FinalResponse(ctx context.Context) (PublicIPPrefixResponse, error) 3191} 3192 3193type publicIPPrefixPoller struct { 3194 pt *armcore.LROPoller 3195} 3196 3197func (p *publicIPPrefixPoller) Done() bool { 3198 return p.pt.Done() 3199} 3200 3201func (p *publicIPPrefixPoller) Poll(ctx context.Context) (*http.Response, error) { 3202 return p.pt.Poll(ctx) 3203} 3204 3205func (p *publicIPPrefixPoller) FinalResponse(ctx context.Context) (PublicIPPrefixResponse, error) { 3206 respType := PublicIPPrefixResponse{PublicIPPrefix: &PublicIPPrefix{}} 3207 resp, err := p.pt.FinalResponse(ctx, respType.PublicIPPrefix) 3208 if err != nil { 3209 return PublicIPPrefixResponse{}, err 3210 } 3211 respType.RawResponse = resp 3212 return respType, nil 3213} 3214 3215func (p *publicIPPrefixPoller) ResumeToken() (string, error) { 3216 return p.pt.ResumeToken() 3217} 3218 3219func (p *publicIPPrefixPoller) pollUntilDone(ctx context.Context, freq time.Duration) (PublicIPPrefixResponse, error) { 3220 respType := PublicIPPrefixResponse{PublicIPPrefix: &PublicIPPrefix{}} 3221 resp, err := p.pt.PollUntilDone(ctx, freq, respType.PublicIPPrefix) 3222 if err != nil { 3223 return PublicIPPrefixResponse{}, err 3224 } 3225 respType.RawResponse = resp 3226 return respType, nil 3227} 3228 3229// RouteFilterPoller provides polling facilities until the operation reaches a terminal state. 3230type RouteFilterPoller interface { 3231 azcore.Poller 3232 // FinalResponse performs a final GET to the service and returns the final response 3233 // for the polling operation. If there is an error performing the final GET then an error is returned. 3234 // If the final GET succeeded then the final RouteFilterResponse will be returned. 3235 FinalResponse(ctx context.Context) (RouteFilterResponse, error) 3236} 3237 3238type routeFilterPoller struct { 3239 pt *armcore.LROPoller 3240} 3241 3242func (p *routeFilterPoller) Done() bool { 3243 return p.pt.Done() 3244} 3245 3246func (p *routeFilterPoller) Poll(ctx context.Context) (*http.Response, error) { 3247 return p.pt.Poll(ctx) 3248} 3249 3250func (p *routeFilterPoller) FinalResponse(ctx context.Context) (RouteFilterResponse, error) { 3251 respType := RouteFilterResponse{RouteFilter: &RouteFilter{}} 3252 resp, err := p.pt.FinalResponse(ctx, respType.RouteFilter) 3253 if err != nil { 3254 return RouteFilterResponse{}, err 3255 } 3256 respType.RawResponse = resp 3257 return respType, nil 3258} 3259 3260func (p *routeFilterPoller) ResumeToken() (string, error) { 3261 return p.pt.ResumeToken() 3262} 3263 3264func (p *routeFilterPoller) pollUntilDone(ctx context.Context, freq time.Duration) (RouteFilterResponse, error) { 3265 respType := RouteFilterResponse{RouteFilter: &RouteFilter{}} 3266 resp, err := p.pt.PollUntilDone(ctx, freq, respType.RouteFilter) 3267 if err != nil { 3268 return RouteFilterResponse{}, err 3269 } 3270 respType.RawResponse = resp 3271 return respType, nil 3272} 3273 3274// RouteFilterRulePoller provides polling facilities until the operation reaches a terminal state. 3275type RouteFilterRulePoller interface { 3276 azcore.Poller 3277 // FinalResponse performs a final GET to the service and returns the final response 3278 // for the polling operation. If there is an error performing the final GET then an error is returned. 3279 // If the final GET succeeded then the final RouteFilterRuleResponse will be returned. 3280 FinalResponse(ctx context.Context) (RouteFilterRuleResponse, error) 3281} 3282 3283type routeFilterRulePoller struct { 3284 pt *armcore.LROPoller 3285} 3286 3287func (p *routeFilterRulePoller) Done() bool { 3288 return p.pt.Done() 3289} 3290 3291func (p *routeFilterRulePoller) Poll(ctx context.Context) (*http.Response, error) { 3292 return p.pt.Poll(ctx) 3293} 3294 3295func (p *routeFilterRulePoller) FinalResponse(ctx context.Context) (RouteFilterRuleResponse, error) { 3296 respType := RouteFilterRuleResponse{RouteFilterRule: &RouteFilterRule{}} 3297 resp, err := p.pt.FinalResponse(ctx, respType.RouteFilterRule) 3298 if err != nil { 3299 return RouteFilterRuleResponse{}, err 3300 } 3301 respType.RawResponse = resp 3302 return respType, nil 3303} 3304 3305func (p *routeFilterRulePoller) ResumeToken() (string, error) { 3306 return p.pt.ResumeToken() 3307} 3308 3309func (p *routeFilterRulePoller) pollUntilDone(ctx context.Context, freq time.Duration) (RouteFilterRuleResponse, error) { 3310 respType := RouteFilterRuleResponse{RouteFilterRule: &RouteFilterRule{}} 3311 resp, err := p.pt.PollUntilDone(ctx, freq, respType.RouteFilterRule) 3312 if err != nil { 3313 return RouteFilterRuleResponse{}, err 3314 } 3315 respType.RawResponse = resp 3316 return respType, nil 3317} 3318 3319// RoutePoller provides polling facilities until the operation reaches a terminal state. 3320type RoutePoller interface { 3321 azcore.Poller 3322 // FinalResponse performs a final GET to the service and returns the final response 3323 // for the polling operation. If there is an error performing the final GET then an error is returned. 3324 // If the final GET succeeded then the final RouteResponse will be returned. 3325 FinalResponse(ctx context.Context) (RouteResponse, error) 3326} 3327 3328type routePoller struct { 3329 pt *armcore.LROPoller 3330} 3331 3332func (p *routePoller) Done() bool { 3333 return p.pt.Done() 3334} 3335 3336func (p *routePoller) Poll(ctx context.Context) (*http.Response, error) { 3337 return p.pt.Poll(ctx) 3338} 3339 3340func (p *routePoller) FinalResponse(ctx context.Context) (RouteResponse, error) { 3341 respType := RouteResponse{Route: &Route{}} 3342 resp, err := p.pt.FinalResponse(ctx, respType.Route) 3343 if err != nil { 3344 return RouteResponse{}, err 3345 } 3346 respType.RawResponse = resp 3347 return respType, nil 3348} 3349 3350func (p *routePoller) ResumeToken() (string, error) { 3351 return p.pt.ResumeToken() 3352} 3353 3354func (p *routePoller) pollUntilDone(ctx context.Context, freq time.Duration) (RouteResponse, error) { 3355 respType := RouteResponse{Route: &Route{}} 3356 resp, err := p.pt.PollUntilDone(ctx, freq, respType.Route) 3357 if err != nil { 3358 return RouteResponse{}, err 3359 } 3360 respType.RawResponse = resp 3361 return respType, nil 3362} 3363 3364// RouteTablePoller provides polling facilities until the operation reaches a terminal state. 3365type RouteTablePoller interface { 3366 azcore.Poller 3367 // FinalResponse performs a final GET to the service and returns the final response 3368 // for the polling operation. If there is an error performing the final GET then an error is returned. 3369 // If the final GET succeeded then the final RouteTableResponse will be returned. 3370 FinalResponse(ctx context.Context) (RouteTableResponse, error) 3371} 3372 3373type routeTablePoller struct { 3374 pt *armcore.LROPoller 3375} 3376 3377func (p *routeTablePoller) Done() bool { 3378 return p.pt.Done() 3379} 3380 3381func (p *routeTablePoller) Poll(ctx context.Context) (*http.Response, error) { 3382 return p.pt.Poll(ctx) 3383} 3384 3385func (p *routeTablePoller) FinalResponse(ctx context.Context) (RouteTableResponse, error) { 3386 respType := RouteTableResponse{RouteTable: &RouteTable{}} 3387 resp, err := p.pt.FinalResponse(ctx, respType.RouteTable) 3388 if err != nil { 3389 return RouteTableResponse{}, err 3390 } 3391 respType.RawResponse = resp 3392 return respType, nil 3393} 3394 3395func (p *routeTablePoller) ResumeToken() (string, error) { 3396 return p.pt.ResumeToken() 3397} 3398 3399func (p *routeTablePoller) pollUntilDone(ctx context.Context, freq time.Duration) (RouteTableResponse, error) { 3400 respType := RouteTableResponse{RouteTable: &RouteTable{}} 3401 resp, err := p.pt.PollUntilDone(ctx, freq, respType.RouteTable) 3402 if err != nil { 3403 return RouteTableResponse{}, err 3404 } 3405 respType.RawResponse = resp 3406 return respType, nil 3407} 3408 3409// SecurityGroupViewResultPoller provides polling facilities until the operation reaches a terminal state. 3410type SecurityGroupViewResultPoller interface { 3411 azcore.Poller 3412 // FinalResponse performs a final GET to the service and returns the final response 3413 // for the polling operation. If there is an error performing the final GET then an error is returned. 3414 // If the final GET succeeded then the final SecurityGroupViewResultResponse will be returned. 3415 FinalResponse(ctx context.Context) (SecurityGroupViewResultResponse, error) 3416} 3417 3418type securityGroupViewResultPoller struct { 3419 pt *armcore.LROPoller 3420} 3421 3422func (p *securityGroupViewResultPoller) Done() bool { 3423 return p.pt.Done() 3424} 3425 3426func (p *securityGroupViewResultPoller) Poll(ctx context.Context) (*http.Response, error) { 3427 return p.pt.Poll(ctx) 3428} 3429 3430func (p *securityGroupViewResultPoller) FinalResponse(ctx context.Context) (SecurityGroupViewResultResponse, error) { 3431 respType := SecurityGroupViewResultResponse{SecurityGroupViewResult: &SecurityGroupViewResult{}} 3432 resp, err := p.pt.FinalResponse(ctx, respType.SecurityGroupViewResult) 3433 if err != nil { 3434 return SecurityGroupViewResultResponse{}, err 3435 } 3436 respType.RawResponse = resp 3437 return respType, nil 3438} 3439 3440func (p *securityGroupViewResultPoller) ResumeToken() (string, error) { 3441 return p.pt.ResumeToken() 3442} 3443 3444func (p *securityGroupViewResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (SecurityGroupViewResultResponse, error) { 3445 respType := SecurityGroupViewResultResponse{SecurityGroupViewResult: &SecurityGroupViewResult{}} 3446 resp, err := p.pt.PollUntilDone(ctx, freq, respType.SecurityGroupViewResult) 3447 if err != nil { 3448 return SecurityGroupViewResultResponse{}, err 3449 } 3450 respType.RawResponse = resp 3451 return respType, nil 3452} 3453 3454// SecurityPartnerProviderPoller provides polling facilities until the operation reaches a terminal state. 3455type SecurityPartnerProviderPoller interface { 3456 azcore.Poller 3457 // FinalResponse performs a final GET to the service and returns the final response 3458 // for the polling operation. If there is an error performing the final GET then an error is returned. 3459 // If the final GET succeeded then the final SecurityPartnerProviderResponse will be returned. 3460 FinalResponse(ctx context.Context) (SecurityPartnerProviderResponse, error) 3461} 3462 3463type securityPartnerProviderPoller struct { 3464 pt *armcore.LROPoller 3465} 3466 3467func (p *securityPartnerProviderPoller) Done() bool { 3468 return p.pt.Done() 3469} 3470 3471func (p *securityPartnerProviderPoller) Poll(ctx context.Context) (*http.Response, error) { 3472 return p.pt.Poll(ctx) 3473} 3474 3475func (p *securityPartnerProviderPoller) FinalResponse(ctx context.Context) (SecurityPartnerProviderResponse, error) { 3476 respType := SecurityPartnerProviderResponse{SecurityPartnerProvider: &SecurityPartnerProvider{}} 3477 resp, err := p.pt.FinalResponse(ctx, respType.SecurityPartnerProvider) 3478 if err != nil { 3479 return SecurityPartnerProviderResponse{}, err 3480 } 3481 respType.RawResponse = resp 3482 return respType, nil 3483} 3484 3485func (p *securityPartnerProviderPoller) ResumeToken() (string, error) { 3486 return p.pt.ResumeToken() 3487} 3488 3489func (p *securityPartnerProviderPoller) pollUntilDone(ctx context.Context, freq time.Duration) (SecurityPartnerProviderResponse, error) { 3490 respType := SecurityPartnerProviderResponse{SecurityPartnerProvider: &SecurityPartnerProvider{}} 3491 resp, err := p.pt.PollUntilDone(ctx, freq, respType.SecurityPartnerProvider) 3492 if err != nil { 3493 return SecurityPartnerProviderResponse{}, err 3494 } 3495 respType.RawResponse = resp 3496 return respType, nil 3497} 3498 3499// SecurityRulePoller provides polling facilities until the operation reaches a terminal state. 3500type SecurityRulePoller interface { 3501 azcore.Poller 3502 // FinalResponse performs a final GET to the service and returns the final response 3503 // for the polling operation. If there is an error performing the final GET then an error is returned. 3504 // If the final GET succeeded then the final SecurityRuleResponse will be returned. 3505 FinalResponse(ctx context.Context) (SecurityRuleResponse, error) 3506} 3507 3508type securityRulePoller struct { 3509 pt *armcore.LROPoller 3510} 3511 3512func (p *securityRulePoller) Done() bool { 3513 return p.pt.Done() 3514} 3515 3516func (p *securityRulePoller) Poll(ctx context.Context) (*http.Response, error) { 3517 return p.pt.Poll(ctx) 3518} 3519 3520func (p *securityRulePoller) FinalResponse(ctx context.Context) (SecurityRuleResponse, error) { 3521 respType := SecurityRuleResponse{SecurityRule: &SecurityRule{}} 3522 resp, err := p.pt.FinalResponse(ctx, respType.SecurityRule) 3523 if err != nil { 3524 return SecurityRuleResponse{}, err 3525 } 3526 respType.RawResponse = resp 3527 return respType, nil 3528} 3529 3530func (p *securityRulePoller) ResumeToken() (string, error) { 3531 return p.pt.ResumeToken() 3532} 3533 3534func (p *securityRulePoller) pollUntilDone(ctx context.Context, freq time.Duration) (SecurityRuleResponse, error) { 3535 respType := SecurityRuleResponse{SecurityRule: &SecurityRule{}} 3536 resp, err := p.pt.PollUntilDone(ctx, freq, respType.SecurityRule) 3537 if err != nil { 3538 return SecurityRuleResponse{}, err 3539 } 3540 respType.RawResponse = resp 3541 return respType, nil 3542} 3543 3544// ServiceEndpointPolicyDefinitionPoller provides polling facilities until the operation reaches a terminal state. 3545type ServiceEndpointPolicyDefinitionPoller interface { 3546 azcore.Poller 3547 // FinalResponse performs a final GET to the service and returns the final response 3548 // for the polling operation. If there is an error performing the final GET then an error is returned. 3549 // If the final GET succeeded then the final ServiceEndpointPolicyDefinitionResponse will be returned. 3550 FinalResponse(ctx context.Context) (ServiceEndpointPolicyDefinitionResponse, error) 3551} 3552 3553type serviceEndpointPolicyDefinitionPoller struct { 3554 pt *armcore.LROPoller 3555} 3556 3557func (p *serviceEndpointPolicyDefinitionPoller) Done() bool { 3558 return p.pt.Done() 3559} 3560 3561func (p *serviceEndpointPolicyDefinitionPoller) Poll(ctx context.Context) (*http.Response, error) { 3562 return p.pt.Poll(ctx) 3563} 3564 3565func (p *serviceEndpointPolicyDefinitionPoller) FinalResponse(ctx context.Context) (ServiceEndpointPolicyDefinitionResponse, error) { 3566 respType := ServiceEndpointPolicyDefinitionResponse{ServiceEndpointPolicyDefinition: &ServiceEndpointPolicyDefinition{}} 3567 resp, err := p.pt.FinalResponse(ctx, respType.ServiceEndpointPolicyDefinition) 3568 if err != nil { 3569 return ServiceEndpointPolicyDefinitionResponse{}, err 3570 } 3571 respType.RawResponse = resp 3572 return respType, nil 3573} 3574 3575func (p *serviceEndpointPolicyDefinitionPoller) ResumeToken() (string, error) { 3576 return p.pt.ResumeToken() 3577} 3578 3579func (p *serviceEndpointPolicyDefinitionPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ServiceEndpointPolicyDefinitionResponse, error) { 3580 respType := ServiceEndpointPolicyDefinitionResponse{ServiceEndpointPolicyDefinition: &ServiceEndpointPolicyDefinition{}} 3581 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ServiceEndpointPolicyDefinition) 3582 if err != nil { 3583 return ServiceEndpointPolicyDefinitionResponse{}, err 3584 } 3585 respType.RawResponse = resp 3586 return respType, nil 3587} 3588 3589// ServiceEndpointPolicyPoller provides polling facilities until the operation reaches a terminal state. 3590type ServiceEndpointPolicyPoller interface { 3591 azcore.Poller 3592 // FinalResponse performs a final GET to the service and returns the final response 3593 // for the polling operation. If there is an error performing the final GET then an error is returned. 3594 // If the final GET succeeded then the final ServiceEndpointPolicyResponse will be returned. 3595 FinalResponse(ctx context.Context) (ServiceEndpointPolicyResponse, error) 3596} 3597 3598type serviceEndpointPolicyPoller struct { 3599 pt *armcore.LROPoller 3600} 3601 3602func (p *serviceEndpointPolicyPoller) Done() bool { 3603 return p.pt.Done() 3604} 3605 3606func (p *serviceEndpointPolicyPoller) Poll(ctx context.Context) (*http.Response, error) { 3607 return p.pt.Poll(ctx) 3608} 3609 3610func (p *serviceEndpointPolicyPoller) FinalResponse(ctx context.Context) (ServiceEndpointPolicyResponse, error) { 3611 respType := ServiceEndpointPolicyResponse{ServiceEndpointPolicy: &ServiceEndpointPolicy{}} 3612 resp, err := p.pt.FinalResponse(ctx, respType.ServiceEndpointPolicy) 3613 if err != nil { 3614 return ServiceEndpointPolicyResponse{}, err 3615 } 3616 respType.RawResponse = resp 3617 return respType, nil 3618} 3619 3620func (p *serviceEndpointPolicyPoller) ResumeToken() (string, error) { 3621 return p.pt.ResumeToken() 3622} 3623 3624func (p *serviceEndpointPolicyPoller) pollUntilDone(ctx context.Context, freq time.Duration) (ServiceEndpointPolicyResponse, error) { 3625 respType := ServiceEndpointPolicyResponse{ServiceEndpointPolicy: &ServiceEndpointPolicy{}} 3626 resp, err := p.pt.PollUntilDone(ctx, freq, respType.ServiceEndpointPolicy) 3627 if err != nil { 3628 return ServiceEndpointPolicyResponse{}, err 3629 } 3630 respType.RawResponse = resp 3631 return respType, nil 3632} 3633 3634// StringPoller provides polling facilities until the operation reaches a terminal state. 3635type StringPoller interface { 3636 azcore.Poller 3637 // FinalResponse performs a final GET to the service and returns the final response 3638 // for the polling operation. If there is an error performing the final GET then an error is returned. 3639 // If the final GET succeeded then the final StringResponse will be returned. 3640 FinalResponse(ctx context.Context) (StringResponse, error) 3641} 3642 3643type stringPoller struct { 3644 pt *armcore.LROPoller 3645} 3646 3647func (p *stringPoller) Done() bool { 3648 return p.pt.Done() 3649} 3650 3651func (p *stringPoller) Poll(ctx context.Context) (*http.Response, error) { 3652 return p.pt.Poll(ctx) 3653} 3654 3655func (p *stringPoller) FinalResponse(ctx context.Context) (StringResponse, error) { 3656 respType := StringResponse{} 3657 resp, err := p.pt.FinalResponse(ctx, &respType.Value) 3658 if err != nil { 3659 return StringResponse{}, err 3660 } 3661 respType.RawResponse = resp 3662 return respType, nil 3663} 3664 3665func (p *stringPoller) ResumeToken() (string, error) { 3666 return p.pt.ResumeToken() 3667} 3668 3669func (p *stringPoller) pollUntilDone(ctx context.Context, freq time.Duration) (StringResponse, error) { 3670 respType := StringResponse{} 3671 resp, err := p.pt.PollUntilDone(ctx, freq, &respType.Value) 3672 if err != nil { 3673 return StringResponse{}, err 3674 } 3675 respType.RawResponse = resp 3676 return respType, nil 3677} 3678 3679// SubnetPoller provides polling facilities until the operation reaches a terminal state. 3680type SubnetPoller interface { 3681 azcore.Poller 3682 // FinalResponse performs a final GET to the service and returns the final response 3683 // for the polling operation. If there is an error performing the final GET then an error is returned. 3684 // If the final GET succeeded then the final SubnetResponse will be returned. 3685 FinalResponse(ctx context.Context) (SubnetResponse, error) 3686} 3687 3688type subnetPoller struct { 3689 pt *armcore.LROPoller 3690} 3691 3692func (p *subnetPoller) Done() bool { 3693 return p.pt.Done() 3694} 3695 3696func (p *subnetPoller) Poll(ctx context.Context) (*http.Response, error) { 3697 return p.pt.Poll(ctx) 3698} 3699 3700func (p *subnetPoller) FinalResponse(ctx context.Context) (SubnetResponse, error) { 3701 respType := SubnetResponse{Subnet: &Subnet{}} 3702 resp, err := p.pt.FinalResponse(ctx, respType.Subnet) 3703 if err != nil { 3704 return SubnetResponse{}, err 3705 } 3706 respType.RawResponse = resp 3707 return respType, nil 3708} 3709 3710func (p *subnetPoller) ResumeToken() (string, error) { 3711 return p.pt.ResumeToken() 3712} 3713 3714func (p *subnetPoller) pollUntilDone(ctx context.Context, freq time.Duration) (SubnetResponse, error) { 3715 respType := SubnetResponse{Subnet: &Subnet{}} 3716 resp, err := p.pt.PollUntilDone(ctx, freq, respType.Subnet) 3717 if err != nil { 3718 return SubnetResponse{}, err 3719 } 3720 respType.RawResponse = resp 3721 return respType, nil 3722} 3723 3724// TroubleshootingResultPoller provides polling facilities until the operation reaches a terminal state. 3725type TroubleshootingResultPoller interface { 3726 azcore.Poller 3727 // FinalResponse performs a final GET to the service and returns the final response 3728 // for the polling operation. If there is an error performing the final GET then an error is returned. 3729 // If the final GET succeeded then the final TroubleshootingResultResponse will be returned. 3730 FinalResponse(ctx context.Context) (TroubleshootingResultResponse, error) 3731} 3732 3733type troubleshootingResultPoller struct { 3734 pt *armcore.LROPoller 3735} 3736 3737func (p *troubleshootingResultPoller) Done() bool { 3738 return p.pt.Done() 3739} 3740 3741func (p *troubleshootingResultPoller) Poll(ctx context.Context) (*http.Response, error) { 3742 return p.pt.Poll(ctx) 3743} 3744 3745func (p *troubleshootingResultPoller) FinalResponse(ctx context.Context) (TroubleshootingResultResponse, error) { 3746 respType := TroubleshootingResultResponse{TroubleshootingResult: &TroubleshootingResult{}} 3747 resp, err := p.pt.FinalResponse(ctx, respType.TroubleshootingResult) 3748 if err != nil { 3749 return TroubleshootingResultResponse{}, err 3750 } 3751 respType.RawResponse = resp 3752 return respType, nil 3753} 3754 3755func (p *troubleshootingResultPoller) ResumeToken() (string, error) { 3756 return p.pt.ResumeToken() 3757} 3758 3759func (p *troubleshootingResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (TroubleshootingResultResponse, error) { 3760 respType := TroubleshootingResultResponse{TroubleshootingResult: &TroubleshootingResult{}} 3761 resp, err := p.pt.PollUntilDone(ctx, freq, respType.TroubleshootingResult) 3762 if err != nil { 3763 return TroubleshootingResultResponse{}, err 3764 } 3765 respType.RawResponse = resp 3766 return respType, nil 3767} 3768 3769// VPNClientConnectionHealthDetailListResultPoller provides polling facilities until the operation reaches a terminal state. 3770type VPNClientConnectionHealthDetailListResultPoller interface { 3771 azcore.Poller 3772 // FinalResponse performs a final GET to the service and returns the final response 3773 // for the polling operation. If there is an error performing the final GET then an error is returned. 3774 // If the final GET succeeded then the final VPNClientConnectionHealthDetailListResultResponse will be returned. 3775 FinalResponse(ctx context.Context) (VPNClientConnectionHealthDetailListResultResponse, error) 3776} 3777 3778type vpnClientConnectionHealthDetailListResultPoller struct { 3779 pt *armcore.LROPoller 3780} 3781 3782func (p *vpnClientConnectionHealthDetailListResultPoller) Done() bool { 3783 return p.pt.Done() 3784} 3785 3786func (p *vpnClientConnectionHealthDetailListResultPoller) Poll(ctx context.Context) (*http.Response, error) { 3787 return p.pt.Poll(ctx) 3788} 3789 3790func (p *vpnClientConnectionHealthDetailListResultPoller) FinalResponse(ctx context.Context) (VPNClientConnectionHealthDetailListResultResponse, error) { 3791 respType := VPNClientConnectionHealthDetailListResultResponse{VPNClientConnectionHealthDetailListResult: &VPNClientConnectionHealthDetailListResult{}} 3792 resp, err := p.pt.FinalResponse(ctx, respType.VPNClientConnectionHealthDetailListResult) 3793 if err != nil { 3794 return VPNClientConnectionHealthDetailListResultResponse{}, err 3795 } 3796 respType.RawResponse = resp 3797 return respType, nil 3798} 3799 3800func (p *vpnClientConnectionHealthDetailListResultPoller) ResumeToken() (string, error) { 3801 return p.pt.ResumeToken() 3802} 3803 3804func (p *vpnClientConnectionHealthDetailListResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (VPNClientConnectionHealthDetailListResultResponse, error) { 3805 respType := VPNClientConnectionHealthDetailListResultResponse{VPNClientConnectionHealthDetailListResult: &VPNClientConnectionHealthDetailListResult{}} 3806 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VPNClientConnectionHealthDetailListResult) 3807 if err != nil { 3808 return VPNClientConnectionHealthDetailListResultResponse{}, err 3809 } 3810 respType.RawResponse = resp 3811 return respType, nil 3812} 3813 3814// VPNClientIPsecParametersPoller provides polling facilities until the operation reaches a terminal state. 3815type VPNClientIPsecParametersPoller interface { 3816 azcore.Poller 3817 // FinalResponse performs a final GET to the service and returns the final response 3818 // for the polling operation. If there is an error performing the final GET then an error is returned. 3819 // If the final GET succeeded then the final VPNClientIPsecParametersResponse will be returned. 3820 FinalResponse(ctx context.Context) (VPNClientIPsecParametersResponse, error) 3821} 3822 3823type vpnClientIPSecParametersPoller struct { 3824 pt *armcore.LROPoller 3825} 3826 3827func (p *vpnClientIPSecParametersPoller) Done() bool { 3828 return p.pt.Done() 3829} 3830 3831func (p *vpnClientIPSecParametersPoller) Poll(ctx context.Context) (*http.Response, error) { 3832 return p.pt.Poll(ctx) 3833} 3834 3835func (p *vpnClientIPSecParametersPoller) FinalResponse(ctx context.Context) (VPNClientIPsecParametersResponse, error) { 3836 respType := VPNClientIPsecParametersResponse{VPNClientIPsecParameters: &VPNClientIPsecParameters{}} 3837 resp, err := p.pt.FinalResponse(ctx, respType.VPNClientIPsecParameters) 3838 if err != nil { 3839 return VPNClientIPsecParametersResponse{}, err 3840 } 3841 respType.RawResponse = resp 3842 return respType, nil 3843} 3844 3845func (p *vpnClientIPSecParametersPoller) ResumeToken() (string, error) { 3846 return p.pt.ResumeToken() 3847} 3848 3849func (p *vpnClientIPSecParametersPoller) pollUntilDone(ctx context.Context, freq time.Duration) (VPNClientIPsecParametersResponse, error) { 3850 respType := VPNClientIPsecParametersResponse{VPNClientIPsecParameters: &VPNClientIPsecParameters{}} 3851 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VPNClientIPsecParameters) 3852 if err != nil { 3853 return VPNClientIPsecParametersResponse{}, err 3854 } 3855 respType.RawResponse = resp 3856 return respType, nil 3857} 3858 3859// VPNConnectionPoller provides polling facilities until the operation reaches a terminal state. 3860type VPNConnectionPoller interface { 3861 azcore.Poller 3862 // FinalResponse performs a final GET to the service and returns the final response 3863 // for the polling operation. If there is an error performing the final GET then an error is returned. 3864 // If the final GET succeeded then the final VPNConnectionResponse will be returned. 3865 FinalResponse(ctx context.Context) (VPNConnectionResponse, error) 3866} 3867 3868type vpnConnectionPoller struct { 3869 pt *armcore.LROPoller 3870} 3871 3872func (p *vpnConnectionPoller) Done() bool { 3873 return p.pt.Done() 3874} 3875 3876func (p *vpnConnectionPoller) Poll(ctx context.Context) (*http.Response, error) { 3877 return p.pt.Poll(ctx) 3878} 3879 3880func (p *vpnConnectionPoller) FinalResponse(ctx context.Context) (VPNConnectionResponse, error) { 3881 respType := VPNConnectionResponse{VPNConnection: &VPNConnection{}} 3882 resp, err := p.pt.FinalResponse(ctx, respType.VPNConnection) 3883 if err != nil { 3884 return VPNConnectionResponse{}, err 3885 } 3886 respType.RawResponse = resp 3887 return respType, nil 3888} 3889 3890func (p *vpnConnectionPoller) ResumeToken() (string, error) { 3891 return p.pt.ResumeToken() 3892} 3893 3894func (p *vpnConnectionPoller) pollUntilDone(ctx context.Context, freq time.Duration) (VPNConnectionResponse, error) { 3895 respType := VPNConnectionResponse{VPNConnection: &VPNConnection{}} 3896 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VPNConnection) 3897 if err != nil { 3898 return VPNConnectionResponse{}, err 3899 } 3900 respType.RawResponse = resp 3901 return respType, nil 3902} 3903 3904// VPNGatewayNatRulePoller provides polling facilities until the operation reaches a terminal state. 3905type VPNGatewayNatRulePoller interface { 3906 azcore.Poller 3907 // FinalResponse performs a final GET to the service and returns the final response 3908 // for the polling operation. If there is an error performing the final GET then an error is returned. 3909 // If the final GET succeeded then the final VPNGatewayNatRuleResponse will be returned. 3910 FinalResponse(ctx context.Context) (VPNGatewayNatRuleResponse, error) 3911} 3912 3913type vpnGatewayNatRulePoller struct { 3914 pt *armcore.LROPoller 3915} 3916 3917func (p *vpnGatewayNatRulePoller) Done() bool { 3918 return p.pt.Done() 3919} 3920 3921func (p *vpnGatewayNatRulePoller) Poll(ctx context.Context) (*http.Response, error) { 3922 return p.pt.Poll(ctx) 3923} 3924 3925func (p *vpnGatewayNatRulePoller) FinalResponse(ctx context.Context) (VPNGatewayNatRuleResponse, error) { 3926 respType := VPNGatewayNatRuleResponse{VPNGatewayNatRule: &VPNGatewayNatRule{}} 3927 resp, err := p.pt.FinalResponse(ctx, respType.VPNGatewayNatRule) 3928 if err != nil { 3929 return VPNGatewayNatRuleResponse{}, err 3930 } 3931 respType.RawResponse = resp 3932 return respType, nil 3933} 3934 3935func (p *vpnGatewayNatRulePoller) ResumeToken() (string, error) { 3936 return p.pt.ResumeToken() 3937} 3938 3939func (p *vpnGatewayNatRulePoller) pollUntilDone(ctx context.Context, freq time.Duration) (VPNGatewayNatRuleResponse, error) { 3940 respType := VPNGatewayNatRuleResponse{VPNGatewayNatRule: &VPNGatewayNatRule{}} 3941 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VPNGatewayNatRule) 3942 if err != nil { 3943 return VPNGatewayNatRuleResponse{}, err 3944 } 3945 respType.RawResponse = resp 3946 return respType, nil 3947} 3948 3949// VPNGatewayPoller provides polling facilities until the operation reaches a terminal state. 3950type VPNGatewayPoller interface { 3951 azcore.Poller 3952 // FinalResponse performs a final GET to the service and returns the final response 3953 // for the polling operation. If there is an error performing the final GET then an error is returned. 3954 // If the final GET succeeded then the final VPNGatewayResponse will be returned. 3955 FinalResponse(ctx context.Context) (VPNGatewayResponse, error) 3956} 3957 3958type vpnGatewayPoller struct { 3959 pt *armcore.LROPoller 3960} 3961 3962func (p *vpnGatewayPoller) Done() bool { 3963 return p.pt.Done() 3964} 3965 3966func (p *vpnGatewayPoller) Poll(ctx context.Context) (*http.Response, error) { 3967 return p.pt.Poll(ctx) 3968} 3969 3970func (p *vpnGatewayPoller) FinalResponse(ctx context.Context) (VPNGatewayResponse, error) { 3971 respType := VPNGatewayResponse{VPNGateway: &VPNGateway{}} 3972 resp, err := p.pt.FinalResponse(ctx, respType.VPNGateway) 3973 if err != nil { 3974 return VPNGatewayResponse{}, err 3975 } 3976 respType.RawResponse = resp 3977 return respType, nil 3978} 3979 3980func (p *vpnGatewayPoller) ResumeToken() (string, error) { 3981 return p.pt.ResumeToken() 3982} 3983 3984func (p *vpnGatewayPoller) pollUntilDone(ctx context.Context, freq time.Duration) (VPNGatewayResponse, error) { 3985 respType := VPNGatewayResponse{VPNGateway: &VPNGateway{}} 3986 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VPNGateway) 3987 if err != nil { 3988 return VPNGatewayResponse{}, err 3989 } 3990 respType.RawResponse = resp 3991 return respType, nil 3992} 3993 3994// VPNProfileResponsePoller provides polling facilities until the operation reaches a terminal state. 3995type VPNProfileResponsePoller interface { 3996 azcore.Poller 3997 // FinalResponse performs a final GET to the service and returns the final response 3998 // for the polling operation. If there is an error performing the final GET then an error is returned. 3999 // If the final GET succeeded then the final VPNProfileResponseResponse will be returned. 4000 FinalResponse(ctx context.Context) (VPNProfileResponseResponse, error) 4001} 4002 4003type vpnProfileResponsePoller struct { 4004 pt *armcore.LROPoller 4005} 4006 4007func (p *vpnProfileResponsePoller) Done() bool { 4008 return p.pt.Done() 4009} 4010 4011func (p *vpnProfileResponsePoller) Poll(ctx context.Context) (*http.Response, error) { 4012 return p.pt.Poll(ctx) 4013} 4014 4015func (p *vpnProfileResponsePoller) FinalResponse(ctx context.Context) (VPNProfileResponseResponse, error) { 4016 respType := VPNProfileResponseResponse{VPNProfileResponse: &VPNProfileResponse{}} 4017 resp, err := p.pt.FinalResponse(ctx, respType.VPNProfileResponse) 4018 if err != nil { 4019 return VPNProfileResponseResponse{}, err 4020 } 4021 respType.RawResponse = resp 4022 return respType, nil 4023} 4024 4025func (p *vpnProfileResponsePoller) ResumeToken() (string, error) { 4026 return p.pt.ResumeToken() 4027} 4028 4029func (p *vpnProfileResponsePoller) pollUntilDone(ctx context.Context, freq time.Duration) (VPNProfileResponseResponse, error) { 4030 respType := VPNProfileResponseResponse{VPNProfileResponse: &VPNProfileResponse{}} 4031 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VPNProfileResponse) 4032 if err != nil { 4033 return VPNProfileResponseResponse{}, err 4034 } 4035 respType.RawResponse = resp 4036 return respType, nil 4037} 4038 4039// VPNServerConfigurationPoller provides polling facilities until the operation reaches a terminal state. 4040type VPNServerConfigurationPoller interface { 4041 azcore.Poller 4042 // FinalResponse performs a final GET to the service and returns the final response 4043 // for the polling operation. If there is an error performing the final GET then an error is returned. 4044 // If the final GET succeeded then the final VPNServerConfigurationResponse will be returned. 4045 FinalResponse(ctx context.Context) (VPNServerConfigurationResponse, error) 4046} 4047 4048type vpnServerConfigurationPoller struct { 4049 pt *armcore.LROPoller 4050} 4051 4052func (p *vpnServerConfigurationPoller) Done() bool { 4053 return p.pt.Done() 4054} 4055 4056func (p *vpnServerConfigurationPoller) Poll(ctx context.Context) (*http.Response, error) { 4057 return p.pt.Poll(ctx) 4058} 4059 4060func (p *vpnServerConfigurationPoller) FinalResponse(ctx context.Context) (VPNServerConfigurationResponse, error) { 4061 respType := VPNServerConfigurationResponse{VPNServerConfiguration: &VPNServerConfiguration{}} 4062 resp, err := p.pt.FinalResponse(ctx, respType.VPNServerConfiguration) 4063 if err != nil { 4064 return VPNServerConfigurationResponse{}, err 4065 } 4066 respType.RawResponse = resp 4067 return respType, nil 4068} 4069 4070func (p *vpnServerConfigurationPoller) ResumeToken() (string, error) { 4071 return p.pt.ResumeToken() 4072} 4073 4074func (p *vpnServerConfigurationPoller) pollUntilDone(ctx context.Context, freq time.Duration) (VPNServerConfigurationResponse, error) { 4075 respType := VPNServerConfigurationResponse{VPNServerConfiguration: &VPNServerConfiguration{}} 4076 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VPNServerConfiguration) 4077 if err != nil { 4078 return VPNServerConfigurationResponse{}, err 4079 } 4080 respType.RawResponse = resp 4081 return respType, nil 4082} 4083 4084// VPNServerConfigurationsResponsePoller provides polling facilities until the operation reaches a terminal state. 4085type VPNServerConfigurationsResponsePoller interface { 4086 azcore.Poller 4087 // FinalResponse performs a final GET to the service and returns the final response 4088 // for the polling operation. If there is an error performing the final GET then an error is returned. 4089 // If the final GET succeeded then the final VPNServerConfigurationsResponseResponse will be returned. 4090 FinalResponse(ctx context.Context) (VPNServerConfigurationsResponseResponse, error) 4091} 4092 4093type vpnServerConfigurationsResponsePoller struct { 4094 pt *armcore.LROPoller 4095} 4096 4097func (p *vpnServerConfigurationsResponsePoller) Done() bool { 4098 return p.pt.Done() 4099} 4100 4101func (p *vpnServerConfigurationsResponsePoller) Poll(ctx context.Context) (*http.Response, error) { 4102 return p.pt.Poll(ctx) 4103} 4104 4105func (p *vpnServerConfigurationsResponsePoller) FinalResponse(ctx context.Context) (VPNServerConfigurationsResponseResponse, error) { 4106 respType := VPNServerConfigurationsResponseResponse{VPNServerConfigurationsResponse: &VPNServerConfigurationsResponse{}} 4107 resp, err := p.pt.FinalResponse(ctx, respType.VPNServerConfigurationsResponse) 4108 if err != nil { 4109 return VPNServerConfigurationsResponseResponse{}, err 4110 } 4111 respType.RawResponse = resp 4112 return respType, nil 4113} 4114 4115func (p *vpnServerConfigurationsResponsePoller) ResumeToken() (string, error) { 4116 return p.pt.ResumeToken() 4117} 4118 4119func (p *vpnServerConfigurationsResponsePoller) pollUntilDone(ctx context.Context, freq time.Duration) (VPNServerConfigurationsResponseResponse, error) { 4120 respType := VPNServerConfigurationsResponseResponse{VPNServerConfigurationsResponse: &VPNServerConfigurationsResponse{}} 4121 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VPNServerConfigurationsResponse) 4122 if err != nil { 4123 return VPNServerConfigurationsResponseResponse{}, err 4124 } 4125 respType.RawResponse = resp 4126 return respType, nil 4127} 4128 4129// VPNSitePoller provides polling facilities until the operation reaches a terminal state. 4130type VPNSitePoller interface { 4131 azcore.Poller 4132 // FinalResponse performs a final GET to the service and returns the final response 4133 // for the polling operation. If there is an error performing the final GET then an error is returned. 4134 // If the final GET succeeded then the final VPNSiteResponse will be returned. 4135 FinalResponse(ctx context.Context) (VPNSiteResponse, error) 4136} 4137 4138type vpnSitePoller struct { 4139 pt *armcore.LROPoller 4140} 4141 4142func (p *vpnSitePoller) Done() bool { 4143 return p.pt.Done() 4144} 4145 4146func (p *vpnSitePoller) Poll(ctx context.Context) (*http.Response, error) { 4147 return p.pt.Poll(ctx) 4148} 4149 4150func (p *vpnSitePoller) FinalResponse(ctx context.Context) (VPNSiteResponse, error) { 4151 respType := VPNSiteResponse{VPNSite: &VPNSite{}} 4152 resp, err := p.pt.FinalResponse(ctx, respType.VPNSite) 4153 if err != nil { 4154 return VPNSiteResponse{}, err 4155 } 4156 respType.RawResponse = resp 4157 return respType, nil 4158} 4159 4160func (p *vpnSitePoller) ResumeToken() (string, error) { 4161 return p.pt.ResumeToken() 4162} 4163 4164func (p *vpnSitePoller) pollUntilDone(ctx context.Context, freq time.Duration) (VPNSiteResponse, error) { 4165 respType := VPNSiteResponse{VPNSite: &VPNSite{}} 4166 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VPNSite) 4167 if err != nil { 4168 return VPNSiteResponse{}, err 4169 } 4170 respType.RawResponse = resp 4171 return respType, nil 4172} 4173 4174// VerificationIPFlowResultPoller provides polling facilities until the operation reaches a terminal state. 4175type VerificationIPFlowResultPoller interface { 4176 azcore.Poller 4177 // FinalResponse performs a final GET to the service and returns the final response 4178 // for the polling operation. If there is an error performing the final GET then an error is returned. 4179 // If the final GET succeeded then the final VerificationIPFlowResultResponse will be returned. 4180 FinalResponse(ctx context.Context) (VerificationIPFlowResultResponse, error) 4181} 4182 4183type verificationIPFlowResultPoller struct { 4184 pt *armcore.LROPoller 4185} 4186 4187func (p *verificationIPFlowResultPoller) Done() bool { 4188 return p.pt.Done() 4189} 4190 4191func (p *verificationIPFlowResultPoller) Poll(ctx context.Context) (*http.Response, error) { 4192 return p.pt.Poll(ctx) 4193} 4194 4195func (p *verificationIPFlowResultPoller) FinalResponse(ctx context.Context) (VerificationIPFlowResultResponse, error) { 4196 respType := VerificationIPFlowResultResponse{VerificationIPFlowResult: &VerificationIPFlowResult{}} 4197 resp, err := p.pt.FinalResponse(ctx, respType.VerificationIPFlowResult) 4198 if err != nil { 4199 return VerificationIPFlowResultResponse{}, err 4200 } 4201 respType.RawResponse = resp 4202 return respType, nil 4203} 4204 4205func (p *verificationIPFlowResultPoller) ResumeToken() (string, error) { 4206 return p.pt.ResumeToken() 4207} 4208 4209func (p *verificationIPFlowResultPoller) pollUntilDone(ctx context.Context, freq time.Duration) (VerificationIPFlowResultResponse, error) { 4210 respType := VerificationIPFlowResultResponse{VerificationIPFlowResult: &VerificationIPFlowResult{}} 4211 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VerificationIPFlowResult) 4212 if err != nil { 4213 return VerificationIPFlowResultResponse{}, err 4214 } 4215 respType.RawResponse = resp 4216 return respType, nil 4217} 4218 4219// VirtualApplianceSitePoller provides polling facilities until the operation reaches a terminal state. 4220type VirtualApplianceSitePoller interface { 4221 azcore.Poller 4222 // FinalResponse performs a final GET to the service and returns the final response 4223 // for the polling operation. If there is an error performing the final GET then an error is returned. 4224 // If the final GET succeeded then the final VirtualApplianceSiteResponse will be returned. 4225 FinalResponse(ctx context.Context) (VirtualApplianceSiteResponse, error) 4226} 4227 4228type virtualApplianceSitePoller struct { 4229 pt *armcore.LROPoller 4230} 4231 4232func (p *virtualApplianceSitePoller) Done() bool { 4233 return p.pt.Done() 4234} 4235 4236func (p *virtualApplianceSitePoller) Poll(ctx context.Context) (*http.Response, error) { 4237 return p.pt.Poll(ctx) 4238} 4239 4240func (p *virtualApplianceSitePoller) FinalResponse(ctx context.Context) (VirtualApplianceSiteResponse, error) { 4241 respType := VirtualApplianceSiteResponse{VirtualApplianceSite: &VirtualApplianceSite{}} 4242 resp, err := p.pt.FinalResponse(ctx, respType.VirtualApplianceSite) 4243 if err != nil { 4244 return VirtualApplianceSiteResponse{}, err 4245 } 4246 respType.RawResponse = resp 4247 return respType, nil 4248} 4249 4250func (p *virtualApplianceSitePoller) ResumeToken() (string, error) { 4251 return p.pt.ResumeToken() 4252} 4253 4254func (p *virtualApplianceSitePoller) pollUntilDone(ctx context.Context, freq time.Duration) (VirtualApplianceSiteResponse, error) { 4255 respType := VirtualApplianceSiteResponse{VirtualApplianceSite: &VirtualApplianceSite{}} 4256 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VirtualApplianceSite) 4257 if err != nil { 4258 return VirtualApplianceSiteResponse{}, err 4259 } 4260 respType.RawResponse = resp 4261 return respType, nil 4262} 4263 4264// VirtualHubPoller provides polling facilities until the operation reaches a terminal state. 4265type VirtualHubPoller interface { 4266 azcore.Poller 4267 // FinalResponse performs a final GET to the service and returns the final response 4268 // for the polling operation. If there is an error performing the final GET then an error is returned. 4269 // If the final GET succeeded then the final VirtualHubResponse will be returned. 4270 FinalResponse(ctx context.Context) (VirtualHubResponse, error) 4271} 4272 4273type virtualHubPoller struct { 4274 pt *armcore.LROPoller 4275} 4276 4277func (p *virtualHubPoller) Done() bool { 4278 return p.pt.Done() 4279} 4280 4281func (p *virtualHubPoller) Poll(ctx context.Context) (*http.Response, error) { 4282 return p.pt.Poll(ctx) 4283} 4284 4285func (p *virtualHubPoller) FinalResponse(ctx context.Context) (VirtualHubResponse, error) { 4286 respType := VirtualHubResponse{VirtualHub: &VirtualHub{}} 4287 resp, err := p.pt.FinalResponse(ctx, respType.VirtualHub) 4288 if err != nil { 4289 return VirtualHubResponse{}, err 4290 } 4291 respType.RawResponse = resp 4292 return respType, nil 4293} 4294 4295func (p *virtualHubPoller) ResumeToken() (string, error) { 4296 return p.pt.ResumeToken() 4297} 4298 4299func (p *virtualHubPoller) pollUntilDone(ctx context.Context, freq time.Duration) (VirtualHubResponse, error) { 4300 respType := VirtualHubResponse{VirtualHub: &VirtualHub{}} 4301 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VirtualHub) 4302 if err != nil { 4303 return VirtualHubResponse{}, err 4304 } 4305 respType.RawResponse = resp 4306 return respType, nil 4307} 4308 4309// VirtualHubRouteTableV2Poller provides polling facilities until the operation reaches a terminal state. 4310type VirtualHubRouteTableV2Poller interface { 4311 azcore.Poller 4312 // FinalResponse performs a final GET to the service and returns the final response 4313 // for the polling operation. If there is an error performing the final GET then an error is returned. 4314 // If the final GET succeeded then the final VirtualHubRouteTableV2Response will be returned. 4315 FinalResponse(ctx context.Context) (VirtualHubRouteTableV2Response, error) 4316} 4317 4318type virtualHubRouteTableV2Poller struct { 4319 pt *armcore.LROPoller 4320} 4321 4322func (p *virtualHubRouteTableV2Poller) Done() bool { 4323 return p.pt.Done() 4324} 4325 4326func (p *virtualHubRouteTableV2Poller) Poll(ctx context.Context) (*http.Response, error) { 4327 return p.pt.Poll(ctx) 4328} 4329 4330func (p *virtualHubRouteTableV2Poller) FinalResponse(ctx context.Context) (VirtualHubRouteTableV2Response, error) { 4331 respType := VirtualHubRouteTableV2Response{VirtualHubRouteTableV2: &VirtualHubRouteTableV2{}} 4332 resp, err := p.pt.FinalResponse(ctx, respType.VirtualHubRouteTableV2) 4333 if err != nil { 4334 return VirtualHubRouteTableV2Response{}, err 4335 } 4336 respType.RawResponse = resp 4337 return respType, nil 4338} 4339 4340func (p *virtualHubRouteTableV2Poller) ResumeToken() (string, error) { 4341 return p.pt.ResumeToken() 4342} 4343 4344func (p *virtualHubRouteTableV2Poller) pollUntilDone(ctx context.Context, freq time.Duration) (VirtualHubRouteTableV2Response, error) { 4345 respType := VirtualHubRouteTableV2Response{VirtualHubRouteTableV2: &VirtualHubRouteTableV2{}} 4346 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VirtualHubRouteTableV2) 4347 if err != nil { 4348 return VirtualHubRouteTableV2Response{}, err 4349 } 4350 respType.RawResponse = resp 4351 return respType, nil 4352} 4353 4354// VirtualNetworkGatewayConnectionPoller provides polling facilities until the operation reaches a terminal state. 4355type VirtualNetworkGatewayConnectionPoller interface { 4356 azcore.Poller 4357 // FinalResponse performs a final GET to the service and returns the final response 4358 // for the polling operation. If there is an error performing the final GET then an error is returned. 4359 // If the final GET succeeded then the final VirtualNetworkGatewayConnectionResponse will be returned. 4360 FinalResponse(ctx context.Context) (VirtualNetworkGatewayConnectionResponse, error) 4361} 4362 4363type virtualNetworkGatewayConnectionPoller struct { 4364 pt *armcore.LROPoller 4365} 4366 4367func (p *virtualNetworkGatewayConnectionPoller) Done() bool { 4368 return p.pt.Done() 4369} 4370 4371func (p *virtualNetworkGatewayConnectionPoller) Poll(ctx context.Context) (*http.Response, error) { 4372 return p.pt.Poll(ctx) 4373} 4374 4375func (p *virtualNetworkGatewayConnectionPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewayConnectionResponse, error) { 4376 respType := VirtualNetworkGatewayConnectionResponse{VirtualNetworkGatewayConnection: &VirtualNetworkGatewayConnection{}} 4377 resp, err := p.pt.FinalResponse(ctx, respType.VirtualNetworkGatewayConnection) 4378 if err != nil { 4379 return VirtualNetworkGatewayConnectionResponse{}, err 4380 } 4381 respType.RawResponse = resp 4382 return respType, nil 4383} 4384 4385func (p *virtualNetworkGatewayConnectionPoller) ResumeToken() (string, error) { 4386 return p.pt.ResumeToken() 4387} 4388 4389func (p *virtualNetworkGatewayConnectionPoller) pollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewayConnectionResponse, error) { 4390 respType := VirtualNetworkGatewayConnectionResponse{VirtualNetworkGatewayConnection: &VirtualNetworkGatewayConnection{}} 4391 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VirtualNetworkGatewayConnection) 4392 if err != nil { 4393 return VirtualNetworkGatewayConnectionResponse{}, err 4394 } 4395 respType.RawResponse = resp 4396 return respType, nil 4397} 4398 4399// VirtualNetworkGatewayNatRulePoller provides polling facilities until the operation reaches a terminal state. 4400type VirtualNetworkGatewayNatRulePoller interface { 4401 azcore.Poller 4402 // FinalResponse performs a final GET to the service and returns the final response 4403 // for the polling operation. If there is an error performing the final GET then an error is returned. 4404 // If the final GET succeeded then the final VirtualNetworkGatewayNatRuleResponse will be returned. 4405 FinalResponse(ctx context.Context) (VirtualNetworkGatewayNatRuleResponse, error) 4406} 4407 4408type virtualNetworkGatewayNatRulePoller struct { 4409 pt *armcore.LROPoller 4410} 4411 4412func (p *virtualNetworkGatewayNatRulePoller) Done() bool { 4413 return p.pt.Done() 4414} 4415 4416func (p *virtualNetworkGatewayNatRulePoller) Poll(ctx context.Context) (*http.Response, error) { 4417 return p.pt.Poll(ctx) 4418} 4419 4420func (p *virtualNetworkGatewayNatRulePoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewayNatRuleResponse, error) { 4421 respType := VirtualNetworkGatewayNatRuleResponse{VirtualNetworkGatewayNatRule: &VirtualNetworkGatewayNatRule{}} 4422 resp, err := p.pt.FinalResponse(ctx, respType.VirtualNetworkGatewayNatRule) 4423 if err != nil { 4424 return VirtualNetworkGatewayNatRuleResponse{}, err 4425 } 4426 respType.RawResponse = resp 4427 return respType, nil 4428} 4429 4430func (p *virtualNetworkGatewayNatRulePoller) ResumeToken() (string, error) { 4431 return p.pt.ResumeToken() 4432} 4433 4434func (p *virtualNetworkGatewayNatRulePoller) pollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewayNatRuleResponse, error) { 4435 respType := VirtualNetworkGatewayNatRuleResponse{VirtualNetworkGatewayNatRule: &VirtualNetworkGatewayNatRule{}} 4436 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VirtualNetworkGatewayNatRule) 4437 if err != nil { 4438 return VirtualNetworkGatewayNatRuleResponse{}, err 4439 } 4440 respType.RawResponse = resp 4441 return respType, nil 4442} 4443 4444// VirtualNetworkGatewayPoller provides polling facilities until the operation reaches a terminal state. 4445type VirtualNetworkGatewayPoller interface { 4446 azcore.Poller 4447 // FinalResponse performs a final GET to the service and returns the final response 4448 // for the polling operation. If there is an error performing the final GET then an error is returned. 4449 // If the final GET succeeded then the final VirtualNetworkGatewayResponse will be returned. 4450 FinalResponse(ctx context.Context) (VirtualNetworkGatewayResponse, error) 4451} 4452 4453type virtualNetworkGatewayPoller struct { 4454 pt *armcore.LROPoller 4455} 4456 4457func (p *virtualNetworkGatewayPoller) Done() bool { 4458 return p.pt.Done() 4459} 4460 4461func (p *virtualNetworkGatewayPoller) Poll(ctx context.Context) (*http.Response, error) { 4462 return p.pt.Poll(ctx) 4463} 4464 4465func (p *virtualNetworkGatewayPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewayResponse, error) { 4466 respType := VirtualNetworkGatewayResponse{VirtualNetworkGateway: &VirtualNetworkGateway{}} 4467 resp, err := p.pt.FinalResponse(ctx, respType.VirtualNetworkGateway) 4468 if err != nil { 4469 return VirtualNetworkGatewayResponse{}, err 4470 } 4471 respType.RawResponse = resp 4472 return respType, nil 4473} 4474 4475func (p *virtualNetworkGatewayPoller) ResumeToken() (string, error) { 4476 return p.pt.ResumeToken() 4477} 4478 4479func (p *virtualNetworkGatewayPoller) pollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewayResponse, error) { 4480 respType := VirtualNetworkGatewayResponse{VirtualNetworkGateway: &VirtualNetworkGateway{}} 4481 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VirtualNetworkGateway) 4482 if err != nil { 4483 return VirtualNetworkGatewayResponse{}, err 4484 } 4485 respType.RawResponse = resp 4486 return respType, nil 4487} 4488 4489// VirtualNetworkPeeringPoller provides polling facilities until the operation reaches a terminal state. 4490type VirtualNetworkPeeringPoller interface { 4491 azcore.Poller 4492 // FinalResponse performs a final GET to the service and returns the final response 4493 // for the polling operation. If there is an error performing the final GET then an error is returned. 4494 // If the final GET succeeded then the final VirtualNetworkPeeringResponse will be returned. 4495 FinalResponse(ctx context.Context) (VirtualNetworkPeeringResponse, error) 4496} 4497 4498type virtualNetworkPeeringPoller struct { 4499 pt *armcore.LROPoller 4500} 4501 4502func (p *virtualNetworkPeeringPoller) Done() bool { 4503 return p.pt.Done() 4504} 4505 4506func (p *virtualNetworkPeeringPoller) Poll(ctx context.Context) (*http.Response, error) { 4507 return p.pt.Poll(ctx) 4508} 4509 4510func (p *virtualNetworkPeeringPoller) FinalResponse(ctx context.Context) (VirtualNetworkPeeringResponse, error) { 4511 respType := VirtualNetworkPeeringResponse{VirtualNetworkPeering: &VirtualNetworkPeering{}} 4512 resp, err := p.pt.FinalResponse(ctx, respType.VirtualNetworkPeering) 4513 if err != nil { 4514 return VirtualNetworkPeeringResponse{}, err 4515 } 4516 respType.RawResponse = resp 4517 return respType, nil 4518} 4519 4520func (p *virtualNetworkPeeringPoller) ResumeToken() (string, error) { 4521 return p.pt.ResumeToken() 4522} 4523 4524func (p *virtualNetworkPeeringPoller) pollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkPeeringResponse, error) { 4525 respType := VirtualNetworkPeeringResponse{VirtualNetworkPeering: &VirtualNetworkPeering{}} 4526 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VirtualNetworkPeering) 4527 if err != nil { 4528 return VirtualNetworkPeeringResponse{}, err 4529 } 4530 respType.RawResponse = resp 4531 return respType, nil 4532} 4533 4534// VirtualNetworkPoller provides polling facilities until the operation reaches a terminal state. 4535type VirtualNetworkPoller interface { 4536 azcore.Poller 4537 // FinalResponse performs a final GET to the service and returns the final response 4538 // for the polling operation. If there is an error performing the final GET then an error is returned. 4539 // If the final GET succeeded then the final VirtualNetworkResponse will be returned. 4540 FinalResponse(ctx context.Context) (VirtualNetworkResponse, error) 4541} 4542 4543type virtualNetworkPoller struct { 4544 pt *armcore.LROPoller 4545} 4546 4547func (p *virtualNetworkPoller) Done() bool { 4548 return p.pt.Done() 4549} 4550 4551func (p *virtualNetworkPoller) Poll(ctx context.Context) (*http.Response, error) { 4552 return p.pt.Poll(ctx) 4553} 4554 4555func (p *virtualNetworkPoller) FinalResponse(ctx context.Context) (VirtualNetworkResponse, error) { 4556 respType := VirtualNetworkResponse{VirtualNetwork: &VirtualNetwork{}} 4557 resp, err := p.pt.FinalResponse(ctx, respType.VirtualNetwork) 4558 if err != nil { 4559 return VirtualNetworkResponse{}, err 4560 } 4561 respType.RawResponse = resp 4562 return respType, nil 4563} 4564 4565func (p *virtualNetworkPoller) ResumeToken() (string, error) { 4566 return p.pt.ResumeToken() 4567} 4568 4569func (p *virtualNetworkPoller) pollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkResponse, error) { 4570 respType := VirtualNetworkResponse{VirtualNetwork: &VirtualNetwork{}} 4571 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VirtualNetwork) 4572 if err != nil { 4573 return VirtualNetworkResponse{}, err 4574 } 4575 respType.RawResponse = resp 4576 return respType, nil 4577} 4578 4579// VirtualNetworkTapPoller provides polling facilities until the operation reaches a terminal state. 4580type VirtualNetworkTapPoller interface { 4581 azcore.Poller 4582 // FinalResponse performs a final GET to the service and returns the final response 4583 // for the polling operation. If there is an error performing the final GET then an error is returned. 4584 // If the final GET succeeded then the final VirtualNetworkTapResponse will be returned. 4585 FinalResponse(ctx context.Context) (VirtualNetworkTapResponse, error) 4586} 4587 4588type virtualNetworkTapPoller struct { 4589 pt *armcore.LROPoller 4590} 4591 4592func (p *virtualNetworkTapPoller) Done() bool { 4593 return p.pt.Done() 4594} 4595 4596func (p *virtualNetworkTapPoller) Poll(ctx context.Context) (*http.Response, error) { 4597 return p.pt.Poll(ctx) 4598} 4599 4600func (p *virtualNetworkTapPoller) FinalResponse(ctx context.Context) (VirtualNetworkTapResponse, error) { 4601 respType := VirtualNetworkTapResponse{VirtualNetworkTap: &VirtualNetworkTap{}} 4602 resp, err := p.pt.FinalResponse(ctx, respType.VirtualNetworkTap) 4603 if err != nil { 4604 return VirtualNetworkTapResponse{}, err 4605 } 4606 respType.RawResponse = resp 4607 return respType, nil 4608} 4609 4610func (p *virtualNetworkTapPoller) ResumeToken() (string, error) { 4611 return p.pt.ResumeToken() 4612} 4613 4614func (p *virtualNetworkTapPoller) pollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkTapResponse, error) { 4615 respType := VirtualNetworkTapResponse{VirtualNetworkTap: &VirtualNetworkTap{}} 4616 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VirtualNetworkTap) 4617 if err != nil { 4618 return VirtualNetworkTapResponse{}, err 4619 } 4620 respType.RawResponse = resp 4621 return respType, nil 4622} 4623 4624// VirtualRouterPeeringPoller provides polling facilities until the operation reaches a terminal state. 4625type VirtualRouterPeeringPoller interface { 4626 azcore.Poller 4627 // FinalResponse performs a final GET to the service and returns the final response 4628 // for the polling operation. If there is an error performing the final GET then an error is returned. 4629 // If the final GET succeeded then the final VirtualRouterPeeringResponse will be returned. 4630 FinalResponse(ctx context.Context) (VirtualRouterPeeringResponse, error) 4631} 4632 4633type virtualRouterPeeringPoller struct { 4634 pt *armcore.LROPoller 4635} 4636 4637func (p *virtualRouterPeeringPoller) Done() bool { 4638 return p.pt.Done() 4639} 4640 4641func (p *virtualRouterPeeringPoller) Poll(ctx context.Context) (*http.Response, error) { 4642 return p.pt.Poll(ctx) 4643} 4644 4645func (p *virtualRouterPeeringPoller) FinalResponse(ctx context.Context) (VirtualRouterPeeringResponse, error) { 4646 respType := VirtualRouterPeeringResponse{VirtualRouterPeering: &VirtualRouterPeering{}} 4647 resp, err := p.pt.FinalResponse(ctx, respType.VirtualRouterPeering) 4648 if err != nil { 4649 return VirtualRouterPeeringResponse{}, err 4650 } 4651 respType.RawResponse = resp 4652 return respType, nil 4653} 4654 4655func (p *virtualRouterPeeringPoller) ResumeToken() (string, error) { 4656 return p.pt.ResumeToken() 4657} 4658 4659func (p *virtualRouterPeeringPoller) pollUntilDone(ctx context.Context, freq time.Duration) (VirtualRouterPeeringResponse, error) { 4660 respType := VirtualRouterPeeringResponse{VirtualRouterPeering: &VirtualRouterPeering{}} 4661 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VirtualRouterPeering) 4662 if err != nil { 4663 return VirtualRouterPeeringResponse{}, err 4664 } 4665 respType.RawResponse = resp 4666 return respType, nil 4667} 4668 4669// VirtualRouterPoller provides polling facilities until the operation reaches a terminal state. 4670type VirtualRouterPoller interface { 4671 azcore.Poller 4672 // FinalResponse performs a final GET to the service and returns the final response 4673 // for the polling operation. If there is an error performing the final GET then an error is returned. 4674 // If the final GET succeeded then the final VirtualRouterResponse will be returned. 4675 FinalResponse(ctx context.Context) (VirtualRouterResponse, error) 4676} 4677 4678type virtualRouterPoller struct { 4679 pt *armcore.LROPoller 4680} 4681 4682func (p *virtualRouterPoller) Done() bool { 4683 return p.pt.Done() 4684} 4685 4686func (p *virtualRouterPoller) Poll(ctx context.Context) (*http.Response, error) { 4687 return p.pt.Poll(ctx) 4688} 4689 4690func (p *virtualRouterPoller) FinalResponse(ctx context.Context) (VirtualRouterResponse, error) { 4691 respType := VirtualRouterResponse{VirtualRouter: &VirtualRouter{}} 4692 resp, err := p.pt.FinalResponse(ctx, respType.VirtualRouter) 4693 if err != nil { 4694 return VirtualRouterResponse{}, err 4695 } 4696 respType.RawResponse = resp 4697 return respType, nil 4698} 4699 4700func (p *virtualRouterPoller) ResumeToken() (string, error) { 4701 return p.pt.ResumeToken() 4702} 4703 4704func (p *virtualRouterPoller) pollUntilDone(ctx context.Context, freq time.Duration) (VirtualRouterResponse, error) { 4705 respType := VirtualRouterResponse{VirtualRouter: &VirtualRouter{}} 4706 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VirtualRouter) 4707 if err != nil { 4708 return VirtualRouterResponse{}, err 4709 } 4710 respType.RawResponse = resp 4711 return respType, nil 4712} 4713 4714// VirtualWANPoller provides polling facilities until the operation reaches a terminal state. 4715type VirtualWANPoller interface { 4716 azcore.Poller 4717 // FinalResponse performs a final GET to the service and returns the final response 4718 // for the polling operation. If there is an error performing the final GET then an error is returned. 4719 // If the final GET succeeded then the final VirtualWANResponse will be returned. 4720 FinalResponse(ctx context.Context) (VirtualWANResponse, error) 4721} 4722 4723type virtualWANPoller struct { 4724 pt *armcore.LROPoller 4725} 4726 4727func (p *virtualWANPoller) Done() bool { 4728 return p.pt.Done() 4729} 4730 4731func (p *virtualWANPoller) Poll(ctx context.Context) (*http.Response, error) { 4732 return p.pt.Poll(ctx) 4733} 4734 4735func (p *virtualWANPoller) FinalResponse(ctx context.Context) (VirtualWANResponse, error) { 4736 respType := VirtualWANResponse{VirtualWAN: &VirtualWAN{}} 4737 resp, err := p.pt.FinalResponse(ctx, respType.VirtualWAN) 4738 if err != nil { 4739 return VirtualWANResponse{}, err 4740 } 4741 respType.RawResponse = resp 4742 return respType, nil 4743} 4744 4745func (p *virtualWANPoller) ResumeToken() (string, error) { 4746 return p.pt.ResumeToken() 4747} 4748 4749func (p *virtualWANPoller) pollUntilDone(ctx context.Context, freq time.Duration) (VirtualWANResponse, error) { 4750 respType := VirtualWANResponse{VirtualWAN: &VirtualWAN{}} 4751 resp, err := p.pt.PollUntilDone(ctx, freq, respType.VirtualWAN) 4752 if err != nil { 4753 return VirtualWANResponse{}, err 4754 } 4755 respType.RawResponse = resp 4756 return respType, nil 4757} 4758