azure_mgmt_datalake_analytics 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c40c7ca31dac36cbe88989fb1052f5fcf39f7f9a
4
- data.tar.gz: 9bc0eecac0571b6341a947b924ed9ce0c04661ea
3
+ metadata.gz: 1ed03f420af39d158d6a16cdef45aada7c045a86
4
+ data.tar.gz: 176f49a1cf73a3add005fe572ca2a60390238636
5
5
  SHA512:
6
- metadata.gz: 133bea3a744ad499a02d7425dc8bdbf58a9aef38a63d4fd238ef91aa2c7b56df779bc9cdedb251190b2750157eb24f332aa1796253adcd979cbba7db0d34bd5e
7
- data.tar.gz: b08903964282cdc18d9c064e13a8ed5f00ccbc45eda902476e98bb54b4b7ad0424de63ed8dca5f3dc93353243d69f9234ba47320e40b59368783d23f8f4979d5
6
+ metadata.gz: 09baab9d7fd946eed24bd734c84bed2ff752401c43441f1bab9cfd74a4ecf5ca15d89f24ba950396f1a0f0f44779796c74c365c5a549f8f8d97738a7f959409e
7
+ data.tar.gz: 337c3e59e880f025c9a9ee3fac27b9cb7b73d24e6e846840940437769d14900a25e64ba10fc51e11492db258bb17aab80d8b49af0cea6763fc94d00bb7537acb
@@ -90,30 +90,27 @@ module Azure::ARM::DataLakeAnalytics
90
90
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
91
91
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
92
92
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'
93
+
94
+ request_url = @base_url || @client.base_url
95
+
93
96
  options = {
94
97
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
95
98
  path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id},
96
99
  query_params: {'api-version' => @client.api_version},
97
- headers: request_headers.merge(custom_headers || {})
100
+ headers: request_headers.merge(custom_headers || {}),
101
+ base_url: request_url
98
102
  }
103
+ promise = @client.make_request_async(:get, path_template, options)
99
104
 
100
- request_url = @base_url || @client.base_url
101
-
102
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
103
- promise = request.run_promise do |req|
104
- @client.credentials.sign_request(req) unless @client.credentials.nil?
105
- end
106
-
107
- promise = promise.then do |http_response|
105
+ promise = promise.then do |result|
106
+ http_response = result.response
108
107
  status_code = http_response.status
109
108
  response_content = http_response.body
110
109
  unless status_code == 200
111
110
  error_model = JSON.load(response_content)
112
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
111
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
113
112
  end
114
113
 
115
- # Create Result
116
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
117
114
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
118
115
  # Deserialize Response
119
116
  if status_code == 200
@@ -199,30 +196,27 @@ module Azure::ARM::DataLakeAnalytics
199
196
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
200
197
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
201
198
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'
199
+
200
+ request_url = @base_url || @client.base_url
201
+
202
202
  options = {
203
203
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
204
204
  path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id},
205
205
  query_params: {'api-version' => @client.api_version},
206
- headers: request_headers.merge(custom_headers || {})
206
+ headers: request_headers.merge(custom_headers || {}),
207
+ base_url: request_url
207
208
  }
209
+ promise = @client.make_request_async(:delete, path_template, options)
208
210
 
209
- request_url = @base_url || @client.base_url
210
-
211
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
212
- promise = request.run_promise do |req|
213
- @client.credentials.sign_request(req) unless @client.credentials.nil?
214
- end
215
-
216
- promise = promise.then do |http_response|
211
+ promise = promise.then do |result|
212
+ http_response = result.response
217
213
  status_code = http_response.status
218
214
  response_content = http_response.body
219
215
  unless status_code == 200
220
216
  error_model = JSON.load(response_content)
221
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
217
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
222
218
  end
223
219
 
224
- # Create Result
225
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
226
220
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
227
221
 
228
222
  result
@@ -310,31 +304,28 @@ module Azure::ARM::DataLakeAnalytics
310
304
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
311
305
 
312
306
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'
307
+
308
+ request_url = @base_url || @client.base_url
309
+
313
310
  options = {
314
311
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
315
312
  path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id},
316
313
  query_params: {'api-version' => @client.api_version},
317
314
  body: request_content,
318
- headers: request_headers.merge(custom_headers || {})
315
+ headers: request_headers.merge(custom_headers || {}),
316
+ base_url: request_url
319
317
  }
318
+ promise = @client.make_request_async(:patch, path_template, options)
320
319
 
321
- request_url = @base_url || @client.base_url
322
-
323
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
324
- promise = request.run_promise do |req|
325
- @client.credentials.sign_request(req) unless @client.credentials.nil?
326
- end
327
-
328
- promise = promise.then do |http_response|
320
+ promise = promise.then do |result|
321
+ http_response = result.response
329
322
  status_code = http_response.status
330
323
  response_content = http_response.body
331
324
  unless status_code == 200
332
325
  error_model = JSON.load(response_content)
333
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
326
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
334
327
  end
335
328
 
336
- # Create Result
337
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
338
329
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
339
330
 
340
331
  result
@@ -425,31 +416,28 @@ module Azure::ARM::DataLakeAnalytics
425
416
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
426
417
 
427
418
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'
419
+
420
+ request_url = @base_url || @client.base_url
421
+
428
422
  options = {
429
423
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
430
424
  path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id},
431
425
  query_params: {'api-version' => @client.api_version},
432
426
  body: request_content,
433
- headers: request_headers.merge(custom_headers || {})
427
+ headers: request_headers.merge(custom_headers || {}),
428
+ base_url: request_url
434
429
  }
430
+ promise = @client.make_request_async(:put, path_template, options)
435
431
 
436
- request_url = @base_url || @client.base_url
437
-
438
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
439
- promise = request.run_promise do |req|
440
- @client.credentials.sign_request(req) unless @client.credentials.nil?
441
- end
442
-
443
- promise = promise.then do |http_response|
432
+ promise = promise.then do |result|
433
+ http_response = result.response
444
434
  status_code = http_response.status
445
435
  response_content = http_response.body
446
436
  unless status_code == 200
447
437
  error_model = JSON.load(response_content)
448
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
438
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
449
439
  end
450
440
 
451
- # Create Result
452
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
453
441
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
454
442
 
455
443
  result
@@ -533,30 +521,27 @@ module Azure::ARM::DataLakeAnalytics
533
521
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
534
522
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
535
523
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}'
524
+
525
+ request_url = @base_url || @client.base_url
526
+
536
527
  options = {
537
528
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
538
529
  path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id},
539
530
  query_params: {'api-version' => @client.api_version},
540
- headers: request_headers.merge(custom_headers || {})
531
+ headers: request_headers.merge(custom_headers || {}),
532
+ base_url: request_url
541
533
  }
534
+ promise = @client.make_request_async(:get, path_template, options)
542
535
 
543
- request_url = @base_url || @client.base_url
544
-
545
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
546
- promise = request.run_promise do |req|
547
- @client.credentials.sign_request(req) unless @client.credentials.nil?
548
- end
549
-
550
- promise = promise.then do |http_response|
536
+ promise = promise.then do |result|
537
+ http_response = result.response
551
538
  status_code = http_response.status
552
539
  response_content = http_response.body
553
540
  unless status_code == 200
554
541
  error_model = JSON.load(response_content)
555
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
542
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
556
543
  end
557
544
 
558
- # Create Result
559
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
560
545
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
561
546
  # Deserialize Response
562
547
  if status_code == 200
@@ -596,8 +581,8 @@ module Azure::ARM::DataLakeAnalytics
596
581
  response = list_storage_containers_async(resource_group_name, account_name, storage_account_name, custom_headers).value!
597
582
  unless response.nil?
598
583
  page = response.body
599
- page.next_method = Proc.new do |next_link|
600
- list_storage_containers_next_async(next_link, custom_headers)
584
+ page.next_method = Proc.new do |next_page_link|
585
+ list_storage_containers_next_async(next_page_link, custom_headers)
601
586
  end
602
587
  page
603
588
  end
@@ -674,30 +659,27 @@ module Azure::ARM::DataLakeAnalytics
674
659
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
675
660
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
676
661
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers'
662
+
663
+ request_url = @base_url || @client.base_url
664
+
677
665
  options = {
678
666
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
679
667
  path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id},
680
668
  query_params: {'api-version' => @client.api_version},
681
- headers: request_headers.merge(custom_headers || {})
669
+ headers: request_headers.merge(custom_headers || {}),
670
+ base_url: request_url
682
671
  }
672
+ promise = @client.make_request_async(:get, path_template, options)
683
673
 
684
- request_url = @base_url || @client.base_url
685
-
686
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
687
- promise = request.run_promise do |req|
688
- @client.credentials.sign_request(req) unless @client.credentials.nil?
689
- end
690
-
691
- promise = promise.then do |http_response|
674
+ promise = promise.then do |result|
675
+ http_response = result.response
692
676
  status_code = http_response.status
693
677
  response_content = http_response.body
694
678
  unless status_code == 200
695
679
  error_model = JSON.load(response_content)
696
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
680
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
697
681
  end
698
682
 
699
- # Create Result
700
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
701
683
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
702
684
  # Deserialize Response
703
685
  if status_code == 200
@@ -738,8 +720,8 @@ module Azure::ARM::DataLakeAnalytics
738
720
  response = list_sas_tokens_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers).value!
739
721
  unless response.nil?
740
722
  page = response.body
741
- page.next_method = Proc.new do |next_link|
742
- list_sas_tokens_next_async(next_link, custom_headers)
723
+ page.next_method = Proc.new do |next_page_link|
724
+ list_sas_tokens_next_async(next_page_link, custom_headers)
743
725
  end
744
726
  page
745
727
  end
@@ -820,30 +802,27 @@ module Azure::ARM::DataLakeAnalytics
820
802
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
821
803
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
822
804
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}/listSasTokens'
805
+
806
+ request_url = @base_url || @client.base_url
807
+
823
808
  options = {
824
809
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
825
810
  path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id},
826
811
  query_params: {'api-version' => @client.api_version},
827
- headers: request_headers.merge(custom_headers || {})
812
+ headers: request_headers.merge(custom_headers || {}),
813
+ base_url: request_url
828
814
  }
815
+ promise = @client.make_request_async(:post, path_template, options)
829
816
 
830
- request_url = @base_url || @client.base_url
831
-
832
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
833
- promise = request.run_promise do |req|
834
- @client.credentials.sign_request(req) unless @client.credentials.nil?
835
- end
836
-
837
- promise = promise.then do |http_response|
817
+ promise = promise.then do |result|
818
+ http_response = result.response
838
819
  status_code = http_response.status
839
820
  response_content = http_response.body
840
821
  unless status_code == 200
841
822
  error_model = JSON.load(response_content)
842
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
823
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
843
824
  end
844
825
 
845
- # Create Result
846
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
847
826
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
848
827
  # Deserialize Response
849
828
  if status_code == 200
@@ -930,30 +909,27 @@ module Azure::ARM::DataLakeAnalytics
930
909
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
931
910
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
932
911
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}'
912
+
913
+ request_url = @base_url || @client.base_url
914
+
933
915
  options = {
934
916
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
935
917
  path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'dataLakeStoreAccountName' => data_lake_store_account_name,'subscriptionId' => @client.subscription_id},
936
918
  query_params: {'api-version' => @client.api_version},
937
- headers: request_headers.merge(custom_headers || {})
919
+ headers: request_headers.merge(custom_headers || {}),
920
+ base_url: request_url
938
921
  }
922
+ promise = @client.make_request_async(:get, path_template, options)
939
923
 
940
- request_url = @base_url || @client.base_url
941
-
942
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
943
- promise = request.run_promise do |req|
944
- @client.credentials.sign_request(req) unless @client.credentials.nil?
945
- end
946
-
947
- promise = promise.then do |http_response|
924
+ promise = promise.then do |result|
925
+ http_response = result.response
948
926
  status_code = http_response.status
949
927
  response_content = http_response.body
950
928
  unless status_code == 200
951
929
  error_model = JSON.load(response_content)
952
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
930
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
953
931
  end
954
932
 
955
- # Create Result
956
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
957
933
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
958
934
  # Deserialize Response
959
935
  if status_code == 200
@@ -1039,30 +1015,27 @@ module Azure::ARM::DataLakeAnalytics
1039
1015
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1040
1016
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1041
1017
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}'
1018
+
1019
+ request_url = @base_url || @client.base_url
1020
+
1042
1021
  options = {
1043
1022
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1044
1023
  path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'dataLakeStoreAccountName' => data_lake_store_account_name,'subscriptionId' => @client.subscription_id},
1045
1024
  query_params: {'api-version' => @client.api_version},
1046
- headers: request_headers.merge(custom_headers || {})
1025
+ headers: request_headers.merge(custom_headers || {}),
1026
+ base_url: request_url
1047
1027
  }
1028
+ promise = @client.make_request_async(:delete, path_template, options)
1048
1029
 
1049
- request_url = @base_url || @client.base_url
1050
-
1051
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
1052
- promise = request.run_promise do |req|
1053
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1054
- end
1055
-
1056
- promise = promise.then do |http_response|
1030
+ promise = promise.then do |result|
1031
+ http_response = result.response
1057
1032
  status_code = http_response.status
1058
1033
  response_content = http_response.body
1059
1034
  unless status_code == 200
1060
1035
  error_model = JSON.load(response_content)
1061
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1036
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1062
1037
  end
1063
1038
 
1064
- # Create Result
1065
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1066
1039
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1067
1040
 
1068
1041
  result
@@ -1153,31 +1126,28 @@ module Azure::ARM::DataLakeAnalytics
1153
1126
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1154
1127
 
1155
1128
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}'
1129
+
1130
+ request_url = @base_url || @client.base_url
1131
+
1156
1132
  options = {
1157
1133
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1158
1134
  path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'dataLakeStoreAccountName' => data_lake_store_account_name,'subscriptionId' => @client.subscription_id},
1159
1135
  query_params: {'api-version' => @client.api_version},
1160
1136
  body: request_content,
1161
- headers: request_headers.merge(custom_headers || {})
1137
+ headers: request_headers.merge(custom_headers || {}),
1138
+ base_url: request_url
1162
1139
  }
1140
+ promise = @client.make_request_async(:put, path_template, options)
1163
1141
 
1164
- request_url = @base_url || @client.base_url
1165
-
1166
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
1167
- promise = request.run_promise do |req|
1168
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1169
- end
1170
-
1171
- promise = promise.then do |http_response|
1142
+ promise = promise.then do |result|
1143
+ http_response = result.response
1172
1144
  status_code = http_response.status
1173
1145
  response_content = http_response.body
1174
1146
  unless status_code == 200
1175
1147
  error_model = JSON.load(response_content)
1176
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1148
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1177
1149
  end
1178
1150
 
1179
- # Create Result
1180
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1181
1151
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1182
1152
 
1183
1153
  result
@@ -1228,8 +1198,8 @@ module Azure::ARM::DataLakeAnalytics
1228
1198
  response = list_storage_accounts_async(resource_group_name, account_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
1229
1199
  unless response.nil?
1230
1200
  page = response.body
1231
- page.next_method = Proc.new do |next_link|
1232
- list_storage_accounts_next_async(next_link, custom_headers)
1201
+ page.next_method = Proc.new do |next_page_link|
1202
+ list_storage_accounts_next_async(next_page_link, custom_headers)
1233
1203
  end
1234
1204
  page
1235
1205
  end
@@ -1368,30 +1338,27 @@ module Azure::ARM::DataLakeAnalytics
1368
1338
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1369
1339
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1370
1340
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/'
1341
+
1342
+ request_url = @base_url || @client.base_url
1343
+
1371
1344
  options = {
1372
1345
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1373
1346
  path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
1374
1347
  query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'$expand' => expand,'$select' => select,'$orderby' => orderby,'$count' => count,'$search' => search,'$format' => format,'api-version' => @client.api_version},
1375
- headers: request_headers.merge(custom_headers || {})
1348
+ headers: request_headers.merge(custom_headers || {}),
1349
+ base_url: request_url
1376
1350
  }
1351
+ promise = @client.make_request_async(:get, path_template, options)
1377
1352
 
1378
- request_url = @base_url || @client.base_url
1379
-
1380
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1381
- promise = request.run_promise do |req|
1382
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1383
- end
1384
-
1385
- promise = promise.then do |http_response|
1353
+ promise = promise.then do |result|
1354
+ http_response = result.response
1386
1355
  status_code = http_response.status
1387
1356
  response_content = http_response.body
1388
1357
  unless status_code == 200
1389
1358
  error_model = JSON.load(response_content)
1390
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1359
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1391
1360
  end
1392
1361
 
1393
- # Create Result
1394
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1395
1362
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1396
1363
  # Deserialize Response
1397
1364
  if status_code == 200
@@ -1452,8 +1419,8 @@ module Azure::ARM::DataLakeAnalytics
1452
1419
  response = list_data_lake_store_accounts_async(resource_group_name, account_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
1453
1420
  unless response.nil?
1454
1421
  page = response.body
1455
- page.next_method = Proc.new do |next_link|
1456
- list_data_lake_store_accounts_next_async(next_link, custom_headers)
1422
+ page.next_method = Proc.new do |next_page_link|
1423
+ list_data_lake_store_accounts_next_async(next_page_link, custom_headers)
1457
1424
  end
1458
1425
  page
1459
1426
  end
@@ -1592,30 +1559,27 @@ module Azure::ARM::DataLakeAnalytics
1592
1559
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1593
1560
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1594
1561
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/'
1562
+
1563
+ request_url = @base_url || @client.base_url
1564
+
1595
1565
  options = {
1596
1566
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1597
1567
  path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
1598
1568
  query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'$expand' => expand,'$select' => select,'$orderby' => orderby,'$count' => count,'$search' => search,'$format' => format,'api-version' => @client.api_version},
1599
- headers: request_headers.merge(custom_headers || {})
1569
+ headers: request_headers.merge(custom_headers || {}),
1570
+ base_url: request_url
1600
1571
  }
1572
+ promise = @client.make_request_async(:get, path_template, options)
1601
1573
 
1602
- request_url = @base_url || @client.base_url
1603
-
1604
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1605
- promise = request.run_promise do |req|
1606
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1607
- end
1608
-
1609
- promise = promise.then do |http_response|
1574
+ promise = promise.then do |result|
1575
+ http_response = result.response
1610
1576
  status_code = http_response.status
1611
1577
  response_content = http_response.body
1612
1578
  unless status_code == 200
1613
1579
  error_model = JSON.load(response_content)
1614
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1580
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1615
1581
  end
1616
1582
 
1617
- # Create Result
1618
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1619
1583
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1620
1584
  # Deserialize Response
1621
1585
  if status_code == 200
@@ -1673,8 +1637,8 @@ module Azure::ARM::DataLakeAnalytics
1673
1637
  response = list_by_resource_group_async(resource_group_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
1674
1638
  unless response.nil?
1675
1639
  page = response.body
1676
- page.next_method = Proc.new do |next_link|
1677
- list_by_resource_group_next_async(next_link, custom_headers)
1640
+ page.next_method = Proc.new do |next_page_link|
1641
+ list_by_resource_group_next_async(next_page_link, custom_headers)
1678
1642
  end
1679
1643
  page
1680
1644
  end
@@ -1803,30 +1767,27 @@ module Azure::ARM::DataLakeAnalytics
1803
1767
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1804
1768
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1805
1769
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts'
1770
+
1771
+ request_url = @base_url || @client.base_url
1772
+
1806
1773
  options = {
1807
1774
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1808
1775
  path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
1809
1776
  query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'$expand' => expand,'$select' => select,'$orderby' => orderby,'$count' => count,'$search' => search,'$format' => format,'api-version' => @client.api_version},
1810
- headers: request_headers.merge(custom_headers || {})
1777
+ headers: request_headers.merge(custom_headers || {}),
1778
+ base_url: request_url
1811
1779
  }
1780
+ promise = @client.make_request_async(:get, path_template, options)
1812
1781
 
1813
- request_url = @base_url || @client.base_url
1814
-
1815
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1816
- promise = request.run_promise do |req|
1817
- @client.credentials.sign_request(req) unless @client.credentials.nil?
1818
- end
1819
-
1820
- promise = promise.then do |http_response|
1782
+ promise = promise.then do |result|
1783
+ http_response = result.response
1821
1784
  status_code = http_response.status
1822
1785
  response_content = http_response.body
1823
1786
  unless status_code == 200
1824
1787
  error_model = JSON.load(response_content)
1825
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1788
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1826
1789
  end
1827
1790
 
1828
- # Create Result
1829
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1830
1791
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1831
1792
  # Deserialize Response
1832
1793
  if status_code == 200
@@ -1882,8 +1843,8 @@ module Azure::ARM::DataLakeAnalytics
1882
1843
  response = list_async(filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
1883
1844
  unless response.nil?
1884
1845
  page = response.body
1885
- page.next_method = Proc.new do |next_link|
1886
- list_next_async(next_link, custom_headers)
1846
+ page.next_method = Proc.new do |next_page_link|
1847
+ list_next_async(next_page_link, custom_headers)
1887
1848
  end
1888
1849
  page
1889
1850
  end
@@ -2005,30 +1966,27 @@ module Azure::ARM::DataLakeAnalytics
2005
1966
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2006
1967
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2007
1968
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/accounts'
1969
+
1970
+ request_url = @base_url || @client.base_url
1971
+
2008
1972
  options = {
2009
1973
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2010
1974
  path_params: {'subscriptionId' => @client.subscription_id},
2011
1975
  query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'$expand' => expand,'$select' => select,'$orderby' => orderby,'$count' => count,'$search' => search,'$format' => format,'api-version' => @client.api_version},
2012
- headers: request_headers.merge(custom_headers || {})
1976
+ headers: request_headers.merge(custom_headers || {}),
1977
+ base_url: request_url
2013
1978
  }
1979
+ promise = @client.make_request_async(:get, path_template, options)
2014
1980
 
2015
- request_url = @base_url || @client.base_url
2016
-
2017
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
2018
- promise = request.run_promise do |req|
2019
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2020
- end
2021
-
2022
- promise = promise.then do |http_response|
1981
+ promise = promise.then do |result|
1982
+ http_response = result.response
2023
1983
  status_code = http_response.status
2024
1984
  response_content = http_response.body
2025
1985
  unless status_code == 200
2026
1986
  error_model = JSON.load(response_content)
2027
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1987
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2028
1988
  end
2029
1989
 
2030
- # Create Result
2031
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2032
1990
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2033
1991
  # Deserialize Response
2034
1992
  if status_code == 200
@@ -2105,30 +2063,27 @@ module Azure::ARM::DataLakeAnalytics
2105
2063
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2106
2064
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2107
2065
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}'
2066
+
2067
+ request_url = @base_url || @client.base_url
2068
+
2108
2069
  options = {
2109
2070
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2110
2071
  path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
2111
2072
  query_params: {'api-version' => @client.api_version},
2112
- headers: request_headers.merge(custom_headers || {})
2073
+ headers: request_headers.merge(custom_headers || {}),
2074
+ base_url: request_url
2113
2075
  }
2076
+ promise = @client.make_request_async(:get, path_template, options)
2114
2077
 
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|
2078
+ promise = promise.then do |result|
2079
+ http_response = result.response
2123
2080
  status_code = http_response.status
2124
2081
  response_content = http_response.body
2125
2082
  unless status_code == 200
2126
2083
  error_model = JSON.load(response_content)
2127
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2084
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2128
2085
  end
2129
2086
 
2130
- # Create Result
2131
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2132
2087
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2133
2088
  # Deserialize Response
2134
2089
  if status_code == 200
@@ -2250,30 +2205,27 @@ module Azure::ARM::DataLakeAnalytics
2250
2205
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2251
2206
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2252
2207
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}'
2208
+
2209
+ request_url = @base_url || @client.base_url
2210
+
2253
2211
  options = {
2254
2212
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2255
2213
  path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
2256
2214
  query_params: {'api-version' => @client.api_version},
2257
- headers: request_headers.merge(custom_headers || {})
2215
+ headers: request_headers.merge(custom_headers || {}),
2216
+ base_url: request_url
2258
2217
  }
2218
+ promise = @client.make_request_async(:delete, path_template, options)
2259
2219
 
2260
- request_url = @base_url || @client.base_url
2261
-
2262
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
2263
- promise = request.run_promise do |req|
2264
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2265
- end
2266
-
2267
- promise = promise.then do |http_response|
2220
+ promise = promise.then do |result|
2221
+ http_response = result.response
2268
2222
  status_code = http_response.status
2269
2223
  response_content = http_response.body
2270
2224
  unless status_code == 200 || status_code == 202 || status_code == 404 || status_code == 204
2271
2225
  error_model = JSON.load(response_content)
2272
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2226
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2273
2227
  end
2274
2228
 
2275
- # Create Result
2276
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2277
2229
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2278
2230
 
2279
2231
  result
@@ -2409,31 +2361,28 @@ module Azure::ARM::DataLakeAnalytics
2409
2361
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2410
2362
 
2411
2363
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{name}'
2364
+
2365
+ request_url = @base_url || @client.base_url
2366
+
2412
2367
  options = {
2413
2368
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2414
2369
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
2415
2370
  query_params: {'api-version' => @client.api_version},
2416
2371
  body: request_content,
2417
- headers: request_headers.merge(custom_headers || {})
2372
+ headers: request_headers.merge(custom_headers || {}),
2373
+ base_url: request_url
2418
2374
  }
2375
+ promise = @client.make_request_async(:put, path_template, options)
2419
2376
 
2420
- request_url = @base_url || @client.base_url
2421
-
2422
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
2423
- promise = request.run_promise do |req|
2424
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2425
- end
2426
-
2427
- promise = promise.then do |http_response|
2377
+ promise = promise.then do |result|
2378
+ http_response = result.response
2428
2379
  status_code = http_response.status
2429
2380
  response_content = http_response.body
2430
2381
  unless status_code == 201 || status_code == 200
2431
2382
  error_model = JSON.load(response_content)
2432
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2383
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2433
2384
  end
2434
2385
 
2435
- # Create Result
2436
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2437
2386
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2438
2387
  # Deserialize Response
2439
2388
  if status_code == 201
@@ -2584,31 +2533,28 @@ module Azure::ARM::DataLakeAnalytics
2584
2533
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2585
2534
 
2586
2535
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{name}'
2536
+
2537
+ request_url = @base_url || @client.base_url
2538
+
2587
2539
  options = {
2588
2540
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2589
2541
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
2590
2542
  query_params: {'api-version' => @client.api_version},
2591
2543
  body: request_content,
2592
- headers: request_headers.merge(custom_headers || {})
2544
+ headers: request_headers.merge(custom_headers || {}),
2545
+ base_url: request_url
2593
2546
  }
2547
+ promise = @client.make_request_async(:patch, path_template, options)
2594
2548
 
2595
- request_url = @base_url || @client.base_url
2596
-
2597
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
2598
- promise = request.run_promise do |req|
2599
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2600
- end
2601
-
2602
- promise = promise.then do |http_response|
2549
+ promise = promise.then do |result|
2550
+ http_response = result.response
2603
2551
  status_code = http_response.status
2604
2552
  response_content = http_response.body
2605
2553
  unless status_code == 200 || status_code == 201
2606
2554
  error_model = JSON.load(response_content)
2607
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2555
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2608
2556
  end
2609
2557
 
2610
- # Create Result
2611
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2612
2558
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2613
2559
  # Deserialize Response
2614
2560
  if status_code == 200
@@ -2692,29 +2638,26 @@ module Azure::ARM::DataLakeAnalytics
2692
2638
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2693
2639
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2694
2640
  path_template = '{nextLink}'
2641
+
2642
+ request_url = @base_url || @client.base_url
2643
+
2695
2644
  options = {
2696
2645
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2697
2646
  skip_encoding_path_params: {'nextLink' => next_page_link},
2698
- headers: request_headers.merge(custom_headers || {})
2647
+ headers: request_headers.merge(custom_headers || {}),
2648
+ base_url: request_url
2699
2649
  }
2650
+ promise = @client.make_request_async(:get, path_template, options)
2700
2651
 
2701
- request_url = @base_url || @client.base_url
2702
-
2703
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
2704
- promise = request.run_promise do |req|
2705
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2706
- end
2707
-
2708
- promise = promise.then do |http_response|
2652
+ promise = promise.then do |result|
2653
+ http_response = result.response
2709
2654
  status_code = http_response.status
2710
2655
  response_content = http_response.body
2711
2656
  unless status_code == 200
2712
2657
  error_model = JSON.load(response_content)
2713
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2658
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2714
2659
  end
2715
2660
 
2716
- # Create Result
2717
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2718
2661
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2719
2662
  # Deserialize Response
2720
2663
  if status_code == 200
@@ -2785,29 +2728,26 @@ module Azure::ARM::DataLakeAnalytics
2785
2728
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2786
2729
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2787
2730
  path_template = '{nextLink}'
2731
+
2732
+ request_url = @base_url || @client.base_url
2733
+
2788
2734
  options = {
2789
2735
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2790
2736
  skip_encoding_path_params: {'nextLink' => next_page_link},
2791
- headers: request_headers.merge(custom_headers || {})
2737
+ headers: request_headers.merge(custom_headers || {}),
2738
+ base_url: request_url
2792
2739
  }
2740
+ promise = @client.make_request_async(:post, path_template, options)
2793
2741
 
2794
- request_url = @base_url || @client.base_url
2795
-
2796
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
2797
- promise = request.run_promise do |req|
2798
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2799
- end
2800
-
2801
- promise = promise.then do |http_response|
2742
+ promise = promise.then do |result|
2743
+ http_response = result.response
2802
2744
  status_code = http_response.status
2803
2745
  response_content = http_response.body
2804
2746
  unless status_code == 200
2805
2747
  error_model = JSON.load(response_content)
2806
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2748
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2807
2749
  end
2808
2750
 
2809
- # Create Result
2810
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2811
2751
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2812
2752
  # Deserialize Response
2813
2753
  if status_code == 200
@@ -2882,29 +2822,26 @@ module Azure::ARM::DataLakeAnalytics
2882
2822
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2883
2823
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2884
2824
  path_template = '{nextLink}'
2825
+
2826
+ request_url = @base_url || @client.base_url
2827
+
2885
2828
  options = {
2886
2829
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2887
2830
  skip_encoding_path_params: {'nextLink' => next_page_link},
2888
- headers: request_headers.merge(custom_headers || {})
2831
+ headers: request_headers.merge(custom_headers || {}),
2832
+ base_url: request_url
2889
2833
  }
2834
+ promise = @client.make_request_async(:get, path_template, options)
2890
2835
 
2891
- request_url = @base_url || @client.base_url
2892
-
2893
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
2894
- promise = request.run_promise do |req|
2895
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2896
- end
2897
-
2898
- promise = promise.then do |http_response|
2836
+ promise = promise.then do |result|
2837
+ http_response = result.response
2899
2838
  status_code = http_response.status
2900
2839
  response_content = http_response.body
2901
2840
  unless status_code == 200
2902
2841
  error_model = JSON.load(response_content)
2903
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2842
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2904
2843
  end
2905
2844
 
2906
- # Create Result
2907
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
2908
2845
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2909
2846
  # Deserialize Response
2910
2847
  if status_code == 200
@@ -2978,29 +2915,26 @@ module Azure::ARM::DataLakeAnalytics
2978
2915
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2979
2916
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2980
2917
  path_template = '{nextLink}'
2918
+
2919
+ request_url = @base_url || @client.base_url
2920
+
2981
2921
  options = {
2982
2922
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2983
2923
  skip_encoding_path_params: {'nextLink' => next_page_link},
2984
- headers: request_headers.merge(custom_headers || {})
2924
+ headers: request_headers.merge(custom_headers || {}),
2925
+ base_url: request_url
2985
2926
  }
2927
+ promise = @client.make_request_async(:get, path_template, options)
2986
2928
 
2987
- request_url = @base_url || @client.base_url
2988
-
2989
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
2990
- promise = request.run_promise do |req|
2991
- @client.credentials.sign_request(req) unless @client.credentials.nil?
2992
- end
2993
-
2994
- promise = promise.then do |http_response|
2929
+ promise = promise.then do |result|
2930
+ http_response = result.response
2995
2931
  status_code = http_response.status
2996
2932
  response_content = http_response.body
2997
2933
  unless status_code == 200
2998
2934
  error_model = JSON.load(response_content)
2999
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
2935
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
3000
2936
  end
3001
2937
 
3002
- # Create Result
3003
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
3004
2938
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3005
2939
  # Deserialize Response
3006
2940
  if status_code == 200
@@ -3071,29 +3005,26 @@ module Azure::ARM::DataLakeAnalytics
3071
3005
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3072
3006
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3073
3007
  path_template = '{nextLink}'
3008
+
3009
+ request_url = @base_url || @client.base_url
3010
+
3074
3011
  options = {
3075
3012
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3076
3013
  skip_encoding_path_params: {'nextLink' => next_page_link},
3077
- headers: request_headers.merge(custom_headers || {})
3014
+ headers: request_headers.merge(custom_headers || {}),
3015
+ base_url: request_url
3078
3016
  }
3017
+ promise = @client.make_request_async(:get, path_template, options)
3079
3018
 
3080
- request_url = @base_url || @client.base_url
3081
-
3082
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
3083
- promise = request.run_promise do |req|
3084
- @client.credentials.sign_request(req) unless @client.credentials.nil?
3085
- end
3086
-
3087
- promise = promise.then do |http_response|
3019
+ promise = promise.then do |result|
3020
+ http_response = result.response
3088
3021
  status_code = http_response.status
3089
3022
  response_content = http_response.body
3090
3023
  unless status_code == 200
3091
3024
  error_model = JSON.load(response_content)
3092
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
3025
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
3093
3026
  end
3094
3027
 
3095
- # Create Result
3096
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
3097
3028
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3098
3029
  # Deserialize Response
3099
3030
  if status_code == 200
@@ -3164,29 +3095,26 @@ module Azure::ARM::DataLakeAnalytics
3164
3095
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3165
3096
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3166
3097
  path_template = '{nextLink}'
3098
+
3099
+ request_url = @base_url || @client.base_url
3100
+
3167
3101
  options = {
3168
3102
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3169
3103
  skip_encoding_path_params: {'nextLink' => next_page_link},
3170
- headers: request_headers.merge(custom_headers || {})
3104
+ headers: request_headers.merge(custom_headers || {}),
3105
+ base_url: request_url
3171
3106
  }
3107
+ promise = @client.make_request_async(:get, path_template, options)
3172
3108
 
3173
- request_url = @base_url || @client.base_url
3174
-
3175
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
3176
- promise = request.run_promise do |req|
3177
- @client.credentials.sign_request(req) unless @client.credentials.nil?
3178
- end
3179
-
3180
- promise = promise.then do |http_response|
3109
+ promise = promise.then do |result|
3110
+ http_response = result.response
3181
3111
  status_code = http_response.status
3182
3112
  response_content = http_response.body
3183
3113
  unless status_code == 200
3184
3114
  error_model = JSON.load(response_content)
3185
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
3115
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
3186
3116
  end
3187
3117
 
3188
- # Create Result
3189
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
3190
3118
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3191
3119
  # Deserialize Response
3192
3120
  if status_code == 200
@@ -36,10 +36,6 @@ module Azure::ARM::DataLakeAnalytics
36
36
  # is generated and included in each request. Default is true.
37
37
  attr_accessor :generate_client_request_id
38
38
 
39
- # @return Subscription credentials which uniquely identify client
40
- # subscription.
41
- attr_accessor :credentials
42
-
43
39
  # @return [Account] account
44
40
  attr_reader :account
45
41
 
@@ -64,5 +60,60 @@ module Azure::ARM::DataLakeAnalytics
64
60
  @generate_client_request_id = true
65
61
  end
66
62
 
63
+ #
64
+ # Makes a request and returns the body of the response.
65
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
66
+ # @param path [String] the path, relative to {base_url}.
67
+ # @param options [Hash{String=>String}] specifying any request options like :body.
68
+ # @return [Hash{String=>String}] containing the body of the response.
69
+ # Example:
70
+ #
71
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
72
+ # path = "/path"
73
+ # options = {
74
+ # body: request_content,
75
+ # query_params: {'api-version' => '2016-02-01'}
76
+ # }
77
+ # result = @client.make_request(:put, path, options)
78
+ #
79
+ def make_request(method, path, options = {})
80
+ result = make_request_with_http_info(method, path, options)
81
+ result.body unless result.nil?
82
+ end
83
+
84
+ #
85
+ # Makes a request and returns the operation response.
86
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
87
+ # @param path [String] the path, relative to {base_url}.
88
+ # @param options [Hash{String=>String}] specifying any request options like :body.
89
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
90
+ #
91
+ def make_request_with_http_info(method, path, options = {})
92
+ result = make_request_async(method, path, options).value!
93
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
94
+ result
95
+ end
96
+
97
+ #
98
+ # Makes a request asynchronously.
99
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
100
+ # @param path [String] the path, relative to {base_url}.
101
+ # @param options [Hash{String=>String}] specifying any request options like :body.
102
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
103
+ #
104
+ def make_request_async(method, path, options = {})
105
+ fail ArgumentError, 'method is nil' if method.nil?
106
+ fail ArgumentError, 'path is nil' if path.nil?
107
+
108
+ request_url = options[:base_url] || @base_url
109
+
110
+ request_headers = @request_headers
111
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
112
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
113
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
114
+
115
+ super(request_url, method, path, options)
116
+ end
117
+
67
118
  end
68
119
  end
@@ -4,5 +4,5 @@
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::DataLakeAnalytics
7
- VERSION = '0.6.0'
7
+ VERSION = '0.7.0'
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_datalake_analytics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-15 00:00:00.000000000 Z
11
+ date: 2016-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.5.0
75
+ version: 0.6.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.5.0
82
+ version: 0.6.0
83
83
  description: Microsoft Azure Resource Provider DataLake Analytics Client Library for
84
84
  Ruby
85
85
  email: azrubyteam@microsoft.com
@@ -129,7 +129,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - ">="
131
131
  - !ruby/object:Gem::Version
132
- version: 1.9.3
132
+ version: 2.0.0
133
133
  required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - ">="