azure_mgmt_service_bus 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-08-01/generated/azure_mgmt_service_bus.rb +67 -0
  3. data/lib/{generated → 2015-08-01/generated}/azure_mgmt_service_bus/models/access_rights.rb +1 -1
  4. data/lib/{generated → 2015-08-01/generated}/azure_mgmt_service_bus/models/check_name_availability.rb +1 -1
  5. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/check_name_availability_result.rb +70 -0
  6. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/entity_availability_status.rb +19 -0
  7. data/lib/{generated → 2015-08-01/generated}/azure_mgmt_service_bus/models/entity_status.rb +5 -5
  8. data/lib/{generated → 2015-08-01/generated}/azure_mgmt_service_bus/models/message_count_details.rb +8 -8
  9. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/namespace_create_or_update_parameters.rb +151 -0
  10. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/namespace_list_result.rb +96 -0
  11. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/namespace_resource.rb +169 -0
  12. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/namespace_state.rb +27 -0
  13. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/namespace_update_parameters.rb +62 -0
  14. data/lib/{generated → 2015-08-01/generated}/azure_mgmt_service_bus/models/operation.rb +1 -1
  15. data/lib/{generated → 2015-08-01/generated}/azure_mgmt_service_bus/models/operation_display.rb +1 -1
  16. data/lib/{generated → 2015-08-01/generated}/azure_mgmt_service_bus/models/operation_list_result.rb +1 -1
  17. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/policykey.rb +16 -0
  18. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/queue_create_or_update_parameters.rb +307 -0
  19. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/queue_list_result.rb +95 -0
  20. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/queue_resource.rb +318 -0
  21. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/regenerate_keys_parameters.rb +46 -0
  22. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/resource.rb +77 -0
  23. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/resource_list_keys.rb +88 -0
  24. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/shared_access_authorization_rule_create_or_update_parameters.rb +74 -0
  25. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/shared_access_authorization_rule_list_result.rb +98 -0
  26. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/shared_access_authorization_rule_resource.rb +83 -0
  27. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/sku.rb +66 -0
  28. data/lib/{generated → 2015-08-01/generated}/azure_mgmt_service_bus/models/sku_name.rb +1 -1
  29. data/lib/{generated → 2015-08-01/generated}/azure_mgmt_service_bus/models/sku_tier.rb +1 -1
  30. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/subscription_create_or_update_parameters.rb +237 -0
  31. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/subscription_list_result.rb +96 -0
  32. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/subscription_resource.rb +248 -0
  33. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/topic_create_or_update_parameters.rb +294 -0
  34. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/topic_list_result.rb +95 -0
  35. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/topic_resource.rb +305 -0
  36. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/tracked_resource.rb +82 -0
  37. data/lib/{generated → 2015-08-01/generated}/azure_mgmt_service_bus/models/unavailable_reason.rb +1 -1
  38. data/lib/2015-08-01/generated/azure_mgmt_service_bus/module_definition.rb +9 -0
  39. data/lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb +1751 -0
  40. data/lib/2015-08-01/generated/azure_mgmt_service_bus/operations.rb +213 -0
  41. data/lib/2015-08-01/generated/azure_mgmt_service_bus/queues.rb +1267 -0
  42. data/lib/2015-08-01/generated/azure_mgmt_service_bus/service_bus_management_client.rb +147 -0
  43. data/lib/2015-08-01/generated/azure_mgmt_service_bus/subscriptions.rb +545 -0
  44. data/lib/2015-08-01/generated/azure_mgmt_service_bus/topics.rb +1267 -0
  45. data/lib/{generated → 2015-08-01/generated}/azure_mgmt_service_bus/version.rb +2 -2
  46. data/lib/2017-04-01/generated/azure_mgmt_service_bus.rb +87 -0
  47. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/disaster_recovery_configs.rb +6 -6
  48. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/event_hubs.rb +3 -3
  49. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/access_keys.rb +1 -1
  50. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/access_rights.rb +17 -0
  51. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/action.rb +1 -1
  52. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/arm_disaster_recovery.rb +1 -1
  53. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/arm_disaster_recovery_list_result.rb +1 -1
  54. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/authorization_rule_properties.rb +1 -1
  55. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/capture_description.rb +1 -1
  56. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/check_name_availability.rb +47 -0
  57. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/check_name_availability_result.rb +1 -1
  58. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/correlation_filter.rb +1 -1
  59. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/destination.rb +1 -1
  60. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/encoding_capture_description.rb +1 -1
  61. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/entity_status.rb +23 -0
  62. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/error_response.rb +1 -1
  63. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/event_hub_list_result.rb +1 -1
  64. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/eventhub.rb +1 -1
  65. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/filter_type.rb +1 -1
  66. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/key_type.rb +1 -1
  67. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/message_count_details.rb +91 -0
  68. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/operation.rb +56 -0
  69. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/operation_display.rb +68 -0
  70. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/operation_list_result.rb +99 -0
  71. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/premium_messaging_regions.rb +1 -1
  72. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/premium_messaging_regions_list_result.rb +1 -1
  73. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/premium_messaging_regions_properties.rb +1 -1
  74. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/provisioning_state_dr.rb +1 -1
  75. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/regenerate_access_key_parameters.rb +1 -1
  76. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/resource.rb +1 -1
  77. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/resource_namespace_patch.rb +1 -1
  78. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/role_disaster_recovery.rb +1 -1
  79. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/rule.rb +1 -1
  80. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/rule_list_result.rb +1 -1
  81. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/sbauthorization_rule.rb +1 -1
  82. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/sbauthorization_rule_list_result.rb +1 -1
  83. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/sbnamespace.rb +1 -1
  84. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/sbnamespace_list_result.rb +1 -1
  85. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/sbnamespace_update_parameters.rb +1 -1
  86. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/sbqueue.rb +1 -1
  87. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/sbqueue_list_result.rb +1 -1
  88. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/sbsku.rb +1 -1
  89. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/sbsubscription.rb +1 -1
  90. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/sbsubscription_list_result.rb +1 -1
  91. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/sbtopic.rb +1 -1
  92. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/sbtopic_list_result.rb +1 -1
  93. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sku_name.rb +17 -0
  94. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sku_tier.rb +17 -0
  95. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/sql_filter.rb +1 -1
  96. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/sql_rule_action.rb +1 -1
  97. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/models/tracked_resource.rb +1 -1
  98. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/unavailable_reason.rb +20 -0
  99. data/lib/2017-04-01/generated/azure_mgmt_service_bus/module_definition.rb +9 -0
  100. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/namespaces.rb +23 -23
  101. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/operations.rb +3 -3
  102. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/premium_messaging_regions_operations.rb +3 -3
  103. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/queues.rb +14 -14
  104. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/regions.rb +3 -3
  105. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/rules.rb +6 -6
  106. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/service_bus_management_client.rb +3 -3
  107. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/subscriptions.rb +6 -6
  108. data/lib/{generated → 2017-04-01/generated}/azure_mgmt_service_bus/topics.rb +14 -14
  109. data/lib/{generated/azure_mgmt_service_bus/module_definition.rb → 2017-04-01/generated/azure_mgmt_service_bus/version.rb} +3 -3
  110. data/lib/azure_mgmt_service_bus.rb +3 -1
  111. data/lib/module_definition.rb +7 -0
  112. data/lib/profiles/common/configurable.rb +73 -0
  113. data/lib/profiles/common/default.rb +68 -0
  114. data/lib/profiles/latest/modules/servicebus_profile_module.rb +260 -0
  115. data/lib/profiles/latest/servicebus_latest_profile_client.rb +33 -0
  116. data/lib/profiles/latest/servicebus_module_definition.rb +9 -0
  117. data/lib/version.rb +7 -0
  118. metadata +117 -66
  119. data/lib/generated/azure_mgmt_service_bus.rb +0 -87
@@ -0,0 +1,82 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ServiceBus::Mgmt::V2015_08_01
7
+ module Models
8
+ #
9
+ # The Resource definition.
10
+ #
11
+ class TrackedResource < Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Hash{String => String}] Resource tags
16
+ attr_accessor :tags
17
+
18
+
19
+ #
20
+ # Mapper for TrackedResource class as Ruby Hash.
21
+ # This will be used for serialization/deserialization.
22
+ #
23
+ def self.mapper()
24
+ {
25
+ required: false,
26
+ serialized_name: 'TrackedResource',
27
+ type: {
28
+ name: 'Composite',
29
+ class_name: 'TrackedResource',
30
+ model_properties: {
31
+ id: {
32
+ required: false,
33
+ read_only: true,
34
+ serialized_name: 'id',
35
+ type: {
36
+ name: 'String'
37
+ }
38
+ },
39
+ name: {
40
+ required: false,
41
+ read_only: true,
42
+ serialized_name: 'name',
43
+ type: {
44
+ name: 'String'
45
+ }
46
+ },
47
+ location: {
48
+ required: false,
49
+ serialized_name: 'location',
50
+ type: {
51
+ name: 'String'
52
+ }
53
+ },
54
+ type: {
55
+ required: false,
56
+ read_only: true,
57
+ serialized_name: 'type',
58
+ type: {
59
+ name: 'String'
60
+ }
61
+ },
62
+ tags: {
63
+ required: false,
64
+ serialized_name: 'tags',
65
+ type: {
66
+ name: 'Dictionary',
67
+ value: {
68
+ required: false,
69
+ serialized_name: 'StringElementType',
70
+ type: {
71
+ name: 'String'
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
79
+ end
80
+ end
81
+ end
82
+ end
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::ServiceBus
6
+ module Azure::ServiceBus::Mgmt::V2015_08_01
7
7
  module Models
8
8
  #
9
9
  # Defines values for UnavailableReason
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure end
7
+ module Azure::ServiceBus end
8
+ module Azure::ServiceBus::Mgmt end
9
+ module Azure::ServiceBus::Mgmt::V2015_08_01 end
@@ -0,0 +1,1751 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ServiceBus::Mgmt::V2015_08_01
7
+ #
8
+ # Azure Service Bus client
9
+ #
10
+ class Namespaces
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Namespaces class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ServiceBusManagementClient] reference to the ServiceBusManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Check the give namespace name availability.
26
+ #
27
+ # @param parameters [CheckNameAvailability] Parameters to check availability of
28
+ # the given namespace name
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [CheckNameAvailabilityResult] operation results.
33
+ #
34
+ def check_name_availability_method(parameters, custom_headers = nil)
35
+ response = check_name_availability_method_async(parameters, custom_headers).value!
36
+ response.body unless response.nil?
37
+ end
38
+
39
+ #
40
+ # Check the give namespace name availability.
41
+ #
42
+ # @param parameters [CheckNameAvailability] Parameters to check availability of
43
+ # the given namespace name
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def check_name_availability_method_with_http_info(parameters, custom_headers = nil)
50
+ check_name_availability_method_async(parameters, custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Check the give namespace name availability.
55
+ #
56
+ # @param parameters [CheckNameAvailability] Parameters to check availability of
57
+ # the given namespace name
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def check_name_availability_method_async(parameters, custom_headers = nil)
64
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
65
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
66
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
67
+
68
+
69
+ request_headers = {}
70
+
71
+ # Set Headers
72
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
73
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
74
+
75
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
76
+
77
+ # Serialize Request
78
+ request_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::CheckNameAvailability.mapper()
79
+ request_content = @client.serialize(request_mapper, parameters)
80
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
81
+
82
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/CheckNameAvailability'
83
+
84
+ request_url = @base_url || @client.base_url
85
+
86
+ options = {
87
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
88
+ path_params: {'subscriptionId' => @client.subscription_id},
89
+ query_params: {'api-version' => @client.api_version},
90
+ body: request_content,
91
+ headers: request_headers.merge(custom_headers || {}),
92
+ base_url: request_url
93
+ }
94
+ promise = @client.make_request_async(:post, path_template, options)
95
+
96
+ promise = promise.then do |result|
97
+ http_response = result.response
98
+ status_code = http_response.status
99
+ response_content = http_response.body
100
+ unless status_code == 200
101
+ error_model = JSON.load(response_content)
102
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
103
+ end
104
+
105
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
106
+ # Deserialize Response
107
+ if status_code == 200
108
+ begin
109
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
110
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::CheckNameAvailabilityResult.mapper()
111
+ result.body = @client.deserialize(result_mapper, parsed_response)
112
+ rescue Exception => e
113
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
114
+ end
115
+ end
116
+
117
+ result
118
+ end
119
+
120
+ promise.execute
121
+ end
122
+
123
+ #
124
+ # Gets all the available namespaces within the subscription, irrespective of
125
+ # the resource groups.
126
+ #
127
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
128
+ # will be added to the HTTP request.
129
+ #
130
+ # @return [Array<NamespaceResource>] operation results.
131
+ #
132
+ def list_by_subscription(custom_headers = nil)
133
+ first_page = list_by_subscription_as_lazy(custom_headers)
134
+ first_page.get_all_items
135
+ end
136
+
137
+ #
138
+ # Gets all the available namespaces within the subscription, irrespective of
139
+ # the resource groups.
140
+ #
141
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
142
+ # will be added to the HTTP request.
143
+ #
144
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
145
+ #
146
+ def list_by_subscription_with_http_info(custom_headers = nil)
147
+ list_by_subscription_async(custom_headers).value!
148
+ end
149
+
150
+ #
151
+ # Gets all the available namespaces within the subscription, irrespective of
152
+ # the resource groups.
153
+ #
154
+ # @param [Hash{String => String}] A hash of custom headers that will be added
155
+ # to the HTTP request.
156
+ #
157
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
158
+ #
159
+ def list_by_subscription_async(custom_headers = nil)
160
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
161
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
162
+
163
+
164
+ request_headers = {}
165
+
166
+ # Set Headers
167
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
168
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
169
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces'
170
+
171
+ request_url = @base_url || @client.base_url
172
+
173
+ options = {
174
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
175
+ path_params: {'subscriptionId' => @client.subscription_id},
176
+ query_params: {'api-version' => @client.api_version},
177
+ headers: request_headers.merge(custom_headers || {}),
178
+ base_url: request_url
179
+ }
180
+ promise = @client.make_request_async(:get, path_template, options)
181
+
182
+ promise = promise.then do |result|
183
+ http_response = result.response
184
+ status_code = http_response.status
185
+ response_content = http_response.body
186
+ unless status_code == 200
187
+ error_model = JSON.load(response_content)
188
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
189
+ end
190
+
191
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
192
+ # Deserialize Response
193
+ if status_code == 200
194
+ begin
195
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
196
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceListResult.mapper()
197
+ result.body = @client.deserialize(result_mapper, parsed_response)
198
+ rescue Exception => e
199
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
200
+ end
201
+ end
202
+
203
+ result
204
+ end
205
+
206
+ promise.execute
207
+ end
208
+
209
+ #
210
+ # Gets the available namespaces within a resource group.
211
+ #
212
+ # @param resource_group_name [String] Name of the Resource group within the
213
+ # Azure subscription.
214
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
215
+ # will be added to the HTTP request.
216
+ #
217
+ # @return [Array<NamespaceResource>] operation results.
218
+ #
219
+ def list_by_resource_group(resource_group_name, custom_headers = nil)
220
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers)
221
+ first_page.get_all_items
222
+ end
223
+
224
+ #
225
+ # Gets the available namespaces within a resource group.
226
+ #
227
+ # @param resource_group_name [String] Name of the Resource group within the
228
+ # Azure subscription.
229
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
230
+ # will be added to the HTTP request.
231
+ #
232
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
233
+ #
234
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil)
235
+ list_by_resource_group_async(resource_group_name, custom_headers).value!
236
+ end
237
+
238
+ #
239
+ # Gets the available namespaces within a resource group.
240
+ #
241
+ # @param resource_group_name [String] Name of the Resource group within the
242
+ # Azure subscription.
243
+ # @param [Hash{String => String}] A hash of custom headers that will be added
244
+ # to the HTTP request.
245
+ #
246
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
247
+ #
248
+ def list_by_resource_group_async(resource_group_name, custom_headers = nil)
249
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
250
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
251
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
252
+
253
+
254
+ request_headers = {}
255
+
256
+ # Set Headers
257
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
258
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
259
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces'
260
+
261
+ request_url = @base_url || @client.base_url
262
+
263
+ options = {
264
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
265
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
266
+ query_params: {'api-version' => @client.api_version},
267
+ headers: request_headers.merge(custom_headers || {}),
268
+ base_url: request_url
269
+ }
270
+ promise = @client.make_request_async(:get, path_template, options)
271
+
272
+ promise = promise.then do |result|
273
+ http_response = result.response
274
+ status_code = http_response.status
275
+ response_content = http_response.body
276
+ unless status_code == 200
277
+ error_model = JSON.load(response_content)
278
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
279
+ end
280
+
281
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
282
+ # Deserialize Response
283
+ if status_code == 200
284
+ begin
285
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
286
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceListResult.mapper()
287
+ result.body = @client.deserialize(result_mapper, parsed_response)
288
+ rescue Exception => e
289
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
290
+ end
291
+ end
292
+
293
+ result
294
+ end
295
+
296
+ promise.execute
297
+ end
298
+
299
+ #
300
+ # Creates or updates a service namespace. Once created, this namespace's
301
+ # resource manifest is immutable. This operation is idempotent.
302
+ #
303
+ # @param resource_group_name [String] Name of the Resource group within the
304
+ # Azure subscription.
305
+ # @param namespace_name [String] The namespace name.
306
+ # @param parameters [NamespaceCreateOrUpdateParameters] Parameters supplied to
307
+ # create a namespace resource.
308
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
309
+ # will be added to the HTTP request.
310
+ #
311
+ # @return [NamespaceResource] operation results.
312
+ #
313
+ def create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil)
314
+ response = create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
315
+ response.body unless response.nil?
316
+ end
317
+
318
+ #
319
+ # @param resource_group_name [String] Name of the Resource group within the
320
+ # Azure subscription.
321
+ # @param namespace_name [String] The namespace name.
322
+ # @param parameters [NamespaceCreateOrUpdateParameters] Parameters supplied to
323
+ # create a namespace resource.
324
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
325
+ # will be added to the HTTP request.
326
+ #
327
+ # @return [Concurrent::Promise] promise which provides async access to http
328
+ # response.
329
+ #
330
+ def create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers = nil)
331
+ # Send request
332
+ promise = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers)
333
+
334
+ promise = promise.then do |response|
335
+ # Defining deserialization method.
336
+ deserialize_method = lambda do |parsed_response|
337
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceResource.mapper()
338
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
339
+ end
340
+
341
+ # Waiting for response.
342
+ @client.get_long_running_operation_result(response, deserialize_method)
343
+ end
344
+
345
+ promise
346
+ end
347
+
348
+ #
349
+ # Deletes an existing namespace. This operation also removes all associated
350
+ # resources under the namespace.
351
+ #
352
+ # @param resource_group_name [String] Name of the Resource group within the
353
+ # Azure subscription.
354
+ # @param namespace_name [String] The namespace name
355
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
356
+ # will be added to the HTTP request.
357
+ #
358
+ def delete(resource_group_name, namespace_name, custom_headers = nil)
359
+ response = delete_async(resource_group_name, namespace_name, custom_headers).value!
360
+ nil
361
+ end
362
+
363
+ #
364
+ # @param resource_group_name [String] Name of the Resource group within the
365
+ # Azure subscription.
366
+ # @param namespace_name [String] The namespace name
367
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
368
+ # will be added to the HTTP request.
369
+ #
370
+ # @return [Concurrent::Promise] promise which provides async access to http
371
+ # response.
372
+ #
373
+ def delete_async(resource_group_name, namespace_name, custom_headers = nil)
374
+ # Send request
375
+ promise = begin_delete_async(resource_group_name, namespace_name, custom_headers)
376
+
377
+ promise = promise.then do |response|
378
+ # Defining deserialization method.
379
+ deserialize_method = lambda do |parsed_response|
380
+ end
381
+
382
+ # Waiting for response.
383
+ @client.get_long_running_operation_result(response, deserialize_method)
384
+ end
385
+
386
+ promise
387
+ end
388
+
389
+ #
390
+ # Gets a description for the specified namespace.
391
+ #
392
+ # @param resource_group_name [String] Name of the Resource group within the
393
+ # Azure subscription.
394
+ # @param namespace_name [String] The namespace name
395
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
396
+ # will be added to the HTTP request.
397
+ #
398
+ # @return [NamespaceResource] operation results.
399
+ #
400
+ def get(resource_group_name, namespace_name, custom_headers = nil)
401
+ response = get_async(resource_group_name, namespace_name, custom_headers).value!
402
+ response.body unless response.nil?
403
+ end
404
+
405
+ #
406
+ # Gets a description for the specified namespace.
407
+ #
408
+ # @param resource_group_name [String] Name of the Resource group within the
409
+ # Azure subscription.
410
+ # @param namespace_name [String] The namespace name
411
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
412
+ # will be added to the HTTP request.
413
+ #
414
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
415
+ #
416
+ def get_with_http_info(resource_group_name, namespace_name, custom_headers = nil)
417
+ get_async(resource_group_name, namespace_name, custom_headers).value!
418
+ end
419
+
420
+ #
421
+ # Gets a description for the specified namespace.
422
+ #
423
+ # @param resource_group_name [String] Name of the Resource group within the
424
+ # Azure subscription.
425
+ # @param namespace_name [String] The namespace name
426
+ # @param [Hash{String => String}] A hash of custom headers that will be added
427
+ # to the HTTP request.
428
+ #
429
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
430
+ #
431
+ def get_async(resource_group_name, namespace_name, custom_headers = nil)
432
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
433
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
434
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
435
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
436
+
437
+
438
+ request_headers = {}
439
+
440
+ # Set Headers
441
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
442
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
443
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'
444
+
445
+ request_url = @base_url || @client.base_url
446
+
447
+ options = {
448
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
449
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
450
+ query_params: {'api-version' => @client.api_version},
451
+ headers: request_headers.merge(custom_headers || {}),
452
+ base_url: request_url
453
+ }
454
+ promise = @client.make_request_async(:get, path_template, options)
455
+
456
+ promise = promise.then do |result|
457
+ http_response = result.response
458
+ status_code = http_response.status
459
+ response_content = http_response.body
460
+ unless status_code == 200
461
+ error_model = JSON.load(response_content)
462
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
463
+ end
464
+
465
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
466
+ # Deserialize Response
467
+ if status_code == 200
468
+ begin
469
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
470
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceResource.mapper()
471
+ result.body = @client.deserialize(result_mapper, parsed_response)
472
+ rescue Exception => e
473
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
474
+ end
475
+ end
476
+
477
+ result
478
+ end
479
+
480
+ promise.execute
481
+ end
482
+
483
+ #
484
+ # Updates a service namespace. Once created, this namespace's resource manifest
485
+ # is immutable. This operation is idempotent.
486
+ #
487
+ # @param resource_group_name [String] Name of the Resource group within the
488
+ # Azure subscription.
489
+ # @param namespace_name [String] The namespace name
490
+ # @param parameters [NamespaceUpdateParameters] Parameters supplied to update a
491
+ # namespace resource.
492
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
493
+ # will be added to the HTTP request.
494
+ #
495
+ # @return [NamespaceResource] operation results.
496
+ #
497
+ def update(resource_group_name, namespace_name, parameters, custom_headers = nil)
498
+ response = update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
499
+ response.body unless response.nil?
500
+ end
501
+
502
+ #
503
+ # Updates a service namespace. Once created, this namespace's resource manifest
504
+ # is immutable. This operation is idempotent.
505
+ #
506
+ # @param resource_group_name [String] Name of the Resource group within the
507
+ # Azure subscription.
508
+ # @param namespace_name [String] The namespace name
509
+ # @param parameters [NamespaceUpdateParameters] Parameters supplied to update a
510
+ # namespace resource.
511
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
512
+ # will be added to the HTTP request.
513
+ #
514
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
515
+ #
516
+ def update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers = nil)
517
+ update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
518
+ end
519
+
520
+ #
521
+ # Updates a service namespace. Once created, this namespace's resource manifest
522
+ # is immutable. This operation is idempotent.
523
+ #
524
+ # @param resource_group_name [String] Name of the Resource group within the
525
+ # Azure subscription.
526
+ # @param namespace_name [String] The namespace name
527
+ # @param parameters [NamespaceUpdateParameters] Parameters supplied to update a
528
+ # namespace resource.
529
+ # @param [Hash{String => String}] A hash of custom headers that will be added
530
+ # to the HTTP request.
531
+ #
532
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
533
+ #
534
+ def update_async(resource_group_name, namespace_name, parameters, custom_headers = nil)
535
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
536
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
537
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
538
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
539
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
540
+
541
+
542
+ request_headers = {}
543
+
544
+ # Set Headers
545
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
546
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
547
+
548
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
549
+
550
+ # Serialize Request
551
+ request_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceUpdateParameters.mapper()
552
+ request_content = @client.serialize(request_mapper, parameters)
553
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
554
+
555
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'
556
+
557
+ request_url = @base_url || @client.base_url
558
+
559
+ options = {
560
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
561
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
562
+ query_params: {'api-version' => @client.api_version},
563
+ body: request_content,
564
+ headers: request_headers.merge(custom_headers || {}),
565
+ base_url: request_url
566
+ }
567
+ promise = @client.make_request_async(:patch, path_template, options)
568
+
569
+ promise = promise.then do |result|
570
+ http_response = result.response
571
+ status_code = http_response.status
572
+ response_content = http_response.body
573
+ unless status_code == 201 || status_code == 200 || status_code == 202
574
+ error_model = JSON.load(response_content)
575
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
576
+ end
577
+
578
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
579
+ # Deserialize Response
580
+ if status_code == 201
581
+ begin
582
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
583
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceResource.mapper()
584
+ result.body = @client.deserialize(result_mapper, parsed_response)
585
+ rescue Exception => e
586
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
587
+ end
588
+ end
589
+ # Deserialize Response
590
+ if status_code == 200
591
+ begin
592
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
593
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceResource.mapper()
594
+ result.body = @client.deserialize(result_mapper, parsed_response)
595
+ rescue Exception => e
596
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
597
+ end
598
+ end
599
+
600
+ result
601
+ end
602
+
603
+ promise.execute
604
+ end
605
+
606
+ #
607
+ # Gets the authorization rules for a namespace.
608
+ #
609
+ # @param resource_group_name [String] Name of the Resource group within the
610
+ # Azure subscription.
611
+ # @param namespace_name [String] The namespace name
612
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
613
+ # will be added to the HTTP request.
614
+ #
615
+ # @return [Array<SharedAccessAuthorizationRuleResource>] operation results.
616
+ #
617
+ def list_authorization_rules(resource_group_name, namespace_name, custom_headers = nil)
618
+ first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers)
619
+ first_page.get_all_items
620
+ end
621
+
622
+ #
623
+ # Gets the authorization rules for a namespace.
624
+ #
625
+ # @param resource_group_name [String] Name of the Resource group within the
626
+ # Azure subscription.
627
+ # @param namespace_name [String] The namespace name
628
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
629
+ # will be added to the HTTP request.
630
+ #
631
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
632
+ #
633
+ def list_authorization_rules_with_http_info(resource_group_name, namespace_name, custom_headers = nil)
634
+ list_authorization_rules_async(resource_group_name, namespace_name, custom_headers).value!
635
+ end
636
+
637
+ #
638
+ # Gets the authorization rules for a namespace.
639
+ #
640
+ # @param resource_group_name [String] Name of the Resource group within the
641
+ # Azure subscription.
642
+ # @param namespace_name [String] The namespace name
643
+ # @param [Hash{String => String}] A hash of custom headers that will be added
644
+ # to the HTTP request.
645
+ #
646
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
647
+ #
648
+ def list_authorization_rules_async(resource_group_name, namespace_name, custom_headers = nil)
649
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
650
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
651
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
652
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
653
+
654
+
655
+ request_headers = {}
656
+
657
+ # Set Headers
658
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
659
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
660
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules'
661
+
662
+ request_url = @base_url || @client.base_url
663
+
664
+ options = {
665
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
666
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
667
+ query_params: {'api-version' => @client.api_version},
668
+ headers: request_headers.merge(custom_headers || {}),
669
+ base_url: request_url
670
+ }
671
+ promise = @client.make_request_async(:get, path_template, options)
672
+
673
+ promise = promise.then do |result|
674
+ http_response = result.response
675
+ status_code = http_response.status
676
+ response_content = http_response.body
677
+ unless status_code == 200
678
+ error_model = JSON.load(response_content)
679
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
680
+ end
681
+
682
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
683
+ # Deserialize Response
684
+ if status_code == 200
685
+ begin
686
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
687
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::SharedAccessAuthorizationRuleListResult.mapper()
688
+ result.body = @client.deserialize(result_mapper, parsed_response)
689
+ rescue Exception => e
690
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
691
+ end
692
+ end
693
+
694
+ result
695
+ end
696
+
697
+ promise.execute
698
+ end
699
+
700
+ #
701
+ # Creates or updates an authorization rule for a namespace.
702
+ #
703
+ # @param resource_group_name [String] Name of the Resource group within the
704
+ # Azure subscription.
705
+ # @param namespace_name [String] The namespace name
706
+ # @param authorization_rule_name [String] The authorizationrule name.
707
+ # @param parameters [SharedAccessAuthorizationRuleCreateOrUpdateParameters] The
708
+ # shared access authorization rule.
709
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
710
+ # will be added to the HTTP request.
711
+ #
712
+ # @return [SharedAccessAuthorizationRuleResource] operation results.
713
+ #
714
+ def create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
715
+ response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value!
716
+ response.body unless response.nil?
717
+ end
718
+
719
+ #
720
+ # Creates or updates an authorization rule for a namespace.
721
+ #
722
+ # @param resource_group_name [String] Name of the Resource group within the
723
+ # Azure subscription.
724
+ # @param namespace_name [String] The namespace name
725
+ # @param authorization_rule_name [String] The authorizationrule name.
726
+ # @param parameters [SharedAccessAuthorizationRuleCreateOrUpdateParameters] The
727
+ # shared access authorization rule.
728
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
729
+ # will be added to the HTTP request.
730
+ #
731
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
732
+ #
733
+ def create_or_update_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
734
+ create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value!
735
+ end
736
+
737
+ #
738
+ # Creates or updates an authorization rule for a namespace.
739
+ #
740
+ # @param resource_group_name [String] Name of the Resource group within the
741
+ # Azure subscription.
742
+ # @param namespace_name [String] The namespace name
743
+ # @param authorization_rule_name [String] The authorizationrule name.
744
+ # @param parameters [SharedAccessAuthorizationRuleCreateOrUpdateParameters] The
745
+ # shared access authorization rule.
746
+ # @param [Hash{String => String}] A hash of custom headers that will be added
747
+ # to the HTTP request.
748
+ #
749
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
750
+ #
751
+ def create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
752
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
753
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
754
+ fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
755
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
756
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
757
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
758
+
759
+
760
+ request_headers = {}
761
+
762
+ # Set Headers
763
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
764
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
765
+
766
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
767
+
768
+ # Serialize Request
769
+ request_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::SharedAccessAuthorizationRuleCreateOrUpdateParameters.mapper()
770
+ request_content = @client.serialize(request_mapper, parameters)
771
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
772
+
773
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'
774
+
775
+ request_url = @base_url || @client.base_url
776
+
777
+ options = {
778
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
779
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
780
+ query_params: {'api-version' => @client.api_version},
781
+ body: request_content,
782
+ headers: request_headers.merge(custom_headers || {}),
783
+ base_url: request_url
784
+ }
785
+ promise = @client.make_request_async(:put, path_template, options)
786
+
787
+ promise = promise.then do |result|
788
+ http_response = result.response
789
+ status_code = http_response.status
790
+ response_content = http_response.body
791
+ unless status_code == 200
792
+ error_model = JSON.load(response_content)
793
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
794
+ end
795
+
796
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
797
+ # Deserialize Response
798
+ if status_code == 200
799
+ begin
800
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
801
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::SharedAccessAuthorizationRuleResource.mapper()
802
+ result.body = @client.deserialize(result_mapper, parsed_response)
803
+ rescue Exception => e
804
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
805
+ end
806
+ end
807
+
808
+ result
809
+ end
810
+
811
+ promise.execute
812
+ end
813
+
814
+ #
815
+ # Deletes a namespace authorization rule.
816
+ #
817
+ # @param resource_group_name [String] Name of the Resource group within the
818
+ # Azure subscription.
819
+ # @param namespace_name [String] The namespace name
820
+ # @param authorization_rule_name [String] The authorizationrule name.
821
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
822
+ # will be added to the HTTP request.
823
+ #
824
+ #
825
+ def delete_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
826
+ response = delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
827
+ nil
828
+ end
829
+
830
+ #
831
+ # Deletes a namespace authorization rule.
832
+ #
833
+ # @param resource_group_name [String] Name of the Resource group within the
834
+ # Azure subscription.
835
+ # @param namespace_name [String] The namespace name
836
+ # @param authorization_rule_name [String] The authorizationrule name.
837
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
838
+ # will be added to the HTTP request.
839
+ #
840
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
841
+ #
842
+ def delete_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
843
+ delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
844
+ end
845
+
846
+ #
847
+ # Deletes a namespace authorization rule.
848
+ #
849
+ # @param resource_group_name [String] Name of the Resource group within the
850
+ # Azure subscription.
851
+ # @param namespace_name [String] The namespace name
852
+ # @param authorization_rule_name [String] The authorizationrule name.
853
+ # @param [Hash{String => String}] A hash of custom headers that will be added
854
+ # to the HTTP request.
855
+ #
856
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
857
+ #
858
+ def delete_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
859
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
860
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
861
+ fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
862
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
863
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
864
+
865
+
866
+ request_headers = {}
867
+
868
+ # Set Headers
869
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
870
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
871
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'
872
+
873
+ request_url = @base_url || @client.base_url
874
+
875
+ options = {
876
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
877
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
878
+ query_params: {'api-version' => @client.api_version},
879
+ headers: request_headers.merge(custom_headers || {}),
880
+ base_url: request_url
881
+ }
882
+ promise = @client.make_request_async(:delete, path_template, options)
883
+
884
+ promise = promise.then do |result|
885
+ http_response = result.response
886
+ status_code = http_response.status
887
+ response_content = http_response.body
888
+ unless status_code == 204 || status_code == 200
889
+ error_model = JSON.load(response_content)
890
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
891
+ end
892
+
893
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
894
+
895
+ result
896
+ end
897
+
898
+ promise.execute
899
+ end
900
+
901
+ #
902
+ # Gets an authorization rule for a namespace by rule name.
903
+ #
904
+ # @param resource_group_name [String] Name of the Resource group within the
905
+ # Azure subscription.
906
+ # @param namespace_name [String] The namespace name
907
+ # @param authorization_rule_name [String] The authorizationrule name.
908
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
909
+ # will be added to the HTTP request.
910
+ #
911
+ # @return [SharedAccessAuthorizationRuleResource] operation results.
912
+ #
913
+ def get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
914
+ response = get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
915
+ response.body unless response.nil?
916
+ end
917
+
918
+ #
919
+ # Gets an authorization rule for a namespace by rule name.
920
+ #
921
+ # @param resource_group_name [String] Name of the Resource group within the
922
+ # Azure subscription.
923
+ # @param namespace_name [String] The namespace name
924
+ # @param authorization_rule_name [String] The authorizationrule name.
925
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
926
+ # will be added to the HTTP request.
927
+ #
928
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
929
+ #
930
+ def get_authorization_rule_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
931
+ get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
932
+ end
933
+
934
+ #
935
+ # Gets an authorization rule for a namespace by rule name.
936
+ #
937
+ # @param resource_group_name [String] Name of the Resource group within the
938
+ # Azure subscription.
939
+ # @param namespace_name [String] The namespace name
940
+ # @param authorization_rule_name [String] The authorizationrule name.
941
+ # @param [Hash{String => String}] A hash of custom headers that will be added
942
+ # to the HTTP request.
943
+ #
944
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
945
+ #
946
+ def get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
947
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
948
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
949
+ fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
950
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
951
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
952
+
953
+
954
+ request_headers = {}
955
+
956
+ # Set Headers
957
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
958
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
959
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'
960
+
961
+ request_url = @base_url || @client.base_url
962
+
963
+ options = {
964
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
965
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
966
+ query_params: {'api-version' => @client.api_version},
967
+ headers: request_headers.merge(custom_headers || {}),
968
+ base_url: request_url
969
+ }
970
+ promise = @client.make_request_async(:get, path_template, options)
971
+
972
+ promise = promise.then do |result|
973
+ http_response = result.response
974
+ status_code = http_response.status
975
+ response_content = http_response.body
976
+ unless status_code == 200
977
+ error_model = JSON.load(response_content)
978
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
979
+ end
980
+
981
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
982
+ # Deserialize Response
983
+ if status_code == 200
984
+ begin
985
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
986
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::SharedAccessAuthorizationRuleResource.mapper()
987
+ result.body = @client.deserialize(result_mapper, parsed_response)
988
+ rescue Exception => e
989
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
990
+ end
991
+ end
992
+
993
+ result
994
+ end
995
+
996
+ promise.execute
997
+ end
998
+
999
+ #
1000
+ # Gets the primary and secondary connection strings for the namespace.
1001
+ #
1002
+ # @param resource_group_name [String] Name of the Resource group within the
1003
+ # Azure subscription.
1004
+ # @param namespace_name [String] The namespace name
1005
+ # @param authorization_rule_name [String] The authorizationrule name.
1006
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1007
+ # will be added to the HTTP request.
1008
+ #
1009
+ # @return [ResourceListKeys] operation results.
1010
+ #
1011
+ def list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
1012
+ response = list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
1013
+ response.body unless response.nil?
1014
+ end
1015
+
1016
+ #
1017
+ # Gets the primary and secondary connection strings for the namespace.
1018
+ #
1019
+ # @param resource_group_name [String] Name of the Resource group within the
1020
+ # Azure subscription.
1021
+ # @param namespace_name [String] The namespace name
1022
+ # @param authorization_rule_name [String] The authorizationrule name.
1023
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1024
+ # will be added to the HTTP request.
1025
+ #
1026
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1027
+ #
1028
+ def list_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
1029
+ list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
1030
+ end
1031
+
1032
+ #
1033
+ # Gets the primary and secondary connection strings for the namespace.
1034
+ #
1035
+ # @param resource_group_name [String] Name of the Resource group within the
1036
+ # Azure subscription.
1037
+ # @param namespace_name [String] The namespace name
1038
+ # @param authorization_rule_name [String] The authorizationrule name.
1039
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1040
+ # to the HTTP request.
1041
+ #
1042
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1043
+ #
1044
+ def list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
1045
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1046
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1047
+ fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
1048
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1049
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1050
+
1051
+
1052
+ request_headers = {}
1053
+
1054
+ # Set Headers
1055
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1056
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1057
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys'
1058
+
1059
+ request_url = @base_url || @client.base_url
1060
+
1061
+ options = {
1062
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1063
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
1064
+ query_params: {'api-version' => @client.api_version},
1065
+ headers: request_headers.merge(custom_headers || {}),
1066
+ base_url: request_url
1067
+ }
1068
+ promise = @client.make_request_async(:post, path_template, options)
1069
+
1070
+ promise = promise.then do |result|
1071
+ http_response = result.response
1072
+ status_code = http_response.status
1073
+ response_content = http_response.body
1074
+ unless status_code == 200
1075
+ error_model = JSON.load(response_content)
1076
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1077
+ end
1078
+
1079
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1080
+ # Deserialize Response
1081
+ if status_code == 200
1082
+ begin
1083
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1084
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::ResourceListKeys.mapper()
1085
+ result.body = @client.deserialize(result_mapper, parsed_response)
1086
+ rescue Exception => e
1087
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1088
+ end
1089
+ end
1090
+
1091
+ result
1092
+ end
1093
+
1094
+ promise.execute
1095
+ end
1096
+
1097
+ #
1098
+ # Regenerates the primary or secondary connection strings for the namespace.
1099
+ #
1100
+ # @param resource_group_name [String] Name of the Resource group within the
1101
+ # Azure subscription.
1102
+ # @param namespace_name [String] The namespace name
1103
+ # @param authorization_rule_name [String] The authorizationrule name.
1104
+ # @param parameters [RegenerateKeysParameters] Parameters supplied to
1105
+ # regenerate the authorization rule.
1106
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1107
+ # will be added to the HTTP request.
1108
+ #
1109
+ # @return [ResourceListKeys] operation results.
1110
+ #
1111
+ def regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
1112
+ response = regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value!
1113
+ response.body unless response.nil?
1114
+ end
1115
+
1116
+ #
1117
+ # Regenerates the primary or secondary connection strings for the namespace.
1118
+ #
1119
+ # @param resource_group_name [String] Name of the Resource group within the
1120
+ # Azure subscription.
1121
+ # @param namespace_name [String] The namespace name
1122
+ # @param authorization_rule_name [String] The authorizationrule name.
1123
+ # @param parameters [RegenerateKeysParameters] Parameters supplied to
1124
+ # regenerate the authorization rule.
1125
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1126
+ # will be added to the HTTP request.
1127
+ #
1128
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1129
+ #
1130
+ def regenerate_keys_with_http_info(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
1131
+ regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value!
1132
+ end
1133
+
1134
+ #
1135
+ # Regenerates the primary or secondary connection strings for the namespace.
1136
+ #
1137
+ # @param resource_group_name [String] Name of the Resource group within the
1138
+ # Azure subscription.
1139
+ # @param namespace_name [String] The namespace name
1140
+ # @param authorization_rule_name [String] The authorizationrule name.
1141
+ # @param parameters [RegenerateKeysParameters] Parameters supplied to
1142
+ # regenerate the authorization rule.
1143
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1144
+ # to the HTTP request.
1145
+ #
1146
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1147
+ #
1148
+ def regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
1149
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1150
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1151
+ fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
1152
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1153
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1154
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1155
+
1156
+
1157
+ request_headers = {}
1158
+
1159
+ # Set Headers
1160
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1161
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1162
+
1163
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1164
+
1165
+ # Serialize Request
1166
+ request_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::RegenerateKeysParameters.mapper()
1167
+ request_content = @client.serialize(request_mapper, parameters)
1168
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1169
+
1170
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys'
1171
+
1172
+ request_url = @base_url || @client.base_url
1173
+
1174
+ options = {
1175
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1176
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
1177
+ query_params: {'api-version' => @client.api_version},
1178
+ body: request_content,
1179
+ headers: request_headers.merge(custom_headers || {}),
1180
+ base_url: request_url
1181
+ }
1182
+ promise = @client.make_request_async(:post, path_template, options)
1183
+
1184
+ promise = promise.then do |result|
1185
+ http_response = result.response
1186
+ status_code = http_response.status
1187
+ response_content = http_response.body
1188
+ unless status_code == 200
1189
+ error_model = JSON.load(response_content)
1190
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1191
+ end
1192
+
1193
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1194
+ # Deserialize Response
1195
+ if status_code == 200
1196
+ begin
1197
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1198
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::ResourceListKeys.mapper()
1199
+ result.body = @client.deserialize(result_mapper, parsed_response)
1200
+ rescue Exception => e
1201
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1202
+ end
1203
+ end
1204
+
1205
+ result
1206
+ end
1207
+
1208
+ promise.execute
1209
+ end
1210
+
1211
+ #
1212
+ # Creates or updates a service namespace. Once created, this namespace's
1213
+ # resource manifest is immutable. This operation is idempotent.
1214
+ #
1215
+ # @param resource_group_name [String] Name of the Resource group within the
1216
+ # Azure subscription.
1217
+ # @param namespace_name [String] The namespace name.
1218
+ # @param parameters [NamespaceCreateOrUpdateParameters] Parameters supplied to
1219
+ # create a namespace resource.
1220
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1221
+ # will be added to the HTTP request.
1222
+ #
1223
+ # @return [NamespaceResource] operation results.
1224
+ #
1225
+ def begin_create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil)
1226
+ response = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
1227
+ response.body unless response.nil?
1228
+ end
1229
+
1230
+ #
1231
+ # Creates or updates a service namespace. Once created, this namespace's
1232
+ # resource manifest is immutable. This operation is idempotent.
1233
+ #
1234
+ # @param resource_group_name [String] Name of the Resource group within the
1235
+ # Azure subscription.
1236
+ # @param namespace_name [String] The namespace name.
1237
+ # @param parameters [NamespaceCreateOrUpdateParameters] Parameters supplied to
1238
+ # create a namespace resource.
1239
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1240
+ # will be added to the HTTP request.
1241
+ #
1242
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1243
+ #
1244
+ def begin_create_or_update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers = nil)
1245
+ begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
1246
+ end
1247
+
1248
+ #
1249
+ # Creates or updates a service namespace. Once created, this namespace's
1250
+ # resource manifest is immutable. This operation is idempotent.
1251
+ #
1252
+ # @param resource_group_name [String] Name of the Resource group within the
1253
+ # Azure subscription.
1254
+ # @param namespace_name [String] The namespace name.
1255
+ # @param parameters [NamespaceCreateOrUpdateParameters] Parameters supplied to
1256
+ # create a namespace resource.
1257
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1258
+ # to the HTTP request.
1259
+ #
1260
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1261
+ #
1262
+ def begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers = nil)
1263
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1264
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1265
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1266
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1267
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1268
+
1269
+
1270
+ request_headers = {}
1271
+
1272
+ # Set Headers
1273
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1274
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1275
+
1276
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1277
+
1278
+ # Serialize Request
1279
+ request_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceCreateOrUpdateParameters.mapper()
1280
+ request_content = @client.serialize(request_mapper, parameters)
1281
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1282
+
1283
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'
1284
+
1285
+ request_url = @base_url || @client.base_url
1286
+
1287
+ options = {
1288
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1289
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
1290
+ query_params: {'api-version' => @client.api_version},
1291
+ body: request_content,
1292
+ headers: request_headers.merge(custom_headers || {}),
1293
+ base_url: request_url
1294
+ }
1295
+ promise = @client.make_request_async(:put, path_template, options)
1296
+
1297
+ promise = promise.then do |result|
1298
+ http_response = result.response
1299
+ status_code = http_response.status
1300
+ response_content = http_response.body
1301
+ unless status_code == 201 || status_code == 200 || status_code == 202
1302
+ error_model = JSON.load(response_content)
1303
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1304
+ end
1305
+
1306
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1307
+ # Deserialize Response
1308
+ if status_code == 201
1309
+ begin
1310
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1311
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceResource.mapper()
1312
+ result.body = @client.deserialize(result_mapper, parsed_response)
1313
+ rescue Exception => e
1314
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1315
+ end
1316
+ end
1317
+ # Deserialize Response
1318
+ if status_code == 200
1319
+ begin
1320
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1321
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceResource.mapper()
1322
+ result.body = @client.deserialize(result_mapper, parsed_response)
1323
+ rescue Exception => e
1324
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1325
+ end
1326
+ end
1327
+
1328
+ result
1329
+ end
1330
+
1331
+ promise.execute
1332
+ end
1333
+
1334
+ #
1335
+ # Deletes an existing namespace. This operation also removes all associated
1336
+ # resources under the namespace.
1337
+ #
1338
+ # @param resource_group_name [String] Name of the Resource group within the
1339
+ # Azure subscription.
1340
+ # @param namespace_name [String] The namespace name
1341
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1342
+ # will be added to the HTTP request.
1343
+ #
1344
+ #
1345
+ def begin_delete(resource_group_name, namespace_name, custom_headers = nil)
1346
+ response = begin_delete_async(resource_group_name, namespace_name, custom_headers).value!
1347
+ nil
1348
+ end
1349
+
1350
+ #
1351
+ # Deletes an existing namespace. This operation also removes all associated
1352
+ # resources under the namespace.
1353
+ #
1354
+ # @param resource_group_name [String] Name of the Resource group within the
1355
+ # Azure subscription.
1356
+ # @param namespace_name [String] The namespace name
1357
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1358
+ # will be added to the HTTP request.
1359
+ #
1360
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1361
+ #
1362
+ def begin_delete_with_http_info(resource_group_name, namespace_name, custom_headers = nil)
1363
+ begin_delete_async(resource_group_name, namespace_name, custom_headers).value!
1364
+ end
1365
+
1366
+ #
1367
+ # Deletes an existing namespace. This operation also removes all associated
1368
+ # resources under the namespace.
1369
+ #
1370
+ # @param resource_group_name [String] Name of the Resource group within the
1371
+ # Azure subscription.
1372
+ # @param namespace_name [String] The namespace name
1373
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1374
+ # to the HTTP request.
1375
+ #
1376
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1377
+ #
1378
+ def begin_delete_async(resource_group_name, namespace_name, custom_headers = nil)
1379
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1380
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1381
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1382
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1383
+
1384
+
1385
+ request_headers = {}
1386
+
1387
+ # Set Headers
1388
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1389
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1390
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}'
1391
+
1392
+ request_url = @base_url || @client.base_url
1393
+
1394
+ options = {
1395
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1396
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
1397
+ query_params: {'api-version' => @client.api_version},
1398
+ headers: request_headers.merge(custom_headers || {}),
1399
+ base_url: request_url
1400
+ }
1401
+ promise = @client.make_request_async(:delete, path_template, options)
1402
+
1403
+ promise = promise.then do |result|
1404
+ http_response = result.response
1405
+ status_code = http_response.status
1406
+ response_content = http_response.body
1407
+ unless status_code == 204 || status_code == 200 || status_code == 202
1408
+ error_model = JSON.load(response_content)
1409
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1410
+ end
1411
+
1412
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1413
+
1414
+ result
1415
+ end
1416
+
1417
+ promise.execute
1418
+ end
1419
+
1420
+ #
1421
+ # Gets all the available namespaces within the subscription, irrespective of
1422
+ # the resource groups.
1423
+ #
1424
+ # @param next_page_link [String] The NextLink from the previous successful call
1425
+ # to List operation.
1426
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1427
+ # will be added to the HTTP request.
1428
+ #
1429
+ # @return [NamespaceListResult] operation results.
1430
+ #
1431
+ def list_by_subscription_next(next_page_link, custom_headers = nil)
1432
+ response = list_by_subscription_next_async(next_page_link, custom_headers).value!
1433
+ response.body unless response.nil?
1434
+ end
1435
+
1436
+ #
1437
+ # Gets all the available namespaces within the subscription, irrespective of
1438
+ # the resource groups.
1439
+ #
1440
+ # @param next_page_link [String] The NextLink from the previous successful call
1441
+ # to List operation.
1442
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1443
+ # will be added to the HTTP request.
1444
+ #
1445
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1446
+ #
1447
+ def list_by_subscription_next_with_http_info(next_page_link, custom_headers = nil)
1448
+ list_by_subscription_next_async(next_page_link, custom_headers).value!
1449
+ end
1450
+
1451
+ #
1452
+ # Gets all the available namespaces within the subscription, irrespective of
1453
+ # the resource groups.
1454
+ #
1455
+ # @param next_page_link [String] The NextLink from the previous successful call
1456
+ # to List operation.
1457
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1458
+ # to the HTTP request.
1459
+ #
1460
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1461
+ #
1462
+ def list_by_subscription_next_async(next_page_link, custom_headers = nil)
1463
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1464
+
1465
+
1466
+ request_headers = {}
1467
+
1468
+ # Set Headers
1469
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1470
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1471
+ path_template = '{nextLink}'
1472
+
1473
+ request_url = @base_url || @client.base_url
1474
+
1475
+ options = {
1476
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1477
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1478
+ headers: request_headers.merge(custom_headers || {}),
1479
+ base_url: request_url
1480
+ }
1481
+ promise = @client.make_request_async(:get, path_template, options)
1482
+
1483
+ promise = promise.then do |result|
1484
+ http_response = result.response
1485
+ status_code = http_response.status
1486
+ response_content = http_response.body
1487
+ unless status_code == 200
1488
+ error_model = JSON.load(response_content)
1489
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1490
+ end
1491
+
1492
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1493
+ # Deserialize Response
1494
+ if status_code == 200
1495
+ begin
1496
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1497
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceListResult.mapper()
1498
+ result.body = @client.deserialize(result_mapper, parsed_response)
1499
+ rescue Exception => e
1500
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1501
+ end
1502
+ end
1503
+
1504
+ result
1505
+ end
1506
+
1507
+ promise.execute
1508
+ end
1509
+
1510
+ #
1511
+ # Gets the available namespaces within a resource group.
1512
+ #
1513
+ # @param next_page_link [String] The NextLink from the previous successful call
1514
+ # to List operation.
1515
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1516
+ # will be added to the HTTP request.
1517
+ #
1518
+ # @return [NamespaceListResult] operation results.
1519
+ #
1520
+ def list_by_resource_group_next(next_page_link, custom_headers = nil)
1521
+ response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
1522
+ response.body unless response.nil?
1523
+ end
1524
+
1525
+ #
1526
+ # Gets the available namespaces within a resource group.
1527
+ #
1528
+ # @param next_page_link [String] The NextLink from the previous successful call
1529
+ # to List operation.
1530
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1531
+ # will be added to the HTTP request.
1532
+ #
1533
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1534
+ #
1535
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil)
1536
+ list_by_resource_group_next_async(next_page_link, custom_headers).value!
1537
+ end
1538
+
1539
+ #
1540
+ # Gets the available namespaces within a resource group.
1541
+ #
1542
+ # @param next_page_link [String] The NextLink from the previous successful call
1543
+ # to List operation.
1544
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1545
+ # to the HTTP request.
1546
+ #
1547
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1548
+ #
1549
+ def list_by_resource_group_next_async(next_page_link, custom_headers = nil)
1550
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1551
+
1552
+
1553
+ request_headers = {}
1554
+
1555
+ # Set Headers
1556
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1557
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1558
+ path_template = '{nextLink}'
1559
+
1560
+ request_url = @base_url || @client.base_url
1561
+
1562
+ options = {
1563
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1564
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1565
+ headers: request_headers.merge(custom_headers || {}),
1566
+ base_url: request_url
1567
+ }
1568
+ promise = @client.make_request_async(:get, path_template, options)
1569
+
1570
+ promise = promise.then do |result|
1571
+ http_response = result.response
1572
+ status_code = http_response.status
1573
+ response_content = http_response.body
1574
+ unless status_code == 200
1575
+ error_model = JSON.load(response_content)
1576
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1577
+ end
1578
+
1579
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1580
+ # Deserialize Response
1581
+ if status_code == 200
1582
+ begin
1583
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1584
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::NamespaceListResult.mapper()
1585
+ result.body = @client.deserialize(result_mapper, parsed_response)
1586
+ rescue Exception => e
1587
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1588
+ end
1589
+ end
1590
+
1591
+ result
1592
+ end
1593
+
1594
+ promise.execute
1595
+ end
1596
+
1597
+ #
1598
+ # Gets the authorization rules for a namespace.
1599
+ #
1600
+ # @param next_page_link [String] The NextLink from the previous successful call
1601
+ # to List operation.
1602
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1603
+ # will be added to the HTTP request.
1604
+ #
1605
+ # @return [SharedAccessAuthorizationRuleListResult] operation results.
1606
+ #
1607
+ def list_authorization_rules_next(next_page_link, custom_headers = nil)
1608
+ response = list_authorization_rules_next_async(next_page_link, custom_headers).value!
1609
+ response.body unless response.nil?
1610
+ end
1611
+
1612
+ #
1613
+ # Gets the authorization rules for a namespace.
1614
+ #
1615
+ # @param next_page_link [String] The NextLink from the previous successful call
1616
+ # to List operation.
1617
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1618
+ # will be added to the HTTP request.
1619
+ #
1620
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1621
+ #
1622
+ def list_authorization_rules_next_with_http_info(next_page_link, custom_headers = nil)
1623
+ list_authorization_rules_next_async(next_page_link, custom_headers).value!
1624
+ end
1625
+
1626
+ #
1627
+ # Gets the authorization rules for a namespace.
1628
+ #
1629
+ # @param next_page_link [String] The NextLink from the previous successful call
1630
+ # to List operation.
1631
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1632
+ # to the HTTP request.
1633
+ #
1634
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1635
+ #
1636
+ def list_authorization_rules_next_async(next_page_link, custom_headers = nil)
1637
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1638
+
1639
+
1640
+ request_headers = {}
1641
+
1642
+ # Set Headers
1643
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1644
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1645
+ path_template = '{nextLink}'
1646
+
1647
+ request_url = @base_url || @client.base_url
1648
+
1649
+ options = {
1650
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1651
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1652
+ headers: request_headers.merge(custom_headers || {}),
1653
+ base_url: request_url
1654
+ }
1655
+ promise = @client.make_request_async(:get, path_template, options)
1656
+
1657
+ promise = promise.then do |result|
1658
+ http_response = result.response
1659
+ status_code = http_response.status
1660
+ response_content = http_response.body
1661
+ unless status_code == 200
1662
+ error_model = JSON.load(response_content)
1663
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1664
+ end
1665
+
1666
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1667
+ # Deserialize Response
1668
+ if status_code == 200
1669
+ begin
1670
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1671
+ result_mapper = Azure::ServiceBus::Mgmt::V2015_08_01::Models::SharedAccessAuthorizationRuleListResult.mapper()
1672
+ result.body = @client.deserialize(result_mapper, parsed_response)
1673
+ rescue Exception => e
1674
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1675
+ end
1676
+ end
1677
+
1678
+ result
1679
+ end
1680
+
1681
+ promise.execute
1682
+ end
1683
+
1684
+ #
1685
+ # Gets all the available namespaces within the subscription, irrespective of
1686
+ # the resource groups.
1687
+ #
1688
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1689
+ # will be added to the HTTP request.
1690
+ #
1691
+ # @return [NamespaceListResult] which provide lazy access to pages of the
1692
+ # response.
1693
+ #
1694
+ def list_by_subscription_as_lazy(custom_headers = nil)
1695
+ response = list_by_subscription_async(custom_headers).value!
1696
+ unless response.nil?
1697
+ page = response.body
1698
+ page.next_method = Proc.new do |next_page_link|
1699
+ list_by_subscription_next_async(next_page_link, custom_headers)
1700
+ end
1701
+ page
1702
+ end
1703
+ end
1704
+
1705
+ #
1706
+ # Gets the available namespaces within a resource group.
1707
+ #
1708
+ # @param resource_group_name [String] Name of the Resource group within the
1709
+ # Azure subscription.
1710
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1711
+ # will be added to the HTTP request.
1712
+ #
1713
+ # @return [NamespaceListResult] which provide lazy access to pages of the
1714
+ # response.
1715
+ #
1716
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil)
1717
+ response = list_by_resource_group_async(resource_group_name, custom_headers).value!
1718
+ unless response.nil?
1719
+ page = response.body
1720
+ page.next_method = Proc.new do |next_page_link|
1721
+ list_by_resource_group_next_async(next_page_link, custom_headers)
1722
+ end
1723
+ page
1724
+ end
1725
+ end
1726
+
1727
+ #
1728
+ # Gets the authorization rules for a namespace.
1729
+ #
1730
+ # @param resource_group_name [String] Name of the Resource group within the
1731
+ # Azure subscription.
1732
+ # @param namespace_name [String] The namespace name
1733
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1734
+ # will be added to the HTTP request.
1735
+ #
1736
+ # @return [SharedAccessAuthorizationRuleListResult] which provide lazy access
1737
+ # to pages of the response.
1738
+ #
1739
+ def list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers = nil)
1740
+ response = list_authorization_rules_async(resource_group_name, namespace_name, custom_headers).value!
1741
+ unless response.nil?
1742
+ page = response.body
1743
+ page.next_method = Proc.new do |next_page_link|
1744
+ list_authorization_rules_next_async(next_page_link, custom_headers)
1745
+ end
1746
+ page
1747
+ end
1748
+ end
1749
+
1750
+ end
1751
+ end