azure_mgmt_stream_analytics 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
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,97 @@
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
+ module Models
8
+ #
9
+ # Object containing a list of streaming jobs.
10
+ #
11
+ class StreamingJobListResult
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [Array<StreamingJob>] A list of streaming jobs. Populated by a
17
+ # 'List' operation.
18
+ attr_accessor :value
19
+
20
+ # @return [String] The link (url) to the next page of results.
21
+ attr_accessor :next_link
22
+
23
+ # return [Proc] with next page method call.
24
+ attr_accessor :next_method
25
+
26
+ #
27
+ # Gets the rest of the items for the request, enabling auto-pagination.
28
+ #
29
+ # @return [Array<StreamingJob>] operation results.
30
+ #
31
+ def get_all_items
32
+ items = @value
33
+ page = self
34
+ while page.next_link != nil do
35
+ page = page.get_next_page
36
+ items.concat(page.value)
37
+ end
38
+ items
39
+ end
40
+
41
+ #
42
+ # Gets the next page of results.
43
+ #
44
+ # @return [StreamingJobListResult] with next page content.
45
+ #
46
+ def get_next_page
47
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
48
+ unless response.nil?
49
+ @next_link = response.body.next_link
50
+ @value = response.body.value
51
+ self
52
+ end
53
+ end
54
+
55
+ #
56
+ # Mapper for StreamingJobListResult class as Ruby Hash.
57
+ # This will be used for serialization/deserialization.
58
+ #
59
+ def self.mapper()
60
+ {
61
+ required: false,
62
+ serialized_name: 'StreamingJobListResult',
63
+ type: {
64
+ name: 'Composite',
65
+ class_name: 'StreamingJobListResult',
66
+ model_properties: {
67
+ value: {
68
+ required: false,
69
+ read_only: true,
70
+ serialized_name: 'value',
71
+ type: {
72
+ name: 'Sequence',
73
+ element: {
74
+ required: false,
75
+ serialized_name: 'StreamingJobElementType',
76
+ type: {
77
+ name: 'Composite',
78
+ class_name: 'StreamingJob'
79
+ }
80
+ }
81
+ }
82
+ },
83
+ next_link: {
84
+ required: false,
85
+ read_only: true,
86
+ serialized_name: 'nextLink',
87
+ type: {
88
+ name: 'String'
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ end
95
+ end
96
+ end
97
+ end
@@ -0,0 +1,64 @@
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
+ module Models
8
+ #
9
+ # The base sub-resource model definition.
10
+ #
11
+ class SubResource < MsRestAzure::SubResource
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [String] Resource name
17
+ attr_accessor :name
18
+
19
+ # @return [String] Resource type
20
+ attr_accessor :type
21
+
22
+
23
+ #
24
+ # Mapper for SubResource class as Ruby Hash.
25
+ # This will be used for serialization/deserialization.
26
+ #
27
+ def self.mapper()
28
+ {
29
+ required: false,
30
+ serialized_name: 'SubResource',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'SubResource',
34
+ model_properties: {
35
+ id: {
36
+ required: false,
37
+ read_only: true,
38
+ serialized_name: 'id',
39
+ type: {
40
+ name: 'String'
41
+ }
42
+ },
43
+ name: {
44
+ required: false,
45
+ serialized_name: 'name',
46
+ type: {
47
+ name: 'String'
48
+ }
49
+ },
50
+ type: {
51
+ required: false,
52
+ read_only: true,
53
+ serialized_name: 'type',
54
+ type: {
55
+ name: 'String'
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,80 @@
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
+ module Models
8
+ #
9
+ # Describes the current quota for the subscription.
10
+ #
11
+ class SubscriptionQuota < MsRestAzure::SubResource
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [Integer] The max permitted usage of this resource.
17
+ attr_accessor :max_count
18
+
19
+ # @return [Integer] The current usage of this resource.
20
+ attr_accessor :current_count
21
+
22
+
23
+ #
24
+ # Mapper for SubscriptionQuota class as Ruby Hash.
25
+ # This will be used for serialization/deserialization.
26
+ #
27
+ def self.mapper()
28
+ {
29
+ required: false,
30
+ serialized_name: 'SubscriptionQuota',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'SubscriptionQuota',
34
+ model_properties: {
35
+ id: {
36
+ required: false,
37
+ read_only: true,
38
+ serialized_name: 'id',
39
+ type: {
40
+ name: 'String'
41
+ }
42
+ },
43
+ name: {
44
+ required: false,
45
+ serialized_name: 'name',
46
+ type: {
47
+ name: 'String'
48
+ }
49
+ },
50
+ type: {
51
+ required: false,
52
+ read_only: true,
53
+ serialized_name: 'type',
54
+ type: {
55
+ name: 'String'
56
+ }
57
+ },
58
+ max_count: {
59
+ required: false,
60
+ read_only: true,
61
+ serialized_name: 'properties.maxCount',
62
+ type: {
63
+ name: 'Number'
64
+ }
65
+ },
66
+ current_count: {
67
+ required: false,
68
+ read_only: true,
69
+ serialized_name: 'properties.currentCount',
70
+ type: {
71
+ name: 'Number'
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ end
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,56 @@
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
+ module Models
8
+ #
9
+ # Result of the GetQuotas operation. It contains a list of quotas for the
10
+ # subscription in a particular region.
11
+ #
12
+ class SubscriptionQuotasListResult
13
+
14
+ include MsRestAzure
15
+
16
+ include MsRest::JSONable
17
+ # @return [Array<SubscriptionQuota>] List of quotas for the subscription
18
+ # in a particular region.
19
+ attr_accessor :value
20
+
21
+
22
+ #
23
+ # Mapper for SubscriptionQuotasListResult class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ required: false,
29
+ serialized_name: 'SubscriptionQuotasListResult',
30
+ type: {
31
+ name: 'Composite',
32
+ class_name: 'SubscriptionQuotasListResult',
33
+ model_properties: {
34
+ value: {
35
+ required: false,
36
+ read_only: true,
37
+ serialized_name: 'value',
38
+ type: {
39
+ name: 'Sequence',
40
+ element: {
41
+ required: false,
42
+ serialized_name: 'SubscriptionQuotaElementType',
43
+ type: {
44
+ name: 'Composite',
45
+ class_name: 'SubscriptionQuota'
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,98 @@
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
+ module Models
8
+ #
9
+ # A transformation object, containing all information associated with the
10
+ # named transformation. All transformations are contained under a streaming
11
+ # job.
12
+ #
13
+ class Transformation < MsRestAzure::SubResource
14
+
15
+ include MsRestAzure
16
+
17
+ include MsRest::JSONable
18
+ # @return [Integer] Specifies the number of streaming units that the
19
+ # streaming job uses.
20
+ attr_accessor :streaming_units
21
+
22
+ # @return [String] Specifies the query that will be run in the streaming
23
+ # job. You can learn more about the Stream Analytics Query Language
24
+ # (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 .
25
+ # Required on PUT (CreateOrReplace) requests.
26
+ attr_accessor :query
27
+
28
+ # @return [String] The current entity tag for the transformation. This is
29
+ # an opaque string. You can use it to detect whether the resource has
30
+ # changed between requests. You can also use it in the If-Match or
31
+ # If-None-Match headers for write operations for optimistic concurrency.
32
+ attr_accessor :etag
33
+
34
+
35
+ #
36
+ # Mapper for Transformation class as Ruby Hash.
37
+ # This will be used for serialization/deserialization.
38
+ #
39
+ def self.mapper()
40
+ {
41
+ required: false,
42
+ serialized_name: 'Transformation',
43
+ type: {
44
+ name: 'Composite',
45
+ class_name: 'Transformation',
46
+ model_properties: {
47
+ id: {
48
+ required: false,
49
+ read_only: true,
50
+ serialized_name: 'id',
51
+ type: {
52
+ name: 'String'
53
+ }
54
+ },
55
+ name: {
56
+ required: false,
57
+ serialized_name: 'name',
58
+ type: {
59
+ name: 'String'
60
+ }
61
+ },
62
+ type: {
63
+ required: false,
64
+ read_only: true,
65
+ serialized_name: 'type',
66
+ type: {
67
+ name: 'String'
68
+ }
69
+ },
70
+ streaming_units: {
71
+ required: false,
72
+ serialized_name: 'properties.streamingUnits',
73
+ type: {
74
+ name: 'Number'
75
+ }
76
+ },
77
+ query: {
78
+ required: false,
79
+ serialized_name: 'properties.query',
80
+ type: {
81
+ name: 'String'
82
+ }
83
+ },
84
+ etag: {
85
+ required: false,
86
+ read_only: true,
87
+ serialized_name: 'properties.etag',
88
+ type: {
89
+ name: 'String'
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ end
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,15 @@
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
+ module Models
8
+ #
9
+ # Defines values for UdfType
10
+ #
11
+ module UdfType
12
+ Scalar = "Scalar"
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,8 @@
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 end
7
+ module Azure::ARM end
8
+ module Azure::ARM::StreamAnalytics end
@@ -0,0 +1,213 @@
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 Operations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Operations 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
+ # Lists all of the available Stream Analytics related operations.
26
+ #
27
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
28
+ # will be added to the HTTP request.
29
+ #
30
+ # @return [Array<Operation>] operation results.
31
+ #
32
+ def list(custom_headers = nil)
33
+ first_page = list_as_lazy(custom_headers)
34
+ first_page.get_all_items
35
+ end
36
+
37
+ #
38
+ # Lists all of the available Stream Analytics related operations.
39
+ #
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
44
+ #
45
+ def list_with_http_info(custom_headers = nil)
46
+ list_async(custom_headers).value!
47
+ end
48
+
49
+ #
50
+ # Lists all of the available Stream Analytics related operations.
51
+ #
52
+ # @param [Hash{String => String}] A hash of custom headers that will be added
53
+ # to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
56
+ #
57
+ def list_async(custom_headers = nil)
58
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
59
+
60
+
61
+ request_headers = {}
62
+
63
+ # Set Headers
64
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
65
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
66
+ path_template = 'providers/Microsoft.StreamAnalytics/operations'
67
+
68
+ request_url = @base_url || @client.base_url
69
+
70
+ options = {
71
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
72
+ query_params: {'api-version' => @client.api_version},
73
+ headers: request_headers.merge(custom_headers || {}),
74
+ base_url: request_url
75
+ }
76
+ promise = @client.make_request_async(:get, path_template, options)
77
+
78
+ promise = promise.then do |result|
79
+ http_response = result.response
80
+ status_code = http_response.status
81
+ response_content = http_response.body
82
+ unless status_code == 200
83
+ error_model = JSON.load(response_content)
84
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
85
+ end
86
+
87
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
88
+ # Deserialize Response
89
+ if status_code == 200
90
+ begin
91
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
92
+ result_mapper = Azure::ARM::StreamAnalytics::Models::OperationListResult.mapper()
93
+ result.body = @client.deserialize(result_mapper, parsed_response)
94
+ rescue Exception => e
95
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
96
+ end
97
+ end
98
+
99
+ result
100
+ end
101
+
102
+ promise.execute
103
+ end
104
+
105
+ #
106
+ # Lists all of the available Stream Analytics related operations.
107
+ #
108
+ # @param next_page_link [String] The NextLink from the previous successful call
109
+ # to List operation.
110
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
111
+ # will be added to the HTTP request.
112
+ #
113
+ # @return [OperationListResult] operation results.
114
+ #
115
+ def list_next(next_page_link, custom_headers = nil)
116
+ response = list_next_async(next_page_link, custom_headers).value!
117
+ response.body unless response.nil?
118
+ end
119
+
120
+ #
121
+ # Lists all of the available Stream Analytics related operations.
122
+ #
123
+ # @param next_page_link [String] The NextLink from the previous successful call
124
+ # to List operation.
125
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
126
+ # will be added to the HTTP request.
127
+ #
128
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
129
+ #
130
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
131
+ list_next_async(next_page_link, custom_headers).value!
132
+ end
133
+
134
+ #
135
+ # Lists all of the available Stream Analytics related operations.
136
+ #
137
+ # @param next_page_link [String] The NextLink from the previous successful call
138
+ # to List operation.
139
+ # @param [Hash{String => String}] A hash of custom headers that will be added
140
+ # to the HTTP request.
141
+ #
142
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
143
+ #
144
+ def list_next_async(next_page_link, custom_headers = nil)
145
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
146
+
147
+
148
+ request_headers = {}
149
+
150
+ # Set Headers
151
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
152
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
153
+ path_template = '{nextLink}'
154
+
155
+ request_url = @base_url || @client.base_url
156
+
157
+ options = {
158
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
159
+ skip_encoding_path_params: {'nextLink' => next_page_link},
160
+ headers: request_headers.merge(custom_headers || {}),
161
+ base_url: request_url
162
+ }
163
+ promise = @client.make_request_async(:get, path_template, options)
164
+
165
+ promise = promise.then do |result|
166
+ http_response = result.response
167
+ status_code = http_response.status
168
+ response_content = http_response.body
169
+ unless status_code == 200
170
+ error_model = JSON.load(response_content)
171
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
172
+ end
173
+
174
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
175
+ # Deserialize Response
176
+ if status_code == 200
177
+ begin
178
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
179
+ result_mapper = Azure::ARM::StreamAnalytics::Models::OperationListResult.mapper()
180
+ result.body = @client.deserialize(result_mapper, parsed_response)
181
+ rescue Exception => e
182
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
183
+ end
184
+ end
185
+
186
+ result
187
+ end
188
+
189
+ promise.execute
190
+ end
191
+
192
+ #
193
+ # Lists all of the available Stream Analytics related operations.
194
+ #
195
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
196
+ # will be added to the HTTP request.
197
+ #
198
+ # @return [OperationListResult] which provide lazy access to pages of the
199
+ # response.
200
+ #
201
+ def list_as_lazy(custom_headers = nil)
202
+ response = list_async(custom_headers).value!
203
+ unless response.nil?
204
+ page = response.body
205
+ page.next_method = Proc.new do |next_page_link|
206
+ list_next_async(next_page_link, custom_headers)
207
+ end
208
+ page
209
+ end
210
+ end
211
+
212
+ end
213
+ end