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.
@@ -42,8 +42,8 @@ module Azure::ARM::Web
42
42
  response = get_all_certificate_orders_async(custom_headers).value!
43
43
  unless response.nil?
44
44
  page = response.body
45
- page.next_method = Proc.new do |next_link|
46
- get_all_certificate_orders_next_async(next_link, custom_headers)
45
+ page.next_method = Proc.new do |next_page_link|
46
+ get_all_certificate_orders_next_async(next_page_link, custom_headers)
47
47
  end
48
48
  page
49
49
  end
@@ -93,30 +93,27 @@ module Azure::ARM::Web
93
93
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
94
94
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
95
95
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'
96
+
97
+ request_url = @base_url || @client.base_url
98
+
96
99
  options = {
97
100
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
98
101
  path_params: {'subscriptionId' => @client.subscription_id},
99
102
  query_params: {'api-version' => @client.api_version},
100
- headers: request_headers.merge(custom_headers || {})
103
+ headers: request_headers.merge(custom_headers || {}),
104
+ base_url: request_url
101
105
  }
106
+ promise = @client.make_request_async(:get, path_template, options)
102
107
 
103
- request_url = @base_url || @client.base_url
104
-
105
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
106
- promise = request.run_promise do |req|
107
- @client.credentials.sign_request(req) unless @client.credentials.nil?
108
- end
109
-
110
- promise = promise.then do |http_response|
108
+ promise = promise.then do |result|
109
+ http_response = result.response
111
110
  status_code = http_response.status
112
111
  response_content = http_response.body
113
112
  unless status_code == 200
114
113
  error_model = JSON.load(response_content)
115
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
114
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
116
115
  end
117
116
 
118
- # Create Result
119
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
120
117
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
121
118
  # Deserialize Response
122
119
  if status_code == 200
@@ -191,31 +188,28 @@ module Azure::ARM::Web
191
188
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
192
189
 
193
190
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'
191
+
192
+ request_url = @base_url || @client.base_url
193
+
194
194
  options = {
195
195
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
196
196
  path_params: {'subscriptionId' => @client.subscription_id},
197
197
  query_params: {'api-version' => @client.api_version},
198
198
  body: request_content,
199
- headers: request_headers.merge(custom_headers || {})
199
+ headers: request_headers.merge(custom_headers || {}),
200
+ base_url: request_url
200
201
  }
202
+ promise = @client.make_request_async(:post, path_template, options)
201
203
 
202
- request_url = @base_url || @client.base_url
203
-
204
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
205
- promise = request.run_promise do |req|
206
- @client.credentials.sign_request(req) unless @client.credentials.nil?
207
- end
208
-
209
- promise = promise.then do |http_response|
204
+ promise = promise.then do |result|
205
+ http_response = result.response
210
206
  status_code = http_response.status
211
207
  response_content = http_response.body
212
208
  unless status_code == 200
213
209
  error_model = JSON.load(response_content)
214
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
210
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
215
211
  end
216
212
 
217
- # Create Result
218
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
219
213
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
220
214
 
221
215
  result
@@ -273,29 +267,26 @@ module Azure::ARM::Web
273
267
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
274
268
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
275
269
  path_template = '{nextLink}'
270
+
271
+ request_url = @base_url || @client.base_url
272
+
276
273
  options = {
277
274
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
278
275
  skip_encoding_path_params: {'nextLink' => next_page_link},
279
- headers: request_headers.merge(custom_headers || {})
276
+ headers: request_headers.merge(custom_headers || {}),
277
+ base_url: request_url
280
278
  }
279
+ promise = @client.make_request_async(:get, path_template, options)
281
280
 
282
- request_url = @base_url || @client.base_url
283
-
284
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
285
- promise = request.run_promise do |req|
286
- @client.credentials.sign_request(req) unless @client.credentials.nil?
287
- end
288
-
289
- promise = promise.then do |http_response|
281
+ promise = promise.then do |result|
282
+ http_response = result.response
290
283
  status_code = http_response.status
291
284
  response_content = http_response.body
292
285
  unless status_code == 200
293
286
  error_model = JSON.load(response_content)
294
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
287
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
295
288
  end
296
289
 
297
- # Create Result
298
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
299
290
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
300
291
  # Deserialize Response
301
292
  if status_code == 200
@@ -42,8 +42,8 @@ module Azure::ARM::Web
42
42
  response = get_all_domains_async(custom_headers).value!
43
43
  unless response.nil?
44
44
  page = response.body
45
- page.next_method = Proc.new do |next_link|
46
- get_all_domains_next_async(next_link, custom_headers)
45
+ page.next_method = Proc.new do |next_page_link|
46
+ get_all_domains_next_async(next_page_link, custom_headers)
47
47
  end
48
48
  page
49
49
  end
@@ -93,30 +93,27 @@ module Azure::ARM::Web
93
93
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
94
94
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
95
95
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'
96
+
97
+ request_url = @base_url || @client.base_url
98
+
96
99
  options = {
97
100
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
98
101
  path_params: {'subscriptionId' => @client.subscription_id},
99
102
  query_params: {'api-version' => @client.api_version},
100
- headers: request_headers.merge(custom_headers || {})
103
+ headers: request_headers.merge(custom_headers || {}),
104
+ base_url: request_url
101
105
  }
106
+ promise = @client.make_request_async(:get, path_template, options)
102
107
 
103
- request_url = @base_url || @client.base_url
104
-
105
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
106
- promise = request.run_promise do |req|
107
- @client.credentials.sign_request(req) unless @client.credentials.nil?
108
- end
109
-
110
- promise = promise.then do |http_response|
108
+ promise = promise.then do |result|
109
+ http_response = result.response
111
110
  status_code = http_response.status
112
111
  response_content = http_response.body
113
112
  unless status_code == 200
114
113
  error_model = JSON.load(response_content)
115
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
114
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
116
115
  end
117
116
 
118
- # Create Result
119
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
120
117
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
121
118
  # Deserialize Response
122
119
  if status_code == 200
@@ -179,30 +176,27 @@ module Azure::ARM::Web
179
176
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
180
177
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
181
178
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'
179
+
180
+ request_url = @base_url || @client.base_url
181
+
182
182
  options = {
183
183
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
184
184
  path_params: {'subscriptionId' => @client.subscription_id},
185
185
  query_params: {'api-version' => @client.api_version},
186
- headers: request_headers.merge(custom_headers || {})
186
+ headers: request_headers.merge(custom_headers || {}),
187
+ base_url: request_url
187
188
  }
189
+ promise = @client.make_request_async(:post, path_template, options)
188
190
 
189
- request_url = @base_url || @client.base_url
190
-
191
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
192
- promise = request.run_promise do |req|
193
- @client.credentials.sign_request(req) unless @client.credentials.nil?
194
- end
195
-
196
- promise = promise.then do |http_response|
191
+ promise = promise.then do |result|
192
+ http_response = result.response
197
193
  status_code = http_response.status
198
194
  response_content = http_response.body
199
195
  unless status_code == 200
200
196
  error_model = JSON.load(response_content)
201
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
197
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
202
198
  end
203
199
 
204
- # Create Result
205
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
206
200
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
207
201
  # Deserialize Response
208
202
  if status_code == 200
@@ -280,31 +274,28 @@ module Azure::ARM::Web
280
274
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
281
275
 
282
276
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/validateDomainRegistrationInformation'
277
+
278
+ request_url = @base_url || @client.base_url
279
+
283
280
  options = {
284
281
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
285
282
  path_params: {'subscriptionId' => @client.subscription_id},
286
283
  query_params: {'api-version' => @client.api_version},
287
284
  body: request_content,
288
- headers: request_headers.merge(custom_headers || {})
285
+ headers: request_headers.merge(custom_headers || {}),
286
+ base_url: request_url
289
287
  }
288
+ promise = @client.make_request_async(:post, path_template, options)
290
289
 
291
- request_url = @base_url || @client.base_url
292
-
293
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
294
- promise = request.run_promise do |req|
295
- @client.credentials.sign_request(req) unless @client.credentials.nil?
296
- end
297
-
298
- promise = promise.then do |http_response|
290
+ promise = promise.then do |result|
291
+ http_response = result.response
299
292
  status_code = http_response.status
300
293
  response_content = http_response.body
301
294
  unless status_code == 200
302
295
  error_model = JSON.load(response_content)
303
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
296
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
304
297
  end
305
298
 
306
- # Create Result
307
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
308
299
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
309
300
 
310
301
  result
@@ -369,31 +360,28 @@ module Azure::ARM::Web
369
360
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
370
361
 
371
362
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'
363
+
364
+ request_url = @base_url || @client.base_url
365
+
372
366
  options = {
373
367
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
374
368
  path_params: {'subscriptionId' => @client.subscription_id},
375
369
  query_params: {'api-version' => @client.api_version},
376
370
  body: request_content,
377
- headers: request_headers.merge(custom_headers || {})
371
+ headers: request_headers.merge(custom_headers || {}),
372
+ base_url: request_url
378
373
  }
374
+ promise = @client.make_request_async(:post, path_template, options)
379
375
 
380
- request_url = @base_url || @client.base_url
381
-
382
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
383
- promise = request.run_promise do |req|
384
- @client.credentials.sign_request(req) unless @client.credentials.nil?
385
- end
386
-
387
- promise = promise.then do |http_response|
376
+ promise = promise.then do |result|
377
+ http_response = result.response
388
378
  status_code = http_response.status
389
379
  response_content = http_response.body
390
380
  unless status_code == 200
391
381
  error_model = JSON.load(response_content)
392
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
382
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
393
383
  end
394
384
 
395
- # Create Result
396
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
397
385
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
398
386
  # Deserialize Response
399
387
  if status_code == 200
@@ -427,8 +415,8 @@ module Azure::ARM::Web
427
415
  response = list_domain_recommendations_async(parameters, custom_headers).value!
428
416
  unless response.nil?
429
417
  page = response.body
430
- page.next_method = Proc.new do |next_link|
431
- list_domain_recommendations_next_async(next_link, custom_headers)
418
+ page.next_method = Proc.new do |next_page_link|
419
+ list_domain_recommendations_next_async(next_page_link, custom_headers)
432
420
  end
433
421
  page
434
422
  end
@@ -493,31 +481,28 @@ module Azure::ARM::Web
493
481
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
494
482
 
495
483
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'
484
+
485
+ request_url = @base_url || @client.base_url
486
+
496
487
  options = {
497
488
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
498
489
  path_params: {'subscriptionId' => @client.subscription_id},
499
490
  query_params: {'api-version' => @client.api_version},
500
491
  body: request_content,
501
- headers: request_headers.merge(custom_headers || {})
492
+ headers: request_headers.merge(custom_headers || {}),
493
+ base_url: request_url
502
494
  }
495
+ promise = @client.make_request_async(:post, path_template, options)
503
496
 
504
- request_url = @base_url || @client.base_url
505
-
506
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
507
- promise = request.run_promise do |req|
508
- @client.credentials.sign_request(req) unless @client.credentials.nil?
509
- end
510
-
511
- promise = promise.then do |http_response|
497
+ promise = promise.then do |result|
498
+ http_response = result.response
512
499
  status_code = http_response.status
513
500
  response_content = http_response.body
514
501
  unless status_code == 200
515
502
  error_model = JSON.load(response_content)
516
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
503
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
517
504
  end
518
505
 
519
- # Create Result
520
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
521
506
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
522
507
  # Deserialize Response
523
508
  if status_code == 200
@@ -585,29 +570,26 @@ module Azure::ARM::Web
585
570
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
586
571
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
587
572
  path_template = '{nextLink}'
573
+
574
+ request_url = @base_url || @client.base_url
575
+
588
576
  options = {
589
577
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
590
578
  skip_encoding_path_params: {'nextLink' => next_page_link},
591
- headers: request_headers.merge(custom_headers || {})
579
+ headers: request_headers.merge(custom_headers || {}),
580
+ base_url: request_url
592
581
  }
582
+ promise = @client.make_request_async(:get, path_template, options)
593
583
 
594
- request_url = @base_url || @client.base_url
595
-
596
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
597
- promise = request.run_promise do |req|
598
- @client.credentials.sign_request(req) unless @client.credentials.nil?
599
- end
600
-
601
- promise = promise.then do |http_response|
584
+ promise = promise.then do |result|
585
+ http_response = result.response
602
586
  status_code = http_response.status
603
587
  response_content = http_response.body
604
588
  unless status_code == 200
605
589
  error_model = JSON.load(response_content)
606
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
590
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
607
591
  end
608
592
 
609
- # Create Result
610
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
611
593
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
612
594
  # Deserialize Response
613
595
  if status_code == 200
@@ -675,29 +657,26 @@ module Azure::ARM::Web
675
657
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
676
658
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
677
659
  path_template = '{nextLink}'
660
+
661
+ request_url = @base_url || @client.base_url
662
+
678
663
  options = {
679
664
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
680
665
  skip_encoding_path_params: {'nextLink' => next_page_link},
681
- headers: request_headers.merge(custom_headers || {})
666
+ headers: request_headers.merge(custom_headers || {}),
667
+ base_url: request_url
682
668
  }
669
+ promise = @client.make_request_async(:post, path_template, options)
683
670
 
684
- request_url = @base_url || @client.base_url
685
-
686
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, 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|
671
+ promise = promise.then do |result|
672
+ http_response = result.response
692
673
  status_code = http_response.status
693
674
  response_content = http_response.body
694
675
  unless status_code == 200
695
676
  error_model = JSON.load(response_content)
696
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
677
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
697
678
  end
698
679
 
699
- # Create Result
700
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
701
680
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
702
681
  # Deserialize Response
703
682
  if status_code == 200
@@ -82,31 +82,28 @@ module Azure::ARM::Web
82
82
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
83
83
 
84
84
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'
85
+
86
+ request_url = @base_url || @client.base_url
87
+
85
88
  options = {
86
89
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
87
90
  path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
88
91
  query_params: {'api-version' => @client.api_version},
89
92
  body: request_content,
90
- headers: request_headers.merge(custom_headers || {})
93
+ headers: request_headers.merge(custom_headers || {}),
94
+ base_url: request_url
91
95
  }
96
+ promise = @client.make_request_async(:post, path_template, options)
92
97
 
93
- request_url = @base_url || @client.base_url
94
-
95
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
96
- promise = request.run_promise do |req|
97
- @client.credentials.sign_request(req) unless @client.credentials.nil?
98
- end
99
-
100
- promise = promise.then do |http_response|
98
+ promise = promise.then do |result|
99
+ http_response = result.response
101
100
  status_code = http_response.status
102
101
  response_content = http_response.body
103
102
  unless status_code == 204
104
103
  error_model = JSON.load(response_content)
105
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
104
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
106
105
  end
107
106
 
108
- # Create Result
109
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
110
107
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
111
108
 
112
109
  result