azure_mgmt_event_grid 0.18.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) 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.rb +39 -39
  12. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/event_channels.rb +106 -62
  13. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  14. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/connection_state.rb +1 -1
  15. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_channel.rb +56 -0
  16. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_channel_filter.rb +58 -0
  17. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_registration.rb +58 -1
  18. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_registration_update_parameters.rb +20 -0
  19. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_topic.rb +28 -0
  20. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_topic_readiness_state.rb +18 -0
  21. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/private_endpoint_connection.rb +2 -1
  22. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/resource_sku.rb +2 -3
  23. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/topic.rb +1 -2
  24. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/partner_topic_event_subscriptions.rb +173 -8
  25. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/private_endpoint_connections.rb +27 -9
  26. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/system_topic_event_subscriptions.rb +173 -8
  27. data/lib/2020-06-01/generated/azure_mgmt_event_grid.rb +108 -0
  28. data/lib/2020-06-01/generated/azure_mgmt_event_grid/domain_topics.rb +699 -0
  29. data/lib/2020-06-01/generated/azure_mgmt_event_grid/domains.rb +1328 -0
  30. data/lib/2020-06-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +161 -0
  31. data/lib/2020-06-01/generated/azure_mgmt_event_grid/event_subscriptions.rb +3648 -0
  32. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/advanced_filter.rb +74 -0
  33. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/azure_function_event_subscription_destination.rb +86 -0
  34. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/bool_equals_advanced_filter.rb +69 -0
  35. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/connection_state.rb +69 -0
  36. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb +50 -0
  37. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/domain.rb +212 -0
  38. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/domain_provisioning_state.rb +20 -0
  39. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/domain_regenerate_key_request.rb +46 -0
  40. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/domain_shared_access_keys.rb +57 -0
  41. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/domain_topic.rb +75 -0
  42. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/domain_topic_provisioning_state.rb +20 -0
  43. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/domain_topics_list_result.rb +98 -0
  44. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/domain_update_parameters.rb +91 -0
  45. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/domains_list_result.rb +98 -0
  46. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/event_delivery_schema.rb +17 -0
  47. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +62 -0
  48. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/event_subscription.rb +189 -0
  49. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +52 -0
  50. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +120 -0
  51. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -0
  52. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +21 -0
  53. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +137 -0
  54. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +98 -0
  55. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/event_type.rb +106 -0
  56. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -0
  57. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb +64 -0
  58. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/inbound_ip_rule.rb +59 -0
  59. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/input_schema.rb +17 -0
  60. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/input_schema_mapping.rb +49 -0
  61. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/ip_action_type.rb +15 -0
  62. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/json_field.rb +50 -0
  63. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/json_field_with_default.rb +67 -0
  64. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/json_input_schema_mapping.rb +130 -0
  65. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/number_greater_than_advanced_filter.rb +69 -0
  66. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/number_greater_than_or_equals_advanced_filter.rb +69 -0
  67. data/lib/{2020-04-01-preview/generated/azure_mgmt_event_grid/models/sku_definitions_for_resource_type.rb → 2020-06-01/generated/azure_mgmt_event_grid/models/number_in_advanced_filter.rb} +28 -18
  68. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/number_less_than_advanced_filter.rb +69 -0
  69. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/number_less_than_or_equals_advanced_filter.rb +69 -0
  70. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/number_not_in_advanced_filter.rb +77 -0
  71. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/operation.rb +80 -0
  72. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -0
  73. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -0
  74. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/persisted_connection_status.rb +18 -0
  75. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/private_endpoint.rb +46 -0
  76. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/private_endpoint_connection.rb +121 -0
  77. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/private_endpoint_connection_list_result.rb +100 -0
  78. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/private_link_resource.rb +128 -0
  79. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/private_link_resources_list_result.rb +99 -0
  80. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/public_network_access.rb +16 -0
  81. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/resource.rb +80 -0
  82. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/resource_provisioning_state.rb +20 -0
  83. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -0
  84. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/retry_policy.rb +57 -0
  85. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/service_bus_queue_event_subscription_destination.rb +63 -0
  86. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/service_bus_topic_event_subscription_destination.rb +64 -0
  87. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb +74 -0
  88. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb +75 -0
  89. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/string_begins_with_advanced_filter.rb +77 -0
  90. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/string_contains_advanced_filter.rb +77 -0
  91. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/string_ends_with_advanced_filter.rb +77 -0
  92. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/string_in_advanced_filter.rb +77 -0
  93. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/string_not_in_advanced_filter.rb +77 -0
  94. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/topic.rb +213 -0
  95. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -0
  96. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -0
  97. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -0
  98. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/topic_type_info.rb +150 -0
  99. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -0
  100. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -0
  101. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +91 -0
  102. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/topics_list_result.rb +98 -0
  103. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -0
  104. data/lib/2020-06-01/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +122 -0
  105. data/lib/2020-06-01/generated/azure_mgmt_event_grid/module_definition.rb +9 -0
  106. data/lib/2020-06-01/generated/azure_mgmt_event_grid/operations.rb +118 -0
  107. data/lib/2020-06-01/generated/azure_mgmt_event_grid/private_endpoint_connections.rb +791 -0
  108. data/lib/2020-06-01/generated/azure_mgmt_event_grid/private_link_resources.rb +423 -0
  109. data/lib/2020-06-01/generated/azure_mgmt_event_grid/topic_types.rb +305 -0
  110. data/lib/2020-06-01/generated/azure_mgmt_event_grid/topics.rb +1439 -0
  111. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid.rb +171 -0
  112. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/domain_topics.rb +699 -0
  113. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/domains.rb +1328 -0
  114. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_channels.rb +658 -0
  115. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +194 -0
  116. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb +3775 -0
  117. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/extension_topics.rb +141 -0
  118. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/advanced_filter.rb +81 -0
  119. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/azure_function_event_subscription_destination.rb +112 -0
  120. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/bool_equals_advanced_filter.rb +69 -0
  121. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/connection_state.rb +69 -0
  122. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/created_by_type.rb +18 -0
  123. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb +50 -0
  124. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/dead_letter_with_resource_identity.rb +66 -0
  125. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/delivery_attribute_list_result.rb +58 -0
  126. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/delivery_attribute_mapping.rb +58 -0
  127. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/delivery_with_resource_identity.rb +67 -0
  128. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain.rb +253 -0
  129. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_provisioning_state.rb +20 -0
  130. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_regenerate_key_request.rb +46 -0
  131. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_shared_access_keys.rb +57 -0
  132. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_topic.rb +89 -0
  133. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_topic_provisioning_state.rb +20 -0
  134. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_topics_list_result.rb +98 -0
  135. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_update_parameters.rb +117 -0
  136. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domains_list_result.rb +98 -0
  137. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/dynamic_delivery_attribute_mapping.rb +69 -0
  138. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel.rb +172 -0
  139. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_destination.rb +75 -0
  140. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_filter.rb +70 -0
  141. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_provisioning_state.rb +20 -0
  142. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_source.rb +48 -0
  143. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channels_list_result.rb +98 -0
  144. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_delivery_schema.rb +17 -0
  145. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +84 -0
  146. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription.rb +244 -0
  147. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +52 -0
  148. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +132 -0
  149. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -0
  150. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_identity.rb +61 -0
  151. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_identity_type.rb +16 -0
  152. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +21 -0
  153. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +176 -0
  154. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +98 -0
  155. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_type.rb +106 -0
  156. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -0
  157. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/extended_location.rb +57 -0
  158. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/extension_topic.rb +86 -0
  159. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb +86 -0
  160. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/identity_info.rb +96 -0
  161. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/identity_type.rb +18 -0
  162. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/inbound_ip_rule.rb +59 -0
  163. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/input_schema.rb +17 -0
  164. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/input_schema_mapping.rb +49 -0
  165. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/ip_action_type.rb +15 -0
  166. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/is_not_null_advanced_filter.rb +58 -0
  167. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/is_null_or_undefined_advanced_filter.rb +58 -0
  168. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/json_field.rb +50 -0
  169. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/json_field_with_default.rb +67 -0
  170. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/json_input_schema_mapping.rb +130 -0
  171. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_greater_than_advanced_filter.rb +69 -0
  172. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_greater_than_or_equals_advanced_filter.rb +69 -0
  173. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_in_advanced_filter.rb +77 -0
  174. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_in_range_advanced_filter.rb +85 -0
  175. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_less_than_advanced_filter.rb +69 -0
  176. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_less_than_or_equals_advanced_filter.rb +69 -0
  177. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_not_in_advanced_filter.rb +77 -0
  178. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_not_in_range_advanced_filter.rb +85 -0
  179. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/operation.rb +80 -0
  180. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -0
  181. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -0
  182. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace.rb +140 -0
  183. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_provisioning_state.rb +20 -0
  184. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_regenerate_key_request.rb +46 -0
  185. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_shared_access_keys.rb +57 -0
  186. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_update_parameters.rb +54 -0
  187. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespaces_list_result.rb +98 -0
  188. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration.rb +278 -0
  189. data/lib/{2020-04-01-preview/generated/azure_mgmt_event_grid/models/sku_definitions_for_resource_type_list_result.rb → 2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_event_types_list_result.rb} +12 -11
  190. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_provisioning_state.rb +20 -0
  191. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_update_parameters.rb +137 -0
  192. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_visibility_state.rb +17 -0
  193. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registrations_list_result.rb +99 -0
  194. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic.rb +179 -0
  195. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_activation_state.rb +17 -0
  196. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_provisioning_state.rb +20 -0
  197. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_readiness_state.rb +18 -0
  198. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_type.rb +134 -0
  199. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_type_authorization_state.rb +17 -0
  200. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_types_list_result.rb +55 -0
  201. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_update_parameters.rb +54 -0
  202. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topics_list_result.rb +98 -0
  203. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/persisted_connection_status.rb +18 -0
  204. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_endpoint.rb +46 -0
  205. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_endpoint_connection.rb +121 -0
  206. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_endpoint_connection_list_result.rb +100 -0
  207. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_link_resource.rb +128 -0
  208. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_link_resources_list_result.rb +99 -0
  209. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/public_network_access.rb +16 -0
  210. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource.rb +80 -0
  211. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_kind.rb +16 -0
  212. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_provisioning_state.rb +20 -0
  213. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -0
  214. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_sku.rb +47 -0
  215. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/retry_policy.rb +61 -0
  216. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/service_bus_queue_event_subscription_destination.rb +85 -0
  217. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/service_bus_topic_event_subscription_destination.rb +86 -0
  218. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/sku.rb +16 -0
  219. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/static_delivery_attribute_mapping.rb +81 -0
  220. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb +74 -0
  221. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb +86 -0
  222. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_begins_with_advanced_filter.rb +77 -0
  223. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_contains_advanced_filter.rb +77 -0
  224. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_ends_with_advanced_filter.rb +77 -0
  225. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_in_advanced_filter.rb +77 -0
  226. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_begins_with_advanced_filter.rb +77 -0
  227. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_contains_advanced_filter.rb +77 -0
  228. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_ends_with_advanced_filter.rb +77 -0
  229. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_in_advanced_filter.rb +77 -0
  230. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_data.rb +105 -0
  231. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_topic.rb +159 -0
  232. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_topic_update_parameters.rb +66 -0
  233. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_topics_list_result.rb +98 -0
  234. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic.rb +278 -0
  235. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -0
  236. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -0
  237. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -0
  238. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_type_info.rb +169 -0
  239. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -0
  240. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -0
  241. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +117 -0
  242. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topics_list_result.rb +98 -0
  243. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -0
  244. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/user_identity_properties.rb +57 -0
  245. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +148 -0
  246. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/module_definition.rb +9 -0
  247. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/operations.rb +118 -0
  248. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_namespaces.rb +1333 -0
  249. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_registrations.rb +1074 -0
  250. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_topic_event_subscriptions.rb +1156 -0
  251. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_topics.rb +1102 -0
  252. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/private_endpoint_connections.rb +791 -0
  253. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/private_link_resources.rb +423 -0
  254. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/system_topic_event_subscriptions.rb +1152 -0
  255. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/system_topics.rb +1128 -0
  256. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/topic_types.rb +305 -0
  257. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/topics.rb +1489 -0
  258. data/lib/azure_mgmt_event_grid.rb +8 -6
  259. data/lib/profiles/latest/modules/eventgrid_profile_module.rb +353 -293
  260. data/lib/version.rb +1 -1
  261. metadata +238 -7
@@ -0,0 +1,305 @@
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 TopicTypes
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the TopicTypes 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
+ # List topic types.
26
+ #
27
+ # List all registered topic types.
28
+ #
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [TopicTypesListResult] operation results.
33
+ #
34
+ def list(custom_headers:nil)
35
+ response = list_async(custom_headers:custom_headers).value!
36
+ response.body unless response.nil?
37
+ end
38
+
39
+ #
40
+ # List topic types.
41
+ #
42
+ # List all registered topic types.
43
+ #
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_with_http_info(custom_headers:nil)
50
+ list_async(custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # List topic types.
55
+ #
56
+ # List all registered topic types.
57
+ #
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_async(custom_headers:nil)
64
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
65
+
66
+
67
+ request_headers = {}
68
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
69
+
70
+ # Set Headers
71
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
72
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
73
+ path_template = 'providers/Microsoft.EventGrid/topicTypes'
74
+
75
+ request_url = @base_url || @client.base_url
76
+
77
+ options = {
78
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
79
+ query_params: {'api-version' => @client.api_version},
80
+ headers: request_headers.merge(custom_headers || {}),
81
+ base_url: request_url
82
+ }
83
+ promise = @client.make_request_async(:get, path_template, options)
84
+
85
+ promise = promise.then do |result|
86
+ http_response = result.response
87
+ status_code = http_response.status
88
+ response_content = http_response.body
89
+ unless status_code == 200
90
+ error_model = JSON.load(response_content)
91
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
92
+ end
93
+
94
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
95
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
96
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
97
+ # Deserialize Response
98
+ if status_code == 200
99
+ begin
100
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
101
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::TopicTypesListResult.mapper()
102
+ result.body = @client.deserialize(result_mapper, parsed_response)
103
+ rescue Exception => e
104
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
105
+ end
106
+ end
107
+
108
+ result
109
+ end
110
+
111
+ promise.execute
112
+ end
113
+
114
+ #
115
+ # Get a topic type.
116
+ #
117
+ # Get information about a topic type.
118
+ #
119
+ # @param topic_type_name [String] Name of the topic type.
120
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
121
+ # will be added to the HTTP request.
122
+ #
123
+ # @return [TopicTypeInfo] operation results.
124
+ #
125
+ def get(topic_type_name, custom_headers:nil)
126
+ response = get_async(topic_type_name, custom_headers:custom_headers).value!
127
+ response.body unless response.nil?
128
+ end
129
+
130
+ #
131
+ # Get a topic type.
132
+ #
133
+ # Get information about a topic type.
134
+ #
135
+ # @param topic_type_name [String] Name of the topic type.
136
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
137
+ # will be added to the HTTP request.
138
+ #
139
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
140
+ #
141
+ def get_with_http_info(topic_type_name, custom_headers:nil)
142
+ get_async(topic_type_name, custom_headers:custom_headers).value!
143
+ end
144
+
145
+ #
146
+ # Get a topic type.
147
+ #
148
+ # Get information about a topic type.
149
+ #
150
+ # @param topic_type_name [String] Name of the topic type.
151
+ # @param [Hash{String => String}] A hash of custom headers that will be added
152
+ # to the HTTP request.
153
+ #
154
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
155
+ #
156
+ def get_async(topic_type_name, custom_headers:nil)
157
+ fail ArgumentError, 'topic_type_name is nil' if topic_type_name.nil?
158
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
159
+
160
+
161
+ request_headers = {}
162
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
163
+
164
+ # Set Headers
165
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
166
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
167
+ path_template = 'providers/Microsoft.EventGrid/topicTypes/{topicTypeName}'
168
+
169
+ request_url = @base_url || @client.base_url
170
+
171
+ options = {
172
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
173
+ path_params: {'topicTypeName' => topic_type_name},
174
+ query_params: {'api-version' => @client.api_version},
175
+ headers: request_headers.merge(custom_headers || {}),
176
+ base_url: request_url
177
+ }
178
+ promise = @client.make_request_async(:get, path_template, options)
179
+
180
+ promise = promise.then do |result|
181
+ http_response = result.response
182
+ status_code = http_response.status
183
+ response_content = http_response.body
184
+ unless status_code == 200
185
+ error_model = JSON.load(response_content)
186
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
187
+ end
188
+
189
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
190
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
191
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
192
+ # Deserialize Response
193
+ if status_code == 200
194
+ begin
195
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
196
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::TopicTypeInfo.mapper()
197
+ result.body = @client.deserialize(result_mapper, parsed_response)
198
+ rescue Exception => e
199
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
200
+ end
201
+ end
202
+
203
+ result
204
+ end
205
+
206
+ promise.execute
207
+ end
208
+
209
+ #
210
+ # List event types.
211
+ #
212
+ # List event types for a topic type.
213
+ #
214
+ # @param topic_type_name [String] Name of the topic type.
215
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
216
+ # will be added to the HTTP request.
217
+ #
218
+ # @return [EventTypesListResult] operation results.
219
+ #
220
+ def list_event_types(topic_type_name, custom_headers:nil)
221
+ response = list_event_types_async(topic_type_name, custom_headers:custom_headers).value!
222
+ response.body unless response.nil?
223
+ end
224
+
225
+ #
226
+ # List event types.
227
+ #
228
+ # List event types for a topic type.
229
+ #
230
+ # @param topic_type_name [String] Name of the topic type.
231
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
232
+ # will be added to the HTTP request.
233
+ #
234
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
235
+ #
236
+ def list_event_types_with_http_info(topic_type_name, custom_headers:nil)
237
+ list_event_types_async(topic_type_name, custom_headers:custom_headers).value!
238
+ end
239
+
240
+ #
241
+ # List event types.
242
+ #
243
+ # List event types for a topic type.
244
+ #
245
+ # @param topic_type_name [String] Name of the topic type.
246
+ # @param [Hash{String => String}] A hash of custom headers that will be added
247
+ # to the HTTP request.
248
+ #
249
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
250
+ #
251
+ def list_event_types_async(topic_type_name, custom_headers:nil)
252
+ fail ArgumentError, 'topic_type_name is nil' if topic_type_name.nil?
253
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
254
+
255
+
256
+ request_headers = {}
257
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
258
+
259
+ # Set Headers
260
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
261
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
262
+ path_template = 'providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventTypes'
263
+
264
+ request_url = @base_url || @client.base_url
265
+
266
+ options = {
267
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
268
+ path_params: {'topicTypeName' => topic_type_name},
269
+ query_params: {'api-version' => @client.api_version},
270
+ headers: request_headers.merge(custom_headers || {}),
271
+ base_url: request_url
272
+ }
273
+ promise = @client.make_request_async(:get, path_template, options)
274
+
275
+ promise = promise.then do |result|
276
+ http_response = result.response
277
+ status_code = http_response.status
278
+ response_content = http_response.body
279
+ unless status_code == 200
280
+ error_model = JSON.load(response_content)
281
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
282
+ end
283
+
284
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
285
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
286
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
287
+ # Deserialize Response
288
+ if status_code == 200
289
+ begin
290
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
291
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventTypesListResult.mapper()
292
+ result.body = @client.deserialize(result_mapper, parsed_response)
293
+ rescue Exception => e
294
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
295
+ end
296
+ end
297
+
298
+ result
299
+ end
300
+
301
+ promise.execute
302
+ end
303
+
304
+ end
305
+ end
@@ -0,0 +1,1489 @@
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 Topics
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Topics 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 a topic.
26
+ #
27
+ # Get properties of a topic.
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group within the
30
+ # user's subscription.
31
+ # @param topic_name [String] Name of the topic.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [Topic] operation results.
36
+ #
37
+ def get(resource_group_name, topic_name, custom_headers:nil)
38
+ response = get_async(resource_group_name, topic_name, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # Get a topic.
44
+ #
45
+ # Get properties of a topic.
46
+ #
47
+ # @param resource_group_name [String] The name of the resource group within the
48
+ # user's subscription.
49
+ # @param topic_name [String] Name of the topic.
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def get_with_http_info(resource_group_name, topic_name, custom_headers:nil)
56
+ get_async(resource_group_name, topic_name, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Get a topic.
61
+ #
62
+ # Get properties of a topic.
63
+ #
64
+ # @param resource_group_name [String] The name of the resource group within the
65
+ # user's subscription.
66
+ # @param topic_name [String] Name of the topic.
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def get_async(resource_group_name, topic_name, custom_headers:nil)
73
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
74
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
75
+ fail ArgumentError, 'topic_name is nil' if topic_name.nil?
76
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
77
+
78
+
79
+ request_headers = {}
80
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
81
+
82
+ # Set Headers
83
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
84
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
85
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
86
+
87
+ request_url = @base_url || @client.base_url
88
+
89
+ options = {
90
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
91
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'topicName' => topic_name},
92
+ query_params: {'api-version' => @client.api_version},
93
+ headers: request_headers.merge(custom_headers || {}),
94
+ base_url: request_url
95
+ }
96
+ promise = @client.make_request_async(:get, path_template, options)
97
+
98
+ promise = promise.then do |result|
99
+ http_response = result.response
100
+ status_code = http_response.status
101
+ response_content = http_response.body
102
+ unless status_code == 200
103
+ error_model = JSON.load(response_content)
104
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
105
+ end
106
+
107
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
108
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
109
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
110
+ # Deserialize Response
111
+ if status_code == 200
112
+ begin
113
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
114
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::Topic.mapper()
115
+ result.body = @client.deserialize(result_mapper, parsed_response)
116
+ rescue Exception => e
117
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
118
+ end
119
+ end
120
+
121
+ result
122
+ end
123
+
124
+ promise.execute
125
+ end
126
+
127
+ #
128
+ # Create a topic.
129
+ #
130
+ # Asynchronously creates a new topic with the specified parameters.
131
+ #
132
+ # @param resource_group_name [String] The name of the resource group within the
133
+ # user's subscription.
134
+ # @param topic_name [String] Name of the topic.
135
+ # @param topic_info [Topic] Topic information.
136
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
137
+ # will be added to the HTTP request.
138
+ #
139
+ # @return [Topic] operation results.
140
+ #
141
+ def create_or_update(resource_group_name, topic_name, topic_info, custom_headers:nil)
142
+ response = create_or_update_async(resource_group_name, topic_name, topic_info, custom_headers:custom_headers).value!
143
+ response.body unless response.nil?
144
+ end
145
+
146
+ #
147
+ # @param resource_group_name [String] The name of the resource group within the
148
+ # user's subscription.
149
+ # @param topic_name [String] Name of the topic.
150
+ # @param topic_info [Topic] Topic information.
151
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
152
+ # will be added to the HTTP request.
153
+ #
154
+ # @return [Concurrent::Promise] promise which provides async access to http
155
+ # response.
156
+ #
157
+ def create_or_update_async(resource_group_name, topic_name, topic_info, custom_headers:nil)
158
+ # Send request
159
+ promise = begin_create_or_update_async(resource_group_name, topic_name, topic_info, custom_headers:custom_headers)
160
+
161
+ promise = promise.then do |response|
162
+ # Defining deserialization method.
163
+ deserialize_method = lambda do |parsed_response|
164
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::Topic.mapper()
165
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
166
+ end
167
+
168
+ # Waiting for response.
169
+ @client.get_long_running_operation_result(response, deserialize_method)
170
+ end
171
+
172
+ promise
173
+ end
174
+
175
+ #
176
+ # Delete a topic.
177
+ #
178
+ # Delete existing topic.
179
+ #
180
+ # @param resource_group_name [String] The name of the resource group within the
181
+ # user's subscription.
182
+ # @param topic_name [String] Name of the topic.
183
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
184
+ # will be added to the HTTP request.
185
+ #
186
+ def delete(resource_group_name, topic_name, custom_headers:nil)
187
+ response = delete_async(resource_group_name, topic_name, custom_headers:custom_headers).value!
188
+ nil
189
+ end
190
+
191
+ #
192
+ # @param resource_group_name [String] The name of the resource group within the
193
+ # user's subscription.
194
+ # @param topic_name [String] Name of the topic.
195
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
196
+ # will be added to the HTTP request.
197
+ #
198
+ # @return [Concurrent::Promise] promise which provides async access to http
199
+ # response.
200
+ #
201
+ def delete_async(resource_group_name, topic_name, custom_headers:nil)
202
+ # Send request
203
+ promise = begin_delete_async(resource_group_name, topic_name, custom_headers:custom_headers)
204
+
205
+ promise = promise.then do |response|
206
+ # Defining deserialization method.
207
+ deserialize_method = lambda do |parsed_response|
208
+ end
209
+
210
+ # Waiting for response.
211
+ @client.get_long_running_operation_result(response, deserialize_method)
212
+ end
213
+
214
+ promise
215
+ end
216
+
217
+ #
218
+ # Update a topic.
219
+ #
220
+ # Asynchronously updates a topic with the specified parameters.
221
+ #
222
+ # @param resource_group_name [String] The name of the resource group within the
223
+ # user's subscription.
224
+ # @param topic_name [String] Name of the topic.
225
+ # @param topic_update_parameters [TopicUpdateParameters] Topic update
226
+ # information.
227
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
228
+ # will be added to the HTTP request.
229
+ #
230
+ # @return [Topic] operation results.
231
+ #
232
+ def update(resource_group_name, topic_name, topic_update_parameters, custom_headers:nil)
233
+ response = update_async(resource_group_name, topic_name, topic_update_parameters, custom_headers:custom_headers).value!
234
+ response.body unless response.nil?
235
+ end
236
+
237
+ #
238
+ # @param resource_group_name [String] The name of the resource group within the
239
+ # user's subscription.
240
+ # @param topic_name [String] Name of the topic.
241
+ # @param topic_update_parameters [TopicUpdateParameters] Topic update
242
+ # information.
243
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
244
+ # will be added to the HTTP request.
245
+ #
246
+ # @return [Concurrent::Promise] promise which provides async access to http
247
+ # response.
248
+ #
249
+ def update_async(resource_group_name, topic_name, topic_update_parameters, custom_headers:nil)
250
+ # Send request
251
+ promise = begin_update_async(resource_group_name, topic_name, topic_update_parameters, custom_headers:custom_headers)
252
+
253
+ promise = promise.then do |response|
254
+ # Defining deserialization method.
255
+ deserialize_method = lambda do |parsed_response|
256
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::Topic.mapper()
257
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
258
+ end
259
+
260
+ # Waiting for response.
261
+ @client.get_long_running_operation_result(response, deserialize_method)
262
+ end
263
+
264
+ promise
265
+ end
266
+
267
+ #
268
+ # List topics under an Azure subscription.
269
+ #
270
+ # List all the topics under an Azure subscription.
271
+ #
272
+ # @param filter [String] The query used to filter the search results using
273
+ # OData syntax. Filtering is permitted on the 'name' property only and with
274
+ # limited number of OData operations. These operations are: the 'contains'
275
+ # function as well as the following logical operations: not, and, or, eq (for
276
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
277
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
278
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
279
+ # $filter=location eq 'westus'.
280
+ # @param top [Integer] The number of results to return per page for the list
281
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
282
+ # default number of results to be returned is 20 items per page.
283
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
284
+ # will be added to the HTTP request.
285
+ #
286
+ # @return [Array<Topic>] operation results.
287
+ #
288
+ def list_by_subscription(filter:nil, top:nil, custom_headers:nil)
289
+ first_page = list_by_subscription_as_lazy(filter:filter, top:top, custom_headers:custom_headers)
290
+ first_page.get_all_items
291
+ end
292
+
293
+ #
294
+ # List topics under an Azure subscription.
295
+ #
296
+ # List all the topics under an Azure subscription.
297
+ #
298
+ # @param filter [String] The query used to filter the search results using
299
+ # OData syntax. Filtering is permitted on the 'name' property only and with
300
+ # limited number of OData operations. These operations are: the 'contains'
301
+ # function as well as the following logical operations: not, and, or, eq (for
302
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
303
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
304
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
305
+ # $filter=location eq 'westus'.
306
+ # @param top [Integer] The number of results to return per page for the list
307
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
308
+ # default number of results to be returned is 20 items per page.
309
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
310
+ # will be added to the HTTP request.
311
+ #
312
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
313
+ #
314
+ def list_by_subscription_with_http_info(filter:nil, top:nil, custom_headers:nil)
315
+ list_by_subscription_async(filter:filter, top:top, custom_headers:custom_headers).value!
316
+ end
317
+
318
+ #
319
+ # List topics under an Azure subscription.
320
+ #
321
+ # List all the topics under an Azure subscription.
322
+ #
323
+ # @param filter [String] The query used to filter the search results using
324
+ # OData syntax. Filtering is permitted on the 'name' property only and with
325
+ # limited number of OData operations. These operations are: the 'contains'
326
+ # function as well as the following logical operations: not, and, or, eq (for
327
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
328
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
329
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
330
+ # $filter=location eq 'westus'.
331
+ # @param top [Integer] The number of results to return per page for the list
332
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
333
+ # default number of results to be returned is 20 items per page.
334
+ # @param [Hash{String => String}] A hash of custom headers that will be added
335
+ # to the HTTP request.
336
+ #
337
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
338
+ #
339
+ def list_by_subscription_async(filter:nil, top:nil, custom_headers:nil)
340
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
341
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
342
+
343
+
344
+ request_headers = {}
345
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
346
+
347
+ # Set Headers
348
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
349
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
350
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics'
351
+
352
+ request_url = @base_url || @client.base_url
353
+
354
+ options = {
355
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
356
+ path_params: {'subscriptionId' => @client.subscription_id},
357
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top},
358
+ headers: request_headers.merge(custom_headers || {}),
359
+ base_url: request_url
360
+ }
361
+ promise = @client.make_request_async(:get, path_template, options)
362
+
363
+ promise = promise.then do |result|
364
+ http_response = result.response
365
+ status_code = http_response.status
366
+ response_content = http_response.body
367
+ unless status_code == 200
368
+ error_model = JSON.load(response_content)
369
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
370
+ end
371
+
372
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
373
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
374
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
375
+ # Deserialize Response
376
+ if status_code == 200
377
+ begin
378
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
379
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::TopicsListResult.mapper()
380
+ result.body = @client.deserialize(result_mapper, parsed_response)
381
+ rescue Exception => e
382
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
383
+ end
384
+ end
385
+
386
+ result
387
+ end
388
+
389
+ promise.execute
390
+ end
391
+
392
+ #
393
+ # List topics under a resource group.
394
+ #
395
+ # List all the topics under a resource group.
396
+ #
397
+ # @param resource_group_name [String] The name of the resource group within the
398
+ # user's subscription.
399
+ # @param filter [String] The query used to filter the search results using
400
+ # OData syntax. Filtering is permitted on the 'name' property only and with
401
+ # limited number of OData operations. These operations are: the 'contains'
402
+ # function as well as the following logical operations: not, and, or, eq (for
403
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
404
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
405
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
406
+ # $filter=location eq 'westus'.
407
+ # @param top [Integer] The number of results to return per page for the list
408
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
409
+ # default number of results to be returned is 20 items per page.
410
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
411
+ # will be added to the HTTP request.
412
+ #
413
+ # @return [Array<Topic>] operation results.
414
+ #
415
+ def list_by_resource_group(resource_group_name, filter:nil, top:nil, custom_headers:nil)
416
+ first_page = list_by_resource_group_as_lazy(resource_group_name, filter:filter, top:top, custom_headers:custom_headers)
417
+ first_page.get_all_items
418
+ end
419
+
420
+ #
421
+ # List topics under a resource group.
422
+ #
423
+ # List all the topics under a resource group.
424
+ #
425
+ # @param resource_group_name [String] The name of the resource group within the
426
+ # user's subscription.
427
+ # @param filter [String] The query used to filter the search results using
428
+ # OData syntax. Filtering is permitted on the 'name' property only and with
429
+ # limited number of OData operations. These operations are: the 'contains'
430
+ # function as well as the following logical operations: not, and, or, eq (for
431
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
432
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
433
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
434
+ # $filter=location eq 'westus'.
435
+ # @param top [Integer] The number of results to return per page for the list
436
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
437
+ # default number of results to be returned is 20 items per page.
438
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
439
+ # will be added to the HTTP request.
440
+ #
441
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
442
+ #
443
+ def list_by_resource_group_with_http_info(resource_group_name, filter:nil, top:nil, custom_headers:nil)
444
+ list_by_resource_group_async(resource_group_name, filter:filter, top:top, custom_headers:custom_headers).value!
445
+ end
446
+
447
+ #
448
+ # List topics under a resource group.
449
+ #
450
+ # List all the topics under a resource group.
451
+ #
452
+ # @param resource_group_name [String] The name of the resource group within the
453
+ # user's subscription.
454
+ # @param filter [String] The query used to filter the search results using
455
+ # OData syntax. Filtering is permitted on the 'name' property only and with
456
+ # limited number of OData operations. These operations are: the 'contains'
457
+ # function as well as the following logical operations: not, and, or, eq (for
458
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
459
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
460
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
461
+ # $filter=location eq 'westus'.
462
+ # @param top [Integer] The number of results to return per page for the list
463
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
464
+ # default number of results to be returned is 20 items per page.
465
+ # @param [Hash{String => String}] A hash of custom headers that will be added
466
+ # to the HTTP request.
467
+ #
468
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
469
+ #
470
+ def list_by_resource_group_async(resource_group_name, filter:nil, top:nil, custom_headers:nil)
471
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
472
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
473
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
474
+
475
+
476
+ request_headers = {}
477
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
478
+
479
+ # Set Headers
480
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
481
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
482
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics'
483
+
484
+ request_url = @base_url || @client.base_url
485
+
486
+ options = {
487
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
488
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
489
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top},
490
+ headers: request_headers.merge(custom_headers || {}),
491
+ base_url: request_url
492
+ }
493
+ promise = @client.make_request_async(:get, path_template, options)
494
+
495
+ promise = promise.then do |result|
496
+ http_response = result.response
497
+ status_code = http_response.status
498
+ response_content = http_response.body
499
+ unless status_code == 200
500
+ error_model = JSON.load(response_content)
501
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
502
+ end
503
+
504
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
505
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
506
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
507
+ # Deserialize Response
508
+ if status_code == 200
509
+ begin
510
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
511
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::TopicsListResult.mapper()
512
+ result.body = @client.deserialize(result_mapper, parsed_response)
513
+ rescue Exception => e
514
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
515
+ end
516
+ end
517
+
518
+ result
519
+ end
520
+
521
+ promise.execute
522
+ end
523
+
524
+ #
525
+ # List keys for a topic.
526
+ #
527
+ # List the two keys used to publish to a topic.
528
+ #
529
+ # @param resource_group_name [String] The name of the resource group within the
530
+ # user's subscription.
531
+ # @param topic_name [String] Name of the topic.
532
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
533
+ # will be added to the HTTP request.
534
+ #
535
+ # @return [TopicSharedAccessKeys] operation results.
536
+ #
537
+ def list_shared_access_keys(resource_group_name, topic_name, custom_headers:nil)
538
+ response = list_shared_access_keys_async(resource_group_name, topic_name, custom_headers:custom_headers).value!
539
+ response.body unless response.nil?
540
+ end
541
+
542
+ #
543
+ # List keys for a topic.
544
+ #
545
+ # List the two keys used to publish to a topic.
546
+ #
547
+ # @param resource_group_name [String] The name of the resource group within the
548
+ # user's subscription.
549
+ # @param topic_name [String] Name of the topic.
550
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
551
+ # will be added to the HTTP request.
552
+ #
553
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
554
+ #
555
+ def list_shared_access_keys_with_http_info(resource_group_name, topic_name, custom_headers:nil)
556
+ list_shared_access_keys_async(resource_group_name, topic_name, custom_headers:custom_headers).value!
557
+ end
558
+
559
+ #
560
+ # List keys for a topic.
561
+ #
562
+ # List the two keys used to publish to a topic.
563
+ #
564
+ # @param resource_group_name [String] The name of the resource group within the
565
+ # user's subscription.
566
+ # @param topic_name [String] Name of the topic.
567
+ # @param [Hash{String => String}] A hash of custom headers that will be added
568
+ # to the HTTP request.
569
+ #
570
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
571
+ #
572
+ def list_shared_access_keys_async(resource_group_name, topic_name, custom_headers:nil)
573
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
574
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
575
+ fail ArgumentError, 'topic_name is nil' if topic_name.nil?
576
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
577
+
578
+
579
+ request_headers = {}
580
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
581
+
582
+ # Set Headers
583
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
584
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
585
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/listKeys'
586
+
587
+ request_url = @base_url || @client.base_url
588
+
589
+ options = {
590
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
591
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'topicName' => topic_name},
592
+ query_params: {'api-version' => @client.api_version},
593
+ headers: request_headers.merge(custom_headers || {}),
594
+ base_url: request_url
595
+ }
596
+ promise = @client.make_request_async(:post, path_template, options)
597
+
598
+ promise = promise.then do |result|
599
+ http_response = result.response
600
+ status_code = http_response.status
601
+ response_content = http_response.body
602
+ unless status_code == 200
603
+ error_model = JSON.load(response_content)
604
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
605
+ end
606
+
607
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
608
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
609
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
610
+ # Deserialize Response
611
+ if status_code == 200
612
+ begin
613
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
614
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::TopicSharedAccessKeys.mapper()
615
+ result.body = @client.deserialize(result_mapper, parsed_response)
616
+ rescue Exception => e
617
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
618
+ end
619
+ end
620
+
621
+ result
622
+ end
623
+
624
+ promise.execute
625
+ end
626
+
627
+ #
628
+ # Regenerate key for a topic.
629
+ #
630
+ # Regenerate a shared access key for a topic.
631
+ #
632
+ # @param resource_group_name [String] The name of the resource group within the
633
+ # user's subscription.
634
+ # @param topic_name [String] Name of the topic.
635
+ # @param regenerate_key_request [TopicRegenerateKeyRequest] Request body to
636
+ # regenerate key.
637
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
638
+ # will be added to the HTTP request.
639
+ #
640
+ # @return [TopicSharedAccessKeys] operation results.
641
+ #
642
+ def regenerate_key(resource_group_name, topic_name, regenerate_key_request, custom_headers:nil)
643
+ response = regenerate_key_async(resource_group_name, topic_name, regenerate_key_request, custom_headers:custom_headers).value!
644
+ response.body unless response.nil?
645
+ end
646
+
647
+ #
648
+ # @param resource_group_name [String] The name of the resource group within the
649
+ # user's subscription.
650
+ # @param topic_name [String] Name of the topic.
651
+ # @param regenerate_key_request [TopicRegenerateKeyRequest] Request body to
652
+ # regenerate key.
653
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
654
+ # will be added to the HTTP request.
655
+ #
656
+ # @return [Concurrent::Promise] promise which provides async access to http
657
+ # response.
658
+ #
659
+ def regenerate_key_async(resource_group_name, topic_name, regenerate_key_request, custom_headers:nil)
660
+ # Send request
661
+ promise = begin_regenerate_key_async(resource_group_name, topic_name, regenerate_key_request, custom_headers:custom_headers)
662
+
663
+ promise = promise.then do |response|
664
+ # Defining deserialization method.
665
+ deserialize_method = lambda do |parsed_response|
666
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::TopicSharedAccessKeys.mapper()
667
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
668
+ end
669
+
670
+ # Waiting for response.
671
+ @client.get_long_running_operation_result(response, deserialize_method)
672
+ end
673
+
674
+ promise
675
+ end
676
+
677
+ #
678
+ # List topic event types.
679
+ #
680
+ # List event types for a topic.
681
+ #
682
+ # @param resource_group_name [String] The name of the resource group within the
683
+ # user's subscription.
684
+ # @param provider_namespace [String] Namespace of the provider of the topic.
685
+ # @param resource_type_name [String] Name of the topic type.
686
+ # @param resource_name [String] Name of the topic.
687
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
688
+ # will be added to the HTTP request.
689
+ #
690
+ # @return [EventTypesListResult] operation results.
691
+ #
692
+ def list_event_types(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil)
693
+ response = list_event_types_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:custom_headers).value!
694
+ response.body unless response.nil?
695
+ end
696
+
697
+ #
698
+ # List topic event types.
699
+ #
700
+ # List event types for a topic.
701
+ #
702
+ # @param resource_group_name [String] The name of the resource group within the
703
+ # user's subscription.
704
+ # @param provider_namespace [String] Namespace of the provider of the topic.
705
+ # @param resource_type_name [String] Name of the topic type.
706
+ # @param resource_name [String] Name of the topic.
707
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
708
+ # will be added to the HTTP request.
709
+ #
710
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
711
+ #
712
+ def list_event_types_with_http_info(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil)
713
+ list_event_types_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:custom_headers).value!
714
+ end
715
+
716
+ #
717
+ # List topic event types.
718
+ #
719
+ # List event types for a topic.
720
+ #
721
+ # @param resource_group_name [String] The name of the resource group within the
722
+ # user's subscription.
723
+ # @param provider_namespace [String] Namespace of the provider of the topic.
724
+ # @param resource_type_name [String] Name of the topic type.
725
+ # @param resource_name [String] Name of the topic.
726
+ # @param [Hash{String => String}] A hash of custom headers that will be added
727
+ # to the HTTP request.
728
+ #
729
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
730
+ #
731
+ def list_event_types_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil)
732
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
733
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
734
+ fail ArgumentError, 'provider_namespace is nil' if provider_namespace.nil?
735
+ fail ArgumentError, 'resource_type_name is nil' if resource_type_name.nil?
736
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
737
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
738
+
739
+
740
+ request_headers = {}
741
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
742
+
743
+ # Set Headers
744
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
745
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
746
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventTypes'
747
+
748
+ request_url = @base_url || @client.base_url
749
+
750
+ options = {
751
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
752
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'providerNamespace' => provider_namespace,'resourceTypeName' => resource_type_name,'resourceName' => resource_name},
753
+ query_params: {'api-version' => @client.api_version},
754
+ headers: request_headers.merge(custom_headers || {}),
755
+ base_url: request_url
756
+ }
757
+ promise = @client.make_request_async(:get, path_template, options)
758
+
759
+ promise = promise.then do |result|
760
+ http_response = result.response
761
+ status_code = http_response.status
762
+ response_content = http_response.body
763
+ unless status_code == 200
764
+ error_model = JSON.load(response_content)
765
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
766
+ end
767
+
768
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
769
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
770
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
771
+ # Deserialize Response
772
+ if status_code == 200
773
+ begin
774
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
775
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventTypesListResult.mapper()
776
+ result.body = @client.deserialize(result_mapper, parsed_response)
777
+ rescue Exception => e
778
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
779
+ end
780
+ end
781
+
782
+ result
783
+ end
784
+
785
+ promise.execute
786
+ end
787
+
788
+ #
789
+ # Create a topic.
790
+ #
791
+ # Asynchronously creates a new topic with the specified parameters.
792
+ #
793
+ # @param resource_group_name [String] The name of the resource group within the
794
+ # user's subscription.
795
+ # @param topic_name [String] Name of the topic.
796
+ # @param topic_info [Topic] Topic information.
797
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
798
+ # will be added to the HTTP request.
799
+ #
800
+ # @return [Topic] operation results.
801
+ #
802
+ def begin_create_or_update(resource_group_name, topic_name, topic_info, custom_headers:nil)
803
+ response = begin_create_or_update_async(resource_group_name, topic_name, topic_info, custom_headers:custom_headers).value!
804
+ response.body unless response.nil?
805
+ end
806
+
807
+ #
808
+ # Create a topic.
809
+ #
810
+ # Asynchronously creates a new topic with the specified parameters.
811
+ #
812
+ # @param resource_group_name [String] The name of the resource group within the
813
+ # user's subscription.
814
+ # @param topic_name [String] Name of the topic.
815
+ # @param topic_info [Topic] Topic information.
816
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
817
+ # will be added to the HTTP request.
818
+ #
819
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
820
+ #
821
+ def begin_create_or_update_with_http_info(resource_group_name, topic_name, topic_info, custom_headers:nil)
822
+ begin_create_or_update_async(resource_group_name, topic_name, topic_info, custom_headers:custom_headers).value!
823
+ end
824
+
825
+ #
826
+ # Create a topic.
827
+ #
828
+ # Asynchronously creates a new topic with the specified parameters.
829
+ #
830
+ # @param resource_group_name [String] The name of the resource group within the
831
+ # user's subscription.
832
+ # @param topic_name [String] Name of the topic.
833
+ # @param topic_info [Topic] Topic information.
834
+ # @param [Hash{String => String}] A hash of custom headers that will be added
835
+ # to the HTTP request.
836
+ #
837
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
838
+ #
839
+ def begin_create_or_update_async(resource_group_name, topic_name, topic_info, custom_headers:nil)
840
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
841
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
842
+ fail ArgumentError, 'topic_name is nil' if topic_name.nil?
843
+ fail ArgumentError, 'topic_info is nil' if topic_info.nil?
844
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
845
+
846
+
847
+ request_headers = {}
848
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
849
+
850
+ # Set Headers
851
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
852
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
853
+
854
+ # Serialize Request
855
+ request_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::Topic.mapper()
856
+ request_content = @client.serialize(request_mapper, topic_info)
857
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
858
+
859
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
860
+
861
+ request_url = @base_url || @client.base_url
862
+
863
+ options = {
864
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
865
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'topicName' => topic_name},
866
+ query_params: {'api-version' => @client.api_version},
867
+ body: request_content,
868
+ headers: request_headers.merge(custom_headers || {}),
869
+ base_url: request_url
870
+ }
871
+ promise = @client.make_request_async(:put, path_template, options)
872
+
873
+ promise = promise.then do |result|
874
+ http_response = result.response
875
+ status_code = http_response.status
876
+ response_content = http_response.body
877
+ unless status_code == 201
878
+ error_model = JSON.load(response_content)
879
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
880
+ end
881
+
882
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
883
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
884
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
885
+ # Deserialize Response
886
+ if status_code == 201
887
+ begin
888
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
889
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::Topic.mapper()
890
+ result.body = @client.deserialize(result_mapper, parsed_response)
891
+ rescue Exception => e
892
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
893
+ end
894
+ end
895
+
896
+ result
897
+ end
898
+
899
+ promise.execute
900
+ end
901
+
902
+ #
903
+ # Delete a topic.
904
+ #
905
+ # Delete existing topic.
906
+ #
907
+ # @param resource_group_name [String] The name of the resource group within the
908
+ # user's subscription.
909
+ # @param topic_name [String] Name of the topic.
910
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
911
+ # will be added to the HTTP request.
912
+ #
913
+ #
914
+ def begin_delete(resource_group_name, topic_name, custom_headers:nil)
915
+ response = begin_delete_async(resource_group_name, topic_name, custom_headers:custom_headers).value!
916
+ nil
917
+ end
918
+
919
+ #
920
+ # Delete a topic.
921
+ #
922
+ # Delete existing topic.
923
+ #
924
+ # @param resource_group_name [String] The name of the resource group within the
925
+ # user's subscription.
926
+ # @param topic_name [String] Name of the topic.
927
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
928
+ # will be added to the HTTP request.
929
+ #
930
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
931
+ #
932
+ def begin_delete_with_http_info(resource_group_name, topic_name, custom_headers:nil)
933
+ begin_delete_async(resource_group_name, topic_name, custom_headers:custom_headers).value!
934
+ end
935
+
936
+ #
937
+ # Delete a topic.
938
+ #
939
+ # Delete existing topic.
940
+ #
941
+ # @param resource_group_name [String] The name of the resource group within the
942
+ # user's subscription.
943
+ # @param topic_name [String] Name of the topic.
944
+ # @param [Hash{String => String}] A hash of custom headers that will be added
945
+ # to the HTTP request.
946
+ #
947
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
948
+ #
949
+ def begin_delete_async(resource_group_name, topic_name, custom_headers:nil)
950
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
951
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
952
+ fail ArgumentError, 'topic_name is nil' if topic_name.nil?
953
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
954
+
955
+
956
+ request_headers = {}
957
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
958
+
959
+ # Set Headers
960
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
961
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
962
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
963
+
964
+ request_url = @base_url || @client.base_url
965
+
966
+ options = {
967
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
968
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'topicName' => topic_name},
969
+ query_params: {'api-version' => @client.api_version},
970
+ headers: request_headers.merge(custom_headers || {}),
971
+ base_url: request_url
972
+ }
973
+ promise = @client.make_request_async(:delete, path_template, options)
974
+
975
+ promise = promise.then do |result|
976
+ http_response = result.response
977
+ status_code = http_response.status
978
+ response_content = http_response.body
979
+ unless status_code == 202 || status_code == 204
980
+ error_model = JSON.load(response_content)
981
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
982
+ end
983
+
984
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
985
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
986
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
987
+
988
+ result
989
+ end
990
+
991
+ promise.execute
992
+ end
993
+
994
+ #
995
+ # Update a topic.
996
+ #
997
+ # Asynchronously updates a topic with the specified parameters.
998
+ #
999
+ # @param resource_group_name [String] The name of the resource group within the
1000
+ # user's subscription.
1001
+ # @param topic_name [String] Name of the topic.
1002
+ # @param topic_update_parameters [TopicUpdateParameters] Topic update
1003
+ # information.
1004
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1005
+ # will be added to the HTTP request.
1006
+ #
1007
+ # @return [Topic] operation results.
1008
+ #
1009
+ def begin_update(resource_group_name, topic_name, topic_update_parameters, custom_headers:nil)
1010
+ response = begin_update_async(resource_group_name, topic_name, topic_update_parameters, custom_headers:custom_headers).value!
1011
+ response.body unless response.nil?
1012
+ end
1013
+
1014
+ #
1015
+ # Update a topic.
1016
+ #
1017
+ # Asynchronously updates a topic with the specified parameters.
1018
+ #
1019
+ # @param resource_group_name [String] The name of the resource group within the
1020
+ # user's subscription.
1021
+ # @param topic_name [String] Name of the topic.
1022
+ # @param topic_update_parameters [TopicUpdateParameters] Topic update
1023
+ # information.
1024
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1025
+ # will be added to the HTTP request.
1026
+ #
1027
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1028
+ #
1029
+ def begin_update_with_http_info(resource_group_name, topic_name, topic_update_parameters, custom_headers:nil)
1030
+ begin_update_async(resource_group_name, topic_name, topic_update_parameters, custom_headers:custom_headers).value!
1031
+ end
1032
+
1033
+ #
1034
+ # Update a topic.
1035
+ #
1036
+ # Asynchronously updates a topic with the specified parameters.
1037
+ #
1038
+ # @param resource_group_name [String] The name of the resource group within the
1039
+ # user's subscription.
1040
+ # @param topic_name [String] Name of the topic.
1041
+ # @param topic_update_parameters [TopicUpdateParameters] Topic update
1042
+ # information.
1043
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1044
+ # to the HTTP request.
1045
+ #
1046
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1047
+ #
1048
+ def begin_update_async(resource_group_name, topic_name, topic_update_parameters, custom_headers:nil)
1049
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1050
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1051
+ fail ArgumentError, 'topic_name is nil' if topic_name.nil?
1052
+ fail ArgumentError, 'topic_update_parameters is nil' if topic_update_parameters.nil?
1053
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1054
+
1055
+
1056
+ request_headers = {}
1057
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1058
+
1059
+ # Set Headers
1060
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1061
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1062
+
1063
+ # Serialize Request
1064
+ request_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::TopicUpdateParameters.mapper()
1065
+ request_content = @client.serialize(request_mapper, topic_update_parameters)
1066
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1067
+
1068
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1069
+
1070
+ request_url = @base_url || @client.base_url
1071
+
1072
+ options = {
1073
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1074
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'topicName' => topic_name},
1075
+ query_params: {'api-version' => @client.api_version},
1076
+ body: request_content,
1077
+ headers: request_headers.merge(custom_headers || {}),
1078
+ base_url: request_url
1079
+ }
1080
+ promise = @client.make_request_async(:patch, path_template, options)
1081
+
1082
+ promise = promise.then do |result|
1083
+ http_response = result.response
1084
+ status_code = http_response.status
1085
+ response_content = http_response.body
1086
+ unless status_code == 200 || status_code == 201
1087
+ error_model = JSON.load(response_content)
1088
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1089
+ end
1090
+
1091
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1092
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1093
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1094
+ # Deserialize Response
1095
+ if status_code == 201
1096
+ begin
1097
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1098
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::Topic.mapper()
1099
+ result.body = @client.deserialize(result_mapper, parsed_response)
1100
+ rescue Exception => e
1101
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1102
+ end
1103
+ end
1104
+
1105
+ result
1106
+ end
1107
+
1108
+ promise.execute
1109
+ end
1110
+
1111
+ #
1112
+ # Regenerate key for a topic.
1113
+ #
1114
+ # Regenerate a shared access key for a topic.
1115
+ #
1116
+ # @param resource_group_name [String] The name of the resource group within the
1117
+ # user's subscription.
1118
+ # @param topic_name [String] Name of the topic.
1119
+ # @param regenerate_key_request [TopicRegenerateKeyRequest] Request body to
1120
+ # regenerate key.
1121
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1122
+ # will be added to the HTTP request.
1123
+ #
1124
+ # @return [TopicSharedAccessKeys] operation results.
1125
+ #
1126
+ def begin_regenerate_key(resource_group_name, topic_name, regenerate_key_request, custom_headers:nil)
1127
+ response = begin_regenerate_key_async(resource_group_name, topic_name, regenerate_key_request, custom_headers:custom_headers).value!
1128
+ response.body unless response.nil?
1129
+ end
1130
+
1131
+ #
1132
+ # Regenerate key for a topic.
1133
+ #
1134
+ # Regenerate a shared access key for a topic.
1135
+ #
1136
+ # @param resource_group_name [String] The name of the resource group within the
1137
+ # user's subscription.
1138
+ # @param topic_name [String] Name of the topic.
1139
+ # @param regenerate_key_request [TopicRegenerateKeyRequest] Request body to
1140
+ # regenerate key.
1141
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1142
+ # will be added to the HTTP request.
1143
+ #
1144
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1145
+ #
1146
+ def begin_regenerate_key_with_http_info(resource_group_name, topic_name, regenerate_key_request, custom_headers:nil)
1147
+ begin_regenerate_key_async(resource_group_name, topic_name, regenerate_key_request, custom_headers:custom_headers).value!
1148
+ end
1149
+
1150
+ #
1151
+ # Regenerate key for a topic.
1152
+ #
1153
+ # Regenerate a shared access key for a topic.
1154
+ #
1155
+ # @param resource_group_name [String] The name of the resource group within the
1156
+ # user's subscription.
1157
+ # @param topic_name [String] Name of the topic.
1158
+ # @param regenerate_key_request [TopicRegenerateKeyRequest] Request body to
1159
+ # regenerate key.
1160
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1161
+ # to the HTTP request.
1162
+ #
1163
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1164
+ #
1165
+ def begin_regenerate_key_async(resource_group_name, topic_name, regenerate_key_request, custom_headers:nil)
1166
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1167
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1168
+ fail ArgumentError, 'topic_name is nil' if topic_name.nil?
1169
+ fail ArgumentError, 'regenerate_key_request is nil' if regenerate_key_request.nil?
1170
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1171
+
1172
+
1173
+ request_headers = {}
1174
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1175
+
1176
+ # Set Headers
1177
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1178
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1179
+
1180
+ # Serialize Request
1181
+ request_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::TopicRegenerateKeyRequest.mapper()
1182
+ request_content = @client.serialize(request_mapper, regenerate_key_request)
1183
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1184
+
1185
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/regenerateKey'
1186
+
1187
+ request_url = @base_url || @client.base_url
1188
+
1189
+ options = {
1190
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1191
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'topicName' => topic_name},
1192
+ query_params: {'api-version' => @client.api_version},
1193
+ body: request_content,
1194
+ headers: request_headers.merge(custom_headers || {}),
1195
+ base_url: request_url
1196
+ }
1197
+ promise = @client.make_request_async(:post, path_template, options)
1198
+
1199
+ promise = promise.then do |result|
1200
+ http_response = result.response
1201
+ status_code = http_response.status
1202
+ response_content = http_response.body
1203
+ unless status_code == 200 || status_code == 202
1204
+ error_model = JSON.load(response_content)
1205
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1206
+ end
1207
+
1208
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1209
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1210
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1211
+ # Deserialize Response
1212
+ if status_code == 200
1213
+ begin
1214
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1215
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::TopicSharedAccessKeys.mapper()
1216
+ result.body = @client.deserialize(result_mapper, parsed_response)
1217
+ rescue Exception => e
1218
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1219
+ end
1220
+ end
1221
+
1222
+ result
1223
+ end
1224
+
1225
+ promise.execute
1226
+ end
1227
+
1228
+ #
1229
+ # List topics under an Azure subscription.
1230
+ #
1231
+ # List all the topics under an Azure subscription.
1232
+ #
1233
+ # @param next_page_link [String] The NextLink from the previous successful call
1234
+ # to List operation.
1235
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1236
+ # will be added to the HTTP request.
1237
+ #
1238
+ # @return [TopicsListResult] operation results.
1239
+ #
1240
+ def list_by_subscription_next(next_page_link, custom_headers:nil)
1241
+ response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
1242
+ response.body unless response.nil?
1243
+ end
1244
+
1245
+ #
1246
+ # List topics under an Azure subscription.
1247
+ #
1248
+ # List all the topics under an Azure subscription.
1249
+ #
1250
+ # @param next_page_link [String] The NextLink from the previous successful call
1251
+ # to List operation.
1252
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1253
+ # will be added to the HTTP request.
1254
+ #
1255
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1256
+ #
1257
+ def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil)
1258
+ list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
1259
+ end
1260
+
1261
+ #
1262
+ # List topics under an Azure subscription.
1263
+ #
1264
+ # List all the topics under an Azure subscription.
1265
+ #
1266
+ # @param next_page_link [String] The NextLink from the previous successful call
1267
+ # to List operation.
1268
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1269
+ # to the HTTP request.
1270
+ #
1271
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1272
+ #
1273
+ def list_by_subscription_next_async(next_page_link, custom_headers:nil)
1274
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1275
+
1276
+
1277
+ request_headers = {}
1278
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1279
+
1280
+ # Set Headers
1281
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1282
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1283
+ path_template = '{nextLink}'
1284
+
1285
+ request_url = @base_url || @client.base_url
1286
+
1287
+ options = {
1288
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1289
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1290
+ headers: request_headers.merge(custom_headers || {}),
1291
+ base_url: request_url
1292
+ }
1293
+ promise = @client.make_request_async(:get, path_template, options)
1294
+
1295
+ promise = promise.then do |result|
1296
+ http_response = result.response
1297
+ status_code = http_response.status
1298
+ response_content = http_response.body
1299
+ unless status_code == 200
1300
+ error_model = JSON.load(response_content)
1301
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1302
+ end
1303
+
1304
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1305
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1306
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1307
+ # Deserialize Response
1308
+ if status_code == 200
1309
+ begin
1310
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1311
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::TopicsListResult.mapper()
1312
+ result.body = @client.deserialize(result_mapper, parsed_response)
1313
+ rescue Exception => e
1314
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1315
+ end
1316
+ end
1317
+
1318
+ result
1319
+ end
1320
+
1321
+ promise.execute
1322
+ end
1323
+
1324
+ #
1325
+ # List topics under a resource group.
1326
+ #
1327
+ # List all the topics under a resource group.
1328
+ #
1329
+ # @param next_page_link [String] The NextLink from the previous successful call
1330
+ # to List operation.
1331
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1332
+ # will be added to the HTTP request.
1333
+ #
1334
+ # @return [TopicsListResult] operation results.
1335
+ #
1336
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1337
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1338
+ response.body unless response.nil?
1339
+ end
1340
+
1341
+ #
1342
+ # List topics under a resource group.
1343
+ #
1344
+ # List all the topics under a resource group.
1345
+ #
1346
+ # @param next_page_link [String] The NextLink from the previous successful call
1347
+ # to List operation.
1348
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1349
+ # will be added to the HTTP request.
1350
+ #
1351
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1352
+ #
1353
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1354
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1355
+ end
1356
+
1357
+ #
1358
+ # List topics under a resource group.
1359
+ #
1360
+ # List all the topics under a resource group.
1361
+ #
1362
+ # @param next_page_link [String] The NextLink from the previous successful call
1363
+ # to List operation.
1364
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1365
+ # to the HTTP request.
1366
+ #
1367
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1368
+ #
1369
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1370
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1371
+
1372
+
1373
+ request_headers = {}
1374
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1375
+
1376
+ # Set Headers
1377
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1378
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1379
+ path_template = '{nextLink}'
1380
+
1381
+ request_url = @base_url || @client.base_url
1382
+
1383
+ options = {
1384
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1385
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1386
+ headers: request_headers.merge(custom_headers || {}),
1387
+ base_url: request_url
1388
+ }
1389
+ promise = @client.make_request_async(:get, path_template, options)
1390
+
1391
+ promise = promise.then do |result|
1392
+ http_response = result.response
1393
+ status_code = http_response.status
1394
+ response_content = http_response.body
1395
+ unless status_code == 200
1396
+ error_model = JSON.load(response_content)
1397
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1398
+ end
1399
+
1400
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1401
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1402
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1403
+ # Deserialize Response
1404
+ if status_code == 200
1405
+ begin
1406
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1407
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::TopicsListResult.mapper()
1408
+ result.body = @client.deserialize(result_mapper, parsed_response)
1409
+ rescue Exception => e
1410
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1411
+ end
1412
+ end
1413
+
1414
+ result
1415
+ end
1416
+
1417
+ promise.execute
1418
+ end
1419
+
1420
+ #
1421
+ # List topics under an Azure subscription.
1422
+ #
1423
+ # List all the topics under an Azure subscription.
1424
+ #
1425
+ # @param filter [String] The query used to filter the search results using
1426
+ # OData syntax. Filtering is permitted on the 'name' property only and with
1427
+ # limited number of OData operations. These operations are: the 'contains'
1428
+ # function as well as the following logical operations: not, and, or, eq (for
1429
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
1430
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
1431
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
1432
+ # $filter=location eq 'westus'.
1433
+ # @param top [Integer] The number of results to return per page for the list
1434
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
1435
+ # default number of results to be returned is 20 items per page.
1436
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1437
+ # will be added to the HTTP request.
1438
+ #
1439
+ # @return [TopicsListResult] which provide lazy access to pages of the
1440
+ # response.
1441
+ #
1442
+ def list_by_subscription_as_lazy(filter:nil, top:nil, custom_headers:nil)
1443
+ response = list_by_subscription_async(filter:filter, top:top, custom_headers:custom_headers).value!
1444
+ unless response.nil?
1445
+ page = response.body
1446
+ page.next_method = Proc.new do |next_page_link|
1447
+ list_by_subscription_next_async(next_page_link, custom_headers:custom_headers)
1448
+ end
1449
+ page
1450
+ end
1451
+ end
1452
+
1453
+ #
1454
+ # List topics under a resource group.
1455
+ #
1456
+ # List all the topics under a resource group.
1457
+ #
1458
+ # @param resource_group_name [String] The name of the resource group within the
1459
+ # user's subscription.
1460
+ # @param filter [String] The query used to filter the search results using
1461
+ # OData syntax. Filtering is permitted on the 'name' property only and with
1462
+ # limited number of OData operations. These operations are: the 'contains'
1463
+ # function as well as the following logical operations: not, and, or, eq (for
1464
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
1465
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
1466
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
1467
+ # $filter=location eq 'westus'.
1468
+ # @param top [Integer] The number of results to return per page for the list
1469
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
1470
+ # default number of results to be returned is 20 items per page.
1471
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1472
+ # will be added to the HTTP request.
1473
+ #
1474
+ # @return [TopicsListResult] which provide lazy access to pages of the
1475
+ # response.
1476
+ #
1477
+ def list_by_resource_group_as_lazy(resource_group_name, filter:nil, top:nil, custom_headers:nil)
1478
+ response = list_by_resource_group_async(resource_group_name, filter:filter, top:top, custom_headers:custom_headers).value!
1479
+ unless response.nil?
1480
+ page = response.body
1481
+ page.next_method = Proc.new do |next_page_link|
1482
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1483
+ end
1484
+ page
1485
+ end
1486
+ end
1487
+
1488
+ end
1489
+ end