azure_mgmt_event_hub 0.18.1 → 0.18.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2014-09-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +1 -1
  3. data/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +1 -1
  4. data/lib/2017-04-01/generated/azure_mgmt_event_hub.rb +15 -28
  5. data/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb +5 -5
  6. data/lib/2017-04-01/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb +239 -239
  7. data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +5 -5
  8. data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hubs.rb +278 -272
  9. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/error_response.rb +1 -1
  10. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions.rb +1 -1
  11. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_properties.rb +1 -2
  12. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/resource.rb +4 -4
  13. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb +3 -3
  14. data/lib/2017-04-01/generated/azure_mgmt_event_hub/namespaces.rb +198 -1678
  15. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub.rb +24 -18
  16. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/clusters.rb +74 -56
  17. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/configuration.rb +7 -7
  18. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/{event_hub2018preview_management_client.rb → event_hub_management_client.rb} +18 -14
  19. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster.rb +6 -6
  20. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/{operation.rb → connection_state.rb} +16 -16
  21. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace.rb +12 -12
  22. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/encryption.rb +11 -3
  23. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/end_point_provisioning_state.rb +20 -0
  24. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/error_response.rb +1 -1
  25. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/key_vault_properties.rb +11 -0
  26. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/network_rule_set.rb +12 -0
  27. data/lib/{2017-04-01/generated/azure_mgmt_event_hub/models/subnet.rb → 2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_endpoint.rb} +8 -8
  28. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_endpoint_connection.rb +100 -0
  29. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/{operation_list_result.rb → private_endpoint_connection_list_result.rb} +13 -16
  30. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_link_connection_status.rb +18 -0
  31. data/lib/{2017-04-01/generated/azure_mgmt_event_hub/models/network_rule_set.rb → 2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_link_resource.rb} +55 -50
  32. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_link_resources_list_result.rb +67 -0
  33. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/resource.rb +4 -4
  34. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/tracked_resource.rb +3 -3
  35. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb +395 -395
  36. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/private_endpoint_connections.rb +625 -0
  37. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/private_link_resources.rb +127 -0
  38. data/lib/azure_mgmt_event_hub.rb +2 -2
  39. data/lib/profiles/latest/modules/eventhub_profile_module.rb +211 -63
  40. data/lib/version.rb +1 -1
  41. metadata +14 -21
  42. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/default_action.rb +0 -16
  43. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace.rb +0 -200
  44. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb +0 -99
  45. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_plan.rb +0 -134
  46. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/network_rule_ipaction.rb +0 -15
  47. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/network_rule_set_list_result.rb +0 -100
  48. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/nwrule_set_ip_rules.rb +0 -59
  49. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/nwrule_set_virtual_network_rules.rb +0 -59
  50. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/sku.rb +0 -75
  51. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/sku_name.rb +0 -16
  52. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/sku_tier.rb +0 -16
  53. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/operation_display.rb +0 -72
  54. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/operations.rb +0 -220
@@ -1,15 +0,0 @@
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::V2017_04_01
7
- module Models
8
- #
9
- # Defines values for NetworkRuleIPAction
10
- #
11
- module NetworkRuleIPAction
12
- Allow = "Allow"
13
- end
14
- end
15
- end
@@ -1,100 +0,0 @@
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::V2017_04_01
7
- module Models
8
- #
9
- # The response of the List NetworkRuleSet operation
10
- #
11
- class NetworkRuleSetListResult
12
-
13
- include MsRestAzure
14
-
15
- include MsRest::JSONable
16
- # @return [Array<NetworkRuleSet>] Result of the List NetworkRuleSet
17
- # operation.
18
- attr_accessor :value
19
-
20
- # @return [String] Link to the next set of results. Not empty if Value
21
- # contains incomplete list of NetworkRuleSet.
22
- attr_accessor :next_link
23
-
24
- # return [Proc] with next page method call.
25
- attr_accessor :next_method
26
-
27
- #
28
- # Gets the rest of the items for the request, enabling auto-pagination.
29
- #
30
- # @return [Array<NetworkRuleSet>] operation results.
31
- #
32
- def get_all_items
33
- items = @value
34
- page = self
35
- while page.next_link != nil && !page.next_link.strip.empty? do
36
- page = page.get_next_page
37
- items.concat(page.value)
38
- end
39
- items
40
- end
41
-
42
- #
43
- # Gets the next page of results.
44
- #
45
- # @return [NetworkRuleSetListResult] with next page content.
46
- #
47
- def get_next_page
48
- response = @next_method.call(@next_link).value! unless @next_method.nil?
49
- unless response.nil?
50
- @next_link = response.body.next_link
51
- @value = response.body.value
52
- self
53
- end
54
- end
55
-
56
- #
57
- # Mapper for NetworkRuleSetListResult class as Ruby Hash.
58
- # This will be used for serialization/deserialization.
59
- #
60
- def self.mapper()
61
- {
62
- client_side_validation: true,
63
- required: false,
64
- serialized_name: 'NetworkRuleSetListResult',
65
- type: {
66
- name: 'Composite',
67
- class_name: 'NetworkRuleSetListResult',
68
- model_properties: {
69
- value: {
70
- client_side_validation: true,
71
- required: false,
72
- serialized_name: 'value',
73
- type: {
74
- name: 'Sequence',
75
- element: {
76
- client_side_validation: true,
77
- required: false,
78
- serialized_name: 'NetworkRuleSetElementType',
79
- type: {
80
- name: 'Composite',
81
- class_name: 'NetworkRuleSet'
82
- }
83
- }
84
- }
85
- },
86
- next_link: {
87
- client_side_validation: true,
88
- required: false,
89
- serialized_name: 'nextLink',
90
- type: {
91
- name: 'String'
92
- }
93
- }
94
- }
95
- }
96
- }
97
- end
98
- end
99
- end
100
- end
@@ -1,59 +0,0 @@
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::V2017_04_01
7
- module Models
8
- #
9
- # Description of NetWorkRuleSet - IpRules resource.
10
- #
11
- class NWRuleSetIpRules
12
-
13
- include MsRestAzure
14
-
15
- # @return [String] IP Mask
16
- attr_accessor :ip_mask
17
-
18
- # @return [NetworkRuleIPAction] The IP Filter Action. Possible values
19
- # include: 'Allow'. Default value: 'Allow' .
20
- attr_accessor :action
21
-
22
-
23
- #
24
- # Mapper for NWRuleSetIpRules class as Ruby Hash.
25
- # This will be used for serialization/deserialization.
26
- #
27
- def self.mapper()
28
- {
29
- client_side_validation: true,
30
- required: false,
31
- serialized_name: 'NWRuleSetIpRules',
32
- type: {
33
- name: 'Composite',
34
- class_name: 'NWRuleSetIpRules',
35
- model_properties: {
36
- ip_mask: {
37
- client_side_validation: true,
38
- required: false,
39
- serialized_name: 'ipMask',
40
- type: {
41
- name: 'String'
42
- }
43
- },
44
- action: {
45
- client_side_validation: true,
46
- required: false,
47
- serialized_name: 'action',
48
- default_value: 'Allow',
49
- type: {
50
- name: 'String'
51
- }
52
- }
53
- }
54
- }
55
- }
56
- end
57
- end
58
- end
59
- end
@@ -1,59 +0,0 @@
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::V2017_04_01
7
- module Models
8
- #
9
- # Description of VirtualNetworkRules - NetworkRules resource.
10
- #
11
- class NWRuleSetVirtualNetworkRules
12
-
13
- include MsRestAzure
14
-
15
- # @return [Subnet] Subnet properties
16
- attr_accessor :subnet
17
-
18
- # @return [Boolean] Value that indicates whether to ignore missing VNet
19
- # Service Endpoint
20
- attr_accessor :ignore_missing_vnet_service_endpoint
21
-
22
-
23
- #
24
- # Mapper for NWRuleSetVirtualNetworkRules class as Ruby Hash.
25
- # This will be used for serialization/deserialization.
26
- #
27
- def self.mapper()
28
- {
29
- client_side_validation: true,
30
- required: false,
31
- serialized_name: 'NWRuleSetVirtualNetworkRules',
32
- type: {
33
- name: 'Composite',
34
- class_name: 'NWRuleSetVirtualNetworkRules',
35
- model_properties: {
36
- subnet: {
37
- client_side_validation: true,
38
- required: false,
39
- serialized_name: 'subnet',
40
- type: {
41
- name: 'Composite',
42
- class_name: 'Subnet'
43
- }
44
- },
45
- ignore_missing_vnet_service_endpoint: {
46
- client_side_validation: true,
47
- required: false,
48
- serialized_name: 'ignoreMissingVnetServiceEndpoint',
49
- type: {
50
- name: 'Boolean'
51
- }
52
- }
53
- }
54
- }
55
- }
56
- end
57
- end
58
- end
59
- end
@@ -1,75 +0,0 @@
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::V2017_04_01
7
- module Models
8
- #
9
- # SKU parameters supplied to the create namespace operation
10
- #
11
- class Sku
12
-
13
- include MsRestAzure
14
-
15
- # @return [SkuName] Name of this SKU. Possible values include: 'Basic',
16
- # 'Standard'
17
- attr_accessor :name
18
-
19
- # @return [SkuTier] The billing tier of this particular SKU. Possible
20
- # values include: 'Basic', 'Standard'
21
- attr_accessor :tier
22
-
23
- # @return [Integer] The Event Hubs throughput units, value should be 0 to
24
- # 20 throughput units.
25
- attr_accessor :capacity
26
-
27
-
28
- #
29
- # Mapper for Sku class as Ruby Hash.
30
- # This will be used for serialization/deserialization.
31
- #
32
- def self.mapper()
33
- {
34
- client_side_validation: true,
35
- required: false,
36
- serialized_name: 'Sku',
37
- type: {
38
- name: 'Composite',
39
- class_name: 'Sku',
40
- model_properties: {
41
- name: {
42
- client_side_validation: true,
43
- required: true,
44
- serialized_name: 'name',
45
- type: {
46
- name: 'String'
47
- }
48
- },
49
- tier: {
50
- client_side_validation: true,
51
- required: false,
52
- serialized_name: 'tier',
53
- type: {
54
- name: 'String'
55
- }
56
- },
57
- capacity: {
58
- client_side_validation: true,
59
- required: false,
60
- serialized_name: 'capacity',
61
- constraints: {
62
- InclusiveMaximum: 20,
63
- InclusiveMinimum: 0
64
- },
65
- type: {
66
- name: 'Number'
67
- }
68
- }
69
- }
70
- }
71
- }
72
- end
73
- end
74
- end
75
- end
@@ -1,16 +0,0 @@
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::V2017_04_01
7
- module Models
8
- #
9
- # Defines values for SkuName
10
- #
11
- module SkuName
12
- Basic = "Basic"
13
- Standard = "Standard"
14
- end
15
- end
16
- end
@@ -1,16 +0,0 @@
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::V2017_04_01
7
- module Models
8
- #
9
- # Defines values for SkuTier
10
- #
11
- module SkuTier
12
- Basic = "Basic"
13
- Standard = "Standard"
14
- end
15
- end
16
- end
@@ -1,72 +0,0 @@
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
- # The object that represents the operation.
10
- #
11
- class OperationDisplay
12
-
13
- include MsRestAzure
14
-
15
- # @return [String] Service provider: Microsoft.EventHub
16
- attr_accessor :provider
17
-
18
- # @return [String] Resource on which the operation is performed: Invoice,
19
- # etc.
20
- attr_accessor :resource
21
-
22
- # @return [String] Operation type: Read, write, delete, etc.
23
- attr_accessor :operation
24
-
25
-
26
- #
27
- # Mapper for OperationDisplay class as Ruby Hash.
28
- # This will be used for serialization/deserialization.
29
- #
30
- def self.mapper()
31
- {
32
- client_side_validation: true,
33
- required: false,
34
- serialized_name: 'Operation_display',
35
- type: {
36
- name: 'Composite',
37
- class_name: 'OperationDisplay',
38
- model_properties: {
39
- provider: {
40
- client_side_validation: true,
41
- required: false,
42
- read_only: true,
43
- serialized_name: 'provider',
44
- type: {
45
- name: 'String'
46
- }
47
- },
48
- resource: {
49
- client_side_validation: true,
50
- required: false,
51
- read_only: true,
52
- serialized_name: 'resource',
53
- type: {
54
- name: 'String'
55
- }
56
- },
57
- operation: {
58
- client_side_validation: true,
59
- required: false,
60
- read_only: true,
61
- serialized_name: 'operation',
62
- type: {
63
- name: 'String'
64
- }
65
- }
66
- }
67
- }
68
- }
69
- end
70
- end
71
- end
72
- end
@@ -1,220 +0,0 @@
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 Operations
12
- include MsRestAzure
13
-
14
- #
15
- # Creates and initializes a new instance of the Operations 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
- # Lists all of the available Event Hub REST API operations.
27
- #
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<Operation>] operation results.
32
- #
33
- def list(custom_headers:nil)
34
- first_page = list_as_lazy(custom_headers:custom_headers)
35
- first_page.get_all_items
36
- end
37
-
38
- #
39
- # Lists all of the available Event Hub REST API operations.
40
- #
41
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
42
- # will be added to the HTTP request.
43
- #
44
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
45
- #
46
- def list_with_http_info(custom_headers:nil)
47
- list_async(custom_headers:custom_headers).value!
48
- end
49
-
50
- #
51
- # Lists all of the available Event Hub REST API operations.
52
- #
53
- # @param [Hash{String => String}] A hash of custom headers that will be added
54
- # to the HTTP request.
55
- #
56
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
57
- #
58
- def list_async(custom_headers:nil)
59
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
60
-
61
-
62
- request_headers = {}
63
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
64
-
65
- # Set Headers
66
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
67
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
68
- path_template = 'providers/Microsoft.EventHub/operations'
69
-
70
- request_url = @base_url || @client.base_url
71
-
72
- options = {
73
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
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
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
91
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
92
- # Deserialize Response
93
- if status_code == 200
94
- begin
95
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
96
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::OperationListResult.mapper()
97
- result.body = @client.deserialize(result_mapper, parsed_response)
98
- rescue Exception => e
99
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
100
- end
101
- end
102
-
103
- result
104
- end
105
-
106
- promise.execute
107
- end
108
-
109
- #
110
- # Lists all of the available Event Hub REST API operations.
111
- #
112
- # @param next_page_link [String] The NextLink from the previous successful call
113
- # to List operation.
114
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
115
- # will be added to the HTTP request.
116
- #
117
- # @return [OperationListResult] operation results.
118
- #
119
- def list_next(next_page_link, custom_headers:nil)
120
- response = list_next_async(next_page_link, custom_headers:custom_headers).value!
121
- response.body unless response.nil?
122
- end
123
-
124
- #
125
- # Lists all of the available Event Hub REST API operations.
126
- #
127
- # @param next_page_link [String] The NextLink from the previous successful call
128
- # to List operation.
129
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
130
- # will be added to the HTTP request.
131
- #
132
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
133
- #
134
- def list_next_with_http_info(next_page_link, custom_headers:nil)
135
- list_next_async(next_page_link, custom_headers:custom_headers).value!
136
- end
137
-
138
- #
139
- # Lists all of the available Event Hub REST API operations.
140
- #
141
- # @param next_page_link [String] The NextLink from the previous successful call
142
- # to List operation.
143
- # @param [Hash{String => String}] A hash of custom headers that will be added
144
- # to the HTTP request.
145
- #
146
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
147
- #
148
- def list_next_async(next_page_link, custom_headers:nil)
149
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
150
-
151
-
152
- request_headers = {}
153
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
154
-
155
- # Set Headers
156
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
157
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
158
- path_template = '{nextLink}'
159
-
160
- request_url = @base_url || @client.base_url
161
-
162
- options = {
163
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
164
- skip_encoding_path_params: {'nextLink' => next_page_link},
165
- headers: request_headers.merge(custom_headers || {}),
166
- base_url: request_url
167
- }
168
- promise = @client.make_request_async(:get, path_template, options)
169
-
170
- promise = promise.then do |result|
171
- http_response = result.response
172
- status_code = http_response.status
173
- response_content = http_response.body
174
- unless status_code == 200
175
- error_model = JSON.load(response_content)
176
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
177
- end
178
-
179
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
180
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
181
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
182
- # Deserialize Response
183
- if status_code == 200
184
- begin
185
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
186
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::OperationListResult.mapper()
187
- result.body = @client.deserialize(result_mapper, parsed_response)
188
- rescue Exception => e
189
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
190
- end
191
- end
192
-
193
- result
194
- end
195
-
196
- promise.execute
197
- end
198
-
199
- #
200
- # Lists all of the available Event Hub REST API operations.
201
- #
202
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
203
- # will be added to the HTTP request.
204
- #
205
- # @return [OperationListResult] which provide lazy access to pages of the
206
- # response.
207
- #
208
- def list_as_lazy(custom_headers:nil)
209
- response = list_async(custom_headers:custom_headers).value!
210
- unless response.nil?
211
- page = response.body
212
- page.next_method = Proc.new do |next_page_link|
213
- list_next_async(next_page_link, custom_headers:custom_headers)
214
- end
215
- page
216
- end
217
- end
218
-
219
- end
220
- end