azure_mgmt_event_hub 0.17.1 → 0.18.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) 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/{2018-01-01-preview/generated/azure_mgmt_event_hub/event_hub2018preview_management_client.rb → 2014-09-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb} +14 -14
  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/{2017-04-01/generated/azure_mgmt_event_hub/models/messaging_plan.rb → 2014-09-01/generated/azure_mgmt_event_hub/models/consumer_group_resource.rb} +26 -43
  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/{2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb → 2014-09-01/generated/azure_mgmt_event_hub/models/namespace_list_result.rb} +13 -12
  18. data/lib/{2017-04-01/generated/azure_mgmt_event_hub/models/ehnamespace.rb → 2014-09-01/generated/azure_mgmt_event_hub/models/namespace_resource.rb} +31 -38
  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/{2018-01-01-preview → 2014-09-01}/generated/azure_mgmt_event_hub/models/operation.rb +1 -1
  22. data/lib/{2018-01-01-preview → 2014-09-01}/generated/azure_mgmt_event_hub/models/operation_display.rb +1 -1
  23. data/lib/{2018-01-01-preview → 2014-09-01}/generated/azure_mgmt_event_hub/models/operation_list_result.rb +2 -2
  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/{2017-04-01 → 2014-09-01}/generated/azure_mgmt_event_hub/models/sku.rb +6 -11
  30. data/lib/{2017-04-01 → 2014-09-01}/generated/azure_mgmt_event_hub/models/sku_name.rb +1 -1
  31. data/lib/{2017-04-01 → 2014-09-01}/generated/azure_mgmt_event_hub/models/sku_tier.rb +2 -1
  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/{2018-01-01-preview → 2014-09-01}/generated/azure_mgmt_event_hub/operations.rb +11 -8
  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/shared_access_authorization_rule_list_result.rb +1 -1
  45. data/lib/2015-08-01/generated/azure_mgmt_event_hub/namespaces.rb +32 -0
  46. data/lib/2015-08-01/generated/azure_mgmt_event_hub/operations.rb +4 -0
  47. data/lib/2017-04-01/generated/azure_mgmt_event_hub.rb +16 -22
  48. data/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb +15 -1
  49. data/lib/2017-04-01/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb +263 -239
  50. data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +5 -5
  51. data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hubs.rb +302 -263
  52. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb +1 -1
  53. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery_list_result.rb +1 -1
  54. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/authorization_rule_list_result.rb +1 -1
  55. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/capture_description.rb +11 -0
  56. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group.rb +1 -1
  57. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +1 -1
  58. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/error_response.rb +1 -1
  59. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +1 -1
  60. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions.rb +1 -1
  61. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_list_result.rb +1 -1
  62. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/messaging_regions_properties.rb +1 -2
  63. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/operation_list_result.rb +1 -1
  64. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb +1 -1
  65. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/resource.rb +4 -4
  66. data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/tracked_resource.rb +3 -3
  67. data/lib/2017-04-01/generated/azure_mgmt_event_hub/namespaces.rb +193 -1212
  68. data/lib/2017-04-01/generated/azure_mgmt_event_hub/operations.rb +4 -0
  69. data/lib/2017-04-01/generated/azure_mgmt_event_hub/regions.rb +4 -0
  70. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub.rb +35 -14
  71. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/clusters.rb +530 -29
  72. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/configuration.rb +11 -7
  73. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/event_hub_management_client.rb +149 -0
  74. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/available_cluster.rb +47 -0
  75. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/available_clusters_list.rb +56 -0
  76. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster.rb +18 -6
  77. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/cluster_list_result.rb +1 -1
  78. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/connection_state.rb +59 -0
  79. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/default_action.rb +16 -0
  80. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace.rb +36 -1
  81. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_id_container.rb +46 -0
  82. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_id_list_result.rb +56 -0
  83. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ehnamespace_list_result.rb +1 -1
  84. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/encryption.rb +70 -0
  85. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/end_point_provisioning_state.rb +20 -0
  86. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/error_response.rb +1 -1
  87. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/identity.rb +72 -0
  88. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/identity_type.rb +15 -0
  89. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/ip_filter_rule_list_result.rb +1 -1
  90. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/key_source.rb +15 -0
  91. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/key_vault_properties.rb +68 -0
  92. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/network_rule_ipaction.rb +15 -0
  93. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/network_rule_set.rb +126 -0
  94. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/nwrule_set_ip_rules.rb +58 -0
  95. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/nwrule_set_virtual_network_rules.rb +59 -0
  96. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_endpoint.rb +46 -0
  97. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_endpoint_connection.rb +100 -0
  98. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_endpoint_connection_list_result.rb +100 -0
  99. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_link_connection_status.rb +18 -0
  100. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_link_resource.rb +119 -0
  101. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/private_link_resources_list_result.rb +67 -0
  102. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/resource.rb +4 -4
  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/tracked_resource.rb +3 -3
  106. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/models/virtual_network_rule_list_result.rb +6 -6
  107. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/namespaces.rb +661 -412
  108. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/private_endpoint_connections.rb +625 -0
  109. data/lib/2018-01-01-preview/generated/azure_mgmt_event_hub/private_link_resources.rb +127 -0
  110. data/lib/azure_mgmt_event_hub.rb +3 -2
  111. data/lib/profiles/latest/modules/eventhub_profile_module.rb +254 -46
  112. data/lib/version.rb +1 -1
  113. metadata +66 -16
@@ -0,0 +1,18 @@
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
+ # Defines values for PrivateLinkConnectionStatus
10
+ #
11
+ module PrivateLinkConnectionStatus
12
+ Pending = "Pending"
13
+ Approved = "Approved"
14
+ Rejected = "Rejected"
15
+ Disconnected = "Disconnected"
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,119 @@
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
+ # Information of the private link resource.
10
+ #
11
+ class PrivateLinkResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The private link resource group id.
16
+ attr_accessor :group_id
17
+
18
+ # @return [Array<String>] The private link resource required member
19
+ # names.
20
+ attr_accessor :required_members
21
+
22
+ # @return [Array<String>] The private link resource Private link DNS zone
23
+ # name.
24
+ attr_accessor :required_zone_names
25
+
26
+ # @return [String] Fully qualified identifier of the resource.
27
+ attr_accessor :id
28
+
29
+ # @return [String] Name of the resource
30
+ attr_accessor :name
31
+
32
+ # @return [String] Type of the resource
33
+ attr_accessor :type
34
+
35
+
36
+ #
37
+ # Mapper for PrivateLinkResource class as Ruby Hash.
38
+ # This will be used for serialization/deserialization.
39
+ #
40
+ def self.mapper()
41
+ {
42
+ client_side_validation: true,
43
+ required: false,
44
+ serialized_name: 'PrivateLinkResource',
45
+ type: {
46
+ name: 'Composite',
47
+ class_name: 'PrivateLinkResource',
48
+ model_properties: {
49
+ group_id: {
50
+ client_side_validation: true,
51
+ required: false,
52
+ serialized_name: 'properties.groupId',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ },
57
+ required_members: {
58
+ client_side_validation: true,
59
+ required: false,
60
+ serialized_name: 'properties.requiredMembers',
61
+ type: {
62
+ name: 'Sequence',
63
+ element: {
64
+ client_side_validation: true,
65
+ required: false,
66
+ serialized_name: 'StringElementType',
67
+ type: {
68
+ name: 'String'
69
+ }
70
+ }
71
+ }
72
+ },
73
+ required_zone_names: {
74
+ client_side_validation: true,
75
+ required: false,
76
+ serialized_name: 'properties.requiredZoneNames',
77
+ type: {
78
+ name: 'Sequence',
79
+ element: {
80
+ client_side_validation: true,
81
+ required: false,
82
+ serialized_name: 'StringElementType',
83
+ type: {
84
+ name: 'String'
85
+ }
86
+ }
87
+ }
88
+ },
89
+ id: {
90
+ client_side_validation: true,
91
+ required: false,
92
+ serialized_name: 'id',
93
+ type: {
94
+ name: 'String'
95
+ }
96
+ },
97
+ name: {
98
+ client_side_validation: true,
99
+ required: false,
100
+ serialized_name: 'name',
101
+ type: {
102
+ name: 'String'
103
+ }
104
+ },
105
+ type: {
106
+ client_side_validation: true,
107
+ required: false,
108
+ serialized_name: 'type',
109
+ type: {
110
+ name: 'String'
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ end
117
+ end
118
+ end
119
+ end
@@ -0,0 +1,67 @@
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
+ # Result of the List private link resources operation.
10
+ #
11
+ class PrivateLinkResourcesListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<PrivateLinkResource>] A collection of private link
16
+ # resources
17
+ attr_accessor :value
18
+
19
+ # @return [String] A link for the next page of private link resources.
20
+ attr_accessor :next_link
21
+
22
+
23
+ #
24
+ # Mapper for PrivateLinkResourcesListResult 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: 'PrivateLinkResourcesListResult',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'PrivateLinkResourcesListResult',
35
+ model_properties: {
36
+ value: {
37
+ client_side_validation: true,
38
+ required: false,
39
+ serialized_name: 'value',
40
+ type: {
41
+ name: 'Sequence',
42
+ element: {
43
+ client_side_validation: true,
44
+ required: false,
45
+ serialized_name: 'PrivateLinkResourceElementType',
46
+ type: {
47
+ name: 'Composite',
48
+ class_name: 'PrivateLinkResource'
49
+ }
50
+ }
51
+ }
52
+ },
53
+ next_link: {
54
+ client_side_validation: true,
55
+ required: false,
56
+ serialized_name: 'nextLink',
57
+ type: {
58
+ name: 'String'
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ end
65
+ end
66
+ end
67
+ end
@@ -6,19 +6,19 @@
6
6
  module Azure::EventHub::Mgmt::V2018_01_01_preview
7
7
  module Models
8
8
  #
9
- # The Resource definition
9
+ # The resource definition.
10
10
  #
11
11
  class Resource
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [String] Resource Id
15
+ # @return [String] Resource ID.
16
16
  attr_accessor :id
17
17
 
18
- # @return [String] Resource name
18
+ # @return [String] Resource name.
19
19
  attr_accessor :name
20
20
 
21
- # @return [String] Resource type
21
+ # @return [String] Resource type.
22
22
  attr_accessor :type
23
23
 
24
24
 
@@ -20,7 +20,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
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::V2018_01_01_preview
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: false,
35
+ serialized_name: 'id',
36
+ type: {
37
+ name: 'String'
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ end
44
+ end
45
+ end
46
+ end
@@ -6,16 +6,16 @@
6
6
  module Azure::EventHub::Mgmt::V2018_01_01_preview
7
7
  module Models
8
8
  #
9
- # Definition of an Azure resource.
9
+ # Definition of resource.
10
10
  #
11
11
  class TrackedResource < Resource
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [String] Resource location
15
+ # @return [String] Resource location.
16
16
  attr_accessor :location
17
17
 
18
- # @return [Hash{String => String}] Resource tags
18
+ # @return [Hash{String => String}] Resource tags.
19
19
  attr_accessor :tags
20
20
 
21
21
 
@@ -13,8 +13,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
13
13
  include MsRestAzure
14
14
 
15
15
  include MsRest::JSONable
16
- # @return [Array<IpFilterRule>] Result of the List VirtualNetwork Rules
17
- # operation.
16
+ # @return [Array<VirtualNetworkRule>] Result of the List VirtualNetwork
17
+ # Rules operation.
18
18
  attr_accessor :value
19
19
 
20
20
  # @return [String] Link to the next set of results. Not empty if Value
@@ -27,12 +27,12 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
27
27
  #
28
28
  # Gets the rest of the items for the request, enabling auto-pagination.
29
29
  #
30
- # @return [Array<IpFilterRule>] operation results.
30
+ # @return [Array<VirtualNetworkRule>] operation results.
31
31
  #
32
32
  def get_all_items
33
33
  items = @value
34
34
  page = self
35
- while page.next_link != nil do
35
+ while page.next_link != nil && !page.next_link.strip.empty? do
36
36
  page = page.get_next_page
37
37
  items.concat(page.value)
38
38
  end
@@ -75,10 +75,10 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
75
75
  element: {
76
76
  client_side_validation: true,
77
77
  required: false,
78
- serialized_name: 'IpFilterRuleElementType',
78
+ serialized_name: 'VirtualNetworkRuleElementType',
79
79
  type: {
80
80
  name: 'Composite',
81
- class_name: 'IpFilterRule'
81
+ class_name: 'VirtualNetworkRule'
82
82
  }
83
83
  }
84
84
  }
@@ -19,9 +19,428 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
19
19
  @client = client
20
20
  end
21
21
 
22
- # @return [EventHub2018PreviewManagementClient] reference to the EventHub2018PreviewManagementClient
22
+ # @return [EventHubManagementClient] reference to the EventHubManagementClient
23
23
  attr_reader :client
24
24
 
25
+ #
26
+ # Gets a list of IP Filter rules for a Namespace.
27
+ #
28
+ # @param resource_group_name [String] Name of the resource group within the
29
+ # azure subscription.
30
+ # @param namespace_name [String] The Namespace name
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [Array<IpFilterRule>] operation results.
35
+ #
36
+ def list_ipfilter_rules(resource_group_name, namespace_name, custom_headers:nil)
37
+ first_page = list_ipfilter_rules_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
38
+ first_page.get_all_items
39
+ end
40
+
41
+ #
42
+ # Gets a list of IP Filter rules for a Namespace.
43
+ #
44
+ # @param resource_group_name [String] Name of the resource group within the
45
+ # azure subscription.
46
+ # @param namespace_name [String] The Namespace name
47
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
48
+ # will be added to the HTTP request.
49
+ #
50
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
+ #
52
+ def list_ipfilter_rules_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
53
+ list_ipfilter_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
54
+ end
55
+
56
+ #
57
+ # Gets a list of IP Filter rules for a Namespace.
58
+ #
59
+ # @param resource_group_name [String] Name of the resource group within the
60
+ # azure subscription.
61
+ # @param namespace_name [String] The Namespace name
62
+ # @param [Hash{String => String}] A hash of custom headers that will be added
63
+ # to the HTTP request.
64
+ #
65
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
66
+ #
67
+ def list_ipfilter_rules_async(resource_group_name, namespace_name, custom_headers:nil)
68
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
69
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
70
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
71
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
72
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
73
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
74
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
75
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
76
+
77
+
78
+ request_headers = {}
79
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
80
+
81
+ # Set Headers
82
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
83
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
84
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules'
85
+
86
+ request_url = @base_url || @client.base_url
87
+
88
+ options = {
89
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
90
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
91
+ query_params: {'api-version' => @client.api_version},
92
+ headers: request_headers.merge(custom_headers || {}),
93
+ base_url: request_url
94
+ }
95
+ promise = @client.make_request_async(:get, path_template, options)
96
+
97
+ promise = promise.then do |result|
98
+ http_response = result.response
99
+ status_code = http_response.status
100
+ response_content = http_response.body
101
+ unless status_code == 200
102
+ error_model = JSON.load(response_content)
103
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
104
+ end
105
+
106
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
107
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
108
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
109
+ # Deserialize Response
110
+ if status_code == 200
111
+ begin
112
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
113
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRuleListResult.mapper()
114
+ result.body = @client.deserialize(result_mapper, parsed_response)
115
+ rescue Exception => e
116
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
117
+ end
118
+ end
119
+
120
+ result
121
+ end
122
+
123
+ promise.execute
124
+ end
125
+
126
+ #
127
+ # Creates or updates an IpFilterRule for a Namespace.
128
+ #
129
+ # @param resource_group_name [String] Name of the resource group within the
130
+ # azure subscription.
131
+ # @param namespace_name [String] The Namespace name
132
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
133
+ # @param parameters [IpFilterRule] The Namespace IpFilterRule.
134
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
135
+ # will be added to the HTTP request.
136
+ #
137
+ # @return [IpFilterRule] operation results.
138
+ #
139
+ def create_or_update_ip_filter_rule(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:nil)
140
+ response = create_or_update_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:custom_headers).value!
141
+ response.body unless response.nil?
142
+ end
143
+
144
+ #
145
+ # Creates or updates an IpFilterRule for a Namespace.
146
+ #
147
+ # @param resource_group_name [String] Name of the resource group within the
148
+ # azure subscription.
149
+ # @param namespace_name [String] The Namespace name
150
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
151
+ # @param parameters [IpFilterRule] The Namespace IpFilterRule.
152
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
153
+ # will be added to the HTTP request.
154
+ #
155
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
156
+ #
157
+ def create_or_update_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:nil)
158
+ create_or_update_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:custom_headers).value!
159
+ end
160
+
161
+ #
162
+ # Creates or updates an IpFilterRule for a Namespace.
163
+ #
164
+ # @param resource_group_name [String] Name of the resource group within the
165
+ # azure subscription.
166
+ # @param namespace_name [String] The Namespace name
167
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
168
+ # @param parameters [IpFilterRule] The Namespace IpFilterRule.
169
+ # @param [Hash{String => String}] A hash of custom headers that will be added
170
+ # to the HTTP request.
171
+ #
172
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
173
+ #
174
+ def create_or_update_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:nil)
175
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
176
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
177
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
178
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
179
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
180
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
181
+ fail ArgumentError, 'ip_filter_rule_name is nil' if ip_filter_rule_name.nil?
182
+ fail ArgumentError, "'ip_filter_rule_name' should satisfy the constraint - 'MinLength': '1'" if !ip_filter_rule_name.nil? && ip_filter_rule_name.length < 1
183
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
184
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
185
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
186
+
187
+
188
+ request_headers = {}
189
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
190
+
191
+ # Set Headers
192
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
193
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
194
+
195
+ # Serialize Request
196
+ request_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRule.mapper()
197
+ request_content = @client.serialize(request_mapper, parameters)
198
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
199
+
200
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}'
201
+
202
+ request_url = @base_url || @client.base_url
203
+
204
+ options = {
205
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
206
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'ipFilterRuleName' => ip_filter_rule_name,'subscriptionId' => @client.subscription_id},
207
+ query_params: {'api-version' => @client.api_version},
208
+ body: request_content,
209
+ headers: request_headers.merge(custom_headers || {}),
210
+ base_url: request_url
211
+ }
212
+ promise = @client.make_request_async(:put, path_template, options)
213
+
214
+ promise = promise.then do |result|
215
+ http_response = result.response
216
+ status_code = http_response.status
217
+ response_content = http_response.body
218
+ unless status_code == 200
219
+ error_model = JSON.load(response_content)
220
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
221
+ end
222
+
223
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
224
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
225
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
226
+ # Deserialize Response
227
+ if status_code == 200
228
+ begin
229
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
230
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRule.mapper()
231
+ result.body = @client.deserialize(result_mapper, parsed_response)
232
+ rescue Exception => e
233
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
234
+ end
235
+ end
236
+
237
+ result
238
+ end
239
+
240
+ promise.execute
241
+ end
242
+
243
+ #
244
+ # Deletes an IpFilterRule for a Namespace.
245
+ #
246
+ # @param resource_group_name [String] Name of the resource group within the
247
+ # azure subscription.
248
+ # @param namespace_name [String] The Namespace name
249
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
250
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
251
+ # will be added to the HTTP request.
252
+ #
253
+ #
254
+ def delete_ip_filter_rule(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
255
+ response = delete_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
256
+ nil
257
+ end
258
+
259
+ #
260
+ # Deletes an IpFilterRule for a Namespace.
261
+ #
262
+ # @param resource_group_name [String] Name of the resource group within the
263
+ # azure subscription.
264
+ # @param namespace_name [String] The Namespace name
265
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
266
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
267
+ # will be added to the HTTP request.
268
+ #
269
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
270
+ #
271
+ def delete_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
272
+ delete_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
273
+ end
274
+
275
+ #
276
+ # Deletes an IpFilterRule for a Namespace.
277
+ #
278
+ # @param resource_group_name [String] Name of the resource group within the
279
+ # azure subscription.
280
+ # @param namespace_name [String] The Namespace name
281
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
282
+ # @param [Hash{String => String}] A hash of custom headers that will be added
283
+ # to the HTTP request.
284
+ #
285
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
286
+ #
287
+ def delete_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
288
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
289
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
290
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
291
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
292
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
293
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
294
+ fail ArgumentError, 'ip_filter_rule_name is nil' if ip_filter_rule_name.nil?
295
+ fail ArgumentError, "'ip_filter_rule_name' should satisfy the constraint - 'MinLength': '1'" if !ip_filter_rule_name.nil? && ip_filter_rule_name.length < 1
296
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
297
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
298
+
299
+
300
+ request_headers = {}
301
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
302
+
303
+ # Set Headers
304
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
305
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
306
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}'
307
+
308
+ request_url = @base_url || @client.base_url
309
+
310
+ options = {
311
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
312
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'ipFilterRuleName' => ip_filter_rule_name,'subscriptionId' => @client.subscription_id},
313
+ query_params: {'api-version' => @client.api_version},
314
+ headers: request_headers.merge(custom_headers || {}),
315
+ base_url: request_url
316
+ }
317
+ promise = @client.make_request_async(:delete, path_template, options)
318
+
319
+ promise = promise.then do |result|
320
+ http_response = result.response
321
+ status_code = http_response.status
322
+ response_content = http_response.body
323
+ unless status_code == 200 || status_code == 204
324
+ error_model = JSON.load(response_content)
325
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
326
+ end
327
+
328
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
329
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
330
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
331
+
332
+ result
333
+ end
334
+
335
+ promise.execute
336
+ end
337
+
338
+ #
339
+ # Gets an IpFilterRule for a Namespace by rule name.
340
+ #
341
+ # @param resource_group_name [String] Name of the resource group within the
342
+ # azure subscription.
343
+ # @param namespace_name [String] The Namespace name
344
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
345
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
346
+ # will be added to the HTTP request.
347
+ #
348
+ # @return [IpFilterRule] operation results.
349
+ #
350
+ def get_ip_filter_rule(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
351
+ response = get_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
352
+ response.body unless response.nil?
353
+ end
354
+
355
+ #
356
+ # Gets an IpFilterRule for a Namespace by rule name.
357
+ #
358
+ # @param resource_group_name [String] Name of the resource group within the
359
+ # azure subscription.
360
+ # @param namespace_name [String] The Namespace name
361
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
362
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
363
+ # will be added to the HTTP request.
364
+ #
365
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
366
+ #
367
+ def get_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
368
+ get_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
369
+ end
370
+
371
+ #
372
+ # Gets an IpFilterRule for a Namespace by rule name.
373
+ #
374
+ # @param resource_group_name [String] Name of the resource group within the
375
+ # azure subscription.
376
+ # @param namespace_name [String] The Namespace name
377
+ # @param ip_filter_rule_name [String] The IP Filter Rule name.
378
+ # @param [Hash{String => String}] A hash of custom headers that will be added
379
+ # to the HTTP request.
380
+ #
381
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
382
+ #
383
+ def get_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
384
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
385
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
386
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
387
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
388
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
389
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
390
+ fail ArgumentError, 'ip_filter_rule_name is nil' if ip_filter_rule_name.nil?
391
+ fail ArgumentError, "'ip_filter_rule_name' should satisfy the constraint - 'MinLength': '1'" if !ip_filter_rule_name.nil? && ip_filter_rule_name.length < 1
392
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
393
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
394
+
395
+
396
+ request_headers = {}
397
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
398
+
399
+ # Set Headers
400
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
401
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
402
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}'
403
+
404
+ request_url = @base_url || @client.base_url
405
+
406
+ options = {
407
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
408
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'ipFilterRuleName' => ip_filter_rule_name,'subscriptionId' => @client.subscription_id},
409
+ query_params: {'api-version' => @client.api_version},
410
+ headers: request_headers.merge(custom_headers || {}),
411
+ base_url: request_url
412
+ }
413
+ promise = @client.make_request_async(:get, path_template, options)
414
+
415
+ promise = promise.then do |result|
416
+ http_response = result.response
417
+ status_code = http_response.status
418
+ response_content = http_response.body
419
+ unless status_code == 200
420
+ error_model = JSON.load(response_content)
421
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
422
+ end
423
+
424
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
425
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
426
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
427
+ # Deserialize Response
428
+ if status_code == 200
429
+ begin
430
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
431
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRule.mapper()
432
+ result.body = @client.deserialize(result_mapper, parsed_response)
433
+ rescue Exception => e
434
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
435
+ end
436
+ end
437
+
438
+ result
439
+ end
440
+
441
+ promise.execute
442
+ end
443
+
25
444
  #
26
445
  # Lists all the available Namespaces within a subscription, irrespective of the
27
446
  # resource groups.
@@ -92,6 +511,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
92
511
  end
93
512
 
94
513
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
514
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
515
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
95
516
  # Deserialize Response
96
517
  if status_code == 200
97
518
  begin
@@ -113,7 +534,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
113
534
  # Lists the available Namespaces within a resource group.
114
535
  #
115
536
  # @param resource_group_name [String] Name of the resource group within the
116
- # Azure subscription.
537
+ # azure subscription.
117
538
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
118
539
  # will be added to the HTTP request.
119
540
  #
@@ -128,7 +549,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
128
549
  # Lists the available Namespaces within a resource group.
129
550
  #
130
551
  # @param resource_group_name [String] Name of the resource group within the
131
- # Azure subscription.
552
+ # azure subscription.
132
553
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
133
554
  # will be added to the HTTP request.
134
555
  #
@@ -142,7 +563,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
142
563
  # Lists the available Namespaces within a resource group.
143
564
  #
144
565
  # @param resource_group_name [String] Name of the resource group within the
145
- # Azure subscription.
566
+ # azure subscription.
146
567
  # @param [Hash{String => String}] A hash of custom headers that will be added
147
568
  # to the HTTP request.
148
569
  #
@@ -185,6 +606,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
185
606
  end
186
607
 
187
608
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
609
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
610
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
188
611
  # Deserialize Response
189
612
  if status_code == 200
190
613
  begin
@@ -207,7 +630,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
207
630
  # manifest is immutable. This operation is idempotent.
208
631
  #
209
632
  # @param resource_group_name [String] Name of the resource group within the
210
- # Azure subscription.
633
+ # azure subscription.
211
634
  # @param namespace_name [String] The Namespace name
212
635
  # @param parameters [EHNamespace] Parameters for creating a namespace resource.
213
636
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -222,7 +645,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
222
645
 
223
646
  #
224
647
  # @param resource_group_name [String] Name of the resource group within the
225
- # Azure subscription.
648
+ # azure subscription.
226
649
  # @param namespace_name [String] The Namespace name
227
650
  # @param parameters [EHNamespace] Parameters for creating a namespace resource.
228
651
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -254,7 +677,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
254
677
  # resources under the namespace.
255
678
  #
256
679
  # @param resource_group_name [String] Name of the resource group within the
257
- # Azure subscription.
680
+ # azure subscription.
258
681
  # @param namespace_name [String] The Namespace name
259
682
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
260
683
  # will be added to the HTTP request.
@@ -266,7 +689,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
266
689
 
267
690
  #
268
691
  # @param resource_group_name [String] Name of the resource group within the
269
- # Azure subscription.
692
+ # azure subscription.
270
693
  # @param namespace_name [String] The Namespace name
271
694
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
272
695
  # will be added to the HTTP request.
@@ -294,7 +717,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
294
717
  # Gets the description of the specified namespace.
295
718
  #
296
719
  # @param resource_group_name [String] Name of the resource group within the
297
- # Azure subscription.
720
+ # azure subscription.
298
721
  # @param namespace_name [String] The Namespace name
299
722
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
300
723
  # will be added to the HTTP request.
@@ -310,7 +733,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
310
733
  # Gets the description of the specified namespace.
311
734
  #
312
735
  # @param resource_group_name [String] Name of the resource group within the
313
- # Azure subscription.
736
+ # azure subscription.
314
737
  # @param namespace_name [String] The Namespace name
315
738
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
316
739
  # will be added to the HTTP request.
@@ -325,7 +748,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
325
748
  # Gets the description of the specified namespace.
326
749
  #
327
750
  # @param resource_group_name [String] Name of the resource group within the
328
- # Azure subscription.
751
+ # azure subscription.
329
752
  # @param namespace_name [String] The Namespace name
330
753
  # @param [Hash{String => String}] A hash of custom headers that will be added
331
754
  # to the HTTP request.
@@ -372,6 +795,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
372
795
  end
373
796
 
374
797
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
798
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
799
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
375
800
  # Deserialize Response
376
801
  if status_code == 200
377
802
  begin
@@ -404,7 +829,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
404
829
  # manifest is immutable. This operation is idempotent.
405
830
  #
406
831
  # @param resource_group_name [String] Name of the resource group within the
407
- # Azure subscription.
832
+ # azure subscription.
408
833
  # @param namespace_name [String] The Namespace name
409
834
  # @param parameters [EHNamespace] Parameters for updating a namespace resource.
410
835
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -422,7 +847,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
422
847
  # manifest is immutable. This operation is idempotent.
423
848
  #
424
849
  # @param resource_group_name [String] Name of the resource group within the
425
- # Azure subscription.
850
+ # azure subscription.
426
851
  # @param namespace_name [String] The Namespace name
427
852
  # @param parameters [EHNamespace] Parameters for updating a namespace resource.
428
853
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -439,7 +864,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
439
864
  # manifest is immutable. This operation is idempotent.
440
865
  #
441
866
  # @param resource_group_name [String] Name of the resource group within the
442
- # Azure subscription.
867
+ # azure subscription.
443
868
  # @param namespace_name [String] The Namespace name
444
869
  # @param parameters [EHNamespace] Parameters for updating a namespace resource.
445
870
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -489,14 +914,16 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
489
914
  http_response = result.response
490
915
  status_code = http_response.status
491
916
  response_content = http_response.body
492
- unless status_code == 201 || status_code == 200 || status_code == 202
917
+ unless status_code == 200 || status_code == 201 || status_code == 202
493
918
  error_model = JSON.load(response_content)
494
919
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
495
920
  end
496
921
 
497
922
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
923
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
924
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
498
925
  # Deserialize Response
499
- if status_code == 201
926
+ if status_code == 200
500
927
  begin
501
928
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
502
929
  result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
@@ -506,7 +933,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
506
933
  end
507
934
  end
508
935
  # Deserialize Response
509
- if status_code == 200
936
+ if status_code == 201
510
937
  begin
511
938
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
512
939
  result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
@@ -523,48 +950,48 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
523
950
  end
524
951
 
525
952
  #
526
- # Gets a list of IP Filter rules for a Namespace.
953
+ # Gets a list of VirtualNetwork rules for a Namespace.
527
954
  #
528
955
  # @param resource_group_name [String] Name of the resource group within the
529
- # Azure subscription.
956
+ # azure subscription.
530
957
  # @param namespace_name [String] The Namespace name
531
958
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
532
959
  # will be added to the HTTP request.
533
960
  #
534
- # @return [Array<IpFilterRule>] operation results.
961
+ # @return [Array<VirtualNetworkRule>] operation results.
535
962
  #
536
- def list_ipfilter_rules(resource_group_name, namespace_name, custom_headers:nil)
537
- first_page = list_ipfilter_rules_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
963
+ def list_virtual_network_rules(resource_group_name, namespace_name, custom_headers:nil)
964
+ first_page = list_virtual_network_rules_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
538
965
  first_page.get_all_items
539
966
  end
540
967
 
541
968
  #
542
- # Gets a list of IP Filter rules for a Namespace.
969
+ # Gets a list of VirtualNetwork rules for a Namespace.
543
970
  #
544
971
  # @param resource_group_name [String] Name of the resource group within the
545
- # Azure subscription.
972
+ # azure subscription.
546
973
  # @param namespace_name [String] The Namespace name
547
974
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
548
975
  # will be added to the HTTP request.
549
976
  #
550
977
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
551
978
  #
552
- def list_ipfilter_rules_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
553
- list_ipfilter_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
979
+ def list_virtual_network_rules_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
980
+ list_virtual_network_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
554
981
  end
555
982
 
556
983
  #
557
- # Gets a list of IP Filter rules for a Namespace.
984
+ # Gets a list of VirtualNetwork rules for a Namespace.
558
985
  #
559
986
  # @param resource_group_name [String] Name of the resource group within the
560
- # Azure subscription.
987
+ # azure subscription.
561
988
  # @param namespace_name [String] The Namespace name
562
989
  # @param [Hash{String => String}] A hash of custom headers that will be added
563
990
  # to the HTTP request.
564
991
  #
565
992
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
566
993
  #
567
- def list_ipfilter_rules_async(resource_group_name, namespace_name, custom_headers:nil)
994
+ def list_virtual_network_rules_async(resource_group_name, namespace_name, custom_headers:nil)
568
995
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
569
996
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
570
997
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -581,7 +1008,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
581
1008
  # Set Headers
582
1009
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
583
1010
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
584
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules'
1011
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/virtualnetworkrules'
585
1012
 
586
1013
  request_url = @base_url || @client.base_url
587
1014
 
@@ -604,126 +1031,13 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
604
1031
  end
605
1032
 
606
1033
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1034
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1035
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
607
1036
  # Deserialize Response
608
1037
  if status_code == 200
609
1038
  begin
610
1039
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
611
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRuleListResult.mapper()
612
- result.body = @client.deserialize(result_mapper, parsed_response)
613
- rescue Exception => e
614
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
615
- end
616
- end
617
-
618
- result
619
- end
620
-
621
- promise.execute
622
- end
623
-
624
- #
625
- # Creates or updates an IpFilterRule for a Namespace.
626
- #
627
- # @param resource_group_name [String] Name of the resource group within the
628
- # Azure subscription.
629
- # @param namespace_name [String] The Namespace name
630
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
631
- # @param parameters [IpFilterRule] The Namespace IpFilterRule.
632
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
633
- # will be added to the HTTP request.
634
- #
635
- # @return [IpFilterRule] operation results.
636
- #
637
- def create_or_update_ip_filter_rule(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:nil)
638
- response = create_or_update_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:custom_headers).value!
639
- response.body unless response.nil?
640
- end
641
-
642
- #
643
- # Creates or updates an IpFilterRule for a Namespace.
644
- #
645
- # @param resource_group_name [String] Name of the resource group within the
646
- # Azure subscription.
647
- # @param namespace_name [String] The Namespace name
648
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
649
- # @param parameters [IpFilterRule] The Namespace IpFilterRule.
650
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
651
- # will be added to the HTTP request.
652
- #
653
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
654
- #
655
- def create_or_update_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:nil)
656
- create_or_update_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:custom_headers).value!
657
- end
658
-
659
- #
660
- # Creates or updates an IpFilterRule for a Namespace.
661
- #
662
- # @param resource_group_name [String] Name of the resource group within the
663
- # Azure subscription.
664
- # @param namespace_name [String] The Namespace name
665
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
666
- # @param parameters [IpFilterRule] The Namespace IpFilterRule.
667
- # @param [Hash{String => String}] A hash of custom headers that will be added
668
- # to the HTTP request.
669
- #
670
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
671
- #
672
- def create_or_update_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, parameters, custom_headers:nil)
673
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
674
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
675
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
676
- fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
677
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
678
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
679
- fail ArgumentError, 'ip_filter_rule_name is nil' if ip_filter_rule_name.nil?
680
- fail ArgumentError, "'ip_filter_rule_name' should satisfy the constraint - 'MinLength': '1'" if !ip_filter_rule_name.nil? && ip_filter_rule_name.length < 1
681
- fail ArgumentError, 'parameters is nil' if parameters.nil?
682
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
683
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
684
-
685
-
686
- request_headers = {}
687
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
688
-
689
- # Set Headers
690
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
691
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
692
-
693
- # Serialize Request
694
- request_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRule.mapper()
695
- request_content = @client.serialize(request_mapper, parameters)
696
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
697
-
698
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}'
699
-
700
- request_url = @base_url || @client.base_url
701
-
702
- options = {
703
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
704
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'ipFilterRuleName' => ip_filter_rule_name,'subscriptionId' => @client.subscription_id},
705
- query_params: {'api-version' => @client.api_version},
706
- body: request_content,
707
- headers: request_headers.merge(custom_headers || {}),
708
- base_url: request_url
709
- }
710
- promise = @client.make_request_async(:put, path_template, options)
711
-
712
- promise = promise.then do |result|
713
- http_response = result.response
714
- status_code = http_response.status
715
- response_content = http_response.body
716
- unless status_code == 200
717
- error_model = JSON.load(response_content)
718
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
719
- end
720
-
721
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
722
- # Deserialize Response
723
- if status_code == 200
724
- begin
725
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
726
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRule.mapper()
1040
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::VirtualNetworkRuleListResult.mapper()
727
1041
  result.body = @client.deserialize(result_mapper, parsed_response)
728
1042
  rescue Exception => e
729
1043
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -737,154 +1051,65 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
737
1051
  end
738
1052
 
739
1053
  #
740
- # Deletes an IpFilterRule for a Namespace.
741
- #
742
- # @param resource_group_name [String] Name of the resource group within the
743
- # Azure subscription.
744
- # @param namespace_name [String] The Namespace name
745
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
746
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
747
- # will be added to the HTTP request.
748
- #
749
- #
750
- def delete_ip_filter_rule(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
751
- response = delete_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
752
- nil
753
- end
754
-
755
- #
756
- # Deletes an IpFilterRule for a Namespace.
757
- #
758
- # @param resource_group_name [String] Name of the resource group within the
759
- # Azure subscription.
760
- # @param namespace_name [String] The Namespace name
761
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
762
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
763
- # will be added to the HTTP request.
764
- #
765
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
766
- #
767
- def delete_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
768
- delete_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
769
- end
770
-
771
- #
772
- # Deletes an IpFilterRule for a Namespace.
773
- #
774
- # @param resource_group_name [String] Name of the resource group within the
775
- # Azure subscription.
776
- # @param namespace_name [String] The Namespace name
777
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
778
- # @param [Hash{String => String}] A hash of custom headers that will be added
779
- # to the HTTP request.
780
- #
781
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
782
- #
783
- def delete_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
784
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
785
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
786
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
787
- fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
788
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
789
- fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
790
- fail ArgumentError, 'ip_filter_rule_name is nil' if ip_filter_rule_name.nil?
791
- fail ArgumentError, "'ip_filter_rule_name' should satisfy the constraint - 'MinLength': '1'" if !ip_filter_rule_name.nil? && ip_filter_rule_name.length < 1
792
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
793
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
794
-
795
-
796
- request_headers = {}
797
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
798
-
799
- # Set Headers
800
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
801
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
802
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}'
803
-
804
- request_url = @base_url || @client.base_url
805
-
806
- options = {
807
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
808
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'ipFilterRuleName' => ip_filter_rule_name,'subscriptionId' => @client.subscription_id},
809
- query_params: {'api-version' => @client.api_version},
810
- headers: request_headers.merge(custom_headers || {}),
811
- base_url: request_url
812
- }
813
- promise = @client.make_request_async(:delete, path_template, options)
814
-
815
- promise = promise.then do |result|
816
- http_response = result.response
817
- status_code = http_response.status
818
- response_content = http_response.body
819
- unless status_code == 204 || status_code == 200
820
- error_model = JSON.load(response_content)
821
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
822
- end
823
-
824
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
825
-
826
- result
827
- end
828
-
829
- promise.execute
830
- end
831
-
832
- #
833
- # Gets an IpFilterRule for a Namespace by rule name.
1054
+ # Creates or updates an VirtualNetworkRule for a Namespace.
834
1055
  #
835
1056
  # @param resource_group_name [String] Name of the resource group within the
836
- # Azure subscription.
1057
+ # azure subscription.
837
1058
  # @param namespace_name [String] The Namespace name
838
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
1059
+ # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1060
+ # @param parameters [VirtualNetworkRule] The Namespace VirtualNetworkRule.
839
1061
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
840
1062
  # will be added to the HTTP request.
841
1063
  #
842
- # @return [IpFilterRule] operation results.
1064
+ # @return [VirtualNetworkRule] operation results.
843
1065
  #
844
- def get_ip_filter_rule(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
845
- response = get_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
1066
+ def create_or_update_virtual_network_rule(resource_group_name, namespace_name, virtual_network_rule_name, parameters, custom_headers:nil)
1067
+ response = create_or_update_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, parameters, custom_headers:custom_headers).value!
846
1068
  response.body unless response.nil?
847
1069
  end
848
1070
 
849
1071
  #
850
- # Gets an IpFilterRule for a Namespace by rule name.
1072
+ # Creates or updates an VirtualNetworkRule for a Namespace.
851
1073
  #
852
1074
  # @param resource_group_name [String] Name of the resource group within the
853
- # Azure subscription.
1075
+ # azure subscription.
854
1076
  # @param namespace_name [String] The Namespace name
855
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
1077
+ # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1078
+ # @param parameters [VirtualNetworkRule] The Namespace VirtualNetworkRule.
856
1079
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
857
1080
  # will be added to the HTTP request.
858
1081
  #
859
1082
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
860
1083
  #
861
- def get_ip_filter_rule_with_http_info(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
862
- get_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:custom_headers).value!
1084
+ def create_or_update_virtual_network_rule_with_http_info(resource_group_name, namespace_name, virtual_network_rule_name, parameters, custom_headers:nil)
1085
+ create_or_update_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, parameters, custom_headers:custom_headers).value!
863
1086
  end
864
1087
 
865
1088
  #
866
- # Gets an IpFilterRule for a Namespace by rule name.
1089
+ # Creates or updates an VirtualNetworkRule for a Namespace.
867
1090
  #
868
1091
  # @param resource_group_name [String] Name of the resource group within the
869
- # Azure subscription.
1092
+ # azure subscription.
870
1093
  # @param namespace_name [String] The Namespace name
871
- # @param ip_filter_rule_name [String] The IP Filter Rule name.
1094
+ # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1095
+ # @param parameters [VirtualNetworkRule] The Namespace VirtualNetworkRule.
872
1096
  # @param [Hash{String => String}] A hash of custom headers that will be added
873
1097
  # to the HTTP request.
874
1098
  #
875
1099
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
876
1100
  #
877
- def get_ip_filter_rule_async(resource_group_name, namespace_name, ip_filter_rule_name, custom_headers:nil)
1101
+ def create_or_update_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, parameters, custom_headers:nil)
878
1102
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
879
1103
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
880
1104
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
881
1105
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
882
1106
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
883
1107
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
884
- fail ArgumentError, 'ip_filter_rule_name is nil' if ip_filter_rule_name.nil?
885
- fail ArgumentError, "'ip_filter_rule_name' should satisfy the constraint - 'MinLength': '1'" if !ip_filter_rule_name.nil? && ip_filter_rule_name.length < 1
1108
+ fail ArgumentError, 'virtual_network_rule_name is nil' if virtual_network_rule_name.nil?
1109
+ fail ArgumentError, "'virtual_network_rule_name' should satisfy the constraint - 'MinLength': '1'" if !virtual_network_rule_name.nil? && virtual_network_rule_name.length < 1
886
1110
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
887
1111
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1112
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
888
1113
 
889
1114
 
890
1115
  request_headers = {}
@@ -893,18 +1118,25 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
893
1118
  # Set Headers
894
1119
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
895
1120
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
896
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}'
1121
+
1122
+ # Serialize Request
1123
+ request_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::VirtualNetworkRule.mapper()
1124
+ request_content = @client.serialize(request_mapper, parameters)
1125
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1126
+
1127
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/virtualnetworkrules/{virtualNetworkRuleName}'
897
1128
 
898
1129
  request_url = @base_url || @client.base_url
899
1130
 
900
1131
  options = {
901
1132
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
902
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'ipFilterRuleName' => ip_filter_rule_name,'subscriptionId' => @client.subscription_id},
1133
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'virtualNetworkRuleName' => virtual_network_rule_name,'subscriptionId' => @client.subscription_id},
903
1134
  query_params: {'api-version' => @client.api_version},
1135
+ body: request_content,
904
1136
  headers: request_headers.merge(custom_headers || {}),
905
1137
  base_url: request_url
906
1138
  }
907
- promise = @client.make_request_async(:get, path_template, options)
1139
+ promise = @client.make_request_async(:put, path_template, options)
908
1140
 
909
1141
  promise = promise.then do |result|
910
1142
  http_response = result.response
@@ -916,11 +1148,13 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
916
1148
  end
917
1149
 
918
1150
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1151
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1152
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
919
1153
  # Deserialize Response
920
1154
  if status_code == 200
921
1155
  begin
922
1156
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
923
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRule.mapper()
1157
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::VirtualNetworkRule.mapper()
924
1158
  result.body = @client.deserialize(result_mapper, parsed_response)
925
1159
  rescue Exception => e
926
1160
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -934,54 +1168,58 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
934
1168
  end
935
1169
 
936
1170
  #
937
- # Gets a list of VirtualNetwork rules for a Namespace.
1171
+ # Deletes an VirtualNetworkRule for a Namespace.
938
1172
  #
939
1173
  # @param resource_group_name [String] Name of the resource group within the
940
- # Azure subscription.
1174
+ # azure subscription.
941
1175
  # @param namespace_name [String] The Namespace name
1176
+ # @param virtual_network_rule_name [String] The Virtual Network Rule name.
942
1177
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
943
1178
  # will be added to the HTTP request.
944
1179
  #
945
- # @return [Array<IpFilterRule>] operation results.
946
1180
  #
947
- def list_virtual_network_rules(resource_group_name, namespace_name, custom_headers:nil)
948
- first_page = list_virtual_network_rules_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
949
- first_page.get_all_items
1181
+ def delete_virtual_network_rule(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
1182
+ response = delete_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:custom_headers).value!
1183
+ nil
950
1184
  end
951
1185
 
952
1186
  #
953
- # Gets a list of VirtualNetwork rules for a Namespace.
1187
+ # Deletes an VirtualNetworkRule for a Namespace.
954
1188
  #
955
1189
  # @param resource_group_name [String] Name of the resource group within the
956
- # Azure subscription.
1190
+ # azure subscription.
957
1191
  # @param namespace_name [String] The Namespace name
1192
+ # @param virtual_network_rule_name [String] The Virtual Network Rule name.
958
1193
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
959
1194
  # will be added to the HTTP request.
960
1195
  #
961
1196
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
962
1197
  #
963
- def list_virtual_network_rules_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
964
- list_virtual_network_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1198
+ def delete_virtual_network_rule_with_http_info(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
1199
+ delete_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:custom_headers).value!
965
1200
  end
966
1201
 
967
1202
  #
968
- # Gets a list of VirtualNetwork rules for a Namespace.
1203
+ # Deletes an VirtualNetworkRule for a Namespace.
969
1204
  #
970
1205
  # @param resource_group_name [String] Name of the resource group within the
971
- # Azure subscription.
1206
+ # azure subscription.
972
1207
  # @param namespace_name [String] The Namespace name
1208
+ # @param virtual_network_rule_name [String] The Virtual Network Rule name.
973
1209
  # @param [Hash{String => String}] A hash of custom headers that will be added
974
1210
  # to the HTTP request.
975
1211
  #
976
1212
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
977
1213
  #
978
- def list_virtual_network_rules_async(resource_group_name, namespace_name, custom_headers:nil)
1214
+ def delete_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
979
1215
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
980
1216
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
981
1217
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
982
1218
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
983
1219
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
984
1220
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
1221
+ fail ArgumentError, 'virtual_network_rule_name is nil' if virtual_network_rule_name.nil?
1222
+ fail ArgumentError, "'virtual_network_rule_name' should satisfy the constraint - 'MinLength': '1'" if !virtual_network_rule_name.nil? && virtual_network_rule_name.length < 1
985
1223
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
986
1224
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
987
1225
 
@@ -992,39 +1230,31 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
992
1230
  # Set Headers
993
1231
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
994
1232
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
995
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/virtualnetworkrules'
1233
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/virtualnetworkrules/{virtualNetworkRuleName}'
996
1234
 
997
1235
  request_url = @base_url || @client.base_url
998
1236
 
999
1237
  options = {
1000
1238
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1001
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
1239
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'virtualNetworkRuleName' => virtual_network_rule_name,'subscriptionId' => @client.subscription_id},
1002
1240
  query_params: {'api-version' => @client.api_version},
1003
1241
  headers: request_headers.merge(custom_headers || {}),
1004
1242
  base_url: request_url
1005
1243
  }
1006
- promise = @client.make_request_async(:get, path_template, options)
1244
+ promise = @client.make_request_async(:delete, path_template, options)
1007
1245
 
1008
1246
  promise = promise.then do |result|
1009
1247
  http_response = result.response
1010
1248
  status_code = http_response.status
1011
1249
  response_content = http_response.body
1012
- unless status_code == 200
1250
+ unless status_code == 200 || status_code == 204
1013
1251
  error_model = JSON.load(response_content)
1014
1252
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1015
1253
  end
1016
1254
 
1017
1255
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1018
- # Deserialize Response
1019
- if status_code == 200
1020
- begin
1021
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1022
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::VirtualNetworkRuleListResult.mapper()
1023
- result.body = @client.deserialize(result_mapper, parsed_response)
1024
- rescue Exception => e
1025
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1026
- end
1027
- end
1256
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1257
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1028
1258
 
1029
1259
  result
1030
1260
  end
@@ -1033,54 +1263,51 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1033
1263
  end
1034
1264
 
1035
1265
  #
1036
- # Creates or updates an VirtualNetworkRule for a Namespace.
1266
+ # Gets an VirtualNetworkRule for a Namespace by rule name.
1037
1267
  #
1038
1268
  # @param resource_group_name [String] Name of the resource group within the
1039
- # Azure subscription.
1269
+ # azure subscription.
1040
1270
  # @param namespace_name [String] The Namespace name
1041
1271
  # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1042
- # @param parameters [VirtualNetworkRule] The Namespace VirtualNetworkRule.
1043
1272
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1044
1273
  # will be added to the HTTP request.
1045
1274
  #
1046
1275
  # @return [VirtualNetworkRule] operation results.
1047
1276
  #
1048
- def create_or_update_virtual_network_rule(resource_group_name, namespace_name, virtual_network_rule_name, parameters, custom_headers:nil)
1049
- response = create_or_update_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, parameters, custom_headers:custom_headers).value!
1277
+ def get_virtual_network_rule(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
1278
+ response = get_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:custom_headers).value!
1050
1279
  response.body unless response.nil?
1051
1280
  end
1052
1281
 
1053
1282
  #
1054
- # Creates or updates an VirtualNetworkRule for a Namespace.
1283
+ # Gets an VirtualNetworkRule for a Namespace by rule name.
1055
1284
  #
1056
1285
  # @param resource_group_name [String] Name of the resource group within the
1057
- # Azure subscription.
1286
+ # azure subscription.
1058
1287
  # @param namespace_name [String] The Namespace name
1059
1288
  # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1060
- # @param parameters [VirtualNetworkRule] The Namespace VirtualNetworkRule.
1061
1289
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1062
1290
  # will be added to the HTTP request.
1063
1291
  #
1064
1292
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1065
1293
  #
1066
- def create_or_update_virtual_network_rule_with_http_info(resource_group_name, namespace_name, virtual_network_rule_name, parameters, custom_headers:nil)
1067
- create_or_update_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, parameters, custom_headers:custom_headers).value!
1294
+ def get_virtual_network_rule_with_http_info(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
1295
+ get_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:custom_headers).value!
1068
1296
  end
1069
1297
 
1070
1298
  #
1071
- # Creates or updates an VirtualNetworkRule for a Namespace.
1299
+ # Gets an VirtualNetworkRule for a Namespace by rule name.
1072
1300
  #
1073
1301
  # @param resource_group_name [String] Name of the resource group within the
1074
- # Azure subscription.
1302
+ # azure subscription.
1075
1303
  # @param namespace_name [String] The Namespace name
1076
1304
  # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1077
- # @param parameters [VirtualNetworkRule] The Namespace VirtualNetworkRule.
1078
1305
  # @param [Hash{String => String}] A hash of custom headers that will be added
1079
1306
  # to the HTTP request.
1080
1307
  #
1081
1308
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1082
1309
  #
1083
- def create_or_update_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, parameters, custom_headers:nil)
1310
+ def get_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
1084
1311
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1085
1312
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1086
1313
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -1089,7 +1316,6 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1089
1316
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
1090
1317
  fail ArgumentError, 'virtual_network_rule_name is nil' if virtual_network_rule_name.nil?
1091
1318
  fail ArgumentError, "'virtual_network_rule_name' should satisfy the constraint - 'MinLength': '1'" if !virtual_network_rule_name.nil? && virtual_network_rule_name.length < 1
1092
- fail ArgumentError, 'parameters is nil' if parameters.nil?
1093
1319
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1094
1320
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1095
1321
 
@@ -1100,12 +1326,6 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1100
1326
  # Set Headers
1101
1327
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1102
1328
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1103
-
1104
- # Serialize Request
1105
- request_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::VirtualNetworkRule.mapper()
1106
- request_content = @client.serialize(request_mapper, parameters)
1107
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1108
-
1109
1329
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/virtualnetworkrules/{virtualNetworkRuleName}'
1110
1330
 
1111
1331
  request_url = @base_url || @client.base_url
@@ -1114,11 +1334,10 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1114
1334
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1115
1335
  path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'virtualNetworkRuleName' => virtual_network_rule_name,'subscriptionId' => @client.subscription_id},
1116
1336
  query_params: {'api-version' => @client.api_version},
1117
- body: request_content,
1118
1337
  headers: request_headers.merge(custom_headers || {}),
1119
1338
  base_url: request_url
1120
1339
  }
1121
- promise = @client.make_request_async(:put, path_template, options)
1340
+ promise = @client.make_request_async(:get, path_template, options)
1122
1341
 
1123
1342
  promise = promise.then do |result|
1124
1343
  http_response = result.response
@@ -1130,6 +1349,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1130
1349
  end
1131
1350
 
1132
1351
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1352
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1353
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1133
1354
  # Deserialize Response
1134
1355
  if status_code == 200
1135
1356
  begin
@@ -1148,60 +1369,60 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1148
1369
  end
1149
1370
 
1150
1371
  #
1151
- # Deletes an VirtualNetworkRule for a Namespace.
1372
+ # Create or update NetworkRuleSet for a Namespace.
1152
1373
  #
1153
1374
  # @param resource_group_name [String] Name of the resource group within the
1154
- # Azure subscription.
1375
+ # azure subscription.
1155
1376
  # @param namespace_name [String] The Namespace name
1156
- # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1377
+ # @param parameters [NetworkRuleSet] The Namespace IpFilterRule.
1157
1378
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1158
1379
  # will be added to the HTTP request.
1159
1380
  #
1381
+ # @return [NetworkRuleSet] operation results.
1160
1382
  #
1161
- def delete_virtual_network_rule(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
1162
- response = delete_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:custom_headers).value!
1163
- nil
1383
+ def create_or_update_network_rule_set(resource_group_name, namespace_name, parameters, custom_headers:nil)
1384
+ response = create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
1385
+ response.body unless response.nil?
1164
1386
  end
1165
1387
 
1166
1388
  #
1167
- # Deletes an VirtualNetworkRule for a Namespace.
1389
+ # Create or update NetworkRuleSet for a Namespace.
1168
1390
  #
1169
1391
  # @param resource_group_name [String] Name of the resource group within the
1170
- # Azure subscription.
1392
+ # azure subscription.
1171
1393
  # @param namespace_name [String] The Namespace name
1172
- # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1394
+ # @param parameters [NetworkRuleSet] The Namespace IpFilterRule.
1173
1395
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1174
1396
  # will be added to the HTTP request.
1175
1397
  #
1176
1398
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1177
1399
  #
1178
- def delete_virtual_network_rule_with_http_info(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
1179
- delete_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:custom_headers).value!
1400
+ def create_or_update_network_rule_set_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
1401
+ create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
1180
1402
  end
1181
1403
 
1182
1404
  #
1183
- # Deletes an VirtualNetworkRule for a Namespace.
1405
+ # Create or update NetworkRuleSet for a Namespace.
1184
1406
  #
1185
1407
  # @param resource_group_name [String] Name of the resource group within the
1186
- # Azure subscription.
1408
+ # azure subscription.
1187
1409
  # @param namespace_name [String] The Namespace name
1188
- # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1410
+ # @param parameters [NetworkRuleSet] The Namespace IpFilterRule.
1189
1411
  # @param [Hash{String => String}] A hash of custom headers that will be added
1190
1412
  # to the HTTP request.
1191
1413
  #
1192
1414
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1193
1415
  #
1194
- def delete_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
1416
+ def create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
1195
1417
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1196
1418
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1197
1419
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1198
1420
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1199
1421
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
1200
1422
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
1201
- fail ArgumentError, 'virtual_network_rule_name is nil' if virtual_network_rule_name.nil?
1202
- fail ArgumentError, "'virtual_network_rule_name' should satisfy the constraint - 'MinLength': '1'" if !virtual_network_rule_name.nil? && virtual_network_rule_name.length < 1
1203
1423
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1204
1424
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1425
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1205
1426
 
1206
1427
 
1207
1428
  request_headers = {}
@@ -1210,29 +1431,48 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1210
1431
  # Set Headers
1211
1432
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1212
1433
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1213
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/virtualnetworkrules/{virtualNetworkRuleName}'
1434
+
1435
+ # Serialize Request
1436
+ request_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::NetworkRuleSet.mapper()
1437
+ request_content = @client.serialize(request_mapper, parameters)
1438
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1439
+
1440
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default'
1214
1441
 
1215
1442
  request_url = @base_url || @client.base_url
1216
1443
 
1217
1444
  options = {
1218
1445
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1219
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'virtualNetworkRuleName' => virtual_network_rule_name,'subscriptionId' => @client.subscription_id},
1446
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
1220
1447
  query_params: {'api-version' => @client.api_version},
1448
+ body: request_content,
1221
1449
  headers: request_headers.merge(custom_headers || {}),
1222
1450
  base_url: request_url
1223
1451
  }
1224
- promise = @client.make_request_async(:delete, path_template, options)
1452
+ promise = @client.make_request_async(:put, path_template, options)
1225
1453
 
1226
1454
  promise = promise.then do |result|
1227
1455
  http_response = result.response
1228
1456
  status_code = http_response.status
1229
1457
  response_content = http_response.body
1230
- unless status_code == 204 || status_code == 200
1458
+ unless status_code == 200
1231
1459
  error_model = JSON.load(response_content)
1232
1460
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1233
1461
  end
1234
1462
 
1235
1463
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1464
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1465
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1466
+ # Deserialize Response
1467
+ if status_code == 200
1468
+ begin
1469
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1470
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::NetworkRuleSet.mapper()
1471
+ result.body = @client.deserialize(result_mapper, parsed_response)
1472
+ rescue Exception => e
1473
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1474
+ end
1475
+ end
1236
1476
 
1237
1477
  result
1238
1478
  end
@@ -1241,59 +1481,54 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1241
1481
  end
1242
1482
 
1243
1483
  #
1244
- # Gets an VirtualNetworkRule for a Namespace by rule name.
1484
+ # Gets NetworkRuleSet for a Namespace.
1245
1485
  #
1246
1486
  # @param resource_group_name [String] Name of the resource group within the
1247
- # Azure subscription.
1487
+ # azure subscription.
1248
1488
  # @param namespace_name [String] The Namespace name
1249
- # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1250
1489
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1251
1490
  # will be added to the HTTP request.
1252
1491
  #
1253
- # @return [VirtualNetworkRule] operation results.
1492
+ # @return [NetworkRuleSet] operation results.
1254
1493
  #
1255
- def get_virtual_network_rule(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
1256
- response = get_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:custom_headers).value!
1494
+ def get_network_rule_set(resource_group_name, namespace_name, custom_headers:nil)
1495
+ response = get_network_rule_set_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1257
1496
  response.body unless response.nil?
1258
1497
  end
1259
1498
 
1260
1499
  #
1261
- # Gets an VirtualNetworkRule for a Namespace by rule name.
1500
+ # Gets NetworkRuleSet for a Namespace.
1262
1501
  #
1263
1502
  # @param resource_group_name [String] Name of the resource group within the
1264
- # Azure subscription.
1503
+ # azure subscription.
1265
1504
  # @param namespace_name [String] The Namespace name
1266
- # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1267
1505
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1268
1506
  # will be added to the HTTP request.
1269
1507
  #
1270
1508
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1271
1509
  #
1272
- def get_virtual_network_rule_with_http_info(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
1273
- get_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:custom_headers).value!
1510
+ def get_network_rule_set_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
1511
+ get_network_rule_set_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1274
1512
  end
1275
1513
 
1276
1514
  #
1277
- # Gets an VirtualNetworkRule for a Namespace by rule name.
1515
+ # Gets NetworkRuleSet for a Namespace.
1278
1516
  #
1279
1517
  # @param resource_group_name [String] Name of the resource group within the
1280
- # Azure subscription.
1518
+ # azure subscription.
1281
1519
  # @param namespace_name [String] The Namespace name
1282
- # @param virtual_network_rule_name [String] The Virtual Network Rule name.
1283
1520
  # @param [Hash{String => String}] A hash of custom headers that will be added
1284
1521
  # to the HTTP request.
1285
1522
  #
1286
1523
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1287
1524
  #
1288
- def get_virtual_network_rule_async(resource_group_name, namespace_name, virtual_network_rule_name, custom_headers:nil)
1525
+ def get_network_rule_set_async(resource_group_name, namespace_name, custom_headers:nil)
1289
1526
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1290
1527
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1291
1528
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1292
1529
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1293
1530
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
1294
1531
  fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
1295
- fail ArgumentError, 'virtual_network_rule_name is nil' if virtual_network_rule_name.nil?
1296
- fail ArgumentError, "'virtual_network_rule_name' should satisfy the constraint - 'MinLength': '1'" if !virtual_network_rule_name.nil? && virtual_network_rule_name.length < 1
1297
1532
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1298
1533
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1299
1534
 
@@ -1304,13 +1539,13 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1304
1539
  # Set Headers
1305
1540
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1306
1541
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1307
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/virtualnetworkrules/{virtualNetworkRuleName}'
1542
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default'
1308
1543
 
1309
1544
  request_url = @base_url || @client.base_url
1310
1545
 
1311
1546
  options = {
1312
1547
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1313
- path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'virtualNetworkRuleName' => virtual_network_rule_name,'subscriptionId' => @client.subscription_id},
1548
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
1314
1549
  query_params: {'api-version' => @client.api_version},
1315
1550
  headers: request_headers.merge(custom_headers || {}),
1316
1551
  base_url: request_url
@@ -1327,11 +1562,13 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1327
1562
  end
1328
1563
 
1329
1564
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1565
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1566
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1330
1567
  # Deserialize Response
1331
1568
  if status_code == 200
1332
1569
  begin
1333
1570
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1334
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::VirtualNetworkRule.mapper()
1571
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::NetworkRuleSet.mapper()
1335
1572
  result.body = @client.deserialize(result_mapper, parsed_response)
1336
1573
  rescue Exception => e
1337
1574
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1349,7 +1586,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1349
1586
  # manifest is immutable. This operation is idempotent.
1350
1587
  #
1351
1588
  # @param resource_group_name [String] Name of the resource group within the
1352
- # Azure subscription.
1589
+ # azure subscription.
1353
1590
  # @param namespace_name [String] The Namespace name
1354
1591
  # @param parameters [EHNamespace] Parameters for creating a namespace resource.
1355
1592
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -1367,7 +1604,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1367
1604
  # manifest is immutable. This operation is idempotent.
1368
1605
  #
1369
1606
  # @param resource_group_name [String] Name of the resource group within the
1370
- # Azure subscription.
1607
+ # azure subscription.
1371
1608
  # @param namespace_name [String] The Namespace name
1372
1609
  # @param parameters [EHNamespace] Parameters for creating a namespace resource.
1373
1610
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -1384,7 +1621,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1384
1621
  # manifest is immutable. This operation is idempotent.
1385
1622
  #
1386
1623
  # @param resource_group_name [String] Name of the resource group within the
1387
- # Azure subscription.
1624
+ # azure subscription.
1388
1625
  # @param namespace_name [String] The Namespace name
1389
1626
  # @param parameters [EHNamespace] Parameters for creating a namespace resource.
1390
1627
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -1434,14 +1671,16 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1434
1671
  http_response = result.response
1435
1672
  status_code = http_response.status
1436
1673
  response_content = http_response.body
1437
- unless status_code == 201 || status_code == 200 || status_code == 202
1674
+ unless status_code == 200 || status_code == 201 || status_code == 202
1438
1675
  error_model = JSON.load(response_content)
1439
1676
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1440
1677
  end
1441
1678
 
1442
1679
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1680
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1681
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1443
1682
  # Deserialize Response
1444
- if status_code == 201
1683
+ if status_code == 200
1445
1684
  begin
1446
1685
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1447
1686
  result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
@@ -1451,7 +1690,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1451
1690
  end
1452
1691
  end
1453
1692
  # Deserialize Response
1454
- if status_code == 200
1693
+ if status_code == 201
1455
1694
  begin
1456
1695
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1457
1696
  result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespace.mapper()
@@ -1472,7 +1711,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1472
1711
  # resources under the namespace.
1473
1712
  #
1474
1713
  # @param resource_group_name [String] Name of the resource group within the
1475
- # Azure subscription.
1714
+ # azure subscription.
1476
1715
  # @param namespace_name [String] The Namespace name
1477
1716
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1478
1717
  # will be added to the HTTP request.
@@ -1488,7 +1727,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1488
1727
  # resources under the namespace.
1489
1728
  #
1490
1729
  # @param resource_group_name [String] Name of the resource group within the
1491
- # Azure subscription.
1730
+ # azure subscription.
1492
1731
  # @param namespace_name [String] The Namespace name
1493
1732
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1494
1733
  # will be added to the HTTP request.
@@ -1504,7 +1743,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1504
1743
  # resources under the namespace.
1505
1744
  #
1506
1745
  # @param resource_group_name [String] Name of the resource group within the
1507
- # Azure subscription.
1746
+ # azure subscription.
1508
1747
  # @param namespace_name [String] The Namespace name
1509
1748
  # @param [Hash{String => String}] A hash of custom headers that will be added
1510
1749
  # to the HTTP request.
@@ -1545,12 +1784,14 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1545
1784
  http_response = result.response
1546
1785
  status_code = http_response.status
1547
1786
  response_content = http_response.body
1548
- unless status_code == 204 || status_code == 200 || status_code == 202
1787
+ unless status_code == 200 || status_code == 202 || status_code == 204
1549
1788
  error_model = JSON.load(response_content)
1550
1789
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1551
1790
  end
1552
1791
 
1553
1792
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1793
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1794
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1554
1795
 
1555
1796
  result
1556
1797
  end
@@ -1559,24 +1800,22 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1559
1800
  end
1560
1801
 
1561
1802
  #
1562
- # Lists all the available Namespaces within a subscription, irrespective of the
1563
- # resource groups.
1803
+ # Gets a list of IP Filter rules for a Namespace.
1564
1804
  #
1565
1805
  # @param next_page_link [String] The NextLink from the previous successful call
1566
1806
  # to List operation.
1567
1807
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1568
1808
  # will be added to the HTTP request.
1569
1809
  #
1570
- # @return [EHNamespaceListResult] operation results.
1810
+ # @return [IpFilterRuleListResult] operation results.
1571
1811
  #
1572
- def list_next(next_page_link, custom_headers:nil)
1573
- response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1812
+ def list_ipfilter_rules_next(next_page_link, custom_headers:nil)
1813
+ response = list_ipfilter_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1574
1814
  response.body unless response.nil?
1575
1815
  end
1576
1816
 
1577
1817
  #
1578
- # Lists all the available Namespaces within a subscription, irrespective of the
1579
- # resource groups.
1818
+ # Gets a list of IP Filter rules for a Namespace.
1580
1819
  #
1581
1820
  # @param next_page_link [String] The NextLink from the previous successful call
1582
1821
  # to List operation.
@@ -1585,13 +1824,12 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1585
1824
  #
1586
1825
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1587
1826
  #
1588
- def list_next_with_http_info(next_page_link, custom_headers:nil)
1589
- list_next_async(next_page_link, custom_headers:custom_headers).value!
1827
+ def list_ipfilter_rules_next_with_http_info(next_page_link, custom_headers:nil)
1828
+ list_ipfilter_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1590
1829
  end
1591
1830
 
1592
1831
  #
1593
- # Lists all the available Namespaces within a subscription, irrespective of the
1594
- # resource groups.
1832
+ # Gets a list of IP Filter rules for a Namespace.
1595
1833
  #
1596
1834
  # @param next_page_link [String] The NextLink from the previous successful call
1597
1835
  # to List operation.
@@ -1600,7 +1838,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1600
1838
  #
1601
1839
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1602
1840
  #
1603
- def list_next_async(next_page_link, custom_headers:nil)
1841
+ def list_ipfilter_rules_next_async(next_page_link, custom_headers:nil)
1604
1842
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1605
1843
 
1606
1844
 
@@ -1632,11 +1870,13 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1632
1870
  end
1633
1871
 
1634
1872
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1873
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1874
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1635
1875
  # Deserialize Response
1636
1876
  if status_code == 200
1637
1877
  begin
1638
1878
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1639
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespaceListResult.mapper()
1879
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRuleListResult.mapper()
1640
1880
  result.body = @client.deserialize(result_mapper, parsed_response)
1641
1881
  rescue Exception => e
1642
1882
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1650,7 +1890,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1650
1890
  end
1651
1891
 
1652
1892
  #
1653
- # Lists the available Namespaces within a resource group.
1893
+ # Lists all the available Namespaces within a subscription, irrespective of the
1894
+ # resource groups.
1654
1895
  #
1655
1896
  # @param next_page_link [String] The NextLink from the previous successful call
1656
1897
  # to List operation.
@@ -1659,13 +1900,14 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1659
1900
  #
1660
1901
  # @return [EHNamespaceListResult] operation results.
1661
1902
  #
1662
- def list_by_resource_group_next(next_page_link, custom_headers:nil)
1663
- response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1903
+ def list_next(next_page_link, custom_headers:nil)
1904
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1664
1905
  response.body unless response.nil?
1665
1906
  end
1666
1907
 
1667
1908
  #
1668
- # Lists the available Namespaces within a resource group.
1909
+ # Lists all the available Namespaces within a subscription, irrespective of the
1910
+ # resource groups.
1669
1911
  #
1670
1912
  # @param next_page_link [String] The NextLink from the previous successful call
1671
1913
  # to List operation.
@@ -1674,12 +1916,13 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1674
1916
  #
1675
1917
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1676
1918
  #
1677
- def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1678
- list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1919
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1920
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1679
1921
  end
1680
1922
 
1681
1923
  #
1682
- # Lists the available Namespaces within a resource group.
1924
+ # Lists all the available Namespaces within a subscription, irrespective of the
1925
+ # resource groups.
1683
1926
  #
1684
1927
  # @param next_page_link [String] The NextLink from the previous successful call
1685
1928
  # to List operation.
@@ -1688,7 +1931,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1688
1931
  #
1689
1932
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1690
1933
  #
1691
- def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1934
+ def list_next_async(next_page_link, custom_headers:nil)
1692
1935
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1693
1936
 
1694
1937
 
@@ -1720,6 +1963,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1720
1963
  end
1721
1964
 
1722
1965
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1966
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1967
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1723
1968
  # Deserialize Response
1724
1969
  if status_code == 200
1725
1970
  begin
@@ -1738,22 +1983,22 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1738
1983
  end
1739
1984
 
1740
1985
  #
1741
- # Gets a list of IP Filter rules for a Namespace.
1986
+ # Lists the available Namespaces within a resource group.
1742
1987
  #
1743
1988
  # @param next_page_link [String] The NextLink from the previous successful call
1744
1989
  # to List operation.
1745
1990
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1746
1991
  # will be added to the HTTP request.
1747
1992
  #
1748
- # @return [IpFilterRuleListResult] operation results.
1993
+ # @return [EHNamespaceListResult] operation results.
1749
1994
  #
1750
- def list_ipfilter_rules_next(next_page_link, custom_headers:nil)
1751
- response = list_ipfilter_rules_next_async(next_page_link, custom_headers:custom_headers).value!
1995
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1996
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1752
1997
  response.body unless response.nil?
1753
1998
  end
1754
1999
 
1755
2000
  #
1756
- # Gets a list of IP Filter rules for a Namespace.
2001
+ # Lists the available Namespaces within a resource group.
1757
2002
  #
1758
2003
  # @param next_page_link [String] The NextLink from the previous successful call
1759
2004
  # to List operation.
@@ -1762,12 +2007,12 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1762
2007
  #
1763
2008
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1764
2009
  #
1765
- def list_ipfilter_rules_next_with_http_info(next_page_link, custom_headers:nil)
1766
- list_ipfilter_rules_next_async(next_page_link, custom_headers:custom_headers).value!
2010
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
2011
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1767
2012
  end
1768
2013
 
1769
2014
  #
1770
- # Gets a list of IP Filter rules for a Namespace.
2015
+ # Lists the available Namespaces within a resource group.
1771
2016
  #
1772
2017
  # @param next_page_link [String] The NextLink from the previous successful call
1773
2018
  # to List operation.
@@ -1776,7 +2021,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1776
2021
  #
1777
2022
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1778
2023
  #
1779
- def list_ipfilter_rules_next_async(next_page_link, custom_headers:nil)
2024
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1780
2025
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1781
2026
 
1782
2027
 
@@ -1808,11 +2053,13 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1808
2053
  end
1809
2054
 
1810
2055
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2056
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2057
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1811
2058
  # Deserialize Response
1812
2059
  if status_code == 200
1813
2060
  begin
1814
2061
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1815
- result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::IpFilterRuleListResult.mapper()
2062
+ result_mapper = Azure::EventHub::Mgmt::V2018_01_01_preview::Models::EHNamespaceListResult.mapper()
1816
2063
  result.body = @client.deserialize(result_mapper, parsed_response)
1817
2064
  rescue Exception => e
1818
2065
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1896,6 +2143,8 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1896
2143
  end
1897
2144
 
1898
2145
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2146
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2147
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1899
2148
  # Deserialize Response
1900
2149
  if status_code == 200
1901
2150
  begin
@@ -1914,66 +2163,66 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1914
2163
  end
1915
2164
 
1916
2165
  #
1917
- # Lists all the available Namespaces within a subscription, irrespective of the
1918
- # resource groups.
2166
+ # Gets a list of IP Filter rules for a Namespace.
1919
2167
  #
2168
+ # @param resource_group_name [String] Name of the resource group within the
2169
+ # azure subscription.
2170
+ # @param namespace_name [String] The Namespace name
1920
2171
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1921
2172
  # will be added to the HTTP request.
1922
2173
  #
1923
- # @return [EHNamespaceListResult] which provide lazy access to pages of the
2174
+ # @return [IpFilterRuleListResult] which provide lazy access to pages of the
1924
2175
  # response.
1925
2176
  #
1926
- def list_as_lazy(custom_headers:nil)
1927
- response = list_async(custom_headers:custom_headers).value!
2177
+ def list_ipfilter_rules_as_lazy(resource_group_name, namespace_name, custom_headers:nil)
2178
+ response = list_ipfilter_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1928
2179
  unless response.nil?
1929
2180
  page = response.body
1930
2181
  page.next_method = Proc.new do |next_page_link|
1931
- list_next_async(next_page_link, custom_headers:custom_headers)
2182
+ list_ipfilter_rules_next_async(next_page_link, custom_headers:custom_headers)
1932
2183
  end
1933
2184
  page
1934
2185
  end
1935
2186
  end
1936
2187
 
1937
2188
  #
1938
- # Lists the available Namespaces within a resource group.
2189
+ # Lists all the available Namespaces within a subscription, irrespective of the
2190
+ # resource groups.
1939
2191
  #
1940
- # @param resource_group_name [String] Name of the resource group within the
1941
- # Azure subscription.
1942
2192
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1943
2193
  # will be added to the HTTP request.
1944
2194
  #
1945
2195
  # @return [EHNamespaceListResult] which provide lazy access to pages of the
1946
2196
  # response.
1947
2197
  #
1948
- def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
1949
- response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
2198
+ def list_as_lazy(custom_headers:nil)
2199
+ response = list_async(custom_headers:custom_headers).value!
1950
2200
  unless response.nil?
1951
2201
  page = response.body
1952
2202
  page.next_method = Proc.new do |next_page_link|
1953
- list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
2203
+ list_next_async(next_page_link, custom_headers:custom_headers)
1954
2204
  end
1955
2205
  page
1956
2206
  end
1957
2207
  end
1958
2208
 
1959
2209
  #
1960
- # Gets a list of IP Filter rules for a Namespace.
2210
+ # Lists the available Namespaces within a resource group.
1961
2211
  #
1962
2212
  # @param resource_group_name [String] Name of the resource group within the
1963
- # Azure subscription.
1964
- # @param namespace_name [String] The Namespace name
2213
+ # azure subscription.
1965
2214
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1966
2215
  # will be added to the HTTP request.
1967
2216
  #
1968
- # @return [IpFilterRuleListResult] which provide lazy access to pages of the
2217
+ # @return [EHNamespaceListResult] which provide lazy access to pages of the
1969
2218
  # response.
1970
2219
  #
1971
- def list_ipfilter_rules_as_lazy(resource_group_name, namespace_name, custom_headers:nil)
1972
- response = list_ipfilter_rules_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
2220
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
2221
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
1973
2222
  unless response.nil?
1974
2223
  page = response.body
1975
2224
  page.next_method = Proc.new do |next_page_link|
1976
- list_ipfilter_rules_next_async(next_page_link, custom_headers:custom_headers)
2225
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1977
2226
  end
1978
2227
  page
1979
2228
  end
@@ -1983,7 +2232,7 @@ module Azure::EventHub::Mgmt::V2018_01_01_preview
1983
2232
  # Gets a list of VirtualNetwork rules for a Namespace.
1984
2233
  #
1985
2234
  # @param resource_group_name [String] Name of the resource group within the
1986
- # Azure subscription.
2235
+ # azure subscription.
1987
2236
  # @param namespace_name [String] The Namespace name
1988
2237
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1989
2238
  # will be added to the HTTP request.