azure_mgmt_web 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -81,30 +81,27 @@ module Azure::ARM::Web
81
81
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
82
82
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
83
83
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'
84
+
85
+ request_url = @base_url || @client.base_url
86
+
84
87
  options = {
85
88
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
86
89
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
87
90
  query_params: {'api-version' => @client.api_version},
88
- headers: request_headers.merge(custom_headers || {})
91
+ headers: request_headers.merge(custom_headers || {}),
92
+ base_url: request_url
89
93
  }
94
+ promise = @client.make_request_async(:get, path_template, options)
90
95
 
91
- request_url = @base_url || @client.base_url
92
-
93
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
94
- promise = request.run_promise do |req|
95
- @client.credentials.sign_request(req) unless @client.credentials.nil?
96
- end
97
-
98
- promise = promise.then do |http_response|
96
+ promise = promise.then do |result|
97
+ http_response = result.response
99
98
  status_code = http_response.status
100
99
  response_content = http_response.body
101
100
  unless status_code == 200
102
101
  error_model = JSON.load(response_content)
103
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
102
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
104
103
  end
105
104
 
106
- # Create Result
107
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
108
105
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
109
106
  # Deserialize Response
110
107
  if status_code == 200
@@ -236,31 +233,28 @@ module Azure::ARM::Web
236
233
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
237
234
 
238
235
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'
236
+
237
+ request_url = @base_url || @client.base_url
238
+
239
239
  options = {
240
240
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
241
241
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
242
242
  query_params: {'api-version' => @client.api_version},
243
243
  body: request_content,
244
- headers: request_headers.merge(custom_headers || {})
244
+ headers: request_headers.merge(custom_headers || {}),
245
+ base_url: request_url
245
246
  }
247
+ promise = @client.make_request_async(:put, path_template, options)
246
248
 
247
- request_url = @base_url || @client.base_url
248
-
249
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
250
- promise = request.run_promise do |req|
251
- @client.credentials.sign_request(req) unless @client.credentials.nil?
252
- end
253
-
254
- promise = promise.then do |http_response|
249
+ promise = promise.then do |result|
250
+ http_response = result.response
255
251
  status_code = http_response.status
256
252
  response_content = http_response.body
257
253
  unless status_code == 200 || status_code == 202 || status_code == 400 || status_code == 404 || status_code == 409
258
254
  error_model = JSON.load(response_content)
259
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
255
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
260
256
  end
261
257
 
262
- # Create Result
263
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
264
258
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
265
259
  # Deserialize Response
266
260
  if status_code == 200
@@ -399,30 +393,27 @@ module Azure::ARM::Web
399
393
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
400
394
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
401
395
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'
396
+
397
+ request_url = @base_url || @client.base_url
398
+
402
399
  options = {
403
400
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
404
401
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
405
402
  query_params: {'forceDelete' => force_delete,'api-version' => @client.api_version},
406
- headers: request_headers.merge(custom_headers || {})
403
+ headers: request_headers.merge(custom_headers || {}),
404
+ base_url: request_url
407
405
  }
406
+ promise = @client.make_request_async(:delete, path_template, options)
408
407
 
409
- request_url = @base_url || @client.base_url
410
-
411
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
412
- promise = request.run_promise do |req|
413
- @client.credentials.sign_request(req) unless @client.credentials.nil?
414
- end
415
-
416
- promise = promise.then do |http_response|
408
+ promise = promise.then do |result|
409
+ http_response = result.response
417
410
  status_code = http_response.status
418
411
  response_content = http_response.body
419
412
  unless status_code == 200 || status_code == 202 || status_code == 400 || status_code == 404 || status_code == 409
420
413
  error_model = JSON.load(response_content)
421
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
414
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
422
415
  end
423
416
 
424
- # Create Result
425
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
426
417
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
427
418
 
428
419
  result
@@ -483,30 +474,27 @@ module Azure::ARM::Web
483
474
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
484
475
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
485
476
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'
477
+
478
+ request_url = @base_url || @client.base_url
479
+
486
480
  options = {
487
481
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
488
482
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
489
483
  query_params: {'api-version' => @client.api_version},
490
- headers: request_headers.merge(custom_headers || {})
484
+ headers: request_headers.merge(custom_headers || {}),
485
+ base_url: request_url
491
486
  }
487
+ promise = @client.make_request_async(:get, path_template, options)
492
488
 
493
- request_url = @base_url || @client.base_url
494
-
495
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
496
- promise = request.run_promise do |req|
497
- @client.credentials.sign_request(req) unless @client.credentials.nil?
498
- end
499
-
500
- promise = promise.then do |http_response|
489
+ promise = promise.then do |result|
490
+ http_response = result.response
501
491
  status_code = http_response.status
502
492
  response_content = http_response.body
503
493
  unless status_code == 200
504
494
  error_model = JSON.load(response_content)
505
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
495
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
506
496
  end
507
497
 
508
- # Create Result
509
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
510
498
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
511
499
  # Deserialize Response
512
500
  if status_code == 200
@@ -595,30 +583,27 @@ module Azure::ARM::Web
595
583
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
596
584
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
597
585
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'
586
+
587
+ request_url = @base_url || @client.base_url
588
+
598
589
  options = {
599
590
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
600
591
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'diagnosticsName' => diagnostics_name,'subscriptionId' => @client.subscription_id},
601
592
  query_params: {'api-version' => @client.api_version},
602
- headers: request_headers.merge(custom_headers || {})
593
+ headers: request_headers.merge(custom_headers || {}),
594
+ base_url: request_url
603
595
  }
596
+ promise = @client.make_request_async(:get, path_template, options)
604
597
 
605
- request_url = @base_url || @client.base_url
606
-
607
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
608
- promise = request.run_promise do |req|
609
- @client.credentials.sign_request(req) unless @client.credentials.nil?
610
- end
611
-
612
- promise = promise.then do |http_response|
598
+ promise = promise.then do |result|
599
+ http_response = result.response
613
600
  status_code = http_response.status
614
601
  response_content = http_response.body
615
602
  unless status_code == 200
616
603
  error_model = JSON.load(response_content)
617
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
604
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
618
605
  end
619
606
 
620
- # Create Result
621
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
622
607
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
623
608
  # Deserialize Response
624
609
  if status_code == 200
@@ -653,8 +638,8 @@ module Azure::ARM::Web
653
638
  response = get_hosting_environment_capacities_async(resource_group_name, name, custom_headers).value!
654
639
  unless response.nil?
655
640
  page = response.body
656
- page.next_method = Proc.new do |next_link|
657
- get_hosting_environment_capacities_next_async(next_link, custom_headers)
641
+ page.next_method = Proc.new do |next_page_link|
642
+ get_hosting_environment_capacities_next_async(next_page_link, custom_headers)
658
643
  end
659
644
  page
660
645
  end
@@ -715,30 +700,27 @@ module Azure::ARM::Web
715
700
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
716
701
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
717
702
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'
703
+
704
+ request_url = @base_url || @client.base_url
705
+
718
706
  options = {
719
707
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
720
708
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
721
709
  query_params: {'api-version' => @client.api_version},
722
- headers: request_headers.merge(custom_headers || {})
710
+ headers: request_headers.merge(custom_headers || {}),
711
+ base_url: request_url
723
712
  }
713
+ promise = @client.make_request_async(:get, path_template, options)
724
714
 
725
- request_url = @base_url || @client.base_url
726
-
727
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
728
- promise = request.run_promise do |req|
729
- @client.credentials.sign_request(req) unless @client.credentials.nil?
730
- end
731
-
732
- promise = promise.then do |http_response|
715
+ promise = promise.then do |result|
716
+ http_response = result.response
733
717
  status_code = http_response.status
734
718
  response_content = http_response.body
735
719
  unless status_code == 200
736
720
  error_model = JSON.load(response_content)
737
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
721
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
738
722
  end
739
723
 
740
- # Create Result
741
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
742
724
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
743
725
  # Deserialize Response
744
726
  if status_code == 200
@@ -812,30 +794,27 @@ module Azure::ARM::Web
812
794
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
813
795
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
814
796
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'
797
+
798
+ request_url = @base_url || @client.base_url
799
+
815
800
  options = {
816
801
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
817
802
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
818
803
  query_params: {'api-version' => @client.api_version},
819
- headers: request_headers.merge(custom_headers || {})
804
+ headers: request_headers.merge(custom_headers || {}),
805
+ base_url: request_url
820
806
  }
807
+ promise = @client.make_request_async(:get, path_template, options)
821
808
 
822
- request_url = @base_url || @client.base_url
823
-
824
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
825
- promise = request.run_promise do |req|
826
- @client.credentials.sign_request(req) unless @client.credentials.nil?
827
- end
828
-
829
- promise = promise.then do |http_response|
809
+ promise = promise.then do |result|
810
+ http_response = result.response
830
811
  status_code = http_response.status
831
812
  response_content = http_response.body
832
813
  unless status_code == 200
833
814
  error_model = JSON.load(response_content)
834
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
815
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
835
816
  end
836
817
 
837
- # Create Result
838
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
839
818
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
840
819
  # Deserialize Response
841
820
  if status_code == 200
@@ -868,8 +847,8 @@ module Azure::ARM::Web
868
847
  response = get_hosting_environments_async(resource_group_name, custom_headers).value!
869
848
  unless response.nil?
870
849
  page = response.body
871
- page.next_method = Proc.new do |next_link|
872
- get_hosting_environments_next_async(next_link, custom_headers)
850
+ page.next_method = Proc.new do |next_page_link|
851
+ get_hosting_environments_next_async(next_page_link, custom_headers)
873
852
  end
874
853
  page
875
854
  end
@@ -923,30 +902,27 @@ module Azure::ARM::Web
923
902
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
924
903
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
925
904
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'
905
+
906
+ request_url = @base_url || @client.base_url
907
+
926
908
  options = {
927
909
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
928
910
  path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
929
911
  query_params: {'api-version' => @client.api_version},
930
- headers: request_headers.merge(custom_headers || {})
912
+ headers: request_headers.merge(custom_headers || {}),
913
+ base_url: request_url
931
914
  }
915
+ promise = @client.make_request_async(:get, path_template, options)
932
916
 
933
- request_url = @base_url || @client.base_url
934
-
935
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
936
- promise = request.run_promise do |req|
937
- @client.credentials.sign_request(req) unless @client.credentials.nil?
938
- end
939
-
940
- promise = promise.then do |http_response|
917
+ promise = promise.then do |result|
918
+ http_response = result.response
941
919
  status_code = http_response.status
942
920
  response_content = http_response.body
943
921
  unless status_code == 200
944
922
  error_model = JSON.load(response_content)
945
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
923
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
946
924
  end
947
925
 
948
- # Create Result
949
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
950
926
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
951
927
  # Deserialize Response
952
928
  if status_code == 200
@@ -1017,30 +993,27 @@ module Azure::ARM::Web
1017
993
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1018
994
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1019
995
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'
996
+
997
+ request_url = @base_url || @client.base_url
998
+
1020
999
  options = {
1021
1000
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1022
1001
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1023
1002
  query_params: {'api-version' => @client.api_version},
1024
- headers: request_headers.merge(custom_headers || {})
1003
+ headers: request_headers.merge(custom_headers || {}),
1004
+ base_url: request_url
1025
1005
  }
1006
+ promise = @client.make_request_async(:post, path_template, options)
1026
1007
 
1027
- request_url = @base_url || @client.base_url
1028
-
1029
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
1030
- promise = request.run_promise do |req|
1031
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1032
- end
1033
-
1034
- promise = promise.then do |http_response|
1008
+ promise = promise.then do |result|
1009
+ http_response = result.response
1035
1010
  status_code = http_response.status
1036
1011
  response_content = http_response.body
1037
1012
  unless status_code == 202 || status_code == 400 || status_code == 404 || status_code == 409
1038
1013
  error_model = JSON.load(response_content)
1039
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1014
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1040
1015
  end
1041
1016
 
1042
- # Create Result
1043
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1044
1017
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1045
1018
 
1046
1019
  result
@@ -1104,30 +1077,27 @@ module Azure::ARM::Web
1104
1077
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1105
1078
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1106
1079
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'
1080
+
1081
+ request_url = @base_url || @client.base_url
1082
+
1107
1083
  options = {
1108
1084
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1109
1085
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1110
1086
  query_params: {'api-version' => @client.api_version},
1111
- headers: request_headers.merge(custom_headers || {})
1087
+ headers: request_headers.merge(custom_headers || {}),
1088
+ base_url: request_url
1112
1089
  }
1090
+ promise = @client.make_request_async(:get, path_template, options)
1113
1091
 
1114
- request_url = @base_url || @client.base_url
1115
-
1116
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1117
- promise = request.run_promise do |req|
1118
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1119
- end
1120
-
1121
- promise = promise.then do |http_response|
1092
+ promise = promise.then do |result|
1093
+ http_response = result.response
1122
1094
  status_code = http_response.status
1123
1095
  response_content = http_response.body
1124
1096
  unless status_code == 200
1125
1097
  error_model = JSON.load(response_content)
1126
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1098
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1127
1099
  end
1128
1100
 
1129
- # Create Result
1130
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1131
1101
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1132
1102
 
1133
1103
  result
@@ -1192,30 +1162,27 @@ module Azure::ARM::Web
1192
1162
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1193
1163
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1194
1164
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations/{operationId}'
1165
+
1166
+ request_url = @base_url || @client.base_url
1167
+
1195
1168
  options = {
1196
1169
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1197
1170
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_id,'subscriptionId' => @client.subscription_id},
1198
1171
  query_params: {'api-version' => @client.api_version},
1199
- headers: request_headers.merge(custom_headers || {})
1172
+ headers: request_headers.merge(custom_headers || {}),
1173
+ base_url: request_url
1200
1174
  }
1175
+ promise = @client.make_request_async(:get, path_template, options)
1201
1176
 
1202
- request_url = @base_url || @client.base_url
1203
-
1204
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1205
- promise = request.run_promise do |req|
1206
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1207
- end
1208
-
1209
- promise = promise.then do |http_response|
1177
+ promise = promise.then do |result|
1178
+ http_response = result.response
1210
1179
  status_code = http_response.status
1211
1180
  response_content = http_response.body
1212
1181
  unless status_code == 200 || status_code == 202 || status_code == 404 || status_code == 500
1213
1182
  error_model = JSON.load(response_content)
1214
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1183
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1215
1184
  end
1216
1185
 
1217
- # Create Result
1218
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1219
1186
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1220
1187
 
1221
1188
  result
@@ -1245,8 +1212,8 @@ module Azure::ARM::Web
1245
1212
  response = get_hosting_environment_metrics_async(resource_group_name, name, details, filter, custom_headers).value!
1246
1213
  unless response.nil?
1247
1214
  page = response.body
1248
- page.next_method = Proc.new do |next_link|
1249
- get_hosting_environment_metrics_next_async(next_link, custom_headers)
1215
+ page.next_method = Proc.new do |next_page_link|
1216
+ get_hosting_environment_metrics_next_async(next_page_link, custom_headers)
1250
1217
  end
1251
1218
  page
1252
1219
  end
@@ -1322,30 +1289,27 @@ module Azure::ARM::Web
1322
1289
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1323
1290
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1324
1291
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics'
1292
+
1293
+ request_url = @base_url || @client.base_url
1294
+
1325
1295
  options = {
1326
1296
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1327
1297
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1328
1298
  query_params: {'details' => details,'$filter' => filter,'api-version' => @client.api_version},
1329
- headers: request_headers.merge(custom_headers || {})
1299
+ headers: request_headers.merge(custom_headers || {}),
1300
+ base_url: request_url
1330
1301
  }
1302
+ promise = @client.make_request_async(:get, path_template, options)
1331
1303
 
1332
- request_url = @base_url || @client.base_url
1333
-
1334
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1335
- promise = request.run_promise do |req|
1336
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1337
- end
1338
-
1339
- promise = promise.then do |http_response|
1304
+ promise = promise.then do |result|
1305
+ http_response = result.response
1340
1306
  status_code = http_response.status
1341
1307
  response_content = http_response.body
1342
1308
  unless status_code == 200
1343
1309
  error_model = JSON.load(response_content)
1344
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1310
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1345
1311
  end
1346
1312
 
1347
- # Create Result
1348
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1349
1313
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1350
1314
  # Deserialize Response
1351
1315
  if status_code == 200
@@ -1419,30 +1383,27 @@ module Azure::ARM::Web
1419
1383
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1420
1384
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1421
1385
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions'
1386
+
1387
+ request_url = @base_url || @client.base_url
1388
+
1422
1389
  options = {
1423
1390
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1424
1391
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1425
1392
  query_params: {'api-version' => @client.api_version},
1426
- headers: request_headers.merge(custom_headers || {})
1393
+ headers: request_headers.merge(custom_headers || {}),
1394
+ base_url: request_url
1427
1395
  }
1396
+ promise = @client.make_request_async(:get, path_template, options)
1428
1397
 
1429
- request_url = @base_url || @client.base_url
1430
-
1431
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1432
- promise = request.run_promise do |req|
1433
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1434
- end
1435
-
1436
- promise = promise.then do |http_response|
1398
+ promise = promise.then do |result|
1399
+ http_response = result.response
1437
1400
  status_code = http_response.status
1438
1401
  response_content = http_response.body
1439
1402
  unless status_code == 200
1440
1403
  error_model = JSON.load(response_content)
1441
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1404
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1442
1405
  end
1443
1406
 
1444
- # Create Result
1445
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1446
1407
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1447
1408
  # Deserialize Response
1448
1409
  if status_code == 200
@@ -1481,8 +1442,8 @@ module Azure::ARM::Web
1481
1442
  response = get_hosting_environment_usages_async(resource_group_name, name, filter, custom_headers).value!
1482
1443
  unless response.nil?
1483
1444
  page = response.body
1484
- page.next_method = Proc.new do |next_link|
1485
- get_hosting_environment_usages_next_async(next_link, custom_headers)
1445
+ page.next_method = Proc.new do |next_page_link|
1446
+ get_hosting_environment_usages_next_async(next_page_link, custom_headers)
1486
1447
  end
1487
1448
  page
1488
1449
  end
@@ -1555,30 +1516,27 @@ module Azure::ARM::Web
1555
1516
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1556
1517
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1557
1518
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'
1519
+
1520
+ request_url = @base_url || @client.base_url
1521
+
1558
1522
  options = {
1559
1523
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1560
1524
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1561
1525
  query_params: {'$filter' => filter,'api-version' => @client.api_version},
1562
- headers: request_headers.merge(custom_headers || {})
1526
+ headers: request_headers.merge(custom_headers || {}),
1527
+ base_url: request_url
1563
1528
  }
1529
+ promise = @client.make_request_async(:get, path_template, options)
1564
1530
 
1565
- request_url = @base_url || @client.base_url
1566
-
1567
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1568
- promise = request.run_promise do |req|
1569
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1570
- end
1571
-
1572
- promise = promise.then do |http_response|
1531
+ promise = promise.then do |result|
1532
+ http_response = result.response
1573
1533
  status_code = http_response.status
1574
1534
  response_content = http_response.body
1575
1535
  unless status_code == 200
1576
1536
  error_model = JSON.load(response_content)
1577
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1537
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1578
1538
  end
1579
1539
 
1580
- # Create Result
1581
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1582
1540
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1583
1541
  # Deserialize Response
1584
1542
  if status_code == 200
@@ -1622,8 +1580,8 @@ module Azure::ARM::Web
1622
1580
  response = get_hosting_environment_multi_role_metrics_async(resource_group_name, name, start_time, end_time, time_grain, details, filter, custom_headers).value!
1623
1581
  unless response.nil?
1624
1582
  page = response.body
1625
- page.next_method = Proc.new do |next_link|
1626
- get_hosting_environment_multi_role_metrics_next_async(next_link, custom_headers)
1583
+ page.next_method = Proc.new do |next_page_link|
1584
+ get_hosting_environment_multi_role_metrics_next_async(next_page_link, custom_headers)
1627
1585
  end
1628
1586
  page
1629
1587
  end
@@ -1711,30 +1669,27 @@ module Azure::ARM::Web
1711
1669
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1712
1670
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1713
1671
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics'
1672
+
1673
+ request_url = @base_url || @client.base_url
1674
+
1714
1675
  options = {
1715
1676
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1716
1677
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1717
1678
  query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'details' => details,'$filter' => filter,'api-version' => @client.api_version},
1718
- headers: request_headers.merge(custom_headers || {})
1679
+ headers: request_headers.merge(custom_headers || {}),
1680
+ base_url: request_url
1719
1681
  }
1682
+ promise = @client.make_request_async(:get, path_template, options)
1720
1683
 
1721
- request_url = @base_url || @client.base_url
1722
-
1723
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1724
- promise = request.run_promise do |req|
1725
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1726
- end
1727
-
1728
- promise = promise.then do |http_response|
1684
+ promise = promise.then do |result|
1685
+ http_response = result.response
1729
1686
  status_code = http_response.status
1730
1687
  response_content = http_response.body
1731
1688
  unless status_code == 200
1732
1689
  error_model = JSON.load(response_content)
1733
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1690
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1734
1691
  end
1735
1692
 
1736
- # Create Result
1737
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1738
1693
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1739
1694
  # Deserialize Response
1740
1695
  if status_code == 200
@@ -1776,8 +1731,8 @@ module Azure::ARM::Web
1776
1731
  response = get_hosting_environment_web_worker_metrics_async(resource_group_name, name, worker_pool_name, details, filter, custom_headers).value!
1777
1732
  unless response.nil?
1778
1733
  page = response.body
1779
- page.next_method = Proc.new do |next_link|
1780
- get_hosting_environment_web_worker_metrics_next_async(next_link, custom_headers)
1734
+ page.next_method = Proc.new do |next_page_link|
1735
+ get_hosting_environment_web_worker_metrics_next_async(next_page_link, custom_headers)
1781
1736
  end
1782
1737
  page
1783
1738
  end
@@ -1860,30 +1815,27 @@ module Azure::ARM::Web
1860
1815
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1861
1816
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1862
1817
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics'
1818
+
1819
+ request_url = @base_url || @client.base_url
1820
+
1863
1821
  options = {
1864
1822
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1865
1823
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerPoolName' => worker_pool_name,'subscriptionId' => @client.subscription_id},
1866
1824
  query_params: {'details' => details,'$filter' => filter,'api-version' => @client.api_version},
1867
- headers: request_headers.merge(custom_headers || {})
1825
+ headers: request_headers.merge(custom_headers || {}),
1826
+ base_url: request_url
1868
1827
  }
1828
+ promise = @client.make_request_async(:get, path_template, options)
1869
1829
 
1870
- request_url = @base_url || @client.base_url
1871
-
1872
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1873
- promise = request.run_promise do |req|
1874
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1875
- end
1876
-
1877
- promise = promise.then do |http_response|
1830
+ promise = promise.then do |result|
1831
+ http_response = result.response
1878
1832
  status_code = http_response.status
1879
1833
  response_content = http_response.body
1880
1834
  unless status_code == 200
1881
1835
  error_model = JSON.load(response_content)
1882
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1836
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1883
1837
  end
1884
1838
 
1885
- # Create Result
1886
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1887
1839
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1888
1840
  # Deserialize Response
1889
1841
  if status_code == 200
@@ -1918,8 +1870,8 @@ module Azure::ARM::Web
1918
1870
  response = get_hosting_environment_multi_role_metric_definitions_async(resource_group_name, name, custom_headers).value!
1919
1871
  unless response.nil?
1920
1872
  page = response.body
1921
- page.next_method = Proc.new do |next_link|
1922
- get_hosting_environment_multi_role_metric_definitions_next_async(next_link, custom_headers)
1873
+ page.next_method = Proc.new do |next_page_link|
1874
+ get_hosting_environment_multi_role_metric_definitions_next_async(next_page_link, custom_headers)
1923
1875
  end
1924
1876
  page
1925
1877
  end
@@ -1980,30 +1932,27 @@ module Azure::ARM::Web
1980
1932
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1981
1933
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1982
1934
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'
1935
+
1936
+ request_url = @base_url || @client.base_url
1937
+
1983
1938
  options = {
1984
1939
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1985
1940
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1986
1941
  query_params: {'api-version' => @client.api_version},
1987
- headers: request_headers.merge(custom_headers || {})
1942
+ headers: request_headers.merge(custom_headers || {}),
1943
+ base_url: request_url
1988
1944
  }
1945
+ promise = @client.make_request_async(:get, path_template, options)
1989
1946
 
1990
- request_url = @base_url || @client.base_url
1991
-
1992
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1993
- promise = request.run_promise do |req|
1994
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1995
- end
1996
-
1997
- promise = promise.then do |http_response|
1947
+ promise = promise.then do |result|
1948
+ http_response = result.response
1998
1949
  status_code = http_response.status
1999
1950
  response_content = http_response.body
2000
1951
  unless status_code == 200
2001
1952
  error_model = JSON.load(response_content)
2002
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1953
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2003
1954
  end
2004
1955
 
2005
- # Create Result
2006
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2007
1956
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2008
1957
  # Deserialize Response
2009
1958
  if status_code == 200
@@ -2039,8 +1988,8 @@ module Azure::ARM::Web
2039
1988
  response = get_hosting_environment_web_worker_metric_definitions_async(resource_group_name, name, worker_pool_name, custom_headers).value!
2040
1989
  unless response.nil?
2041
1990
  page = response.body
2042
- page.next_method = Proc.new do |next_link|
2043
- get_hosting_environment_web_worker_metric_definitions_next_async(next_link, custom_headers)
1991
+ page.next_method = Proc.new do |next_page_link|
1992
+ get_hosting_environment_web_worker_metric_definitions_next_async(next_page_link, custom_headers)
2044
1993
  end
2045
1994
  page
2046
1995
  end
@@ -2105,30 +2054,27 @@ module Azure::ARM::Web
2105
2054
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2106
2055
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2107
2056
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'
2057
+
2058
+ request_url = @base_url || @client.base_url
2059
+
2108
2060
  options = {
2109
2061
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2110
2062
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerPoolName' => worker_pool_name,'subscriptionId' => @client.subscription_id},
2111
2063
  query_params: {'api-version' => @client.api_version},
2112
- headers: request_headers.merge(custom_headers || {})
2064
+ headers: request_headers.merge(custom_headers || {}),
2065
+ base_url: request_url
2113
2066
  }
2067
+ promise = @client.make_request_async(:get, path_template, options)
2114
2068
 
2115
- request_url = @base_url || @client.base_url
2116
-
2117
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
2118
- promise = request.run_promise do |req|
2119
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2120
- end
2121
-
2122
- promise = promise.then do |http_response|
2069
+ promise = promise.then do |result|
2070
+ http_response = result.response
2123
2071
  status_code = http_response.status
2124
2072
  response_content = http_response.body
2125
2073
  unless status_code == 200
2126
2074
  error_model = JSON.load(response_content)
2127
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2075
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2128
2076
  end
2129
2077
 
2130
- # Create Result
2131
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2132
2078
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2133
2079
  # Deserialize Response
2134
2080
  if status_code == 200
@@ -2162,8 +2108,8 @@ module Azure::ARM::Web
2162
2108
  response = get_hosting_environment_multi_role_usages_async(resource_group_name, name, custom_headers).value!
2163
2109
  unless response.nil?
2164
2110
  page = response.body
2165
- page.next_method = Proc.new do |next_link|
2166
- get_hosting_environment_multi_role_usages_next_async(next_link, custom_headers)
2111
+ page.next_method = Proc.new do |next_page_link|
2112
+ get_hosting_environment_multi_role_usages_next_async(next_page_link, custom_headers)
2167
2113
  end
2168
2114
  page
2169
2115
  end
@@ -2224,30 +2170,27 @@ module Azure::ARM::Web
2224
2170
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2225
2171
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2226
2172
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'
2173
+
2174
+ request_url = @base_url || @client.base_url
2175
+
2227
2176
  options = {
2228
2177
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2229
2178
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
2230
2179
  query_params: {'api-version' => @client.api_version},
2231
- headers: request_headers.merge(custom_headers || {})
2180
+ headers: request_headers.merge(custom_headers || {}),
2181
+ base_url: request_url
2232
2182
  }
2183
+ promise = @client.make_request_async(:get, path_template, options)
2233
2184
 
2234
- request_url = @base_url || @client.base_url
2235
-
2236
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
2237
- promise = request.run_promise do |req|
2238
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2239
- end
2240
-
2241
- promise = promise.then do |http_response|
2185
+ promise = promise.then do |result|
2186
+ http_response = result.response
2242
2187
  status_code = http_response.status
2243
2188
  response_content = http_response.body
2244
2189
  unless status_code == 200
2245
2190
  error_model = JSON.load(response_content)
2246
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2191
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2247
2192
  end
2248
2193
 
2249
- # Create Result
2250
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2251
2194
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2252
2195
  # Deserialize Response
2253
2196
  if status_code == 200
@@ -2282,8 +2225,8 @@ module Azure::ARM::Web
2282
2225
  response = get_hosting_environment_web_worker_usages_async(resource_group_name, name, worker_pool_name, custom_headers).value!
2283
2226
  unless response.nil?
2284
2227
  page = response.body
2285
- page.next_method = Proc.new do |next_link|
2286
- get_hosting_environment_web_worker_usages_next_async(next_link, custom_headers)
2228
+ page.next_method = Proc.new do |next_page_link|
2229
+ get_hosting_environment_web_worker_usages_next_async(next_page_link, custom_headers)
2287
2230
  end
2288
2231
  page
2289
2232
  end
@@ -2348,30 +2291,27 @@ module Azure::ARM::Web
2348
2291
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2349
2292
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2350
2293
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'
2294
+
2295
+ request_url = @base_url || @client.base_url
2296
+
2351
2297
  options = {
2352
2298
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2353
2299
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerPoolName' => worker_pool_name,'subscriptionId' => @client.subscription_id},
2354
2300
  query_params: {'api-version' => @client.api_version},
2355
- headers: request_headers.merge(custom_headers || {})
2301
+ headers: request_headers.merge(custom_headers || {}),
2302
+ base_url: request_url
2356
2303
  }
2304
+ promise = @client.make_request_async(:get, path_template, options)
2357
2305
 
2358
- request_url = @base_url || @client.base_url
2359
-
2360
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
2361
- promise = request.run_promise do |req|
2362
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2363
- end
2364
-
2365
- promise = promise.then do |http_response|
2306
+ promise = promise.then do |result|
2307
+ http_response = result.response
2366
2308
  status_code = http_response.status
2367
2309
  response_content = http_response.body
2368
2310
  unless status_code == 200
2369
2311
  error_model = JSON.load(response_content)
2370
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2312
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2371
2313
  end
2372
2314
 
2373
- # Create Result
2374
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2375
2315
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2376
2316
  # Deserialize Response
2377
2317
  if status_code == 200
@@ -2406,8 +2346,8 @@ module Azure::ARM::Web
2406
2346
  response = get_hosting_environment_sites_async(resource_group_name, name, properties_to_include, custom_headers).value!
2407
2347
  unless response.nil?
2408
2348
  page = response.body
2409
- page.next_method = Proc.new do |next_link|
2410
- get_hosting_environment_sites_next_async(next_link, custom_headers)
2349
+ page.next_method = Proc.new do |next_page_link|
2350
+ get_hosting_environment_sites_next_async(next_page_link, custom_headers)
2411
2351
  end
2412
2352
  page
2413
2353
  end
@@ -2471,30 +2411,27 @@ module Azure::ARM::Web
2471
2411
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2472
2412
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2473
2413
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'
2414
+
2415
+ request_url = @base_url || @client.base_url
2416
+
2474
2417
  options = {
2475
2418
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2476
2419
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
2477
2420
  query_params: {'propertiesToInclude' => properties_to_include,'api-version' => @client.api_version},
2478
- headers: request_headers.merge(custom_headers || {})
2421
+ headers: request_headers.merge(custom_headers || {}),
2422
+ base_url: request_url
2479
2423
  }
2424
+ promise = @client.make_request_async(:get, path_template, options)
2480
2425
 
2481
- request_url = @base_url || @client.base_url
2482
-
2483
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
2484
- promise = request.run_promise do |req|
2485
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2486
- end
2487
-
2488
- promise = promise.then do |http_response|
2426
+ promise = promise.then do |result|
2427
+ http_response = result.response
2489
2428
  status_code = http_response.status
2490
2429
  response_content = http_response.body
2491
2430
  unless status_code == 200
2492
2431
  error_model = JSON.load(response_content)
2493
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2432
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2494
2433
  end
2495
2434
 
2496
- # Create Result
2497
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2498
2435
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2499
2436
  # Deserialize Response
2500
2437
  if status_code == 200
@@ -2529,8 +2466,8 @@ module Azure::ARM::Web
2529
2466
  response = get_hosting_environment_web_hosting_plans_async(resource_group_name, name, custom_headers).value!
2530
2467
  unless response.nil?
2531
2468
  page = response.body
2532
- page.next_method = Proc.new do |next_link|
2533
- get_hosting_environment_web_hosting_plans_next_async(next_link, custom_headers)
2469
+ page.next_method = Proc.new do |next_page_link|
2470
+ get_hosting_environment_web_hosting_plans_next_async(next_page_link, custom_headers)
2534
2471
  end
2535
2472
  page
2536
2473
  end
@@ -2591,30 +2528,27 @@ module Azure::ARM::Web
2591
2528
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2592
2529
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2593
2530
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/webhostingplans'
2531
+
2532
+ request_url = @base_url || @client.base_url
2533
+
2594
2534
  options = {
2595
2535
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2596
2536
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
2597
2537
  query_params: {'api-version' => @client.api_version},
2598
- headers: request_headers.merge(custom_headers || {})
2538
+ headers: request_headers.merge(custom_headers || {}),
2539
+ base_url: request_url
2599
2540
  }
2541
+ promise = @client.make_request_async(:get, path_template, options)
2600
2542
 
2601
- request_url = @base_url || @client.base_url
2602
-
2603
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
2604
- promise = request.run_promise do |req|
2605
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2606
- end
2607
-
2608
- promise = promise.then do |http_response|
2543
+ promise = promise.then do |result|
2544
+ http_response = result.response
2609
2545
  status_code = http_response.status
2610
2546
  response_content = http_response.body
2611
2547
  unless status_code == 200
2612
2548
  error_model = JSON.load(response_content)
2613
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2549
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2614
2550
  end
2615
2551
 
2616
- # Create Result
2617
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2618
2552
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2619
2553
  # Deserialize Response
2620
2554
  if status_code == 200
@@ -2649,8 +2583,8 @@ module Azure::ARM::Web
2649
2583
  response = get_hosting_environment_server_farms_async(resource_group_name, name, custom_headers).value!
2650
2584
  unless response.nil?
2651
2585
  page = response.body
2652
- page.next_method = Proc.new do |next_link|
2653
- get_hosting_environment_server_farms_next_async(next_link, custom_headers)
2586
+ page.next_method = Proc.new do |next_page_link|
2587
+ get_hosting_environment_server_farms_next_async(next_page_link, custom_headers)
2654
2588
  end
2655
2589
  page
2656
2590
  end
@@ -2711,30 +2645,27 @@ module Azure::ARM::Web
2711
2645
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2712
2646
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2713
2647
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'
2648
+
2649
+ request_url = @base_url || @client.base_url
2650
+
2714
2651
  options = {
2715
2652
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2716
2653
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
2717
2654
  query_params: {'api-version' => @client.api_version},
2718
- headers: request_headers.merge(custom_headers || {})
2655
+ headers: request_headers.merge(custom_headers || {}),
2656
+ base_url: request_url
2719
2657
  }
2658
+ promise = @client.make_request_async(:get, path_template, options)
2720
2659
 
2721
- request_url = @base_url || @client.base_url
2722
-
2723
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
2724
- promise = request.run_promise do |req|
2725
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2726
- end
2727
-
2728
- promise = promise.then do |http_response|
2660
+ promise = promise.then do |result|
2661
+ http_response = result.response
2729
2662
  status_code = http_response.status
2730
2663
  response_content = http_response.body
2731
2664
  unless status_code == 200
2732
2665
  error_model = JSON.load(response_content)
2733
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2666
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2734
2667
  end
2735
2668
 
2736
- # Create Result
2737
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2738
2669
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2739
2670
  # Deserialize Response
2740
2671
  if status_code == 200
@@ -2768,8 +2699,8 @@ module Azure::ARM::Web
2768
2699
  response = get_multi_role_pools_async(resource_group_name, name, custom_headers).value!
2769
2700
  unless response.nil?
2770
2701
  page = response.body
2771
- page.next_method = Proc.new do |next_link|
2772
- get_multi_role_pools_next_async(next_link, custom_headers)
2702
+ page.next_method = Proc.new do |next_page_link|
2703
+ get_multi_role_pools_next_async(next_page_link, custom_headers)
2773
2704
  end
2774
2705
  page
2775
2706
  end
@@ -2827,30 +2758,27 @@ module Azure::ARM::Web
2827
2758
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2828
2759
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2829
2760
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'
2761
+
2762
+ request_url = @base_url || @client.base_url
2763
+
2830
2764
  options = {
2831
2765
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2832
2766
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
2833
2767
  query_params: {'api-version' => @client.api_version},
2834
- headers: request_headers.merge(custom_headers || {})
2768
+ headers: request_headers.merge(custom_headers || {}),
2769
+ base_url: request_url
2835
2770
  }
2771
+ promise = @client.make_request_async(:get, path_template, options)
2836
2772
 
2837
- request_url = @base_url || @client.base_url
2838
-
2839
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
2840
- promise = request.run_promise do |req|
2841
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2842
- end
2843
-
2844
- promise = promise.then do |http_response|
2773
+ promise = promise.then do |result|
2774
+ http_response = result.response
2845
2775
  status_code = http_response.status
2846
2776
  response_content = http_response.body
2847
2777
  unless status_code == 200
2848
2778
  error_model = JSON.load(response_content)
2849
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2779
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2850
2780
  end
2851
2781
 
2852
- # Create Result
2853
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2854
2782
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2855
2783
  # Deserialize Response
2856
2784
  if status_code == 200
@@ -2921,30 +2849,27 @@ module Azure::ARM::Web
2921
2849
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2922
2850
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2923
2851
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'
2852
+
2853
+ request_url = @base_url || @client.base_url
2854
+
2924
2855
  options = {
2925
2856
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2926
2857
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
2927
2858
  query_params: {'api-version' => @client.api_version},
2928
- headers: request_headers.merge(custom_headers || {})
2859
+ headers: request_headers.merge(custom_headers || {}),
2860
+ base_url: request_url
2929
2861
  }
2862
+ promise = @client.make_request_async(:get, path_template, options)
2930
2863
 
2931
- request_url = @base_url || @client.base_url
2932
-
2933
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
2934
- promise = request.run_promise do |req|
2935
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2936
- end
2937
-
2938
- promise = promise.then do |http_response|
2864
+ promise = promise.then do |result|
2865
+ http_response = result.response
2939
2866
  status_code = http_response.status
2940
2867
  response_content = http_response.body
2941
2868
  unless status_code == 200
2942
2869
  error_model = JSON.load(response_content)
2943
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2870
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2944
2871
  end
2945
2872
 
2946
- # Create Result
2947
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2948
2873
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2949
2874
  # Deserialize Response
2950
2875
  if status_code == 200
@@ -3071,31 +2996,28 @@ module Azure::ARM::Web
3071
2996
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
3072
2997
 
3073
2998
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'
2999
+
3000
+ request_url = @base_url || @client.base_url
3001
+
3074
3002
  options = {
3075
3003
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3076
3004
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
3077
3005
  query_params: {'api-version' => @client.api_version},
3078
3006
  body: request_content,
3079
- headers: request_headers.merge(custom_headers || {})
3007
+ headers: request_headers.merge(custom_headers || {}),
3008
+ base_url: request_url
3080
3009
  }
3010
+ promise = @client.make_request_async(:put, path_template, options)
3081
3011
 
3082
- request_url = @base_url || @client.base_url
3083
-
3084
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
3085
- promise = request.run_promise do |req|
3086
- @client.credentials.sign_request(req) unless @client.credentials.nil?
3087
- end
3088
-
3089
- promise = promise.then do |http_response|
3012
+ promise = promise.then do |result|
3013
+ http_response = result.response
3090
3014
  status_code = http_response.status
3091
3015
  response_content = http_response.body
3092
3016
  unless status_code == 200 || status_code == 202 || status_code == 400 || status_code == 404 || status_code == 409
3093
3017
  error_model = JSON.load(response_content)
3094
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
3018
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
3095
3019
  end
3096
3020
 
3097
- # Create Result
3098
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
3099
3021
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3100
3022
  # Deserialize Response
3101
3023
  if status_code == 200
@@ -3139,8 +3061,8 @@ module Azure::ARM::Web
3139
3061
  response = get_multi_role_pool_skus_async(resource_group_name, name, custom_headers).value!
3140
3062
  unless response.nil?
3141
3063
  page = response.body
3142
- page.next_method = Proc.new do |next_link|
3143
- get_multi_role_pool_skus_next_async(next_link, custom_headers)
3064
+ page.next_method = Proc.new do |next_page_link|
3065
+ get_multi_role_pool_skus_next_async(next_page_link, custom_headers)
3144
3066
  end
3145
3067
  page
3146
3068
  end
@@ -3198,30 +3120,27 @@ module Azure::ARM::Web
3198
3120
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3199
3121
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3200
3122
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'
3123
+
3124
+ request_url = @base_url || @client.base_url
3125
+
3201
3126
  options = {
3202
3127
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3203
3128
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
3204
3129
  query_params: {'api-version' => @client.api_version},
3205
- headers: request_headers.merge(custom_headers || {})
3130
+ headers: request_headers.merge(custom_headers || {}),
3131
+ base_url: request_url
3206
3132
  }
3133
+ promise = @client.make_request_async(:get, path_template, options)
3207
3134
 
3208
- request_url = @base_url || @client.base_url
3209
-
3210
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
3211
- promise = request.run_promise do |req|
3212
- @client.credentials.sign_request(req) unless @client.credentials.nil?
3213
- end
3214
-
3215
- promise = promise.then do |http_response|
3135
+ promise = promise.then do |result|
3136
+ http_response = result.response
3216
3137
  status_code = http_response.status
3217
3138
  response_content = http_response.body
3218
3139
  unless status_code == 200
3219
3140
  error_model = JSON.load(response_content)
3220
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
3141
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
3221
3142
  end
3222
3143
 
3223
- # Create Result
3224
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
3225
3144
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3226
3145
  # Deserialize Response
3227
3146
  if status_code == 200
@@ -3255,8 +3174,8 @@ module Azure::ARM::Web
3255
3174
  response = get_worker_pools_async(resource_group_name, name, custom_headers).value!
3256
3175
  unless response.nil?
3257
3176
  page = response.body
3258
- page.next_method = Proc.new do |next_link|
3259
- get_worker_pools_next_async(next_link, custom_headers)
3177
+ page.next_method = Proc.new do |next_page_link|
3178
+ get_worker_pools_next_async(next_page_link, custom_headers)
3260
3179
  end
3261
3180
  page
3262
3181
  end
@@ -3314,30 +3233,27 @@ module Azure::ARM::Web
3314
3233
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3315
3234
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3316
3235
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'
3236
+
3237
+ request_url = @base_url || @client.base_url
3238
+
3317
3239
  options = {
3318
3240
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3319
3241
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
3320
3242
  query_params: {'api-version' => @client.api_version},
3321
- headers: request_headers.merge(custom_headers || {})
3243
+ headers: request_headers.merge(custom_headers || {}),
3244
+ base_url: request_url
3322
3245
  }
3246
+ promise = @client.make_request_async(:get, path_template, options)
3323
3247
 
3324
- request_url = @base_url || @client.base_url
3325
-
3326
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
3327
- promise = request.run_promise do |req|
3328
- @client.credentials.sign_request(req) unless @client.credentials.nil?
3329
- end
3330
-
3331
- promise = promise.then do |http_response|
3248
+ promise = promise.then do |result|
3249
+ http_response = result.response
3332
3250
  status_code = http_response.status
3333
3251
  response_content = http_response.body
3334
3252
  unless status_code == 200
3335
3253
  error_model = JSON.load(response_content)
3336
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
3254
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
3337
3255
  end
3338
3256
 
3339
- # Create Result
3340
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
3341
3257
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3342
3258
  # Deserialize Response
3343
3259
  if status_code == 200
@@ -3412,30 +3328,27 @@ module Azure::ARM::Web
3412
3328
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3413
3329
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3414
3330
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'
3331
+
3332
+ request_url = @base_url || @client.base_url
3333
+
3415
3334
  options = {
3416
3335
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3417
3336
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerPoolName' => worker_pool_name,'subscriptionId' => @client.subscription_id},
3418
3337
  query_params: {'api-version' => @client.api_version},
3419
- headers: request_headers.merge(custom_headers || {})
3338
+ headers: request_headers.merge(custom_headers || {}),
3339
+ base_url: request_url
3420
3340
  }
3341
+ promise = @client.make_request_async(:get, path_template, options)
3421
3342
 
3422
- request_url = @base_url || @client.base_url
3423
-
3424
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
3425
- promise = request.run_promise do |req|
3426
- @client.credentials.sign_request(req) unless @client.credentials.nil?
3427
- end
3428
-
3429
- promise = promise.then do |http_response|
3343
+ promise = promise.then do |result|
3344
+ http_response = result.response
3430
3345
  status_code = http_response.status
3431
3346
  response_content = http_response.body
3432
3347
  unless status_code == 200
3433
3348
  error_model = JSON.load(response_content)
3434
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
3349
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
3435
3350
  end
3436
3351
 
3437
- # Create Result
3438
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
3439
3352
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3440
3353
  # Deserialize Response
3441
3354
  if status_code == 200
@@ -3568,31 +3481,28 @@ module Azure::ARM::Web
3568
3481
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
3569
3482
 
3570
3483
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'
3484
+
3485
+ request_url = @base_url || @client.base_url
3486
+
3571
3487
  options = {
3572
3488
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3573
3489
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerPoolName' => worker_pool_name,'subscriptionId' => @client.subscription_id},
3574
3490
  query_params: {'api-version' => @client.api_version},
3575
3491
  body: request_content,
3576
- headers: request_headers.merge(custom_headers || {})
3492
+ headers: request_headers.merge(custom_headers || {}),
3493
+ base_url: request_url
3577
3494
  }
3495
+ promise = @client.make_request_async(:put, path_template, options)
3578
3496
 
3579
- request_url = @base_url || @client.base_url
3580
-
3581
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
3582
- promise = request.run_promise do |req|
3583
- @client.credentials.sign_request(req) unless @client.credentials.nil?
3584
- end
3585
-
3586
- promise = promise.then do |http_response|
3497
+ promise = promise.then do |result|
3498
+ http_response = result.response
3587
3499
  status_code = http_response.status
3588
3500
  response_content = http_response.body
3589
3501
  unless status_code == 200 || status_code == 202 || status_code == 400 || status_code == 404 || status_code == 409
3590
3502
  error_model = JSON.load(response_content)
3591
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
3503
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
3592
3504
  end
3593
3505
 
3594
- # Create Result
3595
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
3596
3506
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3597
3507
  # Deserialize Response
3598
3508
  if status_code == 200
@@ -3637,8 +3547,8 @@ module Azure::ARM::Web
3637
3547
  response = get_worker_pool_skus_async(resource_group_name, name, worker_pool_name, custom_headers).value!
3638
3548
  unless response.nil?
3639
3549
  page = response.body
3640
- page.next_method = Proc.new do |next_link|
3641
- get_worker_pool_skus_next_async(next_link, custom_headers)
3550
+ page.next_method = Proc.new do |next_page_link|
3551
+ get_worker_pool_skus_next_async(next_page_link, custom_headers)
3642
3552
  end
3643
3553
  page
3644
3554
  end
@@ -3700,30 +3610,27 @@ module Azure::ARM::Web
3700
3610
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3701
3611
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3702
3612
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'
3613
+
3614
+ request_url = @base_url || @client.base_url
3615
+
3703
3616
  options = {
3704
3617
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3705
3618
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerPoolName' => worker_pool_name,'subscriptionId' => @client.subscription_id},
3706
3619
  query_params: {'api-version' => @client.api_version},
3707
- headers: request_headers.merge(custom_headers || {})
3620
+ headers: request_headers.merge(custom_headers || {}),
3621
+ base_url: request_url
3708
3622
  }
3623
+ promise = @client.make_request_async(:get, path_template, options)
3709
3624
 
3710
- request_url = @base_url || @client.base_url
3711
-
3712
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
3713
- promise = request.run_promise do |req|
3714
- @client.credentials.sign_request(req) unless @client.credentials.nil?
3715
- end
3716
-
3717
- promise = promise.then do |http_response|
3625
+ promise = promise.then do |result|
3626
+ http_response = result.response
3718
3627
  status_code = http_response.status
3719
3628
  response_content = http_response.body
3720
3629
  unless status_code == 200
3721
3630
  error_model = JSON.load(response_content)
3722
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
3631
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
3723
3632
  end
3724
3633
 
3725
- # Create Result
3726
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
3727
3634
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3728
3635
  # Deserialize Response
3729
3636
  if status_code == 200
@@ -3823,30 +3730,27 @@ module Azure::ARM::Web
3823
3730
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3824
3731
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3825
3732
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics'
3733
+
3734
+ request_url = @base_url || @client.base_url
3735
+
3826
3736
  options = {
3827
3737
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3828
3738
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerPoolName' => worker_pool_name,'instance' => instance,'subscriptionId' => @client.subscription_id},
3829
3739
  query_params: {'details' => details,'$filter' => filter,'api-version' => @client.api_version},
3830
- headers: request_headers.merge(custom_headers || {})
3740
+ headers: request_headers.merge(custom_headers || {}),
3741
+ base_url: request_url
3831
3742
  }
3743
+ promise = @client.make_request_async(:get, path_template, options)
3832
3744
 
3833
- request_url = @base_url || @client.base_url
3834
-
3835
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
3836
- promise = request.run_promise do |req|
3837
- @client.credentials.sign_request(req) unless @client.credentials.nil?
3838
- end
3839
-
3840
- promise = promise.then do |http_response|
3745
+ promise = promise.then do |result|
3746
+ http_response = result.response
3841
3747
  status_code = http_response.status
3842
3748
  response_content = http_response.body
3843
3749
  unless status_code == 200
3844
3750
  error_model = JSON.load(response_content)
3845
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
3751
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
3846
3752
  end
3847
3753
 
3848
- # Create Result
3849
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
3850
3754
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3851
3755
 
3852
3756
  result
@@ -3918,30 +3822,27 @@ module Azure::ARM::Web
3918
3822
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3919
3823
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3920
3824
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'
3825
+
3826
+ request_url = @base_url || @client.base_url
3827
+
3921
3828
  options = {
3922
3829
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3923
3830
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'workerPoolName' => worker_pool_name,'instance' => instance,'subscriptionId' => @client.subscription_id},
3924
3831
  query_params: {'api-version' => @client.api_version},
3925
- headers: request_headers.merge(custom_headers || {})
3832
+ headers: request_headers.merge(custom_headers || {}),
3833
+ base_url: request_url
3926
3834
  }
3835
+ promise = @client.make_request_async(:get, path_template, options)
3927
3836
 
3928
- request_url = @base_url || @client.base_url
3929
-
3930
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
3931
- promise = request.run_promise do |req|
3932
- @client.credentials.sign_request(req) unless @client.credentials.nil?
3933
- end
3934
-
3935
- promise = promise.then do |http_response|
3837
+ promise = promise.then do |result|
3838
+ http_response = result.response
3936
3839
  status_code = http_response.status
3937
3840
  response_content = http_response.body
3938
3841
  unless status_code == 200
3939
3842
  error_model = JSON.load(response_content)
3940
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
3843
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
3941
3844
  end
3942
3845
 
3943
- # Create Result
3944
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
3945
3846
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3946
3847
 
3947
3848
  result
@@ -4012,30 +3913,27 @@ module Azure::ARM::Web
4012
3913
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
4013
3914
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
4014
3915
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics'
3916
+
3917
+ request_url = @base_url || @client.base_url
3918
+
4015
3919
  options = {
4016
3920
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
4017
3921
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instance' => instance,'subscriptionId' => @client.subscription_id},
4018
3922
  query_params: {'details' => details,'api-version' => @client.api_version},
4019
- headers: request_headers.merge(custom_headers || {})
3923
+ headers: request_headers.merge(custom_headers || {}),
3924
+ base_url: request_url
4020
3925
  }
3926
+ promise = @client.make_request_async(:get, path_template, options)
4021
3927
 
4022
- request_url = @base_url || @client.base_url
4023
-
4024
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
4025
- promise = request.run_promise do |req|
4026
- @client.credentials.sign_request(req) unless @client.credentials.nil?
4027
- end
4028
-
4029
- promise = promise.then do |http_response|
3928
+ promise = promise.then do |result|
3929
+ http_response = result.response
4030
3930
  status_code = http_response.status
4031
3931
  response_content = http_response.body
4032
3932
  unless status_code == 200
4033
3933
  error_model = JSON.load(response_content)
4034
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
3934
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
4035
3935
  end
4036
3936
 
4037
- # Create Result
4038
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
4039
3937
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
4040
3938
 
4041
3939
  result
@@ -4103,30 +4001,27 @@ module Azure::ARM::Web
4103
4001
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
4104
4002
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
4105
4003
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'
4004
+
4005
+ request_url = @base_url || @client.base_url
4006
+
4106
4007
  options = {
4107
4008
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
4108
4009
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instance' => instance,'subscriptionId' => @client.subscription_id},
4109
4010
  query_params: {'api-version' => @client.api_version},
4110
- headers: request_headers.merge(custom_headers || {})
4011
+ headers: request_headers.merge(custom_headers || {}),
4012
+ base_url: request_url
4111
4013
  }
4014
+ promise = @client.make_request_async(:get, path_template, options)
4112
4015
 
4113
- request_url = @base_url || @client.base_url
4114
-
4115
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
4116
- promise = request.run_promise do |req|
4117
- @client.credentials.sign_request(req) unless @client.credentials.nil?
4118
- end
4119
-
4120
- promise = promise.then do |http_response|
4016
+ promise = promise.then do |result|
4017
+ http_response = result.response
4121
4018
  status_code = http_response.status
4122
4019
  response_content = http_response.body
4123
4020
  unless status_code == 200
4124
4021
  error_model = JSON.load(response_content)
4125
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
4022
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
4126
4023
  end
4127
4024
 
4128
- # Create Result
4129
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
4130
4025
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
4131
4026
 
4132
4027
  result
@@ -4149,8 +4044,8 @@ module Azure::ARM::Web
4149
4044
  response = suspend_hosting_environment_async(resource_group_name, name, custom_headers).value!
4150
4045
  unless response.nil?
4151
4046
  page = response.body
4152
- page.next_method = Proc.new do |next_link|
4153
- suspend_hosting_environment_next_async(next_link, custom_headers)
4047
+ page.next_method = Proc.new do |next_page_link|
4048
+ suspend_hosting_environment_next_async(next_page_link, custom_headers)
4154
4049
  end
4155
4050
  page
4156
4051
  end
@@ -4211,8 +4106,8 @@ module Azure::ARM::Web
4211
4106
  response = begin_suspend_hosting_environment_async(resource_group_name, name, custom_headers).value!
4212
4107
  unless response.nil?
4213
4108
  page = response.body
4214
- page.next_method = Proc.new do |next_link|
4215
- begin_suspend_hosting_environment_next_async(next_link, custom_headers)
4109
+ page.next_method = Proc.new do |next_page_link|
4110
+ begin_suspend_hosting_environment_next_async(next_page_link, custom_headers)
4216
4111
  end
4217
4112
  page
4218
4113
  end
@@ -4270,30 +4165,27 @@ module Azure::ARM::Web
4270
4165
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
4271
4166
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
4272
4167
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'
4168
+
4169
+ request_url = @base_url || @client.base_url
4170
+
4273
4171
  options = {
4274
4172
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
4275
4173
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
4276
4174
  query_params: {'api-version' => @client.api_version},
4277
- headers: request_headers.merge(custom_headers || {})
4175
+ headers: request_headers.merge(custom_headers || {}),
4176
+ base_url: request_url
4278
4177
  }
4178
+ promise = @client.make_request_async(:post, path_template, options)
4279
4179
 
4280
- request_url = @base_url || @client.base_url
4281
-
4282
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
4283
- promise = request.run_promise do |req|
4284
- @client.credentials.sign_request(req) unless @client.credentials.nil?
4285
- end
4286
-
4287
- promise = promise.then do |http_response|
4180
+ promise = promise.then do |result|
4181
+ http_response = result.response
4288
4182
  status_code = http_response.status
4289
4183
  response_content = http_response.body
4290
4184
  unless status_code == 200 || status_code == 202
4291
4185
  error_model = JSON.load(response_content)
4292
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
4186
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
4293
4187
  end
4294
4188
 
4295
- # Create Result
4296
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
4297
4189
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
4298
4190
  # Deserialize Response
4299
4191
  if status_code == 200
@@ -4336,8 +4228,8 @@ module Azure::ARM::Web
4336
4228
  response = resume_hosting_environment_async(resource_group_name, name, custom_headers).value!
4337
4229
  unless response.nil?
4338
4230
  page = response.body
4339
- page.next_method = Proc.new do |next_link|
4340
- resume_hosting_environment_next_async(next_link, custom_headers)
4231
+ page.next_method = Proc.new do |next_page_link|
4232
+ resume_hosting_environment_next_async(next_page_link, custom_headers)
4341
4233
  end
4342
4234
  page
4343
4235
  end
@@ -4398,8 +4290,8 @@ module Azure::ARM::Web
4398
4290
  response = begin_resume_hosting_environment_async(resource_group_name, name, custom_headers).value!
4399
4291
  unless response.nil?
4400
4292
  page = response.body
4401
- page.next_method = Proc.new do |next_link|
4402
- begin_resume_hosting_environment_next_async(next_link, custom_headers)
4293
+ page.next_method = Proc.new do |next_page_link|
4294
+ begin_resume_hosting_environment_next_async(next_page_link, custom_headers)
4403
4295
  end
4404
4296
  page
4405
4297
  end
@@ -4457,30 +4349,27 @@ module Azure::ARM::Web
4457
4349
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
4458
4350
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
4459
4351
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'
4352
+
4353
+ request_url = @base_url || @client.base_url
4354
+
4460
4355
  options = {
4461
4356
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
4462
4357
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
4463
4358
  query_params: {'api-version' => @client.api_version},
4464
- headers: request_headers.merge(custom_headers || {})
4359
+ headers: request_headers.merge(custom_headers || {}),
4360
+ base_url: request_url
4465
4361
  }
4362
+ promise = @client.make_request_async(:post, path_template, options)
4466
4363
 
4467
- request_url = @base_url || @client.base_url
4468
-
4469
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
4470
- promise = request.run_promise do |req|
4471
- @client.credentials.sign_request(req) unless @client.credentials.nil?
4472
- end
4473
-
4474
- promise = promise.then do |http_response|
4364
+ promise = promise.then do |result|
4365
+ http_response = result.response
4475
4366
  status_code = http_response.status
4476
4367
  response_content = http_response.body
4477
4368
  unless status_code == 200 || status_code == 202
4478
4369
  error_model = JSON.load(response_content)
4479
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
4370
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
4480
4371
  end
4481
4372
 
4482
- # Create Result
4483
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
4484
4373
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
4485
4374
  # Deserialize Response
4486
4375
  if status_code == 200
@@ -4561,29 +4450,26 @@ module Azure::ARM::Web
4561
4450
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
4562
4451
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
4563
4452
  path_template = '{nextLink}'
4453
+
4454
+ request_url = @base_url || @client.base_url
4455
+
4564
4456
  options = {
4565
4457
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
4566
4458
  skip_encoding_path_params: {'nextLink' => next_page_link},
4567
- headers: request_headers.merge(custom_headers || {})
4459
+ headers: request_headers.merge(custom_headers || {}),
4460
+ base_url: request_url
4568
4461
  }
4462
+ promise = @client.make_request_async(:get, path_template, options)
4569
4463
 
4570
- request_url = @base_url || @client.base_url
4571
-
4572
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
4573
- promise = request.run_promise do |req|
4574
- @client.credentials.sign_request(req) unless @client.credentials.nil?
4575
- end
4576
-
4577
- promise = promise.then do |http_response|
4464
+ promise = promise.then do |result|
4465
+ http_response = result.response
4578
4466
  status_code = http_response.status
4579
4467
  response_content = http_response.body
4580
4468
  unless status_code == 200
4581
4469
  error_model = JSON.load(response_content)
4582
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
4470
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
4583
4471
  end
4584
4472
 
4585
- # Create Result
4586
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
4587
4473
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
4588
4474
  # Deserialize Response
4589
4475
  if status_code == 200
@@ -4651,29 +4537,26 @@ module Azure::ARM::Web
4651
4537
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
4652
4538
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
4653
4539
  path_template = '{nextLink}'
4540
+
4541
+ request_url = @base_url || @client.base_url
4542
+
4654
4543
  options = {
4655
4544
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
4656
4545
  skip_encoding_path_params: {'nextLink' => next_page_link},
4657
- headers: request_headers.merge(custom_headers || {})
4546
+ headers: request_headers.merge(custom_headers || {}),
4547
+ base_url: request_url
4658
4548
  }
4549
+ promise = @client.make_request_async(:get, path_template, options)
4659
4550
 
4660
- request_url = @base_url || @client.base_url
4661
-
4662
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
4663
- promise = request.run_promise do |req|
4664
- @client.credentials.sign_request(req) unless @client.credentials.nil?
4665
- end
4666
-
4667
- promise = promise.then do |http_response|
4551
+ promise = promise.then do |result|
4552
+ http_response = result.response
4668
4553
  status_code = http_response.status
4669
4554
  response_content = http_response.body
4670
4555
  unless status_code == 200
4671
4556
  error_model = JSON.load(response_content)
4672
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
4557
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
4673
4558
  end
4674
4559
 
4675
- # Create Result
4676
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
4677
4560
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
4678
4561
  # Deserialize Response
4679
4562
  if status_code == 200
@@ -4741,29 +4624,26 @@ module Azure::ARM::Web
4741
4624
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
4742
4625
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
4743
4626
  path_template = '{nextLink}'
4627
+
4628
+ request_url = @base_url || @client.base_url
4629
+
4744
4630
  options = {
4745
4631
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
4746
4632
  skip_encoding_path_params: {'nextLink' => next_page_link},
4747
- headers: request_headers.merge(custom_headers || {})
4633
+ headers: request_headers.merge(custom_headers || {}),
4634
+ base_url: request_url
4748
4635
  }
4636
+ promise = @client.make_request_async(:get, path_template, options)
4749
4637
 
4750
- request_url = @base_url || @client.base_url
4751
-
4752
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
4753
- promise = request.run_promise do |req|
4754
- @client.credentials.sign_request(req) unless @client.credentials.nil?
4755
- end
4756
-
4757
- promise = promise.then do |http_response|
4638
+ promise = promise.then do |result|
4639
+ http_response = result.response
4758
4640
  status_code = http_response.status
4759
4641
  response_content = http_response.body
4760
4642
  unless status_code == 200
4761
4643
  error_model = JSON.load(response_content)
4762
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
4644
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
4763
4645
  end
4764
4646
 
4765
- # Create Result
4766
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
4767
4647
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
4768
4648
  # Deserialize Response
4769
4649
  if status_code == 200
@@ -4831,29 +4711,26 @@ module Azure::ARM::Web
4831
4711
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
4832
4712
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
4833
4713
  path_template = '{nextLink}'
4714
+
4715
+ request_url = @base_url || @client.base_url
4716
+
4834
4717
  options = {
4835
4718
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
4836
4719
  skip_encoding_path_params: {'nextLink' => next_page_link},
4837
- headers: request_headers.merge(custom_headers || {})
4720
+ headers: request_headers.merge(custom_headers || {}),
4721
+ base_url: request_url
4838
4722
  }
4723
+ promise = @client.make_request_async(:get, path_template, options)
4839
4724
 
4840
- request_url = @base_url || @client.base_url
4841
-
4842
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
4843
- promise = request.run_promise do |req|
4844
- @client.credentials.sign_request(req) unless @client.credentials.nil?
4845
- end
4846
-
4847
- promise = promise.then do |http_response|
4725
+ promise = promise.then do |result|
4726
+ http_response = result.response
4848
4727
  status_code = http_response.status
4849
4728
  response_content = http_response.body
4850
4729
  unless status_code == 200
4851
4730
  error_model = JSON.load(response_content)
4852
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
4731
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
4853
4732
  end
4854
4733
 
4855
- # Create Result
4856
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
4857
4734
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
4858
4735
  # Deserialize Response
4859
4736
  if status_code == 200
@@ -4924,29 +4801,26 @@ module Azure::ARM::Web
4924
4801
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
4925
4802
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
4926
4803
  path_template = '{nextLink}'
4804
+
4805
+ request_url = @base_url || @client.base_url
4806
+
4927
4807
  options = {
4928
4808
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
4929
4809
  skip_encoding_path_params: {'nextLink' => next_page_link},
4930
- headers: request_headers.merge(custom_headers || {})
4810
+ headers: request_headers.merge(custom_headers || {}),
4811
+ base_url: request_url
4931
4812
  }
4813
+ promise = @client.make_request_async(:get, path_template, options)
4932
4814
 
4933
- request_url = @base_url || @client.base_url
4934
-
4935
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
4936
- promise = request.run_promise do |req|
4937
- @client.credentials.sign_request(req) unless @client.credentials.nil?
4938
- end
4939
-
4940
- promise = promise.then do |http_response|
4815
+ promise = promise.then do |result|
4816
+ http_response = result.response
4941
4817
  status_code = http_response.status
4942
4818
  response_content = http_response.body
4943
4819
  unless status_code == 200
4944
4820
  error_model = JSON.load(response_content)
4945
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
4821
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
4946
4822
  end
4947
4823
 
4948
- # Create Result
4949
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
4950
4824
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
4951
4825
  # Deserialize Response
4952
4826
  if status_code == 200
@@ -5017,29 +4891,26 @@ module Azure::ARM::Web
5017
4891
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
5018
4892
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
5019
4893
  path_template = '{nextLink}'
4894
+
4895
+ request_url = @base_url || @client.base_url
4896
+
5020
4897
  options = {
5021
4898
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
5022
4899
  skip_encoding_path_params: {'nextLink' => next_page_link},
5023
- headers: request_headers.merge(custom_headers || {})
4900
+ headers: request_headers.merge(custom_headers || {}),
4901
+ base_url: request_url
5024
4902
  }
4903
+ promise = @client.make_request_async(:get, path_template, options)
5025
4904
 
5026
- request_url = @base_url || @client.base_url
5027
-
5028
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
5029
- promise = request.run_promise do |req|
5030
- @client.credentials.sign_request(req) unless @client.credentials.nil?
5031
- end
5032
-
5033
- promise = promise.then do |http_response|
4905
+ promise = promise.then do |result|
4906
+ http_response = result.response
5034
4907
  status_code = http_response.status
5035
4908
  response_content = http_response.body
5036
4909
  unless status_code == 200
5037
4910
  error_model = JSON.load(response_content)
5038
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
4911
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
5039
4912
  end
5040
4913
 
5041
- # Create Result
5042
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
5043
4914
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
5044
4915
  # Deserialize Response
5045
4916
  if status_code == 200
@@ -5110,29 +4981,26 @@ module Azure::ARM::Web
5110
4981
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
5111
4982
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
5112
4983
  path_template = '{nextLink}'
4984
+
4985
+ request_url = @base_url || @client.base_url
4986
+
5113
4987
  options = {
5114
4988
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
5115
4989
  skip_encoding_path_params: {'nextLink' => next_page_link},
5116
- headers: request_headers.merge(custom_headers || {})
4990
+ headers: request_headers.merge(custom_headers || {}),
4991
+ base_url: request_url
5117
4992
  }
4993
+ promise = @client.make_request_async(:get, path_template, options)
5118
4994
 
5119
- request_url = @base_url || @client.base_url
5120
-
5121
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
5122
- promise = request.run_promise do |req|
5123
- @client.credentials.sign_request(req) unless @client.credentials.nil?
5124
- end
5125
-
5126
- promise = promise.then do |http_response|
4995
+ promise = promise.then do |result|
4996
+ http_response = result.response
5127
4997
  status_code = http_response.status
5128
4998
  response_content = http_response.body
5129
4999
  unless status_code == 200
5130
5000
  error_model = JSON.load(response_content)
5131
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
5001
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
5132
5002
  end
5133
5003
 
5134
- # Create Result
5135
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
5136
5004
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
5137
5005
  # Deserialize Response
5138
5006
  if status_code == 200
@@ -5203,29 +5071,26 @@ module Azure::ARM::Web
5203
5071
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
5204
5072
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
5205
5073
  path_template = '{nextLink}'
5074
+
5075
+ request_url = @base_url || @client.base_url
5076
+
5206
5077
  options = {
5207
5078
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
5208
5079
  skip_encoding_path_params: {'nextLink' => next_page_link},
5209
- headers: request_headers.merge(custom_headers || {})
5080
+ headers: request_headers.merge(custom_headers || {}),
5081
+ base_url: request_url
5210
5082
  }
5083
+ promise = @client.make_request_async(:get, path_template, options)
5211
5084
 
5212
- request_url = @base_url || @client.base_url
5213
-
5214
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
5215
- promise = request.run_promise do |req|
5216
- @client.credentials.sign_request(req) unless @client.credentials.nil?
5217
- end
5218
-
5219
- promise = promise.then do |http_response|
5085
+ promise = promise.then do |result|
5086
+ http_response = result.response
5220
5087
  status_code = http_response.status
5221
5088
  response_content = http_response.body
5222
5089
  unless status_code == 200
5223
5090
  error_model = JSON.load(response_content)
5224
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
5091
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
5225
5092
  end
5226
5093
 
5227
- # Create Result
5228
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
5229
5094
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
5230
5095
  # Deserialize Response
5231
5096
  if status_code == 200
@@ -5296,29 +5161,26 @@ module Azure::ARM::Web
5296
5161
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
5297
5162
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
5298
5163
  path_template = '{nextLink}'
5164
+
5165
+ request_url = @base_url || @client.base_url
5166
+
5299
5167
  options = {
5300
5168
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
5301
5169
  skip_encoding_path_params: {'nextLink' => next_page_link},
5302
- headers: request_headers.merge(custom_headers || {})
5170
+ headers: request_headers.merge(custom_headers || {}),
5171
+ base_url: request_url
5303
5172
  }
5173
+ promise = @client.make_request_async(:get, path_template, options)
5304
5174
 
5305
- request_url = @base_url || @client.base_url
5306
-
5307
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
5308
- promise = request.run_promise do |req|
5309
- @client.credentials.sign_request(req) unless @client.credentials.nil?
5310
- end
5311
-
5312
- promise = promise.then do |http_response|
5175
+ promise = promise.then do |result|
5176
+ http_response = result.response
5313
5177
  status_code = http_response.status
5314
5178
  response_content = http_response.body
5315
5179
  unless status_code == 200
5316
5180
  error_model = JSON.load(response_content)
5317
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
5181
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
5318
5182
  end
5319
5183
 
5320
- # Create Result
5321
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
5322
5184
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
5323
5185
  # Deserialize Response
5324
5186
  if status_code == 200
@@ -5389,29 +5251,26 @@ module Azure::ARM::Web
5389
5251
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
5390
5252
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
5391
5253
  path_template = '{nextLink}'
5254
+
5255
+ request_url = @base_url || @client.base_url
5256
+
5392
5257
  options = {
5393
5258
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
5394
5259
  skip_encoding_path_params: {'nextLink' => next_page_link},
5395
- headers: request_headers.merge(custom_headers || {})
5260
+ headers: request_headers.merge(custom_headers || {}),
5261
+ base_url: request_url
5396
5262
  }
5263
+ promise = @client.make_request_async(:get, path_template, options)
5397
5264
 
5398
- request_url = @base_url || @client.base_url
5399
-
5400
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
5401
- promise = request.run_promise do |req|
5402
- @client.credentials.sign_request(req) unless @client.credentials.nil?
5403
- end
5404
-
5405
- promise = promise.then do |http_response|
5265
+ promise = promise.then do |result|
5266
+ http_response = result.response
5406
5267
  status_code = http_response.status
5407
5268
  response_content = http_response.body
5408
5269
  unless status_code == 200
5409
5270
  error_model = JSON.load(response_content)
5410
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
5271
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
5411
5272
  end
5412
5273
 
5413
- # Create Result
5414
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
5415
5274
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
5416
5275
  # Deserialize Response
5417
5276
  if status_code == 200
@@ -5479,29 +5338,26 @@ module Azure::ARM::Web
5479
5338
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
5480
5339
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
5481
5340
  path_template = '{nextLink}'
5341
+
5342
+ request_url = @base_url || @client.base_url
5343
+
5482
5344
  options = {
5483
5345
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
5484
5346
  skip_encoding_path_params: {'nextLink' => next_page_link},
5485
- headers: request_headers.merge(custom_headers || {})
5347
+ headers: request_headers.merge(custom_headers || {}),
5348
+ base_url: request_url
5486
5349
  }
5350
+ promise = @client.make_request_async(:get, path_template, options)
5487
5351
 
5488
- request_url = @base_url || @client.base_url
5489
-
5490
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
5491
- promise = request.run_promise do |req|
5492
- @client.credentials.sign_request(req) unless @client.credentials.nil?
5493
- end
5494
-
5495
- promise = promise.then do |http_response|
5352
+ promise = promise.then do |result|
5353
+ http_response = result.response
5496
5354
  status_code = http_response.status
5497
5355
  response_content = http_response.body
5498
5356
  unless status_code == 200
5499
5357
  error_model = JSON.load(response_content)
5500
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
5358
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
5501
5359
  end
5502
5360
 
5503
- # Create Result
5504
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
5505
5361
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
5506
5362
  # Deserialize Response
5507
5363
  if status_code == 200
@@ -5572,29 +5428,26 @@ module Azure::ARM::Web
5572
5428
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
5573
5429
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
5574
5430
  path_template = '{nextLink}'
5431
+
5432
+ request_url = @base_url || @client.base_url
5433
+
5575
5434
  options = {
5576
5435
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
5577
5436
  skip_encoding_path_params: {'nextLink' => next_page_link},
5578
- headers: request_headers.merge(custom_headers || {})
5437
+ headers: request_headers.merge(custom_headers || {}),
5438
+ base_url: request_url
5579
5439
  }
5440
+ promise = @client.make_request_async(:get, path_template, options)
5580
5441
 
5581
- request_url = @base_url || @client.base_url
5582
-
5583
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
5584
- promise = request.run_promise do |req|
5585
- @client.credentials.sign_request(req) unless @client.credentials.nil?
5586
- end
5587
-
5588
- promise = promise.then do |http_response|
5442
+ promise = promise.then do |result|
5443
+ http_response = result.response
5589
5444
  status_code = http_response.status
5590
5445
  response_content = http_response.body
5591
5446
  unless status_code == 200
5592
5447
  error_model = JSON.load(response_content)
5593
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
5448
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
5594
5449
  end
5595
5450
 
5596
- # Create Result
5597
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
5598
5451
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
5599
5452
  # Deserialize Response
5600
5453
  if status_code == 200
@@ -5665,29 +5518,26 @@ module Azure::ARM::Web
5665
5518
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
5666
5519
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
5667
5520
  path_template = '{nextLink}'
5521
+
5522
+ request_url = @base_url || @client.base_url
5523
+
5668
5524
  options = {
5669
5525
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
5670
5526
  skip_encoding_path_params: {'nextLink' => next_page_link},
5671
- headers: request_headers.merge(custom_headers || {})
5527
+ headers: request_headers.merge(custom_headers || {}),
5528
+ base_url: request_url
5672
5529
  }
5530
+ promise = @client.make_request_async(:get, path_template, options)
5673
5531
 
5674
- request_url = @base_url || @client.base_url
5675
-
5676
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
5677
- promise = request.run_promise do |req|
5678
- @client.credentials.sign_request(req) unless @client.credentials.nil?
5679
- end
5680
-
5681
- promise = promise.then do |http_response|
5532
+ promise = promise.then do |result|
5533
+ http_response = result.response
5682
5534
  status_code = http_response.status
5683
5535
  response_content = http_response.body
5684
5536
  unless status_code == 200
5685
5537
  error_model = JSON.load(response_content)
5686
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
5538
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
5687
5539
  end
5688
5540
 
5689
- # Create Result
5690
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
5691
5541
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
5692
5542
  # Deserialize Response
5693
5543
  if status_code == 200
@@ -5755,29 +5605,26 @@ module Azure::ARM::Web
5755
5605
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
5756
5606
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
5757
5607
  path_template = '{nextLink}'
5608
+
5609
+ request_url = @base_url || @client.base_url
5610
+
5758
5611
  options = {
5759
5612
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
5760
5613
  skip_encoding_path_params: {'nextLink' => next_page_link},
5761
- headers: request_headers.merge(custom_headers || {})
5614
+ headers: request_headers.merge(custom_headers || {}),
5615
+ base_url: request_url
5762
5616
  }
5617
+ promise = @client.make_request_async(:get, path_template, options)
5763
5618
 
5764
- request_url = @base_url || @client.base_url
5765
-
5766
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
5767
- promise = request.run_promise do |req|
5768
- @client.credentials.sign_request(req) unless @client.credentials.nil?
5769
- end
5770
-
5771
- promise = promise.then do |http_response|
5619
+ promise = promise.then do |result|
5620
+ http_response = result.response
5772
5621
  status_code = http_response.status
5773
5622
  response_content = http_response.body
5774
5623
  unless status_code == 200
5775
5624
  error_model = JSON.load(response_content)
5776
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
5625
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
5777
5626
  end
5778
5627
 
5779
- # Create Result
5780
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
5781
5628
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
5782
5629
  # Deserialize Response
5783
5630
  if status_code == 200
@@ -5845,29 +5692,26 @@ module Azure::ARM::Web
5845
5692
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
5846
5693
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
5847
5694
  path_template = '{nextLink}'
5695
+
5696
+ request_url = @base_url || @client.base_url
5697
+
5848
5698
  options = {
5849
5699
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
5850
5700
  skip_encoding_path_params: {'nextLink' => next_page_link},
5851
- headers: request_headers.merge(custom_headers || {})
5701
+ headers: request_headers.merge(custom_headers || {}),
5702
+ base_url: request_url
5852
5703
  }
5704
+ promise = @client.make_request_async(:get, path_template, options)
5853
5705
 
5854
- request_url = @base_url || @client.base_url
5855
-
5856
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
5857
- promise = request.run_promise do |req|
5858
- @client.credentials.sign_request(req) unless @client.credentials.nil?
5859
- end
5860
-
5861
- promise = promise.then do |http_response|
5706
+ promise = promise.then do |result|
5707
+ http_response = result.response
5862
5708
  status_code = http_response.status
5863
5709
  response_content = http_response.body
5864
5710
  unless status_code == 200
5865
5711
  error_model = JSON.load(response_content)
5866
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
5712
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
5867
5713
  end
5868
5714
 
5869
- # Create Result
5870
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
5871
5715
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
5872
5716
  # Deserialize Response
5873
5717
  if status_code == 200
@@ -5935,29 +5779,26 @@ module Azure::ARM::Web
5935
5779
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
5936
5780
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
5937
5781
  path_template = '{nextLink}'
5782
+
5783
+ request_url = @base_url || @client.base_url
5784
+
5938
5785
  options = {
5939
5786
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
5940
5787
  skip_encoding_path_params: {'nextLink' => next_page_link},
5941
- headers: request_headers.merge(custom_headers || {})
5788
+ headers: request_headers.merge(custom_headers || {}),
5789
+ base_url: request_url
5942
5790
  }
5791
+ promise = @client.make_request_async(:get, path_template, options)
5943
5792
 
5944
- request_url = @base_url || @client.base_url
5945
-
5946
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
5947
- promise = request.run_promise do |req|
5948
- @client.credentials.sign_request(req) unless @client.credentials.nil?
5949
- end
5950
-
5951
- promise = promise.then do |http_response|
5793
+ promise = promise.then do |result|
5794
+ http_response = result.response
5952
5795
  status_code = http_response.status
5953
5796
  response_content = http_response.body
5954
5797
  unless status_code == 200
5955
5798
  error_model = JSON.load(response_content)
5956
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
5799
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
5957
5800
  end
5958
5801
 
5959
- # Create Result
5960
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
5961
5802
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
5962
5803
  # Deserialize Response
5963
5804
  if status_code == 200
@@ -6025,29 +5866,26 @@ module Azure::ARM::Web
6025
5866
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
6026
5867
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
6027
5868
  path_template = '{nextLink}'
5869
+
5870
+ request_url = @base_url || @client.base_url
5871
+
6028
5872
  options = {
6029
5873
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
6030
5874
  skip_encoding_path_params: {'nextLink' => next_page_link},
6031
- headers: request_headers.merge(custom_headers || {})
5875
+ headers: request_headers.merge(custom_headers || {}),
5876
+ base_url: request_url
6032
5877
  }
5878
+ promise = @client.make_request_async(:get, path_template, options)
6033
5879
 
6034
- request_url = @base_url || @client.base_url
6035
-
6036
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
6037
- promise = request.run_promise do |req|
6038
- @client.credentials.sign_request(req) unless @client.credentials.nil?
6039
- end
6040
-
6041
- promise = promise.then do |http_response|
5880
+ promise = promise.then do |result|
5881
+ http_response = result.response
6042
5882
  status_code = http_response.status
6043
5883
  response_content = http_response.body
6044
5884
  unless status_code == 200
6045
5885
  error_model = JSON.load(response_content)
6046
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
5886
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
6047
5887
  end
6048
5888
 
6049
- # Create Result
6050
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
6051
5889
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
6052
5890
  # Deserialize Response
6053
5891
  if status_code == 200
@@ -6157,29 +5995,26 @@ module Azure::ARM::Web
6157
5995
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
6158
5996
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
6159
5997
  path_template = '{nextLink}'
5998
+
5999
+ request_url = @base_url || @client.base_url
6000
+
6160
6001
  options = {
6161
6002
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
6162
6003
  skip_encoding_path_params: {'nextLink' => next_page_link},
6163
- headers: request_headers.merge(custom_headers || {})
6004
+ headers: request_headers.merge(custom_headers || {}),
6005
+ base_url: request_url
6164
6006
  }
6007
+ promise = @client.make_request_async(:post, path_template, options)
6165
6008
 
6166
- request_url = @base_url || @client.base_url
6167
-
6168
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
6169
- promise = request.run_promise do |req|
6170
- @client.credentials.sign_request(req) unless @client.credentials.nil?
6171
- end
6172
-
6173
- promise = promise.then do |http_response|
6009
+ promise = promise.then do |result|
6010
+ http_response = result.response
6174
6011
  status_code = http_response.status
6175
6012
  response_content = http_response.body
6176
6013
  unless status_code == 200 || status_code == 202
6177
6014
  error_model = JSON.load(response_content)
6178
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
6015
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
6179
6016
  end
6180
6017
 
6181
- # Create Result
6182
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
6183
6018
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
6184
6019
  # Deserialize Response
6185
6020
  if status_code == 200
@@ -6299,29 +6134,26 @@ module Azure::ARM::Web
6299
6134
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
6300
6135
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
6301
6136
  path_template = '{nextLink}'
6137
+
6138
+ request_url = @base_url || @client.base_url
6139
+
6302
6140
  options = {
6303
6141
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
6304
6142
  skip_encoding_path_params: {'nextLink' => next_page_link},
6305
- headers: request_headers.merge(custom_headers || {})
6143
+ headers: request_headers.merge(custom_headers || {}),
6144
+ base_url: request_url
6306
6145
  }
6146
+ promise = @client.make_request_async(:post, path_template, options)
6307
6147
 
6308
- request_url = @base_url || @client.base_url
6309
-
6310
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
6311
- promise = request.run_promise do |req|
6312
- @client.credentials.sign_request(req) unless @client.credentials.nil?
6313
- end
6314
-
6315
- promise = promise.then do |http_response|
6148
+ promise = promise.then do |result|
6149
+ http_response = result.response
6316
6150
  status_code = http_response.status
6317
6151
  response_content = http_response.body
6318
6152
  unless status_code == 200 || status_code == 202
6319
6153
  error_model = JSON.load(response_content)
6320
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
6154
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
6321
6155
  end
6322
6156
 
6323
- # Create Result
6324
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
6325
6157
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
6326
6158
  # Deserialize Response
6327
6159
  if status_code == 200