azure_mgmt_logic 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_logic.rb +100 -12
  3. data/lib/generated/azure_mgmt_logic/integration_account_agreements.rb +534 -0
  4. data/lib/generated/azure_mgmt_logic/integration_account_certificates.rb +530 -0
  5. data/lib/generated/azure_mgmt_logic/integration_account_maps.rb +531 -0
  6. data/lib/generated/azure_mgmt_logic/integration_account_partners.rb +531 -0
  7. data/lib/generated/azure_mgmt_logic/integration_account_schemas.rb +531 -0
  8. data/lib/generated/azure_mgmt_logic/integration_accounts.rb +912 -0
  9. data/lib/generated/azure_mgmt_logic/logic_management_client.rb +38 -5
  10. data/lib/generated/azure_mgmt_logic/models/agreement_content.rb +68 -0
  11. data/lib/generated/azure_mgmt_logic/models/agreement_type.rb +18 -0
  12. data/lib/generated/azure_mgmt_logic/models/as2acknowledgement_connection_settings.rb +79 -0
  13. data/lib/generated/azure_mgmt_logic/models/as2agreement_content.rb +57 -0
  14. data/lib/generated/azure_mgmt_logic/models/as2envelope_settings.rb +88 -0
  15. data/lib/generated/azure_mgmt_logic/models/as2error_settings.rb +57 -0
  16. data/lib/generated/azure_mgmt_logic/models/as2mdn_settings.rb +132 -0
  17. data/lib/generated/azure_mgmt_logic/models/as2message_connection_settings.rb +79 -0
  18. data/lib/generated/azure_mgmt_logic/models/as2one_way_agreement.rb +68 -0
  19. data/lib/generated/azure_mgmt_logic/models/as2protocol_settings.rb +113 -0
  20. data/lib/generated/azure_mgmt_logic/models/as2security_settings.rb +132 -0
  21. data/lib/generated/azure_mgmt_logic/models/as2validation_settings.rb +136 -0
  22. data/lib/generated/azure_mgmt_logic/models/b2bpartner_content.rb +54 -0
  23. data/lib/generated/azure_mgmt_logic/models/business_identity.rb +55 -0
  24. data/lib/generated/azure_mgmt_logic/models/callback_url.rb +45 -0
  25. data/lib/generated/azure_mgmt_logic/models/content_hash.rb +2 -1
  26. data/lib/generated/azure_mgmt_logic/models/content_link.rb +2 -1
  27. data/lib/generated/azure_mgmt_logic/models/correlation.rb +2 -1
  28. data/lib/generated/azure_mgmt_logic/models/day_of_week.rb +1 -1
  29. data/lib/generated/azure_mgmt_logic/models/days_of_week.rb +1 -1
  30. data/lib/generated/azure_mgmt_logic/models/edifact_acknowledgement_settings.rb +152 -0
  31. data/lib/generated/azure_mgmt_logic/models/edifact_agreement_content.rb +57 -0
  32. data/lib/generated/azure_mgmt_logic/models/edifact_character_set.rb +29 -0
  33. data/lib/generated/azure_mgmt_logic/models/edifact_decimal_indicator.rb +17 -0
  34. data/lib/generated/azure_mgmt_logic/models/edifact_delimiter_override.rb +160 -0
  35. data/lib/generated/azure_mgmt_logic/models/edifact_envelope_override.rb +189 -0
  36. data/lib/generated/azure_mgmt_logic/models/edifact_envelope_settings.rb +453 -0
  37. data/lib/generated/azure_mgmt_logic/models/edifact_framing_settings.rb +154 -0
  38. data/lib/generated/azure_mgmt_logic/models/edifact_message_filter.rb +47 -0
  39. data/lib/generated/azure_mgmt_logic/models/edifact_message_identifier.rb +46 -0
  40. data/lib/generated/azure_mgmt_logic/models/edifact_one_way_agreement.rb +68 -0
  41. data/lib/generated/azure_mgmt_logic/models/edifact_processing_settings.rb +89 -0
  42. data/lib/generated/azure_mgmt_logic/models/edifact_protocol_settings.rb +196 -0
  43. data/lib/generated/azure_mgmt_logic/models/edifact_schema_reference.rb +105 -0
  44. data/lib/generated/azure_mgmt_logic/models/edifact_validation_override.rb +112 -0
  45. data/lib/generated/azure_mgmt_logic/models/edifact_validation_settings.rb +146 -0
  46. data/lib/generated/azure_mgmt_logic/models/encryption_algorithm.rb +21 -0
  47. data/lib/generated/azure_mgmt_logic/models/generate_upgraded_definition_parameters.rb +2 -1
  48. data/lib/generated/azure_mgmt_logic/models/hashing_algorithm.rb +19 -0
  49. data/lib/generated/azure_mgmt_logic/models/integration_account.rb +98 -0
  50. data/lib/generated/azure_mgmt_logic/models/integration_account_agreement.rb +174 -0
  51. data/lib/generated/azure_mgmt_logic/models/integration_account_agreement_filter.rb +48 -0
  52. data/lib/generated/azure_mgmt_logic/models/integration_account_agreement_list_result.rb +94 -0
  53. data/lib/generated/azure_mgmt_logic/models/integration_account_certificate.rb +130 -0
  54. data/lib/generated/azure_mgmt_logic/models/integration_account_certificate_list_result.rb +95 -0
  55. data/lib/generated/azure_mgmt_logic/models/integration_account_content_hash.rb +55 -0
  56. data/lib/generated/azure_mgmt_logic/models/integration_account_content_link.rb +86 -0
  57. data/lib/generated/azure_mgmt_logic/models/integration_account_list_result.rb +93 -0
  58. data/lib/generated/azure_mgmt_logic/models/integration_account_map.rb +153 -0
  59. data/lib/generated/azure_mgmt_logic/models/integration_account_map_filter.rb +47 -0
  60. data/lib/generated/azure_mgmt_logic/models/integration_account_map_list_result.rb +94 -0
  61. data/lib/generated/azure_mgmt_logic/models/integration_account_partner.rb +132 -0
  62. data/lib/generated/azure_mgmt_logic/models/integration_account_partner_filter.rb +47 -0
  63. data/lib/generated/azure_mgmt_logic/models/integration_account_partner_list_result.rb +94 -0
  64. data/lib/generated/azure_mgmt_logic/models/integration_account_resource.rb +92 -0
  65. data/lib/generated/azure_mgmt_logic/models/integration_account_schema.rb +163 -0
  66. data/lib/generated/azure_mgmt_logic/models/integration_account_schema_filter.rb +47 -0
  67. data/lib/generated/azure_mgmt_logic/models/integration_account_schema_list_result.rb +94 -0
  68. data/lib/generated/azure_mgmt_logic/models/integration_account_sku.rb +47 -0
  69. data/lib/generated/azure_mgmt_logic/models/key_type.rb +1 -1
  70. data/lib/generated/azure_mgmt_logic/models/key_vault_key_reference.rb +66 -0
  71. data/lib/generated/azure_mgmt_logic/models/key_vault_key_reference_key_vault.rb +66 -0
  72. data/lib/generated/azure_mgmt_logic/models/list_callback_url_parameters.rb +45 -0
  73. data/lib/generated/azure_mgmt_logic/models/map_type.rb +16 -0
  74. data/lib/generated/azure_mgmt_logic/models/message_filter_type.rb +17 -0
  75. data/lib/generated/azure_mgmt_logic/models/parameter_type.rb +1 -1
  76. data/lib/generated/azure_mgmt_logic/models/partner_content.rb +46 -0
  77. data/lib/generated/azure_mgmt_logic/models/partner_type.rb +16 -0
  78. data/lib/generated/azure_mgmt_logic/models/recurrence_frequency.rb +1 -1
  79. data/lib/generated/azure_mgmt_logic/models/recurrence_schedule.rb +2 -1
  80. data/lib/generated/azure_mgmt_logic/models/recurrence_schedule_occurrence.rb +2 -1
  81. data/lib/generated/azure_mgmt_logic/models/resource_reference.rb +2 -1
  82. data/lib/generated/azure_mgmt_logic/models/schema_type.rb +16 -0
  83. data/lib/generated/azure_mgmt_logic/models/segment_terminator_suffix.rb +19 -0
  84. data/lib/generated/azure_mgmt_logic/models/sku.rb +2 -1
  85. data/lib/generated/azure_mgmt_logic/models/sku_name.rb +1 -1
  86. data/lib/generated/azure_mgmt_logic/models/trailing_separator_policy.rb +18 -0
  87. data/lib/generated/azure_mgmt_logic/models/usage_indicator.rb +18 -0
  88. data/lib/generated/azure_mgmt_logic/models/workflow.rb +2 -1
  89. data/lib/generated/azure_mgmt_logic/models/workflow_filter.rb +4 -3
  90. data/lib/generated/azure_mgmt_logic/models/workflow_list_result.rb +1 -1
  91. data/lib/generated/azure_mgmt_logic/models/workflow_output_parameter.rb +2 -1
  92. data/lib/generated/azure_mgmt_logic/models/workflow_parameter.rb +2 -1
  93. data/lib/generated/azure_mgmt_logic/models/workflow_provisioning_state.rb +1 -1
  94. data/lib/generated/azure_mgmt_logic/models/workflow_run.rb +5 -4
  95. data/lib/generated/azure_mgmt_logic/models/workflow_run_action.rb +5 -4
  96. data/lib/generated/azure_mgmt_logic/models/workflow_run_action_filter.rb +4 -3
  97. data/lib/generated/azure_mgmt_logic/models/workflow_run_action_list_result.rb +1 -1
  98. data/lib/generated/azure_mgmt_logic/models/workflow_run_filter.rb +2 -1
  99. data/lib/generated/azure_mgmt_logic/models/workflow_run_list_result.rb +1 -1
  100. data/lib/generated/azure_mgmt_logic/models/workflow_run_trigger.rb +5 -4
  101. data/lib/generated/azure_mgmt_logic/models/workflow_state.rb +1 -1
  102. data/lib/generated/azure_mgmt_logic/models/workflow_status.rb +1 -1
  103. data/lib/generated/azure_mgmt_logic/models/workflow_trigger.rb +10 -10
  104. data/lib/generated/azure_mgmt_logic/models/workflow_trigger_callback_url.rb +2 -1
  105. data/lib/generated/azure_mgmt_logic/models/workflow_trigger_filter.rb +4 -3
  106. data/lib/generated/azure_mgmt_logic/models/workflow_trigger_history.rb +5 -4
  107. data/lib/generated/azure_mgmt_logic/models/workflow_trigger_history_filter.rb +4 -3
  108. data/lib/generated/azure_mgmt_logic/models/workflow_trigger_history_list_result.rb +1 -1
  109. data/lib/generated/azure_mgmt_logic/models/workflow_trigger_list_result.rb +1 -1
  110. data/lib/generated/azure_mgmt_logic/models/workflow_trigger_provisioning_state.rb +1 -1
  111. data/lib/generated/azure_mgmt_logic/models/workflow_trigger_recurrence.rb +2 -1
  112. data/lib/generated/azure_mgmt_logic/models/workflow_version.rb +2 -1
  113. data/lib/generated/azure_mgmt_logic/models/workflow_version_list_result.rb +1 -1
  114. data/lib/generated/azure_mgmt_logic/models/x12acknowledgement_settings.rb +194 -0
  115. data/lib/generated/azure_mgmt_logic/models/x12agreement_content.rb +57 -0
  116. data/lib/generated/azure_mgmt_logic/models/x12character_set.rb +18 -0
  117. data/lib/generated/azure_mgmt_logic/models/x12date_format.rb +17 -0
  118. data/lib/generated/azure_mgmt_logic/models/x12delimiter_overrides.rb +129 -0
  119. data/lib/generated/azure_mgmt_logic/models/x12envelope_override.rb +142 -0
  120. data/lib/generated/azure_mgmt_logic/models/x12envelope_settings.rb +287 -0
  121. data/lib/generated/azure_mgmt_logic/models/x12framing_settings.rb +110 -0
  122. data/lib/generated/azure_mgmt_logic/models/x12message_filter.rb +47 -0
  123. data/lib/generated/azure_mgmt_logic/models/x12message_identifier.rb +45 -0
  124. data/lib/generated/azure_mgmt_logic/models/x12one_way_agreement.rb +68 -0
  125. data/lib/generated/azure_mgmt_logic/models/x12processing_settings.rb +100 -0
  126. data/lib/generated/azure_mgmt_logic/models/x12protocol_settings.rb +205 -0
  127. data/lib/generated/azure_mgmt_logic/models/x12schema_reference.rb +75 -0
  128. data/lib/generated/azure_mgmt_logic/models/x12security_settings.rb +75 -0
  129. data/lib/generated/azure_mgmt_logic/models/x12time_format.rb +19 -0
  130. data/lib/generated/azure_mgmt_logic/models/x12validation_override.rb +112 -0
  131. data/lib/generated/azure_mgmt_logic/models/x12validation_settings.rb +146 -0
  132. data/lib/generated/azure_mgmt_logic/module_definition.rb +1 -1
  133. data/lib/generated/azure_mgmt_logic/version.rb +2 -2
  134. data/lib/generated/azure_mgmt_logic/workflow_run_actions.rb +37 -37
  135. data/lib/generated/azure_mgmt_logic/workflow_runs.rb +38 -38
  136. data/lib/generated/azure_mgmt_logic/workflow_trigger_histories.rb +37 -37
  137. data/lib/generated/azure_mgmt_logic/workflow_triggers.rb +40 -40
  138. data/lib/generated/azure_mgmt_logic/workflow_versions.rb +35 -35
  139. data/lib/generated/azure_mgmt_logic/workflows.rb +79 -79
  140. metadata +92 -4
@@ -0,0 +1,912 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Logic
7
+ #
8
+ # Composite Swagger for Logic Management Client
9
+ #
10
+ class IntegrationAccounts
11
+ include Azure::ARM::Logic::Models
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the IntegrationAccounts class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return [LogicManagementClient] reference to the LogicManagementClient
23
+ attr_reader :client
24
+
25
+ #
26
+ # Gets a list of integration accounts by subscription.
27
+ #
28
+ # @param top [Integer] The number of items to be included in the result.
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [Array<IntegrationAccount>] operation results.
33
+ #
34
+ def list_by_subscription(top = nil, custom_headers = nil)
35
+ first_page = list_by_subscription_as_lazy(top, custom_headers)
36
+ first_page.get_all_items
37
+ end
38
+
39
+ #
40
+ # Gets a list of integration accounts by subscription.
41
+ #
42
+ # @param top [Integer] The number of items to be included in the result.
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_by_subscription_with_http_info(top = nil, custom_headers = nil)
49
+ list_by_subscription_async(top, custom_headers).value!
50
+ end
51
+
52
+ #
53
+ # Gets a list of integration accounts by subscription.
54
+ #
55
+ # @param top [Integer] The number of items to be included in the result.
56
+ # @param [Hash{String => String}] A hash of custom headers that will be added
57
+ # to the HTTP request.
58
+ #
59
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
60
+ #
61
+ def list_by_subscription_async(top = nil, custom_headers = nil)
62
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
63
+ api_version = '2015-08-01-preview'
64
+
65
+
66
+ request_headers = {}
67
+
68
+ # Set Headers
69
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
70
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
71
+ path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts'
72
+
73
+ request_url = @base_url || @client.base_url
74
+
75
+ options = {
76
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
77
+ path_params: {'subscriptionId' => @client.subscription_id},
78
+ query_params: {'api-version' => api_version,'$top' => top},
79
+ headers: request_headers.merge(custom_headers || {}),
80
+ base_url: request_url
81
+ }
82
+ promise = @client.make_request_async(:get, path_template, options)
83
+
84
+ promise = promise.then do |result|
85
+ http_response = result.response
86
+ status_code = http_response.status
87
+ response_content = http_response.body
88
+ unless status_code == 200
89
+ error_model = JSON.load(response_content)
90
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
91
+ end
92
+
93
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
94
+ # Deserialize Response
95
+ if status_code == 200
96
+ begin
97
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
98
+ result_mapper = IntegrationAccountListResult.mapper()
99
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
100
+ rescue Exception => e
101
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
102
+ end
103
+ end
104
+
105
+ result
106
+ end
107
+
108
+ promise.execute
109
+ end
110
+
111
+ #
112
+ # Gets a list of integration accounts by resource group.
113
+ #
114
+ # @param resource_group_name [String] The resource group name.
115
+ # @param top [Integer] The number of items to be included in the result.
116
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
117
+ # will be added to the HTTP request.
118
+ #
119
+ # @return [Array<IntegrationAccount>] operation results.
120
+ #
121
+ def list_by_resource_group(resource_group_name, top = nil, custom_headers = nil)
122
+ first_page = list_by_resource_group_as_lazy(resource_group_name, top, custom_headers)
123
+ first_page.get_all_items
124
+ end
125
+
126
+ #
127
+ # Gets a list of integration accounts by resource group.
128
+ #
129
+ # @param resource_group_name [String] The resource group name.
130
+ # @param top [Integer] The number of items to be included in the result.
131
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
132
+ # will be added to the HTTP request.
133
+ #
134
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
135
+ #
136
+ def list_by_resource_group_with_http_info(resource_group_name, top = nil, custom_headers = nil)
137
+ list_by_resource_group_async(resource_group_name, top, custom_headers).value!
138
+ end
139
+
140
+ #
141
+ # Gets a list of integration accounts by resource group.
142
+ #
143
+ # @param resource_group_name [String] The resource group name.
144
+ # @param top [Integer] The number of items to be included in the result.
145
+ # @param [Hash{String => String}] A hash of custom headers that will be added
146
+ # to the HTTP request.
147
+ #
148
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
149
+ #
150
+ def list_by_resource_group_async(resource_group_name, top = nil, custom_headers = nil)
151
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
152
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
153
+ api_version = '2015-08-01-preview'
154
+
155
+
156
+ request_headers = {}
157
+
158
+ # Set Headers
159
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
160
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
161
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts'
162
+
163
+ request_url = @base_url || @client.base_url
164
+
165
+ options = {
166
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
167
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
168
+ query_params: {'api-version' => api_version,'$top' => top},
169
+ headers: request_headers.merge(custom_headers || {}),
170
+ base_url: request_url
171
+ }
172
+ promise = @client.make_request_async(:get, path_template, options)
173
+
174
+ promise = promise.then do |result|
175
+ http_response = result.response
176
+ status_code = http_response.status
177
+ response_content = http_response.body
178
+ unless status_code == 200
179
+ error_model = JSON.load(response_content)
180
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
181
+ end
182
+
183
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
184
+ # Deserialize Response
185
+ if status_code == 200
186
+ begin
187
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
188
+ result_mapper = IntegrationAccountListResult.mapper()
189
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
190
+ rescue Exception => e
191
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
192
+ end
193
+ end
194
+
195
+ result
196
+ end
197
+
198
+ promise.execute
199
+ end
200
+
201
+ #
202
+ # Gets an integration account.
203
+ #
204
+ # @param resource_group_name [String] The resource group name.
205
+ # @param integration_account_name [String] The integration account name.
206
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
207
+ # will be added to the HTTP request.
208
+ #
209
+ # @return [IntegrationAccount] operation results.
210
+ #
211
+ def get(resource_group_name, integration_account_name, custom_headers = nil)
212
+ response = get_async(resource_group_name, integration_account_name, custom_headers).value!
213
+ response.body unless response.nil?
214
+ end
215
+
216
+ #
217
+ # Gets an integration account.
218
+ #
219
+ # @param resource_group_name [String] The resource group name.
220
+ # @param integration_account_name [String] The integration account name.
221
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
222
+ # will be added to the HTTP request.
223
+ #
224
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
225
+ #
226
+ def get_with_http_info(resource_group_name, integration_account_name, custom_headers = nil)
227
+ get_async(resource_group_name, integration_account_name, custom_headers).value!
228
+ end
229
+
230
+ #
231
+ # Gets an integration account.
232
+ #
233
+ # @param resource_group_name [String] The resource group name.
234
+ # @param integration_account_name [String] The integration account name.
235
+ # @param [Hash{String => String}] A hash of custom headers that will be added
236
+ # to the HTTP request.
237
+ #
238
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
239
+ #
240
+ def get_async(resource_group_name, integration_account_name, custom_headers = nil)
241
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
242
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
243
+ fail ArgumentError, 'integration_account_name is nil' if integration_account_name.nil?
244
+ api_version = '2015-08-01-preview'
245
+
246
+
247
+ request_headers = {}
248
+
249
+ # Set Headers
250
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
251
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
252
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'
253
+
254
+ request_url = @base_url || @client.base_url
255
+
256
+ options = {
257
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
258
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => integration_account_name},
259
+ query_params: {'api-version' => api_version},
260
+ headers: request_headers.merge(custom_headers || {}),
261
+ base_url: request_url
262
+ }
263
+ promise = @client.make_request_async(:get, path_template, options)
264
+
265
+ promise = promise.then do |result|
266
+ http_response = result.response
267
+ status_code = http_response.status
268
+ response_content = http_response.body
269
+ unless status_code == 200
270
+ error_model = JSON.load(response_content)
271
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
272
+ end
273
+
274
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
275
+ # Deserialize Response
276
+ if status_code == 200
277
+ begin
278
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
279
+ result_mapper = IntegrationAccount.mapper()
280
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
281
+ rescue Exception => e
282
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
283
+ end
284
+ end
285
+
286
+ result
287
+ end
288
+
289
+ promise.execute
290
+ end
291
+
292
+ #
293
+ # Creates or updates an integration account.
294
+ #
295
+ # @param resource_group_name [String] The resource group name.
296
+ # @param integration_account_name [String] The integration account name.
297
+ # @param integration_account [IntegrationAccount] The integration account.
298
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
299
+ # will be added to the HTTP request.
300
+ #
301
+ # @return [IntegrationAccount] operation results.
302
+ #
303
+ def create_or_update(resource_group_name, integration_account_name, integration_account, custom_headers = nil)
304
+ response = create_or_update_async(resource_group_name, integration_account_name, integration_account, custom_headers).value!
305
+ response.body unless response.nil?
306
+ end
307
+
308
+ #
309
+ # Creates or updates an integration account.
310
+ #
311
+ # @param resource_group_name [String] The resource group name.
312
+ # @param integration_account_name [String] The integration account name.
313
+ # @param integration_account [IntegrationAccount] The integration account.
314
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
315
+ # will be added to the HTTP request.
316
+ #
317
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
318
+ #
319
+ def create_or_update_with_http_info(resource_group_name, integration_account_name, integration_account, custom_headers = nil)
320
+ create_or_update_async(resource_group_name, integration_account_name, integration_account, custom_headers).value!
321
+ end
322
+
323
+ #
324
+ # Creates or updates an integration account.
325
+ #
326
+ # @param resource_group_name [String] The resource group name.
327
+ # @param integration_account_name [String] The integration account name.
328
+ # @param integration_account [IntegrationAccount] The integration account.
329
+ # @param [Hash{String => String}] A hash of custom headers that will be added
330
+ # to the HTTP request.
331
+ #
332
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
333
+ #
334
+ def create_or_update_async(resource_group_name, integration_account_name, integration_account, custom_headers = nil)
335
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
336
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
337
+ fail ArgumentError, 'integration_account_name is nil' if integration_account_name.nil?
338
+ api_version = '2015-08-01-preview'
339
+ fail ArgumentError, 'integration_account is nil' if integration_account.nil?
340
+
341
+
342
+ request_headers = {}
343
+
344
+ # Set Headers
345
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
346
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
347
+
348
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
349
+
350
+ # Serialize Request
351
+ request_mapper = IntegrationAccount.mapper()
352
+ request_content = @client.serialize(request_mapper, integration_account, 'integration_account')
353
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
354
+
355
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'
356
+
357
+ request_url = @base_url || @client.base_url
358
+
359
+ options = {
360
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
361
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => integration_account_name},
362
+ query_params: {'api-version' => api_version},
363
+ body: request_content,
364
+ headers: request_headers.merge(custom_headers || {}),
365
+ base_url: request_url
366
+ }
367
+ promise = @client.make_request_async(:put, path_template, options)
368
+
369
+ promise = promise.then do |result|
370
+ http_response = result.response
371
+ status_code = http_response.status
372
+ response_content = http_response.body
373
+ unless status_code == 200 || status_code == 201
374
+ error_model = JSON.load(response_content)
375
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
376
+ end
377
+
378
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
379
+ # Deserialize Response
380
+ if status_code == 200
381
+ begin
382
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
383
+ result_mapper = IntegrationAccount.mapper()
384
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
385
+ rescue Exception => e
386
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
387
+ end
388
+ end
389
+ # Deserialize Response
390
+ if status_code == 201
391
+ begin
392
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
393
+ result_mapper = IntegrationAccount.mapper()
394
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
395
+ rescue Exception => e
396
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
397
+ end
398
+ end
399
+
400
+ result
401
+ end
402
+
403
+ promise.execute
404
+ end
405
+
406
+ #
407
+ # Updates an integration account.
408
+ #
409
+ # @param resource_group_name [String] The resource group name.
410
+ # @param integration_account_name [String] The integration account name.
411
+ # @param integration_account [IntegrationAccount] The integration account.
412
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
413
+ # will be added to the HTTP request.
414
+ #
415
+ # @return [IntegrationAccount] operation results.
416
+ #
417
+ def update(resource_group_name, integration_account_name, integration_account, custom_headers = nil)
418
+ response = update_async(resource_group_name, integration_account_name, integration_account, custom_headers).value!
419
+ response.body unless response.nil?
420
+ end
421
+
422
+ #
423
+ # Updates an integration account.
424
+ #
425
+ # @param resource_group_name [String] The resource group name.
426
+ # @param integration_account_name [String] The integration account name.
427
+ # @param integration_account [IntegrationAccount] The integration account.
428
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
429
+ # will be added to the HTTP request.
430
+ #
431
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
432
+ #
433
+ def update_with_http_info(resource_group_name, integration_account_name, integration_account, custom_headers = nil)
434
+ update_async(resource_group_name, integration_account_name, integration_account, custom_headers).value!
435
+ end
436
+
437
+ #
438
+ # Updates an integration account.
439
+ #
440
+ # @param resource_group_name [String] The resource group name.
441
+ # @param integration_account_name [String] The integration account name.
442
+ # @param integration_account [IntegrationAccount] The integration account.
443
+ # @param [Hash{String => String}] A hash of custom headers that will be added
444
+ # to the HTTP request.
445
+ #
446
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
447
+ #
448
+ def update_async(resource_group_name, integration_account_name, integration_account, custom_headers = nil)
449
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
450
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
451
+ fail ArgumentError, 'integration_account_name is nil' if integration_account_name.nil?
452
+ api_version = '2015-08-01-preview'
453
+ fail ArgumentError, 'integration_account is nil' if integration_account.nil?
454
+
455
+
456
+ request_headers = {}
457
+
458
+ # Set Headers
459
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
460
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
461
+
462
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
463
+
464
+ # Serialize Request
465
+ request_mapper = IntegrationAccount.mapper()
466
+ request_content = @client.serialize(request_mapper, integration_account, 'integration_account')
467
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
468
+
469
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'
470
+
471
+ request_url = @base_url || @client.base_url
472
+
473
+ options = {
474
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
475
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => integration_account_name},
476
+ query_params: {'api-version' => api_version},
477
+ body: request_content,
478
+ headers: request_headers.merge(custom_headers || {}),
479
+ base_url: request_url
480
+ }
481
+ promise = @client.make_request_async(:patch, path_template, options)
482
+
483
+ promise = promise.then do |result|
484
+ http_response = result.response
485
+ status_code = http_response.status
486
+ response_content = http_response.body
487
+ unless status_code == 200
488
+ error_model = JSON.load(response_content)
489
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
490
+ end
491
+
492
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
493
+ # Deserialize Response
494
+ if status_code == 200
495
+ begin
496
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
497
+ result_mapper = IntegrationAccount.mapper()
498
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
499
+ rescue Exception => e
500
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
501
+ end
502
+ end
503
+
504
+ result
505
+ end
506
+
507
+ promise.execute
508
+ end
509
+
510
+ #
511
+ # Deletes an integration account.
512
+ #
513
+ # @param resource_group_name [String] The resource group name.
514
+ # @param integration_account_name [String] The integration account name.
515
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
516
+ # will be added to the HTTP request.
517
+ #
518
+ #
519
+ def delete(resource_group_name, integration_account_name, custom_headers = nil)
520
+ response = delete_async(resource_group_name, integration_account_name, custom_headers).value!
521
+ nil
522
+ end
523
+
524
+ #
525
+ # Deletes an integration account.
526
+ #
527
+ # @param resource_group_name [String] The resource group name.
528
+ # @param integration_account_name [String] The integration account name.
529
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
530
+ # will be added to the HTTP request.
531
+ #
532
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
533
+ #
534
+ def delete_with_http_info(resource_group_name, integration_account_name, custom_headers = nil)
535
+ delete_async(resource_group_name, integration_account_name, custom_headers).value!
536
+ end
537
+
538
+ #
539
+ # Deletes an integration account.
540
+ #
541
+ # @param resource_group_name [String] The resource group name.
542
+ # @param integration_account_name [String] The integration account name.
543
+ # @param [Hash{String => String}] A hash of custom headers that will be added
544
+ # to the HTTP request.
545
+ #
546
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
547
+ #
548
+ def delete_async(resource_group_name, integration_account_name, custom_headers = nil)
549
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
550
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
551
+ fail ArgumentError, 'integration_account_name is nil' if integration_account_name.nil?
552
+ api_version = '2015-08-01-preview'
553
+
554
+
555
+ request_headers = {}
556
+
557
+ # Set Headers
558
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
559
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
560
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'
561
+
562
+ request_url = @base_url || @client.base_url
563
+
564
+ options = {
565
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
566
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => integration_account_name},
567
+ query_params: {'api-version' => api_version},
568
+ headers: request_headers.merge(custom_headers || {}),
569
+ base_url: request_url
570
+ }
571
+ promise = @client.make_request_async(:delete, path_template, options)
572
+
573
+ promise = promise.then do |result|
574
+ http_response = result.response
575
+ status_code = http_response.status
576
+ response_content = http_response.body
577
+ unless status_code == 200 || status_code == 204
578
+ error_model = JSON.load(response_content)
579
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
580
+ end
581
+
582
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
583
+
584
+ result
585
+ end
586
+
587
+ promise.execute
588
+ end
589
+
590
+ #
591
+ # Lists the integration account callback URL.
592
+ #
593
+ # @param resource_group_name [String] The resource group name.
594
+ # @param integration_account_name [String] The integration account name.
595
+ # @param parameters [ListCallbackUrlParameters] The callback URL parameters.
596
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
597
+ # will be added to the HTTP request.
598
+ #
599
+ # @return [CallbackUrl] operation results.
600
+ #
601
+ def list_callback_url(resource_group_name, integration_account_name, parameters, custom_headers = nil)
602
+ response = list_callback_url_async(resource_group_name, integration_account_name, parameters, custom_headers).value!
603
+ response.body unless response.nil?
604
+ end
605
+
606
+ #
607
+ # Lists the integration account callback URL.
608
+ #
609
+ # @param resource_group_name [String] The resource group name.
610
+ # @param integration_account_name [String] The integration account name.
611
+ # @param parameters [ListCallbackUrlParameters] The callback URL parameters.
612
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
613
+ # will be added to the HTTP request.
614
+ #
615
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
616
+ #
617
+ def list_callback_url_with_http_info(resource_group_name, integration_account_name, parameters, custom_headers = nil)
618
+ list_callback_url_async(resource_group_name, integration_account_name, parameters, custom_headers).value!
619
+ end
620
+
621
+ #
622
+ # Lists the integration account callback URL.
623
+ #
624
+ # @param resource_group_name [String] The resource group name.
625
+ # @param integration_account_name [String] The integration account name.
626
+ # @param parameters [ListCallbackUrlParameters] The callback URL parameters.
627
+ # @param [Hash{String => String}] A hash of custom headers that will be added
628
+ # to the HTTP request.
629
+ #
630
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
631
+ #
632
+ def list_callback_url_async(resource_group_name, integration_account_name, parameters, custom_headers = nil)
633
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
634
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
635
+ fail ArgumentError, 'integration_account_name is nil' if integration_account_name.nil?
636
+ api_version = '2015-08-01-preview'
637
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
638
+
639
+
640
+ request_headers = {}
641
+
642
+ # Set Headers
643
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
644
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
645
+
646
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
647
+
648
+ # Serialize Request
649
+ request_mapper = ListCallbackUrlParameters.mapper()
650
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
651
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
652
+
653
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl'
654
+
655
+ request_url = @base_url || @client.base_url
656
+
657
+ options = {
658
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
659
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => integration_account_name},
660
+ query_params: {'api-version' => api_version},
661
+ body: request_content,
662
+ headers: request_headers.merge(custom_headers || {}),
663
+ base_url: request_url
664
+ }
665
+ promise = @client.make_request_async(:post, path_template, options)
666
+
667
+ promise = promise.then do |result|
668
+ http_response = result.response
669
+ status_code = http_response.status
670
+ response_content = http_response.body
671
+ unless status_code == 200
672
+ error_model = JSON.load(response_content)
673
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
674
+ end
675
+
676
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
677
+ # Deserialize Response
678
+ if status_code == 200
679
+ begin
680
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
681
+ result_mapper = CallbackUrl.mapper()
682
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
683
+ rescue Exception => e
684
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
685
+ end
686
+ end
687
+
688
+ result
689
+ end
690
+
691
+ promise.execute
692
+ end
693
+
694
+ #
695
+ # Gets a list of integration accounts by subscription.
696
+ #
697
+ # @param next_page_link [String] The NextLink from the previous successful call
698
+ # to List operation.
699
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
700
+ # will be added to the HTTP request.
701
+ #
702
+ # @return [IntegrationAccountListResult] operation results.
703
+ #
704
+ def list_by_subscription_next(next_page_link, custom_headers = nil)
705
+ response = list_by_subscription_next_async(next_page_link, custom_headers).value!
706
+ response.body unless response.nil?
707
+ end
708
+
709
+ #
710
+ # Gets a list of integration accounts by subscription.
711
+ #
712
+ # @param next_page_link [String] The NextLink from the previous successful call
713
+ # to List operation.
714
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
715
+ # will be added to the HTTP request.
716
+ #
717
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
718
+ #
719
+ def list_by_subscription_next_with_http_info(next_page_link, custom_headers = nil)
720
+ list_by_subscription_next_async(next_page_link, custom_headers).value!
721
+ end
722
+
723
+ #
724
+ # Gets a list of integration accounts by subscription.
725
+ #
726
+ # @param next_page_link [String] The NextLink from the previous successful call
727
+ # to List operation.
728
+ # @param [Hash{String => String}] A hash of custom headers that will be added
729
+ # to the HTTP request.
730
+ #
731
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
732
+ #
733
+ def list_by_subscription_next_async(next_page_link, custom_headers = nil)
734
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
735
+
736
+
737
+ request_headers = {}
738
+
739
+ # Set Headers
740
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
741
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
742
+ path_template = '{nextLink}'
743
+
744
+ request_url = @base_url || @client.base_url
745
+
746
+ options = {
747
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
748
+ skip_encoding_path_params: {'nextLink' => next_page_link},
749
+ headers: request_headers.merge(custom_headers || {}),
750
+ base_url: request_url
751
+ }
752
+ promise = @client.make_request_async(:get, path_template, options)
753
+
754
+ promise = promise.then do |result|
755
+ http_response = result.response
756
+ status_code = http_response.status
757
+ response_content = http_response.body
758
+ unless status_code == 200
759
+ error_model = JSON.load(response_content)
760
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
761
+ end
762
+
763
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
764
+ # Deserialize Response
765
+ if status_code == 200
766
+ begin
767
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
768
+ result_mapper = IntegrationAccountListResult.mapper()
769
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
770
+ rescue Exception => e
771
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
772
+ end
773
+ end
774
+
775
+ result
776
+ end
777
+
778
+ promise.execute
779
+ end
780
+
781
+ #
782
+ # Gets a list of integration accounts by resource group.
783
+ #
784
+ # @param next_page_link [String] The NextLink from the previous successful call
785
+ # to List operation.
786
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
787
+ # will be added to the HTTP request.
788
+ #
789
+ # @return [IntegrationAccountListResult] operation results.
790
+ #
791
+ def list_by_resource_group_next(next_page_link, custom_headers = nil)
792
+ response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
793
+ response.body unless response.nil?
794
+ end
795
+
796
+ #
797
+ # Gets a list of integration accounts by resource group.
798
+ #
799
+ # @param next_page_link [String] The NextLink from the previous successful call
800
+ # to List operation.
801
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
802
+ # will be added to the HTTP request.
803
+ #
804
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
805
+ #
806
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil)
807
+ list_by_resource_group_next_async(next_page_link, custom_headers).value!
808
+ end
809
+
810
+ #
811
+ # Gets a list of integration accounts by resource group.
812
+ #
813
+ # @param next_page_link [String] The NextLink from the previous successful call
814
+ # to List operation.
815
+ # @param [Hash{String => String}] A hash of custom headers that will be added
816
+ # to the HTTP request.
817
+ #
818
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
819
+ #
820
+ def list_by_resource_group_next_async(next_page_link, custom_headers = nil)
821
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
822
+
823
+
824
+ request_headers = {}
825
+
826
+ # Set Headers
827
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
828
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
829
+ path_template = '{nextLink}'
830
+
831
+ request_url = @base_url || @client.base_url
832
+
833
+ options = {
834
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
835
+ skip_encoding_path_params: {'nextLink' => next_page_link},
836
+ headers: request_headers.merge(custom_headers || {}),
837
+ base_url: request_url
838
+ }
839
+ promise = @client.make_request_async(:get, path_template, options)
840
+
841
+ promise = promise.then do |result|
842
+ http_response = result.response
843
+ status_code = http_response.status
844
+ response_content = http_response.body
845
+ unless status_code == 200
846
+ error_model = JSON.load(response_content)
847
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
848
+ end
849
+
850
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
851
+ # Deserialize Response
852
+ if status_code == 200
853
+ begin
854
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
855
+ result_mapper = IntegrationAccountListResult.mapper()
856
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
857
+ rescue Exception => e
858
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
859
+ end
860
+ end
861
+
862
+ result
863
+ end
864
+
865
+ promise.execute
866
+ end
867
+
868
+ #
869
+ # Gets a list of integration accounts by subscription.
870
+ #
871
+ # @param top [Integer] The number of items to be included in the result.
872
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
873
+ # will be added to the HTTP request.
874
+ #
875
+ # @return [IntegrationAccountListResult] which provide lazy access to pages of
876
+ # the response.
877
+ #
878
+ def list_by_subscription_as_lazy(top = nil, custom_headers = nil)
879
+ response = list_by_subscription_async(top, custom_headers).value!
880
+ unless response.nil?
881
+ page = response.body
882
+ page.next_method = Proc.new do |next_page_link|
883
+ list_by_subscription_next_async(next_page_link, custom_headers)
884
+ end
885
+ page
886
+ end
887
+ end
888
+
889
+ #
890
+ # Gets a list of integration accounts by resource group.
891
+ #
892
+ # @param resource_group_name [String] The resource group name.
893
+ # @param top [Integer] The number of items to be included in the result.
894
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
895
+ # will be added to the HTTP request.
896
+ #
897
+ # @return [IntegrationAccountListResult] which provide lazy access to pages of
898
+ # the response.
899
+ #
900
+ def list_by_resource_group_as_lazy(resource_group_name, top = nil, custom_headers = nil)
901
+ response = list_by_resource_group_async(resource_group_name, top, custom_headers).value!
902
+ unless response.nil?
903
+ page = response.body
904
+ page.next_method = Proc.new do |next_page_link|
905
+ list_by_resource_group_next_async(next_page_link, custom_headers)
906
+ end
907
+ page
908
+ end
909
+ end
910
+
911
+ end
912
+ end