azure_mgmt_resources_management 0.15.1 → 0.17.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/management_groups.rb +21 -18
  3. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +10 -8
  4. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/error_details.rb +4 -0
  5. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/error_response.rb +2 -0
  6. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group.rb +7 -0
  7. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb +5 -0
  8. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_details_properties.rb +6 -0
  9. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb +6 -0
  10. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb +5 -1
  11. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_recursive_child_info.rb +7 -0
  12. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_with_children.rb +9 -0
  13. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/management_group_with_hierarchy.rb +9 -0
  14. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/operation.rb +3 -0
  15. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/operation_display.rb +4 -0
  16. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb +5 -1
  17. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb +3 -0
  18. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/operations.rb +15 -13
  19. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management.rb +42 -0
  20. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_group_subscriptions.rb +209 -0
  21. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups.rb +698 -0
  22. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +137 -0
  23. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_request.rb +59 -0
  24. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/error_details.rb +57 -0
  25. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/error_response.rb +47 -0
  26. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group.rb +130 -0
  27. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb +91 -0
  28. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_details.rb +81 -0
  29. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb +98 -0
  30. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb +99 -0
  31. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation.rb +59 -0
  32. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation_display.rb +83 -0
  33. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb +103 -0
  34. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb +59 -0
  35. data/lib/{2017-08-31-preview/generated/azure_mgmt_resources_management/version.rb → 2017-11-01-preview/generated/azure_mgmt_resources_management/module_definition.rb} +4 -3
  36. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/operations.rb +219 -0
  37. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management.rb +56 -0
  38. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/entities.rb +257 -0
  39. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_group_subscriptions.rb +209 -0
  40. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_groups.rb +793 -0
  41. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +254 -0
  42. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_request.rb +60 -0
  43. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_result.rb +83 -0
  44. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_child_info.rb +131 -0
  45. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_details.rb +84 -0
  46. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_request.rb +153 -0
  47. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/create_parent_group_info.rb +72 -0
  48. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_hierarchy_item.rb +118 -0
  49. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_info.rb +121 -0
  50. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_list_result.rb +99 -0
  51. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/entity_parent_group_info.rb +48 -0
  52. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/error_details.rb +69 -0
  53. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/error_response.rb +47 -0
  54. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group.rb +150 -0
  55. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb +125 -0
  56. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_details.rb +81 -0
  57. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb +98 -0
  58. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb +99 -0
  59. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation.rb +59 -0
  60. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation_display_properties.rb +83 -0
  61. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb +103 -0
  62. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/operation_results.rb +86 -0
  63. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb +70 -0
  64. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/patch_management_group_request.rb +59 -0
  65. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/reason.rb +16 -0
  66. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/models/type.rb +15 -0
  67. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/module_definition.rb +9 -0
  68. data/lib/2018-01-01-preview/generated/azure_mgmt_resources_management/operations.rb +219 -0
  69. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management.rb +58 -0
  70. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/entities.rb +381 -0
  71. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_group_subscriptions.rb +202 -0
  72. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups.rb +799 -0
  73. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +401 -0
  74. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_request.rb +60 -0
  75. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/check_name_availability_result.rb +83 -0
  76. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_child_info.rb +131 -0
  77. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_details.rb +84 -0
  78. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_management_group_request.rb +153 -0
  79. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/create_parent_group_info.rb +72 -0
  80. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_hierarchy_item.rb +118 -0
  81. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_info.rb +210 -0
  82. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_list_result.rb +111 -0
  83. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/entity_parent_group_info.rb +48 -0
  84. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/error_details.rb +69 -0
  85. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/error_response.rb +47 -0
  86. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group.rb +150 -0
  87. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb +125 -0
  88. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_details.rb +81 -0
  89. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb +98 -0
  90. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb +99 -0
  91. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation.rb +59 -0
  92. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation_display_properties.rb +83 -0
  93. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb +103 -0
  94. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/operation_results.rb +86 -0
  95. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb +70 -0
  96. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/patch_management_group_request.rb +59 -0
  97. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/reason.rb +16 -0
  98. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/status.rb +20 -0
  99. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/tenant_backfill_status_result.rb +63 -0
  100. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/models/type.rb +15 -0
  101. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/module_definition.rb +9 -0
  102. data/lib/2018-03-01-preview/generated/azure_mgmt_resources_management/operations.rb +218 -0
  103. data/lib/azure_mgmt_resources_management.rb +3 -0
  104. data/lib/profiles/latest/modules/resourcesmanagement_profile_module.rb +144 -69
  105. data/lib/profiles/latest/resourcesmanagement_latest_profile_client.rb +28 -11
  106. data/lib/profiles/latest/resourcesmanagement_module_definition.rb +0 -1
  107. data/lib/version.rb +1 -1
  108. metadata +95 -9
  109. data/lib/profiles/common/configurable.rb +0 -86
  110. data/lib/profiles/common/default.rb +0 -57
@@ -0,0 +1,70 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ResourcesManagement::Mgmt::V2018_03_01_preview
7
+ module Models
8
+ #
9
+ # (Optional) The ID of the parent management group.
10
+ #
11
+ class ParentGroupInfo
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The fully qualified ID for the parent management
16
+ # group. For example,
17
+ # /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
18
+ attr_accessor :id
19
+
20
+ # @return [String] The name of the parent management group
21
+ attr_accessor :name
22
+
23
+ # @return [String] The friendly name of the parent management group.
24
+ attr_accessor :display_name
25
+
26
+
27
+ #
28
+ # Mapper for ParentGroupInfo class as Ruby Hash.
29
+ # This will be used for serialization/deserialization.
30
+ #
31
+ def self.mapper()
32
+ {
33
+ client_side_validation: true,
34
+ required: false,
35
+ serialized_name: 'ParentGroupInfo',
36
+ type: {
37
+ name: 'Composite',
38
+ class_name: 'ParentGroupInfo',
39
+ model_properties: {
40
+ id: {
41
+ client_side_validation: true,
42
+ required: false,
43
+ serialized_name: 'id',
44
+ type: {
45
+ name: 'String'
46
+ }
47
+ },
48
+ name: {
49
+ client_side_validation: true,
50
+ required: false,
51
+ serialized_name: 'name',
52
+ type: {
53
+ name: 'String'
54
+ }
55
+ },
56
+ display_name: {
57
+ client_side_validation: true,
58
+ required: false,
59
+ serialized_name: 'displayName',
60
+ type: {
61
+ name: 'String'
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,59 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ResourcesManagement::Mgmt::V2018_03_01_preview
7
+ module Models
8
+ #
9
+ # Management group patch parameters.
10
+ #
11
+ class PatchManagementGroupRequest
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The friendly name of the management group.
16
+ attr_accessor :display_name
17
+
18
+ # @return [String] (Optional) The fully qualified ID for the parent
19
+ # management group. For example,
20
+ # /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
21
+ attr_accessor :parent_id
22
+
23
+
24
+ #
25
+ # Mapper for PatchManagementGroupRequest class as Ruby Hash.
26
+ # This will be used for serialization/deserialization.
27
+ #
28
+ def self.mapper()
29
+ {
30
+ client_side_validation: true,
31
+ required: false,
32
+ serialized_name: 'PatchManagementGroupRequest',
33
+ type: {
34
+ name: 'Composite',
35
+ class_name: 'PatchManagementGroupRequest',
36
+ model_properties: {
37
+ display_name: {
38
+ client_side_validation: true,
39
+ required: false,
40
+ serialized_name: 'displayName',
41
+ type: {
42
+ name: 'String'
43
+ }
44
+ },
45
+ parent_id: {
46
+ client_side_validation: true,
47
+ required: false,
48
+ serialized_name: 'parentId',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ResourcesManagement::Mgmt::V2018_03_01_preview
7
+ module Models
8
+ #
9
+ # Defines values for Reason
10
+ #
11
+ module Reason
12
+ Invalid = "Invalid"
13
+ AlreadyExists = "AlreadyExists"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,20 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ResourcesManagement::Mgmt::V2018_03_01_preview
7
+ module Models
8
+ #
9
+ # Defines values for Status
10
+ #
11
+ module Status
12
+ NotStarted = "NotStarted"
13
+ NotStartedButGroupsExist = "NotStartedButGroupsExist"
14
+ Started = "Started"
15
+ Failed = "Failed"
16
+ Cancelled = "Cancelled"
17
+ Completed = "Completed"
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,63 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ResourcesManagement::Mgmt::V2018_03_01_preview
7
+ module Models
8
+ #
9
+ # The tenant backfill status
10
+ #
11
+ class TenantBackfillStatusResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The AAD Tenant ID associated with the management
16
+ # group. For example, 00000000-0000-0000-0000-000000000000
17
+ attr_accessor :tenant_id
18
+
19
+ # @return [Status] The status of the Tenant Backfill. Possible values
20
+ # include: 'NotStarted', 'NotStartedButGroupsExist', 'Started', 'Failed',
21
+ # 'Cancelled', 'Completed'
22
+ attr_accessor :status
23
+
24
+
25
+ #
26
+ # Mapper for TenantBackfillStatusResult class as Ruby Hash.
27
+ # This will be used for serialization/deserialization.
28
+ #
29
+ def self.mapper()
30
+ {
31
+ client_side_validation: true,
32
+ required: false,
33
+ serialized_name: 'TenantBackfillStatusResult',
34
+ type: {
35
+ name: 'Composite',
36
+ class_name: 'TenantBackfillStatusResult',
37
+ model_properties: {
38
+ tenant_id: {
39
+ client_side_validation: true,
40
+ required: false,
41
+ read_only: true,
42
+ serialized_name: 'tenantId',
43
+ type: {
44
+ name: 'String'
45
+ }
46
+ },
47
+ status: {
48
+ client_side_validation: true,
49
+ required: false,
50
+ read_only: true,
51
+ serialized_name: 'status',
52
+ type: {
53
+ name: 'Enum',
54
+ module: 'Status'
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,15 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ResourcesManagement::Mgmt::V2018_03_01_preview
7
+ module Models
8
+ #
9
+ # Defines values for Type
10
+ #
11
+ module Type
12
+ ProvidersMicrosoftManagementmanagementGroups = "/providers/Microsoft.Management/managementGroups"
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure end
7
+ module Azure::ResourcesManagement end
8
+ module Azure::ResourcesManagement::Mgmt end
9
+ module Azure::ResourcesManagement::Mgmt::V2018_03_01_preview end
@@ -0,0 +1,218 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ResourcesManagement::Mgmt::V2018_03_01_preview
7
+ #
8
+ # The Azure Management Groups API enables consolidation of multiple
9
+ # subscriptions/resources into an organizational hierarchy and centrally
10
+ # manage access control, policies, alerting and reporting for those
11
+ # resources.
12
+ #
13
+ class Operations
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the Operations class.
18
+ # @param client service class for accessing basic functionality.
19
+ #
20
+ def initialize(client)
21
+ @client = client
22
+ end
23
+
24
+ # @return [ManagementGroupsAPI] reference to the ManagementGroupsAPI
25
+ attr_reader :client
26
+
27
+ #
28
+ # Lists all of the available Management REST API operations.
29
+ #
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [Array<Operation>] operation results.
34
+ #
35
+ def list(custom_headers:nil)
36
+ first_page = list_as_lazy(custom_headers:custom_headers)
37
+ first_page.get_all_items
38
+ end
39
+
40
+ #
41
+ # Lists all of the available Management REST API operations.
42
+ #
43
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
44
+ # will be added to the HTTP request.
45
+ #
46
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
47
+ #
48
+ def list_with_http_info(custom_headers:nil)
49
+ list_async(custom_headers:custom_headers).value!
50
+ end
51
+
52
+ #
53
+ # Lists all of the available Management REST API operations.
54
+ #
55
+ # @param [Hash{String => String}] A hash of custom headers that will be added
56
+ # to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
+ #
60
+ def list_async(custom_headers:nil)
61
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
62
+
63
+
64
+ request_headers = {}
65
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
66
+
67
+ # Set Headers
68
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
69
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
70
+ path_template = 'providers/Microsoft.Management/operations'
71
+
72
+ request_url = @base_url || @client.base_url
73
+
74
+ options = {
75
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
76
+ query_params: {'api-version' => @client.api_version},
77
+ headers: request_headers.merge(custom_headers || {}),
78
+ base_url: request_url
79
+ }
80
+ promise = @client.make_request_async(:get, path_template, options)
81
+
82
+ promise = promise.then do |result|
83
+ http_response = result.response
84
+ status_code = http_response.status
85
+ response_content = http_response.body
86
+ unless status_code == 200
87
+ error_model = JSON.load(response_content)
88
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
89
+ end
90
+
91
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
92
+ # Deserialize Response
93
+ if status_code == 200
94
+ begin
95
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
96
+ result_mapper = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::OperationListResult.mapper()
97
+ result.body = @client.deserialize(result_mapper, parsed_response)
98
+ rescue Exception => e
99
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
100
+ end
101
+ end
102
+
103
+ result
104
+ end
105
+
106
+ promise.execute
107
+ end
108
+
109
+ #
110
+ # Lists all of the available Management REST API operations.
111
+ #
112
+ # @param next_page_link [String] The NextLink from the previous successful call
113
+ # to List operation.
114
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
115
+ # will be added to the HTTP request.
116
+ #
117
+ # @return [OperationListResult] operation results.
118
+ #
119
+ def list_next(next_page_link, custom_headers:nil)
120
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
121
+ response.body unless response.nil?
122
+ end
123
+
124
+ #
125
+ # Lists all of the available Management REST API operations.
126
+ #
127
+ # @param next_page_link [String] The NextLink from the previous successful call
128
+ # to List operation.
129
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
130
+ # will be added to the HTTP request.
131
+ #
132
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
133
+ #
134
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
135
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
136
+ end
137
+
138
+ #
139
+ # Lists all of the available Management REST API operations.
140
+ #
141
+ # @param next_page_link [String] The NextLink from the previous successful call
142
+ # to List operation.
143
+ # @param [Hash{String => String}] A hash of custom headers that will be added
144
+ # to the HTTP request.
145
+ #
146
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
147
+ #
148
+ def list_next_async(next_page_link, custom_headers:nil)
149
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
150
+
151
+
152
+ request_headers = {}
153
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
154
+
155
+ # Set Headers
156
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
157
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
158
+ path_template = '{nextLink}'
159
+
160
+ request_url = @base_url || @client.base_url
161
+
162
+ options = {
163
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
164
+ skip_encoding_path_params: {'nextLink' => next_page_link},
165
+ headers: request_headers.merge(custom_headers || {}),
166
+ base_url: request_url
167
+ }
168
+ promise = @client.make_request_async(:get, path_template, options)
169
+
170
+ promise = promise.then do |result|
171
+ http_response = result.response
172
+ status_code = http_response.status
173
+ response_content = http_response.body
174
+ unless status_code == 200
175
+ error_model = JSON.load(response_content)
176
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
177
+ end
178
+
179
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
180
+ # Deserialize Response
181
+ if status_code == 200
182
+ begin
183
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
184
+ result_mapper = Azure::ResourcesManagement::Mgmt::V2018_03_01_preview::Models::OperationListResult.mapper()
185
+ result.body = @client.deserialize(result_mapper, parsed_response)
186
+ rescue Exception => e
187
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
188
+ end
189
+ end
190
+
191
+ result
192
+ end
193
+
194
+ promise.execute
195
+ end
196
+
197
+ #
198
+ # Lists all of the available Management REST API operations.
199
+ #
200
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
201
+ # will be added to the HTTP request.
202
+ #
203
+ # @return [OperationListResult] which provide lazy access to pages of the
204
+ # response.
205
+ #
206
+ def list_as_lazy(custom_headers:nil)
207
+ response = list_async(custom_headers:custom_headers).value!
208
+ unless response.nil?
209
+ page = response.body
210
+ page.next_method = Proc.new do |next_page_link|
211
+ list_next_async(next_page_link, custom_headers:custom_headers)
212
+ end
213
+ page
214
+ end
215
+ end
216
+
217
+ end
218
+ end