azure_mgmt_event_grid 0.20.2 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  3. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  4. data/lib/2018-01-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  5. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  6. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  7. data/lib/2019-01-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  8. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  9. data/lib/2019-06-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  10. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  11. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  12. data/lib/2020-06-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  13. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid.rb +171 -0
  14. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/domain_topics.rb +699 -0
  15. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/domains.rb +1328 -0
  16. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_channels.rb +658 -0
  17. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +194 -0
  18. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb +3775 -0
  19. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/extension_topics.rb +141 -0
  20. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/advanced_filter.rb +81 -0
  21. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/azure_function_event_subscription_destination.rb +112 -0
  22. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/bool_equals_advanced_filter.rb +69 -0
  23. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/connection_state.rb +69 -0
  24. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/created_by_type.rb +18 -0
  25. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb +50 -0
  26. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/dead_letter_with_resource_identity.rb +66 -0
  27. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/delivery_attribute_list_result.rb +58 -0
  28. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/delivery_attribute_mapping.rb +58 -0
  29. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/delivery_with_resource_identity.rb +67 -0
  30. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain.rb +253 -0
  31. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_provisioning_state.rb +20 -0
  32. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_regenerate_key_request.rb +46 -0
  33. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_shared_access_keys.rb +57 -0
  34. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_topic.rb +89 -0
  35. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_topic_provisioning_state.rb +20 -0
  36. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_topics_list_result.rb +98 -0
  37. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_update_parameters.rb +117 -0
  38. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domains_list_result.rb +98 -0
  39. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/dynamic_delivery_attribute_mapping.rb +69 -0
  40. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel.rb +172 -0
  41. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_destination.rb +75 -0
  42. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_filter.rb +70 -0
  43. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_provisioning_state.rb +20 -0
  44. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_source.rb +48 -0
  45. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channels_list_result.rb +98 -0
  46. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_delivery_schema.rb +17 -0
  47. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +84 -0
  48. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription.rb +244 -0
  49. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +52 -0
  50. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +132 -0
  51. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -0
  52. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_identity.rb +61 -0
  53. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_identity_type.rb +16 -0
  54. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +21 -0
  55. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +176 -0
  56. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +98 -0
  57. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_type.rb +106 -0
  58. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -0
  59. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/extended_location.rb +57 -0
  60. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/extension_topic.rb +86 -0
  61. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb +86 -0
  62. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/identity_info.rb +96 -0
  63. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/identity_type.rb +18 -0
  64. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/inbound_ip_rule.rb +59 -0
  65. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/input_schema.rb +17 -0
  66. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/input_schema_mapping.rb +49 -0
  67. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/ip_action_type.rb +15 -0
  68. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/is_not_null_advanced_filter.rb +58 -0
  69. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/is_null_or_undefined_advanced_filter.rb +58 -0
  70. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/json_field.rb +50 -0
  71. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/json_field_with_default.rb +67 -0
  72. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/json_input_schema_mapping.rb +130 -0
  73. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_greater_than_advanced_filter.rb +69 -0
  74. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_greater_than_or_equals_advanced_filter.rb +69 -0
  75. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_in_advanced_filter.rb +77 -0
  76. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_in_range_advanced_filter.rb +85 -0
  77. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_less_than_advanced_filter.rb +69 -0
  78. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_less_than_or_equals_advanced_filter.rb +69 -0
  79. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_not_in_advanced_filter.rb +77 -0
  80. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_not_in_range_advanced_filter.rb +85 -0
  81. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/operation.rb +80 -0
  82. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -0
  83. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -0
  84. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace.rb +140 -0
  85. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_provisioning_state.rb +20 -0
  86. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_regenerate_key_request.rb +46 -0
  87. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_shared_access_keys.rb +57 -0
  88. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_update_parameters.rb +54 -0
  89. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespaces_list_result.rb +98 -0
  90. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration.rb +278 -0
  91. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_event_types_list_result.rb +68 -0
  92. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_provisioning_state.rb +20 -0
  93. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_update_parameters.rb +137 -0
  94. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_visibility_state.rb +17 -0
  95. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registrations_list_result.rb +99 -0
  96. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic.rb +179 -0
  97. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_activation_state.rb +17 -0
  98. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_provisioning_state.rb +20 -0
  99. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_readiness_state.rb +18 -0
  100. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_type.rb +134 -0
  101. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_type_authorization_state.rb +17 -0
  102. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_types_list_result.rb +55 -0
  103. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_update_parameters.rb +54 -0
  104. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topics_list_result.rb +98 -0
  105. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/persisted_connection_status.rb +18 -0
  106. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_endpoint.rb +46 -0
  107. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_endpoint_connection.rb +121 -0
  108. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_endpoint_connection_list_result.rb +100 -0
  109. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_link_resource.rb +128 -0
  110. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_link_resources_list_result.rb +99 -0
  111. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/public_network_access.rb +16 -0
  112. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource.rb +80 -0
  113. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_kind.rb +16 -0
  114. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_provisioning_state.rb +20 -0
  115. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -0
  116. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_sku.rb +47 -0
  117. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/retry_policy.rb +61 -0
  118. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/service_bus_queue_event_subscription_destination.rb +85 -0
  119. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/service_bus_topic_event_subscription_destination.rb +86 -0
  120. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/sku.rb +16 -0
  121. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/static_delivery_attribute_mapping.rb +81 -0
  122. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb +74 -0
  123. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb +86 -0
  124. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_begins_with_advanced_filter.rb +77 -0
  125. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_contains_advanced_filter.rb +77 -0
  126. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_ends_with_advanced_filter.rb +77 -0
  127. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_in_advanced_filter.rb +77 -0
  128. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_begins_with_advanced_filter.rb +77 -0
  129. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_contains_advanced_filter.rb +77 -0
  130. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_ends_with_advanced_filter.rb +77 -0
  131. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_in_advanced_filter.rb +77 -0
  132. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_data.rb +105 -0
  133. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_topic.rb +159 -0
  134. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_topic_update_parameters.rb +66 -0
  135. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_topics_list_result.rb +98 -0
  136. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic.rb +278 -0
  137. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -0
  138. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -0
  139. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -0
  140. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_type_info.rb +169 -0
  141. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -0
  142. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -0
  143. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +117 -0
  144. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topics_list_result.rb +98 -0
  145. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -0
  146. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/user_identity_properties.rb +57 -0
  147. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +148 -0
  148. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/module_definition.rb +9 -0
  149. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/operations.rb +118 -0
  150. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_namespaces.rb +1333 -0
  151. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_registrations.rb +1074 -0
  152. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_topic_event_subscriptions.rb +1156 -0
  153. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_topics.rb +1102 -0
  154. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/private_endpoint_connections.rb +791 -0
  155. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/private_link_resources.rb +423 -0
  156. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/system_topic_event_subscriptions.rb +1152 -0
  157. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/system_topics.rb +1128 -0
  158. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/topic_types.rb +305 -0
  159. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/topics.rb +1489 -0
  160. data/lib/azure_mgmt_event_grid.rb +8 -7
  161. data/lib/profiles/latest/modules/eventgrid_profile_module.rb +417 -181
  162. data/lib/version.rb +1 -1
  163. metadata +150 -3
@@ -0,0 +1,658 @@
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::EventGrid::Mgmt::V2020_10_15_preview
7
+ #
8
+ # Azure EventGrid Management Client
9
+ #
10
+ class EventChannels
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the EventChannels class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [EventGridManagementClient] reference to the EventGridManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Get an event channel.
26
+ #
27
+ # Get properties of an event channel.
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group within the
30
+ # user's subscription.
31
+ # @param partner_namespace_name [String] Name of the partner namespace.
32
+ # @param event_channel_name [String] Name of the event channel.
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ # @return [EventChannel] operation results.
37
+ #
38
+ def get(resource_group_name, partner_namespace_name, event_channel_name, custom_headers:nil)
39
+ response = get_async(resource_group_name, partner_namespace_name, event_channel_name, custom_headers:custom_headers).value!
40
+ response.body unless response.nil?
41
+ end
42
+
43
+ #
44
+ # Get an event channel.
45
+ #
46
+ # Get properties of an event channel.
47
+ #
48
+ # @param resource_group_name [String] The name of the resource group within the
49
+ # user's subscription.
50
+ # @param partner_namespace_name [String] Name of the partner namespace.
51
+ # @param event_channel_name [String] Name of the event channel.
52
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
53
+ # will be added to the HTTP request.
54
+ #
55
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
56
+ #
57
+ def get_with_http_info(resource_group_name, partner_namespace_name, event_channel_name, custom_headers:nil)
58
+ get_async(resource_group_name, partner_namespace_name, event_channel_name, custom_headers:custom_headers).value!
59
+ end
60
+
61
+ #
62
+ # Get an event channel.
63
+ #
64
+ # Get properties of an event channel.
65
+ #
66
+ # @param resource_group_name [String] The name of the resource group within the
67
+ # user's subscription.
68
+ # @param partner_namespace_name [String] Name of the partner namespace.
69
+ # @param event_channel_name [String] Name of the event channel.
70
+ # @param [Hash{String => String}] A hash of custom headers that will be added
71
+ # to the HTTP request.
72
+ #
73
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
+ #
75
+ def get_async(resource_group_name, partner_namespace_name, event_channel_name, custom_headers:nil)
76
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
77
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
78
+ fail ArgumentError, 'partner_namespace_name is nil' if partner_namespace_name.nil?
79
+ fail ArgumentError, 'event_channel_name is nil' if event_channel_name.nil?
80
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
81
+
82
+
83
+ request_headers = {}
84
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
85
+
86
+ # Set Headers
87
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
88
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
89
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}'
90
+
91
+ request_url = @base_url || @client.base_url
92
+
93
+ options = {
94
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
95
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'partnerNamespaceName' => partner_namespace_name,'eventChannelName' => event_channel_name},
96
+ query_params: {'api-version' => @client.api_version},
97
+ headers: request_headers.merge(custom_headers || {}),
98
+ base_url: request_url
99
+ }
100
+ promise = @client.make_request_async(:get, path_template, options)
101
+
102
+ promise = promise.then do |result|
103
+ http_response = result.response
104
+ status_code = http_response.status
105
+ response_content = http_response.body
106
+ unless status_code == 200
107
+ error_model = JSON.load(response_content)
108
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
109
+ end
110
+
111
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
112
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
113
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
114
+ # Deserialize Response
115
+ if status_code == 200
116
+ begin
117
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
118
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventChannel.mapper()
119
+ result.body = @client.deserialize(result_mapper, parsed_response)
120
+ rescue Exception => e
121
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
122
+ end
123
+ end
124
+
125
+ result
126
+ end
127
+
128
+ promise.execute
129
+ end
130
+
131
+ #
132
+ # Create an event channel.
133
+ #
134
+ # Asynchronously creates a new event channel with the specified parameters.
135
+ #
136
+ # @param resource_group_name [String] The name of the resource group within the
137
+ # user's subscription.
138
+ # @param partner_namespace_name [String] Name of the partner namespace.
139
+ # @param event_channel_name [String] Name of the event channel.
140
+ # @param event_channel_info [EventChannel] EventChannel information.
141
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
142
+ # will be added to the HTTP request.
143
+ #
144
+ # @return [EventChannel] operation results.
145
+ #
146
+ def create_or_update(resource_group_name, partner_namespace_name, event_channel_name, event_channel_info, custom_headers:nil)
147
+ response = create_or_update_async(resource_group_name, partner_namespace_name, event_channel_name, event_channel_info, custom_headers:custom_headers).value!
148
+ response.body unless response.nil?
149
+ end
150
+
151
+ #
152
+ # Create an event channel.
153
+ #
154
+ # Asynchronously creates a new event channel with the specified parameters.
155
+ #
156
+ # @param resource_group_name [String] The name of the resource group within the
157
+ # user's subscription.
158
+ # @param partner_namespace_name [String] Name of the partner namespace.
159
+ # @param event_channel_name [String] Name of the event channel.
160
+ # @param event_channel_info [EventChannel] EventChannel information.
161
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
162
+ # will be added to the HTTP request.
163
+ #
164
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
165
+ #
166
+ def create_or_update_with_http_info(resource_group_name, partner_namespace_name, event_channel_name, event_channel_info, custom_headers:nil)
167
+ create_or_update_async(resource_group_name, partner_namespace_name, event_channel_name, event_channel_info, custom_headers:custom_headers).value!
168
+ end
169
+
170
+ #
171
+ # Create an event channel.
172
+ #
173
+ # Asynchronously creates a new event channel with the specified parameters.
174
+ #
175
+ # @param resource_group_name [String] The name of the resource group within the
176
+ # user's subscription.
177
+ # @param partner_namespace_name [String] Name of the partner namespace.
178
+ # @param event_channel_name [String] Name of the event channel.
179
+ # @param event_channel_info [EventChannel] EventChannel information.
180
+ # @param [Hash{String => String}] A hash of custom headers that will be added
181
+ # to the HTTP request.
182
+ #
183
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
184
+ #
185
+ def create_or_update_async(resource_group_name, partner_namespace_name, event_channel_name, event_channel_info, custom_headers:nil)
186
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
187
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
188
+ fail ArgumentError, 'partner_namespace_name is nil' if partner_namespace_name.nil?
189
+ fail ArgumentError, 'event_channel_name is nil' if event_channel_name.nil?
190
+ fail ArgumentError, 'event_channel_info is nil' if event_channel_info.nil?
191
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
192
+
193
+
194
+ request_headers = {}
195
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
196
+
197
+ # Set Headers
198
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
199
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
200
+
201
+ # Serialize Request
202
+ request_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventChannel.mapper()
203
+ request_content = @client.serialize(request_mapper, event_channel_info)
204
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
205
+
206
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}'
207
+
208
+ request_url = @base_url || @client.base_url
209
+
210
+ options = {
211
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
212
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'partnerNamespaceName' => partner_namespace_name,'eventChannelName' => event_channel_name},
213
+ query_params: {'api-version' => @client.api_version},
214
+ body: request_content,
215
+ headers: request_headers.merge(custom_headers || {}),
216
+ base_url: request_url
217
+ }
218
+ promise = @client.make_request_async(:put, path_template, options)
219
+
220
+ promise = promise.then do |result|
221
+ http_response = result.response
222
+ status_code = http_response.status
223
+ response_content = http_response.body
224
+ unless status_code == 200
225
+ error_model = JSON.load(response_content)
226
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
227
+ end
228
+
229
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
230
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
231
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
232
+ # Deserialize Response
233
+ if status_code == 200
234
+ begin
235
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
236
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventChannel.mapper()
237
+ result.body = @client.deserialize(result_mapper, parsed_response)
238
+ rescue Exception => e
239
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
240
+ end
241
+ end
242
+
243
+ result
244
+ end
245
+
246
+ promise.execute
247
+ end
248
+
249
+ #
250
+ # Delete an event channel.
251
+ #
252
+ # Delete existing event channel.
253
+ #
254
+ # @param resource_group_name [String] The name of the resource group within the
255
+ # user's subscription.
256
+ # @param partner_namespace_name [String] Name of the partner namespace.
257
+ # @param event_channel_name [String] Name of the event channel.
258
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
259
+ # will be added to the HTTP request.
260
+ #
261
+ def delete(resource_group_name, partner_namespace_name, event_channel_name, custom_headers:nil)
262
+ response = delete_async(resource_group_name, partner_namespace_name, event_channel_name, custom_headers:custom_headers).value!
263
+ nil
264
+ end
265
+
266
+ #
267
+ # @param resource_group_name [String] The name of the resource group within the
268
+ # user's subscription.
269
+ # @param partner_namespace_name [String] Name of the partner namespace.
270
+ # @param event_channel_name [String] Name of the event channel.
271
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
272
+ # will be added to the HTTP request.
273
+ #
274
+ # @return [Concurrent::Promise] promise which provides async access to http
275
+ # response.
276
+ #
277
+ def delete_async(resource_group_name, partner_namespace_name, event_channel_name, custom_headers:nil)
278
+ # Send request
279
+ promise = begin_delete_async(resource_group_name, partner_namespace_name, event_channel_name, custom_headers:custom_headers)
280
+
281
+ promise = promise.then do |response|
282
+ # Defining deserialization method.
283
+ deserialize_method = lambda do |parsed_response|
284
+ end
285
+
286
+ # Waiting for response.
287
+ @client.get_long_running_operation_result(response, deserialize_method)
288
+ end
289
+
290
+ promise
291
+ end
292
+
293
+ #
294
+ # List event channels.
295
+ #
296
+ # List all the event channels in a partner namespace.
297
+ #
298
+ # @param resource_group_name [String] The name of the resource group within the
299
+ # user's subscription.
300
+ # @param partner_namespace_name [String] Name of the partner namespace.
301
+ # @param filter [String] The query used to filter the search results using
302
+ # OData syntax. Filtering is permitted on the 'name' property only and with
303
+ # limited number of OData operations. These operations are: the 'contains'
304
+ # function as well as the following logical operations: not, and, or, eq (for
305
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
306
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
307
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
308
+ # $filter=location eq 'westus'.
309
+ # @param top [Integer] The number of results to return per page for the list
310
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
311
+ # default number of results to be returned is 20 items per page.
312
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
313
+ # will be added to the HTTP request.
314
+ #
315
+ # @return [Array<EventChannel>] operation results.
316
+ #
317
+ def list_by_partner_namespace(resource_group_name, partner_namespace_name, filter:nil, top:nil, custom_headers:nil)
318
+ first_page = list_by_partner_namespace_as_lazy(resource_group_name, partner_namespace_name, filter:filter, top:top, custom_headers:custom_headers)
319
+ first_page.get_all_items
320
+ end
321
+
322
+ #
323
+ # List event channels.
324
+ #
325
+ # List all the event channels in a partner namespace.
326
+ #
327
+ # @param resource_group_name [String] The name of the resource group within the
328
+ # user's subscription.
329
+ # @param partner_namespace_name [String] Name of the partner namespace.
330
+ # @param filter [String] The query used to filter the search results using
331
+ # OData syntax. Filtering is permitted on the 'name' property only and with
332
+ # limited number of OData operations. These operations are: the 'contains'
333
+ # function as well as the following logical operations: not, and, or, eq (for
334
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
335
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
336
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
337
+ # $filter=location eq 'westus'.
338
+ # @param top [Integer] The number of results to return per page for the list
339
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
340
+ # default number of results to be returned is 20 items per page.
341
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
342
+ # will be added to the HTTP request.
343
+ #
344
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
345
+ #
346
+ def list_by_partner_namespace_with_http_info(resource_group_name, partner_namespace_name, filter:nil, top:nil, custom_headers:nil)
347
+ list_by_partner_namespace_async(resource_group_name, partner_namespace_name, filter:filter, top:top, custom_headers:custom_headers).value!
348
+ end
349
+
350
+ #
351
+ # List event channels.
352
+ #
353
+ # List all the event channels in a partner namespace.
354
+ #
355
+ # @param resource_group_name [String] The name of the resource group within the
356
+ # user's subscription.
357
+ # @param partner_namespace_name [String] Name of the partner namespace.
358
+ # @param filter [String] The query used to filter the search results using
359
+ # OData syntax. Filtering is permitted on the 'name' property only and with
360
+ # limited number of OData operations. These operations are: the 'contains'
361
+ # function as well as the following logical operations: not, and, or, eq (for
362
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
363
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
364
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
365
+ # $filter=location eq 'westus'.
366
+ # @param top [Integer] The number of results to return per page for the list
367
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
368
+ # default number of results to be returned is 20 items per page.
369
+ # @param [Hash{String => String}] A hash of custom headers that will be added
370
+ # to the HTTP request.
371
+ #
372
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
373
+ #
374
+ def list_by_partner_namespace_async(resource_group_name, partner_namespace_name, filter:nil, top:nil, custom_headers:nil)
375
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
376
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
377
+ fail ArgumentError, 'partner_namespace_name is nil' if partner_namespace_name.nil?
378
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
379
+
380
+
381
+ request_headers = {}
382
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
383
+
384
+ # Set Headers
385
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
386
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
387
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels'
388
+
389
+ request_url = @base_url || @client.base_url
390
+
391
+ options = {
392
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
393
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'partnerNamespaceName' => partner_namespace_name},
394
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top},
395
+ headers: request_headers.merge(custom_headers || {}),
396
+ base_url: request_url
397
+ }
398
+ promise = @client.make_request_async(:get, path_template, options)
399
+
400
+ promise = promise.then do |result|
401
+ http_response = result.response
402
+ status_code = http_response.status
403
+ response_content = http_response.body
404
+ unless status_code == 200
405
+ error_model = JSON.load(response_content)
406
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
407
+ end
408
+
409
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
410
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
411
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
412
+ # Deserialize Response
413
+ if status_code == 200
414
+ begin
415
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
416
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventChannelsListResult.mapper()
417
+ result.body = @client.deserialize(result_mapper, parsed_response)
418
+ rescue Exception => e
419
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
420
+ end
421
+ end
422
+
423
+ result
424
+ end
425
+
426
+ promise.execute
427
+ end
428
+
429
+ #
430
+ # Delete an event channel.
431
+ #
432
+ # Delete existing event channel.
433
+ #
434
+ # @param resource_group_name [String] The name of the resource group within the
435
+ # user's subscription.
436
+ # @param partner_namespace_name [String] Name of the partner namespace.
437
+ # @param event_channel_name [String] Name of the event channel.
438
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
439
+ # will be added to the HTTP request.
440
+ #
441
+ #
442
+ def begin_delete(resource_group_name, partner_namespace_name, event_channel_name, custom_headers:nil)
443
+ response = begin_delete_async(resource_group_name, partner_namespace_name, event_channel_name, custom_headers:custom_headers).value!
444
+ nil
445
+ end
446
+
447
+ #
448
+ # Delete an event channel.
449
+ #
450
+ # Delete existing event channel.
451
+ #
452
+ # @param resource_group_name [String] The name of the resource group within the
453
+ # user's subscription.
454
+ # @param partner_namespace_name [String] Name of the partner namespace.
455
+ # @param event_channel_name [String] Name of the event channel.
456
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
457
+ # will be added to the HTTP request.
458
+ #
459
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
460
+ #
461
+ def begin_delete_with_http_info(resource_group_name, partner_namespace_name, event_channel_name, custom_headers:nil)
462
+ begin_delete_async(resource_group_name, partner_namespace_name, event_channel_name, custom_headers:custom_headers).value!
463
+ end
464
+
465
+ #
466
+ # Delete an event channel.
467
+ #
468
+ # Delete existing event channel.
469
+ #
470
+ # @param resource_group_name [String] The name of the resource group within the
471
+ # user's subscription.
472
+ # @param partner_namespace_name [String] Name of the partner namespace.
473
+ # @param event_channel_name [String] Name of the event channel.
474
+ # @param [Hash{String => String}] A hash of custom headers that will be added
475
+ # to the HTTP request.
476
+ #
477
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
478
+ #
479
+ def begin_delete_async(resource_group_name, partner_namespace_name, event_channel_name, custom_headers:nil)
480
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
481
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
482
+ fail ArgumentError, 'partner_namespace_name is nil' if partner_namespace_name.nil?
483
+ fail ArgumentError, 'event_channel_name is nil' if event_channel_name.nil?
484
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
485
+
486
+
487
+ request_headers = {}
488
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
489
+
490
+ # Set Headers
491
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
492
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
493
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}'
494
+
495
+ request_url = @base_url || @client.base_url
496
+
497
+ options = {
498
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
499
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'partnerNamespaceName' => partner_namespace_name,'eventChannelName' => event_channel_name},
500
+ query_params: {'api-version' => @client.api_version},
501
+ headers: request_headers.merge(custom_headers || {}),
502
+ base_url: request_url
503
+ }
504
+ promise = @client.make_request_async(:delete, path_template, options)
505
+
506
+ promise = promise.then do |result|
507
+ http_response = result.response
508
+ status_code = http_response.status
509
+ response_content = http_response.body
510
+ unless status_code == 200 || status_code == 202 || status_code == 204
511
+ error_model = JSON.load(response_content)
512
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
513
+ end
514
+
515
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
516
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
517
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
518
+
519
+ result
520
+ end
521
+
522
+ promise.execute
523
+ end
524
+
525
+ #
526
+ # List event channels.
527
+ #
528
+ # List all the event channels in a partner namespace.
529
+ #
530
+ # @param next_page_link [String] The NextLink from the previous successful call
531
+ # to List operation.
532
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
533
+ # will be added to the HTTP request.
534
+ #
535
+ # @return [EventChannelsListResult] operation results.
536
+ #
537
+ def list_by_partner_namespace_next(next_page_link, custom_headers:nil)
538
+ response = list_by_partner_namespace_next_async(next_page_link, custom_headers:custom_headers).value!
539
+ response.body unless response.nil?
540
+ end
541
+
542
+ #
543
+ # List event channels.
544
+ #
545
+ # List all the event channels in a partner namespace.
546
+ #
547
+ # @param next_page_link [String] The NextLink from the previous successful call
548
+ # to List operation.
549
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
550
+ # will be added to the HTTP request.
551
+ #
552
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
553
+ #
554
+ def list_by_partner_namespace_next_with_http_info(next_page_link, custom_headers:nil)
555
+ list_by_partner_namespace_next_async(next_page_link, custom_headers:custom_headers).value!
556
+ end
557
+
558
+ #
559
+ # List event channels.
560
+ #
561
+ # List all the event channels in a partner namespace.
562
+ #
563
+ # @param next_page_link [String] The NextLink from the previous successful call
564
+ # to List operation.
565
+ # @param [Hash{String => String}] A hash of custom headers that will be added
566
+ # to the HTTP request.
567
+ #
568
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
569
+ #
570
+ def list_by_partner_namespace_next_async(next_page_link, custom_headers:nil)
571
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
572
+
573
+
574
+ request_headers = {}
575
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
576
+
577
+ # Set Headers
578
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
579
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
580
+ path_template = '{nextLink}'
581
+
582
+ request_url = @base_url || @client.base_url
583
+
584
+ options = {
585
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
586
+ skip_encoding_path_params: {'nextLink' => next_page_link},
587
+ headers: request_headers.merge(custom_headers || {}),
588
+ base_url: request_url
589
+ }
590
+ promise = @client.make_request_async(:get, path_template, options)
591
+
592
+ promise = promise.then do |result|
593
+ http_response = result.response
594
+ status_code = http_response.status
595
+ response_content = http_response.body
596
+ unless status_code == 200
597
+ error_model = JSON.load(response_content)
598
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
599
+ end
600
+
601
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
602
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
603
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
604
+ # Deserialize Response
605
+ if status_code == 200
606
+ begin
607
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
608
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventChannelsListResult.mapper()
609
+ result.body = @client.deserialize(result_mapper, parsed_response)
610
+ rescue Exception => e
611
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
612
+ end
613
+ end
614
+
615
+ result
616
+ end
617
+
618
+ promise.execute
619
+ end
620
+
621
+ #
622
+ # List event channels.
623
+ #
624
+ # List all the event channels in a partner namespace.
625
+ #
626
+ # @param resource_group_name [String] The name of the resource group within the
627
+ # user's subscription.
628
+ # @param partner_namespace_name [String] Name of the partner namespace.
629
+ # @param filter [String] The query used to filter the search results using
630
+ # OData syntax. Filtering is permitted on the 'name' property only and with
631
+ # limited number of OData operations. These operations are: the 'contains'
632
+ # function as well as the following logical operations: not, and, or, eq (for
633
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
634
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
635
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
636
+ # $filter=location eq 'westus'.
637
+ # @param top [Integer] The number of results to return per page for the list
638
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
639
+ # default number of results to be returned is 20 items per page.
640
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
641
+ # will be added to the HTTP request.
642
+ #
643
+ # @return [EventChannelsListResult] which provide lazy access to pages of the
644
+ # response.
645
+ #
646
+ def list_by_partner_namespace_as_lazy(resource_group_name, partner_namespace_name, filter:nil, top:nil, custom_headers:nil)
647
+ response = list_by_partner_namespace_async(resource_group_name, partner_namespace_name, filter:filter, top:top, custom_headers:custom_headers).value!
648
+ unless response.nil?
649
+ page = response.body
650
+ page.next_method = Proc.new do |next_page_link|
651
+ list_by_partner_namespace_next_async(next_page_link, custom_headers:custom_headers)
652
+ end
653
+ page
654
+ end
655
+ end
656
+
657
+ end
658
+ end