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 = "2019-12-01"
73	queryParameters := map[string]interface{}{
74		"api-version": APIVersion,
75	}
76
77	parameters.Etag = nil
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/networkSecurityGroups/{networkSecurityGroupName}", 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 SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, 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 SecurityGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result SecurityGroup, 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 network security group.
116// Parameters:
117// resourceGroupName - the name of the resource group.
118// networkSecurityGroupName - the name of the network security group.
119func (client SecurityGroupsClient) Delete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityGroupsDeleteFuture, err error) {
120	if tracing.IsEnabled() {
121		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.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, networkSecurityGroupName)
131	if err != nil {
132		err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "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.SecurityGroupsClient", "Delete", nil, "Failure sending request")
139		return
140	}
141
142	return
143}
144
145// DeletePreparer prepares the Delete request.
146func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (*http.Request, error) {
147	pathParameters := map[string]interface{}{
148		"networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName),
149		"resourceGroupName":        autorest.Encode("path", resourceGroupName),
150		"subscriptionId":           autorest.Encode("path", client.SubscriptionID),
151	}
152
153	const APIVersion = "2019-12-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/networkSecurityGroups/{networkSecurityGroupName}", 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 SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, 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 SecurityGroupsClient) 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 network security group.
193// Parameters:
194// resourceGroupName - the name of the resource group.
195// networkSecurityGroupName - the name of the network security group.
196// expand - expands referenced resources.
197func (client SecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, expand string) (result SecurityGroup, err error) {
198	if tracing.IsEnabled() {
199		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.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, networkSecurityGroupName, expand)
209	if err != nil {
210		err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "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.SecurityGroupsClient", "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.SecurityGroupsClient", "Get", resp, "Failure responding to request")
224		return
225	}
226
227	return
228}
229
230// GetPreparer prepares the Get request.
231func (client SecurityGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, expand string) (*http.Request, error) {
232	pathParameters := map[string]interface{}{
233		"networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName),
234		"resourceGroupName":        autorest.Encode("path", resourceGroupName),
235		"subscriptionId":           autorest.Encode("path", client.SubscriptionID),
236	}
237
238	const APIVersion = "2019-12-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/networkSecurityGroups/{networkSecurityGroupName}", 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 SecurityGroupsClient) 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 SecurityGroupsClient) GetResponder(resp *http.Response) (result SecurityGroup, 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 network security groups in a resource group.
273// Parameters:
274// resourceGroupName - the name of the resource group.
275func (client SecurityGroupsClient) List(ctx context.Context, resourceGroupName string) (result SecurityGroupListResultPage, err error) {
276	if tracing.IsEnabled() {
277		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.List")
278		defer func() {
279			sc := -1
280			if result.sglr.Response.Response != nil {
281				sc = result.sglr.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.SecurityGroupsClient", "List", nil, "Failure preparing request")
290		return
291	}
292
293	resp, err := client.ListSender(req)
294	if err != nil {
295		result.sglr.Response = autorest.Response{Response: resp}
296		err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "List", resp, "Failure sending request")
297		return
298	}
299
300	result.sglr, err = client.ListResponder(resp)
301	if err != nil {
302		err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "List", resp, "Failure responding to request")
303		return
304	}
305	if result.sglr.hasNextLink() && result.sglr.IsEmpty() {
306		err = result.NextWithContext(ctx)
307		return
308	}
309
310	return
311}
312
313// ListPreparer prepares the List request.
314func (client SecurityGroupsClient) 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 = "2019-12-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/networkSecurityGroups", 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 SecurityGroupsClient) 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 SecurityGroupsClient) ListResponder(resp *http.Response) (result SecurityGroupListResult, 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 SecurityGroupsClient) listNextResults(ctx context.Context, lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) {
353	req, err := lastResults.securityGroupListResultPreparer(ctx)
354	if err != nil {
355		return result, autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "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.SecurityGroupsClient", "listNextResults", resp, "Failure sending next results request")
364	}
365	result, err = client.ListResponder(resp)
366	if err != nil {
367		err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "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 SecurityGroupsClient) ListComplete(ctx context.Context, resourceGroupName string) (result SecurityGroupListResultIterator, err error) {
374	if tracing.IsEnabled() {
375		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.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 network security groups in a subscription.
389func (client SecurityGroupsClient) ListAll(ctx context.Context) (result SecurityGroupListResultPage, err error) {
390	if tracing.IsEnabled() {
391		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.ListAll")
392		defer func() {
393			sc := -1
394			if result.sglr.Response.Response != nil {
395				sc = result.sglr.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.SecurityGroupsClient", "ListAll", nil, "Failure preparing request")
404		return
405	}
406
407	resp, err := client.ListAllSender(req)
408	if err != nil {
409		result.sglr.Response = autorest.Response{Response: resp}
410		err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "ListAll", resp, "Failure sending request")
411		return
412	}
413
414	result.sglr, err = client.ListAllResponder(resp)
415	if err != nil {
416		err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "ListAll", resp, "Failure responding to request")
417		return
418	}
419	if result.sglr.hasNextLink() && result.sglr.IsEmpty() {
420		err = result.NextWithContext(ctx)
421		return
422	}
423
424	return
425}
426
427// ListAllPreparer prepares the ListAll request.
428func (client SecurityGroupsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
429	pathParameters := map[string]interface{}{
430		"subscriptionId": autorest.Encode("path", client.SubscriptionID),
431	}
432
433	const APIVersion = "2019-12-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/networkSecurityGroups", 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 SecurityGroupsClient) 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 SecurityGroupsClient) ListAllResponder(resp *http.Response) (result SecurityGroupListResult, 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 SecurityGroupsClient) listAllNextResults(ctx context.Context, lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) {
466	req, err := lastResults.securityGroupListResultPreparer(ctx)
467	if err != nil {
468		return result, autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "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.SecurityGroupsClient", "listAllNextResults", resp, "Failure sending next results request")
477	}
478	result, err = client.ListAllResponder(resp)
479	if err != nil {
480		err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "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 SecurityGroupsClient) ListAllComplete(ctx context.Context) (result SecurityGroupListResultIterator, err error) {
487	if tracing.IsEnabled() {
488		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.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 a network security group tags.
502// Parameters:
503// resourceGroupName - the name of the resource group.
504// networkSecurityGroupName - the name of the network security group.
505// parameters - parameters supplied to update network security group tags.
506func (client SecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject) (result SecurityGroup, err error) {
507	if tracing.IsEnabled() {
508		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.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, networkSecurityGroupName, parameters)
518	if err != nil {
519		err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "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.SecurityGroupsClient", "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.SecurityGroupsClient", "UpdateTags", resp, "Failure responding to request")
533		return
534	}
535
536	return
537}
538
539// UpdateTagsPreparer prepares the UpdateTags request.
540func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject) (*http.Request, error) {
541	pathParameters := map[string]interface{}{
542		"networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName),
543		"resourceGroupName":        autorest.Encode("path", resourceGroupName),
544		"subscriptionId":           autorest.Encode("path", client.SubscriptionID),
545	}
546
547	const APIVersion = "2019-12-01"
548	queryParameters := map[string]interface{}{
549		"api-version": APIVersion,
550	}
551
552	preparer := autorest.CreatePreparer(
553		autorest.AsContentType("application/json; charset=utf-8"),
554		autorest.AsPatch(),
555		autorest.WithBaseURL(client.BaseURI),
556		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}", pathParameters),
557		autorest.WithJSON(parameters),
558		autorest.WithQueryParameters(queryParameters))
559	return preparer.Prepare((&http.Request{}).WithContext(ctx))
560}
561
562// UpdateTagsSender sends the UpdateTags request. The method will close the
563// http.Response Body if it receives an error.
564func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) {
565	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
566}
567
568// UpdateTagsResponder handles the response to the UpdateTags request. The method always
569// closes the http.Response Body.
570func (client SecurityGroupsClient) UpdateTagsResponder(resp *http.Response) (result SecurityGroup, err error) {
571	err = autorest.Respond(
572		resp,
573		azure.WithErrorUnlessStatusCode(http.StatusOK),
574		autorest.ByUnmarshallingJSON(&result),
575		autorest.ByClosing())
576	result.Response = autorest.Response{Response: resp}
577	return
578}
579