azure_mgmt_event_hub 0.18.1 → 0.18.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2014-09-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +1 -1
  3. data/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +1 -1
  4. data/lib/2017-04-01/generated/azure_mgmt_event_hub.rb +15 -28
  5. data/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb +5 -5
  6. data/lib/2017-04-01/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb +239 -239
  7. data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +5 -5
  8. data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hubs.rb +278 -272
  9. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/error_response.rb +1 -1
  10. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions.rb +1 -1
  11. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_properties.rb +1 -2
  12. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/resource.rb +4 -4
  13. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb +3 -3
  14. data/lib/2017-04-01/generated/azure_mgmt_event_hub/namespaces.rb +198 -1678
  15. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub.rb +24 -18
  16. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/clusters.rb +74 -56
  17. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/configuration.rb +7 -7
  18. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/{event_hub2018preview_management_client.rb → event_hub_management_client.rb} +18 -14
  19. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster.rb +6 -6
  20. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/{operation.rb → connection_state.rb} +16 -16
  21. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace.rb +12 -12
  22. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/encryption.rb +11 -3
  23. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/end_point_provisioning_state.rb +20 -0
  24. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/error_response.rb +1 -1
  25. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/key_vault_properties.rb +11 -0
  26. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/network_rule_set.rb +12 -0
  27. data/lib/{2017-04-01/generated/azure_mgmt_event_hub/models/subnet.rb → 2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_endpoint.rb} +8 -8
  28. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_endpoint_connection.rb +100 -0
  29. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/{operation_list_result.rb → private_endpoint_connection_list_result.rb} +13 -16
  30. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_link_connection_status.rb +18 -0
  31. data/lib/{2017-04-01/generated/azure_mgmt_event_hub/models/network_rule_set.rb → 2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_link_resource.rb} +55 -50
  32. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_link_resources_list_result.rb +67 -0
  33. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/resource.rb +4 -4
  34. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/tracked_resource.rb +3 -3
  35. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb +395 -395
  36. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/private_endpoint_connections.rb +625 -0
  37. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/private_link_resources.rb +127 -0
  38. data/lib/azure_mgmt_event_hub.rb +2 -2
  39. data/lib/profiles/latest/modules/eventhub_profile_module.rb +211 -63
  40. data/lib/version.rb +1 -1
  41. metadata +14 -21
  42. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/default_action.rb +0 -16
  43. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace.rb +0 -200
  44. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb +0 -99
  45. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_plan.rb +0 -134
  46. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/network_rule_ipaction.rb +0 -15
  47. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/network_rule_set_list_result.rb +0 -100
  48. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/nwrule_set_ip_rules.rb +0 -59
  49. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/nwrule_set_virtual_network_rules.rb +0 -59
  50. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/sku.rb +0 -75
  51. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/sku_name.rb +0 -16
  52. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/sku_tier.rb +0 -16
  53. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/operation_display.rb +0 -72
  54. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/operations.rb +0 -220
@@ -6,16 +6,16 @@
6
6
  module Azure::EventHub::Mgmt::V2018_01_01_preview
7
7
  module Models
8
8
  #
9
- # Definition of an Azure resource.
9
+ # Definition of resource.
10
10
  #
11
11
  class TrackedResource < Resource
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [String] Resource location
15
+ # @return [String] Resource location.
16
16
  attr_accessor :location
17
17
 
18
- # @return [Hash{String => String}] Resource tags
18
+ # @return [Hash{String => String}] Resource tags.
19
19
  attr_accessor :tags
20
20
 
21
21
 
@@ -19,46 +19,58 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
19
19
  @client = client
20
20
  end
21
21
 
22
- # @return [EventHub2018PreviewManagementClient] reference to the EventHub2018PreviewManagementClient
22
+ # @return [EventHubManagementClient] reference to the EventHubManagementClient
23
23
  attr_reader :client
24
24
 
25
25
  #
26
- # Lists all the available Namespaces within a subscription, irrespective of the
27
- # resource groups.
26
+ # Gets a list of IP Filter rules for a Namespace.
28
27
  #
28
+ # @param resource_group_name [String] Name of the resource group within the
29
+ # azure subscription.
30
+ # @param namespace_name [String] The Namespace name
29
31
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
32
  # will be added to the HTTP request.
31
33
  #
32
- # @return [Array<EHNamespace>] operation results.
34
+ # @return [Array<IpFilterRule>] operation results.
33
35
  #
34
- def list(custom_headers:nil)
35
- first_page = list_as_lazy(custom_headers:custom_headers)
36
+ def list_ipfilter_rules(resource_group_name, namespace_name, custom_headers:nil)
37
+ first_page = list_ipfilter_rules_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
36
38
  first_page.get_all_items
37
39
  end
38
40
 
39
41
  #
40
- # Lists all the available Namespaces within a subscription, irrespective of the
41
- # resource groups.
42
+ # Gets a list of IP Filter rules for a Namespace.
42
43
  #
44
+ # @param resource_group_name [String] Name of the resource group within the
45
+ # azure subscription.
46
+ # @param namespace_name [String] The Namespace name
43
47
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
44
48
  # will be added to the HTTP request.
45
49
  #
46
50
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
47
51
  #
48
- def list_with_http_info(custom_headers:nil)
49
- list_async(custom_headers:custom_headers).value!
52
+ def list_ipfilter_rules_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
53
+ list_ipfilter_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
50
54
  end
51
55
 
52
56
  #
53
- # Lists all the available Namespaces within a subscription, irrespective of the
54
- # resource groups.
57
+ # Gets a list of IP Filter rules for a Namespace.
55
58
  #
59
+ # @param resource_group_name [String] Name of the resource group within the
60
+ # azure subscription.
61
+ # @param namespace_name [String] The Namespace name
56
62
  # @param [Hash{String => String}] A hash of custom headers that will be added
57
63
  # to the HTTP request.
58
64
  #
59
65
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
60
66
  #
61
- def list_async(custom_headers:nil)
67
+ def list_ipfilter_rules_async(resource_group_name, namespace_name, custom_headers:nil)
68
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
69
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
70
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
71
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
72
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
73
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
62
74
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
63
75
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
64
76
 
@@ -69,13 +81,13 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
69
81
  # Set Headers
70
82
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
71
83
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
72
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces'
84
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules'
73
85
 
74
86
  request_url = @base_url || @client.base_url
75
87
 
76
88
  options = {
77
89
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
78
- path_params: {'subscriptionId' => @client.subscription_id},
90
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
79
91
  query_params: {'api-version' => @client.api_version},
80
92
  headers: request_headers.merge(custom_headers || {}),
81
93
  base_url: request_url
@@ -98,7 +110,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
98
110
  if status_code == 200
99
111
  begin
100
112
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
101
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespaceListResult.mapper()
113
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRuleListResult.mapper()
102
114
  result.body = @client.deserialize(result_mapper, parsed_response)
103
115
  rescue Exception => e
104
116
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -112,48 +124,63 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
112
124
  end
113
125
 
114
126
  #
115
- # Lists the available Namespaces within a resource group.
127
+ # Creates or updates an IpFilterRule for a Namespace.
116
128
  #
117
129
  # @param resource_group_name [String] Name of the resource group within the
118
- # Azure subscription.
130
+ # azure subscription.
131
+ # @param namespace_name [String] The Namespace name
132
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
133
+ # @param parameters [IpFilterRule] The Namespace IpFilterRule.
119
134
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
120
135
  # will be added to the HTTP request.
121
136
  #
122
- # @return [Array<EHNamespace>] operation results.
137
+ # @return [IpFilterRule] operation results.
123
138
  #
124
- def list_by_resource_group(resource_group_name, custom_headers:nil)
125
- first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
126
- first_page.get_all_items
139
+ def create_or_update_ip_filter_rule(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:nil)
140
+ response = create_or_update_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:custom_headers).value!
141
+ response.body unless response.nil?
127
142
  end
128
143
 
129
144
  #
130
- # Lists the available Namespaces within a resource group.
145
+ # Creates or updates an IpFilterRule for a Namespace.
131
146
  #
132
147
  # @param resource_group_name [String] Name of the resource group within the
133
- # Azure subscription.
148
+ # azure subscription.
149
+ # @param namespace_name [String] The Namespace name
150
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
151
+ # @param parameters [IpFilterRule] The Namespace IpFilterRule.
134
152
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
135
153
  # will be added to the HTTP request.
136
154
  #
137
155
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
138
156
  #
139
- def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
140
- list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
157
+ def create_or_update_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:nil)
158
+ create_or_update_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:custom_headers).value!
141
159
  end
142
160
 
143
161
  #
144
- # Lists the available Namespaces within a resource group.
162
+ # Creates or updates an IpFilterRule for a Namespace.
145
163
  #
146
164
  # @param resource_group_name [String] Name of the resource group within the
147
- # Azure subscription.
165
+ # azure subscription.
166
+ # @param namespace_name [String] The Namespace name
167
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
168
+ # @param parameters [IpFilterRule] The Namespace IpFilterRule.
148
169
  # @param [Hash{String => String}] A hash of custom headers that will be added
149
170
  # to the HTTP request.
150
171
  #
151
172
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
152
173
  #
153
- def list_by_resource_group_async(resource_group_name, custom_headers:nil)
174
+ def create_or_update_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:nil)
154
175
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
155
176
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
156
177
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
178
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
179
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
180
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
181
+ fail ArgumentError, 'ip_filter_rule_name is nil' if ip_filter_rule_name.nil?
182
+ fail ArgumentError, "'ip_filter_rule_name' should satisfy the constraint - 'MinLength': '1'" if !ip_filter_rule_name.nil? && ip_filter_rule_name.length < 1
183
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
157
184
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
158
185
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
159
186
 
@@ -164,18 +191,25 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
164
191
  # Set Headers
165
192
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
166
193
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
167
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces'
194
+
195
+ # Serialize Request
196
+ request_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRule.mapper()
197
+ request_content = @client.serialize(request_mapper, parameters)
198
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
199
+
200
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}'
168
201
 
169
202
  request_url = @base_url || @client.base_url
170
203
 
171
204
  options = {
172
205
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
173
- path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
206
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'ipFilterRuleName' => ip_filter_rule_name,'subscriptionId' => @client.subscription_id},
174
207
  query_params: {'api-version' => @client.api_version},
208
+ body: request_content,
175
209
  headers: request_headers.merge(custom_headers || {}),
176
210
  base_url: request_url
177
211
  }
178
- promise = @client.make_request_async(:get, path_template, options)
212
+ promise = @client.make_request_async(:put, path_template, options)
179
213
 
180
214
  promise = promise.then do |result|
181
215
  http_response = result.response
@@ -193,7 +227,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
193
227
  if status_code == 200
194
228
  begin
195
229
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
196
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespaceListResult.mapper()
230
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRule.mapper()
197
231
  result.body = @client.deserialize(result_mapper, parsed_response)
198
232
  rescue Exception => e
199
233
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -207,142 +241,154 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
207
241
  end
208
242
 
209
243
  #
210
- # Creates or updates a namespace. Once created, this namespace's resource
211
- # manifest is immutable. This operation is idempotent.
244
+ # Deletes an IpFilterRule for a Namespace.
212
245
  #
213
246
  # @param resource_group_name [String] Name of the resource group within the
214
- # Azure subscription.
247
+ # azure subscription.
215
248
  # @param namespace_name [String] The Namespace name
216
- # @param parameters [EHNamespace] Parameters for creating a namespace resource.
249
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
217
250
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
218
251
  # will be added to the HTTP request.
219
252
  #
220
- # @return [EHNamespace] operation results.
221
253
  #
222
- def create_or_update(resource_group_name, namespace_name, parameters, custom_headers:nil)
223
- response = create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
224
- response.body unless response.nil?
254
+ def delete_ip_filter_rule(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
255
+ response = delete_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
256
+ nil
225
257
  end
226
258
 
259
+ #
260
+ # Deletes an IpFilterRule for a Namespace.
227
261
  #
228
262
  # @param resource_group_name [String] Name of the resource group within the
229
- # Azure subscription.
263
+ # azure subscription.
230
264
  # @param namespace_name [String] The Namespace name
231
- # @param parameters [EHNamespace] Parameters for creating a namespace resource.
265
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
232
266
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
233
267
  # will be added to the HTTP request.
234
268
  #
235
- # @return [Concurrent::Promise] promise which provides async access to http
236
- # response.
269
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
237
270
  #
238
- def create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
239
- # Send request
240
- promise = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers)
241
-
242
- promise = promise.then do |response|
243
- # Defining deserialization method.
244
- deserialize_method = lambda do |parsed_response|
245
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
246
- parsed_response = @client.deserialize(result_mapper, parsed_response)
247
- end
248
-
249
- # Waiting for response.
250
- @client.get_long_running_operation_result(response, deserialize_method)
251
- end
252
-
253
- promise
271
+ def delete_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
272
+ delete_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
254
273
  end
255
274
 
256
275
  #
257
- # Deletes an existing namespace. This operation also removes all associated
258
- # resources under the namespace.
259
- #
260
- # @param resource_group_name [String] Name of the resource group within the
261
- # Azure subscription.
262
- # @param namespace_name [String] The Namespace name
263
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
264
- # will be added to the HTTP request.
265
- #
266
- def delete(resource_group_name, namespace_name, custom_headers:nil)
267
- response = delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
268
- nil
269
- end
270
-
276
+ # Deletes an IpFilterRule for a Namespace.
271
277
  #
272
278
  # @param resource_group_name [String] Name of the resource group within the
273
- # Azure subscription.
279
+ # azure subscription.
274
280
  # @param namespace_name [String] The Namespace name
275
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
276
- # will be added to the HTTP request.
281
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
282
+ # @param [Hash{String => String}] A hash of custom headers that will be added
283
+ # to the HTTP request.
277
284
  #
278
- # @return [Concurrent::Promise] promise which provides async access to http
279
- # response.
285
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
280
286
  #
281
- def delete_async(resource_group_name, namespace_name, custom_headers:nil)
282
- # Send request
283
- promise = begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers)
287
+ def delete_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
288
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
289
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
290
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
291
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
292
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
293
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
294
+ fail ArgumentError, 'ip_filter_rule_name is nil' if ip_filter_rule_name.nil?
295
+ fail ArgumentError, "'ip_filter_rule_name' should satisfy the constraint - 'MinLength': '1'" if !ip_filter_rule_name.nil? && ip_filter_rule_name.length < 1
296
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
297
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
284
298
 
285
- promise = promise.then do |response|
286
- # Defining deserialization method.
287
- deserialize_method = lambda do |parsed_response|
299
+
300
+ request_headers = {}
301
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
302
+
303
+ # Set Headers
304
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
305
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
306
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}'
307
+
308
+ request_url = @base_url || @client.base_url
309
+
310
+ options = {
311
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
312
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'ipFilterRuleName' => ip_filter_rule_name,'subscriptionId' => @client.subscription_id},
313
+ query_params: {'api-version' => @client.api_version},
314
+ headers: request_headers.merge(custom_headers || {}),
315
+ base_url: request_url
316
+ }
317
+ promise = @client.make_request_async(:delete, path_template, options)
318
+
319
+ promise = promise.then do |result|
320
+ http_response = result.response
321
+ status_code = http_response.status
322
+ response_content = http_response.body
323
+ unless status_code == 200 || status_code == 204
324
+ error_model = JSON.load(response_content)
325
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
288
326
  end
289
327
 
290
- # Waiting for response.
291
- @client.get_long_running_operation_result(response, deserialize_method)
328
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
329
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
330
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
331
+
332
+ result
292
333
  end
293
334
 
294
- promise
335
+ promise.execute
295
336
  end
296
337
 
297
338
  #
298
- # Gets the description of the specified namespace.
339
+ # Gets an IpFilterRule for a Namespace by rule name.
299
340
  #
300
341
  # @param resource_group_name [String] Name of the resource group within the
301
- # Azure subscription.
342
+ # azure subscription.
302
343
  # @param namespace_name [String] The Namespace name
344
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
303
345
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
304
346
  # will be added to the HTTP request.
305
347
  #
306
- # @return [EHNamespace] operation results.
348
+ # @return [IpFilterRule] operation results.
307
349
  #
308
- def get(resource_group_name, namespace_name, custom_headers:nil)
309
- response = get_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
350
+ def get_ip_filter_rule(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
351
+ response = get_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
310
352
  response.body unless response.nil?
311
353
  end
312
354
 
313
355
  #
314
- # Gets the description of the specified namespace.
356
+ # Gets an IpFilterRule for a Namespace by rule name.
315
357
  #
316
358
  # @param resource_group_name [String] Name of the resource group within the
317
- # Azure subscription.
359
+ # azure subscription.
318
360
  # @param namespace_name [String] The Namespace name
361
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
319
362
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
320
363
  # will be added to the HTTP request.
321
364
  #
322
365
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
323
366
  #
324
- def get_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
325
- get_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
367
+ def get_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
368
+ get_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
326
369
  end
327
370
 
328
371
  #
329
- # Gets the description of the specified namespace.
372
+ # Gets an IpFilterRule for a Namespace by rule name.
330
373
  #
331
374
  # @param resource_group_name [String] Name of the resource group within the
332
- # Azure subscription.
375
+ # azure subscription.
333
376
  # @param namespace_name [String] The Namespace name
377
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
334
378
  # @param [Hash{String => String}] A hash of custom headers that will be added
335
379
  # to the HTTP request.
336
380
  #
337
381
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
338
382
  #
339
- def get_async(resource_group_name, namespace_name, custom_headers:nil)
383
+ def get_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
340
384
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
341
385
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
342
386
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
343
387
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
344
388
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
345
389
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
390
+ fail ArgumentError, 'ip_filter_rule_name is nil' if ip_filter_rule_name.nil?
391
+ fail ArgumentError, "'ip_filter_rule_name' should satisfy the constraint - 'MinLength': '1'" if !ip_filter_rule_name.nil? && ip_filter_rule_name.length < 1
346
392
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
347
393
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
348
394
 
@@ -353,13 +399,13 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
353
399
  # Set Headers
354
400
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
355
401
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
356
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'
402
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}'
357
403
 
358
404
  request_url = @base_url || @client.base_url
359
405
 
360
406
  options = {
361
407
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
362
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
408
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'ipFilterRuleName' => ip_filter_rule_name,'subscriptionId' => @client.subscription_id},
363
409
  query_params: {'api-version' => @client.api_version},
364
410
  headers: request_headers.merge(custom_headers || {}),
365
411
  base_url: request_url
@@ -370,7 +416,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
370
416
  http_response = result.response
371
417
  status_code = http_response.status
372
418
  response_content = http_response.body
373
- unless status_code == 200 || status_code == 201
419
+ unless status_code == 200
374
420
  error_model = JSON.load(response_content)
375
421
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
376
422
  end
@@ -382,17 +428,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
382
428
  if status_code == 200
383
429
  begin
384
430
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
385
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
386
- result.body = @client.deserialize(result_mapper, parsed_response)
387
- rescue Exception => e
388
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
389
- end
390
- end
391
- # Deserialize Response
392
- if status_code == 201
393
- begin
394
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
395
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
431
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRule.mapper()
396
432
  result.body = @client.deserialize(result_mapper, parsed_response)
397
433
  rescue Exception => e
398
434
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -406,61 +442,42 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
406
442
  end
407
443
 
408
444
  #
409
- # Creates or updates a namespace. Once created, this namespace's resource
410
- # manifest is immutable. This operation is idempotent.
445
+ # Lists all the available Namespaces within a subscription, irrespective of the
446
+ # resource groups.
411
447
  #
412
- # @param resource_group_name [String] Name of the resource group within the
413
- # Azure subscription.
414
- # @param namespace_name [String] The Namespace name
415
- # @param parameters [EHNamespace] Parameters for updating a namespace resource.
416
448
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
417
449
  # will be added to the HTTP request.
418
450
  #
419
- # @return [EHNamespace] operation results.
451
+ # @return [Array<EHNamespace>] operation results.
420
452
  #
421
- def update(resource_group_name, namespace_name, parameters, custom_headers:nil)
422
- response = update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
423
- response.body unless response.nil?
453
+ def list(custom_headers:nil)
454
+ first_page = list_as_lazy(custom_headers:custom_headers)
455
+ first_page.get_all_items
424
456
  end
425
457
 
426
458
  #
427
- # Creates or updates a namespace. Once created, this namespace's resource
428
- # manifest is immutable. This operation is idempotent.
459
+ # Lists all the available Namespaces within a subscription, irrespective of the
460
+ # resource groups.
429
461
  #
430
- # @param resource_group_name [String] Name of the resource group within the
431
- # Azure subscription.
432
- # @param namespace_name [String] The Namespace name
433
- # @param parameters [EHNamespace] Parameters for updating a namespace resource.
434
462
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
435
463
  # will be added to the HTTP request.
436
464
  #
437
465
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
438
466
  #
439
- def update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
440
- update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
467
+ def list_with_http_info(custom_headers:nil)
468
+ list_async(custom_headers:custom_headers).value!
441
469
  end
442
470
 
443
471
  #
444
- # Creates or updates a namespace. Once created, this namespace's resource
445
- # manifest is immutable. This operation is idempotent.
472
+ # Lists all the available Namespaces within a subscription, irrespective of the
473
+ # resource groups.
446
474
  #
447
- # @param resource_group_name [String] Name of the resource group within the
448
- # Azure subscription.
449
- # @param namespace_name [String] The Namespace name
450
- # @param parameters [EHNamespace] Parameters for updating a namespace resource.
451
475
  # @param [Hash{String => String}] A hash of custom headers that will be added
452
476
  # to the HTTP request.
453
477
  #
454
478
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
455
479
  #
456
- def update_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
457
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
458
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
459
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
460
- fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
461
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
462
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
463
- fail ArgumentError, 'parameters is nil' if parameters.nil?
480
+ def list_async(custom_headers:nil)
464
481
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
465
482
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
466
483
 
@@ -471,31 +488,24 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
471
488
  # Set Headers
472
489
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
473
490
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
474
-
475
- # Serialize Request
476
- request_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
477
- request_content = @client.serialize(request_mapper, parameters)
478
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
479
-
480
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'
491
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces'
481
492
 
482
493
  request_url = @base_url || @client.base_url
483
494
 
484
495
  options = {
485
496
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
486
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
497
+ path_params: {'subscriptionId' => @client.subscription_id},
487
498
  query_params: {'api-version' => @client.api_version},
488
- body: request_content,
489
499
  headers: request_headers.merge(custom_headers || {}),
490
500
  base_url: request_url
491
501
  }
492
- promise = @client.make_request_async(:patch, path_template, options)
502
+ promise = @client.make_request_async(:get, path_template, options)
493
503
 
494
504
  promise = promise.then do |result|
495
505
  http_response = result.response
496
506
  status_code = http_response.status
497
507
  response_content = http_response.body
498
- unless status_code == 200 || status_code == 201 || status_code == 202
508
+ unless status_code == 200
499
509
  error_model = JSON.load(response_content)
500
510
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
501
511
  end
@@ -507,17 +517,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
507
517
  if status_code == 200
508
518
  begin
509
519
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
510
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
511
- result.body = @client.deserialize(result_mapper, parsed_response)
512
- rescue Exception => e
513
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
514
- end
515
- end
516
- # Deserialize Response
517
- if status_code == 201
518
- begin
519
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
520
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
520
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespaceListResult.mapper()
521
521
  result.body = @client.deserialize(result_mapper, parsed_response)
522
522
  rescue Exception => e
523
523
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -531,54 +531,48 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
531
531
  end
532
532
 
533
533
  #
534
- # Gets a list of IP Filter rules for a Namespace.
534
+ # Lists the available Namespaces within a resource group.
535
535
  #
536
536
  # @param resource_group_name [String] Name of the resource group within the
537
- # Azure subscription.
538
- # @param namespace_name [String] The Namespace name
537
+ # azure subscription.
539
538
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
540
539
  # will be added to the HTTP request.
541
540
  #
542
- # @return [Array<IpFilterRule>] operation results.
541
+ # @return [Array<EHNamespace>] operation results.
543
542
  #
544
- def list_ipfilter_rules(resource_group_name, namespace_name, custom_headers:nil)
545
- first_page = list_ipfilter_rules_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
543
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
544
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
546
545
  first_page.get_all_items
547
546
  end
548
547
 
549
548
  #
550
- # Gets a list of IP Filter rules for a Namespace.
549
+ # Lists the available Namespaces within a resource group.
551
550
  #
552
551
  # @param resource_group_name [String] Name of the resource group within the
553
- # Azure subscription.
554
- # @param namespace_name [String] The Namespace name
552
+ # azure subscription.
555
553
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
556
554
  # will be added to the HTTP request.
557
555
  #
558
556
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
559
557
  #
560
- def list_ipfilter_rules_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
561
- list_ipfilter_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
558
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
559
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
562
560
  end
563
561
 
564
562
  #
565
- # Gets a list of IP Filter rules for a Namespace.
563
+ # Lists the available Namespaces within a resource group.
566
564
  #
567
565
  # @param resource_group_name [String] Name of the resource group within the
568
- # Azure subscription.
569
- # @param namespace_name [String] The Namespace name
566
+ # azure subscription.
570
567
  # @param [Hash{String => String}] A hash of custom headers that will be added
571
568
  # to the HTTP request.
572
569
  #
573
570
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
574
571
  #
575
- def list_ipfilter_rules_async(resource_group_name, namespace_name, custom_headers:nil)
572
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
576
573
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
577
574
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
578
575
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
579
- fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
580
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
581
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
582
576
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
583
577
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
584
578
 
@@ -589,13 +583,13 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
589
583
  # Set Headers
590
584
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
591
585
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
592
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules'
586
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces'
593
587
 
594
588
  request_url = @base_url || @client.base_url
595
589
 
596
590
  options = {
597
591
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
598
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
592
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
599
593
  query_params: {'api-version' => @client.api_version},
600
594
  headers: request_headers.merge(custom_headers || {}),
601
595
  base_url: request_url
@@ -618,7 +612,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
618
612
  if status_code == 200
619
613
  begin
620
614
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
621
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRuleListResult.mapper()
615
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespaceListResult.mapper()
622
616
  result.body = @client.deserialize(result_mapper, parsed_response)
623
617
  rescue Exception => e
624
618
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -632,175 +626,142 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
632
626
  end
633
627
 
634
628
  #
635
- # Creates or updates an IpFilterRule for a Namespace.
629
+ # Creates or updates a namespace. Once created, this namespace's resource
630
+ # manifest is immutable. This operation is idempotent.
636
631
  #
637
632
  # @param resource_group_name [String] Name of the resource group within the
638
- # Azure subscription.
633
+ # azure subscription.
639
634
  # @param namespace_name [String] The Namespace name
640
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
641
- # @param parameters [IpFilterRule] The Namespace IpFilterRule.
635
+ # @param parameters [EHNamespace] Parameters for creating a namespace resource.
642
636
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
643
637
  # will be added to the HTTP request.
644
638
  #
645
- # @return [IpFilterRule] operation results.
639
+ # @return [EHNamespace] operation results.
646
640
  #
647
- def create_or_update_ip_filter_rule(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:nil)
648
- response = create_or_update_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:custom_headers).value!
641
+ def create_or_update(resource_group_name, namespace_name, parameters, custom_headers:nil)
642
+ response = create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
649
643
  response.body unless response.nil?
650
644
  end
651
645
 
652
- #
653
- # Creates or updates an IpFilterRule for a Namespace.
654
646
  #
655
647
  # @param resource_group_name [String] Name of the resource group within the
656
- # Azure subscription.
648
+ # azure subscription.
657
649
  # @param namespace_name [String] The Namespace name
658
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
659
- # @param parameters [IpFilterRule] The Namespace IpFilterRule.
650
+ # @param parameters [EHNamespace] Parameters for creating a namespace resource.
660
651
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
661
652
  # will be added to the HTTP request.
662
653
  #
663
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
664
- #
665
- def create_or_update_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:nil)
666
- create_or_update_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:custom_headers).value!
667
- end
668
-
669
- #
670
- # Creates or updates an IpFilterRule for a Namespace.
671
- #
672
- # @param resource_group_name [String] Name of the resource group within the
673
- # Azure subscription.
674
- # @param namespace_name [String] The Namespace name
675
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
676
- # @param parameters [IpFilterRule] The Namespace IpFilterRule.
677
- # @param [Hash{String => String}] A hash of custom headers that will be added
678
- # to the HTTP request.
679
- #
680
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
654
+ # @return [Concurrent::Promise] promise which provides async access to http
655
+ # response.
681
656
  #
682
- def create_or_update_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:nil)
683
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
684
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
685
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
686
- fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
687
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
688
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
689
- fail ArgumentError, 'ip_filter_rule_name is nil' if ip_filter_rule_name.nil?
690
- fail ArgumentError, "'ip_filter_rule_name' should satisfy the constraint - 'MinLength': '1'" if !ip_filter_rule_name.nil? && ip_filter_rule_name.length < 1
691
- fail ArgumentError, 'parameters is nil' if parameters.nil?
692
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
693
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
694
-
695
-
696
- request_headers = {}
697
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
698
-
699
- # Set Headers
700
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
701
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
657
+ def create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
658
+ # Send request
659
+ promise = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers)
702
660
 
703
- # Serialize Request
704
- request_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRule.mapper()
705
- request_content = @client.serialize(request_mapper, parameters)
706
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
661
+ promise = promise.then do |response|
662
+ # Defining deserialization method.
663
+ deserialize_method = lambda do |parsed_response|
664
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
665
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
666
+ end
707
667
 
708
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}'
668
+ # Waiting for response.
669
+ @client.get_long_running_operation_result(response, deserialize_method)
670
+ end
709
671
 
710
- request_url = @base_url || @client.base_url
672
+ promise
673
+ end
711
674
 
712
- options = {
713
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
714
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'ipFilterRuleName' => ip_filter_rule_name,'subscriptionId' => @client.subscription_id},
715
- query_params: {'api-version' => @client.api_version},
716
- body: request_content,
717
- headers: request_headers.merge(custom_headers || {}),
718
- base_url: request_url
719
- }
720
- promise = @client.make_request_async(:put, path_template, options)
675
+ #
676
+ # Deletes an existing namespace. This operation also removes all associated
677
+ # resources under the namespace.
678
+ #
679
+ # @param resource_group_name [String] Name of the resource group within the
680
+ # azure subscription.
681
+ # @param namespace_name [String] The Namespace name
682
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
683
+ # will be added to the HTTP request.
684
+ #
685
+ def delete(resource_group_name, namespace_name, custom_headers:nil)
686
+ response = delete_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
687
+ nil
688
+ end
721
689
 
722
- promise = promise.then do |result|
723
- http_response = result.response
724
- status_code = http_response.status
725
- response_content = http_response.body
726
- unless status_code == 200
727
- error_model = JSON.load(response_content)
728
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
729
- end
690
+ #
691
+ # @param resource_group_name [String] Name of the resource group within the
692
+ # azure subscription.
693
+ # @param namespace_name [String] The Namespace name
694
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
695
+ # will be added to the HTTP request.
696
+ #
697
+ # @return [Concurrent::Promise] promise which provides async access to http
698
+ # response.
699
+ #
700
+ def delete_async(resource_group_name, namespace_name, custom_headers:nil)
701
+ # Send request
702
+ promise = begin_delete_async(resource_group_name, namespace_name, custom_headers:custom_headers)
730
703
 
731
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
732
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
733
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
734
- # Deserialize Response
735
- if status_code == 200
736
- begin
737
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
738
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRule.mapper()
739
- result.body = @client.deserialize(result_mapper, parsed_response)
740
- rescue Exception => e
741
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
742
- end
704
+ promise = promise.then do |response|
705
+ # Defining deserialization method.
706
+ deserialize_method = lambda do |parsed_response|
743
707
  end
744
708
 
745
- result
709
+ # Waiting for response.
710
+ @client.get_long_running_operation_result(response, deserialize_method)
746
711
  end
747
712
 
748
- promise.execute
713
+ promise
749
714
  end
750
715
 
751
716
  #
752
- # Deletes an IpFilterRule for a Namespace.
717
+ # Gets the description of the specified namespace.
753
718
  #
754
719
  # @param resource_group_name [String] Name of the resource group within the
755
- # Azure subscription.
720
+ # azure subscription.
756
721
  # @param namespace_name [String] The Namespace name
757
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
758
722
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
759
723
  # will be added to the HTTP request.
760
724
  #
725
+ # @return [EHNamespace] operation results.
761
726
  #
762
- def delete_ip_filter_rule(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
763
- response = delete_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
764
- nil
727
+ def get(resource_group_name, namespace_name, custom_headers:nil)
728
+ response = get_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
729
+ response.body unless response.nil?
765
730
  end
766
731
 
767
732
  #
768
- # Deletes an IpFilterRule for a Namespace.
733
+ # Gets the description of the specified namespace.
769
734
  #
770
735
  # @param resource_group_name [String] Name of the resource group within the
771
- # Azure subscription.
736
+ # azure subscription.
772
737
  # @param namespace_name [String] The Namespace name
773
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
774
738
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
775
739
  # will be added to the HTTP request.
776
740
  #
777
741
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
778
742
  #
779
- def delete_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
780
- delete_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
743
+ def get_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
744
+ get_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
781
745
  end
782
746
 
783
747
  #
784
- # Deletes an IpFilterRule for a Namespace.
748
+ # Gets the description of the specified namespace.
785
749
  #
786
750
  # @param resource_group_name [String] Name of the resource group within the
787
- # Azure subscription.
751
+ # azure subscription.
788
752
  # @param namespace_name [String] The Namespace name
789
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
790
753
  # @param [Hash{String => String}] A hash of custom headers that will be added
791
754
  # to the HTTP request.
792
755
  #
793
756
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
794
757
  #
795
- def delete_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
758
+ def get_async(resource_group_name, namespace_name, custom_headers:nil)
796
759
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
797
760
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
798
761
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
799
762
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
800
763
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
801
764
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
802
- fail ArgumentError, 'ip_filter_rule_name is nil' if ip_filter_rule_name.nil?
803
- fail ArgumentError, "'ip_filter_rule_name' should satisfy the constraint - 'MinLength': '1'" if !ip_filter_rule_name.nil? && ip_filter_rule_name.length < 1
804
765
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
805
766
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
806
767
 
@@ -811,24 +772,24 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
811
772
  # Set Headers
812
773
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
813
774
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
814
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}'
775
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'
815
776
 
816
777
  request_url = @base_url || @client.base_url
817
778
 
818
779
  options = {
819
780
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
820
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'ipFilterRuleName' => ip_filter_rule_name,'subscriptionId' => @client.subscription_id},
781
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
821
782
  query_params: {'api-version' => @client.api_version},
822
783
  headers: request_headers.merge(custom_headers || {}),
823
784
  base_url: request_url
824
785
  }
825
- promise = @client.make_request_async(:delete, path_template, options)
786
+ promise = @client.make_request_async(:get, path_template, options)
826
787
 
827
788
  promise = promise.then do |result|
828
789
  http_response = result.response
829
790
  status_code = http_response.status
830
791
  response_content = http_response.body
831
- unless status_code == 200 || status_code == 204
792
+ unless status_code == 200 || status_code == 201
832
793
  error_model = JSON.load(response_content)
833
794
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
834
795
  end
@@ -836,6 +797,26 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
836
797
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
837
798
  result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
838
799
  result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
800
+ # Deserialize Response
801
+ if status_code == 200
802
+ begin
803
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
804
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
805
+ result.body = @client.deserialize(result_mapper, parsed_response)
806
+ rescue Exception => e
807
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
808
+ end
809
+ end
810
+ # Deserialize Response
811
+ if status_code == 201
812
+ begin
813
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
814
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
815
+ result.body = @client.deserialize(result_mapper, parsed_response)
816
+ rescue Exception => e
817
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
818
+ end
819
+ end
839
820
 
840
821
  result
841
822
  end
@@ -844,59 +825,61 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
844
825
  end
845
826
 
846
827
  #
847
- # Gets an IpFilterRule for a Namespace by rule name.
828
+ # Creates or updates a namespace. Once created, this namespace's resource
829
+ # manifest is immutable. This operation is idempotent.
848
830
  #
849
831
  # @param resource_group_name [String] Name of the resource group within the
850
- # Azure subscription.
832
+ # azure subscription.
851
833
  # @param namespace_name [String] The Namespace name
852
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
834
+ # @param parameters [EHNamespace] Parameters for updating a namespace resource.
853
835
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
854
836
  # will be added to the HTTP request.
855
837
  #
856
- # @return [IpFilterRule] operation results.
838
+ # @return [EHNamespace] operation results.
857
839
  #
858
- def get_ip_filter_rule(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
859
- response = get_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
840
+ def update(resource_group_name, namespace_name, parameters, custom_headers:nil)
841
+ response = update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
860
842
  response.body unless response.nil?
861
843
  end
862
844
 
863
845
  #
864
- # Gets an IpFilterRule for a Namespace by rule name.
846
+ # Creates or updates a namespace. Once created, this namespace's resource
847
+ # manifest is immutable. This operation is idempotent.
865
848
  #
866
849
  # @param resource_group_name [String] Name of the resource group within the
867
- # Azure subscription.
850
+ # azure subscription.
868
851
  # @param namespace_name [String] The Namespace name
869
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
852
+ # @param parameters [EHNamespace] Parameters for updating a namespace resource.
870
853
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
871
854
  # will be added to the HTTP request.
872
855
  #
873
856
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
874
857
  #
875
- def get_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
876
- get_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
858
+ def update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
859
+ update_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
877
860
  end
878
861
 
879
862
  #
880
- # Gets an IpFilterRule for a Namespace by rule name.
863
+ # Creates or updates a namespace. Once created, this namespace's resource
864
+ # manifest is immutable. This operation is idempotent.
881
865
  #
882
866
  # @param resource_group_name [String] Name of the resource group within the
883
- # Azure subscription.
867
+ # azure subscription.
884
868
  # @param namespace_name [String] The Namespace name
885
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
869
+ # @param parameters [EHNamespace] Parameters for updating a namespace resource.
886
870
  # @param [Hash{String => String}] A hash of custom headers that will be added
887
871
  # to the HTTP request.
888
872
  #
889
873
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
890
874
  #
891
- def get_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
875
+ def update_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
892
876
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
893
877
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
894
878
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
895
879
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
896
880
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
897
881
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
898
- fail ArgumentError, 'ip_filter_rule_name is nil' if ip_filter_rule_name.nil?
899
- fail ArgumentError, "'ip_filter_rule_name' should satisfy the constraint - 'MinLength': '1'" if !ip_filter_rule_name.nil? && ip_filter_rule_name.length < 1
882
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
900
883
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
901
884
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
902
885
 
@@ -907,24 +890,31 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
907
890
  # Set Headers
908
891
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
909
892
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
910
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}'
893
+
894
+ # Serialize Request
895
+ request_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
896
+ request_content = @client.serialize(request_mapper, parameters)
897
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
898
+
899
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'
911
900
 
912
901
  request_url = @base_url || @client.base_url
913
902
 
914
903
  options = {
915
904
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
916
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'ipFilterRuleName' => ip_filter_rule_name,'subscriptionId' => @client.subscription_id},
905
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
917
906
  query_params: {'api-version' => @client.api_version},
907
+ body: request_content,
918
908
  headers: request_headers.merge(custom_headers || {}),
919
909
  base_url: request_url
920
910
  }
921
- promise = @client.make_request_async(:get, path_template, options)
911
+ promise = @client.make_request_async(:patch, path_template, options)
922
912
 
923
913
  promise = promise.then do |result|
924
914
  http_response = result.response
925
915
  status_code = http_response.status
926
916
  response_content = http_response.body
927
- unless status_code == 200
917
+ unless status_code == 200 || status_code == 201 || status_code == 202
928
918
  error_model = JSON.load(response_content)
929
919
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
930
920
  end
@@ -936,7 +926,17 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
936
926
  if status_code == 200
937
927
  begin
938
928
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
939
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRule.mapper()
929
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
930
+ result.body = @client.deserialize(result_mapper, parsed_response)
931
+ rescue Exception => e
932
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
933
+ end
934
+ end
935
+ # Deserialize Response
936
+ if status_code == 201
937
+ begin
938
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
939
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
940
940
  result.body = @client.deserialize(result_mapper, parsed_response)
941
941
  rescue Exception => e
942
942
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -953,7 +953,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
953
953
  # Gets a list of VirtualNetwork rules for a Namespace.
954
954
  #
955
955
  # @param resource_group_name [String] Name of the resource group within the
956
- # Azure subscription.
956
+ # azure subscription.
957
957
  # @param namespace_name [String] The Namespace name
958
958
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
959
959
  # will be added to the HTTP request.
@@ -969,7 +969,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
969
969
  # Gets a list of VirtualNetwork rules for a Namespace.
970
970
  #
971
971
  # @param resource_group_name [String] Name of the resource group within the
972
- # Azure subscription.
972
+ # azure subscription.
973
973
  # @param namespace_name [String] The Namespace name
974
974
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
975
975
  # will be added to the HTTP request.
@@ -984,7 +984,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
984
984
  # Gets a list of VirtualNetwork rules for a Namespace.
985
985
  #
986
986
  # @param resource_group_name [String] Name of the resource group within the
987
- # Azure subscription.
987
+ # azure subscription.
988
988
  # @param namespace_name [String] The Namespace name
989
989
  # @param [Hash{String => String}] A hash of custom headers that will be added
990
990
  # to the HTTP request.
@@ -1054,7 +1054,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1054
1054
  # Creates or updates an VirtualNetworkRule for a Namespace.
1055
1055
  #
1056
1056
  # @param resource_group_name [String] Name of the resource group within the
1057
- # Azure subscription.
1057
+ # azure subscription.
1058
1058
  # @param namespace_name [String] The Namespace name
1059
1059
  # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1060
1060
  # @param parameters [VirtualNetworkRule] The Namespace VirtualNetworkRule.
@@ -1072,7 +1072,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1072
1072
  # Creates or updates an VirtualNetworkRule for a Namespace.
1073
1073
  #
1074
1074
  # @param resource_group_name [String] Name of the resource group within the
1075
- # Azure subscription.
1075
+ # azure subscription.
1076
1076
  # @param namespace_name [String] The Namespace name
1077
1077
  # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1078
1078
  # @param parameters [VirtualNetworkRule] The Namespace VirtualNetworkRule.
@@ -1089,7 +1089,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1089
1089
  # Creates or updates an VirtualNetworkRule for a Namespace.
1090
1090
  #
1091
1091
  # @param resource_group_name [String] Name of the resource group within the
1092
- # Azure subscription.
1092
+ # azure subscription.
1093
1093
  # @param namespace_name [String] The Namespace name
1094
1094
  # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1095
1095
  # @param parameters [VirtualNetworkRule] The Namespace VirtualNetworkRule.
@@ -1171,7 +1171,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1171
1171
  # Deletes an VirtualNetworkRule for a Namespace.
1172
1172
  #
1173
1173
  # @param resource_group_name [String] Name of the resource group within the
1174
- # Azure subscription.
1174
+ # azure subscription.
1175
1175
  # @param namespace_name [String] The Namespace name
1176
1176
  # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1177
1177
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -1187,7 +1187,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1187
1187
  # Deletes an VirtualNetworkRule for a Namespace.
1188
1188
  #
1189
1189
  # @param resource_group_name [String] Name of the resource group within the
1190
- # Azure subscription.
1190
+ # azure subscription.
1191
1191
  # @param namespace_name [String] The Namespace name
1192
1192
  # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1193
1193
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -1203,7 +1203,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1203
1203
  # Deletes an VirtualNetworkRule for a Namespace.
1204
1204
  #
1205
1205
  # @param resource_group_name [String] Name of the resource group within the
1206
- # Azure subscription.
1206
+ # azure subscription.
1207
1207
  # @param namespace_name [String] The Namespace name
1208
1208
  # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1209
1209
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -1266,7 +1266,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1266
1266
  # Gets an VirtualNetworkRule for a Namespace by rule name.
1267
1267
  #
1268
1268
  # @param resource_group_name [String] Name of the resource group within the
1269
- # Azure subscription.
1269
+ # azure subscription.
1270
1270
  # @param namespace_name [String] The Namespace name
1271
1271
  # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1272
1272
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -1283,7 +1283,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1283
1283
  # Gets an VirtualNetworkRule for a Namespace by rule name.
1284
1284
  #
1285
1285
  # @param resource_group_name [String] Name of the resource group within the
1286
- # Azure subscription.
1286
+ # azure subscription.
1287
1287
  # @param namespace_name [String] The Namespace name
1288
1288
  # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1289
1289
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -1299,7 +1299,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1299
1299
  # Gets an VirtualNetworkRule for a Namespace by rule name.
1300
1300
  #
1301
1301
  # @param resource_group_name [String] Name of the resource group within the
1302
- # Azure subscription.
1302
+ # azure subscription.
1303
1303
  # @param namespace_name [String] The Namespace name
1304
1304
  # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1305
1305
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -1372,7 +1372,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1372
1372
  # Create or update NetworkRuleSet for a Namespace.
1373
1373
  #
1374
1374
  # @param resource_group_name [String] Name of the resource group within the
1375
- # Azure subscription.
1375
+ # azure subscription.
1376
1376
  # @param namespace_name [String] The Namespace name
1377
1377
  # @param parameters [NetworkRuleSet] The Namespace IpFilterRule.
1378
1378
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -1389,7 +1389,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1389
1389
  # Create or update NetworkRuleSet for a Namespace.
1390
1390
  #
1391
1391
  # @param resource_group_name [String] Name of the resource group within the
1392
- # Azure subscription.
1392
+ # azure subscription.
1393
1393
  # @param namespace_name [String] The Namespace name
1394
1394
  # @param parameters [NetworkRuleSet] The Namespace IpFilterRule.
1395
1395
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -1405,7 +1405,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1405
1405
  # Create or update NetworkRuleSet for a Namespace.
1406
1406
  #
1407
1407
  # @param resource_group_name [String] Name of the resource group within the
1408
- # Azure subscription.
1408
+ # azure subscription.
1409
1409
  # @param namespace_name [String] The Namespace name
1410
1410
  # @param parameters [NetworkRuleSet] The Namespace IpFilterRule.
1411
1411
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -1484,7 +1484,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1484
1484
  # Gets NetworkRuleSet for a Namespace.
1485
1485
  #
1486
1486
  # @param resource_group_name [String] Name of the resource group within the
1487
- # Azure subscription.
1487
+ # azure subscription.
1488
1488
  # @param namespace_name [String] The Namespace name
1489
1489
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1490
1490
  # will be added to the HTTP request.
@@ -1500,7 +1500,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1500
1500
  # Gets NetworkRuleSet for a Namespace.
1501
1501
  #
1502
1502
  # @param resource_group_name [String] Name of the resource group within the
1503
- # Azure subscription.
1503
+ # azure subscription.
1504
1504
  # @param namespace_name [String] The Namespace name
1505
1505
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1506
1506
  # will be added to the HTTP request.
@@ -1515,7 +1515,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1515
1515
  # Gets NetworkRuleSet for a Namespace.
1516
1516
  #
1517
1517
  # @param resource_group_name [String] Name of the resource group within the
1518
- # Azure subscription.
1518
+ # azure subscription.
1519
1519
  # @param namespace_name [String] The Namespace name
1520
1520
  # @param [Hash{String => String}] A hash of custom headers that will be added
1521
1521
  # to the HTTP request.
@@ -1586,7 +1586,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1586
1586
  # manifest is immutable. This operation is idempotent.
1587
1587
  #
1588
1588
  # @param resource_group_name [String] Name of the resource group within the
1589
- # Azure subscription.
1589
+ # azure subscription.
1590
1590
  # @param namespace_name [String] The Namespace name
1591
1591
  # @param parameters [EHNamespace] Parameters for creating a namespace resource.
1592
1592
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -1604,7 +1604,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1604
1604
  # manifest is immutable. This operation is idempotent.
1605
1605
  #
1606
1606
  # @param resource_group_name [String] Name of the resource group within the
1607
- # Azure subscription.
1607
+ # azure subscription.
1608
1608
  # @param namespace_name [String] The Namespace name
1609
1609
  # @param parameters [EHNamespace] Parameters for creating a namespace resource.
1610
1610
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -1621,7 +1621,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1621
1621
  # manifest is immutable. This operation is idempotent.
1622
1622
  #
1623
1623
  # @param resource_group_name [String] Name of the resource group within the
1624
- # Azure subscription.
1624
+ # azure subscription.
1625
1625
  # @param namespace_name [String] The Namespace name
1626
1626
  # @param parameters [EHNamespace] Parameters for creating a namespace resource.
1627
1627
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -1711,7 +1711,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1711
1711
  # resources under the namespace.
1712
1712
  #
1713
1713
  # @param resource_group_name [String] Name of the resource group within the
1714
- # Azure subscription.
1714
+ # azure subscription.
1715
1715
  # @param namespace_name [String] The Namespace name
1716
1716
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1717
1717
  # will be added to the HTTP request.
@@ -1727,7 +1727,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1727
1727
  # resources under the namespace.
1728
1728
  #
1729
1729
  # @param resource_group_name [String] Name of the resource group within the
1730
- # Azure subscription.
1730
+ # azure subscription.
1731
1731
  # @param namespace_name [String] The Namespace name
1732
1732
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1733
1733
  # will be added to the HTTP request.
@@ -1743,7 +1743,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1743
1743
  # resources under the namespace.
1744
1744
  #
1745
1745
  # @param resource_group_name [String] Name of the resource group within the
1746
- # Azure subscription.
1746
+ # azure subscription.
1747
1747
  # @param namespace_name [String] The Namespace name
1748
1748
  # @param [Hash{String => String}] A hash of custom headers that will be added
1749
1749
  # to the HTTP request.
@@ -1800,24 +1800,22 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1800
1800
  end
1801
1801
 
1802
1802
  #
1803
- # Lists all the available Namespaces within a subscription, irrespective of the
1804
- # resource groups.
1803
+ # Gets a list of IP Filter rules for a Namespace.
1805
1804
  #
1806
1805
  # @param next_page_link [String] The NextLink from the previous successful call
1807
1806
  # to List operation.
1808
1807
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1809
1808
  # will be added to the HTTP request.
1810
1809
  #
1811
- # @return [EHNamespaceListResult] operation results.
1810
+ # @return [IpFilterRuleListResult] operation results.
1812
1811
  #
1813
- def list_next(next_page_link, custom_headers:nil)
1814
- response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1812
+ def list_ipfilter_rules_next(next_page_link, custom_headers:nil)
1813
+ response = list_ipfilter_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1815
1814
  response.body unless response.nil?
1816
1815
  end
1817
1816
 
1818
1817
  #
1819
- # Lists all the available Namespaces within a subscription, irrespective of the
1820
- # resource groups.
1818
+ # Gets a list of IP Filter rules for a Namespace.
1821
1819
  #
1822
1820
  # @param next_page_link [String] The NextLink from the previous successful call
1823
1821
  # to List operation.
@@ -1826,13 +1824,12 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1826
1824
  #
1827
1825
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1828
1826
  #
1829
- def list_next_with_http_info(next_page_link, custom_headers:nil)
1830
- list_next_async(next_page_link, custom_headers:custom_headers).value!
1827
+ def list_ipfilter_rules_next_with_http_info(next_page_link, custom_headers:nil)
1828
+ list_ipfilter_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1831
1829
  end
1832
1830
 
1833
1831
  #
1834
- # Lists all the available Namespaces within a subscription, irrespective of the
1835
- # resource groups.
1832
+ # Gets a list of IP Filter rules for a Namespace.
1836
1833
  #
1837
1834
  # @param next_page_link [String] The NextLink from the previous successful call
1838
1835
  # to List operation.
@@ -1841,7 +1838,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1841
1838
  #
1842
1839
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1843
1840
  #
1844
- def list_next_async(next_page_link, custom_headers:nil)
1841
+ def list_ipfilter_rules_next_async(next_page_link, custom_headers:nil)
1845
1842
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1846
1843
 
1847
1844
 
@@ -1879,7 +1876,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1879
1876
  if status_code == 200
1880
1877
  begin
1881
1878
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1882
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespaceListResult.mapper()
1879
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRuleListResult.mapper()
1883
1880
  result.body = @client.deserialize(result_mapper, parsed_response)
1884
1881
  rescue Exception => e
1885
1882
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1893,7 +1890,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1893
1890
  end
1894
1891
 
1895
1892
  #
1896
- # Lists the available Namespaces within a resource group.
1893
+ # Lists all the available Namespaces within a subscription, irrespective of the
1894
+ # resource groups.
1897
1895
  #
1898
1896
  # @param next_page_link [String] The NextLink from the previous successful call
1899
1897
  # to List operation.
@@ -1902,13 +1900,14 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1902
1900
  #
1903
1901
  # @return [EHNamespaceListResult] operation results.
1904
1902
  #
1905
- def list_by_resource_group_next(next_page_link, custom_headers:nil)
1906
- response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1903
+ def list_next(next_page_link, custom_headers:nil)
1904
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1907
1905
  response.body unless response.nil?
1908
1906
  end
1909
1907
 
1910
1908
  #
1911
- # Lists the available Namespaces within a resource group.
1909
+ # Lists all the available Namespaces within a subscription, irrespective of the
1910
+ # resource groups.
1912
1911
  #
1913
1912
  # @param next_page_link [String] The NextLink from the previous successful call
1914
1913
  # to List operation.
@@ -1917,12 +1916,13 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1917
1916
  #
1918
1917
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1919
1918
  #
1920
- def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1921
- list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1919
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1920
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1922
1921
  end
1923
1922
 
1924
1923
  #
1925
- # Lists the available Namespaces within a resource group.
1924
+ # Lists all the available Namespaces within a subscription, irrespective of the
1925
+ # resource groups.
1926
1926
  #
1927
1927
  # @param next_page_link [String] The NextLink from the previous successful call
1928
1928
  # to List operation.
@@ -1931,7 +1931,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1931
1931
  #
1932
1932
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1933
1933
  #
1934
- def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1934
+ def list_next_async(next_page_link, custom_headers:nil)
1935
1935
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1936
1936
 
1937
1937
 
@@ -1983,22 +1983,22 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1983
1983
  end
1984
1984
 
1985
1985
  #
1986
- # Gets a list of IP Filter rules for a Namespace.
1986
+ # Lists the available Namespaces within a resource group.
1987
1987
  #
1988
1988
  # @param next_page_link [String] The NextLink from the previous successful call
1989
1989
  # to List operation.
1990
1990
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1991
1991
  # will be added to the HTTP request.
1992
1992
  #
1993
- # @return [IpFilterRuleListResult] operation results.
1993
+ # @return [EHNamespaceListResult] operation results.
1994
1994
  #
1995
- def list_ipfilter_rules_next(next_page_link, custom_headers:nil)
1996
- response = list_ipfilter_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1995
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1996
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1997
1997
  response.body unless response.nil?
1998
1998
  end
1999
1999
 
2000
2000
  #
2001
- # Gets a list of IP Filter rules for a Namespace.
2001
+ # Lists the available Namespaces within a resource group.
2002
2002
  #
2003
2003
  # @param next_page_link [String] The NextLink from the previous successful call
2004
2004
  # to List operation.
@@ -2007,12 +2007,12 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
2007
2007
  #
2008
2008
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2009
2009
  #
2010
- def list_ipfilter_rules_next_with_http_info(next_page_link, custom_headers:nil)
2011
- list_ipfilter_rules_next_async(next_page_link, custom_headers:custom_headers).value!
2010
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
2011
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
2012
2012
  end
2013
2013
 
2014
2014
  #
2015
- # Gets a list of IP Filter rules for a Namespace.
2015
+ # Lists the available Namespaces within a resource group.
2016
2016
  #
2017
2017
  # @param next_page_link [String] The NextLink from the previous successful call
2018
2018
  # to List operation.
@@ -2021,7 +2021,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
2021
2021
  #
2022
2022
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2023
2023
  #
2024
- def list_ipfilter_rules_next_async(next_page_link, custom_headers:nil)
2024
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
2025
2025
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2026
2026
 
2027
2027
 
@@ -2059,7 +2059,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
2059
2059
  if status_code == 200
2060
2060
  begin
2061
2061
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2062
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRuleListResult.mapper()
2062
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespaceListResult.mapper()
2063
2063
  result.body = @client.deserialize(result_mapper, parsed_response)
2064
2064
  rescue Exception => e
2065
2065
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -2163,66 +2163,66 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
2163
2163
  end
2164
2164
 
2165
2165
  #
2166
- # Lists all the available Namespaces within a subscription, irrespective of the
2167
- # resource groups.
2166
+ # Gets a list of IP Filter rules for a Namespace.
2168
2167
  #
2168
+ # @param resource_group_name [String] Name of the resource group within the
2169
+ # azure subscription.
2170
+ # @param namespace_name [String] The Namespace name
2169
2171
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2170
2172
  # will be added to the HTTP request.
2171
2173
  #
2172
- # @return [EHNamespaceListResult] which provide lazy access to pages of the
2174
+ # @return [IpFilterRuleListResult] which provide lazy access to pages of the
2173
2175
  # response.
2174
2176
  #
2175
- def list_as_lazy(custom_headers:nil)
2176
- response = list_async(custom_headers:custom_headers).value!
2177
+ def list_ipfilter_rules_as_lazy(resource_group_name, namespace_name, custom_headers:nil)
2178
+ response = list_ipfilter_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
2177
2179
  unless response.nil?
2178
2180
  page = response.body
2179
2181
  page.next_method = Proc.new do |next_page_link|
2180
- list_next_async(next_page_link, custom_headers:custom_headers)
2182
+ list_ipfilter_rules_next_async(next_page_link, custom_headers:custom_headers)
2181
2183
  end
2182
2184
  page
2183
2185
  end
2184
2186
  end
2185
2187
 
2186
2188
  #
2187
- # Lists the available Namespaces within a resource group.
2189
+ # Lists all the available Namespaces within a subscription, irrespective of the
2190
+ # resource groups.
2188
2191
  #
2189
- # @param resource_group_name [String] Name of the resource group within the
2190
- # Azure subscription.
2191
2192
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2192
2193
  # will be added to the HTTP request.
2193
2194
  #
2194
2195
  # @return [EHNamespaceListResult] which provide lazy access to pages of the
2195
2196
  # response.
2196
2197
  #
2197
- def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
2198
- response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
2198
+ def list_as_lazy(custom_headers:nil)
2199
+ response = list_async(custom_headers:custom_headers).value!
2199
2200
  unless response.nil?
2200
2201
  page = response.body
2201
2202
  page.next_method = Proc.new do |next_page_link|
2202
- list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
2203
+ list_next_async(next_page_link, custom_headers:custom_headers)
2203
2204
  end
2204
2205
  page
2205
2206
  end
2206
2207
  end
2207
2208
 
2208
2209
  #
2209
- # Gets a list of IP Filter rules for a Namespace.
2210
+ # Lists the available Namespaces within a resource group.
2210
2211
  #
2211
2212
  # @param resource_group_name [String] Name of the resource group within the
2212
- # Azure subscription.
2213
- # @param namespace_name [String] The Namespace name
2213
+ # azure subscription.
2214
2214
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2215
2215
  # will be added to the HTTP request.
2216
2216
  #
2217
- # @return [IpFilterRuleListResult] which provide lazy access to pages of the
2217
+ # @return [EHNamespaceListResult] which provide lazy access to pages of the
2218
2218
  # response.
2219
2219
  #
2220
- def list_ipfilter_rules_as_lazy(resource_group_name, namespace_name, custom_headers:nil)
2221
- response = list_ipfilter_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
2220
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
2221
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
2222
2222
  unless response.nil?
2223
2223
  page = response.body
2224
2224
  page.next_method = Proc.new do |next_page_link|
2225
- list_ipfilter_rules_next_async(next_page_link, custom_headers:custom_headers)
2225
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
2226
2226
  end
2227
2227
  page
2228
2228
  end
@@ -2232,7 +2232,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
2232
2232
  # Gets a list of VirtualNetwork rules for a Namespace.
2233
2233
  #
2234
2234
  # @param resource_group_name [String] Name of the resource group within the
2235
- # Azure subscription.
2235
+ # azure subscription.
2236
2236
  # @param namespace_name [String] The Namespace name
2237
2237
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2238
2238
  # will be added to the HTTP request.