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,1156 @@
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 PartnerTopicEventSubscriptions
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the PartnerTopicEventSubscriptions 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 subscription of a partner topic.
26
+ #
27
+ # Get an event subscription of a partner topic.
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group within the
30
+ # user's subscription.
31
+ # @param partner_topic_name [String] Name of the partner topic.
32
+ # @param event_subscription_name [String] Name of the event subscription to be
33
+ # found. Event subscription names must be between 3 and 100 characters in
34
+ # length and use alphanumeric letters only.
35
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
36
+ # will be added to the HTTP request.
37
+ #
38
+ # @return [EventSubscription] operation results.
39
+ #
40
+ def get(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:nil)
41
+ response = get_async(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:custom_headers).value!
42
+ response.body unless response.nil?
43
+ end
44
+
45
+ #
46
+ # Get an event subscription of a partner topic.
47
+ #
48
+ # Get an event subscription of a partner topic.
49
+ #
50
+ # @param resource_group_name [String] The name of the resource group within the
51
+ # user's subscription.
52
+ # @param partner_topic_name [String] Name of the partner topic.
53
+ # @param event_subscription_name [String] Name of the event subscription to be
54
+ # found. Event subscription names must be between 3 and 100 characters in
55
+ # length and use alphanumeric letters only.
56
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
57
+ # will be added to the HTTP request.
58
+ #
59
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
60
+ #
61
+ def get_with_http_info(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:nil)
62
+ get_async(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:custom_headers).value!
63
+ end
64
+
65
+ #
66
+ # Get an event subscription of a partner topic.
67
+ #
68
+ # Get an event subscription of a partner topic.
69
+ #
70
+ # @param resource_group_name [String] The name of the resource group within the
71
+ # user's subscription.
72
+ # @param partner_topic_name [String] Name of the partner topic.
73
+ # @param event_subscription_name [String] Name of the event subscription to be
74
+ # found. Event subscription names must be between 3 and 100 characters in
75
+ # length and use alphanumeric letters only.
76
+ # @param [Hash{String => String}] A hash of custom headers that will be added
77
+ # to the HTTP request.
78
+ #
79
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
80
+ #
81
+ def get_async(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:nil)
82
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
83
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
84
+ fail ArgumentError, 'partner_topic_name is nil' if partner_topic_name.nil?
85
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
86
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
87
+
88
+
89
+ request_headers = {}
90
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
91
+
92
+ # Set Headers
93
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
94
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
95
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'
96
+
97
+ request_url = @base_url || @client.base_url
98
+
99
+ options = {
100
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
101
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'partnerTopicName' => partner_topic_name,'eventSubscriptionName' => event_subscription_name},
102
+ query_params: {'api-version' => @client.api_version},
103
+ headers: request_headers.merge(custom_headers || {}),
104
+ base_url: request_url
105
+ }
106
+ promise = @client.make_request_async(:get, path_template, options)
107
+
108
+ promise = promise.then do |result|
109
+ http_response = result.response
110
+ status_code = http_response.status
111
+ response_content = http_response.body
112
+ unless status_code == 200
113
+ error_model = JSON.load(response_content)
114
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
115
+ end
116
+
117
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
118
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
119
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
120
+ # Deserialize Response
121
+ if status_code == 200
122
+ begin
123
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
124
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper()
125
+ result.body = @client.deserialize(result_mapper, parsed_response)
126
+ rescue Exception => e
127
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
128
+ end
129
+ end
130
+
131
+ result
132
+ end
133
+
134
+ promise.execute
135
+ end
136
+
137
+ #
138
+ # Create or update an event subscription of a partner topic.
139
+ #
140
+ # Asynchronously creates or updates an event subscription of a partner topic
141
+ # with the specified parameters. Existing event subscriptions will be updated
142
+ # with this API.
143
+ #
144
+ # @param resource_group_name [String] The name of the resource group within the
145
+ # user's subscription.
146
+ # @param partner_topic_name [String] Name of the partner topic.
147
+ # @param event_subscription_name [String] Name of the event subscription to be
148
+ # created. Event subscription names must be between 3 and 100 characters in
149
+ # length and use alphanumeric letters only.
150
+ # @param event_subscription_info [EventSubscription] Event subscription
151
+ # properties containing the destination and filter information.
152
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
153
+ # will be added to the HTTP request.
154
+ #
155
+ # @return [EventSubscription] operation results.
156
+ #
157
+ def create_or_update(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_info, custom_headers:nil)
158
+ response = create_or_update_async(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value!
159
+ response.body unless response.nil?
160
+ end
161
+
162
+ #
163
+ # @param resource_group_name [String] The name of the resource group within the
164
+ # user's subscription.
165
+ # @param partner_topic_name [String] Name of the partner topic.
166
+ # @param event_subscription_name [String] Name of the event subscription to be
167
+ # created. Event subscription names must be between 3 and 100 characters in
168
+ # length and use alphanumeric letters only.
169
+ # @param event_subscription_info [EventSubscription] Event subscription
170
+ # properties containing the destination and filter information.
171
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
172
+ # will be added to the HTTP request.
173
+ #
174
+ # @return [Concurrent::Promise] promise which provides async access to http
175
+ # response.
176
+ #
177
+ def create_or_update_async(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_info, custom_headers:nil)
178
+ # Send request
179
+ promise = begin_create_or_update_async(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_info, custom_headers:custom_headers)
180
+
181
+ promise = promise.then do |response|
182
+ # Defining deserialization method.
183
+ deserialize_method = lambda do |parsed_response|
184
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper()
185
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
186
+ end
187
+
188
+ # Waiting for response.
189
+ @client.get_long_running_operation_result(response, deserialize_method)
190
+ end
191
+
192
+ promise
193
+ end
194
+
195
+ #
196
+ # Delete an event subscription of a partner topic.
197
+ #
198
+ # Delete an event subscription of a partner topic.
199
+ #
200
+ # @param resource_group_name [String] The name of the resource group within the
201
+ # user's subscription.
202
+ # @param partner_topic_name [String] Name of the partner topic.
203
+ # @param event_subscription_name [String] Name of the event subscription to be
204
+ # created. Event subscription names must be between 3 and 100 characters in
205
+ # length and use alphanumeric letters only.
206
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
207
+ # will be added to the HTTP request.
208
+ #
209
+ def delete(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:nil)
210
+ response = delete_async(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:custom_headers).value!
211
+ nil
212
+ end
213
+
214
+ #
215
+ # @param resource_group_name [String] The name of the resource group within the
216
+ # user's subscription.
217
+ # @param partner_topic_name [String] Name of the partner topic.
218
+ # @param event_subscription_name [String] Name of the event subscription to be
219
+ # created. Event subscription names must be between 3 and 100 characters in
220
+ # length and use alphanumeric letters only.
221
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
222
+ # will be added to the HTTP request.
223
+ #
224
+ # @return [Concurrent::Promise] promise which provides async access to http
225
+ # response.
226
+ #
227
+ def delete_async(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:nil)
228
+ # Send request
229
+ promise = begin_delete_async(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:custom_headers)
230
+
231
+ promise = promise.then do |response|
232
+ # Defining deserialization method.
233
+ deserialize_method = lambda do |parsed_response|
234
+ end
235
+
236
+ # Waiting for response.
237
+ @client.get_long_running_operation_result(response, deserialize_method)
238
+ end
239
+
240
+ promise
241
+ end
242
+
243
+ #
244
+ # Update event subscription of a partner topic.
245
+ #
246
+ # Update event subscription of a partner topic.
247
+ #
248
+ # @param resource_group_name [String] The name of the resource group within the
249
+ # user's subscription.
250
+ # @param partner_topic_name [String] Name of the partner topic.
251
+ # @param event_subscription_name [String] Name of the event subscription to be
252
+ # created. Event subscription names must be between 3 and 100 characters in
253
+ # length and use alphanumeric letters only.
254
+ # @param event_subscription_update_parameters
255
+ # [EventSubscriptionUpdateParameters] Updated event subscription information.
256
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
257
+ # will be added to the HTTP request.
258
+ #
259
+ # @return [EventSubscription] operation results.
260
+ #
261
+ def update(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
262
+ response = update_async(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers).value!
263
+ response.body unless response.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_topic_name [String] Name of the partner topic.
270
+ # @param event_subscription_name [String] Name of the event subscription to be
271
+ # created. Event subscription names must be between 3 and 100 characters in
272
+ # length and use alphanumeric letters only.
273
+ # @param event_subscription_update_parameters
274
+ # [EventSubscriptionUpdateParameters] Updated event subscription information.
275
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
276
+ # will be added to the HTTP request.
277
+ #
278
+ # @return [Concurrent::Promise] promise which provides async access to http
279
+ # response.
280
+ #
281
+ def update_async(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
282
+ # Send request
283
+ promise = begin_update_async(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers)
284
+
285
+ promise = promise.then do |response|
286
+ # Defining deserialization method.
287
+ deserialize_method = lambda do |parsed_response|
288
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper()
289
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
290
+ end
291
+
292
+ # Waiting for response.
293
+ @client.get_long_running_operation_result(response, deserialize_method)
294
+ end
295
+
296
+ promise
297
+ end
298
+
299
+ #
300
+ # Get full URL of an event subscription of a partner topic.
301
+ #
302
+ # Get the full endpoint URL for an event subscription of a partner topic.
303
+ #
304
+ # @param resource_group_name [String] The name of the resource group within the
305
+ # user's subscription.
306
+ # @param partner_topic_name [String] Name of the partner topic.
307
+ # @param event_subscription_name [String] Name of the event subscription to be
308
+ # created. Event subscription names must be between 3 and 100 characters in
309
+ # length and use alphanumeric letters only.
310
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
311
+ # will be added to the HTTP request.
312
+ #
313
+ # @return [EventSubscriptionFullUrl] operation results.
314
+ #
315
+ def get_full_url(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:nil)
316
+ response = get_full_url_async(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:custom_headers).value!
317
+ response.body unless response.nil?
318
+ end
319
+
320
+ #
321
+ # Get full URL of an event subscription of a partner topic.
322
+ #
323
+ # Get the full endpoint URL for an event subscription of a partner topic.
324
+ #
325
+ # @param resource_group_name [String] The name of the resource group within the
326
+ # user's subscription.
327
+ # @param partner_topic_name [String] Name of the partner topic.
328
+ # @param event_subscription_name [String] Name of the event subscription to be
329
+ # created. Event subscription names must be between 3 and 100 characters in
330
+ # length and use alphanumeric letters only.
331
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
332
+ # will be added to the HTTP request.
333
+ #
334
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
335
+ #
336
+ def get_full_url_with_http_info(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:nil)
337
+ get_full_url_async(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:custom_headers).value!
338
+ end
339
+
340
+ #
341
+ # Get full URL of an event subscription of a partner topic.
342
+ #
343
+ # Get the full endpoint URL for an event subscription of a partner topic.
344
+ #
345
+ # @param resource_group_name [String] The name of the resource group within the
346
+ # user's subscription.
347
+ # @param partner_topic_name [String] Name of the partner topic.
348
+ # @param event_subscription_name [String] Name of the event subscription to be
349
+ # created. Event subscription names must be between 3 and 100 characters in
350
+ # length and use alphanumeric letters only.
351
+ # @param [Hash{String => String}] A hash of custom headers that will be added
352
+ # to the HTTP request.
353
+ #
354
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
355
+ #
356
+ def get_full_url_async(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:nil)
357
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
358
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
359
+ fail ArgumentError, 'partner_topic_name is nil' if partner_topic_name.nil?
360
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
361
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
362
+
363
+
364
+ request_headers = {}
365
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
366
+
367
+ # Set Headers
368
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
369
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
370
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl'
371
+
372
+ request_url = @base_url || @client.base_url
373
+
374
+ options = {
375
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
376
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'partnerTopicName' => partner_topic_name,'eventSubscriptionName' => event_subscription_name},
377
+ query_params: {'api-version' => @client.api_version},
378
+ headers: request_headers.merge(custom_headers || {}),
379
+ base_url: request_url
380
+ }
381
+ promise = @client.make_request_async(:post, path_template, options)
382
+
383
+ promise = promise.then do |result|
384
+ http_response = result.response
385
+ status_code = http_response.status
386
+ response_content = http_response.body
387
+ unless status_code == 200
388
+ error_model = JSON.load(response_content)
389
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
390
+ end
391
+
392
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
393
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
394
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
395
+ # Deserialize Response
396
+ if status_code == 200
397
+ begin
398
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
399
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionFullUrl.mapper()
400
+ result.body = @client.deserialize(result_mapper, parsed_response)
401
+ rescue Exception => e
402
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
403
+ end
404
+ end
405
+
406
+ result
407
+ end
408
+
409
+ promise.execute
410
+ end
411
+
412
+ #
413
+ # List event subscriptions of a partner topic.
414
+ #
415
+ # List event subscriptions that belong to a specific partner topic.
416
+ #
417
+ # @param resource_group_name [String] The name of the resource group within the
418
+ # user's subscription.
419
+ # @param partner_topic_name [String] Name of the partner topic.
420
+ # @param filter [String] The query used to filter the search results using
421
+ # OData syntax. Filtering is permitted on the 'name' property only and with
422
+ # limited number of OData operations. These operations are: the 'contains'
423
+ # function as well as the following logical operations: not, and, or, eq (for
424
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
425
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
426
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
427
+ # $filter=location eq 'westus'.
428
+ # @param top [Integer] The number of results to return per page for the list
429
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
430
+ # default number of results to be returned is 20 items per page.
431
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
432
+ # will be added to the HTTP request.
433
+ #
434
+ # @return [Array<EventSubscription>] operation results.
435
+ #
436
+ def list_by_partner_topic(resource_group_name, partner_topic_name, filter:nil, top:nil, custom_headers:nil)
437
+ first_page = list_by_partner_topic_as_lazy(resource_group_name, partner_topic_name, filter:filter, top:top, custom_headers:custom_headers)
438
+ first_page.get_all_items
439
+ end
440
+
441
+ #
442
+ # List event subscriptions of a partner topic.
443
+ #
444
+ # List event subscriptions that belong to a specific partner topic.
445
+ #
446
+ # @param resource_group_name [String] The name of the resource group within the
447
+ # user's subscription.
448
+ # @param partner_topic_name [String] Name of the partner topic.
449
+ # @param filter [String] The query used to filter the search results using
450
+ # OData syntax. Filtering is permitted on the 'name' property only and with
451
+ # limited number of OData operations. These operations are: the 'contains'
452
+ # function as well as the following logical operations: not, and, or, eq (for
453
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
454
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
455
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
456
+ # $filter=location eq 'westus'.
457
+ # @param top [Integer] The number of results to return per page for the list
458
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
459
+ # default number of results to be returned is 20 items per page.
460
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
461
+ # will be added to the HTTP request.
462
+ #
463
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
464
+ #
465
+ def list_by_partner_topic_with_http_info(resource_group_name, partner_topic_name, filter:nil, top:nil, custom_headers:nil)
466
+ list_by_partner_topic_async(resource_group_name, partner_topic_name, filter:filter, top:top, custom_headers:custom_headers).value!
467
+ end
468
+
469
+ #
470
+ # List event subscriptions of a partner topic.
471
+ #
472
+ # List event subscriptions that belong to a specific partner topic.
473
+ #
474
+ # @param resource_group_name [String] The name of the resource group within the
475
+ # user's subscription.
476
+ # @param partner_topic_name [String] Name of the partner topic.
477
+ # @param filter [String] The query used to filter the search results using
478
+ # OData syntax. Filtering is permitted on the 'name' property only and with
479
+ # limited number of OData operations. These operations are: the 'contains'
480
+ # function as well as the following logical operations: not, and, or, eq (for
481
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
482
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
483
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
484
+ # $filter=location eq 'westus'.
485
+ # @param top [Integer] The number of results to return per page for the list
486
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
487
+ # default number of results to be returned is 20 items per page.
488
+ # @param [Hash{String => String}] A hash of custom headers that will be added
489
+ # to the HTTP request.
490
+ #
491
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
492
+ #
493
+ def list_by_partner_topic_async(resource_group_name, partner_topic_name, filter:nil, top:nil, custom_headers:nil)
494
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
495
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
496
+ fail ArgumentError, 'partner_topic_name is nil' if partner_topic_name.nil?
497
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
498
+
499
+
500
+ request_headers = {}
501
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
502
+
503
+ # Set Headers
504
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
505
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
506
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions'
507
+
508
+ request_url = @base_url || @client.base_url
509
+
510
+ options = {
511
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
512
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'partnerTopicName' => partner_topic_name},
513
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top},
514
+ headers: request_headers.merge(custom_headers || {}),
515
+ base_url: request_url
516
+ }
517
+ promise = @client.make_request_async(:get, path_template, options)
518
+
519
+ promise = promise.then do |result|
520
+ http_response = result.response
521
+ status_code = http_response.status
522
+ response_content = http_response.body
523
+ unless status_code == 200
524
+ error_model = JSON.load(response_content)
525
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
526
+ end
527
+
528
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
529
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
530
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
531
+ # Deserialize Response
532
+ if status_code == 200
533
+ begin
534
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
535
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper()
536
+ result.body = @client.deserialize(result_mapper, parsed_response)
537
+ rescue Exception => e
538
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
539
+ end
540
+ end
541
+
542
+ result
543
+ end
544
+
545
+ promise.execute
546
+ end
547
+
548
+ #
549
+ # Get delivery attributes for an event subscription of a partner topic.
550
+ #
551
+ # Get all delivery attributes for an event subscription of a partner topic.
552
+ #
553
+ # @param resource_group_name [String] The name of the resource group within the
554
+ # user's subscription.
555
+ # @param partner_topic_name [String] Name of the partner topic.
556
+ # @param event_subscription_name [String] Name of the event subscription to be
557
+ # created. Event subscription names must be between 3 and 100 characters in
558
+ # length and use alphanumeric letters only.
559
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
560
+ # will be added to the HTTP request.
561
+ #
562
+ # @return [DeliveryAttributeListResult] operation results.
563
+ #
564
+ def get_delivery_attributes(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:nil)
565
+ response = get_delivery_attributes_async(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:custom_headers).value!
566
+ response.body unless response.nil?
567
+ end
568
+
569
+ #
570
+ # Get delivery attributes for an event subscription of a partner topic.
571
+ #
572
+ # Get all delivery attributes for an event subscription of a partner topic.
573
+ #
574
+ # @param resource_group_name [String] The name of the resource group within the
575
+ # user's subscription.
576
+ # @param partner_topic_name [String] Name of the partner topic.
577
+ # @param event_subscription_name [String] Name of the event subscription to be
578
+ # created. Event subscription names must be between 3 and 100 characters in
579
+ # length and use alphanumeric letters only.
580
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
581
+ # will be added to the HTTP request.
582
+ #
583
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
584
+ #
585
+ def get_delivery_attributes_with_http_info(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:nil)
586
+ get_delivery_attributes_async(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:custom_headers).value!
587
+ end
588
+
589
+ #
590
+ # Get delivery attributes for an event subscription of a partner topic.
591
+ #
592
+ # Get all delivery attributes for an event subscription of a partner topic.
593
+ #
594
+ # @param resource_group_name [String] The name of the resource group within the
595
+ # user's subscription.
596
+ # @param partner_topic_name [String] Name of the partner topic.
597
+ # @param event_subscription_name [String] Name of the event subscription to be
598
+ # created. Event subscription names must be between 3 and 100 characters in
599
+ # length and use alphanumeric letters only.
600
+ # @param [Hash{String => String}] A hash of custom headers that will be added
601
+ # to the HTTP request.
602
+ #
603
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
604
+ #
605
+ def get_delivery_attributes_async(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:nil)
606
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
607
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
608
+ fail ArgumentError, 'partner_topic_name is nil' if partner_topic_name.nil?
609
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
610
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
611
+
612
+
613
+ request_headers = {}
614
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
615
+
616
+ # Set Headers
617
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
618
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
619
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes'
620
+
621
+ request_url = @base_url || @client.base_url
622
+
623
+ options = {
624
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
625
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'partnerTopicName' => partner_topic_name,'eventSubscriptionName' => event_subscription_name},
626
+ query_params: {'api-version' => @client.api_version},
627
+ headers: request_headers.merge(custom_headers || {}),
628
+ base_url: request_url
629
+ }
630
+ promise = @client.make_request_async(:post, path_template, options)
631
+
632
+ promise = promise.then do |result|
633
+ http_response = result.response
634
+ status_code = http_response.status
635
+ response_content = http_response.body
636
+ unless status_code == 200
637
+ error_model = JSON.load(response_content)
638
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
639
+ end
640
+
641
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
642
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
643
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
644
+ # Deserialize Response
645
+ if status_code == 200
646
+ begin
647
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
648
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::DeliveryAttributeListResult.mapper()
649
+ result.body = @client.deserialize(result_mapper, parsed_response)
650
+ rescue Exception => e
651
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
652
+ end
653
+ end
654
+
655
+ result
656
+ end
657
+
658
+ promise.execute
659
+ end
660
+
661
+ #
662
+ # Create or update an event subscription of a partner topic.
663
+ #
664
+ # Asynchronously creates or updates an event subscription of a partner topic
665
+ # with the specified parameters. Existing event subscriptions will be updated
666
+ # with this API.
667
+ #
668
+ # @param resource_group_name [String] The name of the resource group within the
669
+ # user's subscription.
670
+ # @param partner_topic_name [String] Name of the partner topic.
671
+ # @param event_subscription_name [String] Name of the event subscription to be
672
+ # created. Event subscription names must be between 3 and 100 characters in
673
+ # length and use alphanumeric letters only.
674
+ # @param event_subscription_info [EventSubscription] Event subscription
675
+ # properties containing the destination and filter information.
676
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
677
+ # will be added to the HTTP request.
678
+ #
679
+ # @return [EventSubscription] operation results.
680
+ #
681
+ def begin_create_or_update(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_info, custom_headers:nil)
682
+ response = begin_create_or_update_async(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value!
683
+ response.body unless response.nil?
684
+ end
685
+
686
+ #
687
+ # Create or update an event subscription of a partner topic.
688
+ #
689
+ # Asynchronously creates or updates an event subscription of a partner topic
690
+ # with the specified parameters. Existing event subscriptions will be updated
691
+ # with this API.
692
+ #
693
+ # @param resource_group_name [String] The name of the resource group within the
694
+ # user's subscription.
695
+ # @param partner_topic_name [String] Name of the partner topic.
696
+ # @param event_subscription_name [String] Name of the event subscription to be
697
+ # created. Event subscription names must be between 3 and 100 characters in
698
+ # length and use alphanumeric letters only.
699
+ # @param event_subscription_info [EventSubscription] Event subscription
700
+ # properties containing the destination and filter information.
701
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
702
+ # will be added to the HTTP request.
703
+ #
704
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
705
+ #
706
+ def begin_create_or_update_with_http_info(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_info, custom_headers:nil)
707
+ begin_create_or_update_async(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value!
708
+ end
709
+
710
+ #
711
+ # Create or update an event subscription of a partner topic.
712
+ #
713
+ # Asynchronously creates or updates an event subscription of a partner topic
714
+ # with the specified parameters. Existing event subscriptions will be updated
715
+ # with this API.
716
+ #
717
+ # @param resource_group_name [String] The name of the resource group within the
718
+ # user's subscription.
719
+ # @param partner_topic_name [String] Name of the partner topic.
720
+ # @param event_subscription_name [String] Name of the event subscription to be
721
+ # created. Event subscription names must be between 3 and 100 characters in
722
+ # length and use alphanumeric letters only.
723
+ # @param event_subscription_info [EventSubscription] Event subscription
724
+ # properties containing the destination and filter information.
725
+ # @param [Hash{String => String}] A hash of custom headers that will be added
726
+ # to the HTTP request.
727
+ #
728
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
729
+ #
730
+ def begin_create_or_update_async(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_info, custom_headers:nil)
731
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
732
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
733
+ fail ArgumentError, 'partner_topic_name is nil' if partner_topic_name.nil?
734
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
735
+ fail ArgumentError, 'event_subscription_info is nil' if event_subscription_info.nil?
736
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
737
+
738
+
739
+ request_headers = {}
740
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
741
+
742
+ # Set Headers
743
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
744
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
745
+
746
+ # Serialize Request
747
+ request_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper()
748
+ request_content = @client.serialize(request_mapper, event_subscription_info)
749
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
750
+
751
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'
752
+
753
+ request_url = @base_url || @client.base_url
754
+
755
+ options = {
756
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
757
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'partnerTopicName' => partner_topic_name,'eventSubscriptionName' => event_subscription_name},
758
+ query_params: {'api-version' => @client.api_version},
759
+ body: request_content,
760
+ headers: request_headers.merge(custom_headers || {}),
761
+ base_url: request_url
762
+ }
763
+ promise = @client.make_request_async(:put, path_template, options)
764
+
765
+ promise = promise.then do |result|
766
+ http_response = result.response
767
+ status_code = http_response.status
768
+ response_content = http_response.body
769
+ unless status_code == 201
770
+ error_model = JSON.load(response_content)
771
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
772
+ end
773
+
774
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
775
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
776
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
777
+ # Deserialize Response
778
+ if status_code == 201
779
+ begin
780
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
781
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper()
782
+ result.body = @client.deserialize(result_mapper, parsed_response)
783
+ rescue Exception => e
784
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
785
+ end
786
+ end
787
+
788
+ result
789
+ end
790
+
791
+ promise.execute
792
+ end
793
+
794
+ #
795
+ # Delete an event subscription of a partner topic.
796
+ #
797
+ # Delete an event subscription of a partner topic.
798
+ #
799
+ # @param resource_group_name [String] The name of the resource group within the
800
+ # user's subscription.
801
+ # @param partner_topic_name [String] Name of the partner topic.
802
+ # @param event_subscription_name [String] Name of the event subscription to be
803
+ # created. Event subscription names must be between 3 and 100 characters in
804
+ # length and use alphanumeric letters only.
805
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
806
+ # will be added to the HTTP request.
807
+ #
808
+ #
809
+ def begin_delete(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:nil)
810
+ response = begin_delete_async(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:custom_headers).value!
811
+ nil
812
+ end
813
+
814
+ #
815
+ # Delete an event subscription of a partner topic.
816
+ #
817
+ # Delete an event subscription of a partner topic.
818
+ #
819
+ # @param resource_group_name [String] The name of the resource group within the
820
+ # user's subscription.
821
+ # @param partner_topic_name [String] Name of the partner topic.
822
+ # @param event_subscription_name [String] Name of the event subscription to be
823
+ # created. Event subscription names must be between 3 and 100 characters in
824
+ # length and use alphanumeric letters only.
825
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
826
+ # will be added to the HTTP request.
827
+ #
828
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
829
+ #
830
+ def begin_delete_with_http_info(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:nil)
831
+ begin_delete_async(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:custom_headers).value!
832
+ end
833
+
834
+ #
835
+ # Delete an event subscription of a partner topic.
836
+ #
837
+ # Delete an event subscription of a partner topic.
838
+ #
839
+ # @param resource_group_name [String] The name of the resource group within the
840
+ # user's subscription.
841
+ # @param partner_topic_name [String] Name of the partner topic.
842
+ # @param event_subscription_name [String] Name of the event subscription to be
843
+ # created. Event subscription names must be between 3 and 100 characters in
844
+ # length and use alphanumeric letters only.
845
+ # @param [Hash{String => String}] A hash of custom headers that will be added
846
+ # to the HTTP request.
847
+ #
848
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
849
+ #
850
+ def begin_delete_async(resource_group_name, partner_topic_name, event_subscription_name, custom_headers:nil)
851
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
852
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
853
+ fail ArgumentError, 'partner_topic_name is nil' if partner_topic_name.nil?
854
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
855
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
856
+
857
+
858
+ request_headers = {}
859
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
860
+
861
+ # Set Headers
862
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
863
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
864
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'
865
+
866
+ request_url = @base_url || @client.base_url
867
+
868
+ options = {
869
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
870
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'partnerTopicName' => partner_topic_name,'eventSubscriptionName' => event_subscription_name},
871
+ query_params: {'api-version' => @client.api_version},
872
+ headers: request_headers.merge(custom_headers || {}),
873
+ base_url: request_url
874
+ }
875
+ promise = @client.make_request_async(:delete, path_template, options)
876
+
877
+ promise = promise.then do |result|
878
+ http_response = result.response
879
+ status_code = http_response.status
880
+ response_content = http_response.body
881
+ unless status_code == 200 || status_code == 202 || status_code == 204
882
+ error_model = JSON.load(response_content)
883
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
884
+ end
885
+
886
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
887
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
888
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
889
+
890
+ result
891
+ end
892
+
893
+ promise.execute
894
+ end
895
+
896
+ #
897
+ # Update event subscription of a partner topic.
898
+ #
899
+ # Update event subscription of a partner topic.
900
+ #
901
+ # @param resource_group_name [String] The name of the resource group within the
902
+ # user's subscription.
903
+ # @param partner_topic_name [String] Name of the partner topic.
904
+ # @param event_subscription_name [String] Name of the event subscription to be
905
+ # created. Event subscription names must be between 3 and 100 characters in
906
+ # length and use alphanumeric letters only.
907
+ # @param event_subscription_update_parameters
908
+ # [EventSubscriptionUpdateParameters] Updated event subscription information.
909
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
910
+ # will be added to the HTTP request.
911
+ #
912
+ # @return [EventSubscription] operation results.
913
+ #
914
+ def begin_update(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
915
+ response = begin_update_async(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers).value!
916
+ response.body unless response.nil?
917
+ end
918
+
919
+ #
920
+ # Update event subscription of a partner topic.
921
+ #
922
+ # Update event subscription of a partner topic.
923
+ #
924
+ # @param resource_group_name [String] The name of the resource group within the
925
+ # user's subscription.
926
+ # @param partner_topic_name [String] Name of the partner topic.
927
+ # @param event_subscription_name [String] Name of the event subscription to be
928
+ # created. Event subscription names must be between 3 and 100 characters in
929
+ # length and use alphanumeric letters only.
930
+ # @param event_subscription_update_parameters
931
+ # [EventSubscriptionUpdateParameters] Updated event subscription information.
932
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
933
+ # will be added to the HTTP request.
934
+ #
935
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
936
+ #
937
+ def begin_update_with_http_info(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
938
+ begin_update_async(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers).value!
939
+ end
940
+
941
+ #
942
+ # Update event subscription of a partner topic.
943
+ #
944
+ # Update event subscription of a partner topic.
945
+ #
946
+ # @param resource_group_name [String] The name of the resource group within the
947
+ # user's subscription.
948
+ # @param partner_topic_name [String] Name of the partner topic.
949
+ # @param event_subscription_name [String] Name of the event subscription to be
950
+ # created. Event subscription names must be between 3 and 100 characters in
951
+ # length and use alphanumeric letters only.
952
+ # @param event_subscription_update_parameters
953
+ # [EventSubscriptionUpdateParameters] Updated event subscription information.
954
+ # @param [Hash{String => String}] A hash of custom headers that will be added
955
+ # to the HTTP request.
956
+ #
957
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
958
+ #
959
+ def begin_update_async(resource_group_name, partner_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
960
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
961
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
962
+ fail ArgumentError, 'partner_topic_name is nil' if partner_topic_name.nil?
963
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
964
+ fail ArgumentError, 'event_subscription_update_parameters is nil' if event_subscription_update_parameters.nil?
965
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
966
+
967
+
968
+ request_headers = {}
969
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
970
+
971
+ # Set Headers
972
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
973
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
974
+
975
+ # Serialize Request
976
+ request_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionUpdateParameters.mapper()
977
+ request_content = @client.serialize(request_mapper, event_subscription_update_parameters)
978
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
979
+
980
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'
981
+
982
+ request_url = @base_url || @client.base_url
983
+
984
+ options = {
985
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
986
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'partnerTopicName' => partner_topic_name,'eventSubscriptionName' => event_subscription_name},
987
+ query_params: {'api-version' => @client.api_version},
988
+ body: request_content,
989
+ headers: request_headers.merge(custom_headers || {}),
990
+ base_url: request_url
991
+ }
992
+ promise = @client.make_request_async(:patch, path_template, options)
993
+
994
+ promise = promise.then do |result|
995
+ http_response = result.response
996
+ status_code = http_response.status
997
+ response_content = http_response.body
998
+ unless status_code == 201
999
+ error_model = JSON.load(response_content)
1000
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1001
+ end
1002
+
1003
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1004
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1005
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1006
+ # Deserialize Response
1007
+ if status_code == 201
1008
+ begin
1009
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1010
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper()
1011
+ result.body = @client.deserialize(result_mapper, parsed_response)
1012
+ rescue Exception => e
1013
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1014
+ end
1015
+ end
1016
+
1017
+ result
1018
+ end
1019
+
1020
+ promise.execute
1021
+ end
1022
+
1023
+ #
1024
+ # List event subscriptions of a partner topic.
1025
+ #
1026
+ # List event subscriptions that belong to a specific partner topic.
1027
+ #
1028
+ # @param next_page_link [String] The NextLink from the previous successful call
1029
+ # to List operation.
1030
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1031
+ # will be added to the HTTP request.
1032
+ #
1033
+ # @return [EventSubscriptionsListResult] operation results.
1034
+ #
1035
+ def list_by_partner_topic_next(next_page_link, custom_headers:nil)
1036
+ response = list_by_partner_topic_next_async(next_page_link, custom_headers:custom_headers).value!
1037
+ response.body unless response.nil?
1038
+ end
1039
+
1040
+ #
1041
+ # List event subscriptions of a partner topic.
1042
+ #
1043
+ # List event subscriptions that belong to a specific partner topic.
1044
+ #
1045
+ # @param next_page_link [String] The NextLink from the previous successful call
1046
+ # to List operation.
1047
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1048
+ # will be added to the HTTP request.
1049
+ #
1050
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1051
+ #
1052
+ def list_by_partner_topic_next_with_http_info(next_page_link, custom_headers:nil)
1053
+ list_by_partner_topic_next_async(next_page_link, custom_headers:custom_headers).value!
1054
+ end
1055
+
1056
+ #
1057
+ # List event subscriptions of a partner topic.
1058
+ #
1059
+ # List event subscriptions that belong to a specific partner topic.
1060
+ #
1061
+ # @param next_page_link [String] The NextLink from the previous successful call
1062
+ # to List operation.
1063
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1064
+ # to the HTTP request.
1065
+ #
1066
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1067
+ #
1068
+ def list_by_partner_topic_next_async(next_page_link, custom_headers:nil)
1069
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1070
+
1071
+
1072
+ request_headers = {}
1073
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1074
+
1075
+ # Set Headers
1076
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1077
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1078
+ path_template = '{nextLink}'
1079
+
1080
+ request_url = @base_url || @client.base_url
1081
+
1082
+ options = {
1083
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1084
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1085
+ headers: request_headers.merge(custom_headers || {}),
1086
+ base_url: request_url
1087
+ }
1088
+ promise = @client.make_request_async(:get, path_template, options)
1089
+
1090
+ promise = promise.then do |result|
1091
+ http_response = result.response
1092
+ status_code = http_response.status
1093
+ response_content = http_response.body
1094
+ unless status_code == 200
1095
+ error_model = JSON.load(response_content)
1096
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1097
+ end
1098
+
1099
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1100
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1101
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1102
+ # Deserialize Response
1103
+ if status_code == 200
1104
+ begin
1105
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1106
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper()
1107
+ result.body = @client.deserialize(result_mapper, parsed_response)
1108
+ rescue Exception => e
1109
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1110
+ end
1111
+ end
1112
+
1113
+ result
1114
+ end
1115
+
1116
+ promise.execute
1117
+ end
1118
+
1119
+ #
1120
+ # List event subscriptions of a partner topic.
1121
+ #
1122
+ # List event subscriptions that belong to a specific partner topic.
1123
+ #
1124
+ # @param resource_group_name [String] The name of the resource group within the
1125
+ # user's subscription.
1126
+ # @param partner_topic_name [String] Name of the partner topic.
1127
+ # @param filter [String] The query used to filter the search results using
1128
+ # OData syntax. Filtering is permitted on the 'name' property only and with
1129
+ # limited number of OData operations. These operations are: the 'contains'
1130
+ # function as well as the following logical operations: not, and, or, eq (for
1131
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
1132
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
1133
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
1134
+ # $filter=location eq 'westus'.
1135
+ # @param top [Integer] The number of results to return per page for the list
1136
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
1137
+ # default number of results to be returned is 20 items per page.
1138
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1139
+ # will be added to the HTTP request.
1140
+ #
1141
+ # @return [EventSubscriptionsListResult] which provide lazy access to pages of
1142
+ # the response.
1143
+ #
1144
+ def list_by_partner_topic_as_lazy(resource_group_name, partner_topic_name, filter:nil, top:nil, custom_headers:nil)
1145
+ response = list_by_partner_topic_async(resource_group_name, partner_topic_name, filter:filter, top:top, custom_headers:custom_headers).value!
1146
+ unless response.nil?
1147
+ page = response.body
1148
+ page.next_method = Proc.new do |next_page_link|
1149
+ list_by_partner_topic_next_async(next_page_link, custom_headers:custom_headers)
1150
+ end
1151
+ page
1152
+ end
1153
+ end
1154
+
1155
+ end
1156
+ end