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
@@ -18,6 +18,37 @@ module Azure::ARM::Web
18
18
  # @return [String] Link to next page of resources
19
19
  attr_accessor :next_link
20
20
 
21
+ # return [Proc] with next page method call.
22
+ attr_accessor :next_method
23
+
24
+ #
25
+ # Gets the rest of the items for the request, enabling auto-pagination.
26
+ #
27
+ # @return [Array<TldLegalAgreement>] operation results.
28
+ #
29
+ def get_all_items
30
+ items = @value
31
+ page = self
32
+ while page.next_link != nil do
33
+ page = page.get_next_page
34
+ items.concat(page.value)
35
+ end
36
+ items
37
+ end
38
+
39
+ #
40
+ # Gets the next page of results.
41
+ #
42
+ # @return [TldLegalAgreementCollection] with next page content.
43
+ #
44
+ def get_next_page
45
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
46
+ unless response.nil?
47
+ @next_link = response.body.next_link
48
+ @value = response.body.value
49
+ self
50
+ end
51
+ end
21
52
 
22
53
  #
23
54
  # Mapper for TldLegalAgreementCollection class as Ruby Hash.
@@ -18,6 +18,37 @@ module Azure::ARM::Web
18
18
  # @return [String] Link to next page of resources
19
19
  attr_accessor :next_link
20
20
 
21
+ # return [Proc] with next page method call.
22
+ attr_accessor :next_method
23
+
24
+ #
25
+ # Gets the rest of the items for the request, enabling auto-pagination.
26
+ #
27
+ # @return [Array<TopLevelDomain>] operation results.
28
+ #
29
+ def get_all_items
30
+ items = @value
31
+ page = self
32
+ while page.next_link != nil do
33
+ page = page.get_next_page
34
+ items.concat(page.value)
35
+ end
36
+ items
37
+ end
38
+
39
+ #
40
+ # Gets the next page of results.
41
+ #
42
+ # @return [TopLevelDomainCollection] with next page content.
43
+ #
44
+ def get_next_page
45
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
46
+ unless response.nil?
47
+ @next_link = response.body.next_link
48
+ @value = response.body.value
49
+ self
50
+ end
51
+ end
21
52
 
22
53
  #
23
54
  # Mapper for TopLevelDomainCollection class as Ruby Hash.
@@ -18,6 +18,37 @@ module Azure::ARM::Web
18
18
  # @return [String] Link to next page of resources
19
19
  attr_accessor :next_link
20
20
 
21
+ # return [Proc] with next page method call.
22
+ attr_accessor :next_method
23
+
24
+ #
25
+ # Gets the rest of the items for the request, enabling auto-pagination.
26
+ #
27
+ # @return [Array<Usage>] operation results.
28
+ #
29
+ def get_all_items
30
+ items = @value
31
+ page = self
32
+ while page.next_link != nil do
33
+ page = page.get_next_page
34
+ items.concat(page.value)
35
+ end
36
+ items
37
+ end
38
+
39
+ #
40
+ # Gets the next page of results.
41
+ #
42
+ # @return [UsageCollection] with next page content.
43
+ #
44
+ def get_next_page
45
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
46
+ unless response.nil?
47
+ @next_link = response.body.next_link
48
+ @value = response.body.value
49
+ self
50
+ end
51
+ end
21
52
 
22
53
  #
23
54
  # Mapper for UsageCollection class as Ruby Hash.
@@ -18,6 +18,37 @@ module Azure::ARM::Web
18
18
  # @return [String] Link to next page of resources
19
19
  attr_accessor :next_link
20
20
 
21
+ # return [Proc] with next page method call.
22
+ attr_accessor :next_method
23
+
24
+ #
25
+ # Gets the rest of the items for the request, enabling auto-pagination.
26
+ #
27
+ # @return [Array<WorkerPool>] operation results.
28
+ #
29
+ def get_all_items
30
+ items = @value
31
+ page = self
32
+ while page.next_link != nil do
33
+ page = page.get_next_page
34
+ items.concat(page.value)
35
+ end
36
+ items
37
+ end
38
+
39
+ #
40
+ # Gets the next page of results.
41
+ #
42
+ # @return [WorkerPoolCollection] with next page content.
43
+ #
44
+ def get_next_page
45
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
46
+ unless response.nil?
47
+ @next_link = response.body.next_link
48
+ @value = response.body.value
49
+ self
50
+ end
51
+ end
21
52
 
22
53
  #
23
54
  # Mapper for WorkerPoolCollection class as Ruby Hash.
@@ -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
  #
@@ -35,11 +35,31 @@ module Azure::ARM::Web
35
35
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
36
36
  # will be added to the HTTP request.
37
37
  #
38
- # @return [SourceControlCollection] operation results.
38
+ # @return [SourceControlCollection] which provide lazy access to pages of the
39
+ # response.
39
40
  #
40
- def get_source_controls(custom_headers = nil)
41
+ def get_source_controls_as_lazy(custom_headers = nil)
41
42
  response = get_source_controls_async(custom_headers).value!
42
- response.body unless response.nil?
43
+ unless response.nil?
44
+ page = response.body
45
+ page.next_method = Proc.new do |next_link|
46
+ get_source_controls_next_async(next_link, custom_headers)
47
+ end
48
+ page
49
+ end
50
+ end
51
+
52
+ #
53
+ # Gets the source controls available for Azure websites
54
+ #
55
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
56
+ # will be added to the HTTP request.
57
+ #
58
+ # @return [Array<SourceControl>] operation results.
59
+ #
60
+ def get_source_controls(custom_headers = nil)
61
+ first_page = get_source_controls_as_lazy(custom_headers)
62
+ first_page.get_all_items
43
63
  end
44
64
 
45
65
  #
@@ -485,5 +505,95 @@ module Azure::ARM::Web
485
505
  promise.execute
486
506
  end
487
507
 
508
+ #
509
+ # Gets the source controls available for Azure websites
510
+ #
511
+ # @param next_page_link [String] The NextLink from the previous successful
512
+ # call to List operation.
513
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
514
+ # will be added to the HTTP request.
515
+ #
516
+ # @return [SourceControlCollection] operation results.
517
+ #
518
+ def get_source_controls_next(next_page_link, custom_headers = nil)
519
+ response = get_source_controls_next_async(next_page_link, custom_headers).value!
520
+ response.body unless response.nil?
521
+ end
522
+
523
+ #
524
+ # Gets the source controls available for Azure websites
525
+ #
526
+ # @param next_page_link [String] The NextLink from the previous successful
527
+ # call to List operation.
528
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
529
+ # will be added to the HTTP request.
530
+ #
531
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
532
+ #
533
+ def get_source_controls_next_with_http_info(next_page_link, custom_headers = nil)
534
+ get_source_controls_next_async(next_page_link, custom_headers).value!
535
+ end
536
+
537
+ #
538
+ # Gets the source controls available for Azure websites
539
+ #
540
+ # @param next_page_link [String] The NextLink from the previous successful
541
+ # call to List operation.
542
+ # @param [Hash{String => String}] A hash of custom headers that will be added
543
+ # to the HTTP request.
544
+ #
545
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
546
+ #
547
+ def get_source_controls_next_async(next_page_link, custom_headers = nil)
548
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
549
+
550
+
551
+ request_headers = {}
552
+
553
+ # Set Headers
554
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
555
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
556
+ path_template = '{nextLink}'
557
+ options = {
558
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
559
+ skip_encoding_path_params: {'nextLink' => next_page_link},
560
+ headers: request_headers.merge(custom_headers || {})
561
+ }
562
+
563
+ request_url = @base_url || @client.base_url
564
+
565
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
566
+ promise = request.run_promise do |req|
567
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
568
+ end
569
+
570
+ promise = promise.then do |http_response|
571
+ status_code = http_response.status
572
+ response_content = http_response.body
573
+ unless status_code == 200
574
+ error_model = JSON.load(response_content)
575
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
576
+ end
577
+
578
+ # Create Result
579
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
580
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
581
+ # Deserialize Response
582
+ if status_code == 200
583
+ begin
584
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
585
+ result_mapper = SourceControlCollection.mapper()
586
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
587
+ rescue Exception => e
588
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
589
+ end
590
+ end
591
+
592
+ result
593
+ end
594
+
595
+ promise.execute
596
+ end
597
+
488
598
  end
489
599
  end
@@ -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
  #