azure_mgmt_logic 0.4.0

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