azure_mgmt_logic 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,546 @@
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
+ # IntegrationAccountPartners
9
+ #
10
+ class IntegrationAccountPartners
11
+ include Azure::ARM::Logic::Models
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the IntegrationAccountPartners 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 account partners.
27
+ #
28
+ # @param resource_group_name [String] The resource group name.
29
+ # @param integration_account_name [String] The integration account name.
30
+ # @param top [Integer] The number of items to be included in the result.
31
+ # @param filter [String] The filter to apply on the operation.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [IntegrationAccountPartnerListResult] which provide lazy access to
36
+ # pages of the response.
37
+ #
38
+ def list_as_lazy(resource_group_name, integration_account_name, top = nil, filter = nil, custom_headers = nil)
39
+ response = list_async(resource_group_name, integration_account_name, top, filter, custom_headers).value!
40
+ unless response.nil?
41
+ page = response.body
42
+ page.next_method = Proc.new do |next_link|
43
+ list_next_async(next_link, custom_headers)
44
+ end
45
+ page
46
+ end
47
+ end
48
+
49
+ #
50
+ # Gets a list of integration account partners.
51
+ #
52
+ # @param resource_group_name [String] The resource group name.
53
+ # @param integration_account_name [String] The integration account name.
54
+ # @param top [Integer] The number of items to be included in the result.
55
+ # @param filter [String] The filter to apply on the operation.
56
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
57
+ # will be added to the HTTP request.
58
+ #
59
+ # @return [Array<IntegrationAccountPartner>] operation results.
60
+ #
61
+ def list(resource_group_name, integration_account_name, top = nil, filter = nil, custom_headers = nil)
62
+ first_page = list_as_lazy(resource_group_name, integration_account_name, top, filter, custom_headers)
63
+ first_page.get_all_items
64
+ end
65
+
66
+ #
67
+ # Gets a list of integration account partners.
68
+ #
69
+ # @param resource_group_name [String] The resource group name.
70
+ # @param integration_account_name [String] The integration account name.
71
+ # @param top [Integer] The number of items to be included in the result.
72
+ # @param filter [String] The filter to apply on the operation.
73
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
74
+ # will be added to the HTTP request.
75
+ #
76
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
77
+ #
78
+ def list_with_http_info(resource_group_name, integration_account_name, top = nil, filter = nil, custom_headers = nil)
79
+ list_async(resource_group_name, integration_account_name, top, filter, custom_headers).value!
80
+ end
81
+
82
+ #
83
+ # Gets a list of integration account partners.
84
+ #
85
+ # @param resource_group_name [String] The resource group name.
86
+ # @param integration_account_name [String] The integration account name.
87
+ # @param top [Integer] The number of items to be included in the result.
88
+ # @param filter [String] The filter to apply on the operation.
89
+ # @param [Hash{String => String}] A hash of custom headers that will be added
90
+ # to the HTTP request.
91
+ #
92
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
93
+ #
94
+ def list_async(resource_group_name, integration_account_name, top = nil, filter = nil, custom_headers = nil)
95
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
96
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
97
+ fail ArgumentError, 'integration_account_name is nil' if integration_account_name.nil?
98
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
99
+
100
+
101
+ request_headers = {}
102
+
103
+ # Set Headers
104
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
105
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
106
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners'
107
+ options = {
108
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
109
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => integration_account_name},
110
+ query_params: {'api-version' => @client.api_version,'$top' => top,'$filter' => filter},
111
+ headers: request_headers.merge(custom_headers || {})
112
+ }
113
+
114
+ request_url = @base_url || @client.base_url
115
+
116
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
117
+ promise = request.run_promise do |req|
118
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
119
+ end
120
+
121
+ promise = promise.then do |http_response|
122
+ status_code = http_response.status
123
+ response_content = http_response.body
124
+ unless status_code == 200
125
+ error_model = JSON.load(response_content)
126
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
127
+ end
128
+
129
+ # Create Result
130
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
131
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
132
+ # Deserialize Response
133
+ if status_code == 200
134
+ begin
135
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
136
+ result_mapper = IntegrationAccountPartnerListResult.mapper()
137
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
138
+ rescue Exception => e
139
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
140
+ end
141
+ end
142
+
143
+ result
144
+ end
145
+
146
+ promise.execute
147
+ end
148
+
149
+ #
150
+ # Gets an integration account partner.
151
+ #
152
+ # @param resource_group_name [String] The resource group name.
153
+ # @param integration_account_name [String] The integration account name.
154
+ # @param partner_name [String] The integration account partner name.
155
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
156
+ # will be added to the HTTP request.
157
+ #
158
+ # @return [IntegrationAccountPartner] operation results.
159
+ #
160
+ def get(resource_group_name, integration_account_name, partner_name, custom_headers = nil)
161
+ response = get_async(resource_group_name, integration_account_name, partner_name, custom_headers).value!
162
+ response.body unless response.nil?
163
+ end
164
+
165
+ #
166
+ # Gets an integration account partner.
167
+ #
168
+ # @param resource_group_name [String] The resource group name.
169
+ # @param integration_account_name [String] The integration account name.
170
+ # @param partner_name [String] The integration account partner name.
171
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
172
+ # will be added to the HTTP request.
173
+ #
174
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
175
+ #
176
+ def get_with_http_info(resource_group_name, integration_account_name, partner_name, custom_headers = nil)
177
+ get_async(resource_group_name, integration_account_name, partner_name, custom_headers).value!
178
+ end
179
+
180
+ #
181
+ # Gets an integration account partner.
182
+ #
183
+ # @param resource_group_name [String] The resource group name.
184
+ # @param integration_account_name [String] The integration account name.
185
+ # @param partner_name [String] The integration account partner name.
186
+ # @param [Hash{String => String}] A hash of custom headers that will be added
187
+ # to the HTTP request.
188
+ #
189
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
190
+ #
191
+ def get_async(resource_group_name, integration_account_name, partner_name, custom_headers = nil)
192
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
193
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
194
+ fail ArgumentError, 'integration_account_name is nil' if integration_account_name.nil?
195
+ fail ArgumentError, 'partner_name is nil' if partner_name.nil?
196
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
197
+
198
+
199
+ request_headers = {}
200
+
201
+ # Set Headers
202
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
203
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
204
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'
205
+ options = {
206
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
207
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => integration_account_name,'partnerName' => partner_name},
208
+ query_params: {'api-version' => @client.api_version},
209
+ headers: request_headers.merge(custom_headers || {})
210
+ }
211
+
212
+ request_url = @base_url || @client.base_url
213
+
214
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
215
+ promise = request.run_promise do |req|
216
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
217
+ end
218
+
219
+ promise = promise.then do |http_response|
220
+ status_code = http_response.status
221
+ response_content = http_response.body
222
+ unless status_code == 200
223
+ error_model = JSON.load(response_content)
224
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
225
+ end
226
+
227
+ # Create Result
228
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
229
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
230
+ # Deserialize Response
231
+ if status_code == 200
232
+ begin
233
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
234
+ result_mapper = IntegrationAccountPartner.mapper()
235
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
236
+ rescue Exception => e
237
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
238
+ end
239
+ end
240
+
241
+ result
242
+ end
243
+
244
+ promise.execute
245
+ end
246
+
247
+ #
248
+ # Creates or updates an integration account partner.
249
+ #
250
+ # @param resource_group_name [String] The resource group name.
251
+ # @param integration_account_name [String] The integration account name.
252
+ # @param partner_name [String] The integration account partner name.
253
+ # @param partner [IntegrationAccountPartner] The integration account partner.
254
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
255
+ # will be added to the HTTP request.
256
+ #
257
+ # @return [IntegrationAccountPartner] operation results.
258
+ #
259
+ def create_or_update(resource_group_name, integration_account_name, partner_name, partner, custom_headers = nil)
260
+ response = create_or_update_async(resource_group_name, integration_account_name, partner_name, partner, custom_headers).value!
261
+ response.body unless response.nil?
262
+ end
263
+
264
+ #
265
+ # Creates or updates an integration account partner.
266
+ #
267
+ # @param resource_group_name [String] The resource group name.
268
+ # @param integration_account_name [String] The integration account name.
269
+ # @param partner_name [String] The integration account partner name.
270
+ # @param partner [IntegrationAccountPartner] The integration account partner.
271
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
272
+ # will be added to the HTTP request.
273
+ #
274
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
275
+ #
276
+ def create_or_update_with_http_info(resource_group_name, integration_account_name, partner_name, partner, custom_headers = nil)
277
+ create_or_update_async(resource_group_name, integration_account_name, partner_name, partner, custom_headers).value!
278
+ end
279
+
280
+ #
281
+ # Creates or updates an integration account partner.
282
+ #
283
+ # @param resource_group_name [String] The resource group name.
284
+ # @param integration_account_name [String] The integration account name.
285
+ # @param partner_name [String] The integration account partner name.
286
+ # @param partner [IntegrationAccountPartner] The integration account partner.
287
+ # @param [Hash{String => String}] A hash of custom headers that will be added
288
+ # to the HTTP request.
289
+ #
290
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
291
+ #
292
+ def create_or_update_async(resource_group_name, integration_account_name, partner_name, partner, custom_headers = nil)
293
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
294
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
295
+ fail ArgumentError, 'integration_account_name is nil' if integration_account_name.nil?
296
+ fail ArgumentError, 'partner_name is nil' if partner_name.nil?
297
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
298
+ fail ArgumentError, 'partner is nil' if partner.nil?
299
+
300
+
301
+ request_headers = {}
302
+
303
+ # Set Headers
304
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
305
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
306
+
307
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
308
+
309
+ # Serialize Request
310
+ request_mapper = IntegrationAccountPartner.mapper()
311
+ request_content = @client.serialize(request_mapper, partner, 'partner')
312
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
313
+
314
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'
315
+ options = {
316
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
317
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => integration_account_name,'partnerName' => partner_name},
318
+ query_params: {'api-version' => @client.api_version},
319
+ body: request_content,
320
+ headers: request_headers.merge(custom_headers || {})
321
+ }
322
+
323
+ request_url = @base_url || @client.base_url
324
+
325
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
326
+ promise = request.run_promise do |req|
327
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
328
+ end
329
+
330
+ promise = promise.then do |http_response|
331
+ status_code = http_response.status
332
+ response_content = http_response.body
333
+ unless status_code == 200 || status_code == 201
334
+ error_model = JSON.load(response_content)
335
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
336
+ end
337
+
338
+ # Create Result
339
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
340
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
341
+ # Deserialize Response
342
+ if status_code == 200
343
+ begin
344
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
345
+ result_mapper = IntegrationAccountPartner.mapper()
346
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
347
+ rescue Exception => e
348
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
349
+ end
350
+ end
351
+ # Deserialize Response
352
+ if status_code == 201
353
+ begin
354
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
355
+ result_mapper = IntegrationAccountPartner.mapper()
356
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
357
+ rescue Exception => e
358
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
359
+ end
360
+ end
361
+
362
+ result
363
+ end
364
+
365
+ promise.execute
366
+ end
367
+
368
+ #
369
+ # Deletes an integration account partner.
370
+ #
371
+ # @param resource_group_name [String] The resource group name.
372
+ # @param integration_account_name [String] The integration account name.
373
+ # @param partner_name [String] The integration account partner name.
374
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
375
+ # will be added to the HTTP request.
376
+ #
377
+ #
378
+ def delete(resource_group_name, integration_account_name, partner_name, custom_headers = nil)
379
+ response = delete_async(resource_group_name, integration_account_name, partner_name, custom_headers).value!
380
+ nil
381
+ end
382
+
383
+ #
384
+ # Deletes an integration account partner.
385
+ #
386
+ # @param resource_group_name [String] The resource group name.
387
+ # @param integration_account_name [String] The integration account name.
388
+ # @param partner_name [String] The integration account partner name.
389
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
390
+ # will be added to the HTTP request.
391
+ #
392
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
393
+ #
394
+ def delete_with_http_info(resource_group_name, integration_account_name, partner_name, custom_headers = nil)
395
+ delete_async(resource_group_name, integration_account_name, partner_name, custom_headers).value!
396
+ end
397
+
398
+ #
399
+ # Deletes an integration account partner.
400
+ #
401
+ # @param resource_group_name [String] The resource group name.
402
+ # @param integration_account_name [String] The integration account name.
403
+ # @param partner_name [String] The integration account partner name.
404
+ # @param [Hash{String => String}] A hash of custom headers that will be added
405
+ # to the HTTP request.
406
+ #
407
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
408
+ #
409
+ def delete_async(resource_group_name, integration_account_name, partner_name, custom_headers = nil)
410
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
411
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
412
+ fail ArgumentError, 'integration_account_name is nil' if integration_account_name.nil?
413
+ fail ArgumentError, 'partner_name is nil' if partner_name.nil?
414
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
415
+
416
+
417
+ request_headers = {}
418
+
419
+ # Set Headers
420
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
421
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
422
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'
423
+ options = {
424
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
425
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => integration_account_name,'partnerName' => partner_name},
426
+ query_params: {'api-version' => @client.api_version},
427
+ headers: request_headers.merge(custom_headers || {})
428
+ }
429
+
430
+ request_url = @base_url || @client.base_url
431
+
432
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
433
+ promise = request.run_promise do |req|
434
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
435
+ end
436
+
437
+ promise = promise.then do |http_response|
438
+ status_code = http_response.status
439
+ response_content = http_response.body
440
+ unless status_code == 200 || status_code == 204
441
+ error_model = JSON.load(response_content)
442
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
443
+ end
444
+
445
+ # Create Result
446
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
447
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
448
+
449
+ result
450
+ end
451
+
452
+ promise.execute
453
+ end
454
+
455
+ #
456
+ # Gets a list of integration account partners.
457
+ #
458
+ # @param next_page_link [String] The NextLink from the previous successful
459
+ # call to List operation.
460
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
461
+ # will be added to the HTTP request.
462
+ #
463
+ # @return [IntegrationAccountPartnerListResult] operation results.
464
+ #
465
+ def list_next(next_page_link, custom_headers = nil)
466
+ response = list_next_async(next_page_link, custom_headers).value!
467
+ response.body unless response.nil?
468
+ end
469
+
470
+ #
471
+ # Gets a list of integration account partners.
472
+ #
473
+ # @param next_page_link [String] The NextLink from the previous successful
474
+ # call to List operation.
475
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
476
+ # will be added to the HTTP request.
477
+ #
478
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
479
+ #
480
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
481
+ list_next_async(next_page_link, custom_headers).value!
482
+ end
483
+
484
+ #
485
+ # Gets a list of integration account partners.
486
+ #
487
+ # @param next_page_link [String] The NextLink from the previous successful
488
+ # call to List operation.
489
+ # @param [Hash{String => String}] A hash of custom headers that will be added
490
+ # to the HTTP request.
491
+ #
492
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
493
+ #
494
+ def list_next_async(next_page_link, custom_headers = nil)
495
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
496
+
497
+
498
+ request_headers = {}
499
+
500
+ # Set Headers
501
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
502
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
503
+ path_template = '{nextLink}'
504
+ options = {
505
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
506
+ skip_encoding_path_params: {'nextLink' => next_page_link},
507
+ headers: request_headers.merge(custom_headers || {})
508
+ }
509
+
510
+ request_url = @base_url || @client.base_url
511
+
512
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
513
+ promise = request.run_promise do |req|
514
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
515
+ end
516
+
517
+ promise = promise.then do |http_response|
518
+ status_code = http_response.status
519
+ response_content = http_response.body
520
+ unless status_code == 200
521
+ error_model = JSON.load(response_content)
522
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
523
+ end
524
+
525
+ # Create Result
526
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
527
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
528
+ # Deserialize Response
529
+ if status_code == 200
530
+ begin
531
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
532
+ result_mapper = IntegrationAccountPartnerListResult.mapper()
533
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
534
+ rescue Exception => e
535
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
536
+ end
537
+ end
538
+
539
+ result
540
+ end
541
+
542
+ promise.execute
543
+ end
544
+
545
+ end
546
+ end