1 package siterecovery
2
3
4
5
6
7
8
9 import (
10 "context"
11 "github.com/Azure/go-autorest/autorest"
12 "github.com/Azure/go-autorest/autorest/azure"
13 "github.com/Azure/go-autorest/tracing"
14 "net/http"
15 )
16
17
18
19 type ReplicationRecoveryServicesProvidersClient struct {
20 BaseClient
21 }
22
23
24
25 func NewReplicationRecoveryServicesProvidersClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationRecoveryServicesProvidersClient {
26 return NewReplicationRecoveryServicesProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName)
27 }
28
29
30
31
32 func NewReplicationRecoveryServicesProvidersClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationRecoveryServicesProvidersClient {
33 return ReplicationRecoveryServicesProvidersClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)}
34 }
35
36
37
38
39
40 func (client ReplicationRecoveryServicesProvidersClient) Delete(ctx context.Context, fabricName string, providerName string) (result ReplicationRecoveryServicesProvidersDeleteFuture, err error) {
41 if tracing.IsEnabled() {
42 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.Delete")
43 defer func() {
44 sc := -1
45 if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
46 sc = result.FutureAPI.Response().StatusCode
47 }
48 tracing.EndSpan(ctx, sc, err)
49 }()
50 }
51 req, err := client.DeletePreparer(ctx, fabricName, providerName)
52 if err != nil {
53 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Delete", nil, "Failure preparing request")
54 return
55 }
56
57 result, err = client.DeleteSender(req)
58 if err != nil {
59 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Delete", result.Response(), "Failure sending request")
60 return
61 }
62
63 return
64 }
65
66
67 func (client ReplicationRecoveryServicesProvidersClient) DeletePreparer(ctx context.Context, fabricName string, providerName string) (*http.Request, error) {
68 pathParameters := map[string]interface{}{
69 "fabricName": autorest.Encode("path", fabricName),
70 "providerName": autorest.Encode("path", providerName),
71 "resourceGroupName": autorest.Encode("path", client.ResourceGroupName),
72 "resourceName": autorest.Encode("path", client.ResourceName),
73 "subscriptionId": autorest.Encode("path", client.SubscriptionID),
74 }
75
76 const APIVersion = "2016-08-10"
77 queryParameters := map[string]interface{}{
78 "api-version": APIVersion,
79 }
80
81 preparer := autorest.CreatePreparer(
82 autorest.AsPost(),
83 autorest.WithBaseURL(client.BaseURI),
84 autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/remove", pathParameters),
85 autorest.WithQueryParameters(queryParameters))
86 return preparer.Prepare((&http.Request{}).WithContext(ctx))
87 }
88
89
90
91 func (client ReplicationRecoveryServicesProvidersClient) DeleteSender(req *http.Request) (future ReplicationRecoveryServicesProvidersDeleteFuture, err error) {
92 var resp *http.Response
93 future.FutureAPI = &azure.Future{}
94 resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
95 if err != nil {
96 return
97 }
98 var azf azure.Future
99 azf, err = azure.NewFutureFromResponse(resp)
100 future.FutureAPI = &azf
101 future.Result = future.result
102 return
103 }
104
105
106
107 func (client ReplicationRecoveryServicesProvidersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
108 err = autorest.Respond(
109 resp,
110 azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
111 autorest.ByClosing())
112 result.Response = resp
113 return
114 }
115
116
117
118
119
120 func (client ReplicationRecoveryServicesProvidersClient) Get(ctx context.Context, fabricName string, providerName string) (result RecoveryServicesProvider, err error) {
121 if tracing.IsEnabled() {
122 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.Get")
123 defer func() {
124 sc := -1
125 if result.Response.Response != nil {
126 sc = result.Response.Response.StatusCode
127 }
128 tracing.EndSpan(ctx, sc, err)
129 }()
130 }
131 req, err := client.GetPreparer(ctx, fabricName, providerName)
132 if err != nil {
133 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Get", nil, "Failure preparing request")
134 return
135 }
136
137 resp, err := client.GetSender(req)
138 if err != nil {
139 result.Response = autorest.Response{Response: resp}
140 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Get", resp, "Failure sending request")
141 return
142 }
143
144 result, err = client.GetResponder(resp)
145 if err != nil {
146 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Get", resp, "Failure responding to request")
147 return
148 }
149
150 return
151 }
152
153
154 func (client ReplicationRecoveryServicesProvidersClient) GetPreparer(ctx context.Context, fabricName string, providerName string) (*http.Request, error) {
155 pathParameters := map[string]interface{}{
156 "fabricName": autorest.Encode("path", fabricName),
157 "providerName": autorest.Encode("path", providerName),
158 "resourceGroupName": autorest.Encode("path", client.ResourceGroupName),
159 "resourceName": autorest.Encode("path", client.ResourceName),
160 "subscriptionId": autorest.Encode("path", client.SubscriptionID),
161 }
162
163 const APIVersion = "2016-08-10"
164 queryParameters := map[string]interface{}{
165 "api-version": APIVersion,
166 }
167
168 preparer := autorest.CreatePreparer(
169 autorest.AsGet(),
170 autorest.WithBaseURL(client.BaseURI),
171 autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}", pathParameters),
172 autorest.WithQueryParameters(queryParameters))
173 return preparer.Prepare((&http.Request{}).WithContext(ctx))
174 }
175
176
177
178 func (client ReplicationRecoveryServicesProvidersClient) GetSender(req *http.Request) (*http.Response, error) {
179 return client.Send(req, azure.DoRetryWithRegistration(client.Client))
180 }
181
182
183
184 func (client ReplicationRecoveryServicesProvidersClient) GetResponder(resp *http.Response) (result RecoveryServicesProvider, err error) {
185 err = autorest.Respond(
186 resp,
187 azure.WithErrorUnlessStatusCode(http.StatusOK),
188 autorest.ByUnmarshallingJSON(&result),
189 autorest.ByClosing())
190 result.Response = autorest.Response{Response: resp}
191 return
192 }
193
194
195 func (client ReplicationRecoveryServicesProvidersClient) List(ctx context.Context) (result RecoveryServicesProviderCollectionPage, err error) {
196 if tracing.IsEnabled() {
197 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.List")
198 defer func() {
199 sc := -1
200 if result.rspc.Response.Response != nil {
201 sc = result.rspc.Response.Response.StatusCode
202 }
203 tracing.EndSpan(ctx, sc, err)
204 }()
205 }
206 result.fn = client.listNextResults
207 req, err := client.ListPreparer(ctx)
208 if err != nil {
209 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "List", nil, "Failure preparing request")
210 return
211 }
212
213 resp, err := client.ListSender(req)
214 if err != nil {
215 result.rspc.Response = autorest.Response{Response: resp}
216 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "List", resp, "Failure sending request")
217 return
218 }
219
220 result.rspc, err = client.ListResponder(resp)
221 if err != nil {
222 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "List", resp, "Failure responding to request")
223 return
224 }
225 if result.rspc.hasNextLink() && result.rspc.IsEmpty() {
226 err = result.NextWithContext(ctx)
227 return
228 }
229
230 return
231 }
232
233
234 func (client ReplicationRecoveryServicesProvidersClient) ListPreparer(ctx context.Context) (*http.Request, error) {
235 pathParameters := map[string]interface{}{
236 "resourceGroupName": autorest.Encode("path", client.ResourceGroupName),
237 "resourceName": autorest.Encode("path", client.ResourceName),
238 "subscriptionId": autorest.Encode("path", client.SubscriptionID),
239 }
240
241 const APIVersion = "2016-08-10"
242 queryParameters := map[string]interface{}{
243 "api-version": APIVersion,
244 }
245
246 preparer := autorest.CreatePreparer(
247 autorest.AsGet(),
248 autorest.WithBaseURL(client.BaseURI),
249 autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryServicesProviders", pathParameters),
250 autorest.WithQueryParameters(queryParameters))
251 return preparer.Prepare((&http.Request{}).WithContext(ctx))
252 }
253
254
255
256 func (client ReplicationRecoveryServicesProvidersClient) ListSender(req *http.Request) (*http.Response, error) {
257 return client.Send(req, azure.DoRetryWithRegistration(client.Client))
258 }
259
260
261
262 func (client ReplicationRecoveryServicesProvidersClient) ListResponder(resp *http.Response) (result RecoveryServicesProviderCollection, err error) {
263 err = autorest.Respond(
264 resp,
265 azure.WithErrorUnlessStatusCode(http.StatusOK),
266 autorest.ByUnmarshallingJSON(&result),
267 autorest.ByClosing())
268 result.Response = autorest.Response{Response: resp}
269 return
270 }
271
272
273 func (client ReplicationRecoveryServicesProvidersClient) listNextResults(ctx context.Context, lastResults RecoveryServicesProviderCollection) (result RecoveryServicesProviderCollection, err error) {
274 req, err := lastResults.recoveryServicesProviderCollectionPreparer(ctx)
275 if err != nil {
276 return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "listNextResults", nil, "Failure preparing next results request")
277 }
278 if req == nil {
279 return
280 }
281 resp, err := client.ListSender(req)
282 if err != nil {
283 result.Response = autorest.Response{Response: resp}
284 return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "listNextResults", resp, "Failure sending next results request")
285 }
286 result, err = client.ListResponder(resp)
287 if err != nil {
288 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "listNextResults", resp, "Failure responding to next results request")
289 }
290 return
291 }
292
293
294 func (client ReplicationRecoveryServicesProvidersClient) ListComplete(ctx context.Context) (result RecoveryServicesProviderCollectionIterator, err error) {
295 if tracing.IsEnabled() {
296 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.List")
297 defer func() {
298 sc := -1
299 if result.Response().Response.Response != nil {
300 sc = result.page.Response().Response.Response.StatusCode
301 }
302 tracing.EndSpan(ctx, sc, err)
303 }()
304 }
305 result.page, err = client.List(ctx)
306 return
307 }
308
309
310
311
312 func (client ReplicationRecoveryServicesProvidersClient) ListByReplicationFabrics(ctx context.Context, fabricName string) (result RecoveryServicesProviderCollectionPage, err error) {
313 if tracing.IsEnabled() {
314 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.ListByReplicationFabrics")
315 defer func() {
316 sc := -1
317 if result.rspc.Response.Response != nil {
318 sc = result.rspc.Response.Response.StatusCode
319 }
320 tracing.EndSpan(ctx, sc, err)
321 }()
322 }
323 result.fn = client.listByReplicationFabricsNextResults
324 req, err := client.ListByReplicationFabricsPreparer(ctx, fabricName)
325 if err != nil {
326 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "ListByReplicationFabrics", nil, "Failure preparing request")
327 return
328 }
329
330 resp, err := client.ListByReplicationFabricsSender(req)
331 if err != nil {
332 result.rspc.Response = autorest.Response{Response: resp}
333 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "ListByReplicationFabrics", resp, "Failure sending request")
334 return
335 }
336
337 result.rspc, err = client.ListByReplicationFabricsResponder(resp)
338 if err != nil {
339 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "ListByReplicationFabrics", resp, "Failure responding to request")
340 return
341 }
342 if result.rspc.hasNextLink() && result.rspc.IsEmpty() {
343 err = result.NextWithContext(ctx)
344 return
345 }
346
347 return
348 }
349
350
351 func (client ReplicationRecoveryServicesProvidersClient) ListByReplicationFabricsPreparer(ctx context.Context, fabricName string) (*http.Request, error) {
352 pathParameters := map[string]interface{}{
353 "fabricName": autorest.Encode("path", fabricName),
354 "resourceGroupName": autorest.Encode("path", client.ResourceGroupName),
355 "resourceName": autorest.Encode("path", client.ResourceName),
356 "subscriptionId": autorest.Encode("path", client.SubscriptionID),
357 }
358
359 const APIVersion = "2016-08-10"
360 queryParameters := map[string]interface{}{
361 "api-version": APIVersion,
362 }
363
364 preparer := autorest.CreatePreparer(
365 autorest.AsGet(),
366 autorest.WithBaseURL(client.BaseURI),
367 autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders", pathParameters),
368 autorest.WithQueryParameters(queryParameters))
369 return preparer.Prepare((&http.Request{}).WithContext(ctx))
370 }
371
372
373
374 func (client ReplicationRecoveryServicesProvidersClient) ListByReplicationFabricsSender(req *http.Request) (*http.Response, error) {
375 return client.Send(req, azure.DoRetryWithRegistration(client.Client))
376 }
377
378
379
380 func (client ReplicationRecoveryServicesProvidersClient) ListByReplicationFabricsResponder(resp *http.Response) (result RecoveryServicesProviderCollection, err error) {
381 err = autorest.Respond(
382 resp,
383 azure.WithErrorUnlessStatusCode(http.StatusOK),
384 autorest.ByUnmarshallingJSON(&result),
385 autorest.ByClosing())
386 result.Response = autorest.Response{Response: resp}
387 return
388 }
389
390
391 func (client ReplicationRecoveryServicesProvidersClient) listByReplicationFabricsNextResults(ctx context.Context, lastResults RecoveryServicesProviderCollection) (result RecoveryServicesProviderCollection, err error) {
392 req, err := lastResults.recoveryServicesProviderCollectionPreparer(ctx)
393 if err != nil {
394 return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "listByReplicationFabricsNextResults", nil, "Failure preparing next results request")
395 }
396 if req == nil {
397 return
398 }
399 resp, err := client.ListByReplicationFabricsSender(req)
400 if err != nil {
401 result.Response = autorest.Response{Response: resp}
402 return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "listByReplicationFabricsNextResults", resp, "Failure sending next results request")
403 }
404 result, err = client.ListByReplicationFabricsResponder(resp)
405 if err != nil {
406 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "listByReplicationFabricsNextResults", resp, "Failure responding to next results request")
407 }
408 return
409 }
410
411
412 func (client ReplicationRecoveryServicesProvidersClient) ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result RecoveryServicesProviderCollectionIterator, err error) {
413 if tracing.IsEnabled() {
414 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.ListByReplicationFabrics")
415 defer func() {
416 sc := -1
417 if result.Response().Response.Response != nil {
418 sc = result.page.Response().Response.Response.StatusCode
419 }
420 tracing.EndSpan(ctx, sc, err)
421 }()
422 }
423 result.page, err = client.ListByReplicationFabrics(ctx, fabricName)
424 return
425 }
426
427
428
429
430
431 func (client ReplicationRecoveryServicesProvidersClient) Purge(ctx context.Context, fabricName string, providerName string) (result ReplicationRecoveryServicesProvidersPurgeFuture, err error) {
432 if tracing.IsEnabled() {
433 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.Purge")
434 defer func() {
435 sc := -1
436 if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
437 sc = result.FutureAPI.Response().StatusCode
438 }
439 tracing.EndSpan(ctx, sc, err)
440 }()
441 }
442 req, err := client.PurgePreparer(ctx, fabricName, providerName)
443 if err != nil {
444 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Purge", nil, "Failure preparing request")
445 return
446 }
447
448 result, err = client.PurgeSender(req)
449 if err != nil {
450 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Purge", result.Response(), "Failure sending request")
451 return
452 }
453
454 return
455 }
456
457
458 func (client ReplicationRecoveryServicesProvidersClient) PurgePreparer(ctx context.Context, fabricName string, providerName string) (*http.Request, error) {
459 pathParameters := map[string]interface{}{
460 "fabricName": autorest.Encode("path", fabricName),
461 "providerName": autorest.Encode("path", providerName),
462 "resourceGroupName": autorest.Encode("path", client.ResourceGroupName),
463 "resourceName": autorest.Encode("path", client.ResourceName),
464 "subscriptionId": autorest.Encode("path", client.SubscriptionID),
465 }
466
467 const APIVersion = "2016-08-10"
468 queryParameters := map[string]interface{}{
469 "api-version": APIVersion,
470 }
471
472 preparer := autorest.CreatePreparer(
473 autorest.AsDelete(),
474 autorest.WithBaseURL(client.BaseURI),
475 autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}", pathParameters),
476 autorest.WithQueryParameters(queryParameters))
477 return preparer.Prepare((&http.Request{}).WithContext(ctx))
478 }
479
480
481
482 func (client ReplicationRecoveryServicesProvidersClient) PurgeSender(req *http.Request) (future ReplicationRecoveryServicesProvidersPurgeFuture, err error) {
483 var resp *http.Response
484 future.FutureAPI = &azure.Future{}
485 resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
486 if err != nil {
487 return
488 }
489 var azf azure.Future
490 azf, err = azure.NewFutureFromResponse(resp)
491 future.FutureAPI = &azf
492 future.Result = future.result
493 return
494 }
495
496
497
498 func (client ReplicationRecoveryServicesProvidersClient) PurgeResponder(resp *http.Response) (result autorest.Response, err error) {
499 err = autorest.Respond(
500 resp,
501 azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
502 autorest.ByClosing())
503 result.Response = resp
504 return
505 }
506
507
508
509
510
511 func (client ReplicationRecoveryServicesProvidersClient) RefreshProvider(ctx context.Context, fabricName string, providerName string) (result ReplicationRecoveryServicesProvidersRefreshProviderFuture, err error) {
512 if tracing.IsEnabled() {
513 ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.RefreshProvider")
514 defer func() {
515 sc := -1
516 if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
517 sc = result.FutureAPI.Response().StatusCode
518 }
519 tracing.EndSpan(ctx, sc, err)
520 }()
521 }
522 req, err := client.RefreshProviderPreparer(ctx, fabricName, providerName)
523 if err != nil {
524 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "RefreshProvider", nil, "Failure preparing request")
525 return
526 }
527
528 result, err = client.RefreshProviderSender(req)
529 if err != nil {
530 err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "RefreshProvider", result.Response(), "Failure sending request")
531 return
532 }
533
534 return
535 }
536
537
538 func (client ReplicationRecoveryServicesProvidersClient) RefreshProviderPreparer(ctx context.Context, fabricName string, providerName string) (*http.Request, error) {
539 pathParameters := map[string]interface{}{
540 "fabricName": autorest.Encode("path", fabricName),
541 "providerName": autorest.Encode("path", providerName),
542 "resourceGroupName": autorest.Encode("path", client.ResourceGroupName),
543 "resourceName": autorest.Encode("path", client.ResourceName),
544 "subscriptionId": autorest.Encode("path", client.SubscriptionID),
545 }
546
547 const APIVersion = "2016-08-10"
548 queryParameters := map[string]interface{}{
549 "api-version": APIVersion,
550 }
551
552 preparer := autorest.CreatePreparer(
553 autorest.AsPost(),
554 autorest.WithBaseURL(client.BaseURI),
555 autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/refreshProvider", pathParameters),
556 autorest.WithQueryParameters(queryParameters))
557 return preparer.Prepare((&http.Request{}).WithContext(ctx))
558 }
559
560
561
562 func (client ReplicationRecoveryServicesProvidersClient) RefreshProviderSender(req *http.Request) (future ReplicationRecoveryServicesProvidersRefreshProviderFuture, err error) {
563 var resp *http.Response
564 future.FutureAPI = &azure.Future{}
565 resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
566 if err != nil {
567 return
568 }
569 var azf azure.Future
570 azf, err = azure.NewFutureFromResponse(resp)
571 future.FutureAPI = &azf
572 future.Result = future.result
573 return
574 }
575
576
577
578 func (client ReplicationRecoveryServicesProvidersClient) RefreshProviderResponder(resp *http.Response) (result RecoveryServicesProvider, err error) {
579 err = autorest.Respond(
580 resp,
581 azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
582 autorest.ByUnmarshallingJSON(&result),
583 autorest.ByClosing())
584 result.Response = autorest.Response{Response: resp}
585 return
586 }
587
View as plain text