azure_mgmt_event_hub 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +7 -6
  3. data/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hubs.rb +111 -0
  4. data/lib/2017-04-01/generated/azure_mgmt_event_hub.rb +11 -6
  5. data/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb +36 -8
  6. data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +11 -6
  7. data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hubs.rb +36 -8
  8. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb +12 -0
  9. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_plan.rb +134 -0
  10. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions.rb +98 -0
  11. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_list_result.rb +101 -0
  12. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_properties.rb +60 -0
  13. data/lib/2017-04-01/generated/azure_mgmt_event_hub/namespaces.rb +99 -0
  14. data/lib/2017-04-01/generated/azure_mgmt_event_hub/regions.rb +224 -0
  15. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub.rb +51 -0
  16. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/clusters.rb +503 -0
  17. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/configuration.rb +257 -0
  18. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/event_hub2018preview_management_client.rb +145 -0
  19. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster.rb +136 -0
  20. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster_list_result.rb +100 -0
  21. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster_quota_configuration_properties.rb +56 -0
  22. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster_sku.rb +64 -0
  23. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace.rb +212 -0
  24. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb +99 -0
  25. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/error_response.rb +58 -0
  26. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ip_filter_rule.rb +96 -0
  27. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ip_filter_rule_list_result.rb +100 -0
  28. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ipaction.rb +16 -0
  29. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/operation.rb +59 -0
  30. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/operation_display.rb +72 -0
  31. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/operation_list_result.rb +103 -0
  32. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/resource.rb +71 -0
  33. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/sku.rb +75 -0
  34. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/sku_name.rb +16 -0
  35. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/sku_tier.rb +16 -0
  36. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/tracked_resource.rb +92 -0
  37. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/virtual_network_rule.rb +73 -0
  38. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/virtual_network_rule_list_result.rb +100 -0
  39. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/module_definition.rb +9 -0
  40. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb +2006 -0
  41. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/operations.rb +216 -0
  42. data/lib/azure_mgmt_event_hub.rb +2 -1
  43. data/lib/profiles/latest/modules/eventhub_profile_module.rb +61 -111
  44. data/lib/version.rb +1 -1
  45. metadata +37 -5
@@ -0,0 +1,257 @@
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::EventHub::Mgmt::V2018_01_01_preview
7
+ #
8
+ # Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and
9
+ # VirtualNetworkRules resources.
10
+ #
11
+ class Configuration
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the Configuration class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return [EventHub2018PreviewManagementClient] reference to the EventHub2018PreviewManagementClient
23
+ attr_reader :client
24
+
25
+ #
26
+ # Replace all specified Event Hubs Cluster settings with those contained in the
27
+ # request body. Leaves the settings not specified in the request body
28
+ # unmodified.
29
+ #
30
+ # @param resource_group_name [String] Name of the resource group within the
31
+ # Azure subscription.
32
+ # @param cluster_name [String] The name of the Event Hubs Cluster.
33
+ # @param parameters [ClusterQuotaConfigurationProperties] Parameters for
34
+ # creating an Event Hubs Cluster resource.
35
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
36
+ # will be added to the HTTP request.
37
+ #
38
+ # @return [ClusterQuotaConfigurationProperties] operation results.
39
+ #
40
+ def patch(resource_group_name, cluster_name, parameters, custom_headers:nil)
41
+ response = patch_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
42
+ response.body unless response.nil?
43
+ end
44
+
45
+ #
46
+ # Replace all specified Event Hubs Cluster settings with those contained in the
47
+ # request body. Leaves the settings not specified in the request body
48
+ # unmodified.
49
+ #
50
+ # @param resource_group_name [String] Name of the resource group within the
51
+ # Azure subscription.
52
+ # @param cluster_name [String] The name of the Event Hubs Cluster.
53
+ # @param parameters [ClusterQuotaConfigurationProperties] Parameters for
54
+ # creating an Event Hubs Cluster resource.
55
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
56
+ # will be added to the HTTP request.
57
+ #
58
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
59
+ #
60
+ def patch_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
61
+ patch_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
62
+ end
63
+
64
+ #
65
+ # Replace all specified Event Hubs Cluster settings with those contained in the
66
+ # request body. Leaves the settings not specified in the request body
67
+ # unmodified.
68
+ #
69
+ # @param resource_group_name [String] Name of the resource group within the
70
+ # Azure subscription.
71
+ # @param cluster_name [String] The name of the Event Hubs Cluster.
72
+ # @param parameters [ClusterQuotaConfigurationProperties] Parameters for
73
+ # creating an Event Hubs Cluster resource.
74
+ # @param [Hash{String => String}] A hash of custom headers that will be added
75
+ # to the HTTP request.
76
+ #
77
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
78
+ #
79
+ def patch_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
80
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
81
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
82
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
83
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
84
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
85
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '50'" if !cluster_name.nil? && cluster_name.length > 50
86
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '6'" if !cluster_name.nil? && cluster_name.length < 6
87
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
88
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
89
+
90
+
91
+ request_headers = {}
92
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
93
+
94
+ # Set Headers
95
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
96
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
97
+
98
+ # Serialize Request
99
+ request_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::ClusterQuotaConfigurationProperties.mapper()
100
+ request_content = @client.serialize(request_mapper, parameters)
101
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
102
+
103
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default'
104
+
105
+ request_url = @base_url || @client.base_url
106
+
107
+ options = {
108
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
109
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
110
+ query_params: {'api-version' => @client.api_version},
111
+ body: request_content,
112
+ headers: request_headers.merge(custom_headers || {}),
113
+ base_url: request_url
114
+ }
115
+ promise = @client.make_request_async(:patch, path_template, options)
116
+
117
+ promise = promise.then do |result|
118
+ http_response = result.response
119
+ status_code = http_response.status
120
+ response_content = http_response.body
121
+ unless status_code == 200 || status_code == 201 || status_code == 202
122
+ error_model = JSON.load(response_content)
123
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
124
+ end
125
+
126
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
127
+ # Deserialize Response
128
+ if status_code == 200
129
+ begin
130
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
131
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::ClusterQuotaConfigurationProperties.mapper()
132
+ result.body = @client.deserialize(result_mapper, parsed_response)
133
+ rescue Exception => e
134
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
135
+ end
136
+ end
137
+ # Deserialize Response
138
+ if status_code == 201
139
+ begin
140
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
141
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::ClusterQuotaConfigurationProperties.mapper()
142
+ result.body = @client.deserialize(result_mapper, parsed_response)
143
+ rescue Exception => e
144
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
145
+ end
146
+ end
147
+
148
+ result
149
+ end
150
+
151
+ promise.execute
152
+ end
153
+
154
+ #
155
+ # Get all Event Hubs Cluster settings - a collection of key/value pairs which
156
+ # represent the quotas and settings imposed on the cluster.
157
+ #
158
+ # @param resource_group_name [String] Name of the resource group within the
159
+ # Azure subscription.
160
+ # @param cluster_name [String] The name of the Event Hubs Cluster.
161
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
162
+ # will be added to the HTTP request.
163
+ #
164
+ # @return [ClusterQuotaConfigurationProperties] operation results.
165
+ #
166
+ def get(resource_group_name, cluster_name, custom_headers:nil)
167
+ response = get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
168
+ response.body unless response.nil?
169
+ end
170
+
171
+ #
172
+ # Get all Event Hubs Cluster settings - a collection of key/value pairs which
173
+ # represent the quotas and settings imposed on the cluster.
174
+ #
175
+ # @param resource_group_name [String] Name of the resource group within the
176
+ # Azure subscription.
177
+ # @param cluster_name [String] The name of the Event Hubs Cluster.
178
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
179
+ # will be added to the HTTP request.
180
+ #
181
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
182
+ #
183
+ def get_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
184
+ get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
185
+ end
186
+
187
+ #
188
+ # Get all Event Hubs Cluster settings - a collection of key/value pairs which
189
+ # represent the quotas and settings imposed on the cluster.
190
+ #
191
+ # @param resource_group_name [String] Name of the resource group within the
192
+ # Azure subscription.
193
+ # @param cluster_name [String] The name of the Event Hubs Cluster.
194
+ # @param [Hash{String => String}] A hash of custom headers that will be added
195
+ # to the HTTP request.
196
+ #
197
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
198
+ #
199
+ def get_async(resource_group_name, cluster_name, custom_headers:nil)
200
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
201
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
202
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
203
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
204
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
205
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '50'" if !cluster_name.nil? && cluster_name.length > 50
206
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '6'" if !cluster_name.nil? && cluster_name.length < 6
207
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
208
+
209
+
210
+ request_headers = {}
211
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
212
+
213
+ # Set Headers
214
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
215
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
216
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default'
217
+
218
+ request_url = @base_url || @client.base_url
219
+
220
+ options = {
221
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
222
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
223
+ query_params: {'api-version' => @client.api_version},
224
+ headers: request_headers.merge(custom_headers || {}),
225
+ base_url: request_url
226
+ }
227
+ promise = @client.make_request_async(:get, path_template, options)
228
+
229
+ promise = promise.then do |result|
230
+ http_response = result.response
231
+ status_code = http_response.status
232
+ response_content = http_response.body
233
+ unless status_code == 200
234
+ error_model = JSON.load(response_content)
235
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
236
+ end
237
+
238
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
239
+ # Deserialize Response
240
+ if status_code == 200
241
+ begin
242
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
243
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::ClusterQuotaConfigurationProperties.mapper()
244
+ result.body = @client.deserialize(result_mapper, parsed_response)
245
+ rescue Exception => e
246
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
247
+ end
248
+ end
249
+
250
+ result
251
+ end
252
+
253
+ promise.execute
254
+ end
255
+
256
+ end
257
+ end
@@ -0,0 +1,145 @@
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::EventHub::Mgmt::V2018_01_01_preview
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class EventHub2018PreviewManagementClient < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] Subscription credentials that uniquely identify a
21
+ # Microsoft Azure subscription. The subscription ID forms part of the URI
22
+ # for every service call.
23
+ attr_accessor :subscription_id
24
+
25
+ # @return [String] Client API version.
26
+ attr_reader :api_version
27
+
28
+ # @return [String] The preferred language for the response.
29
+ attr_accessor :accept_language
30
+
31
+ # @return [Integer] The retry timeout in seconds for Long Running
32
+ # Operations. Default value is 30.
33
+ attr_accessor :long_running_operation_retry_timeout
34
+
35
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
36
+ # generated. When set to true a unique x-ms-client-request-id value is
37
+ # generated and included in each request. Default is true.
38
+ attr_accessor :generate_client_request_id
39
+
40
+ # @return [Operations] operations
41
+ attr_reader :operations
42
+
43
+ # @return [Clusters] clusters
44
+ attr_reader :clusters
45
+
46
+ # @return [Configuration] configuration
47
+ attr_reader :configuration
48
+
49
+ # @return [Namespaces] namespaces
50
+ attr_reader :namespaces
51
+
52
+ #
53
+ # Creates initializes a new instance of the EventHub2018PreviewManagementClient class.
54
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
55
+ # @param base_url [String] the base URI of the service.
56
+ # @param options [Array] filters to be applied to the HTTP requests.
57
+ #
58
+ def initialize(credentials = nil, base_url = nil, options = nil)
59
+ super(credentials, options)
60
+ @base_url = base_url || 'https://management.azure.com'
61
+
62
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
63
+ @credentials = credentials
64
+
65
+ @operations = Operations.new(self)
66
+ @clusters = Clusters.new(self)
67
+ @configuration = Configuration.new(self)
68
+ @namespaces = Namespaces.new(self)
69
+ @api_version = '2018-01-01-preview'
70
+ @accept_language = 'en-US'
71
+ @long_running_operation_retry_timeout = 30
72
+ @generate_client_request_id = true
73
+ add_telemetry
74
+ end
75
+
76
+ #
77
+ # Makes a request and returns the body of the response.
78
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
79
+ # @param path [String] the path, relative to {base_url}.
80
+ # @param options [Hash{String=>String}] specifying any request options like :body.
81
+ # @return [Hash{String=>String}] containing the body of the response.
82
+ # Example:
83
+ #
84
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
85
+ # path = "/path"
86
+ # options = {
87
+ # body: request_content,
88
+ # query_params: {'api-version' => '2016-02-01'}
89
+ # }
90
+ # result = @client.make_request(:put, path, options)
91
+ #
92
+ def make_request(method, path, options = {})
93
+ result = make_request_with_http_info(method, path, options)
94
+ result.body unless result.nil?
95
+ end
96
+
97
+ #
98
+ # Makes a request and returns the operation response.
99
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
100
+ # @param path [String] the path, relative to {base_url}.
101
+ # @param options [Hash{String=>String}] specifying any request options like :body.
102
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
103
+ #
104
+ def make_request_with_http_info(method, path, options = {})
105
+ result = make_request_async(method, path, options).value!
106
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
107
+ result
108
+ end
109
+
110
+ #
111
+ # Makes a request asynchronously.
112
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
113
+ # @param path [String] the path, relative to {base_url}.
114
+ # @param options [Hash{String=>String}] specifying any request options like :body.
115
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
116
+ #
117
+ def make_request_async(method, path, options = {})
118
+ fail ArgumentError, 'method is nil' if method.nil?
119
+ fail ArgumentError, 'path is nil' if path.nil?
120
+
121
+ request_url = options[:base_url] || @base_url
122
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
123
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
124
+ end
125
+
126
+ request_headers = @request_headers
127
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
128
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
129
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
130
+
131
+ super(request_url, method, path, options)
132
+ end
133
+
134
+
135
+ private
136
+ #
137
+ # Adds telemetry information.
138
+ #
139
+ def add_telemetry
140
+ sdk_information = 'azure_mgmt_event_hub'
141
+ sdk_information = "#{sdk_information}/0.17.0"
142
+ add_user_agent_information(sdk_information)
143
+ end
144
+ end
145
+ end
@@ -0,0 +1,136 @@
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::EventHub::Mgmt::V2018_01_01_preview
7
+ module Models
8
+ #
9
+ # Single Event Hubs Cluster resource in List or Get operations.
10
+ #
11
+ class Cluster < TrackedResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [ClusterSku] Properties of the cluster SKU.
16
+ attr_accessor :sku
17
+
18
+ # @return [String] The UTC time when the Event Hubs Cluster was created.
19
+ attr_accessor :created
20
+
21
+ # @return [String] The UTC time when the Event Hubs Cluster was last
22
+ # updated.
23
+ attr_accessor :updated
24
+
25
+ # @return [String] The metric ID of the cluster resource. Provided by the
26
+ # service and not modifiable by the user.
27
+ attr_accessor :metric_id
28
+
29
+
30
+ #
31
+ # Mapper for Cluster class as Ruby Hash.
32
+ # This will be used for serialization/deserialization.
33
+ #
34
+ def self.mapper()
35
+ {
36
+ client_side_validation: true,
37
+ required: false,
38
+ serialized_name: 'Cluster',
39
+ type: {
40
+ name: 'Composite',
41
+ class_name: 'Cluster',
42
+ model_properties: {
43
+ id: {
44
+ client_side_validation: true,
45
+ required: false,
46
+ read_only: true,
47
+ serialized_name: 'id',
48
+ type: {
49
+ name: 'String'
50
+ }
51
+ },
52
+ name: {
53
+ client_side_validation: true,
54
+ required: false,
55
+ read_only: true,
56
+ serialized_name: 'name',
57
+ type: {
58
+ name: 'String'
59
+ }
60
+ },
61
+ type: {
62
+ client_side_validation: true,
63
+ required: false,
64
+ read_only: true,
65
+ serialized_name: 'type',
66
+ type: {
67
+ name: 'String'
68
+ }
69
+ },
70
+ location: {
71
+ client_side_validation: true,
72
+ required: false,
73
+ serialized_name: 'location',
74
+ type: {
75
+ name: 'String'
76
+ }
77
+ },
78
+ tags: {
79
+ client_side_validation: true,
80
+ required: false,
81
+ serialized_name: 'tags',
82
+ type: {
83
+ name: 'Dictionary',
84
+ value: {
85
+ client_side_validation: true,
86
+ required: false,
87
+ serialized_name: 'StringElementType',
88
+ type: {
89
+ name: 'String'
90
+ }
91
+ }
92
+ }
93
+ },
94
+ sku: {
95
+ client_side_validation: true,
96
+ required: false,
97
+ serialized_name: 'sku',
98
+ type: {
99
+ name: 'Composite',
100
+ class_name: 'ClusterSku'
101
+ }
102
+ },
103
+ created: {
104
+ client_side_validation: true,
105
+ required: false,
106
+ read_only: true,
107
+ serialized_name: 'properties.created',
108
+ type: {
109
+ name: 'String'
110
+ }
111
+ },
112
+ updated: {
113
+ client_side_validation: true,
114
+ required: false,
115
+ read_only: true,
116
+ serialized_name: 'properties.updated',
117
+ type: {
118
+ name: 'String'
119
+ }
120
+ },
121
+ metric_id: {
122
+ client_side_validation: true,
123
+ required: false,
124
+ read_only: true,
125
+ serialized_name: 'properties.metricId',
126
+ type: {
127
+ name: 'String'
128
+ }
129
+ }
130
+ }
131
+ }
132
+ }
133
+ end
134
+ end
135
+ end
136
+ end