azure_mgmt_network 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -11
  3. data/azure_mgmt_network.gemspec +1 -1
  4. data/lib/generated/azure_mgmt_network.rb +7 -2
  5. data/lib/generated/azure_mgmt_network/application_gateways.rb +15 -15
  6. data/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb +1 -1
  7. data/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb +1 -1
  8. data/lib/generated/azure_mgmt_network/express_route_circuits.rb +47 -47
  9. data/lib/generated/azure_mgmt_network/express_route_service_providers.rb +8 -8
  10. data/lib/generated/azure_mgmt_network/load_balancers.rb +22 -22
  11. data/lib/generated/azure_mgmt_network/local_network_gateways.rb +8 -8
  12. data/lib/generated/azure_mgmt_network/models/application_gateway.rb +59 -29
  13. data/lib/generated/azure_mgmt_network/models/application_gateway_authentication_certificate.rb +85 -0
  14. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_address.rb +2 -2
  15. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_address_pool.rb +5 -6
  16. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_http_settings.rb +30 -12
  17. data/lib/generated/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration.rb +9 -10
  18. data/lib/generated/azure_mgmt_network/models/application_gateway_frontend_port.rb +5 -5
  19. data/lib/generated/azure_mgmt_network/models/application_gateway_http_listener.rb +12 -15
  20. data/lib/generated/azure_mgmt_network/models/application_gateway_ipconfiguration.rb +6 -7
  21. data/lib/generated/azure_mgmt_network/models/application_gateway_list_result.rb +4 -4
  22. data/lib/generated/azure_mgmt_network/models/application_gateway_path_rule.rb +6 -8
  23. data/lib/generated/azure_mgmt_network/models/application_gateway_probe.rb +11 -11
  24. data/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule.rb +10 -13
  25. data/lib/generated/azure_mgmt_network/models/application_gateway_sku.rb +6 -7
  26. data/lib/generated/azure_mgmt_network/models/application_gateway_ssl_certificate.rb +7 -7
  27. data/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy.rb +52 -0
  28. data/lib/generated/azure_mgmt_network/models/application_gateway_ssl_protocol.rb +17 -0
  29. data/lib/generated/azure_mgmt_network/models/application_gateway_url_path_map.rb +9 -9
  30. data/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb +3 -3
  31. data/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb +0 -32
  32. data/lib/generated/azure_mgmt_network/models/{effective_network_security_rules.rb → effective_network_security_rule.rb} +4 -4
  33. data/lib/generated/azure_mgmt_network/models/effective_route.rb +6 -14
  34. data/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb +0 -31
  35. data/lib/generated/azure_mgmt_network/models/express_route_circuit.rb +10 -0
  36. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering.rb +21 -0
  37. data/lib/generated/azure_mgmt_network/models/ipaddress_availability_result.rb +62 -0
  38. data/lib/generated/azure_mgmt_network/models/resource_navigation_link.rb +96 -0
  39. data/lib/generated/azure_mgmt_network/models/subnet.rb +19 -0
  40. data/lib/generated/azure_mgmt_network/models/usages_list_result.rb +41 -0
  41. data/lib/generated/azure_mgmt_network/network_interfaces.rb +41 -445
  42. data/lib/generated/azure_mgmt_network/network_management_client.rb +1 -1
  43. data/lib/generated/azure_mgmt_network/network_security_groups.rb +1 -1
  44. data/lib/generated/azure_mgmt_network/public_ipaddresses.rb +15 -15
  45. data/lib/generated/azure_mgmt_network/route_tables.rb +1 -1
  46. data/lib/generated/azure_mgmt_network/routes.rb +8 -8
  47. data/lib/generated/azure_mgmt_network/security_rules.rb +8 -8
  48. data/lib/generated/azure_mgmt_network/subnets.rb +8 -8
  49. data/lib/generated/azure_mgmt_network/usages.rb +115 -4
  50. data/lib/generated/azure_mgmt_network/version.rb +1 -1
  51. data/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb +1 -1
  52. data/lib/generated/azure_mgmt_network/virtual_network_gateways.rb +8 -8
  53. data/lib/generated/azure_mgmt_network/virtual_network_peerings.rb +8 -8
  54. data/lib/generated/azure_mgmt_network/virtual_networks.rb +98 -1
  55. metadata +10 -5
@@ -8,8 +8,8 @@ module Azure::ARM::Network
8
8
  # A service client - single point of access to the REST API.
9
9
  #
10
10
  class NetworkManagementClient < MsRestAzure::AzureServiceClient
11
- include MsRest::Serialization
12
11
  include MsRestAzure
12
+ include MsRestAzure::Serialization
13
13
 
14
14
  # @return [String] the base URI of the service.
15
15
  attr_accessor :base_url
@@ -22,7 +22,7 @@ module Azure::ARM::Network
22
22
  @client = client
23
23
  end
24
24
 
25
- # @return reference to the NetworkManagementClient
25
+ # @return [NetworkManagementClient] reference to the NetworkManagementClient
26
26
  attr_reader :client
27
27
 
28
28
  #
@@ -22,7 +22,7 @@ module Azure::ARM::Network
22
22
  @client = client
23
23
  end
24
24
 
25
- # @return reference to the NetworkManagementClient
25
+ # @return [NetworkManagementClient] reference to the NetworkManagementClient
26
26
  attr_reader :client
27
27
 
28
28
  #
@@ -417,7 +417,7 @@ module Azure::ARM::Network
417
417
  end
418
418
 
419
419
  #
420
- # The List publicIpAddress opertion retrieves all the publicIpAddresses in a
420
+ # The List publicIpAddress operation retrieves all the publicIpAddresses in a
421
421
  # subscription.
422
422
  #
423
423
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -438,7 +438,7 @@ module Azure::ARM::Network
438
438
  end
439
439
 
440
440
  #
441
- # The List publicIpAddress opertion retrieves all the publicIpAddresses in a
441
+ # The List publicIpAddress operation retrieves all the publicIpAddresses in a
442
442
  # subscription.
443
443
  #
444
444
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -452,7 +452,7 @@ module Azure::ARM::Network
452
452
  end
453
453
 
454
454
  #
455
- # The List publicIpAddress opertion retrieves all the publicIpAddresses in a
455
+ # The List publicIpAddress operation retrieves all the publicIpAddresses in a
456
456
  # subscription.
457
457
  #
458
458
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -465,7 +465,7 @@ module Azure::ARM::Network
465
465
  end
466
466
 
467
467
  #
468
- # The List publicIpAddress opertion retrieves all the publicIpAddresses in a
468
+ # The List publicIpAddress operation retrieves all the publicIpAddresses in a
469
469
  # subscription.
470
470
  #
471
471
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -527,7 +527,7 @@ module Azure::ARM::Network
527
527
  end
528
528
 
529
529
  #
530
- # The List publicIpAddress opertion retrieves all the publicIpAddresses in a
530
+ # The List publicIpAddress operation retrieves all the publicIpAddresses in a
531
531
  # resource group.
532
532
  #
533
533
  # @param resource_group_name [String] The name of the resource group.
@@ -549,7 +549,7 @@ module Azure::ARM::Network
549
549
  end
550
550
 
551
551
  #
552
- # The List publicIpAddress opertion retrieves all the publicIpAddresses in a
552
+ # The List publicIpAddress operation retrieves all the publicIpAddresses in a
553
553
  # resource group.
554
554
  #
555
555
  # @param resource_group_name [String] The name of the resource group.
@@ -564,7 +564,7 @@ module Azure::ARM::Network
564
564
  end
565
565
 
566
566
  #
567
- # The List publicIpAddress opertion retrieves all the publicIpAddresses in a
567
+ # The List publicIpAddress operation retrieves all the publicIpAddresses in a
568
568
  # resource group.
569
569
  #
570
570
  # @param resource_group_name [String] The name of the resource group.
@@ -578,7 +578,7 @@ module Azure::ARM::Network
578
578
  end
579
579
 
580
580
  #
581
- # The List publicIpAddress opertion retrieves all the publicIpAddresses in a
581
+ # The List publicIpAddress operation retrieves all the publicIpAddresses in a
582
582
  # resource group.
583
583
  #
584
584
  # @param resource_group_name [String] The name of the resource group.
@@ -642,7 +642,7 @@ module Azure::ARM::Network
642
642
  end
643
643
 
644
644
  #
645
- # The List publicIpAddress opertion retrieves all the publicIpAddresses in a
645
+ # The List publicIpAddress operation retrieves all the publicIpAddresses in a
646
646
  # subscription.
647
647
  #
648
648
  # @param next_page_link [String] The NextLink from the previous successful
@@ -658,7 +658,7 @@ module Azure::ARM::Network
658
658
  end
659
659
 
660
660
  #
661
- # The List publicIpAddress opertion retrieves all the publicIpAddresses in a
661
+ # The List publicIpAddress operation retrieves all the publicIpAddresses in a
662
662
  # subscription.
663
663
  #
664
664
  # @param next_page_link [String] The NextLink from the previous successful
@@ -673,7 +673,7 @@ module Azure::ARM::Network
673
673
  end
674
674
 
675
675
  #
676
- # The List publicIpAddress opertion retrieves all the publicIpAddresses in a
676
+ # The List publicIpAddress operation retrieves all the publicIpAddresses in a
677
677
  # subscription.
678
678
  #
679
679
  # @param next_page_link [String] The NextLink from the previous successful
@@ -735,7 +735,7 @@ module Azure::ARM::Network
735
735
  end
736
736
 
737
737
  #
738
- # The List publicIpAddress opertion retrieves all the publicIpAddresses in a
738
+ # The List publicIpAddress operation retrieves all the publicIpAddresses in a
739
739
  # resource group.
740
740
  #
741
741
  # @param next_page_link [String] The NextLink from the previous successful
@@ -751,7 +751,7 @@ module Azure::ARM::Network
751
751
  end
752
752
 
753
753
  #
754
- # The List publicIpAddress opertion retrieves all the publicIpAddresses in a
754
+ # The List publicIpAddress operation retrieves all the publicIpAddresses in a
755
755
  # resource group.
756
756
  #
757
757
  # @param next_page_link [String] The NextLink from the previous successful
@@ -766,7 +766,7 @@ module Azure::ARM::Network
766
766
  end
767
767
 
768
768
  #
769
- # The List publicIpAddress opertion retrieves all the publicIpAddresses in a
769
+ # The List publicIpAddress operation retrieves all the publicIpAddresses in a
770
770
  # resource group.
771
771
  #
772
772
  # @param next_page_link [String] The NextLink from the previous successful
@@ -22,7 +22,7 @@ module Azure::ARM::Network
22
22
  @client = client
23
23
  end
24
24
 
25
- # @return reference to the NetworkManagementClient
25
+ # @return [NetworkManagementClient] reference to the NetworkManagementClient
26
26
  attr_reader :client
27
27
 
28
28
  #
@@ -22,7 +22,7 @@ module Azure::ARM::Network
22
22
  @client = client
23
23
  end
24
24
 
25
- # @return reference to the NetworkManagementClient
25
+ # @return [NetworkManagementClient] reference to the NetworkManagementClient
26
26
  attr_reader :client
27
27
 
28
28
  #
@@ -426,7 +426,7 @@ module Azure::ARM::Network
426
426
  end
427
427
 
428
428
  #
429
- # The List network security rule opertion retrieves all the routes in a route
429
+ # The List network security rule operation retrieves all the routes in a route
430
430
  # table.
431
431
  #
432
432
  # @param resource_group_name [String] The name of the resource group.
@@ -448,7 +448,7 @@ module Azure::ARM::Network
448
448
  end
449
449
 
450
450
  #
451
- # The List network security rule opertion retrieves all the routes in a route
451
+ # The List network security rule operation retrieves all the routes in a route
452
452
  # table.
453
453
  #
454
454
  # @param resource_group_name [String] The name of the resource group.
@@ -464,7 +464,7 @@ module Azure::ARM::Network
464
464
  end
465
465
 
466
466
  #
467
- # The List network security rule opertion retrieves all the routes in a route
467
+ # The List network security rule operation retrieves all the routes in a route
468
468
  # table.
469
469
  #
470
470
  # @param resource_group_name [String] The name of the resource group.
@@ -479,7 +479,7 @@ module Azure::ARM::Network
479
479
  end
480
480
 
481
481
  #
482
- # The List network security rule opertion retrieves all the routes in a route
482
+ # The List network security rule operation retrieves all the routes in a route
483
483
  # table.
484
484
  #
485
485
  # @param resource_group_name [String] The name of the resource group.
@@ -545,7 +545,7 @@ module Azure::ARM::Network
545
545
  end
546
546
 
547
547
  #
548
- # The List network security rule opertion retrieves all the routes in a route
548
+ # The List network security rule operation retrieves all the routes in a route
549
549
  # table.
550
550
  #
551
551
  # @param next_page_link [String] The NextLink from the previous successful
@@ -561,7 +561,7 @@ module Azure::ARM::Network
561
561
  end
562
562
 
563
563
  #
564
- # The List network security rule opertion retrieves all the routes in a route
564
+ # The List network security rule operation retrieves all the routes in a route
565
565
  # table.
566
566
  #
567
567
  # @param next_page_link [String] The NextLink from the previous successful
@@ -576,7 +576,7 @@ module Azure::ARM::Network
576
576
  end
577
577
 
578
578
  #
579
- # The List network security rule opertion retrieves all the routes in a route
579
+ # The List network security rule operation retrieves all the routes in a route
580
580
  # table.
581
581
  #
582
582
  # @param next_page_link [String] The NextLink from the previous successful
@@ -22,7 +22,7 @@ module Azure::ARM::Network
22
22
  @client = client
23
23
  end
24
24
 
25
- # @return reference to the NetworkManagementClient
25
+ # @return [NetworkManagementClient] reference to the NetworkManagementClient
26
26
  attr_reader :client
27
27
 
28
28
  #
@@ -447,7 +447,7 @@ module Azure::ARM::Network
447
447
  end
448
448
 
449
449
  #
450
- # The List network security rule opertion retrieves all the security rules in
450
+ # The List network security rule operation retrieves all the security rules in
451
451
  # a network security group.
452
452
  #
453
453
  # @param resource_group_name [String] The name of the resource group.
@@ -471,7 +471,7 @@ module Azure::ARM::Network
471
471
  end
472
472
 
473
473
  #
474
- # The List network security rule opertion retrieves all the security rules in
474
+ # The List network security rule operation retrieves all the security rules in
475
475
  # a network security group.
476
476
  #
477
477
  # @param resource_group_name [String] The name of the resource group.
@@ -488,7 +488,7 @@ module Azure::ARM::Network
488
488
  end
489
489
 
490
490
  #
491
- # The List network security rule opertion retrieves all the security rules in
491
+ # The List network security rule operation retrieves all the security rules in
492
492
  # a network security group.
493
493
  #
494
494
  # @param resource_group_name [String] The name of the resource group.
@@ -504,7 +504,7 @@ module Azure::ARM::Network
504
504
  end
505
505
 
506
506
  #
507
- # The List network security rule opertion retrieves all the security rules in
507
+ # The List network security rule operation retrieves all the security rules in
508
508
  # a network security group.
509
509
  #
510
510
  # @param resource_group_name [String] The name of the resource group.
@@ -571,7 +571,7 @@ module Azure::ARM::Network
571
571
  end
572
572
 
573
573
  #
574
- # The List network security rule opertion retrieves all the security rules in
574
+ # The List network security rule operation retrieves all the security rules in
575
575
  # a network security group.
576
576
  #
577
577
  # @param next_page_link [String] The NextLink from the previous successful
@@ -587,7 +587,7 @@ module Azure::ARM::Network
587
587
  end
588
588
 
589
589
  #
590
- # The List network security rule opertion retrieves all the security rules in
590
+ # The List network security rule operation retrieves all the security rules in
591
591
  # a network security group.
592
592
  #
593
593
  # @param next_page_link [String] The NextLink from the previous successful
@@ -602,7 +602,7 @@ module Azure::ARM::Network
602
602
  end
603
603
 
604
604
  #
605
- # The List network security rule opertion retrieves all the security rules in
605
+ # The List network security rule operation retrieves all the security rules in
606
606
  # a network security group.
607
607
  #
608
608
  # @param next_page_link [String] The NextLink from the previous successful
@@ -22,7 +22,7 @@ module Azure::ARM::Network
22
22
  @client = client
23
23
  end
24
24
 
25
- # @return reference to the NetworkManagementClient
25
+ # @return [NetworkManagementClient] reference to the NetworkManagementClient
26
26
  attr_reader :client
27
27
 
28
28
  #
@@ -430,7 +430,7 @@ module Azure::ARM::Network
430
430
  end
431
431
 
432
432
  #
433
- # The List subnets opertion retrieves all the subnets in a virtual network.
433
+ # The List subnets operation retrieves all the subnets in a virtual network.
434
434
  #
435
435
  # @param resource_group_name [String] The name of the resource group.
436
436
  # @param virtual_network_name [String] The name of the virtual network.
@@ -452,7 +452,7 @@ module Azure::ARM::Network
452
452
  end
453
453
 
454
454
  #
455
- # The List subnets opertion retrieves all the subnets in a virtual network.
455
+ # The List subnets operation retrieves all the subnets in a virtual network.
456
456
  #
457
457
  # @param resource_group_name [String] The name of the resource group.
458
458
  # @param virtual_network_name [String] The name of the virtual network.
@@ -467,7 +467,7 @@ module Azure::ARM::Network
467
467
  end
468
468
 
469
469
  #
470
- # The List subnets opertion retrieves all the subnets in a virtual network.
470
+ # The List subnets operation retrieves all the subnets in a virtual network.
471
471
  #
472
472
  # @param resource_group_name [String] The name of the resource group.
473
473
  # @param virtual_network_name [String] The name of the virtual network.
@@ -481,7 +481,7 @@ module Azure::ARM::Network
481
481
  end
482
482
 
483
483
  #
484
- # The List subnets opertion retrieves all the subnets in a virtual network.
484
+ # The List subnets operation retrieves all the subnets in a virtual network.
485
485
  #
486
486
  # @param resource_group_name [String] The name of the resource group.
487
487
  # @param virtual_network_name [String] The name of the virtual network.
@@ -546,7 +546,7 @@ module Azure::ARM::Network
546
546
  end
547
547
 
548
548
  #
549
- # The List subnets opertion retrieves all the subnets in a virtual network.
549
+ # The List subnets operation retrieves all the subnets in a virtual network.
550
550
  #
551
551
  # @param next_page_link [String] The NextLink from the previous successful
552
552
  # call to List operation.
@@ -561,7 +561,7 @@ module Azure::ARM::Network
561
561
  end
562
562
 
563
563
  #
564
- # The List subnets opertion retrieves all the subnets in a virtual network.
564
+ # The List subnets operation retrieves all the subnets in a virtual network.
565
565
  #
566
566
  # @param next_page_link [String] The NextLink from the previous successful
567
567
  # call to List operation.
@@ -575,7 +575,7 @@ module Azure::ARM::Network
575
575
  end
576
576
 
577
577
  #
578
- # The List subnets opertion retrieves all the subnets in a virtual network.
578
+ # The List subnets operation retrieves all the subnets in a virtual network.
579
579
  #
580
580
  # @param next_page_link [String] The NextLink from the previous successful
581
581
  # call to List operation.
@@ -22,7 +22,7 @@ module Azure::ARM::Network
22
22
  @client = client
23
23
  end
24
24
 
25
- # @return reference to the NetworkManagementClient
25
+ # @return [NetworkManagementClient] reference to the NetworkManagementClient
26
26
  attr_reader :client
27
27
 
28
28
  #
@@ -32,11 +32,32 @@ module Azure::ARM::Network
32
32
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
33
  # will be added to the HTTP request.
34
34
  #
35
- # @return [UsagesListResult] operation results.
35
+ # @return [UsagesListResult] which provide lazy access to pages of the
36
+ # response.
36
37
  #
37
- def list(location, custom_headers = nil)
38
+ def list_as_lazy(location, custom_headers = nil)
38
39
  response = list_async(location, custom_headers).value!
39
- response.body unless response.nil?
40
+ unless response.nil?
41
+ page = response.body
42
+ page.next_method = Proc.new do |next_link|
43
+ list_next_async(next_link, custom_headers)
44
+ end
45
+ page
46
+ end
47
+ end
48
+
49
+ #
50
+ # Lists compute usages for a subscription.
51
+ #
52
+ # @param location [String] The location upon which resource usage is queried.
53
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
54
+ # will be added to the HTTP request.
55
+ #
56
+ # @return [Array<Usage>] operation results.
57
+ #
58
+ def list(location, custom_headers = nil)
59
+ first_page = list_as_lazy(location, custom_headers)
60
+ first_page.get_all_items
40
61
  end
41
62
 
42
63
  #
@@ -115,5 +136,95 @@ module Azure::ARM::Network
115
136
  promise.execute
116
137
  end
117
138
 
139
+ #
140
+ # Lists compute usages for a subscription.
141
+ #
142
+ # @param next_page_link [String] The NextLink from the previous successful
143
+ # call to List operation.
144
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
145
+ # will be added to the HTTP request.
146
+ #
147
+ # @return [UsagesListResult] operation results.
148
+ #
149
+ def list_next(next_page_link, custom_headers = nil)
150
+ response = list_next_async(next_page_link, custom_headers).value!
151
+ response.body unless response.nil?
152
+ end
153
+
154
+ #
155
+ # Lists compute usages for a subscription.
156
+ #
157
+ # @param next_page_link [String] The NextLink from the previous successful
158
+ # call to List operation.
159
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
160
+ # will be added to the HTTP request.
161
+ #
162
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
163
+ #
164
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
165
+ list_next_async(next_page_link, custom_headers).value!
166
+ end
167
+
168
+ #
169
+ # Lists compute usages for a subscription.
170
+ #
171
+ # @param next_page_link [String] The NextLink from the previous successful
172
+ # call to List operation.
173
+ # @param [Hash{String => String}] A hash of custom headers that will be added
174
+ # to the HTTP request.
175
+ #
176
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
177
+ #
178
+ def list_next_async(next_page_link, custom_headers = nil)
179
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
180
+
181
+
182
+ request_headers = {}
183
+
184
+ # Set Headers
185
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
186
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
187
+ path_template = '{nextLink}'
188
+ options = {
189
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
190
+ skip_encoding_path_params: {'nextLink' => next_page_link},
191
+ headers: request_headers.merge(custom_headers || {})
192
+ }
193
+
194
+ request_url = @base_url || @client.base_url
195
+
196
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
197
+ promise = request.run_promise do |req|
198
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
199
+ end
200
+
201
+ promise = promise.then do |http_response|
202
+ status_code = http_response.status
203
+ response_content = http_response.body
204
+ unless status_code == 200
205
+ error_model = JSON.load(response_content)
206
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
207
+ end
208
+
209
+ # Create Result
210
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
211
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
212
+ # Deserialize Response
213
+ if status_code == 200
214
+ begin
215
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
216
+ result_mapper = UsagesListResult.mapper()
217
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
218
+ rescue Exception => e
219
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
220
+ end
221
+ end
222
+
223
+ result
224
+ end
225
+
226
+ promise.execute
227
+ end
228
+
118
229
  end
119
230
  end