azure_mgmt_stream_analytics 0.11.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 (83) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/azure_mgmt_stream_analytics.rb +5 -0
  4. data/lib/generated/azure_mgmt_stream_analytics.rb +102 -0
  5. data/lib/generated/azure_mgmt_stream_analytics/functions.rb +1055 -0
  6. data/lib/generated/azure_mgmt_stream_analytics/inputs.rb +923 -0
  7. data/lib/generated/azure_mgmt_stream_analytics/models/avro_serialization.rb +61 -0
  8. data/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_function_binding.rb +115 -0
  9. data/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_function_retrieve_default_definition_parameters.rb +75 -0
  10. data/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_input_column.rb +71 -0
  11. data/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_inputs.rb +65 -0
  12. data/lib/generated/azure_mgmt_stream_analytics/models/azure_machine_learning_web_service_output_column.rb +60 -0
  13. data/lib/generated/azure_mgmt_stream_analytics/models/azure_sql_database_data_source_properties.rb +91 -0
  14. data/lib/generated/azure_mgmt_stream_analytics/models/azure_sql_database_output_data_source.rb +104 -0
  15. data/lib/generated/azure_mgmt_stream_analytics/models/azure_table_output_data_source.rb +135 -0
  16. data/lib/generated/azure_mgmt_stream_analytics/models/blob_data_source_properties.rb +107 -0
  17. data/lib/generated/azure_mgmt_stream_analytics/models/blob_output_data_source.rb +121 -0
  18. data/lib/generated/azure_mgmt_stream_analytics/models/blob_reference_input_data_source.rb +121 -0
  19. data/lib/generated/azure_mgmt_stream_analytics/models/blob_stream_input_data_source.rb +132 -0
  20. data/lib/generated/azure_mgmt_stream_analytics/models/compatibility_level.rb +15 -0
  21. data/lib/generated/azure_mgmt_stream_analytics/models/csv_serialization.rb +79 -0
  22. data/lib/generated/azure_mgmt_stream_analytics/models/diagnostic_condition.rb +72 -0
  23. data/lib/generated/azure_mgmt_stream_analytics/models/diagnostics.rb +57 -0
  24. data/lib/generated/azure_mgmt_stream_analytics/models/document_db_output_data_source.rb +121 -0
  25. data/lib/generated/azure_mgmt_stream_analytics/models/encoding.rb +15 -0
  26. data/lib/generated/azure_mgmt_stream_analytics/models/error_response.rb +57 -0
  27. data/lib/generated/azure_mgmt_stream_analytics/models/event_hub_data_source_properties.rb +67 -0
  28. data/lib/generated/azure_mgmt_stream_analytics/models/event_hub_output_data_source.rb +106 -0
  29. data/lib/generated/azure_mgmt_stream_analytics/models/event_hub_stream_input_data_source.rb +109 -0
  30. data/lib/generated/azure_mgmt_stream_analytics/models/events_out_of_order_policy.rb +16 -0
  31. data/lib/generated/azure_mgmt_stream_analytics/models/function.rb +73 -0
  32. data/lib/generated/azure_mgmt_stream_analytics/models/function_binding.rb +48 -0
  33. data/lib/generated/azure_mgmt_stream_analytics/models/function_input.rb +60 -0
  34. data/lib/generated/azure_mgmt_stream_analytics/models/function_list_result.rb +97 -0
  35. data/lib/generated/azure_mgmt_stream_analytics/models/function_output.rb +48 -0
  36. data/lib/generated/azure_mgmt_stream_analytics/models/function_properties.rb +60 -0
  37. data/lib/generated/azure_mgmt_stream_analytics/models/function_retrieve_default_definition_parameters.rb +49 -0
  38. data/lib/generated/azure_mgmt_stream_analytics/models/input.rb +73 -0
  39. data/lib/generated/azure_mgmt_stream_analytics/models/input_list_result.rb +97 -0
  40. data/lib/generated/azure_mgmt_stream_analytics/models/input_properties.rb +89 -0
  41. data/lib/generated/azure_mgmt_stream_analytics/models/io_thub_stream_input_data_source.rb +106 -0
  42. data/lib/generated/azure_mgmt_stream_analytics/models/java_script_function_binding.rb +60 -0
  43. data/lib/generated/azure_mgmt_stream_analytics/models/java_script_function_retrieve_default_definition_parameters.rb +73 -0
  44. data/lib/generated/azure_mgmt_stream_analytics/models/json_output_serialization_format.rb +16 -0
  45. data/lib/generated/azure_mgmt_stream_analytics/models/json_serialization.rb +80 -0
  46. data/lib/generated/azure_mgmt_stream_analytics/models/operation.rb +60 -0
  47. data/lib/generated/azure_mgmt_stream_analytics/models/operation_display.rb +82 -0
  48. data/lib/generated/azure_mgmt_stream_analytics/models/operation_list_result.rb +99 -0
  49. data/lib/generated/azure_mgmt_stream_analytics/models/output.rb +115 -0
  50. data/lib/generated/azure_mgmt_stream_analytics/models/output_data_source.rb +52 -0
  51. data/lib/generated/azure_mgmt_stream_analytics/models/output_error_policy.rb +16 -0
  52. data/lib/generated/azure_mgmt_stream_analytics/models/output_list_result.rb +97 -0
  53. data/lib/generated/azure_mgmt_stream_analytics/models/output_start_mode.rb +17 -0
  54. data/lib/generated/azure_mgmt_stream_analytics/models/reference_input_data_source.rb +46 -0
  55. data/lib/generated/azure_mgmt_stream_analytics/models/reference_input_properties.rb +91 -0
  56. data/lib/generated/azure_mgmt_stream_analytics/models/resource_test_status.rb +59 -0
  57. data/lib/generated/azure_mgmt_stream_analytics/models/scalar_function_properties.rb +102 -0
  58. data/lib/generated/azure_mgmt_stream_analytics/models/serialization.rb +49 -0
  59. data/lib/generated/azure_mgmt_stream_analytics/models/service_bus_data_source_properties.rb +71 -0
  60. data/lib/generated/azure_mgmt_stream_analytics/models/service_bus_queue_output_data_source.rb +113 -0
  61. data/lib/generated/azure_mgmt_stream_analytics/models/service_bus_topic_output_data_source.rb +113 -0
  62. data/lib/generated/azure_mgmt_stream_analytics/models/sku.rb +46 -0
  63. data/lib/generated/azure_mgmt_stream_analytics/models/sku_name.rb +15 -0
  64. data/lib/generated/azure_mgmt_stream_analytics/models/start_streaming_job_parameters.rb +64 -0
  65. data/lib/generated/azure_mgmt_stream_analytics/models/storage_account.rb +57 -0
  66. data/lib/generated/azure_mgmt_stream_analytics/models/stream_input_data_source.rb +48 -0
  67. data/lib/generated/azure_mgmt_stream_analytics/models/stream_input_properties.rb +90 -0
  68. data/lib/generated/azure_mgmt_stream_analytics/models/streaming_job.rb +353 -0
  69. data/lib/generated/azure_mgmt_stream_analytics/models/streaming_job_list_result.rb +97 -0
  70. data/lib/generated/azure_mgmt_stream_analytics/models/sub_resource.rb +64 -0
  71. data/lib/generated/azure_mgmt_stream_analytics/models/subscription_quota.rb +80 -0
  72. data/lib/generated/azure_mgmt_stream_analytics/models/subscription_quotas_list_result.rb +56 -0
  73. data/lib/generated/azure_mgmt_stream_analytics/models/transformation.rb +98 -0
  74. data/lib/generated/azure_mgmt_stream_analytics/models/udf_type.rb +15 -0
  75. data/lib/generated/azure_mgmt_stream_analytics/module_definition.rb +8 -0
  76. data/lib/generated/azure_mgmt_stream_analytics/operations.rb +213 -0
  77. data/lib/generated/azure_mgmt_stream_analytics/outputs.rb +924 -0
  78. data/lib/generated/azure_mgmt_stream_analytics/stream_analytics_management_client.rb +155 -0
  79. data/lib/generated/azure_mgmt_stream_analytics/streaming_jobs.rb +1327 -0
  80. data/lib/generated/azure_mgmt_stream_analytics/subscriptions.rb +121 -0
  81. data/lib/generated/azure_mgmt_stream_analytics/transformations.rb +427 -0
  82. data/lib/generated/azure_mgmt_stream_analytics/version.rb +8 -0
  83. metadata +195 -0
@@ -0,0 +1,923 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::StreamAnalytics
7
+ #
8
+ # Stream Analytics Client
9
+ #
10
+ class Inputs
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Inputs class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [StreamAnalyticsManagementClient] reference to the StreamAnalyticsManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Creates an input or replaces an already existing input under an existing
26
+ # streaming job.
27
+ #
28
+ # @param input [Input] The definition of the input that will be used to create
29
+ # a new input or replace the existing one under the streaming job.
30
+ # @param resource_group_name [String] The name of the resource group that
31
+ # contains the resource. You can obtain this value from the Azure Resource
32
+ # Manager API or the portal.
33
+ # @param job_name [String] The name of the streaming job.
34
+ # @param input_name [String] The name of the input.
35
+ # @param if_match [String] The ETag of the input. Omit this value to always
36
+ # overwrite the current input. Specify the last-seen ETag value to prevent
37
+ # accidentally overwritting concurrent changes.
38
+ # @param if_none_match [String] Set to '*' to allow a new input to be created,
39
+ # but to prevent updating an existing input. Other values will result in a 412
40
+ # Pre-condition Failed response.
41
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
42
+ # will be added to the HTTP request.
43
+ #
44
+ # @return [Input] operation results.
45
+ #
46
+ def create_or_replace(input, resource_group_name, job_name, input_name, if_match = nil, if_none_match = nil, custom_headers = nil)
47
+ response = create_or_replace_async(input, resource_group_name, job_name, input_name, if_match, if_none_match, custom_headers).value!
48
+ response.body unless response.nil?
49
+ end
50
+
51
+ #
52
+ # Creates an input or replaces an already existing input under an existing
53
+ # streaming job.
54
+ #
55
+ # @param input [Input] The definition of the input that will be used to create
56
+ # a new input or replace the existing one under the streaming job.
57
+ # @param resource_group_name [String] The name of the resource group that
58
+ # contains the resource. You can obtain this value from the Azure Resource
59
+ # Manager API or the portal.
60
+ # @param job_name [String] The name of the streaming job.
61
+ # @param input_name [String] The name of the input.
62
+ # @param if_match [String] The ETag of the input. Omit this value to always
63
+ # overwrite the current input. Specify the last-seen ETag value to prevent
64
+ # accidentally overwritting concurrent changes.
65
+ # @param if_none_match [String] Set to '*' to allow a new input to be created,
66
+ # but to prevent updating an existing input. Other values will result in a 412
67
+ # Pre-condition Failed response.
68
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
69
+ # will be added to the HTTP request.
70
+ #
71
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
72
+ #
73
+ def create_or_replace_with_http_info(input, resource_group_name, job_name, input_name, if_match = nil, if_none_match = nil, custom_headers = nil)
74
+ create_or_replace_async(input, resource_group_name, job_name, input_name, if_match, if_none_match, custom_headers).value!
75
+ end
76
+
77
+ #
78
+ # Creates an input or replaces an already existing input under an existing
79
+ # streaming job.
80
+ #
81
+ # @param input [Input] The definition of the input that will be used to create
82
+ # a new input or replace the existing one under the streaming job.
83
+ # @param resource_group_name [String] The name of the resource group that
84
+ # contains the resource. You can obtain this value from the Azure Resource
85
+ # Manager API or the portal.
86
+ # @param job_name [String] The name of the streaming job.
87
+ # @param input_name [String] The name of the input.
88
+ # @param if_match [String] The ETag of the input. Omit this value to always
89
+ # overwrite the current input. Specify the last-seen ETag value to prevent
90
+ # accidentally overwritting concurrent changes.
91
+ # @param if_none_match [String] Set to '*' to allow a new input to be created,
92
+ # but to prevent updating an existing input. Other values will result in a 412
93
+ # Pre-condition Failed response.
94
+ # @param [Hash{String => String}] A hash of custom headers that will be added
95
+ # to the HTTP request.
96
+ #
97
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
98
+ #
99
+ def create_or_replace_async(input, resource_group_name, job_name, input_name, if_match = nil, if_none_match = nil, custom_headers = nil)
100
+ fail ArgumentError, 'input is nil' if input.nil?
101
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
102
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
103
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
104
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
105
+ fail ArgumentError, 'input_name is nil' if input_name.nil?
106
+
107
+
108
+ request_headers = {}
109
+
110
+ # Set Headers
111
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
112
+ request_headers['If-Match'] = if_match unless if_match.nil?
113
+ request_headers['If-None-Match'] = if_none_match unless if_none_match.nil?
114
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
115
+
116
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
117
+
118
+ # Serialize Request
119
+ request_mapper = Azure::ARM::StreamAnalytics::Models::Input.mapper()
120
+ request_content = @client.serialize(request_mapper, input)
121
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
122
+
123
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'
124
+
125
+ request_url = @base_url || @client.base_url
126
+
127
+ options = {
128
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
129
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'inputName' => input_name},
130
+ query_params: {'api-version' => @client.api_version},
131
+ body: request_content,
132
+ headers: request_headers.merge(custom_headers || {}),
133
+ base_url: request_url
134
+ }
135
+ promise = @client.make_request_async(:put, path_template, options)
136
+
137
+ promise = promise.then do |result|
138
+ http_response = result.response
139
+ status_code = http_response.status
140
+ response_content = http_response.body
141
+ unless status_code == 200 || status_code == 201
142
+ error_model = JSON.load(response_content)
143
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
144
+ end
145
+
146
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
147
+ # Deserialize Response
148
+ if status_code == 200
149
+ begin
150
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
151
+ result_mapper = Azure::ARM::StreamAnalytics::Models::Input.mapper()
152
+ result.body = @client.deserialize(result_mapper, parsed_response)
153
+ rescue Exception => e
154
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
155
+ end
156
+ end
157
+ # Deserialize Response
158
+ if status_code == 201
159
+ begin
160
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
161
+ result_mapper = Azure::ARM::StreamAnalytics::Models::Input.mapper()
162
+ result.body = @client.deserialize(result_mapper, parsed_response)
163
+ rescue Exception => e
164
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
165
+ end
166
+ end
167
+
168
+ result
169
+ end
170
+
171
+ promise.execute
172
+ end
173
+
174
+ #
175
+ # Updates an existing input under an existing streaming job. This can be used
176
+ # to partially update (ie. update one or two properties) an input without
177
+ # affecting the rest the job or input definition.
178
+ #
179
+ # @param input [Input] An Input object. The properties specified here will
180
+ # overwrite the corresponding properties in the existing input (ie. Those
181
+ # properties will be updated). Any properties that are set to null here will
182
+ # mean that the corresponding property in the existing input will remain the
183
+ # same and not change as a result of this PATCH operation.
184
+ # @param resource_group_name [String] The name of the resource group that
185
+ # contains the resource. You can obtain this value from the Azure Resource
186
+ # Manager API or the portal.
187
+ # @param job_name [String] The name of the streaming job.
188
+ # @param input_name [String] The name of the input.
189
+ # @param if_match [String] The ETag of the input. Omit this value to always
190
+ # overwrite the current input. Specify the last-seen ETag value to prevent
191
+ # accidentally overwritting concurrent changes.
192
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
193
+ # will be added to the HTTP request.
194
+ #
195
+ # @return [Input] operation results.
196
+ #
197
+ def update(input, resource_group_name, job_name, input_name, if_match = nil, custom_headers = nil)
198
+ response = update_async(input, resource_group_name, job_name, input_name, if_match, custom_headers).value!
199
+ response.body unless response.nil?
200
+ end
201
+
202
+ #
203
+ # Updates an existing input under an existing streaming job. This can be used
204
+ # to partially update (ie. update one or two properties) an input without
205
+ # affecting the rest the job or input definition.
206
+ #
207
+ # @param input [Input] An Input object. The properties specified here will
208
+ # overwrite the corresponding properties in the existing input (ie. Those
209
+ # properties will be updated). Any properties that are set to null here will
210
+ # mean that the corresponding property in the existing input will remain the
211
+ # same and not change as a result of this PATCH operation.
212
+ # @param resource_group_name [String] The name of the resource group that
213
+ # contains the resource. You can obtain this value from the Azure Resource
214
+ # Manager API or the portal.
215
+ # @param job_name [String] The name of the streaming job.
216
+ # @param input_name [String] The name of the input.
217
+ # @param if_match [String] The ETag of the input. Omit this value to always
218
+ # overwrite the current input. Specify the last-seen ETag value to prevent
219
+ # accidentally overwritting concurrent changes.
220
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
221
+ # will be added to the HTTP request.
222
+ #
223
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
224
+ #
225
+ def update_with_http_info(input, resource_group_name, job_name, input_name, if_match = nil, custom_headers = nil)
226
+ update_async(input, resource_group_name, job_name, input_name, if_match, custom_headers).value!
227
+ end
228
+
229
+ #
230
+ # Updates an existing input under an existing streaming job. This can be used
231
+ # to partially update (ie. update one or two properties) an input without
232
+ # affecting the rest the job or input definition.
233
+ #
234
+ # @param input [Input] An Input object. The properties specified here will
235
+ # overwrite the corresponding properties in the existing input (ie. Those
236
+ # properties will be updated). Any properties that are set to null here will
237
+ # mean that the corresponding property in the existing input will remain the
238
+ # same and not change as a result of this PATCH operation.
239
+ # @param resource_group_name [String] The name of the resource group that
240
+ # contains the resource. You can obtain this value from the Azure Resource
241
+ # Manager API or the portal.
242
+ # @param job_name [String] The name of the streaming job.
243
+ # @param input_name [String] The name of the input.
244
+ # @param if_match [String] The ETag of the input. Omit this value to always
245
+ # overwrite the current input. Specify the last-seen ETag value to prevent
246
+ # accidentally overwritting concurrent changes.
247
+ # @param [Hash{String => String}] A hash of custom headers that will be added
248
+ # to the HTTP request.
249
+ #
250
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
251
+ #
252
+ def update_async(input, resource_group_name, job_name, input_name, if_match = nil, custom_headers = nil)
253
+ fail ArgumentError, 'input is nil' if input.nil?
254
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
255
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
256
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
257
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
258
+ fail ArgumentError, 'input_name is nil' if input_name.nil?
259
+
260
+
261
+ request_headers = {}
262
+
263
+ # Set Headers
264
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
265
+ request_headers['If-Match'] = if_match unless if_match.nil?
266
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
267
+
268
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
269
+
270
+ # Serialize Request
271
+ request_mapper = Azure::ARM::StreamAnalytics::Models::Input.mapper()
272
+ request_content = @client.serialize(request_mapper, input)
273
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
274
+
275
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'
276
+
277
+ request_url = @base_url || @client.base_url
278
+
279
+ options = {
280
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
281
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'inputName' => input_name},
282
+ query_params: {'api-version' => @client.api_version},
283
+ body: request_content,
284
+ headers: request_headers.merge(custom_headers || {}),
285
+ base_url: request_url
286
+ }
287
+ promise = @client.make_request_async(:patch, path_template, options)
288
+
289
+ promise = promise.then do |result|
290
+ http_response = result.response
291
+ status_code = http_response.status
292
+ response_content = http_response.body
293
+ unless status_code == 200
294
+ error_model = JSON.load(response_content)
295
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
296
+ end
297
+
298
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
299
+ # Deserialize Response
300
+ if status_code == 200
301
+ begin
302
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
303
+ result_mapper = Azure::ARM::StreamAnalytics::Models::Input.mapper()
304
+ result.body = @client.deserialize(result_mapper, parsed_response)
305
+ rescue Exception => e
306
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
307
+ end
308
+ end
309
+
310
+ result
311
+ end
312
+
313
+ promise.execute
314
+ end
315
+
316
+ #
317
+ # Deletes an input from the streaming job.
318
+ #
319
+ # @param resource_group_name [String] The name of the resource group that
320
+ # contains the resource. You can obtain this value from the Azure Resource
321
+ # Manager API or the portal.
322
+ # @param job_name [String] The name of the streaming job.
323
+ # @param input_name [String] The name of the input.
324
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
325
+ # will be added to the HTTP request.
326
+ #
327
+ #
328
+ def delete(resource_group_name, job_name, input_name, custom_headers = nil)
329
+ response = delete_async(resource_group_name, job_name, input_name, custom_headers).value!
330
+ nil
331
+ end
332
+
333
+ #
334
+ # Deletes an input from the streaming job.
335
+ #
336
+ # @param resource_group_name [String] The name of the resource group that
337
+ # contains the resource. You can obtain this value from the Azure Resource
338
+ # Manager API or the portal.
339
+ # @param job_name [String] The name of the streaming job.
340
+ # @param input_name [String] The name of the input.
341
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
342
+ # will be added to the HTTP request.
343
+ #
344
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
345
+ #
346
+ def delete_with_http_info(resource_group_name, job_name, input_name, custom_headers = nil)
347
+ delete_async(resource_group_name, job_name, input_name, custom_headers).value!
348
+ end
349
+
350
+ #
351
+ # Deletes an input from the streaming job.
352
+ #
353
+ # @param resource_group_name [String] The name of the resource group that
354
+ # contains the resource. You can obtain this value from the Azure Resource
355
+ # Manager API or the portal.
356
+ # @param job_name [String] The name of the streaming job.
357
+ # @param input_name [String] The name of the input.
358
+ # @param [Hash{String => String}] A hash of custom headers that will be added
359
+ # to the HTTP request.
360
+ #
361
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
362
+ #
363
+ def delete_async(resource_group_name, job_name, input_name, custom_headers = nil)
364
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
365
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
366
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
367
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
368
+ fail ArgumentError, 'input_name is nil' if input_name.nil?
369
+
370
+
371
+ request_headers = {}
372
+
373
+ # Set Headers
374
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
375
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
376
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'
377
+
378
+ request_url = @base_url || @client.base_url
379
+
380
+ options = {
381
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
382
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'inputName' => input_name},
383
+ query_params: {'api-version' => @client.api_version},
384
+ headers: request_headers.merge(custom_headers || {}),
385
+ base_url: request_url
386
+ }
387
+ promise = @client.make_request_async(:delete, path_template, options)
388
+
389
+ promise = promise.then do |result|
390
+ http_response = result.response
391
+ status_code = http_response.status
392
+ response_content = http_response.body
393
+ unless status_code == 200 || status_code == 204
394
+ error_model = JSON.load(response_content)
395
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
396
+ end
397
+
398
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
399
+
400
+ result
401
+ end
402
+
403
+ promise.execute
404
+ end
405
+
406
+ #
407
+ # Gets details about the specified input.
408
+ #
409
+ # @param resource_group_name [String] The name of the resource group that
410
+ # contains the resource. You can obtain this value from the Azure Resource
411
+ # Manager API or the portal.
412
+ # @param job_name [String] The name of the streaming job.
413
+ # @param input_name [String] The name of the input.
414
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
415
+ # will be added to the HTTP request.
416
+ #
417
+ # @return [Input] operation results.
418
+ #
419
+ def get(resource_group_name, job_name, input_name, custom_headers = nil)
420
+ response = get_async(resource_group_name, job_name, input_name, custom_headers).value!
421
+ response.body unless response.nil?
422
+ end
423
+
424
+ #
425
+ # Gets details about the specified input.
426
+ #
427
+ # @param resource_group_name [String] The name of the resource group that
428
+ # contains the resource. You can obtain this value from the Azure Resource
429
+ # Manager API or the portal.
430
+ # @param job_name [String] The name of the streaming job.
431
+ # @param input_name [String] The name of the input.
432
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
433
+ # will be added to the HTTP request.
434
+ #
435
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
436
+ #
437
+ def get_with_http_info(resource_group_name, job_name, input_name, custom_headers = nil)
438
+ get_async(resource_group_name, job_name, input_name, custom_headers).value!
439
+ end
440
+
441
+ #
442
+ # Gets details about the specified input.
443
+ #
444
+ # @param resource_group_name [String] The name of the resource group that
445
+ # contains the resource. You can obtain this value from the Azure Resource
446
+ # Manager API or the portal.
447
+ # @param job_name [String] The name of the streaming job.
448
+ # @param input_name [String] The name of the input.
449
+ # @param [Hash{String => String}] A hash of custom headers that will be added
450
+ # to the HTTP request.
451
+ #
452
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
453
+ #
454
+ def get_async(resource_group_name, job_name, input_name, custom_headers = nil)
455
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
456
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
457
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
458
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
459
+ fail ArgumentError, 'input_name is nil' if input_name.nil?
460
+
461
+
462
+ request_headers = {}
463
+
464
+ # Set Headers
465
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
466
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
467
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'
468
+
469
+ request_url = @base_url || @client.base_url
470
+
471
+ options = {
472
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
473
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'inputName' => input_name},
474
+ query_params: {'api-version' => @client.api_version},
475
+ headers: request_headers.merge(custom_headers || {}),
476
+ base_url: request_url
477
+ }
478
+ promise = @client.make_request_async(:get, path_template, options)
479
+
480
+ promise = promise.then do |result|
481
+ http_response = result.response
482
+ status_code = http_response.status
483
+ response_content = http_response.body
484
+ unless status_code == 200
485
+ error_model = JSON.load(response_content)
486
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
487
+ end
488
+
489
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
490
+ # Deserialize Response
491
+ if status_code == 200
492
+ begin
493
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
494
+ result_mapper = Azure::ARM::StreamAnalytics::Models::Input.mapper()
495
+ result.body = @client.deserialize(result_mapper, parsed_response)
496
+ rescue Exception => e
497
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
498
+ end
499
+ end
500
+
501
+ result
502
+ end
503
+
504
+ promise.execute
505
+ end
506
+
507
+ #
508
+ # Lists all of the inputs under the specified streaming job.
509
+ #
510
+ # @param resource_group_name [String] The name of the resource group that
511
+ # contains the resource. You can obtain this value from the Azure Resource
512
+ # Manager API or the portal.
513
+ # @param job_name [String] The name of the streaming job.
514
+ # @param select [String] The $select OData query parameter. This is a
515
+ # comma-separated list of structural properties to include in the response, or
516
+ # “*” to include all properties. By default, all properties are returned except
517
+ # diagnostics. Currently only accepts '*' as a valid value.
518
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
519
+ # will be added to the HTTP request.
520
+ #
521
+ # @return [Array<Input>] operation results.
522
+ #
523
+ def list_by_streaming_job(resource_group_name, job_name, select = nil, custom_headers = nil)
524
+ first_page = list_by_streaming_job_as_lazy(resource_group_name, job_name, select, custom_headers)
525
+ first_page.get_all_items
526
+ end
527
+
528
+ #
529
+ # Lists all of the inputs under the specified streaming job.
530
+ #
531
+ # @param resource_group_name [String] The name of the resource group that
532
+ # contains the resource. You can obtain this value from the Azure Resource
533
+ # Manager API or the portal.
534
+ # @param job_name [String] The name of the streaming job.
535
+ # @param select [String] The $select OData query parameter. This is a
536
+ # comma-separated list of structural properties to include in the response, or
537
+ # “*” to include all properties. By default, all properties are returned except
538
+ # diagnostics. Currently only accepts '*' as a valid value.
539
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
540
+ # will be added to the HTTP request.
541
+ #
542
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
543
+ #
544
+ def list_by_streaming_job_with_http_info(resource_group_name, job_name, select = nil, custom_headers = nil)
545
+ list_by_streaming_job_async(resource_group_name, job_name, select, custom_headers).value!
546
+ end
547
+
548
+ #
549
+ # Lists all of the inputs under the specified streaming job.
550
+ #
551
+ # @param resource_group_name [String] The name of the resource group that
552
+ # contains the resource. You can obtain this value from the Azure Resource
553
+ # Manager API or the portal.
554
+ # @param job_name [String] The name of the streaming job.
555
+ # @param select [String] The $select OData query parameter. This is a
556
+ # comma-separated list of structural properties to include in the response, or
557
+ # “*” to include all properties. By default, all properties are returned except
558
+ # diagnostics. Currently only accepts '*' as a valid value.
559
+ # @param [Hash{String => String}] A hash of custom headers that will be added
560
+ # to the HTTP request.
561
+ #
562
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
563
+ #
564
+ def list_by_streaming_job_async(resource_group_name, job_name, select = nil, custom_headers = nil)
565
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
566
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
567
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
568
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
569
+
570
+
571
+ request_headers = {}
572
+
573
+ # Set Headers
574
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
575
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
576
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs'
577
+
578
+ request_url = @base_url || @client.base_url
579
+
580
+ options = {
581
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
582
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name},
583
+ query_params: {'$select' => select,'api-version' => @client.api_version},
584
+ headers: request_headers.merge(custom_headers || {}),
585
+ base_url: request_url
586
+ }
587
+ promise = @client.make_request_async(:get, path_template, options)
588
+
589
+ promise = promise.then do |result|
590
+ http_response = result.response
591
+ status_code = http_response.status
592
+ response_content = http_response.body
593
+ unless status_code == 200
594
+ error_model = JSON.load(response_content)
595
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
596
+ end
597
+
598
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
599
+ # Deserialize Response
600
+ if status_code == 200
601
+ begin
602
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
603
+ result_mapper = Azure::ARM::StreamAnalytics::Models::InputListResult.mapper()
604
+ result.body = @client.deserialize(result_mapper, parsed_response)
605
+ rescue Exception => e
606
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
607
+ end
608
+ end
609
+
610
+ result
611
+ end
612
+
613
+ promise.execute
614
+ end
615
+
616
+ #
617
+ # Tests whether an input’s datasource is reachable and usable by the Azure
618
+ # Stream Analytics service.
619
+ #
620
+ # @param resource_group_name [String] The name of the resource group that
621
+ # contains the resource. You can obtain this value from the Azure Resource
622
+ # Manager API or the portal.
623
+ # @param job_name [String] The name of the streaming job.
624
+ # @param input_name [String] The name of the input.
625
+ # @param input [Input] If the input specified does not already exist, this
626
+ # parameter must contain the full input definition intended to be tested. If
627
+ # the input specified already exists, this parameter can be left null to test
628
+ # the existing input as is or if specified, the properties specified will
629
+ # overwrite the corresponding properties in the existing input (exactly like a
630
+ # PATCH operation) and the resulting input will be tested.
631
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
632
+ # will be added to the HTTP request.
633
+ #
634
+ # @return [ResourceTestStatus] operation results.
635
+ #
636
+ def test(resource_group_name, job_name, input_name, input = nil, custom_headers = nil)
637
+ response = test_async(resource_group_name, job_name, input_name, input, custom_headers).value!
638
+ response.body unless response.nil?
639
+ end
640
+
641
+ #
642
+ # @param resource_group_name [String] The name of the resource group that
643
+ # contains the resource. You can obtain this value from the Azure Resource
644
+ # Manager API or the portal.
645
+ # @param job_name [String] The name of the streaming job.
646
+ # @param input_name [String] The name of the input.
647
+ # @param input [Input] If the input specified does not already exist, this
648
+ # parameter must contain the full input definition intended to be tested. If
649
+ # the input specified already exists, this parameter can be left null to test
650
+ # the existing input as is or if specified, the properties specified will
651
+ # overwrite the corresponding properties in the existing input (exactly like a
652
+ # PATCH operation) and the resulting input will be tested.
653
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
654
+ # will be added to the HTTP request.
655
+ #
656
+ # @return [Concurrent::Promise] promise which provides async access to http
657
+ # response.
658
+ #
659
+ def test_async(resource_group_name, job_name, input_name, input = nil, custom_headers = nil)
660
+ # Send request
661
+ promise = begin_test_async(resource_group_name, job_name, input_name, input, custom_headers)
662
+
663
+ promise = promise.then do |response|
664
+ # Defining deserialization method.
665
+ deserialize_method = lambda do |parsed_response|
666
+ result_mapper = Azure::ARM::StreamAnalytics::Models::ResourceTestStatus.mapper()
667
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
668
+ end
669
+
670
+ # Waiting for response.
671
+ @client.get_long_running_operation_result(response, deserialize_method)
672
+ end
673
+
674
+ promise
675
+ end
676
+
677
+ #
678
+ # Tests whether an input’s datasource is reachable and usable by the Azure
679
+ # Stream Analytics service.
680
+ #
681
+ # @param resource_group_name [String] The name of the resource group that
682
+ # contains the resource. You can obtain this value from the Azure Resource
683
+ # Manager API or the portal.
684
+ # @param job_name [String] The name of the streaming job.
685
+ # @param input_name [String] The name of the input.
686
+ # @param input [Input] If the input specified does not already exist, this
687
+ # parameter must contain the full input definition intended to be tested. If
688
+ # the input specified already exists, this parameter can be left null to test
689
+ # the existing input as is or if specified, the properties specified will
690
+ # overwrite the corresponding properties in the existing input (exactly like a
691
+ # PATCH operation) and the resulting input will be tested.
692
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
693
+ # will be added to the HTTP request.
694
+ #
695
+ # @return [ResourceTestStatus] operation results.
696
+ #
697
+ def begin_test(resource_group_name, job_name, input_name, input = nil, custom_headers = nil)
698
+ response = begin_test_async(resource_group_name, job_name, input_name, input, custom_headers).value!
699
+ response.body unless response.nil?
700
+ end
701
+
702
+ #
703
+ # Tests whether an input’s datasource is reachable and usable by the Azure
704
+ # Stream Analytics service.
705
+ #
706
+ # @param resource_group_name [String] The name of the resource group that
707
+ # contains the resource. You can obtain this value from the Azure Resource
708
+ # Manager API or the portal.
709
+ # @param job_name [String] The name of the streaming job.
710
+ # @param input_name [String] The name of the input.
711
+ # @param input [Input] If the input specified does not already exist, this
712
+ # parameter must contain the full input definition intended to be tested. If
713
+ # the input specified already exists, this parameter can be left null to test
714
+ # the existing input as is or if specified, the properties specified will
715
+ # overwrite the corresponding properties in the existing input (exactly like a
716
+ # PATCH operation) and the resulting input will be tested.
717
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
718
+ # will be added to the HTTP request.
719
+ #
720
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
721
+ #
722
+ def begin_test_with_http_info(resource_group_name, job_name, input_name, input = nil, custom_headers = nil)
723
+ begin_test_async(resource_group_name, job_name, input_name, input, custom_headers).value!
724
+ end
725
+
726
+ #
727
+ # Tests whether an input’s datasource is reachable and usable by the Azure
728
+ # Stream Analytics service.
729
+ #
730
+ # @param resource_group_name [String] The name of the resource group that
731
+ # contains the resource. You can obtain this value from the Azure Resource
732
+ # Manager API or the portal.
733
+ # @param job_name [String] The name of the streaming job.
734
+ # @param input_name [String] The name of the input.
735
+ # @param input [Input] If the input specified does not already exist, this
736
+ # parameter must contain the full input definition intended to be tested. If
737
+ # the input specified already exists, this parameter can be left null to test
738
+ # the existing input as is or if specified, the properties specified will
739
+ # overwrite the corresponding properties in the existing input (exactly like a
740
+ # PATCH operation) and the resulting input will be tested.
741
+ # @param [Hash{String => String}] A hash of custom headers that will be added
742
+ # to the HTTP request.
743
+ #
744
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
745
+ #
746
+ def begin_test_async(resource_group_name, job_name, input_name, input = nil, custom_headers = nil)
747
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
748
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
749
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
750
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
751
+ fail ArgumentError, 'input_name is nil' if input_name.nil?
752
+
753
+
754
+ request_headers = {}
755
+
756
+ # Set Headers
757
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
758
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
759
+
760
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
761
+
762
+ # Serialize Request
763
+ request_mapper = Azure::ARM::StreamAnalytics::Models::Input.mapper()
764
+ request_content = @client.serialize(request_mapper, input)
765
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
766
+
767
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test'
768
+
769
+ request_url = @base_url || @client.base_url
770
+
771
+ options = {
772
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
773
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'jobName' => job_name,'inputName' => input_name},
774
+ query_params: {'api-version' => @client.api_version},
775
+ body: request_content,
776
+ headers: request_headers.merge(custom_headers || {}),
777
+ base_url: request_url
778
+ }
779
+ promise = @client.make_request_async(:post, path_template, options)
780
+
781
+ promise = promise.then do |result|
782
+ http_response = result.response
783
+ status_code = http_response.status
784
+ response_content = http_response.body
785
+ unless status_code == 200 || status_code == 202
786
+ error_model = JSON.load(response_content)
787
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
788
+ end
789
+
790
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
791
+ # Deserialize Response
792
+ if status_code == 200
793
+ begin
794
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
795
+ result_mapper = Azure::ARM::StreamAnalytics::Models::ResourceTestStatus.mapper()
796
+ result.body = @client.deserialize(result_mapper, parsed_response)
797
+ rescue Exception => e
798
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
799
+ end
800
+ end
801
+
802
+ result
803
+ end
804
+
805
+ promise.execute
806
+ end
807
+
808
+ #
809
+ # Lists all of the inputs under the specified streaming job.
810
+ #
811
+ # @param next_page_link [String] The NextLink from the previous successful call
812
+ # to List operation.
813
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
814
+ # will be added to the HTTP request.
815
+ #
816
+ # @return [InputListResult] operation results.
817
+ #
818
+ def list_by_streaming_job_next(next_page_link, custom_headers = nil)
819
+ response = list_by_streaming_job_next_async(next_page_link, custom_headers).value!
820
+ response.body unless response.nil?
821
+ end
822
+
823
+ #
824
+ # Lists all of the inputs under the specified streaming job.
825
+ #
826
+ # @param next_page_link [String] The NextLink from the previous successful call
827
+ # to List operation.
828
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
829
+ # will be added to the HTTP request.
830
+ #
831
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
832
+ #
833
+ def list_by_streaming_job_next_with_http_info(next_page_link, custom_headers = nil)
834
+ list_by_streaming_job_next_async(next_page_link, custom_headers).value!
835
+ end
836
+
837
+ #
838
+ # Lists all of the inputs under the specified streaming job.
839
+ #
840
+ # @param next_page_link [String] The NextLink from the previous successful call
841
+ # to List operation.
842
+ # @param [Hash{String => String}] A hash of custom headers that will be added
843
+ # to the HTTP request.
844
+ #
845
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
846
+ #
847
+ def list_by_streaming_job_next_async(next_page_link, custom_headers = nil)
848
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
849
+
850
+
851
+ request_headers = {}
852
+
853
+ # Set Headers
854
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
855
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
856
+ path_template = '{nextLink}'
857
+
858
+ request_url = @base_url || @client.base_url
859
+
860
+ options = {
861
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
862
+ skip_encoding_path_params: {'nextLink' => next_page_link},
863
+ headers: request_headers.merge(custom_headers || {}),
864
+ base_url: request_url
865
+ }
866
+ promise = @client.make_request_async(:get, path_template, options)
867
+
868
+ promise = promise.then do |result|
869
+ http_response = result.response
870
+ status_code = http_response.status
871
+ response_content = http_response.body
872
+ unless status_code == 200
873
+ error_model = JSON.load(response_content)
874
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
875
+ end
876
+
877
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
878
+ # Deserialize Response
879
+ if status_code == 200
880
+ begin
881
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
882
+ result_mapper = Azure::ARM::StreamAnalytics::Models::InputListResult.mapper()
883
+ result.body = @client.deserialize(result_mapper, parsed_response)
884
+ rescue Exception => e
885
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
886
+ end
887
+ end
888
+
889
+ result
890
+ end
891
+
892
+ promise.execute
893
+ end
894
+
895
+ #
896
+ # Lists all of the inputs under the specified streaming job.
897
+ #
898
+ # @param resource_group_name [String] The name of the resource group that
899
+ # contains the resource. You can obtain this value from the Azure Resource
900
+ # Manager API or the portal.
901
+ # @param job_name [String] The name of the streaming job.
902
+ # @param select [String] The $select OData query parameter. This is a
903
+ # comma-separated list of structural properties to include in the response, or
904
+ # “*” to include all properties. By default, all properties are returned except
905
+ # diagnostics. Currently only accepts '*' as a valid value.
906
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
907
+ # will be added to the HTTP request.
908
+ #
909
+ # @return [InputListResult] which provide lazy access to pages of the response.
910
+ #
911
+ def list_by_streaming_job_as_lazy(resource_group_name, job_name, select = nil, custom_headers = nil)
912
+ response = list_by_streaming_job_async(resource_group_name, job_name, select, custom_headers).value!
913
+ unless response.nil?
914
+ page = response.body
915
+ page.next_method = Proc.new do |next_page_link|
916
+ list_by_streaming_job_next_async(next_page_link, custom_headers)
917
+ end
918
+ page
919
+ end
920
+ end
921
+
922
+ end
923
+ end