azure_mgmt_service_bus 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_service_bus.rb +35 -20
  3. data/lib/generated/azure_mgmt_service_bus/models/{resource_list_keys.rb → access_keys.rb} +11 -5
  4. data/lib/generated/azure_mgmt_service_bus/models/access_rights.rb +1 -1
  5. data/lib/generated/azure_mgmt_service_bus/models/action.rb +69 -0
  6. data/lib/generated/azure_mgmt_service_bus/models/authorization_rule_properties.rb +53 -0
  7. data/lib/generated/azure_mgmt_service_bus/models/check_name_availability.rb +48 -0
  8. data/lib/generated/azure_mgmt_service_bus/models/check_name_availability_result.rb +72 -0
  9. data/lib/generated/azure_mgmt_service_bus/models/correlation_filter.rb +127 -0
  10. data/lib/generated/azure_mgmt_service_bus/models/entity_status.rb +5 -5
  11. data/lib/generated/azure_mgmt_service_bus/models/error_response.rb +56 -0
  12. data/lib/generated/azure_mgmt_service_bus/models/filter_type.rb +16 -0
  13. data/lib/generated/azure_mgmt_service_bus/models/{policykey.rb → key_type.rb} +3 -3
  14. data/lib/generated/azure_mgmt_service_bus/models/message_count_details.rb +9 -8
  15. data/lib/generated/azure_mgmt_service_bus/models/operation.rb +57 -0
  16. data/lib/generated/azure_mgmt_service_bus/models/operation_display.rb +69 -0
  17. data/lib/generated/azure_mgmt_service_bus/models/operation_list_result.rb +99 -0
  18. data/lib/generated/azure_mgmt_service_bus/models/regenerate_access_key_parameters.rb +59 -0
  19. data/lib/generated/azure_mgmt_service_bus/models/resource_namespace_patch.rb +86 -0
  20. data/lib/generated/azure_mgmt_service_bus/models/rule.rb +107 -0
  21. data/lib/generated/azure_mgmt_service_bus/models/rule_list_result.rb +95 -0
  22. data/lib/generated/azure_mgmt_service_bus/models/{shared_access_authorization_rule_resource.rb → sbauthorization_rule.rb} +7 -27
  23. data/lib/generated/azure_mgmt_service_bus/models/{shared_access_authorization_rule_list_result.rb → sbauthorization_rule_list_result.rb} +12 -13
  24. data/lib/generated/azure_mgmt_service_bus/models/{namespace_resource.rb → sbnamespace.rb} +19 -7
  25. data/lib/generated/azure_mgmt_service_bus/models/{namespace_list_result.rb → sbnamespace_list_result.rb} +11 -11
  26. data/lib/generated/azure_mgmt_service_bus/models/{namespace_create_or_update_parameters.rb → sbnamespace_update_parameters.rb} +50 -20
  27. data/lib/generated/azure_mgmt_service_bus/models/{queue_create_or_update_parameters.rb → sbqueue.rb} +119 -133
  28. data/lib/generated/azure_mgmt_service_bus/models/{queue_list_result.rb → sbqueue_list_result.rb} +11 -10
  29. data/lib/generated/azure_mgmt_service_bus/models/{sku.rb → sbsku.rb} +14 -10
  30. data/lib/generated/azure_mgmt_service_bus/models/{subscription_resource.rb → sbsubscription.rb} +74 -92
  31. data/lib/generated/azure_mgmt_service_bus/models/{subscription_list_result.rb → sbsubscription_list_result.rb} +11 -10
  32. data/lib/generated/azure_mgmt_service_bus/models/{topic_create_or_update_parameters.rb → sbtopic.rb} +102 -97
  33. data/lib/generated/azure_mgmt_service_bus/models/{topic_list_result.rb → sbtopic_list_result.rb} +11 -10
  34. data/lib/generated/azure_mgmt_service_bus/models/sku_name.rb +1 -1
  35. data/lib/generated/azure_mgmt_service_bus/models/sku_tier.rb +1 -1
  36. data/lib/generated/azure_mgmt_service_bus/models/sql_filter.rb +72 -0
  37. data/lib/generated/azure_mgmt_service_bus/models/sql_rule_action.rb +58 -0
  38. data/lib/generated/azure_mgmt_service_bus/models/tracked_resource.rb +86 -0
  39. data/lib/generated/azure_mgmt_service_bus/models/unavailable_reason.rb +20 -0
  40. data/lib/generated/azure_mgmt_service_bus/module_definition.rb +1 -1
  41. data/lib/generated/azure_mgmt_service_bus/namespaces.rb +442 -188
  42. data/lib/generated/azure_mgmt_service_bus/operations.rb +213 -0
  43. data/lib/generated/azure_mgmt_service_bus/queues.rb +198 -169
  44. data/lib/generated/azure_mgmt_service_bus/rules.rb +558 -0
  45. data/lib/generated/azure_mgmt_service_bus/service_bus_management_client.rb +10 -2
  46. data/lib/generated/azure_mgmt_service_bus/subscriptions.rb +90 -78
  47. data/lib/generated/azure_mgmt_service_bus/topics.rb +199 -173
  48. data/lib/generated/azure_mgmt_service_bus/version.rb +2 -2
  49. metadata +38 -23
  50. data/lib/generated/azure_mgmt_service_bus/models/queue_resource.rb +0 -308
  51. data/lib/generated/azure_mgmt_service_bus/models/regenerate_keys_parameters.rb +0 -46
  52. data/lib/generated/azure_mgmt_service_bus/models/shared_access_authorization_rule_create_or_update_parameters.rb +0 -74
  53. data/lib/generated/azure_mgmt_service_bus/models/subscription_create_or_update_parameters.rb +0 -213
  54. data/lib/generated/azure_mgmt_service_bus/models/topic_resource.rb +0 -263
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -36,6 +36,9 @@ module Azure::ARM::ServiceBus
36
36
  # is generated and included in each request. Default is true.
37
37
  attr_accessor :generate_client_request_id
38
38
 
39
+ # @return [Operations] operations
40
+ attr_reader :operations
41
+
39
42
  # @return [Namespaces] namespaces
40
43
  attr_reader :namespaces
41
44
 
@@ -48,6 +51,9 @@ module Azure::ARM::ServiceBus
48
51
  # @return [Subscriptions] subscriptions
49
52
  attr_reader :subscriptions
50
53
 
54
+ # @return [Rules] rules
55
+ attr_reader :rules
56
+
51
57
  #
52
58
  # Creates initializes a new instance of the ServiceBusManagementClient class.
53
59
  # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
@@ -61,11 +67,13 @@ module Azure::ARM::ServiceBus
61
67
  fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
62
68
  @credentials = credentials
63
69
 
70
+ @operations = Operations.new(self)
64
71
  @namespaces = Namespaces.new(self)
65
72
  @queues = Queues.new(self)
66
73
  @topics = Topics.new(self)
67
74
  @subscriptions = Subscriptions.new(self)
68
- @api_version = '2015-08-01'
75
+ @rules = Rules.new(self)
76
+ @api_version = '2017-04-01'
69
77
  @accept_language = 'en-US'
70
78
  @long_running_operation_retry_timeout = 30
71
79
  @generate_client_request_id = true
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -8,7 +8,6 @@ module Azure::ARM::ServiceBus
8
8
  # Azure Service Bus client
9
9
  #
10
10
  class Subscriptions
11
- include Azure::ARM::ServiceBus::Models
12
11
  include MsRestAzure
13
12
 
14
13
  #
@@ -23,48 +22,51 @@ module Azure::ARM::ServiceBus
23
22
  attr_reader :client
24
23
 
25
24
  #
26
- # Lsit all the subscriptions under a specified topic.
25
+ # List all the subscriptions under a specified topic.
27
26
  #
28
- # @param resource_group_name [String] The name of the resource group.
29
- # @param namespace_name [String] The namespace name.
27
+ # @param resource_group_name [String] Name of the Resource group within the
28
+ # Azure subscription.
29
+ # @param namespace_name [String] The namespace name
30
30
  # @param topic_name [String] The topic name.
31
31
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
32
  # will be added to the HTTP request.
33
33
  #
34
- # @return [Array<SubscriptionResource>] operation results.
34
+ # @return [Array<SBSubscription>] operation results.
35
35
  #
36
- def list_all(resource_group_name, namespace_name, topic_name, custom_headers = nil)
37
- first_page = list_all_as_lazy(resource_group_name, namespace_name, topic_name, custom_headers)
36
+ def list_by_topic(resource_group_name, namespace_name, topic_name, custom_headers = nil)
37
+ first_page = list_by_topic_as_lazy(resource_group_name, namespace_name, topic_name, custom_headers)
38
38
  first_page.get_all_items
39
39
  end
40
40
 
41
41
  #
42
- # Lsit all the subscriptions under a specified topic.
42
+ # List all the subscriptions under a specified topic.
43
43
  #
44
- # @param resource_group_name [String] The name of the resource group.
45
- # @param namespace_name [String] The namespace name.
44
+ # @param resource_group_name [String] Name of the Resource group within the
45
+ # Azure subscription.
46
+ # @param namespace_name [String] The namespace name
46
47
  # @param topic_name [String] The topic name.
47
48
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
48
49
  # will be added to the HTTP request.
49
50
  #
50
51
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
52
  #
52
- def list_all_with_http_info(resource_group_name, namespace_name, topic_name, custom_headers = nil)
53
- list_all_async(resource_group_name, namespace_name, topic_name, custom_headers).value!
53
+ def list_by_topic_with_http_info(resource_group_name, namespace_name, topic_name, custom_headers = nil)
54
+ list_by_topic_async(resource_group_name, namespace_name, topic_name, custom_headers).value!
54
55
  end
55
56
 
56
57
  #
57
- # Lsit all the subscriptions under a specified topic.
58
+ # List all the subscriptions under a specified topic.
58
59
  #
59
- # @param resource_group_name [String] The name of the resource group.
60
- # @param namespace_name [String] The namespace name.
60
+ # @param resource_group_name [String] Name of the Resource group within the
61
+ # Azure subscription.
62
+ # @param namespace_name [String] The namespace name
61
63
  # @param topic_name [String] The topic name.
62
64
  # @param [Hash{String => String}] A hash of custom headers that will be added
63
65
  # to the HTTP request.
64
66
  #
65
67
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
66
68
  #
67
- def list_all_async(resource_group_name, namespace_name, topic_name, custom_headers = nil)
69
+ def list_by_topic_async(resource_group_name, namespace_name, topic_name, custom_headers = nil)
68
70
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
69
71
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
70
72
  fail ArgumentError, 'topic_name is nil' if topic_name.nil?
@@ -77,7 +79,7 @@ module Azure::ARM::ServiceBus
77
79
  # Set Headers
78
80
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
79
81
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
80
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions'
82
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions'
81
83
 
82
84
  request_url = @base_url || @client.base_url
83
85
 
@@ -96,7 +98,7 @@ module Azure::ARM::ServiceBus
96
98
  response_content = http_response.body
97
99
  unless status_code == 200
98
100
  error_model = JSON.load(response_content)
99
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
101
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
100
102
  end
101
103
 
102
104
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
@@ -104,8 +106,8 @@ module Azure::ARM::ServiceBus
104
106
  if status_code == 200
105
107
  begin
106
108
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
107
- result_mapper = SubscriptionListResult.mapper()
108
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
109
+ result_mapper = Azure::ARM::ServiceBus::Models::SBSubscriptionListResult.mapper()
110
+ result.body = @client.deserialize(result_mapper, parsed_response)
109
111
  rescue Exception => e
110
112
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
111
113
  end
@@ -120,16 +122,17 @@ module Azure::ARM::ServiceBus
120
122
  #
121
123
  # Creates a topic subscription.
122
124
  #
123
- # @param resource_group_name [String] The name of the resource group.
124
- # @param namespace_name [String] The namespace name.
125
+ # @param resource_group_name [String] Name of the Resource group within the
126
+ # Azure subscription.
127
+ # @param namespace_name [String] The namespace name
125
128
  # @param topic_name [String] The topic name.
126
129
  # @param subscription_name [String] The subscription name.
127
- # @param parameters [SubscriptionCreateOrUpdateParameters] Parameters supplied
128
- # to create a subscription resource.
130
+ # @param parameters [SBSubscription] Parameters supplied to create a
131
+ # subscription resource.
129
132
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
130
133
  # will be added to the HTTP request.
131
134
  #
132
- # @return [SubscriptionResource] operation results.
135
+ # @return [SBSubscription] operation results.
133
136
  #
134
137
  def create_or_update(resource_group_name, namespace_name, topic_name, subscription_name, parameters, custom_headers = nil)
135
138
  response = create_or_update_async(resource_group_name, namespace_name, topic_name, subscription_name, parameters, custom_headers).value!
@@ -139,12 +142,13 @@ module Azure::ARM::ServiceBus
139
142
  #
140
143
  # Creates a topic subscription.
141
144
  #
142
- # @param resource_group_name [String] The name of the resource group.
143
- # @param namespace_name [String] The namespace name.
145
+ # @param resource_group_name [String] Name of the Resource group within the
146
+ # Azure subscription.
147
+ # @param namespace_name [String] The namespace name
144
148
  # @param topic_name [String] The topic name.
145
149
  # @param subscription_name [String] The subscription name.
146
- # @param parameters [SubscriptionCreateOrUpdateParameters] Parameters supplied
147
- # to create a subscription resource.
150
+ # @param parameters [SBSubscription] Parameters supplied to create a
151
+ # subscription resource.
148
152
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
149
153
  # will be added to the HTTP request.
150
154
  #
@@ -157,12 +161,13 @@ module Azure::ARM::ServiceBus
157
161
  #
158
162
  # Creates a topic subscription.
159
163
  #
160
- # @param resource_group_name [String] The name of the resource group.
161
- # @param namespace_name [String] The namespace name.
164
+ # @param resource_group_name [String] Name of the Resource group within the
165
+ # Azure subscription.
166
+ # @param namespace_name [String] The namespace name
162
167
  # @param topic_name [String] The topic name.
163
168
  # @param subscription_name [String] The subscription name.
164
- # @param parameters [SubscriptionCreateOrUpdateParameters] Parameters supplied
165
- # to create a subscription resource.
169
+ # @param parameters [SBSubscription] Parameters supplied to create a
170
+ # subscription resource.
166
171
  # @param [Hash{String => String}] A hash of custom headers that will be added
167
172
  # to the HTTP request.
168
173
  #
@@ -187,11 +192,11 @@ module Azure::ARM::ServiceBus
187
192
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
188
193
 
189
194
  # Serialize Request
190
- request_mapper = SubscriptionCreateOrUpdateParameters.mapper()
191
- request_content = @client.serialize(request_mapper, parameters, 'parameters')
195
+ request_mapper = Azure::ARM::ServiceBus::Models::SBSubscription.mapper()
196
+ request_content = @client.serialize(request_mapper, parameters)
192
197
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
193
198
 
194
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'
199
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'
195
200
 
196
201
  request_url = @base_url || @client.base_url
197
202
 
@@ -211,7 +216,7 @@ module Azure::ARM::ServiceBus
211
216
  response_content = http_response.body
212
217
  unless status_code == 200
213
218
  error_model = JSON.load(response_content)
214
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
219
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
215
220
  end
216
221
 
217
222
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
@@ -219,8 +224,8 @@ module Azure::ARM::ServiceBus
219
224
  if status_code == 200
220
225
  begin
221
226
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
222
- result_mapper = SubscriptionResource.mapper()
223
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
227
+ result_mapper = Azure::ARM::ServiceBus::Models::SBSubscription.mapper()
228
+ result.body = @client.deserialize(result_mapper, parsed_response)
224
229
  rescue Exception => e
225
230
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
226
231
  end
@@ -235,8 +240,9 @@ module Azure::ARM::ServiceBus
235
240
  #
236
241
  # Deletes a subscription from the specified topic.
237
242
  #
238
- # @param resource_group_name [String] The name of the resource group.
239
- # @param namespace_name [String] The namespace name.
243
+ # @param resource_group_name [String] Name of the Resource group within the
244
+ # Azure subscription.
245
+ # @param namespace_name [String] The namespace name
240
246
  # @param topic_name [String] The topic name.
241
247
  # @param subscription_name [String] The subscription name.
242
248
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -251,8 +257,9 @@ module Azure::ARM::ServiceBus
251
257
  #
252
258
  # Deletes a subscription from the specified topic.
253
259
  #
254
- # @param resource_group_name [String] The name of the resource group.
255
- # @param namespace_name [String] The namespace name.
260
+ # @param resource_group_name [String] Name of the Resource group within the
261
+ # Azure subscription.
262
+ # @param namespace_name [String] The namespace name
256
263
  # @param topic_name [String] The topic name.
257
264
  # @param subscription_name [String] The subscription name.
258
265
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -267,8 +274,9 @@ module Azure::ARM::ServiceBus
267
274
  #
268
275
  # Deletes a subscription from the specified topic.
269
276
  #
270
- # @param resource_group_name [String] The name of the resource group.
271
- # @param namespace_name [String] The namespace name.
277
+ # @param resource_group_name [String] Name of the Resource group within the
278
+ # Azure subscription.
279
+ # @param namespace_name [String] The namespace name
272
280
  # @param topic_name [String] The topic name.
273
281
  # @param subscription_name [String] The subscription name.
274
282
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -290,7 +298,7 @@ module Azure::ARM::ServiceBus
290
298
  # Set Headers
291
299
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
292
300
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
293
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'
301
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'
294
302
 
295
303
  request_url = @base_url || @client.base_url
296
304
 
@@ -309,7 +317,7 @@ module Azure::ARM::ServiceBus
309
317
  response_content = http_response.body
310
318
  unless status_code == 204 || status_code == 200
311
319
  error_model = JSON.load(response_content)
312
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
320
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
313
321
  end
314
322
 
315
323
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
@@ -323,14 +331,15 @@ module Azure::ARM::ServiceBus
323
331
  #
324
332
  # Returns a subscription description for the specified topic.
325
333
  #
326
- # @param resource_group_name [String] The name of the resource group.
327
- # @param namespace_name [String] The namespace name.
334
+ # @param resource_group_name [String] Name of the Resource group within the
335
+ # Azure subscription.
336
+ # @param namespace_name [String] The namespace name
328
337
  # @param topic_name [String] The topic name.
329
338
  # @param subscription_name [String] The subscription name.
330
339
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
331
340
  # will be added to the HTTP request.
332
341
  #
333
- # @return [SubscriptionResource] operation results.
342
+ # @return [SBSubscription] operation results.
334
343
  #
335
344
  def get(resource_group_name, namespace_name, topic_name, subscription_name, custom_headers = nil)
336
345
  response = get_async(resource_group_name, namespace_name, topic_name, subscription_name, custom_headers).value!
@@ -340,8 +349,9 @@ module Azure::ARM::ServiceBus
340
349
  #
341
350
  # Returns a subscription description for the specified topic.
342
351
  #
343
- # @param resource_group_name [String] The name of the resource group.
344
- # @param namespace_name [String] The namespace name.
352
+ # @param resource_group_name [String] Name of the Resource group within the
353
+ # Azure subscription.
354
+ # @param namespace_name [String] The namespace name
345
355
  # @param topic_name [String] The topic name.
346
356
  # @param subscription_name [String] The subscription name.
347
357
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -356,8 +366,9 @@ module Azure::ARM::ServiceBus
356
366
  #
357
367
  # Returns a subscription description for the specified topic.
358
368
  #
359
- # @param resource_group_name [String] The name of the resource group.
360
- # @param namespace_name [String] The namespace name.
369
+ # @param resource_group_name [String] Name of the Resource group within the
370
+ # Azure subscription.
371
+ # @param namespace_name [String] The namespace name
361
372
  # @param topic_name [String] The topic name.
362
373
  # @param subscription_name [String] The subscription name.
363
374
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -379,7 +390,7 @@ module Azure::ARM::ServiceBus
379
390
  # Set Headers
380
391
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
381
392
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
382
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'
393
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'
383
394
 
384
395
  request_url = @base_url || @client.base_url
385
396
 
@@ -398,7 +409,7 @@ module Azure::ARM::ServiceBus
398
409
  response_content = http_response.body
399
410
  unless status_code == 200
400
411
  error_model = JSON.load(response_content)
401
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
412
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
402
413
  end
403
414
 
404
415
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
@@ -406,8 +417,8 @@ module Azure::ARM::ServiceBus
406
417
  if status_code == 200
407
418
  begin
408
419
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
409
- result_mapper = SubscriptionResource.mapper()
410
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
420
+ result_mapper = Azure::ARM::ServiceBus::Models::SBSubscription.mapper()
421
+ result.body = @client.deserialize(result_mapper, parsed_response)
411
422
  rescue Exception => e
412
423
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
413
424
  end
@@ -420,22 +431,22 @@ module Azure::ARM::ServiceBus
420
431
  end
421
432
 
422
433
  #
423
- # Lsit all the subscriptions under a specified topic.
434
+ # List all the subscriptions under a specified topic.
424
435
  #
425
436
  # @param next_page_link [String] The NextLink from the previous successful call
426
437
  # to List operation.
427
438
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
428
439
  # will be added to the HTTP request.
429
440
  #
430
- # @return [SubscriptionListResult] operation results.
441
+ # @return [SBSubscriptionListResult] operation results.
431
442
  #
432
- def list_all_next(next_page_link, custom_headers = nil)
433
- response = list_all_next_async(next_page_link, custom_headers).value!
443
+ def list_by_topic_next(next_page_link, custom_headers = nil)
444
+ response = list_by_topic_next_async(next_page_link, custom_headers).value!
434
445
  response.body unless response.nil?
435
446
  end
436
447
 
437
448
  #
438
- # Lsit all the subscriptions under a specified topic.
449
+ # List all the subscriptions under a specified topic.
439
450
  #
440
451
  # @param next_page_link [String] The NextLink from the previous successful call
441
452
  # to List operation.
@@ -444,12 +455,12 @@ module Azure::ARM::ServiceBus
444
455
  #
445
456
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
446
457
  #
447
- def list_all_next_with_http_info(next_page_link, custom_headers = nil)
448
- list_all_next_async(next_page_link, custom_headers).value!
458
+ def list_by_topic_next_with_http_info(next_page_link, custom_headers = nil)
459
+ list_by_topic_next_async(next_page_link, custom_headers).value!
449
460
  end
450
461
 
451
462
  #
452
- # Lsit all the subscriptions under a specified topic.
463
+ # List all the subscriptions under a specified topic.
453
464
  #
454
465
  # @param next_page_link [String] The NextLink from the previous successful call
455
466
  # to List operation.
@@ -458,7 +469,7 @@ module Azure::ARM::ServiceBus
458
469
  #
459
470
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
460
471
  #
461
- def list_all_next_async(next_page_link, custom_headers = nil)
472
+ def list_by_topic_next_async(next_page_link, custom_headers = nil)
462
473
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
463
474
 
464
475
 
@@ -485,7 +496,7 @@ module Azure::ARM::ServiceBus
485
496
  response_content = http_response.body
486
497
  unless status_code == 200
487
498
  error_model = JSON.load(response_content)
488
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
499
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
489
500
  end
490
501
 
491
502
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
@@ -493,8 +504,8 @@ module Azure::ARM::ServiceBus
493
504
  if status_code == 200
494
505
  begin
495
506
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
496
- result_mapper = SubscriptionListResult.mapper()
497
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
507
+ result_mapper = Azure::ARM::ServiceBus::Models::SBSubscriptionListResult.mapper()
508
+ result.body = @client.deserialize(result_mapper, parsed_response)
498
509
  rescue Exception => e
499
510
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
500
511
  end
@@ -507,23 +518,24 @@ module Azure::ARM::ServiceBus
507
518
  end
508
519
 
509
520
  #
510
- # Lsit all the subscriptions under a specified topic.
521
+ # List all the subscriptions under a specified topic.
511
522
  #
512
- # @param resource_group_name [String] The name of the resource group.
513
- # @param namespace_name [String] The namespace name.
523
+ # @param resource_group_name [String] Name of the Resource group within the
524
+ # Azure subscription.
525
+ # @param namespace_name [String] The namespace name
514
526
  # @param topic_name [String] The topic name.
515
527
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
516
528
  # will be added to the HTTP request.
517
529
  #
518
- # @return [SubscriptionListResult] which provide lazy access to pages of the
530
+ # @return [SBSubscriptionListResult] which provide lazy access to pages of the
519
531
  # response.
520
532
  #
521
- def list_all_as_lazy(resource_group_name, namespace_name, topic_name, custom_headers = nil)
522
- response = list_all_async(resource_group_name, namespace_name, topic_name, custom_headers).value!
533
+ def list_by_topic_as_lazy(resource_group_name, namespace_name, topic_name, custom_headers = nil)
534
+ response = list_by_topic_async(resource_group_name, namespace_name, topic_name, custom_headers).value!
523
535
  unless response.nil?
524
536
  page = response.body
525
537
  page.next_method = Proc.new do |next_page_link|
526
- list_all_next_async(next_page_link, custom_headers)
538
+ list_by_topic_next_async(next_page_link, custom_headers)
527
539
  end
528
540
  page
529
541
  end