azure_mgmt_web 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/azure_mgmt_web.gemspec +1 -1
  3. data/lib/generated/azure_mgmt_web/certificate_orders.rb +234 -7
  4. data/lib/generated/azure_mgmt_web/certificates.rb +115 -4
  5. data/lib/generated/azure_mgmt_web/classic_mobile_services.rb +115 -4
  6. data/lib/generated/azure_mgmt_web/domains.rb +115 -4
  7. data/lib/generated/azure_mgmt_web/global.rb +793 -20
  8. data/lib/generated/azure_mgmt_web/global_certificate_order.rb +114 -4
  9. data/lib/generated/azure_mgmt_web/global_domain_registration.rb +229 -7
  10. data/lib/generated/azure_mgmt_web/global_resource_groups.rb +1 -1
  11. data/lib/generated/azure_mgmt_web/hosting_environments.rb +2388 -54
  12. data/lib/generated/azure_mgmt_web/managed_hosting_environments.rb +459 -11
  13. data/lib/generated/azure_mgmt_web/models/backup_item_collection.rb +31 -0
  14. data/lib/generated/azure_mgmt_web/models/certificate_collection.rb +31 -0
  15. data/lib/generated/azure_mgmt_web/models/certificate_order_certificate_collection.rb +31 -0
  16. data/lib/generated/azure_mgmt_web/models/certificate_order_collection.rb +31 -0
  17. data/lib/generated/azure_mgmt_web/models/classic_mobile_service_collection.rb +31 -0
  18. data/lib/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb +31 -0
  19. data/lib/generated/azure_mgmt_web/models/deleted_site_collection.rb +31 -0
  20. data/lib/generated/azure_mgmt_web/models/deployment_collection.rb +31 -0
  21. data/lib/generated/azure_mgmt_web/models/domain_collection.rb +31 -0
  22. data/lib/generated/azure_mgmt_web/models/geo_region_collection.rb +31 -0
  23. data/lib/generated/azure_mgmt_web/models/host_name_binding_collection.rb +31 -0
  24. data/lib/generated/azure_mgmt_web/models/hosting_environment_collection.rb +31 -0
  25. data/lib/generated/azure_mgmt_web/models/managed_hosting_environment_collection.rb +31 -0
  26. data/lib/generated/azure_mgmt_web/models/metric_definition_collection.rb +31 -0
  27. data/lib/generated/azure_mgmt_web/models/name_identifier_collection.rb +31 -0
  28. data/lib/generated/azure_mgmt_web/models/resource_metric_collection.rb +31 -0
  29. data/lib/generated/azure_mgmt_web/models/server_farm_collection.rb +31 -0
  30. data/lib/generated/azure_mgmt_web/models/site_instance_collection.rb +31 -0
  31. data/lib/generated/azure_mgmt_web/models/sku_info_collection.rb +31 -0
  32. data/lib/generated/azure_mgmt_web/models/slot_difference_collection.rb +31 -0
  33. data/lib/generated/azure_mgmt_web/models/source_control_collection.rb +31 -0
  34. data/lib/generated/azure_mgmt_web/models/stamp_capacity_collection.rb +31 -0
  35. data/lib/generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb +31 -0
  36. data/lib/generated/azure_mgmt_web/models/top_level_domain_collection.rb +31 -0
  37. data/lib/generated/azure_mgmt_web/models/usage_collection.rb +31 -0
  38. data/lib/generated/azure_mgmt_web/models/worker_pool_collection.rb +31 -0
  39. data/lib/generated/azure_mgmt_web/provider.rb +114 -4
  40. data/lib/generated/azure_mgmt_web/recommendations.rb +1 -1
  41. data/lib/generated/azure_mgmt_web/server_farms.rb +356 -10
  42. data/lib/generated/azure_mgmt_web/sites.rb +2471 -68
  43. data/lib/generated/azure_mgmt_web/top_level_domains.rb +230 -7
  44. data/lib/generated/azure_mgmt_web/usage_operations.rb +1 -1
  45. data/lib/generated/azure_mgmt_web/version.rb +1 -1
  46. data/lib/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  47. metadata +4 -4
@@ -26,7 +26,7 @@ module Azure::ARM::Web
26
26
  @client = client
27
27
  end
28
28
 
29
- # @return reference to the WebSiteManagementClient
29
+ # @return [WebSiteManagementClient] reference to the WebSiteManagementClient
30
30
  attr_reader :client
31
31
 
32
32
  #
@@ -221,11 +221,32 @@ module Azure::ARM::Web
221
221
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
222
222
  # will be added to the HTTP request.
223
223
  #
224
- # @return [GeoRegionCollection] operation results.
224
+ # @return [GeoRegionCollection] which provide lazy access to pages of the
225
+ # response.
225
226
  #
226
- def get_subscription_geo_regions(sku = nil, custom_headers = nil)
227
+ def get_subscription_geo_regions_as_lazy(sku = nil, custom_headers = nil)
227
228
  response = get_subscription_geo_regions_async(sku, custom_headers).value!
228
- response.body unless response.nil?
229
+ unless response.nil?
230
+ page = response.body
231
+ page.next_method = Proc.new do |next_link|
232
+ get_subscription_geo_regions_next_async(next_link, custom_headers)
233
+ end
234
+ page
235
+ end
236
+ end
237
+
238
+ #
239
+ # Gets list of available geo regions
240
+ #
241
+ # @param sku [String] Filter only to regions that support this sku
242
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
243
+ # will be added to the HTTP request.
244
+ #
245
+ # @return [Array<GeoRegion>] operation results.
246
+ #
247
+ def get_subscription_geo_regions(sku = nil, custom_headers = nil)
248
+ first_page = get_subscription_geo_regions_as_lazy(sku, custom_headers)
249
+ first_page.get_all_items
229
250
  end
230
251
 
231
252
  #
@@ -309,11 +330,31 @@ module Azure::ARM::Web
309
330
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
310
331
  # will be added to the HTTP request.
311
332
  #
312
- # @return [CertificateCollection] operation results.
333
+ # @return [CertificateCollection] which provide lazy access to pages of the
334
+ # response.
313
335
  #
314
- def get_all_certificates(custom_headers = nil)
336
+ def get_all_certificates_as_lazy(custom_headers = nil)
315
337
  response = get_all_certificates_async(custom_headers).value!
316
- response.body unless response.nil?
338
+ unless response.nil?
339
+ page = response.body
340
+ page.next_method = Proc.new do |next_link|
341
+ get_all_certificates_next_async(next_link, custom_headers)
342
+ end
343
+ page
344
+ end
345
+ end
346
+
347
+ #
348
+ # Get all certificates for a subscription
349
+ #
350
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
351
+ # will be added to the HTTP request.
352
+ #
353
+ # @return [Array<Certificate>] operation results.
354
+ #
355
+ def get_all_certificates(custom_headers = nil)
356
+ first_page = get_all_certificates_as_lazy(custom_headers)
357
+ first_page.get_all_items
317
358
  end
318
359
 
319
360
  #
@@ -398,11 +439,34 @@ module Azure::ARM::Web
398
439
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
399
440
  # will be added to the HTTP request.
400
441
  #
401
- # @return [ServerFarmCollection] operation results.
442
+ # @return [ServerFarmCollection] which provide lazy access to pages of the
443
+ # response.
402
444
  #
403
- def get_all_server_farms(detailed = nil, custom_headers = nil)
445
+ def get_all_server_farms_as_lazy(detailed = nil, custom_headers = nil)
404
446
  response = get_all_server_farms_async(detailed, custom_headers).value!
405
- response.body unless response.nil?
447
+ unless response.nil?
448
+ page = response.body
449
+ page.next_method = Proc.new do |next_link|
450
+ get_all_server_farms_next_async(next_link, custom_headers)
451
+ end
452
+ page
453
+ end
454
+ end
455
+
456
+ #
457
+ # Gets all App Service Plans for a subcription
458
+ #
459
+ # @param detailed [Boolean] False to return a subset of App Service Plan
460
+ # properties, true to return all of the properties.
461
+ # Retrieval of all properties may increase the API latency.
462
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
463
+ # will be added to the HTTP request.
464
+ #
465
+ # @return [Array<ServerFarmWithRichSku>] operation results.
466
+ #
467
+ def get_all_server_farms(detailed = nil, custom_headers = nil)
468
+ first_page = get_all_server_farms_as_lazy(detailed, custom_headers)
469
+ first_page.get_all_items
406
470
  end
407
471
 
408
472
  #
@@ -490,7 +554,26 @@ module Azure::ARM::Web
490
554
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
491
555
  # will be added to the HTTP request.
492
556
  #
493
- # @return [SiteCollection] operation results.
557
+ # @return [SiteCollection] which provide lazy access to pages of the response.
558
+ #
559
+ def get_all_sites_as_lazy(custom_headers = nil)
560
+ response = get_all_sites_async(custom_headers).value!
561
+ unless response.nil?
562
+ page = response.body
563
+ page.next_method = Proc.new do |next_link|
564
+ get_all_sites_next_async(next_link, custom_headers)
565
+ end
566
+ page
567
+ end
568
+ end
569
+
570
+ #
571
+ # Gets all Web Apps for a subscription
572
+ #
573
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
574
+ # will be added to the HTTP request.
575
+ #
576
+ # @return [Array<Site>] operation results.
494
577
  #
495
578
  def get_all_sites(custom_headers = nil)
496
579
  first_page = get_all_sites_as_lazy(custom_headers)
@@ -576,11 +659,31 @@ module Azure::ARM::Web
576
659
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
577
660
  # will be added to the HTTP request.
578
661
  #
579
- # @return [HostingEnvironmentCollection] operation results.
662
+ # @return [HostingEnvironmentCollection] which provide lazy access to pages of
663
+ # the response.
580
664
  #
581
- def get_all_hosting_environments(custom_headers = nil)
665
+ def get_all_hosting_environments_as_lazy(custom_headers = nil)
582
666
  response = get_all_hosting_environments_async(custom_headers).value!
583
- response.body unless response.nil?
667
+ unless response.nil?
668
+ page = response.body
669
+ page.next_method = Proc.new do |next_link|
670
+ get_all_hosting_environments_next_async(next_link, custom_headers)
671
+ end
672
+ page
673
+ end
674
+ end
675
+
676
+ #
677
+ # Gets all hostingEnvironments (App Service Environment) for a subscription
678
+ #
679
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
680
+ # will be added to the HTTP request.
681
+ #
682
+ # @return [Array<HostingEnvironment>] operation results.
683
+ #
684
+ def get_all_hosting_environments(custom_headers = nil)
685
+ first_page = get_all_hosting_environments_as_lazy(custom_headers)
686
+ first_page.get_all_items
584
687
  end
585
688
 
586
689
  #
@@ -662,11 +765,31 @@ module Azure::ARM::Web
662
765
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
663
766
  # will be added to the HTTP request.
664
767
  #
665
- # @return [ManagedHostingEnvironmentCollection] operation results.
768
+ # @return [ManagedHostingEnvironmentCollection] which provide lazy access to
769
+ # pages of the response.
666
770
  #
667
- def get_all_managed_hosting_environments(custom_headers = nil)
771
+ def get_all_managed_hosting_environments_as_lazy(custom_headers = nil)
668
772
  response = get_all_managed_hosting_environments_async(custom_headers).value!
669
- response.body unless response.nil?
773
+ unless response.nil?
774
+ page = response.body
775
+ page.next_method = Proc.new do |next_link|
776
+ get_all_managed_hosting_environments_next_async(next_link, custom_headers)
777
+ end
778
+ page
779
+ end
780
+ end
781
+
782
+ #
783
+ # Gets all managed hosting environments for a subscription
784
+ #
785
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
786
+ # will be added to the HTTP request.
787
+ #
788
+ # @return [Array<ManagedHostingEnvironment>] operation results.
789
+ #
790
+ def get_all_managed_hosting_environments(custom_headers = nil)
791
+ first_page = get_all_managed_hosting_environments_as_lazy(custom_headers)
792
+ first_page.get_all_items
670
793
  end
671
794
 
672
795
  #
@@ -748,11 +871,31 @@ module Azure::ARM::Web
748
871
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
749
872
  # will be added to the HTTP request.
750
873
  #
751
- # @return [ClassicMobileServiceCollection] operation results.
874
+ # @return [ClassicMobileServiceCollection] which provide lazy access to pages
875
+ # of the response.
752
876
  #
753
- def get_all_classic_mobile_services(custom_headers = nil)
877
+ def get_all_classic_mobile_services_as_lazy(custom_headers = nil)
754
878
  response = get_all_classic_mobile_services_async(custom_headers).value!
755
- response.body unless response.nil?
879
+ unless response.nil?
880
+ page = response.body
881
+ page.next_method = Proc.new do |next_link|
882
+ get_all_classic_mobile_services_next_async(next_link, custom_headers)
883
+ end
884
+ page
885
+ end
886
+ end
887
+
888
+ #
889
+ # Gets all mobile services for a subscription
890
+ #
891
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
892
+ # will be added to the HTTP request.
893
+ #
894
+ # @return [Array<ClassicMobileService>] operation results.
895
+ #
896
+ def get_all_classic_mobile_services(custom_headers = nil)
897
+ first_page = get_all_classic_mobile_services_as_lazy(custom_headers)
898
+ first_page.get_all_items
756
899
  end
757
900
 
758
901
  #
@@ -1163,5 +1306,635 @@ module Azure::ARM::Web
1163
1306
  promise.execute
1164
1307
  end
1165
1308
 
1309
+ #
1310
+ # Gets list of available geo regions
1311
+ #
1312
+ # @param next_page_link [String] The NextLink from the previous successful
1313
+ # call to List operation.
1314
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1315
+ # will be added to the HTTP request.
1316
+ #
1317
+ # @return [GeoRegionCollection] operation results.
1318
+ #
1319
+ def get_subscription_geo_regions_next(next_page_link, custom_headers = nil)
1320
+ response = get_subscription_geo_regions_next_async(next_page_link, custom_headers).value!
1321
+ response.body unless response.nil?
1322
+ end
1323
+
1324
+ #
1325
+ # Gets list of available geo regions
1326
+ #
1327
+ # @param next_page_link [String] The NextLink from the previous successful
1328
+ # call to List operation.
1329
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1330
+ # will be added to the HTTP request.
1331
+ #
1332
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1333
+ #
1334
+ def get_subscription_geo_regions_next_with_http_info(next_page_link, custom_headers = nil)
1335
+ get_subscription_geo_regions_next_async(next_page_link, custom_headers).value!
1336
+ end
1337
+
1338
+ #
1339
+ # Gets list of available geo regions
1340
+ #
1341
+ # @param next_page_link [String] The NextLink from the previous successful
1342
+ # call to List operation.
1343
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1344
+ # to the HTTP request.
1345
+ #
1346
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1347
+ #
1348
+ def get_subscription_geo_regions_next_async(next_page_link, custom_headers = nil)
1349
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1350
+
1351
+
1352
+ request_headers = {}
1353
+
1354
+ # Set Headers
1355
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1356
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1357
+ path_template = '{nextLink}'
1358
+ options = {
1359
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1360
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1361
+ headers: request_headers.merge(custom_headers || {})
1362
+ }
1363
+
1364
+ request_url = @base_url || @client.base_url
1365
+
1366
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1367
+ promise = request.run_promise do |req|
1368
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
1369
+ end
1370
+
1371
+ promise = promise.then do |http_response|
1372
+ status_code = http_response.status
1373
+ response_content = http_response.body
1374
+ unless status_code == 200
1375
+ error_model = JSON.load(response_content)
1376
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1377
+ end
1378
+
1379
+ # Create Result
1380
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1381
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1382
+ # Deserialize Response
1383
+ if status_code == 200
1384
+ begin
1385
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1386
+ result_mapper = GeoRegionCollection.mapper()
1387
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1388
+ rescue Exception => e
1389
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1390
+ end
1391
+ end
1392
+
1393
+ result
1394
+ end
1395
+
1396
+ promise.execute
1397
+ end
1398
+
1399
+ #
1400
+ # Get all certificates for a subscription
1401
+ #
1402
+ # @param next_page_link [String] The NextLink from the previous successful
1403
+ # call to List operation.
1404
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1405
+ # will be added to the HTTP request.
1406
+ #
1407
+ # @return [CertificateCollection] operation results.
1408
+ #
1409
+ def get_all_certificates_next(next_page_link, custom_headers = nil)
1410
+ response = get_all_certificates_next_async(next_page_link, custom_headers).value!
1411
+ response.body unless response.nil?
1412
+ end
1413
+
1414
+ #
1415
+ # Get all certificates for a subscription
1416
+ #
1417
+ # @param next_page_link [String] The NextLink from the previous successful
1418
+ # call to List operation.
1419
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1420
+ # will be added to the HTTP request.
1421
+ #
1422
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1423
+ #
1424
+ def get_all_certificates_next_with_http_info(next_page_link, custom_headers = nil)
1425
+ get_all_certificates_next_async(next_page_link, custom_headers).value!
1426
+ end
1427
+
1428
+ #
1429
+ # Get all certificates for a subscription
1430
+ #
1431
+ # @param next_page_link [String] The NextLink from the previous successful
1432
+ # call to List operation.
1433
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1434
+ # to the HTTP request.
1435
+ #
1436
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1437
+ #
1438
+ def get_all_certificates_next_async(next_page_link, custom_headers = nil)
1439
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1440
+
1441
+
1442
+ request_headers = {}
1443
+
1444
+ # Set Headers
1445
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1446
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1447
+ path_template = '{nextLink}'
1448
+ options = {
1449
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1450
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1451
+ headers: request_headers.merge(custom_headers || {})
1452
+ }
1453
+
1454
+ request_url = @base_url || @client.base_url
1455
+
1456
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1457
+ promise = request.run_promise do |req|
1458
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
1459
+ end
1460
+
1461
+ promise = promise.then do |http_response|
1462
+ status_code = http_response.status
1463
+ response_content = http_response.body
1464
+ unless status_code == 200
1465
+ error_model = JSON.load(response_content)
1466
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1467
+ end
1468
+
1469
+ # Create Result
1470
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1471
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1472
+ # Deserialize Response
1473
+ if status_code == 200
1474
+ begin
1475
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1476
+ result_mapper = CertificateCollection.mapper()
1477
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1478
+ rescue Exception => e
1479
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1480
+ end
1481
+ end
1482
+
1483
+ result
1484
+ end
1485
+
1486
+ promise.execute
1487
+ end
1488
+
1489
+ #
1490
+ # Gets all App Service Plans for a subcription
1491
+ #
1492
+ # @param next_page_link [String] The NextLink from the previous successful
1493
+ # call to List operation.
1494
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1495
+ # will be added to the HTTP request.
1496
+ #
1497
+ # @return [ServerFarmCollection] operation results.
1498
+ #
1499
+ def get_all_server_farms_next(next_page_link, custom_headers = nil)
1500
+ response = get_all_server_farms_next_async(next_page_link, custom_headers).value!
1501
+ response.body unless response.nil?
1502
+ end
1503
+
1504
+ #
1505
+ # Gets all App Service Plans for a subcription
1506
+ #
1507
+ # @param next_page_link [String] The NextLink from the previous successful
1508
+ # call to List operation.
1509
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1510
+ # will be added to the HTTP request.
1511
+ #
1512
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1513
+ #
1514
+ def get_all_server_farms_next_with_http_info(next_page_link, custom_headers = nil)
1515
+ get_all_server_farms_next_async(next_page_link, custom_headers).value!
1516
+ end
1517
+
1518
+ #
1519
+ # Gets all App Service Plans for a subcription
1520
+ #
1521
+ # @param next_page_link [String] The NextLink from the previous successful
1522
+ # call to List operation.
1523
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1524
+ # to the HTTP request.
1525
+ #
1526
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1527
+ #
1528
+ def get_all_server_farms_next_async(next_page_link, custom_headers = nil)
1529
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1530
+
1531
+
1532
+ request_headers = {}
1533
+
1534
+ # Set Headers
1535
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1536
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1537
+ path_template = '{nextLink}'
1538
+ options = {
1539
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1540
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1541
+ headers: request_headers.merge(custom_headers || {})
1542
+ }
1543
+
1544
+ request_url = @base_url || @client.base_url
1545
+
1546
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1547
+ promise = request.run_promise do |req|
1548
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
1549
+ end
1550
+
1551
+ promise = promise.then do |http_response|
1552
+ status_code = http_response.status
1553
+ response_content = http_response.body
1554
+ unless status_code == 200
1555
+ error_model = JSON.load(response_content)
1556
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1557
+ end
1558
+
1559
+ # Create Result
1560
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1561
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1562
+ # Deserialize Response
1563
+ if status_code == 200
1564
+ begin
1565
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1566
+ result_mapper = ServerFarmCollection.mapper()
1567
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1568
+ rescue Exception => e
1569
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1570
+ end
1571
+ end
1572
+
1573
+ result
1574
+ end
1575
+
1576
+ promise.execute
1577
+ end
1578
+
1579
+ #
1580
+ # Gets all Web Apps for a subscription
1581
+ #
1582
+ # @param next_page_link [String] The NextLink from the previous successful
1583
+ # call to List operation.
1584
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1585
+ # will be added to the HTTP request.
1586
+ #
1587
+ # @return [SiteCollection] operation results.
1588
+ #
1589
+ def get_all_sites_next(next_page_link, custom_headers = nil)
1590
+ response = get_all_sites_next_async(next_page_link, custom_headers).value!
1591
+ response.body unless response.nil?
1592
+ end
1593
+
1594
+ #
1595
+ # Gets all Web Apps for a subscription
1596
+ #
1597
+ # @param next_page_link [String] The NextLink from the previous successful
1598
+ # call to List operation.
1599
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1600
+ # will be added to the HTTP request.
1601
+ #
1602
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1603
+ #
1604
+ def get_all_sites_next_with_http_info(next_page_link, custom_headers = nil)
1605
+ get_all_sites_next_async(next_page_link, custom_headers).value!
1606
+ end
1607
+
1608
+ #
1609
+ # Gets all Web Apps for a subscription
1610
+ #
1611
+ # @param next_page_link [String] The NextLink from the previous successful
1612
+ # call to List operation.
1613
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1614
+ # to the HTTP request.
1615
+ #
1616
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1617
+ #
1618
+ def get_all_sites_next_async(next_page_link, custom_headers = nil)
1619
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1620
+
1621
+
1622
+ request_headers = {}
1623
+
1624
+ # Set Headers
1625
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1626
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1627
+ path_template = '{nextLink}'
1628
+ options = {
1629
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1630
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1631
+ headers: request_headers.merge(custom_headers || {})
1632
+ }
1633
+
1634
+ request_url = @base_url || @client.base_url
1635
+
1636
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1637
+ promise = request.run_promise do |req|
1638
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
1639
+ end
1640
+
1641
+ promise = promise.then do |http_response|
1642
+ status_code = http_response.status
1643
+ response_content = http_response.body
1644
+ unless status_code == 200
1645
+ error_model = JSON.load(response_content)
1646
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1647
+ end
1648
+
1649
+ # Create Result
1650
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1651
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1652
+ # Deserialize Response
1653
+ if status_code == 200
1654
+ begin
1655
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1656
+ result_mapper = SiteCollection.mapper()
1657
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1658
+ rescue Exception => e
1659
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1660
+ end
1661
+ end
1662
+
1663
+ result
1664
+ end
1665
+
1666
+ promise.execute
1667
+ end
1668
+
1669
+ #
1670
+ # Gets all hostingEnvironments (App Service Environment) for a subscription
1671
+ #
1672
+ # @param next_page_link [String] The NextLink from the previous successful
1673
+ # call to List operation.
1674
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1675
+ # will be added to the HTTP request.
1676
+ #
1677
+ # @return [HostingEnvironmentCollection] operation results.
1678
+ #
1679
+ def get_all_hosting_environments_next(next_page_link, custom_headers = nil)
1680
+ response = get_all_hosting_environments_next_async(next_page_link, custom_headers).value!
1681
+ response.body unless response.nil?
1682
+ end
1683
+
1684
+ #
1685
+ # Gets all hostingEnvironments (App Service Environment) for a subscription
1686
+ #
1687
+ # @param next_page_link [String] The NextLink from the previous successful
1688
+ # call to List operation.
1689
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1690
+ # will be added to the HTTP request.
1691
+ #
1692
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1693
+ #
1694
+ def get_all_hosting_environments_next_with_http_info(next_page_link, custom_headers = nil)
1695
+ get_all_hosting_environments_next_async(next_page_link, custom_headers).value!
1696
+ end
1697
+
1698
+ #
1699
+ # Gets all hostingEnvironments (App Service Environment) for a subscription
1700
+ #
1701
+ # @param next_page_link [String] The NextLink from the previous successful
1702
+ # call to List operation.
1703
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1704
+ # to the HTTP request.
1705
+ #
1706
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1707
+ #
1708
+ def get_all_hosting_environments_next_async(next_page_link, custom_headers = nil)
1709
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1710
+
1711
+
1712
+ request_headers = {}
1713
+
1714
+ # Set Headers
1715
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1716
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1717
+ path_template = '{nextLink}'
1718
+ options = {
1719
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1720
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1721
+ headers: request_headers.merge(custom_headers || {})
1722
+ }
1723
+
1724
+ request_url = @base_url || @client.base_url
1725
+
1726
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1727
+ promise = request.run_promise do |req|
1728
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
1729
+ end
1730
+
1731
+ promise = promise.then do |http_response|
1732
+ status_code = http_response.status
1733
+ response_content = http_response.body
1734
+ unless status_code == 200
1735
+ error_model = JSON.load(response_content)
1736
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1737
+ end
1738
+
1739
+ # Create Result
1740
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1741
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1742
+ # Deserialize Response
1743
+ if status_code == 200
1744
+ begin
1745
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1746
+ result_mapper = HostingEnvironmentCollection.mapper()
1747
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1748
+ rescue Exception => e
1749
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1750
+ end
1751
+ end
1752
+
1753
+ result
1754
+ end
1755
+
1756
+ promise.execute
1757
+ end
1758
+
1759
+ #
1760
+ # Gets all managed hosting environments for a subscription
1761
+ #
1762
+ # @param next_page_link [String] The NextLink from the previous successful
1763
+ # call to List operation.
1764
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1765
+ # will be added to the HTTP request.
1766
+ #
1767
+ # @return [ManagedHostingEnvironmentCollection] operation results.
1768
+ #
1769
+ def get_all_managed_hosting_environments_next(next_page_link, custom_headers = nil)
1770
+ response = get_all_managed_hosting_environments_next_async(next_page_link, custom_headers).value!
1771
+ response.body unless response.nil?
1772
+ end
1773
+
1774
+ #
1775
+ # Gets all managed hosting environments for a subscription
1776
+ #
1777
+ # @param next_page_link [String] The NextLink from the previous successful
1778
+ # call to List operation.
1779
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1780
+ # will be added to the HTTP request.
1781
+ #
1782
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1783
+ #
1784
+ def get_all_managed_hosting_environments_next_with_http_info(next_page_link, custom_headers = nil)
1785
+ get_all_managed_hosting_environments_next_async(next_page_link, custom_headers).value!
1786
+ end
1787
+
1788
+ #
1789
+ # Gets all managed hosting environments for a subscription
1790
+ #
1791
+ # @param next_page_link [String] The NextLink from the previous successful
1792
+ # call to List operation.
1793
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1794
+ # to the HTTP request.
1795
+ #
1796
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1797
+ #
1798
+ def get_all_managed_hosting_environments_next_async(next_page_link, custom_headers = nil)
1799
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1800
+
1801
+
1802
+ request_headers = {}
1803
+
1804
+ # Set Headers
1805
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1806
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1807
+ path_template = '{nextLink}'
1808
+ options = {
1809
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1810
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1811
+ headers: request_headers.merge(custom_headers || {})
1812
+ }
1813
+
1814
+ request_url = @base_url || @client.base_url
1815
+
1816
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1817
+ promise = request.run_promise do |req|
1818
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
1819
+ end
1820
+
1821
+ promise = promise.then do |http_response|
1822
+ status_code = http_response.status
1823
+ response_content = http_response.body
1824
+ unless status_code == 200
1825
+ error_model = JSON.load(response_content)
1826
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1827
+ end
1828
+
1829
+ # Create Result
1830
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1831
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1832
+ # Deserialize Response
1833
+ if status_code == 200
1834
+ begin
1835
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1836
+ result_mapper = ManagedHostingEnvironmentCollection.mapper()
1837
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1838
+ rescue Exception => e
1839
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1840
+ end
1841
+ end
1842
+
1843
+ result
1844
+ end
1845
+
1846
+ promise.execute
1847
+ end
1848
+
1849
+ #
1850
+ # Gets all mobile services for a subscription
1851
+ #
1852
+ # @param next_page_link [String] The NextLink from the previous successful
1853
+ # call to List operation.
1854
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1855
+ # will be added to the HTTP request.
1856
+ #
1857
+ # @return [ClassicMobileServiceCollection] operation results.
1858
+ #
1859
+ def get_all_classic_mobile_services_next(next_page_link, custom_headers = nil)
1860
+ response = get_all_classic_mobile_services_next_async(next_page_link, custom_headers).value!
1861
+ response.body unless response.nil?
1862
+ end
1863
+
1864
+ #
1865
+ # Gets all mobile services for a subscription
1866
+ #
1867
+ # @param next_page_link [String] The NextLink from the previous successful
1868
+ # call to List operation.
1869
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1870
+ # will be added to the HTTP request.
1871
+ #
1872
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1873
+ #
1874
+ def get_all_classic_mobile_services_next_with_http_info(next_page_link, custom_headers = nil)
1875
+ get_all_classic_mobile_services_next_async(next_page_link, custom_headers).value!
1876
+ end
1877
+
1878
+ #
1879
+ # Gets all mobile services for a subscription
1880
+ #
1881
+ # @param next_page_link [String] The NextLink from the previous successful
1882
+ # call to List operation.
1883
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1884
+ # to the HTTP request.
1885
+ #
1886
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1887
+ #
1888
+ def get_all_classic_mobile_services_next_async(next_page_link, custom_headers = nil)
1889
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1890
+
1891
+
1892
+ request_headers = {}
1893
+
1894
+ # Set Headers
1895
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1896
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1897
+ path_template = '{nextLink}'
1898
+ options = {
1899
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1900
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1901
+ headers: request_headers.merge(custom_headers || {})
1902
+ }
1903
+
1904
+ request_url = @base_url || @client.base_url
1905
+
1906
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1907
+ promise = request.run_promise do |req|
1908
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
1909
+ end
1910
+
1911
+ promise = promise.then do |http_response|
1912
+ status_code = http_response.status
1913
+ response_content = http_response.body
1914
+ unless status_code == 200
1915
+ error_model = JSON.load(response_content)
1916
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1917
+ end
1918
+
1919
+ # Create Result
1920
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1921
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1922
+ # Deserialize Response
1923
+ if status_code == 200
1924
+ begin
1925
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1926
+ result_mapper = ClassicMobileServiceCollection.mapper()
1927
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1928
+ rescue Exception => e
1929
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1930
+ end
1931
+ end
1932
+
1933
+ result
1934
+ end
1935
+
1936
+ promise.execute
1937
+ end
1938
+
1166
1939
  end
1167
1940
  end