azure_mgmt_event_hub 0.17.0 → 0.18.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2014-09-01/generated/azure_mgmt_event_hub.rb +59 -0
  3. data/lib/2014-09-01/generated/azure_mgmt_event_hub/consumer_groups.rb +598 -0
  4. data/lib/2014-09-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +145 -0
  5. data/lib/2014-09-01/generated/azure_mgmt_event_hub/event_hubs.rb +1239 -0
  6. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/access_rights.rb +17 -0
  7. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb +46 -0
  8. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb +75 -0
  9. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/consumer_group_create_or_update_parameters.rb +115 -0
  10. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +100 -0
  11. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/consumer_group_resource.rb +117 -0
  12. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/entity_status.rb +23 -0
  13. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/event_hub_create_or_update_parameters.rb +150 -0
  14. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +100 -0
  15. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/event_hub_resource.rb +152 -0
  16. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_create_or_update_parameters.rb +160 -0
  17. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_list_result.rb +100 -0
  18. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_resource.rb +181 -0
  19. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_state.rb +27 -0
  20. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/namespace_update_parameter.rb +66 -0
  21. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/operation.rb +59 -0
  22. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/operation_display.rb +72 -0
  23. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb +103 -0
  24. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/resource.rb +91 -0
  25. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_create_or_update_parameters.rb +79 -0
  26. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_list_result.rb +102 -0
  27. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_post_resource.rb +175 -0
  28. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_resource.rb +90 -0
  29. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/sku.rb +70 -0
  30. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/sku_name.rb +16 -0
  31. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/sku_tier.rb +17 -0
  32. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb +89 -0
  33. data/lib/2014-09-01/generated/azure_mgmt_event_hub/models/unavailable_reason.rb +20 -0
  34. data/lib/2014-09-01/generated/azure_mgmt_event_hub/module_definition.rb +9 -0
  35. data/lib/2014-09-01/generated/azure_mgmt_event_hub/namespaces.rb +2044 -0
  36. data/lib/2014-09-01/generated/azure_mgmt_event_hub/operations.rb +219 -0
  37. data/lib/2015-08-01/generated/azure_mgmt_event_hub/consumer_groups.rb +10 -0
  38. data/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +1 -1
  39. data/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hubs.rb +31 -5
  40. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +1 -1
  41. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +1 -1
  42. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/namespace_list_result.rb +1 -1
  43. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb +1 -1
  44. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/resource.rb +9 -0
  45. data/lib/2015-08-01/generated/azure_mgmt_event_hub/models/shared_access_authorization_rule_list_result.rb +1 -1
  46. data/lib/2015-08-01/generated/azure_mgmt_event_hub/namespaces.rb +32 -0
  47. data/lib/2015-08-01/generated/azure_mgmt_event_hub/operations.rb +4 -0
  48. data/lib/2017-04-01/generated/azure_mgmt_event_hub.rb +20 -13
  49. data/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb +14 -0
  50. data/lib/2017-04-01/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb +27 -3
  51. data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +1 -1
  52. data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hubs.rb +33 -0
  53. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb +1 -1
  54. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb +1 -1
  55. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb +1 -1
  56. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/capture_description.rb +11 -0
  57. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group.rb +1 -1
  58. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +1 -1
  59. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/default_action.rb +16 -0
  60. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace.rb +13 -1
  61. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb +1 -1
  62. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/error_response.rb +1 -1
  63. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +1 -1
  64. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_list_result.rb +1 -1
  65. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/network_rule_ipaction.rb +15 -0
  66. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/network_rule_set.rb +114 -0
  67. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/network_rule_set_list_result.rb +100 -0
  68. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/nwrule_set_ip_rules.rb +59 -0
  69. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/nwrule_set_virtual_network_rules.rb +59 -0
  70. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb +1 -1
  71. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb +1 -1
  72. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/resource.rb +9 -0
  73. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/sku.rb +1 -1
  74. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/subnet.rb +46 -0
  75. data/lib/2017-04-01/generated/azure_mgmt_event_hub/namespaces.rb +461 -0
  76. data/lib/2017-04-01/generated/azure_mgmt_event_hub/operations.rb +4 -0
  77. data/lib/2017-04-01/generated/azure_mgmt_event_hub/regions.rb +4 -0
  78. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub.rb +22 -7
  79. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/clusters.rb +483 -0
  80. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/configuration.rb +4 -0
  81. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/event_hub2018preview_management_client.rb +1 -1
  82. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/available_cluster.rb +47 -0
  83. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/available_clusters_list.rb +56 -0
  84. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster.rb +12 -0
  85. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster_list_result.rb +1 -1
  86. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/default_action.rb +16 -0
  87. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace.rb +36 -1
  88. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_id_container.rb +46 -0
  89. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_id_list_result.rb +56 -0
  90. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb +1 -1
  91. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/encryption.rb +62 -0
  92. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/identity.rb +72 -0
  93. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/identity_type.rb +15 -0
  94. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ip_filter_rule_list_result.rb +1 -1
  95. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/key_source.rb +15 -0
  96. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/key_vault_properties.rb +57 -0
  97. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/network_rule_ipaction.rb +15 -0
  98. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/network_rule_set.rb +114 -0
  99. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/nwrule_set_ip_rules.rb +58 -0
  100. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/nwrule_set_virtual_network_rules.rb +59 -0
  101. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/operation_list_result.rb +1 -1
  102. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/resource.rb +9 -0
  103. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/sku.rb +1 -1
  104. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/subnet.rb +46 -0
  105. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/virtual_network_rule_list_result.rb +6 -6
  106. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb +260 -11
  107. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/operations.rb +4 -0
  108. data/lib/azure_mgmt_event_hub.rb +2 -1
  109. data/lib/profiles/latest/modules/eventhub_profile_module.rb +82 -22
  110. data/lib/version.rb +1 -1
  111. metadata +62 -5
@@ -0,0 +1,100 @@
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
@@ -0,0 +1,59 @@
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
@@ -0,0 +1,59 @@
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
@@ -33,7 +33,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
33
33
  def get_all_items
34
34
  items = @value
35
35
  page = self
36
- while page.next_link != nil do
36
+ while page.next_link != nil && !page.next_link.strip.empty? do
37
37
  page = page.get_next_page
38
38
  items.concat(page.value)
39
39
  end
@@ -7,7 +7,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
7
7
  module Models
8
8
  #
9
9
  # Parameters supplied to the Regenerate Authorization Rule operation,
10
- # specifies which key neeeds to be reset.
10
+ # specifies which key needs to be reset.
11
11
  #
12
12
  class RegenerateAccessKeyParameters
13
13
 
@@ -22,6 +22,15 @@ module Azure::EventHub::Mgmt::V2017_04_01
22
22
  attr_accessor :type
23
23
 
24
24
 
25
+ # @return [String] the name of the resource group of the resource.
26
+ def resource_group
27
+ unless self.id.nil?
28
+ groups = self.id.match(/.+\/resourceGroups\/([^\/]+)\/.+/)
29
+ groups.captures[0].strip if groups
30
+ end
31
+ end
32
+
33
+
25
34
  #
26
35
  # Mapper for Resource class as Ruby Hash.
27
36
  # This will be used for serialization/deserialization.
@@ -20,7 +20,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
20
20
  # values include: 'Basic', 'Standard'
21
21
  attr_accessor :tier
22
22
 
23
- # @return [Integer] The Event Hubs throughput units, vaule should be 0 to
23
+ # @return [Integer] The Event Hubs throughput units, value should be 0 to
24
24
  # 20 throughput units.
25
25
  attr_accessor :capacity
26
26
 
@@ -0,0 +1,46 @@
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
+ # Properties supplied for Subnet
10
+ #
11
+ class Subnet
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Resource ID of Virtual Network Subnet
16
+ attr_accessor :id
17
+
18
+
19
+ #
20
+ # Mapper for Subnet class as Ruby Hash.
21
+ # This will be used for serialization/deserialization.
22
+ #
23
+ def self.mapper()
24
+ {
25
+ client_side_validation: true,
26
+ required: false,
27
+ serialized_name: 'Subnet',
28
+ type: {
29
+ name: 'Composite',
30
+ class_name: 'Subnet',
31
+ model_properties: {
32
+ id: {
33
+ client_side_validation: true,
34
+ required: true,
35
+ serialized_name: 'id',
36
+ type: {
37
+ name: 'String'
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ end
44
+ end
45
+ end
46
+ end
@@ -102,6 +102,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
102
102
  end
103
103
 
104
104
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
105
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
106
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
105
107
  # Deserialize Response
106
108
  if status_code == 200
107
109
  begin
@@ -189,6 +191,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
189
191
  end
190
192
 
191
193
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
194
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
195
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
192
196
  # Deserialize Response
193
197
  if status_code == 200
194
198
  begin
@@ -282,6 +286,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
282
286
  end
283
287
 
284
288
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
289
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
290
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
285
291
  # Deserialize Response
286
292
  if status_code == 200
287
293
  begin
@@ -469,6 +475,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
469
475
  end
470
476
 
471
477
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
478
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
479
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
472
480
  # Deserialize Response
473
481
  if status_code == 200
474
482
  begin
@@ -592,6 +600,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
592
600
  end
593
601
 
594
602
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
603
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
604
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
595
605
  # Deserialize Response
596
606
  if status_code == 201
597
607
  begin
@@ -701,6 +711,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
701
711
  end
702
712
 
703
713
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
714
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
715
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
704
716
  # Deserialize Response
705
717
  if status_code == 200
706
718
  begin
@@ -800,6 +812,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
800
812
  end
801
813
 
802
814
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
815
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
816
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
803
817
  # Deserialize Response
804
818
  if status_code == 200
805
819
  begin
@@ -915,6 +929,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
915
929
  end
916
930
 
917
931
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
932
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
933
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
918
934
  # Deserialize Response
919
935
  if status_code == 200
920
936
  begin
@@ -1018,6 +1034,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
1018
1034
  end
1019
1035
 
1020
1036
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1037
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1038
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1021
1039
 
1022
1040
  result
1023
1041
  end
@@ -1112,6 +1130,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
1112
1130
  end
1113
1131
 
1114
1132
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1133
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1134
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1115
1135
  # Deserialize Response
1116
1136
  if status_code == 200
1117
1137
  begin
@@ -1216,6 +1236,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
1216
1236
  end
1217
1237
 
1218
1238
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1239
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1240
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1219
1241
  # Deserialize Response
1220
1242
  if status_code == 200
1221
1243
  begin
@@ -1337,6 +1359,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
1337
1359
  end
1338
1360
 
1339
1361
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1362
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1363
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1340
1364
  # Deserialize Response
1341
1365
  if status_code == 200
1342
1366
  begin
@@ -1354,6 +1378,320 @@ module Azure::EventHub::Mgmt::V2017_04_01
1354
1378
  promise.execute
1355
1379
  end
1356
1380
 
1381
+ #
1382
+ # Create or update NetworkRuleSet for a Namespace.
1383
+ #
1384
+ # @param resource_group_name [String] Name of the resource group within the
1385
+ # azure subscription.
1386
+ # @param namespace_name [String] The Namespace name
1387
+ # @param parameters [NetworkRuleSet] The Namespace IpFilterRule.
1388
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1389
+ # will be added to the HTTP request.
1390
+ #
1391
+ # @return [NetworkRuleSet] operation results.
1392
+ #
1393
+ def create_or_update_network_rule_set(resource_group_name, namespace_name, parameters, custom_headers:nil)
1394
+ response = create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
1395
+ response.body unless response.nil?
1396
+ end
1397
+
1398
+ #
1399
+ # Create or update NetworkRuleSet for a Namespace.
1400
+ #
1401
+ # @param resource_group_name [String] Name of the resource group within the
1402
+ # azure subscription.
1403
+ # @param namespace_name [String] The Namespace name
1404
+ # @param parameters [NetworkRuleSet] The Namespace IpFilterRule.
1405
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1406
+ # will be added to the HTTP request.
1407
+ #
1408
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1409
+ #
1410
+ def create_or_update_network_rule_set_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
1411
+ create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
1412
+ end
1413
+
1414
+ #
1415
+ # Create or update NetworkRuleSet for a Namespace.
1416
+ #
1417
+ # @param resource_group_name [String] Name of the resource group within the
1418
+ # azure subscription.
1419
+ # @param namespace_name [String] The Namespace name
1420
+ # @param parameters [NetworkRuleSet] The Namespace IpFilterRule.
1421
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1422
+ # to the HTTP request.
1423
+ #
1424
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1425
+ #
1426
+ def create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
1427
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1428
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1429
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1430
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1431
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
1432
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
1433
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1434
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1435
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1436
+
1437
+
1438
+ request_headers = {}
1439
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1440
+
1441
+ # Set Headers
1442
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1443
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1444
+
1445
+ # Serialize Request
1446
+ request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::NetworkRuleSet.mapper()
1447
+ request_content = @client.serialize(request_mapper, parameters)
1448
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1449
+
1450
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default'
1451
+
1452
+ request_url = @base_url || @client.base_url
1453
+
1454
+ options = {
1455
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1456
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
1457
+ query_params: {'api-version' => @client.api_version},
1458
+ body: request_content,
1459
+ headers: request_headers.merge(custom_headers || {}),
1460
+ base_url: request_url
1461
+ }
1462
+ promise = @client.make_request_async(:put, path_template, options)
1463
+
1464
+ promise = promise.then do |result|
1465
+ http_response = result.response
1466
+ status_code = http_response.status
1467
+ response_content = http_response.body
1468
+ unless status_code == 200
1469
+ error_model = JSON.load(response_content)
1470
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1471
+ end
1472
+
1473
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1474
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1475
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1476
+ # Deserialize Response
1477
+ if status_code == 200
1478
+ begin
1479
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1480
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::NetworkRuleSet.mapper()
1481
+ result.body = @client.deserialize(result_mapper, parsed_response)
1482
+ rescue Exception => e
1483
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1484
+ end
1485
+ end
1486
+
1487
+ result
1488
+ end
1489
+
1490
+ promise.execute
1491
+ end
1492
+
1493
+ #
1494
+ # Gets NetworkRuleSet for a Namespace.
1495
+ #
1496
+ # @param resource_group_name [String] Name of the resource group within the
1497
+ # azure subscription.
1498
+ # @param namespace_name [String] The Namespace name
1499
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1500
+ # will be added to the HTTP request.
1501
+ #
1502
+ # @return [NetworkRuleSet] operation results.
1503
+ #
1504
+ def get_network_rule_set(resource_group_name, namespace_name, custom_headers:nil)
1505
+ response = get_network_rule_set_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1506
+ response.body unless response.nil?
1507
+ end
1508
+
1509
+ #
1510
+ # Gets NetworkRuleSet for a Namespace.
1511
+ #
1512
+ # @param resource_group_name [String] Name of the resource group within the
1513
+ # azure subscription.
1514
+ # @param namespace_name [String] The Namespace name
1515
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1516
+ # will be added to the HTTP request.
1517
+ #
1518
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1519
+ #
1520
+ def get_network_rule_set_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
1521
+ get_network_rule_set_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1522
+ end
1523
+
1524
+ #
1525
+ # Gets NetworkRuleSet for a Namespace.
1526
+ #
1527
+ # @param resource_group_name [String] Name of the resource group within the
1528
+ # azure subscription.
1529
+ # @param namespace_name [String] The Namespace name
1530
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1531
+ # to the HTTP request.
1532
+ #
1533
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1534
+ #
1535
+ def get_network_rule_set_async(resource_group_name, namespace_name, custom_headers:nil)
1536
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1537
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1538
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1539
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1540
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
1541
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
1542
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1543
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1544
+
1545
+
1546
+ request_headers = {}
1547
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1548
+
1549
+ # Set Headers
1550
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1551
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1552
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default'
1553
+
1554
+ request_url = @base_url || @client.base_url
1555
+
1556
+ options = {
1557
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1558
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
1559
+ query_params: {'api-version' => @client.api_version},
1560
+ headers: request_headers.merge(custom_headers || {}),
1561
+ base_url: request_url
1562
+ }
1563
+ promise = @client.make_request_async(:get, path_template, options)
1564
+
1565
+ promise = promise.then do |result|
1566
+ http_response = result.response
1567
+ status_code = http_response.status
1568
+ response_content = http_response.body
1569
+ unless status_code == 200
1570
+ error_model = JSON.load(response_content)
1571
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1572
+ end
1573
+
1574
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1575
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1576
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1577
+ # Deserialize Response
1578
+ if status_code == 200
1579
+ begin
1580
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1581
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::NetworkRuleSet.mapper()
1582
+ result.body = @client.deserialize(result_mapper, parsed_response)
1583
+ rescue Exception => e
1584
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1585
+ end
1586
+ end
1587
+
1588
+ result
1589
+ end
1590
+
1591
+ promise.execute
1592
+ end
1593
+
1594
+ #
1595
+ # Gets list of NetworkRuleSet for a Namespace.
1596
+ #
1597
+ # @param resource_group_name [String] Name of the resource group within the
1598
+ # azure subscription.
1599
+ # @param namespace_name [String] The Namespace name
1600
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1601
+ # will be added to the HTTP request.
1602
+ #
1603
+ # @return [Array<NetworkRuleSet>] operation results.
1604
+ #
1605
+ def list_network_rule_sets(resource_group_name, namespace_name, custom_headers:nil)
1606
+ first_page = list_network_rule_sets_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
1607
+ first_page.get_all_items
1608
+ end
1609
+
1610
+ #
1611
+ # Gets list of NetworkRuleSet for a Namespace.
1612
+ #
1613
+ # @param resource_group_name [String] Name of the resource group within the
1614
+ # azure subscription.
1615
+ # @param namespace_name [String] The Namespace name
1616
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1617
+ # will be added to the HTTP request.
1618
+ #
1619
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1620
+ #
1621
+ def list_network_rule_sets_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
1622
+ list_network_rule_sets_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1623
+ end
1624
+
1625
+ #
1626
+ # Gets list of NetworkRuleSet for a Namespace.
1627
+ #
1628
+ # @param resource_group_name [String] Name of the resource group within the
1629
+ # azure subscription.
1630
+ # @param namespace_name [String] The Namespace name
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_network_rule_sets_async(resource_group_name, namespace_name, custom_headers:nil)
1637
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1638
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1639
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1640
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1641
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
1642
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
1643
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1644
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1645
+
1646
+
1647
+ request_headers = {}
1648
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1649
+
1650
+ # Set Headers
1651
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1652
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1653
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets'
1654
+
1655
+ request_url = @base_url || @client.base_url
1656
+
1657
+ options = {
1658
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1659
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
1660
+ query_params: {'api-version' => @client.api_version},
1661
+ headers: request_headers.merge(custom_headers || {}),
1662
+ base_url: request_url
1663
+ }
1664
+ promise = @client.make_request_async(:get, path_template, options)
1665
+
1666
+ promise = promise.then do |result|
1667
+ http_response = result.response
1668
+ status_code = http_response.status
1669
+ response_content = http_response.body
1670
+ unless status_code == 200
1671
+ error_model = JSON.load(response_content)
1672
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1673
+ end
1674
+
1675
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1676
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1677
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1678
+ # Deserialize Response
1679
+ if status_code == 200
1680
+ begin
1681
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1682
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::NetworkRuleSetListResult.mapper()
1683
+ result.body = @client.deserialize(result_mapper, parsed_response)
1684
+ rescue Exception => e
1685
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1686
+ end
1687
+ end
1688
+
1689
+ result
1690
+ end
1691
+
1692
+ promise.execute
1693
+ end
1694
+
1357
1695
  #
1358
1696
  # Creates or updates a namespace. Once created, this namespace's resource
1359
1697
  # manifest is immutable. This operation is idempotent.
@@ -1450,6 +1788,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
1450
1788
  end
1451
1789
 
1452
1790
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1791
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1792
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1453
1793
  # Deserialize Response
1454
1794
  if status_code == 201
1455
1795
  begin
@@ -1561,6 +1901,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
1561
1901
  end
1562
1902
 
1563
1903
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1904
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1905
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1564
1906
 
1565
1907
  result
1566
1908
  end
@@ -1642,6 +1984,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
1642
1984
  end
1643
1985
 
1644
1986
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1987
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1988
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1645
1989
  # Deserialize Response
1646
1990
  if status_code == 200
1647
1991
  begin
@@ -1730,6 +2074,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
1730
2074
  end
1731
2075
 
1732
2076
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2077
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2078
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1733
2079
  # Deserialize Response
1734
2080
  if status_code == 200
1735
2081
  begin
@@ -1818,6 +2164,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
1818
2164
  end
1819
2165
 
1820
2166
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2167
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2168
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1821
2169
  # Deserialize Response
1822
2170
  if status_code == 200
1823
2171
  begin
@@ -1835,6 +2183,96 @@ module Azure::EventHub::Mgmt::V2017_04_01
1835
2183
  promise.execute
1836
2184
  end
1837
2185
 
2186
+ #
2187
+ # Gets list of NetworkRuleSet for a Namespace.
2188
+ #
2189
+ # @param next_page_link [String] The NextLink from the previous successful call
2190
+ # to List operation.
2191
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2192
+ # will be added to the HTTP request.
2193
+ #
2194
+ # @return [NetworkRuleSetListResult] operation results.
2195
+ #
2196
+ def list_network_rule_sets_next(next_page_link, custom_headers:nil)
2197
+ response = list_network_rule_sets_next_async(next_page_link, custom_headers:custom_headers).value!
2198
+ response.body unless response.nil?
2199
+ end
2200
+
2201
+ #
2202
+ # Gets list of NetworkRuleSet for a Namespace.
2203
+ #
2204
+ # @param next_page_link [String] The NextLink from the previous successful call
2205
+ # to List operation.
2206
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2207
+ # will be added to the HTTP request.
2208
+ #
2209
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2210
+ #
2211
+ def list_network_rule_sets_next_with_http_info(next_page_link, custom_headers:nil)
2212
+ list_network_rule_sets_next_async(next_page_link, custom_headers:custom_headers).value!
2213
+ end
2214
+
2215
+ #
2216
+ # Gets list of NetworkRuleSet for a Namespace.
2217
+ #
2218
+ # @param next_page_link [String] The NextLink from the previous successful call
2219
+ # to List operation.
2220
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2221
+ # to the HTTP request.
2222
+ #
2223
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2224
+ #
2225
+ def list_network_rule_sets_next_async(next_page_link, custom_headers:nil)
2226
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2227
+
2228
+
2229
+ request_headers = {}
2230
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2231
+
2232
+ # Set Headers
2233
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2234
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2235
+ path_template = '{nextLink}'
2236
+
2237
+ request_url = @base_url || @client.base_url
2238
+
2239
+ options = {
2240
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2241
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2242
+ headers: request_headers.merge(custom_headers || {}),
2243
+ base_url: request_url
2244
+ }
2245
+ promise = @client.make_request_async(:get, path_template, options)
2246
+
2247
+ promise = promise.then do |result|
2248
+ http_response = result.response
2249
+ status_code = http_response.status
2250
+ response_content = http_response.body
2251
+ unless status_code == 200
2252
+ error_model = JSON.load(response_content)
2253
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2254
+ end
2255
+
2256
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2257
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2258
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2259
+ # Deserialize Response
2260
+ if status_code == 200
2261
+ begin
2262
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2263
+ result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::NetworkRuleSetListResult.mapper()
2264
+ result.body = @client.deserialize(result_mapper, parsed_response)
2265
+ rescue Exception => e
2266
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2267
+ end
2268
+ end
2269
+
2270
+ result
2271
+ end
2272
+
2273
+ promise.execute
2274
+ end
2275
+
1838
2276
  #
1839
2277
  # Lists all the available Namespaces within a subscription, irrespective of the
1840
2278
  # resource groups.
@@ -1901,5 +2339,28 @@ module Azure::EventHub::Mgmt::V2017_04_01
1901
2339
  end
1902
2340
  end
1903
2341
 
2342
+ #
2343
+ # Gets list of NetworkRuleSet for a Namespace.
2344
+ #
2345
+ # @param resource_group_name [String] Name of the resource group within the
2346
+ # azure subscription.
2347
+ # @param namespace_name [String] The Namespace name
2348
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2349
+ # will be added to the HTTP request.
2350
+ #
2351
+ # @return [NetworkRuleSetListResult] which provide lazy access to pages of the
2352
+ # response.
2353
+ #
2354
+ def list_network_rule_sets_as_lazy(resource_group_name, namespace_name, custom_headers:nil)
2355
+ response = list_network_rule_sets_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
2356
+ unless response.nil?
2357
+ page = response.body
2358
+ page.next_method = Proc.new do |next_page_link|
2359
+ list_network_rule_sets_next_async(next_page_link, custom_headers:custom_headers)
2360
+ end
2361
+ page
2362
+ end
2363
+ end
2364
+
1904
2365
  end
1905
2366
  end