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