azure_mgmt_service_bus 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_service_bus.rb +24 -13
  3. data/lib/generated/azure_mgmt_service_bus/event_hubs.rb +229 -0
  4. data/lib/generated/azure_mgmt_service_bus/models/access_rights.rb +0 -0
  5. data/lib/generated/azure_mgmt_service_bus/models/capture_description.rb +103 -0
  6. data/lib/generated/azure_mgmt_service_bus/models/check_name_availability.rb +0 -0
  7. data/lib/generated/azure_mgmt_service_bus/models/check_name_availability_result.rb +0 -0
  8. data/lib/generated/azure_mgmt_service_bus/models/destination.rb +79 -0
  9. data/lib/generated/azure_mgmt_service_bus/models/encoding_capture_description.rb +16 -0
  10. data/lib/generated/azure_mgmt_service_bus/models/entity_status.rb +0 -0
  11. data/lib/generated/azure_mgmt_service_bus/models/event_hub_list_result.rb +96 -0
  12. data/lib/generated/azure_mgmt_service_bus/models/eventhub.rb +154 -0
  13. data/lib/generated/azure_mgmt_service_bus/models/message_count_details.rb +0 -0
  14. data/lib/generated/azure_mgmt_service_bus/models/operation.rb +0 -0
  15. data/lib/generated/azure_mgmt_service_bus/models/operation_display.rb +0 -0
  16. data/lib/generated/azure_mgmt_service_bus/models/operation_list_result.rb +0 -0
  17. data/lib/generated/azure_mgmt_service_bus/models/premium_messaging_regions.rb +91 -0
  18. data/lib/generated/azure_mgmt_service_bus/models/premium_messaging_regions_list_result.rb +97 -0
  19. data/lib/generated/azure_mgmt_service_bus/models/premium_messaging_regions_properties.rb +58 -0
  20. data/lib/generated/azure_mgmt_service_bus/models/sku_name.rb +0 -0
  21. data/lib/generated/azure_mgmt_service_bus/models/sku_tier.rb +0 -0
  22. data/lib/generated/azure_mgmt_service_bus/models/tracked_resource.rb +1 -1
  23. data/lib/generated/azure_mgmt_service_bus/models/unavailable_reason.rb +0 -0
  24. data/lib/generated/azure_mgmt_service_bus/module_definition.rb +0 -0
  25. data/lib/generated/azure_mgmt_service_bus/namespaces.rb +0 -0
  26. data/lib/generated/azure_mgmt_service_bus/operations.rb +0 -0
  27. data/lib/generated/azure_mgmt_service_bus/premium_messaging_regions_operations.rb +215 -0
  28. data/lib/generated/azure_mgmt_service_bus/queues.rb +0 -0
  29. data/lib/generated/azure_mgmt_service_bus/regions.rb +220 -0
  30. data/lib/generated/azure_mgmt_service_bus/service_bus_management_client.rb +13 -0
  31. data/lib/generated/azure_mgmt_service_bus/subscriptions.rb +0 -0
  32. data/lib/generated/azure_mgmt_service_bus/topics.rb +0 -0
  33. data/lib/generated/azure_mgmt_service_bus/version.rb +1 -1
  34. metadata +15 -4
@@ -0,0 +1,58 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::ServiceBus
7
+ module Models
8
+ #
9
+ # Model object.
10
+ #
11
+ #
12
+ class PremiumMessagingRegionsProperties
13
+
14
+ include MsRestAzure
15
+
16
+ include MsRest::JSONable
17
+ # @return [String] Region code
18
+ attr_accessor :code
19
+
20
+ # @return [String] Full name of the region
21
+ attr_accessor :full_name
22
+
23
+
24
+ #
25
+ # Mapper for PremiumMessagingRegionsProperties class as Ruby Hash.
26
+ # This will be used for serialization/deserialization.
27
+ #
28
+ def self.mapper()
29
+ {
30
+ required: false,
31
+ serialized_name: 'PremiumMessagingRegions_properties',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'PremiumMessagingRegionsProperties',
35
+ model_properties: {
36
+ code: {
37
+ required: false,
38
+ read_only: true,
39
+ serialized_name: 'code',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ full_name: {
45
+ required: false,
46
+ read_only: true,
47
+ serialized_name: 'fullName',
48
+ type: {
49
+ name: 'String'
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ end
56
+ end
57
+ end
58
+ end
@@ -13,7 +13,7 @@ module Azure::ARM::ServiceBus
13
13
  include MsRestAzure
14
14
 
15
15
  include MsRest::JSONable
16
- # @return [String] The Geo-location where the resource live
16
+ # @return [String] The Geo-location where the resource lives
17
17
  attr_accessor :location
18
18
 
19
19
  # @return [Hash{String => String}] Resource tags
@@ -0,0 +1,215 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::ServiceBus
7
+ #
8
+ # Azure Service Bus client
9
+ #
10
+ class PremiumMessagingRegionsOperations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the PremiumMessagingRegionsOperations 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
+ # Gets the available premium messaging regions for servicebus
26
+ #
27
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
28
+ # will be added to the HTTP request.
29
+ #
30
+ # @return [Array<PremiumMessagingRegions>] operation results.
31
+ #
32
+ def list(custom_headers = nil)
33
+ first_page = list_as_lazy(custom_headers)
34
+ first_page.get_all_items
35
+ end
36
+
37
+ #
38
+ # Gets the available premium messaging regions for servicebus
39
+ #
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
44
+ #
45
+ def list_with_http_info(custom_headers = nil)
46
+ list_async(custom_headers).value!
47
+ end
48
+
49
+ #
50
+ # Gets the available premium messaging regions for servicebus
51
+ #
52
+ # @param [Hash{String => String}] A hash of custom headers that will be added
53
+ # to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
56
+ #
57
+ def list_async(custom_headers = nil)
58
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
59
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
60
+
61
+
62
+ request_headers = {}
63
+
64
+ # Set Headers
65
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
66
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
67
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/premiumMessagingRegions'
68
+
69
+ request_url = @base_url || @client.base_url
70
+
71
+ options = {
72
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
73
+ path_params: {'subscriptionId' => @client.subscription_id},
74
+ query_params: {'api-version' => @client.api_version},
75
+ headers: request_headers.merge(custom_headers || {}),
76
+ base_url: request_url
77
+ }
78
+ promise = @client.make_request_async(:get, path_template, options)
79
+
80
+ promise = promise.then do |result|
81
+ http_response = result.response
82
+ status_code = http_response.status
83
+ response_content = http_response.body
84
+ unless status_code == 200
85
+ error_model = JSON.load(response_content)
86
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
87
+ end
88
+
89
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
90
+ # Deserialize Response
91
+ if status_code == 200
92
+ begin
93
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
94
+ result_mapper = Azure::ARM::ServiceBus::Models::PremiumMessagingRegionsListResult.mapper()
95
+ result.body = @client.deserialize(result_mapper, parsed_response)
96
+ rescue Exception => e
97
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
98
+ end
99
+ end
100
+
101
+ result
102
+ end
103
+
104
+ promise.execute
105
+ end
106
+
107
+ #
108
+ # Gets the available premium messaging regions for servicebus
109
+ #
110
+ # @param next_page_link [String] The NextLink from the previous successful call
111
+ # to List operation.
112
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
113
+ # will be added to the HTTP request.
114
+ #
115
+ # @return [PremiumMessagingRegionsListResult] operation results.
116
+ #
117
+ def list_next(next_page_link, custom_headers = nil)
118
+ response = list_next_async(next_page_link, custom_headers).value!
119
+ response.body unless response.nil?
120
+ end
121
+
122
+ #
123
+ # Gets the available premium messaging regions for servicebus
124
+ #
125
+ # @param next_page_link [String] The NextLink from the previous successful call
126
+ # to List operation.
127
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
128
+ # will be added to the HTTP request.
129
+ #
130
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
131
+ #
132
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
133
+ list_next_async(next_page_link, custom_headers).value!
134
+ end
135
+
136
+ #
137
+ # Gets the available premium messaging regions for servicebus
138
+ #
139
+ # @param next_page_link [String] The NextLink from the previous successful call
140
+ # to List operation.
141
+ # @param [Hash{String => String}] A hash of custom headers that will be added
142
+ # to the HTTP request.
143
+ #
144
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
145
+ #
146
+ def list_next_async(next_page_link, custom_headers = nil)
147
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
148
+
149
+
150
+ request_headers = {}
151
+
152
+ # Set Headers
153
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
154
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
155
+ path_template = '{nextLink}'
156
+
157
+ request_url = @base_url || @client.base_url
158
+
159
+ options = {
160
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
161
+ skip_encoding_path_params: {'nextLink' => next_page_link},
162
+ headers: request_headers.merge(custom_headers || {}),
163
+ base_url: request_url
164
+ }
165
+ promise = @client.make_request_async(:get, path_template, options)
166
+
167
+ promise = promise.then do |result|
168
+ http_response = result.response
169
+ status_code = http_response.status
170
+ response_content = http_response.body
171
+ unless status_code == 200
172
+ error_model = JSON.load(response_content)
173
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
174
+ end
175
+
176
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
177
+ # Deserialize Response
178
+ if status_code == 200
179
+ begin
180
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
181
+ result_mapper = Azure::ARM::ServiceBus::Models::PremiumMessagingRegionsListResult.mapper()
182
+ result.body = @client.deserialize(result_mapper, parsed_response)
183
+ rescue Exception => e
184
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
185
+ end
186
+ end
187
+
188
+ result
189
+ end
190
+
191
+ promise.execute
192
+ end
193
+
194
+ #
195
+ # Gets the available premium messaging regions for servicebus
196
+ #
197
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
198
+ # will be added to the HTTP request.
199
+ #
200
+ # @return [PremiumMessagingRegionsListResult] which provide lazy access to
201
+ # pages of the response.
202
+ #
203
+ def list_as_lazy(custom_headers = nil)
204
+ response = list_async(custom_headers).value!
205
+ unless response.nil?
206
+ page = response.body
207
+ page.next_method = Proc.new do |next_page_link|
208
+ list_next_async(next_page_link, custom_headers)
209
+ end
210
+ page
211
+ end
212
+ end
213
+
214
+ end
215
+ end
@@ -0,0 +1,220 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::ServiceBus
7
+ #
8
+ # Azure Service Bus client
9
+ #
10
+ class Regions
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Regions 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
+ # Gets the available Regions for a given sku
26
+ #
27
+ # @param sku [String] The sku type.
28
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
+ # will be added to the HTTP request.
30
+ #
31
+ # @return [Array<PremiumMessagingRegions>] operation results.
32
+ #
33
+ def list_by_sku(sku, custom_headers = nil)
34
+ first_page = list_by_sku_as_lazy(sku, custom_headers)
35
+ first_page.get_all_items
36
+ end
37
+
38
+ #
39
+ # Gets the available Regions for a given sku
40
+ #
41
+ # @param sku [String] The sku type.
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
46
+ #
47
+ def list_by_sku_with_http_info(sku, custom_headers = nil)
48
+ list_by_sku_async(sku, custom_headers).value!
49
+ end
50
+
51
+ #
52
+ # Gets the available Regions for a given sku
53
+ #
54
+ # @param sku [String] The sku type.
55
+ # @param [Hash{String => String}] A hash of custom headers that will be added
56
+ # to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
+ #
60
+ def list_by_sku_async(sku, custom_headers = nil)
61
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
62
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
63
+ fail ArgumentError, 'sku is nil' if sku.nil?
64
+
65
+
66
+ request_headers = {}
67
+
68
+ # Set Headers
69
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
70
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
71
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/sku/{sku}/regions'
72
+
73
+ request_url = @base_url || @client.base_url
74
+
75
+ options = {
76
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
77
+ path_params: {'subscriptionId' => @client.subscription_id,'sku' => sku},
78
+ query_params: {'api-version' => @client.api_version},
79
+ headers: request_headers.merge(custom_headers || {}),
80
+ base_url: request_url
81
+ }
82
+ promise = @client.make_request_async(:get, path_template, options)
83
+
84
+ promise = promise.then do |result|
85
+ http_response = result.response
86
+ status_code = http_response.status
87
+ response_content = http_response.body
88
+ unless status_code == 200
89
+ error_model = JSON.load(response_content)
90
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
91
+ end
92
+
93
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
94
+ # Deserialize Response
95
+ if status_code == 200
96
+ begin
97
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
98
+ result_mapper = Azure::ARM::ServiceBus::Models::PremiumMessagingRegionsListResult.mapper()
99
+ result.body = @client.deserialize(result_mapper, parsed_response)
100
+ rescue Exception => e
101
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
102
+ end
103
+ end
104
+
105
+ result
106
+ end
107
+
108
+ promise.execute
109
+ end
110
+
111
+ #
112
+ # Gets the available Regions for a given sku
113
+ #
114
+ # @param next_page_link [String] The NextLink from the previous successful call
115
+ # to List operation.
116
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
117
+ # will be added to the HTTP request.
118
+ #
119
+ # @return [PremiumMessagingRegionsListResult] operation results.
120
+ #
121
+ def list_by_sku_next(next_page_link, custom_headers = nil)
122
+ response = list_by_sku_next_async(next_page_link, custom_headers).value!
123
+ response.body unless response.nil?
124
+ end
125
+
126
+ #
127
+ # Gets the available Regions for a given sku
128
+ #
129
+ # @param next_page_link [String] The NextLink from the previous successful call
130
+ # to List operation.
131
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
132
+ # will be added to the HTTP request.
133
+ #
134
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
135
+ #
136
+ def list_by_sku_next_with_http_info(next_page_link, custom_headers = nil)
137
+ list_by_sku_next_async(next_page_link, custom_headers).value!
138
+ end
139
+
140
+ #
141
+ # Gets the available Regions for a given sku
142
+ #
143
+ # @param next_page_link [String] The NextLink from the previous successful call
144
+ # to List operation.
145
+ # @param [Hash{String => String}] A hash of custom headers that will be added
146
+ # to the HTTP request.
147
+ #
148
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
149
+ #
150
+ def list_by_sku_next_async(next_page_link, custom_headers = nil)
151
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
152
+
153
+
154
+ request_headers = {}
155
+
156
+ # Set Headers
157
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
158
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
159
+ path_template = '{nextLink}'
160
+
161
+ request_url = @base_url || @client.base_url
162
+
163
+ options = {
164
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
165
+ skip_encoding_path_params: {'nextLink' => next_page_link},
166
+ headers: request_headers.merge(custom_headers || {}),
167
+ base_url: request_url
168
+ }
169
+ promise = @client.make_request_async(:get, path_template, options)
170
+
171
+ promise = promise.then do |result|
172
+ http_response = result.response
173
+ status_code = http_response.status
174
+ response_content = http_response.body
175
+ unless status_code == 200
176
+ error_model = JSON.load(response_content)
177
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
178
+ end
179
+
180
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
181
+ # Deserialize Response
182
+ if status_code == 200
183
+ begin
184
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
185
+ result_mapper = Azure::ARM::ServiceBus::Models::PremiumMessagingRegionsListResult.mapper()
186
+ result.body = @client.deserialize(result_mapper, parsed_response)
187
+ rescue Exception => e
188
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
189
+ end
190
+ end
191
+
192
+ result
193
+ end
194
+
195
+ promise.execute
196
+ end
197
+
198
+ #
199
+ # Gets the available Regions for a given sku
200
+ #
201
+ # @param sku [String] The sku type.
202
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
203
+ # will be added to the HTTP request.
204
+ #
205
+ # @return [PremiumMessagingRegionsListResult] which provide lazy access to
206
+ # pages of the response.
207
+ #
208
+ def list_by_sku_as_lazy(sku, custom_headers = nil)
209
+ response = list_by_sku_async(sku, custom_headers).value!
210
+ unless response.nil?
211
+ page = response.body
212
+ page.next_method = Proc.new do |next_page_link|
213
+ list_by_sku_next_async(next_page_link, custom_headers)
214
+ end
215
+ page
216
+ end
217
+ end
218
+
219
+ end
220
+ end