azure_mgmt_operational_insights 0.14.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 (53) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/azure_mgmt_operational_insights.rb +8 -0
  4. data/lib/generated/azure_mgmt_operational_insights.rb +72 -0
  5. data/lib/generated/azure_mgmt_operational_insights/data_sources.rb +567 -0
  6. data/lib/generated/azure_mgmt_operational_insights/linked_services.rb +440 -0
  7. data/lib/generated/azure_mgmt_operational_insights/models/core_summary.rb +54 -0
  8. data/lib/generated/azure_mgmt_operational_insights/models/data_source.rb +108 -0
  9. data/lib/generated/azure_mgmt_operational_insights/models/data_source_filter.rb +49 -0
  10. data/lib/generated/azure_mgmt_operational_insights/models/data_source_kind.rb +29 -0
  11. data/lib/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb +94 -0
  12. data/lib/generated/azure_mgmt_operational_insights/models/entity_status.rb +20 -0
  13. data/lib/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb +55 -0
  14. data/lib/generated/azure_mgmt_operational_insights/models/link_target.rb +74 -0
  15. data/lib/generated/azure_mgmt_operational_insights/models/linked_service.rb +83 -0
  16. data/lib/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb +53 -0
  17. data/lib/generated/azure_mgmt_operational_insights/models/management_group.rb +119 -0
  18. data/lib/generated/azure_mgmt_operational_insights/models/metric_name.rb +54 -0
  19. data/lib/generated/azure_mgmt_operational_insights/models/proxy_resource.rb +84 -0
  20. data/lib/generated/azure_mgmt_operational_insights/models/resource.rb +94 -0
  21. data/lib/generated/azure_mgmt_operational_insights/models/saved_search.rb +121 -0
  22. data/lib/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +63 -0
  23. data/lib/generated/azure_mgmt_operational_insights/models/search_error.rb +54 -0
  24. data/lib/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb +63 -0
  25. data/lib/generated/azure_mgmt_operational_insights/models/search_highlight.rb +54 -0
  26. data/lib/generated/azure_mgmt_operational_insights/models/search_metadata.rb +221 -0
  27. data/lib/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb +54 -0
  28. data/lib/generated/azure_mgmt_operational_insights/models/search_parameters.rb +88 -0
  29. data/lib/generated/azure_mgmt_operational_insights/models/search_results_response.rb +84 -0
  30. data/lib/generated/azure_mgmt_operational_insights/models/search_schema_value.rb +114 -0
  31. data/lib/generated/azure_mgmt_operational_insights/models/search_sort.rb +55 -0
  32. data/lib/generated/azure_mgmt_operational_insights/models/search_sort_enum.rb +16 -0
  33. data/lib/generated/azure_mgmt_operational_insights/models/shared_keys.rb +54 -0
  34. data/lib/generated/azure_mgmt_operational_insights/models/sku.rb +45 -0
  35. data/lib/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +20 -0
  36. data/lib/generated/azure_mgmt_operational_insights/models/storage_account.rb +55 -0
  37. data/lib/generated/azure_mgmt_operational_insights/models/storage_insight.rb +141 -0
  38. data/lib/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb +95 -0
  39. data/lib/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb +16 -0
  40. data/lib/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb +55 -0
  41. data/lib/generated/azure_mgmt_operational_insights/models/tag.rb +54 -0
  42. data/lib/generated/azure_mgmt_operational_insights/models/usage_metric.rb +96 -0
  43. data/lib/generated/azure_mgmt_operational_insights/models/workspace.rb +165 -0
  44. data/lib/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb +53 -0
  45. data/lib/generated/azure_mgmt_operational_insights/models/workspace_list_result.rb +52 -0
  46. data/lib/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb +53 -0
  47. data/lib/generated/azure_mgmt_operational_insights/module_definition.rb +8 -0
  48. data/lib/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +143 -0
  49. data/lib/generated/azure_mgmt_operational_insights/saved_searches.rb +513 -0
  50. data/lib/generated/azure_mgmt_operational_insights/storage_insights.rb +560 -0
  51. data/lib/generated/azure_mgmt_operational_insights/version.rb +8 -0
  52. data/lib/generated/azure_mgmt_operational_insights/workspaces.rb +1569 -0
  53. metadata +164 -0
@@ -0,0 +1,440 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::OperationalInsights
7
+ #
8
+ # Operational Insights Client
9
+ #
10
+ class LinkedServices
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the LinkedServices class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [OperationalInsightsManagementClient] reference to the OperationalInsightsManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Create or update a linked service.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group to get.
28
+ # The name is case insensitive.
29
+ # @param workspace_name [String] Name of the Log Analytics Workspace that will
30
+ # contain the linkedServices resource
31
+ # @param linked_service_name [String] Name of the linkedServices resource
32
+ # @param parameters [LinkedService] The parameters required to create or update
33
+ # a linked service.
34
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
35
+ # will be added to the HTTP request.
36
+ #
37
+ # @return [LinkedService] operation results.
38
+ #
39
+ def create_or_update(resource_group_name, workspace_name, linked_service_name, parameters, custom_headers = nil)
40
+ response = create_or_update_async(resource_group_name, workspace_name, linked_service_name, parameters, custom_headers).value!
41
+ response.body unless response.nil?
42
+ end
43
+
44
+ #
45
+ # Create or update a linked service.
46
+ #
47
+ # @param resource_group_name [String] The name of the resource group to get.
48
+ # The name is case insensitive.
49
+ # @param workspace_name [String] Name of the Log Analytics Workspace that will
50
+ # contain the linkedServices resource
51
+ # @param linked_service_name [String] Name of the linkedServices resource
52
+ # @param parameters [LinkedService] The parameters required to create or update
53
+ # a linked service.
54
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
55
+ # will be added to the HTTP request.
56
+ #
57
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
58
+ #
59
+ def create_or_update_with_http_info(resource_group_name, workspace_name, linked_service_name, parameters, custom_headers = nil)
60
+ create_or_update_async(resource_group_name, workspace_name, linked_service_name, parameters, custom_headers).value!
61
+ end
62
+
63
+ #
64
+ # Create or update a linked service.
65
+ #
66
+ # @param resource_group_name [String] The name of the resource group to get.
67
+ # The name is case insensitive.
68
+ # @param workspace_name [String] Name of the Log Analytics Workspace that will
69
+ # contain the linkedServices resource
70
+ # @param linked_service_name [String] Name of the linkedServices resource
71
+ # @param parameters [LinkedService] The parameters required to create or update
72
+ # a linked service.
73
+ # @param [Hash{String => String}] A hash of custom headers that will be added
74
+ # to the HTTP request.
75
+ #
76
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
77
+ #
78
+ def create_or_update_async(resource_group_name, workspace_name, linked_service_name, parameters, custom_headers = nil)
79
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
80
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
81
+ fail ArgumentError, 'linked_service_name is nil' if linked_service_name.nil?
82
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
83
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
84
+ api_version = '2015-11-01-preview'
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
+
93
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
94
+
95
+ # Serialize Request
96
+ request_mapper = Azure::ARM::OperationalInsights::Models::LinkedService.mapper()
97
+ request_content = @client.serialize(request_mapper, parameters)
98
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
99
+
100
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}'
101
+
102
+ request_url = @base_url || @client.base_url
103
+
104
+ options = {
105
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
106
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'linkedServiceName' => linked_service_name,'subscriptionId' => @client.subscription_id},
107
+ query_params: {'api-version' => api_version},
108
+ body: request_content,
109
+ headers: request_headers.merge(custom_headers || {}),
110
+ base_url: request_url
111
+ }
112
+ promise = @client.make_request_async(:put, path_template, options)
113
+
114
+ promise = promise.then do |result|
115
+ http_response = result.response
116
+ status_code = http_response.status
117
+ response_content = http_response.body
118
+ unless status_code == 200 || status_code == 201
119
+ error_model = JSON.load(response_content)
120
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
121
+ end
122
+
123
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
124
+ # Deserialize Response
125
+ if status_code == 200
126
+ begin
127
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
128
+ result_mapper = Azure::ARM::OperationalInsights::Models::LinkedService.mapper()
129
+ result.body = @client.deserialize(result_mapper, parsed_response)
130
+ rescue Exception => e
131
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
132
+ end
133
+ end
134
+ # Deserialize Response
135
+ if status_code == 201
136
+ begin
137
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
138
+ result_mapper = Azure::ARM::OperationalInsights::Models::LinkedService.mapper()
139
+ result.body = @client.deserialize(result_mapper, parsed_response)
140
+ rescue Exception => e
141
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
142
+ end
143
+ end
144
+
145
+ result
146
+ end
147
+
148
+ promise.execute
149
+ end
150
+
151
+ #
152
+ # Deletes a linked service instance.
153
+ #
154
+ # @param resource_group_name [String] The name of the resource group to get.
155
+ # The name is case insensitive.
156
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
157
+ # contains the linkedServices resource
158
+ # @param linked_service_name [String] Name of the linked service.
159
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
160
+ # will be added to the HTTP request.
161
+ #
162
+ #
163
+ def delete(resource_group_name, workspace_name, linked_service_name, custom_headers = nil)
164
+ response = delete_async(resource_group_name, workspace_name, linked_service_name, custom_headers).value!
165
+ nil
166
+ end
167
+
168
+ #
169
+ # Deletes a linked service instance.
170
+ #
171
+ # @param resource_group_name [String] The name of the resource group to get.
172
+ # The name is case insensitive.
173
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
174
+ # contains the linkedServices resource
175
+ # @param linked_service_name [String] Name of the linked service.
176
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
177
+ # will be added to the HTTP request.
178
+ #
179
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
180
+ #
181
+ def delete_with_http_info(resource_group_name, workspace_name, linked_service_name, custom_headers = nil)
182
+ delete_async(resource_group_name, workspace_name, linked_service_name, custom_headers).value!
183
+ end
184
+
185
+ #
186
+ # Deletes a linked service instance.
187
+ #
188
+ # @param resource_group_name [String] The name of the resource group to get.
189
+ # The name is case insensitive.
190
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
191
+ # contains the linkedServices resource
192
+ # @param linked_service_name [String] Name of the linked service.
193
+ # @param [Hash{String => String}] A hash of custom headers that will be added
194
+ # to the HTTP request.
195
+ #
196
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
197
+ #
198
+ def delete_async(resource_group_name, workspace_name, linked_service_name, custom_headers = nil)
199
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
200
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
201
+ fail ArgumentError, 'linked_service_name is nil' if linked_service_name.nil?
202
+ api_version = '2015-11-01-preview'
203
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
204
+
205
+
206
+ request_headers = {}
207
+
208
+ # Set Headers
209
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
210
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
211
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}'
212
+
213
+ request_url = @base_url || @client.base_url
214
+
215
+ options = {
216
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
217
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'linkedServiceName' => linked_service_name,'subscriptionId' => @client.subscription_id},
218
+ query_params: {'api-version' => api_version},
219
+ headers: request_headers.merge(custom_headers || {}),
220
+ base_url: request_url
221
+ }
222
+ promise = @client.make_request_async(:delete, path_template, options)
223
+
224
+ promise = promise.then do |result|
225
+ http_response = result.response
226
+ status_code = http_response.status
227
+ response_content = http_response.body
228
+ unless status_code == 200 || status_code == 204
229
+ error_model = JSON.load(response_content)
230
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
231
+ end
232
+
233
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
234
+
235
+ result
236
+ end
237
+
238
+ promise.execute
239
+ end
240
+
241
+ #
242
+ # Gets a linked service instance.
243
+ #
244
+ # @param resource_group_name [String] The name of the resource group to get.
245
+ # The name is case insensitive.
246
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
247
+ # contains the linkedServices resource
248
+ # @param linked_service_name [String] Name of the linked service.
249
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
250
+ # will be added to the HTTP request.
251
+ #
252
+ # @return [LinkedService] operation results.
253
+ #
254
+ def get(resource_group_name, workspace_name, linked_service_name, custom_headers = nil)
255
+ response = get_async(resource_group_name, workspace_name, linked_service_name, custom_headers).value!
256
+ response.body unless response.nil?
257
+ end
258
+
259
+ #
260
+ # Gets a linked service instance.
261
+ #
262
+ # @param resource_group_name [String] The name of the resource group to get.
263
+ # The name is case insensitive.
264
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
265
+ # contains the linkedServices resource
266
+ # @param linked_service_name [String] Name of the linked service.
267
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
268
+ # will be added to the HTTP request.
269
+ #
270
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
271
+ #
272
+ def get_with_http_info(resource_group_name, workspace_name, linked_service_name, custom_headers = nil)
273
+ get_async(resource_group_name, workspace_name, linked_service_name, custom_headers).value!
274
+ end
275
+
276
+ #
277
+ # Gets a linked service instance.
278
+ #
279
+ # @param resource_group_name [String] The name of the resource group to get.
280
+ # The name is case insensitive.
281
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
282
+ # contains the linkedServices resource
283
+ # @param linked_service_name [String] Name of the linked service.
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, workspace_name, linked_service_name, custom_headers = nil)
290
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
291
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
292
+ fail ArgumentError, 'linked_service_name is nil' if linked_service_name.nil?
293
+ api_version = '2015-11-01-preview'
294
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
295
+
296
+
297
+ request_headers = {}
298
+
299
+ # Set Headers
300
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
301
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
302
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}'
303
+
304
+ request_url = @base_url || @client.base_url
305
+
306
+ options = {
307
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
308
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'linkedServiceName' => linked_service_name,'subscriptionId' => @client.subscription_id},
309
+ query_params: {'api-version' => api_version},
310
+ headers: request_headers.merge(custom_headers || {}),
311
+ base_url: request_url
312
+ }
313
+ promise = @client.make_request_async(:get, path_template, options)
314
+
315
+ promise = promise.then do |result|
316
+ http_response = result.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(result.request, http_response, error_model)
322
+ end
323
+
324
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
325
+ # Deserialize Response
326
+ if status_code == 200
327
+ begin
328
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
329
+ result_mapper = Azure::ARM::OperationalInsights::Models::LinkedService.mapper()
330
+ result.body = @client.deserialize(result_mapper, parsed_response)
331
+ rescue Exception => e
332
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
333
+ end
334
+ end
335
+
336
+ result
337
+ end
338
+
339
+ promise.execute
340
+ end
341
+
342
+ #
343
+ # Gets the linked services instances in a workspace.
344
+ #
345
+ # @param resource_group_name [String] The name of the resource group to get.
346
+ # The name is case insensitive.
347
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
348
+ # contains the linked services.
349
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
350
+ # will be added to the HTTP request.
351
+ #
352
+ # @return [LinkedServiceListResult] operation results.
353
+ #
354
+ def list_by_workspace(resource_group_name, workspace_name, custom_headers = nil)
355
+ response = list_by_workspace_async(resource_group_name, workspace_name, custom_headers).value!
356
+ response.body unless response.nil?
357
+ end
358
+
359
+ #
360
+ # Gets the linked services instances in a workspace.
361
+ #
362
+ # @param resource_group_name [String] The name of the resource group to get.
363
+ # The name is case insensitive.
364
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
365
+ # contains the linked services.
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 list_by_workspace_with_http_info(resource_group_name, workspace_name, custom_headers = nil)
372
+ list_by_workspace_async(resource_group_name, workspace_name, custom_headers).value!
373
+ end
374
+
375
+ #
376
+ # Gets the linked services instances in a workspace.
377
+ #
378
+ # @param resource_group_name [String] The name of the resource group to get.
379
+ # The name is case insensitive.
380
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
381
+ # contains the linked services.
382
+ # @param [Hash{String => String}] A hash of custom headers that will be added
383
+ # to the HTTP request.
384
+ #
385
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
386
+ #
387
+ def list_by_workspace_async(resource_group_name, workspace_name, custom_headers = nil)
388
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
389
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
390
+ api_version = '2015-11-01-preview'
391
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices'
400
+
401
+ request_url = @base_url || @client.base_url
402
+
403
+ options = {
404
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
405
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id},
406
+ query_params: {'api-version' => api_version},
407
+ headers: request_headers.merge(custom_headers || {}),
408
+ base_url: request_url
409
+ }
410
+ promise = @client.make_request_async(:get, path_template, options)
411
+
412
+ promise = promise.then do |result|
413
+ http_response = result.response
414
+ status_code = http_response.status
415
+ response_content = http_response.body
416
+ unless status_code == 200
417
+ error_model = JSON.load(response_content)
418
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
419
+ end
420
+
421
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
422
+ # Deserialize Response
423
+ if status_code == 200
424
+ begin
425
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
426
+ result_mapper = Azure::ARM::OperationalInsights::Models::LinkedServiceListResult.mapper()
427
+ result.body = @client.deserialize(result_mapper, parsed_response)
428
+ rescue Exception => e
429
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
430
+ end
431
+ end
432
+
433
+ result
434
+ end
435
+
436
+ promise.execute
437
+ end
438
+
439
+ end
440
+ end
@@ -0,0 +1,54 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::OperationalInsights
7
+ module Models
8
+ #
9
+ # The core summary of a search.
10
+ #
11
+ class CoreSummary
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The status of a core summary.
16
+ attr_accessor :status
17
+
18
+ # @return [Integer] The number of documents of a core summary.
19
+ attr_accessor :number_of_documents
20
+
21
+
22
+ #
23
+ # Mapper for CoreSummary class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ required: false,
29
+ serialized_name: 'CoreSummary',
30
+ type: {
31
+ name: 'Composite',
32
+ class_name: 'CoreSummary',
33
+ model_properties: {
34
+ status: {
35
+ required: false,
36
+ serialized_name: 'Status',
37
+ type: {
38
+ name: 'String'
39
+ }
40
+ },
41
+ number_of_documents: {
42
+ required: true,
43
+ serialized_name: 'NumberOfDocuments',
44
+ type: {
45
+ name: 'Number'
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ end
52
+ end
53
+ end
54
+ end