1package network
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//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
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// PublicIPPrefixesClient is the network Client
18type PublicIPPrefixesClient struct {
19	BaseClient
20}
21
22// NewPublicIPPrefixesClient creates an instance of the PublicIPPrefixesClient client.
23func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient {
24	return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID)
25}
26
27// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client using a custom
28// endpoint.  Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
29// stack).
30func NewPublicIPPrefixesClientWithBaseURI(baseURI string, subscriptionID string) PublicIPPrefixesClient {
31	return PublicIPPrefixesClient{NewWithBaseURI(baseURI, subscriptionID)}
32}
33
34// CreateOrUpdate creates or updates a static or dynamic public IP prefix.
35// Parameters:
36// resourceGroupName - the name of the resource group.
37// publicIPPrefixName - the name of the public IP prefix.
38// parameters - parameters supplied to the create or update public IP prefix operation.
39func (client PublicIPPrefixesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix) (result PublicIPPrefixesCreateOrUpdateFuture, err error) {
40	if tracing.IsEnabled() {
41		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.CreateOrUpdate")
42		defer func() {
43			sc := -1
44			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
45				sc = result.FutureAPI.Response().StatusCode
46			}
47			tracing.EndSpan(ctx, sc, err)
48		}()
49	}
50	req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, publicIPPrefixName, parameters)
51	if err != nil {
52		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", nil, "Failure preparing request")
53		return
54	}
55
56	result, err = client.CreateOrUpdateSender(req)
57	if err != nil {
58		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", nil, "Failure sending request")
59		return
60	}
61
62	return
63}
64
65// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
66func (client PublicIPPrefixesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix) (*http.Request, error) {
67	pathParameters := map[string]interface{}{
68		"publicIpPrefixName": autorest.Encode("path", publicIPPrefixName),
69		"resourceGroupName":  autorest.Encode("path", resourceGroupName),
70		"subscriptionId":     autorest.Encode("path", client.SubscriptionID),
71	}
72
73	const APIVersion = "2018-10-01"
74	queryParameters := map[string]interface{}{
75		"api-version": APIVersion,
76	}
77
78	preparer := autorest.CreatePreparer(
79		autorest.AsContentType("application/json; charset=utf-8"),
80		autorest.AsPut(),
81		autorest.WithBaseURL(client.BaseURI),
82		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}", pathParameters),
83		autorest.WithJSON(parameters),
84		autorest.WithQueryParameters(queryParameters))
85	return preparer.Prepare((&http.Request{}).WithContext(ctx))
86}
87
88// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
89// http.Response Body if it receives an error.
90func (client PublicIPPrefixesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPPrefixesCreateOrUpdateFuture, err error) {
91	var resp *http.Response
92	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
93	if err != nil {
94		return
95	}
96	var azf azure.Future
97	azf, err = azure.NewFutureFromResponse(resp)
98	future.FutureAPI = &azf
99	future.Result = future.result
100	return
101}
102
103// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
104// closes the http.Response Body.
105func (client PublicIPPrefixesClient) CreateOrUpdateResponder(resp *http.Response) (result PublicIPPrefix, err error) {
106	err = autorest.Respond(
107		resp,
108		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
109		autorest.ByUnmarshallingJSON(&result),
110		autorest.ByClosing())
111	result.Response = autorest.Response{Response: resp}
112	return
113}
114
115// Delete deletes the specified public IP prefix.
116// Parameters:
117// resourceGroupName - the name of the resource group.
118// publicIPPrefixName - the name of the PublicIpPrefix.
119func (client PublicIPPrefixesClient) Delete(ctx context.Context, resourceGroupName string, publicIPPrefixName string) (result PublicIPPrefixesDeleteFuture, err error) {
120	if tracing.IsEnabled() {
121		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.Delete")
122		defer func() {
123			sc := -1
124			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
125				sc = result.FutureAPI.Response().StatusCode
126			}
127			tracing.EndSpan(ctx, sc, err)
128		}()
129	}
130	req, err := client.DeletePreparer(ctx, resourceGroupName, publicIPPrefixName)
131	if err != nil {
132		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Delete", nil, "Failure preparing request")
133		return
134	}
135
136	result, err = client.DeleteSender(req)
137	if err != nil {
138		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Delete", nil, "Failure sending request")
139		return
140	}
141
142	return
143}
144
145// DeletePreparer prepares the Delete request.
146func (client PublicIPPrefixesClient) DeletePreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string) (*http.Request, error) {
147	pathParameters := map[string]interface{}{
148		"publicIpPrefixName": autorest.Encode("path", publicIPPrefixName),
149		"resourceGroupName":  autorest.Encode("path", resourceGroupName),
150		"subscriptionId":     autorest.Encode("path", client.SubscriptionID),
151	}
152
153	const APIVersion = "2018-10-01"
154	queryParameters := map[string]interface{}{
155		"api-version": APIVersion,
156	}
157
158	preparer := autorest.CreatePreparer(
159		autorest.AsDelete(),
160		autorest.WithBaseURL(client.BaseURI),
161		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}", pathParameters),
162		autorest.WithQueryParameters(queryParameters))
163	return preparer.Prepare((&http.Request{}).WithContext(ctx))
164}
165
166// DeleteSender sends the Delete request. The method will close the
167// http.Response Body if it receives an error.
168func (client PublicIPPrefixesClient) DeleteSender(req *http.Request) (future PublicIPPrefixesDeleteFuture, err error) {
169	var resp *http.Response
170	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
171	if err != nil {
172		return
173	}
174	var azf azure.Future
175	azf, err = azure.NewFutureFromResponse(resp)
176	future.FutureAPI = &azf
177	future.Result = future.result
178	return
179}
180
181// DeleteResponder handles the response to the Delete request. The method always
182// closes the http.Response Body.
183func (client PublicIPPrefixesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
184	err = autorest.Respond(
185		resp,
186		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
187		autorest.ByClosing())
188	result.Response = resp
189	return
190}
191
192// Get gets the specified public IP prefix in a specified resource group.
193// Parameters:
194// resourceGroupName - the name of the resource group.
195// publicIPPrefixName - the name of the Public IP Prefix.
196// expand - expands referenced resources.
197func (client PublicIPPrefixesClient) Get(ctx context.Context, resourceGroupName string, publicIPPrefixName string, expand string) (result PublicIPPrefix, err error) {
198	if tracing.IsEnabled() {
199		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.Get")
200		defer func() {
201			sc := -1
202			if result.Response.Response != nil {
203				sc = result.Response.Response.StatusCode
204			}
205			tracing.EndSpan(ctx, sc, err)
206		}()
207	}
208	req, err := client.GetPreparer(ctx, resourceGroupName, publicIPPrefixName, expand)
209	if err != nil {
210		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Get", nil, "Failure preparing request")
211		return
212	}
213
214	resp, err := client.GetSender(req)
215	if err != nil {
216		result.Response = autorest.Response{Response: resp}
217		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Get", resp, "Failure sending request")
218		return
219	}
220
221	result, err = client.GetResponder(resp)
222	if err != nil {
223		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Get", resp, "Failure responding to request")
224		return
225	}
226
227	return
228}
229
230// GetPreparer prepares the Get request.
231func (client PublicIPPrefixesClient) GetPreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string, expand string) (*http.Request, error) {
232	pathParameters := map[string]interface{}{
233		"publicIpPrefixName": autorest.Encode("path", publicIPPrefixName),
234		"resourceGroupName":  autorest.Encode("path", resourceGroupName),
235		"subscriptionId":     autorest.Encode("path", client.SubscriptionID),
236	}
237
238	const APIVersion = "2018-10-01"
239	queryParameters := map[string]interface{}{
240		"api-version": APIVersion,
241	}
242	if len(expand) > 0 {
243		queryParameters["$expand"] = autorest.Encode("query", expand)
244	}
245
246	preparer := autorest.CreatePreparer(
247		autorest.AsGet(),
248		autorest.WithBaseURL(client.BaseURI),
249		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}", pathParameters),
250		autorest.WithQueryParameters(queryParameters))
251	return preparer.Prepare((&http.Request{}).WithContext(ctx))
252}
253
254// GetSender sends the Get request. The method will close the
255// http.Response Body if it receives an error.
256func (client PublicIPPrefixesClient) GetSender(req *http.Request) (*http.Response, error) {
257	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
258}
259
260// GetResponder handles the response to the Get request. The method always
261// closes the http.Response Body.
262func (client PublicIPPrefixesClient) GetResponder(resp *http.Response) (result PublicIPPrefix, 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// List gets all public IP prefixes in a resource group.
273// Parameters:
274// resourceGroupName - the name of the resource group.
275func (client PublicIPPrefixesClient) List(ctx context.Context, resourceGroupName string) (result PublicIPPrefixListResultPage, err error) {
276	if tracing.IsEnabled() {
277		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.List")
278		defer func() {
279			sc := -1
280			if result.piplr.Response.Response != nil {
281				sc = result.piplr.Response.Response.StatusCode
282			}
283			tracing.EndSpan(ctx, sc, err)
284		}()
285	}
286	result.fn = client.listNextResults
287	req, err := client.ListPreparer(ctx, resourceGroupName)
288	if err != nil {
289		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "List", nil, "Failure preparing request")
290		return
291	}
292
293	resp, err := client.ListSender(req)
294	if err != nil {
295		result.piplr.Response = autorest.Response{Response: resp}
296		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "List", resp, "Failure sending request")
297		return
298	}
299
300	result.piplr, err = client.ListResponder(resp)
301	if err != nil {
302		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "List", resp, "Failure responding to request")
303		return
304	}
305	if result.piplr.hasNextLink() && result.piplr.IsEmpty() {
306		err = result.NextWithContext(ctx)
307		return
308	}
309
310	return
311}
312
313// ListPreparer prepares the List request.
314func (client PublicIPPrefixesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
315	pathParameters := map[string]interface{}{
316		"resourceGroupName": autorest.Encode("path", resourceGroupName),
317		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
318	}
319
320	const APIVersion = "2018-10-01"
321	queryParameters := map[string]interface{}{
322		"api-version": APIVersion,
323	}
324
325	preparer := autorest.CreatePreparer(
326		autorest.AsGet(),
327		autorest.WithBaseURL(client.BaseURI),
328		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes", pathParameters),
329		autorest.WithQueryParameters(queryParameters))
330	return preparer.Prepare((&http.Request{}).WithContext(ctx))
331}
332
333// ListSender sends the List request. The method will close the
334// http.Response Body if it receives an error.
335func (client PublicIPPrefixesClient) ListSender(req *http.Request) (*http.Response, error) {
336	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
337}
338
339// ListResponder handles the response to the List request. The method always
340// closes the http.Response Body.
341func (client PublicIPPrefixesClient) ListResponder(resp *http.Response) (result PublicIPPrefixListResult, err error) {
342	err = autorest.Respond(
343		resp,
344		azure.WithErrorUnlessStatusCode(http.StatusOK),
345		autorest.ByUnmarshallingJSON(&result),
346		autorest.ByClosing())
347	result.Response = autorest.Response{Response: resp}
348	return
349}
350
351// listNextResults retrieves the next set of results, if any.
352func (client PublicIPPrefixesClient) listNextResults(ctx context.Context, lastResults PublicIPPrefixListResult) (result PublicIPPrefixListResult, err error) {
353	req, err := lastResults.publicIPPrefixListResultPreparer(ctx)
354	if err != nil {
355		return result, autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listNextResults", nil, "Failure preparing next results request")
356	}
357	if req == nil {
358		return
359	}
360	resp, err := client.ListSender(req)
361	if err != nil {
362		result.Response = autorest.Response{Response: resp}
363		return result, autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listNextResults", resp, "Failure sending next results request")
364	}
365	result, err = client.ListResponder(resp)
366	if err != nil {
367		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listNextResults", resp, "Failure responding to next results request")
368	}
369	return
370}
371
372// ListComplete enumerates all values, automatically crossing page boundaries as required.
373func (client PublicIPPrefixesClient) ListComplete(ctx context.Context, resourceGroupName string) (result PublicIPPrefixListResultIterator, err error) {
374	if tracing.IsEnabled() {
375		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.List")
376		defer func() {
377			sc := -1
378			if result.Response().Response.Response != nil {
379				sc = result.page.Response().Response.Response.StatusCode
380			}
381			tracing.EndSpan(ctx, sc, err)
382		}()
383	}
384	result.page, err = client.List(ctx, resourceGroupName)
385	return
386}
387
388// ListAll gets all the public IP prefixes in a subscription.
389func (client PublicIPPrefixesClient) ListAll(ctx context.Context) (result PublicIPPrefixListResultPage, err error) {
390	if tracing.IsEnabled() {
391		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.ListAll")
392		defer func() {
393			sc := -1
394			if result.piplr.Response.Response != nil {
395				sc = result.piplr.Response.Response.StatusCode
396			}
397			tracing.EndSpan(ctx, sc, err)
398		}()
399	}
400	result.fn = client.listAllNextResults
401	req, err := client.ListAllPreparer(ctx)
402	if err != nil {
403		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "ListAll", nil, "Failure preparing request")
404		return
405	}
406
407	resp, err := client.ListAllSender(req)
408	if err != nil {
409		result.piplr.Response = autorest.Response{Response: resp}
410		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "ListAll", resp, "Failure sending request")
411		return
412	}
413
414	result.piplr, err = client.ListAllResponder(resp)
415	if err != nil {
416		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "ListAll", resp, "Failure responding to request")
417		return
418	}
419	if result.piplr.hasNextLink() && result.piplr.IsEmpty() {
420		err = result.NextWithContext(ctx)
421		return
422	}
423
424	return
425}
426
427// ListAllPreparer prepares the ListAll request.
428func (client PublicIPPrefixesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
429	pathParameters := map[string]interface{}{
430		"subscriptionId": autorest.Encode("path", client.SubscriptionID),
431	}
432
433	const APIVersion = "2018-10-01"
434	queryParameters := map[string]interface{}{
435		"api-version": APIVersion,
436	}
437
438	preparer := autorest.CreatePreparer(
439		autorest.AsGet(),
440		autorest.WithBaseURL(client.BaseURI),
441		autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPPrefixes", pathParameters),
442		autorest.WithQueryParameters(queryParameters))
443	return preparer.Prepare((&http.Request{}).WithContext(ctx))
444}
445
446// ListAllSender sends the ListAll request. The method will close the
447// http.Response Body if it receives an error.
448func (client PublicIPPrefixesClient) ListAllSender(req *http.Request) (*http.Response, error) {
449	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
450}
451
452// ListAllResponder handles the response to the ListAll request. The method always
453// closes the http.Response Body.
454func (client PublicIPPrefixesClient) ListAllResponder(resp *http.Response) (result PublicIPPrefixListResult, err error) {
455	err = autorest.Respond(
456		resp,
457		azure.WithErrorUnlessStatusCode(http.StatusOK),
458		autorest.ByUnmarshallingJSON(&result),
459		autorest.ByClosing())
460	result.Response = autorest.Response{Response: resp}
461	return
462}
463
464// listAllNextResults retrieves the next set of results, if any.
465func (client PublicIPPrefixesClient) listAllNextResults(ctx context.Context, lastResults PublicIPPrefixListResult) (result PublicIPPrefixListResult, err error) {
466	req, err := lastResults.publicIPPrefixListResultPreparer(ctx)
467	if err != nil {
468		return result, autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listAllNextResults", nil, "Failure preparing next results request")
469	}
470	if req == nil {
471		return
472	}
473	resp, err := client.ListAllSender(req)
474	if err != nil {
475		result.Response = autorest.Response{Response: resp}
476		return result, autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listAllNextResults", resp, "Failure sending next results request")
477	}
478	result, err = client.ListAllResponder(resp)
479	if err != nil {
480		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listAllNextResults", resp, "Failure responding to next results request")
481	}
482	return
483}
484
485// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
486func (client PublicIPPrefixesClient) ListAllComplete(ctx context.Context) (result PublicIPPrefixListResultIterator, err error) {
487	if tracing.IsEnabled() {
488		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.ListAll")
489		defer func() {
490			sc := -1
491			if result.Response().Response.Response != nil {
492				sc = result.page.Response().Response.Response.StatusCode
493			}
494			tracing.EndSpan(ctx, sc, err)
495		}()
496	}
497	result.page, err = client.ListAll(ctx)
498	return
499}
500
501// UpdateTags updates public IP prefix tags.
502// Parameters:
503// resourceGroupName - the name of the resource group.
504// publicIPPrefixName - the name of the public IP prefix.
505// parameters - parameters supplied to update public IP prefix tags.
506func (client PublicIPPrefixesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject) (result PublicIPPrefixesUpdateTagsFuture, err error) {
507	if tracing.IsEnabled() {
508		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.UpdateTags")
509		defer func() {
510			sc := -1
511			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
512				sc = result.FutureAPI.Response().StatusCode
513			}
514			tracing.EndSpan(ctx, sc, err)
515		}()
516	}
517	req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, publicIPPrefixName, parameters)
518	if err != nil {
519		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", nil, "Failure preparing request")
520		return
521	}
522
523	result, err = client.UpdateTagsSender(req)
524	if err != nil {
525		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", nil, "Failure sending request")
526		return
527	}
528
529	return
530}
531
532// UpdateTagsPreparer prepares the UpdateTags request.
533func (client PublicIPPrefixesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject) (*http.Request, error) {
534	pathParameters := map[string]interface{}{
535		"publicIpPrefixName": autorest.Encode("path", publicIPPrefixName),
536		"resourceGroupName":  autorest.Encode("path", resourceGroupName),
537		"subscriptionId":     autorest.Encode("path", client.SubscriptionID),
538	}
539
540	const APIVersion = "2018-10-01"
541	queryParameters := map[string]interface{}{
542		"api-version": APIVersion,
543	}
544
545	preparer := autorest.CreatePreparer(
546		autorest.AsContentType("application/json; charset=utf-8"),
547		autorest.AsPatch(),
548		autorest.WithBaseURL(client.BaseURI),
549		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}", pathParameters),
550		autorest.WithJSON(parameters),
551		autorest.WithQueryParameters(queryParameters))
552	return preparer.Prepare((&http.Request{}).WithContext(ctx))
553}
554
555// UpdateTagsSender sends the UpdateTags request. The method will close the
556// http.Response Body if it receives an error.
557func (client PublicIPPrefixesClient) UpdateTagsSender(req *http.Request) (future PublicIPPrefixesUpdateTagsFuture, err error) {
558	var resp *http.Response
559	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
560	if err != nil {
561		return
562	}
563	var azf azure.Future
564	azf, err = azure.NewFutureFromResponse(resp)
565	future.FutureAPI = &azf
566	future.Result = future.result
567	return
568}
569
570// UpdateTagsResponder handles the response to the UpdateTags request. The method always
571// closes the http.Response Body.
572func (client PublicIPPrefixesClient) UpdateTagsResponder(resp *http.Response) (result PublicIPPrefix, err error) {
573	err = autorest.Respond(
574		resp,
575		azure.WithErrorUnlessStatusCode(http.StatusOK),
576		autorest.ByUnmarshallingJSON(&result),
577		autorest.ByClosing())
578	result.Response = autorest.Response{Response: resp}
579	return
580}
581