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