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