azure_mgmt_event_grid 0.15.2 → 0.15.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +4 -1
  3. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb +4 -4
  4. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/topics.rb +4 -4
  5. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +4 -1
  6. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb +4 -4
  7. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +54 -0
  8. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/topics.rb +170 -4
  9. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid.rb +9 -8
  10. data/lib/2018-01-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +144 -0
  11. data/lib/2018-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb +1799 -0
  12. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +62 -0
  13. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_subscription.rb +136 -0
  14. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +47 -0
  15. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +98 -0
  16. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -0
  17. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +20 -0
  18. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +83 -0
  19. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +55 -0
  20. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_type.rb +95 -0
  21. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -0
  22. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/operation.rb +80 -0
  23. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -0
  24. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -0
  25. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/resource.rb +71 -0
  26. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -0
  27. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic.rb +112 -0
  28. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -0
  29. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -0
  30. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -0
  31. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic_type_info.rb +139 -0
  32. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -0
  33. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -0
  34. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +54 -0
  35. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topics_list_result.rb +55 -0
  36. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -0
  37. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +75 -0
  38. data/lib/2018-01-01/generated/azure_mgmt_event_grid/module_definition.rb +9 -0
  39. data/lib/2018-01-01/generated/azure_mgmt_event_grid/operations.rb +115 -0
  40. data/lib/2018-01-01/generated/azure_mgmt_event_grid/topic_types.rb +296 -0
  41. data/lib/2018-01-01/generated/azure_mgmt_event_grid/topics.rb +1092 -0
  42. data/lib/2018-01-01/generated/azure_mgmt_event_grid.rb +57 -0
  43. data/lib/azure_mgmt_event_grid.rb +1 -0
  44. data/lib/profiles/latest/eventgrid_latest_profile_client.rb +28 -9
  45. data/lib/profiles/latest/eventgrid_module_definition.rb +0 -1
  46. data/lib/profiles/latest/modules/eventgrid_profile_module.rb +125 -114
  47. data/lib/version.rb +1 -1
  48. metadata +37 -3
@@ -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::V2018_01_01
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::V2018_01_01::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::V2018_01_01::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::V2018_01_01::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