azure_mgmt_event_grid 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +143 -0
  3. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/event_subscriptions.rb +18 -18
  4. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/endpoint_type.rb +15 -0
  5. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/event_subscription.rb +124 -0
  6. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +68 -0
  7. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/event_subscription_filter.rb +1 -1
  8. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/event_subscription_full_url.rb +1 -1
  9. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +1 -1
  10. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +76 -0
  11. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +1 -1
  12. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/event_type.rb +1 -1
  13. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/event_types_list_result.rb +1 -1
  14. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/operation.rb +1 -1
  15. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/operation_info.rb +1 -1
  16. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/operation_origin.rb +1 -1
  17. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/operations_list_result.rb +1 -1
  18. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/resource.rb +1 -1
  19. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/resource_region_type.rb +1 -1
  20. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/topic.rb +1 -1
  21. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/topic_provisioning_state.rb +1 -1
  22. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +1 -1
  23. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +1 -1
  24. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/topic_type_info.rb +111 -0
  25. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +1 -1
  26. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/topic_types_list_result.rb +1 -1
  27. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/topics_list_result.rb +1 -1
  28. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/models/tracked_resource.rb +1 -1
  29. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/module_definition.rb +9 -0
  30. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/operations.rb +2 -2
  31. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/topic_types.rb +4 -4
  32. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/topics.rb +11 -11
  33. data/lib/{generated → 2017-06-15-preview/generated}/azure_mgmt_event_grid/version.rb +2 -2
  34. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid.rb +56 -0
  35. data/lib/{generated → 2017-09-15-preview/generated}/azure_mgmt_event_grid/event_grid_management_client.rb +3 -3
  36. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb +1803 -0
  37. data/lib/{generated → 2017-09-15-preview/generated}/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +1 -1
  38. data/lib/{generated → 2017-09-15-preview/generated}/azure_mgmt_event_grid/models/event_subscription.rb +1 -1
  39. data/lib/{generated → 2017-09-15-preview/generated}/azure_mgmt_event_grid/models/event_subscription_destination.rb +1 -1
  40. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +92 -0
  41. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +45 -0
  42. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +20 -0
  43. data/lib/{generated → 2017-09-15-preview/generated}/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +1 -1
  44. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +52 -0
  45. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_type.rb +88 -0
  46. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +52 -0
  47. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/operation.rb +76 -0
  48. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/operation_info.rb +74 -0
  49. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/operation_origin.rb +17 -0
  50. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/operations_list_result.rb +52 -0
  51. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/resource.rb +67 -0
  52. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -0
  53. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topic.rb +103 -0
  54. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -0
  55. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +44 -0
  56. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +54 -0
  57. data/lib/{generated → 2017-09-15-preview/generated}/azure_mgmt_event_grid/models/topic_type_info.rb +1 -1
  58. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -0
  59. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +52 -0
  60. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topics_list_result.rb +52 -0
  61. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/tracked_resource.rb +85 -0
  62. data/lib/{generated → 2017-09-15-preview/generated}/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +1 -1
  63. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/module_definition.rb +9 -0
  64. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/operations.rb +115 -0
  65. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/topic_types.rb +296 -0
  66. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/topics.rb +926 -0
  67. data/lib/{generated/azure_mgmt_event_grid/module_definition.rb → 2017-09-15-preview/generated/azure_mgmt_event_grid/version.rb} +3 -3
  68. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid.rb +57 -0
  69. data/lib/azure_mgmt_event_grid.rb +3 -2
  70. data/lib/module_definition.rb +7 -0
  71. data/lib/profiles/common/configurable.rb +73 -0
  72. data/lib/profiles/common/default.rb +68 -0
  73. data/lib/profiles/latest/eventgrid_latest_profile_client.rb +33 -0
  74. data/lib/profiles/latest/eventgrid_module_definition.rb +9 -0
  75. data/lib/profiles/latest/modules/eventgrid_profile_module.rb +152 -0
  76. data/lib/version.rb +7 -0
  77. metadata +76 -36
  78. data/lib/generated/azure_mgmt_event_grid.rb +0 -57
@@ -0,0 +1,296 @@
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::EventGrid::Mgmt::V2017_09_15_preview
7
+ #
8
+ # Azure EventGrid Management Client
9
+ #
10
+ class TopicTypes
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the TopicTypes class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [EventGridManagementClient] reference to the EventGridManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # List topic types
26
+ #
27
+ # List all registered topic types
28
+ #
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [TopicTypesListResult] operation results.
33
+ #
34
+ def list(custom_headers = nil)
35
+ response = list_async(custom_headers).value!
36
+ response.body unless response.nil?
37
+ end
38
+
39
+ #
40
+ # List topic types
41
+ #
42
+ # List all registered topic types
43
+ #
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_with_http_info(custom_headers = nil)
50
+ list_async(custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # List topic types
55
+ #
56
+ # List all registered topic types
57
+ #
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_async(custom_headers = nil)
64
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
65
+
66
+
67
+ request_headers = {}
68
+
69
+ # Set Headers
70
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
71
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
72
+ path_template = 'providers/Microsoft.EventGrid/topicTypes'
73
+
74
+ request_url = @base_url || @client.base_url
75
+
76
+ options = {
77
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
78
+ query_params: {'api-version' => @client.api_version},
79
+ headers: request_headers.merge(custom_headers || {}),
80
+ base_url: request_url
81
+ }
82
+ promise = @client.make_request_async(:get, path_template, options)
83
+
84
+ promise = promise.then do |result|
85
+ http_response = result.response
86
+ status_code = http_response.status
87
+ response_content = http_response.body
88
+ unless status_code == 200
89
+ error_model = JSON.load(response_content)
90
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
91
+ end
92
+
93
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
94
+ # Deserialize Response
95
+ if status_code == 200
96
+ begin
97
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
98
+ result_mapper = Azure::EventGrid::Mgmt::V2017_09_15_preview::Models::TopicTypesListResult.mapper()
99
+ result.body = @client.deserialize(result_mapper, parsed_response)
100
+ rescue Exception => e
101
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
102
+ end
103
+ end
104
+
105
+ result
106
+ end
107
+
108
+ promise.execute
109
+ end
110
+
111
+ #
112
+ # Get a topic type
113
+ #
114
+ # Get information about a topic type
115
+ #
116
+ # @param topic_type_name [String] Name of the topic type
117
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
118
+ # will be added to the HTTP request.
119
+ #
120
+ # @return [TopicTypeInfo] operation results.
121
+ #
122
+ def get(topic_type_name, custom_headers = nil)
123
+ response = get_async(topic_type_name, custom_headers).value!
124
+ response.body unless response.nil?
125
+ end
126
+
127
+ #
128
+ # Get a topic type
129
+ #
130
+ # Get information about a topic type
131
+ #
132
+ # @param topic_type_name [String] Name of the topic type
133
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
134
+ # will be added to the HTTP request.
135
+ #
136
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
137
+ #
138
+ def get_with_http_info(topic_type_name, custom_headers = nil)
139
+ get_async(topic_type_name, custom_headers).value!
140
+ end
141
+
142
+ #
143
+ # Get a topic type
144
+ #
145
+ # Get information about a topic type
146
+ #
147
+ # @param topic_type_name [String] Name of the topic type
148
+ # @param [Hash{String => String}] A hash of custom headers that will be added
149
+ # to the HTTP request.
150
+ #
151
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
152
+ #
153
+ def get_async(topic_type_name, custom_headers = nil)
154
+ fail ArgumentError, 'topic_type_name is nil' if topic_type_name.nil?
155
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
156
+
157
+
158
+ request_headers = {}
159
+
160
+ # Set Headers
161
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
162
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
163
+ path_template = 'providers/Microsoft.EventGrid/topicTypes/{topicTypeName}'
164
+
165
+ request_url = @base_url || @client.base_url
166
+
167
+ options = {
168
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
169
+ path_params: {'topicTypeName' => topic_type_name},
170
+ query_params: {'api-version' => @client.api_version},
171
+ headers: request_headers.merge(custom_headers || {}),
172
+ base_url: request_url
173
+ }
174
+ promise = @client.make_request_async(:get, path_template, options)
175
+
176
+ promise = promise.then do |result|
177
+ http_response = result.response
178
+ status_code = http_response.status
179
+ response_content = http_response.body
180
+ unless status_code == 200
181
+ error_model = JSON.load(response_content)
182
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
183
+ end
184
+
185
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
186
+ # Deserialize Response
187
+ if status_code == 200
188
+ begin
189
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
190
+ result_mapper = Azure::EventGrid::Mgmt::V2017_09_15_preview::Models::TopicTypeInfo.mapper()
191
+ result.body = @client.deserialize(result_mapper, parsed_response)
192
+ rescue Exception => e
193
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
194
+ end
195
+ end
196
+
197
+ result
198
+ end
199
+
200
+ promise.execute
201
+ end
202
+
203
+ #
204
+ # List event types
205
+ #
206
+ # List event types for a topic type
207
+ #
208
+ # @param topic_type_name [String] Name of the topic type
209
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
210
+ # will be added to the HTTP request.
211
+ #
212
+ # @return [EventTypesListResult] operation results.
213
+ #
214
+ def list_event_types(topic_type_name, custom_headers = nil)
215
+ response = list_event_types_async(topic_type_name, custom_headers).value!
216
+ response.body unless response.nil?
217
+ end
218
+
219
+ #
220
+ # List event types
221
+ #
222
+ # List event types for a topic type
223
+ #
224
+ # @param topic_type_name [String] Name of the topic type
225
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
226
+ # will be added to the HTTP request.
227
+ #
228
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
229
+ #
230
+ def list_event_types_with_http_info(topic_type_name, custom_headers = nil)
231
+ list_event_types_async(topic_type_name, custom_headers).value!
232
+ end
233
+
234
+ #
235
+ # List event types
236
+ #
237
+ # List event types for a topic type
238
+ #
239
+ # @param topic_type_name [String] Name of the topic type
240
+ # @param [Hash{String => String}] A hash of custom headers that will be added
241
+ # to the HTTP request.
242
+ #
243
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
244
+ #
245
+ def list_event_types_async(topic_type_name, custom_headers = nil)
246
+ fail ArgumentError, 'topic_type_name is nil' if topic_type_name.nil?
247
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
248
+
249
+
250
+ request_headers = {}
251
+
252
+ # Set Headers
253
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
254
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
255
+ path_template = 'providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventTypes'
256
+
257
+ request_url = @base_url || @client.base_url
258
+
259
+ options = {
260
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
261
+ path_params: {'topicTypeName' => topic_type_name},
262
+ query_params: {'api-version' => @client.api_version},
263
+ headers: request_headers.merge(custom_headers || {}),
264
+ base_url: request_url
265
+ }
266
+ promise = @client.make_request_async(:get, path_template, options)
267
+
268
+ promise = promise.then do |result|
269
+ http_response = result.response
270
+ status_code = http_response.status
271
+ response_content = http_response.body
272
+ unless status_code == 200
273
+ error_model = JSON.load(response_content)
274
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
275
+ end
276
+
277
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
278
+ # Deserialize Response
279
+ if status_code == 200
280
+ begin
281
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
282
+ result_mapper = Azure::EventGrid::Mgmt::V2017_09_15_preview::Models::EventTypesListResult.mapper()
283
+ result.body = @client.deserialize(result_mapper, parsed_response)
284
+ rescue Exception => e
285
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
286
+ end
287
+ end
288
+
289
+ result
290
+ end
291
+
292
+ promise.execute
293
+ end
294
+
295
+ end
296
+ end