azure_mgmt_event_grid 0.20.2 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  3. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  4. data/lib/2018-01-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  5. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  6. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  7. data/lib/2019-01-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  8. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  9. data/lib/2019-06-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  10. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  11. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  12. data/lib/2020-06-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  13. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid.rb +171 -0
  14. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/domain_topics.rb +699 -0
  15. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/domains.rb +1328 -0
  16. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_channels.rb +658 -0
  17. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +194 -0
  18. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb +3775 -0
  19. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/extension_topics.rb +141 -0
  20. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/advanced_filter.rb +81 -0
  21. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/azure_function_event_subscription_destination.rb +112 -0
  22. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/bool_equals_advanced_filter.rb +69 -0
  23. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/connection_state.rb +69 -0
  24. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/created_by_type.rb +18 -0
  25. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb +50 -0
  26. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/dead_letter_with_resource_identity.rb +66 -0
  27. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/delivery_attribute_list_result.rb +58 -0
  28. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/delivery_attribute_mapping.rb +58 -0
  29. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/delivery_with_resource_identity.rb +67 -0
  30. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain.rb +253 -0
  31. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_provisioning_state.rb +20 -0
  32. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_regenerate_key_request.rb +46 -0
  33. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_shared_access_keys.rb +57 -0
  34. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_topic.rb +89 -0
  35. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_topic_provisioning_state.rb +20 -0
  36. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_topics_list_result.rb +98 -0
  37. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_update_parameters.rb +117 -0
  38. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domains_list_result.rb +98 -0
  39. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/dynamic_delivery_attribute_mapping.rb +69 -0
  40. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel.rb +172 -0
  41. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_destination.rb +75 -0
  42. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_filter.rb +70 -0
  43. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_provisioning_state.rb +20 -0
  44. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_source.rb +48 -0
  45. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channels_list_result.rb +98 -0
  46. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_delivery_schema.rb +17 -0
  47. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +84 -0
  48. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription.rb +244 -0
  49. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +52 -0
  50. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +132 -0
  51. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -0
  52. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_identity.rb +61 -0
  53. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_identity_type.rb +16 -0
  54. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +21 -0
  55. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +176 -0
  56. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +98 -0
  57. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_type.rb +106 -0
  58. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -0
  59. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/extended_location.rb +57 -0
  60. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/extension_topic.rb +86 -0
  61. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb +86 -0
  62. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/identity_info.rb +96 -0
  63. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/identity_type.rb +18 -0
  64. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/inbound_ip_rule.rb +59 -0
  65. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/input_schema.rb +17 -0
  66. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/input_schema_mapping.rb +49 -0
  67. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/ip_action_type.rb +15 -0
  68. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/is_not_null_advanced_filter.rb +58 -0
  69. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/is_null_or_undefined_advanced_filter.rb +58 -0
  70. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/json_field.rb +50 -0
  71. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/json_field_with_default.rb +67 -0
  72. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/json_input_schema_mapping.rb +130 -0
  73. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_greater_than_advanced_filter.rb +69 -0
  74. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_greater_than_or_equals_advanced_filter.rb +69 -0
  75. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_in_advanced_filter.rb +77 -0
  76. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_in_range_advanced_filter.rb +85 -0
  77. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_less_than_advanced_filter.rb +69 -0
  78. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_less_than_or_equals_advanced_filter.rb +69 -0
  79. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_not_in_advanced_filter.rb +77 -0
  80. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_not_in_range_advanced_filter.rb +85 -0
  81. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/operation.rb +80 -0
  82. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -0
  83. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -0
  84. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace.rb +140 -0
  85. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_provisioning_state.rb +20 -0
  86. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_regenerate_key_request.rb +46 -0
  87. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_shared_access_keys.rb +57 -0
  88. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_update_parameters.rb +54 -0
  89. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespaces_list_result.rb +98 -0
  90. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration.rb +278 -0
  91. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_event_types_list_result.rb +68 -0
  92. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_provisioning_state.rb +20 -0
  93. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_update_parameters.rb +137 -0
  94. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_visibility_state.rb +17 -0
  95. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registrations_list_result.rb +99 -0
  96. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic.rb +179 -0
  97. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_activation_state.rb +17 -0
  98. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_provisioning_state.rb +20 -0
  99. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_readiness_state.rb +18 -0
  100. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_type.rb +134 -0
  101. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_type_authorization_state.rb +17 -0
  102. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_types_list_result.rb +55 -0
  103. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_update_parameters.rb +54 -0
  104. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topics_list_result.rb +98 -0
  105. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/persisted_connection_status.rb +18 -0
  106. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_endpoint.rb +46 -0
  107. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_endpoint_connection.rb +121 -0
  108. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_endpoint_connection_list_result.rb +100 -0
  109. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_link_resource.rb +128 -0
  110. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_link_resources_list_result.rb +99 -0
  111. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/public_network_access.rb +16 -0
  112. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource.rb +80 -0
  113. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_kind.rb +16 -0
  114. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_provisioning_state.rb +20 -0
  115. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -0
  116. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_sku.rb +47 -0
  117. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/retry_policy.rb +61 -0
  118. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/service_bus_queue_event_subscription_destination.rb +85 -0
  119. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/service_bus_topic_event_subscription_destination.rb +86 -0
  120. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/sku.rb +16 -0
  121. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/static_delivery_attribute_mapping.rb +81 -0
  122. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb +74 -0
  123. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb +86 -0
  124. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_begins_with_advanced_filter.rb +77 -0
  125. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_contains_advanced_filter.rb +77 -0
  126. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_ends_with_advanced_filter.rb +77 -0
  127. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_in_advanced_filter.rb +77 -0
  128. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_begins_with_advanced_filter.rb +77 -0
  129. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_contains_advanced_filter.rb +77 -0
  130. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_ends_with_advanced_filter.rb +77 -0
  131. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_in_advanced_filter.rb +77 -0
  132. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_data.rb +105 -0
  133. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_topic.rb +159 -0
  134. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_topic_update_parameters.rb +66 -0
  135. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_topics_list_result.rb +98 -0
  136. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic.rb +278 -0
  137. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -0
  138. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -0
  139. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -0
  140. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_type_info.rb +169 -0
  141. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -0
  142. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -0
  143. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +117 -0
  144. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topics_list_result.rb +98 -0
  145. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -0
  146. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/user_identity_properties.rb +57 -0
  147. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +148 -0
  148. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/module_definition.rb +9 -0
  149. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/operations.rb +118 -0
  150. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_namespaces.rb +1333 -0
  151. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_registrations.rb +1074 -0
  152. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_topic_event_subscriptions.rb +1156 -0
  153. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_topics.rb +1102 -0
  154. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/private_endpoint_connections.rb +791 -0
  155. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/private_link_resources.rb +423 -0
  156. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/system_topic_event_subscriptions.rb +1152 -0
  157. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/system_topics.rb +1128 -0
  158. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/topic_types.rb +305 -0
  159. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/topics.rb +1489 -0
  160. data/lib/azure_mgmt_event_grid.rb +8 -7
  161. data/lib/profiles/latest/modules/eventgrid_profile_module.rb +417 -181
  162. data/lib/version.rb +1 -1
  163. metadata +150 -3
@@ -0,0 +1,1102 @@
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 PartnerTopics
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the PartnerTopics 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 partner topic.
26
+ #
27
+ # Get properties of a partner topic.
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group within the
30
+ # user's subscription.
31
+ # @param partner_topic_name [String] Name of the partner topic.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [PartnerTopic] operation results.
36
+ #
37
+ def get(resource_group_name, partner_topic_name, custom_headers:nil)
38
+ response = get_async(resource_group_name, partner_topic_name, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # Get a partner topic.
44
+ #
45
+ # Get properties of a partner topic.
46
+ #
47
+ # @param resource_group_name [String] The name of the resource group within the
48
+ # user's subscription.
49
+ # @param partner_topic_name [String] Name of the partner 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, partner_topic_name, custom_headers:nil)
56
+ get_async(resource_group_name, partner_topic_name, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Get a partner topic.
61
+ #
62
+ # Get properties of a partner topic.
63
+ #
64
+ # @param resource_group_name [String] The name of the resource group within the
65
+ # user's subscription.
66
+ # @param partner_topic_name [String] Name of the partner 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, partner_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, 'partner_topic_name is nil' if partner_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/partnerTopics/{partnerTopicName}'
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,'partnerTopicName' => partner_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::PartnerTopic.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
+ # Delete a partner topic.
129
+ #
130
+ # Delete existing partner topic.
131
+ #
132
+ # @param resource_group_name [String] The name of the resource group within the
133
+ # user's subscription.
134
+ # @param partner_topic_name [String] Name of the partner topic.
135
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
136
+ # will be added to the HTTP request.
137
+ #
138
+ def delete(resource_group_name, partner_topic_name, custom_headers:nil)
139
+ response = delete_async(resource_group_name, partner_topic_name, custom_headers:custom_headers).value!
140
+ nil
141
+ end
142
+
143
+ #
144
+ # @param resource_group_name [String] The name of the resource group within the
145
+ # user's subscription.
146
+ # @param partner_topic_name [String] Name of the partner topic.
147
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
148
+ # will be added to the HTTP request.
149
+ #
150
+ # @return [Concurrent::Promise] promise which provides async access to http
151
+ # response.
152
+ #
153
+ def delete_async(resource_group_name, partner_topic_name, custom_headers:nil)
154
+ # Send request
155
+ promise = begin_delete_async(resource_group_name, partner_topic_name, custom_headers:custom_headers)
156
+
157
+ promise = promise.then do |response|
158
+ # Defining deserialization method.
159
+ deserialize_method = lambda do |parsed_response|
160
+ end
161
+
162
+ # Waiting for response.
163
+ @client.get_long_running_operation_result(response, deserialize_method)
164
+ end
165
+
166
+ promise
167
+ end
168
+
169
+ #
170
+ # Update a partner topic.
171
+ #
172
+ # Asynchronously updates a partner topic with the specified parameters.
173
+ #
174
+ # @param resource_group_name [String] The name of the resource group within the
175
+ # user's subscription.
176
+ # @param partner_topic_name [String] Name of the partner topic.
177
+ # @param partner_topic_update_parameters [PartnerTopicUpdateParameters]
178
+ # PartnerTopic update information.
179
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
180
+ # will be added to the HTTP request.
181
+ #
182
+ # @return [PartnerTopic] operation results.
183
+ #
184
+ def update(resource_group_name, partner_topic_name, partner_topic_update_parameters, custom_headers:nil)
185
+ response = update_async(resource_group_name, partner_topic_name, partner_topic_update_parameters, custom_headers:custom_headers).value!
186
+ response.body unless response.nil?
187
+ end
188
+
189
+ #
190
+ # Update a partner topic.
191
+ #
192
+ # Asynchronously updates a partner topic with the specified parameters.
193
+ #
194
+ # @param resource_group_name [String] The name of the resource group within the
195
+ # user's subscription.
196
+ # @param partner_topic_name [String] Name of the partner topic.
197
+ # @param partner_topic_update_parameters [PartnerTopicUpdateParameters]
198
+ # PartnerTopic update information.
199
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
200
+ # will be added to the HTTP request.
201
+ #
202
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
203
+ #
204
+ def update_with_http_info(resource_group_name, partner_topic_name, partner_topic_update_parameters, custom_headers:nil)
205
+ update_async(resource_group_name, partner_topic_name, partner_topic_update_parameters, custom_headers:custom_headers).value!
206
+ end
207
+
208
+ #
209
+ # Update a partner topic.
210
+ #
211
+ # Asynchronously updates a partner topic with the specified parameters.
212
+ #
213
+ # @param resource_group_name [String] The name of the resource group within the
214
+ # user's subscription.
215
+ # @param partner_topic_name [String] Name of the partner topic.
216
+ # @param partner_topic_update_parameters [PartnerTopicUpdateParameters]
217
+ # PartnerTopic update information.
218
+ # @param [Hash{String => String}] A hash of custom headers that will be added
219
+ # to the HTTP request.
220
+ #
221
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
222
+ #
223
+ def update_async(resource_group_name, partner_topic_name, partner_topic_update_parameters, custom_headers:nil)
224
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
225
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
226
+ fail ArgumentError, 'partner_topic_name is nil' if partner_topic_name.nil?
227
+ fail ArgumentError, 'partner_topic_update_parameters is nil' if partner_topic_update_parameters.nil?
228
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
229
+
230
+
231
+ request_headers = {}
232
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
233
+
234
+ # Set Headers
235
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
236
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
237
+
238
+ # Serialize Request
239
+ request_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PartnerTopicUpdateParameters.mapper()
240
+ request_content = @client.serialize(request_mapper, partner_topic_update_parameters)
241
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
242
+
243
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}'
244
+
245
+ request_url = @base_url || @client.base_url
246
+
247
+ options = {
248
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
249
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'partnerTopicName' => partner_topic_name},
250
+ query_params: {'api-version' => @client.api_version},
251
+ body: request_content,
252
+ headers: request_headers.merge(custom_headers || {}),
253
+ base_url: request_url
254
+ }
255
+ promise = @client.make_request_async(:patch, path_template, options)
256
+
257
+ promise = promise.then do |result|
258
+ http_response = result.response
259
+ status_code = http_response.status
260
+ response_content = http_response.body
261
+ unless status_code == 200 || status_code == 201
262
+ error_model = JSON.load(response_content)
263
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
264
+ end
265
+
266
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
267
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
268
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
269
+ # Deserialize Response
270
+ if status_code == 201
271
+ begin
272
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
273
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PartnerTopic.mapper()
274
+ result.body = @client.deserialize(result_mapper, parsed_response)
275
+ rescue Exception => e
276
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
277
+ end
278
+ end
279
+
280
+ result
281
+ end
282
+
283
+ promise.execute
284
+ end
285
+
286
+ #
287
+ # List partner topics under an Azure subscription.
288
+ #
289
+ # List all the partner topics under an Azure subscription.
290
+ #
291
+ # @param filter [String] The query used to filter the search results using
292
+ # OData syntax. Filtering is permitted on the 'name' property only and with
293
+ # limited number of OData operations. These operations are: the 'contains'
294
+ # function as well as the following logical operations: not, and, or, eq (for
295
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
296
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
297
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
298
+ # $filter=location eq 'westus'.
299
+ # @param top [Integer] The number of results to return per page for the list
300
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
301
+ # default number of results to be returned is 20 items per page.
302
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
303
+ # will be added to the HTTP request.
304
+ #
305
+ # @return [Array<PartnerTopic>] operation results.
306
+ #
307
+ def list_by_subscription(filter:nil, top:nil, custom_headers:nil)
308
+ first_page = list_by_subscription_as_lazy(filter:filter, top:top, custom_headers:custom_headers)
309
+ first_page.get_all_items
310
+ end
311
+
312
+ #
313
+ # List partner topics under an Azure subscription.
314
+ #
315
+ # List all the partner topics under an Azure subscription.
316
+ #
317
+ # @param filter [String] The query used to filter the search results using
318
+ # OData syntax. Filtering is permitted on the 'name' property only and with
319
+ # limited number of OData operations. These operations are: the 'contains'
320
+ # function as well as the following logical operations: not, and, or, eq (for
321
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
322
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
323
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
324
+ # $filter=location eq 'westus'.
325
+ # @param top [Integer] The number of results to return per page for the list
326
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
327
+ # default number of results to be returned is 20 items per page.
328
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
329
+ # will be added to the HTTP request.
330
+ #
331
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
332
+ #
333
+ def list_by_subscription_with_http_info(filter:nil, top:nil, custom_headers:nil)
334
+ list_by_subscription_async(filter:filter, top:top, custom_headers:custom_headers).value!
335
+ end
336
+
337
+ #
338
+ # List partner topics under an Azure subscription.
339
+ #
340
+ # List all the partner topics under an Azure subscription.
341
+ #
342
+ # @param filter [String] The query used to filter the search results using
343
+ # OData syntax. Filtering is permitted on the 'name' property only and with
344
+ # limited number of OData operations. These operations are: the 'contains'
345
+ # function as well as the following logical operations: not, and, or, eq (for
346
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
347
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
348
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
349
+ # $filter=location eq 'westus'.
350
+ # @param top [Integer] The number of results to return per page for the list
351
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
352
+ # default number of results to be returned is 20 items per page.
353
+ # @param [Hash{String => String}] A hash of custom headers that will be added
354
+ # to the HTTP request.
355
+ #
356
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
357
+ #
358
+ def list_by_subscription_async(filter:nil, top:nil, custom_headers:nil)
359
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
360
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
361
+
362
+
363
+ request_headers = {}
364
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
365
+
366
+ # Set Headers
367
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
368
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
369
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerTopics'
370
+
371
+ request_url = @base_url || @client.base_url
372
+
373
+ options = {
374
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
375
+ path_params: {'subscriptionId' => @client.subscription_id},
376
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top},
377
+ headers: request_headers.merge(custom_headers || {}),
378
+ base_url: request_url
379
+ }
380
+ promise = @client.make_request_async(:get, path_template, options)
381
+
382
+ promise = promise.then do |result|
383
+ http_response = result.response
384
+ status_code = http_response.status
385
+ response_content = http_response.body
386
+ unless status_code == 200
387
+ error_model = JSON.load(response_content)
388
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
389
+ end
390
+
391
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
392
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
393
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
394
+ # Deserialize Response
395
+ if status_code == 200
396
+ begin
397
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
398
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PartnerTopicsListResult.mapper()
399
+ result.body = @client.deserialize(result_mapper, parsed_response)
400
+ rescue Exception => e
401
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
402
+ end
403
+ end
404
+
405
+ result
406
+ end
407
+
408
+ promise.execute
409
+ end
410
+
411
+ #
412
+ # List partner topics under a resource group.
413
+ #
414
+ # List all the partner topics under a resource group.
415
+ #
416
+ # @param resource_group_name [String] The name of the resource group within the
417
+ # user's subscription.
418
+ # @param filter [String] The query used to filter the search results using
419
+ # OData syntax. Filtering is permitted on the 'name' property only and with
420
+ # limited number of OData operations. These operations are: the 'contains'
421
+ # function as well as the following logical operations: not, and, or, eq (for
422
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
423
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
424
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
425
+ # $filter=location eq 'westus'.
426
+ # @param top [Integer] The number of results to return per page for the list
427
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
428
+ # default number of results to be returned is 20 items per page.
429
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
430
+ # will be added to the HTTP request.
431
+ #
432
+ # @return [Array<PartnerTopic>] operation results.
433
+ #
434
+ def list_by_resource_group(resource_group_name, filter:nil, top:nil, custom_headers:nil)
435
+ first_page = list_by_resource_group_as_lazy(resource_group_name, filter:filter, top:top, custom_headers:custom_headers)
436
+ first_page.get_all_items
437
+ end
438
+
439
+ #
440
+ # List partner topics under a resource group.
441
+ #
442
+ # List all the partner topics under a resource group.
443
+ #
444
+ # @param resource_group_name [String] The name of the resource group within the
445
+ # user's subscription.
446
+ # @param filter [String] The query used to filter the search results using
447
+ # OData syntax. Filtering is permitted on the 'name' property only and with
448
+ # limited number of OData operations. These operations are: the 'contains'
449
+ # function as well as the following logical operations: not, and, or, eq (for
450
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
451
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
452
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
453
+ # $filter=location eq 'westus'.
454
+ # @param top [Integer] The number of results to return per page for the list
455
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
456
+ # default number of results to be returned is 20 items per page.
457
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
458
+ # will be added to the HTTP request.
459
+ #
460
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
461
+ #
462
+ def list_by_resource_group_with_http_info(resource_group_name, filter:nil, top:nil, custom_headers:nil)
463
+ list_by_resource_group_async(resource_group_name, filter:filter, top:top, custom_headers:custom_headers).value!
464
+ end
465
+
466
+ #
467
+ # List partner topics under a resource group.
468
+ #
469
+ # List all the partner topics under a resource group.
470
+ #
471
+ # @param resource_group_name [String] The name of the resource group within the
472
+ # user's subscription.
473
+ # @param filter [String] The query used to filter the search results using
474
+ # OData syntax. Filtering is permitted on the 'name' property only and with
475
+ # limited number of OData operations. These operations are: the 'contains'
476
+ # function as well as the following logical operations: not, and, or, eq (for
477
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
478
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
479
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
480
+ # $filter=location eq 'westus'.
481
+ # @param top [Integer] The number of results to return per page for the list
482
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
483
+ # default number of results to be returned is 20 items per page.
484
+ # @param [Hash{String => String}] A hash of custom headers that will be added
485
+ # to the HTTP request.
486
+ #
487
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
488
+ #
489
+ def list_by_resource_group_async(resource_group_name, filter:nil, top:nil, custom_headers:nil)
490
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
491
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
492
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
493
+
494
+
495
+ request_headers = {}
496
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
497
+
498
+ # Set Headers
499
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
500
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
501
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics'
502
+
503
+ request_url = @base_url || @client.base_url
504
+
505
+ options = {
506
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
507
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
508
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top},
509
+ headers: request_headers.merge(custom_headers || {}),
510
+ base_url: request_url
511
+ }
512
+ promise = @client.make_request_async(:get, path_template, options)
513
+
514
+ promise = promise.then do |result|
515
+ http_response = result.response
516
+ status_code = http_response.status
517
+ response_content = http_response.body
518
+ unless status_code == 200
519
+ error_model = JSON.load(response_content)
520
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
521
+ end
522
+
523
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
524
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
525
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
526
+ # Deserialize Response
527
+ if status_code == 200
528
+ begin
529
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
530
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PartnerTopicsListResult.mapper()
531
+ result.body = @client.deserialize(result_mapper, parsed_response)
532
+ rescue Exception => e
533
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
534
+ end
535
+ end
536
+
537
+ result
538
+ end
539
+
540
+ promise.execute
541
+ end
542
+
543
+ #
544
+ # Activate a partner topic.
545
+ #
546
+ # Activate a newly created partner topic.
547
+ #
548
+ # @param resource_group_name [String] The name of the resource group within the
549
+ # user's subscription.
550
+ # @param partner_topic_name [String] Name of the partner topic.
551
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
552
+ # will be added to the HTTP request.
553
+ #
554
+ # @return [PartnerTopic] operation results.
555
+ #
556
+ def activate(resource_group_name, partner_topic_name, custom_headers:nil)
557
+ response = activate_async(resource_group_name, partner_topic_name, custom_headers:custom_headers).value!
558
+ response.body unless response.nil?
559
+ end
560
+
561
+ #
562
+ # Activate a partner topic.
563
+ #
564
+ # Activate a newly created partner topic.
565
+ #
566
+ # @param resource_group_name [String] The name of the resource group within the
567
+ # user's subscription.
568
+ # @param partner_topic_name [String] Name of the partner topic.
569
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
570
+ # will be added to the HTTP request.
571
+ #
572
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
573
+ #
574
+ def activate_with_http_info(resource_group_name, partner_topic_name, custom_headers:nil)
575
+ activate_async(resource_group_name, partner_topic_name, custom_headers:custom_headers).value!
576
+ end
577
+
578
+ #
579
+ # Activate a partner topic.
580
+ #
581
+ # Activate a newly created partner topic.
582
+ #
583
+ # @param resource_group_name [String] The name of the resource group within the
584
+ # user's subscription.
585
+ # @param partner_topic_name [String] Name of the partner topic.
586
+ # @param [Hash{String => String}] A hash of custom headers that will be added
587
+ # to the HTTP request.
588
+ #
589
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
590
+ #
591
+ def activate_async(resource_group_name, partner_topic_name, custom_headers:nil)
592
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
593
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
594
+ fail ArgumentError, 'partner_topic_name is nil' if partner_topic_name.nil?
595
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
596
+
597
+
598
+ request_headers = {}
599
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
600
+
601
+ # Set Headers
602
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
603
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
604
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/activate'
605
+
606
+ request_url = @base_url || @client.base_url
607
+
608
+ options = {
609
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
610
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'partnerTopicName' => partner_topic_name},
611
+ query_params: {'api-version' => @client.api_version},
612
+ headers: request_headers.merge(custom_headers || {}),
613
+ base_url: request_url
614
+ }
615
+ promise = @client.make_request_async(:post, path_template, options)
616
+
617
+ promise = promise.then do |result|
618
+ http_response = result.response
619
+ status_code = http_response.status
620
+ response_content = http_response.body
621
+ unless status_code == 200
622
+ error_model = JSON.load(response_content)
623
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
624
+ end
625
+
626
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
627
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
628
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
629
+ # Deserialize Response
630
+ if status_code == 200
631
+ begin
632
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
633
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PartnerTopic.mapper()
634
+ result.body = @client.deserialize(result_mapper, parsed_response)
635
+ rescue Exception => e
636
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
637
+ end
638
+ end
639
+
640
+ result
641
+ end
642
+
643
+ promise.execute
644
+ end
645
+
646
+ #
647
+ # Deactivate a partner topic.
648
+ #
649
+ # Deactivate specific partner topic.
650
+ #
651
+ # @param resource_group_name [String] The name of the resource group within the
652
+ # user's subscription.
653
+ # @param partner_topic_name [String] Name of the partner topic.
654
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
655
+ # will be added to the HTTP request.
656
+ #
657
+ # @return [PartnerTopic] operation results.
658
+ #
659
+ def deactivate(resource_group_name, partner_topic_name, custom_headers:nil)
660
+ response = deactivate_async(resource_group_name, partner_topic_name, custom_headers:custom_headers).value!
661
+ response.body unless response.nil?
662
+ end
663
+
664
+ #
665
+ # Deactivate a partner topic.
666
+ #
667
+ # Deactivate specific partner topic.
668
+ #
669
+ # @param resource_group_name [String] The name of the resource group within the
670
+ # user's subscription.
671
+ # @param partner_topic_name [String] Name of the partner topic.
672
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
673
+ # will be added to the HTTP request.
674
+ #
675
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
676
+ #
677
+ def deactivate_with_http_info(resource_group_name, partner_topic_name, custom_headers:nil)
678
+ deactivate_async(resource_group_name, partner_topic_name, custom_headers:custom_headers).value!
679
+ end
680
+
681
+ #
682
+ # Deactivate a partner topic.
683
+ #
684
+ # Deactivate specific partner topic.
685
+ #
686
+ # @param resource_group_name [String] The name of the resource group within the
687
+ # user's subscription.
688
+ # @param partner_topic_name [String] Name of the partner topic.
689
+ # @param [Hash{String => String}] A hash of custom headers that will be added
690
+ # to the HTTP request.
691
+ #
692
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
693
+ #
694
+ def deactivate_async(resource_group_name, partner_topic_name, custom_headers:nil)
695
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
696
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
697
+ fail ArgumentError, 'partner_topic_name is nil' if partner_topic_name.nil?
698
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
699
+
700
+
701
+ request_headers = {}
702
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
703
+
704
+ # Set Headers
705
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
706
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
707
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/deactivate'
708
+
709
+ request_url = @base_url || @client.base_url
710
+
711
+ options = {
712
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
713
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'partnerTopicName' => partner_topic_name},
714
+ query_params: {'api-version' => @client.api_version},
715
+ headers: request_headers.merge(custom_headers || {}),
716
+ base_url: request_url
717
+ }
718
+ promise = @client.make_request_async(:post, path_template, options)
719
+
720
+ promise = promise.then do |result|
721
+ http_response = result.response
722
+ status_code = http_response.status
723
+ response_content = http_response.body
724
+ unless status_code == 200
725
+ error_model = JSON.load(response_content)
726
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
727
+ end
728
+
729
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
730
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
731
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
732
+ # Deserialize Response
733
+ if status_code == 200
734
+ begin
735
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
736
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PartnerTopic.mapper()
737
+ result.body = @client.deserialize(result_mapper, parsed_response)
738
+ rescue Exception => e
739
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
740
+ end
741
+ end
742
+
743
+ result
744
+ end
745
+
746
+ promise.execute
747
+ end
748
+
749
+ #
750
+ # Delete a partner topic.
751
+ #
752
+ # Delete existing partner topic.
753
+ #
754
+ # @param resource_group_name [String] The name of the resource group within the
755
+ # user's subscription.
756
+ # @param partner_topic_name [String] Name of the partner topic.
757
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
758
+ # will be added to the HTTP request.
759
+ #
760
+ #
761
+ def begin_delete(resource_group_name, partner_topic_name, custom_headers:nil)
762
+ response = begin_delete_async(resource_group_name, partner_topic_name, custom_headers:custom_headers).value!
763
+ nil
764
+ end
765
+
766
+ #
767
+ # Delete a partner topic.
768
+ #
769
+ # Delete existing partner topic.
770
+ #
771
+ # @param resource_group_name [String] The name of the resource group within the
772
+ # user's subscription.
773
+ # @param partner_topic_name [String] Name of the partner topic.
774
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
775
+ # will be added to the HTTP request.
776
+ #
777
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
778
+ #
779
+ def begin_delete_with_http_info(resource_group_name, partner_topic_name, custom_headers:nil)
780
+ begin_delete_async(resource_group_name, partner_topic_name, custom_headers:custom_headers).value!
781
+ end
782
+
783
+ #
784
+ # Delete a partner topic.
785
+ #
786
+ # Delete existing partner topic.
787
+ #
788
+ # @param resource_group_name [String] The name of the resource group within the
789
+ # user's subscription.
790
+ # @param partner_topic_name [String] Name of the partner topic.
791
+ # @param [Hash{String => String}] A hash of custom headers that will be added
792
+ # to the HTTP request.
793
+ #
794
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
795
+ #
796
+ def begin_delete_async(resource_group_name, partner_topic_name, custom_headers:nil)
797
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
798
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
799
+ fail ArgumentError, 'partner_topic_name is nil' if partner_topic_name.nil?
800
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
801
+
802
+
803
+ request_headers = {}
804
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
805
+
806
+ # Set Headers
807
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
808
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
809
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}'
810
+
811
+ request_url = @base_url || @client.base_url
812
+
813
+ options = {
814
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
815
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'partnerTopicName' => partner_topic_name},
816
+ query_params: {'api-version' => @client.api_version},
817
+ headers: request_headers.merge(custom_headers || {}),
818
+ base_url: request_url
819
+ }
820
+ promise = @client.make_request_async(:delete, path_template, options)
821
+
822
+ promise = promise.then do |result|
823
+ http_response = result.response
824
+ status_code = http_response.status
825
+ response_content = http_response.body
826
+ unless status_code == 200 || status_code == 202 || status_code == 204
827
+ error_model = JSON.load(response_content)
828
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
829
+ end
830
+
831
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
832
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
833
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
834
+
835
+ result
836
+ end
837
+
838
+ promise.execute
839
+ end
840
+
841
+ #
842
+ # List partner topics under an Azure subscription.
843
+ #
844
+ # List all the partner topics under an Azure subscription.
845
+ #
846
+ # @param next_page_link [String] The NextLink from the previous successful call
847
+ # to List operation.
848
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
849
+ # will be added to the HTTP request.
850
+ #
851
+ # @return [PartnerTopicsListResult] operation results.
852
+ #
853
+ def list_by_subscription_next(next_page_link, custom_headers:nil)
854
+ response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
855
+ response.body unless response.nil?
856
+ end
857
+
858
+ #
859
+ # List partner topics under an Azure subscription.
860
+ #
861
+ # List all the partner topics under an Azure subscription.
862
+ #
863
+ # @param next_page_link [String] The NextLink from the previous successful call
864
+ # to List operation.
865
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
866
+ # will be added to the HTTP request.
867
+ #
868
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
869
+ #
870
+ def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil)
871
+ list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
872
+ end
873
+
874
+ #
875
+ # List partner topics under an Azure subscription.
876
+ #
877
+ # List all the partner topics under an Azure subscription.
878
+ #
879
+ # @param next_page_link [String] The NextLink from the previous successful call
880
+ # to List operation.
881
+ # @param [Hash{String => String}] A hash of custom headers that will be added
882
+ # to the HTTP request.
883
+ #
884
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
885
+ #
886
+ def list_by_subscription_next_async(next_page_link, custom_headers:nil)
887
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
888
+
889
+
890
+ request_headers = {}
891
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
892
+
893
+ # Set Headers
894
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
895
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
896
+ path_template = '{nextLink}'
897
+
898
+ request_url = @base_url || @client.base_url
899
+
900
+ options = {
901
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
902
+ skip_encoding_path_params: {'nextLink' => next_page_link},
903
+ headers: request_headers.merge(custom_headers || {}),
904
+ base_url: request_url
905
+ }
906
+ promise = @client.make_request_async(:get, path_template, options)
907
+
908
+ promise = promise.then do |result|
909
+ http_response = result.response
910
+ status_code = http_response.status
911
+ response_content = http_response.body
912
+ unless status_code == 200
913
+ error_model = JSON.load(response_content)
914
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
915
+ end
916
+
917
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
918
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
919
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
920
+ # Deserialize Response
921
+ if status_code == 200
922
+ begin
923
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
924
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PartnerTopicsListResult.mapper()
925
+ result.body = @client.deserialize(result_mapper, parsed_response)
926
+ rescue Exception => e
927
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
928
+ end
929
+ end
930
+
931
+ result
932
+ end
933
+
934
+ promise.execute
935
+ end
936
+
937
+ #
938
+ # List partner topics under a resource group.
939
+ #
940
+ # List all the partner topics under a resource group.
941
+ #
942
+ # @param next_page_link [String] The NextLink from the previous successful call
943
+ # to List operation.
944
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
945
+ # will be added to the HTTP request.
946
+ #
947
+ # @return [PartnerTopicsListResult] operation results.
948
+ #
949
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
950
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
951
+ response.body unless response.nil?
952
+ end
953
+
954
+ #
955
+ # List partner topics under a resource group.
956
+ #
957
+ # List all the partner topics under a resource group.
958
+ #
959
+ # @param next_page_link [String] The NextLink from the previous successful call
960
+ # to List operation.
961
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
962
+ # will be added to the HTTP request.
963
+ #
964
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
965
+ #
966
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
967
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
968
+ end
969
+
970
+ #
971
+ # List partner topics under a resource group.
972
+ #
973
+ # List all the partner topics under a resource group.
974
+ #
975
+ # @param next_page_link [String] The NextLink from the previous successful call
976
+ # to List operation.
977
+ # @param [Hash{String => String}] A hash of custom headers that will be added
978
+ # to the HTTP request.
979
+ #
980
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
981
+ #
982
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
983
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
984
+
985
+
986
+ request_headers = {}
987
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
988
+
989
+ # Set Headers
990
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
991
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
992
+ path_template = '{nextLink}'
993
+
994
+ request_url = @base_url || @client.base_url
995
+
996
+ options = {
997
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
998
+ skip_encoding_path_params: {'nextLink' => next_page_link},
999
+ headers: request_headers.merge(custom_headers || {}),
1000
+ base_url: request_url
1001
+ }
1002
+ promise = @client.make_request_async(:get, path_template, options)
1003
+
1004
+ promise = promise.then do |result|
1005
+ http_response = result.response
1006
+ status_code = http_response.status
1007
+ response_content = http_response.body
1008
+ unless status_code == 200
1009
+ error_model = JSON.load(response_content)
1010
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1011
+ end
1012
+
1013
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1014
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1015
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1016
+ # Deserialize Response
1017
+ if status_code == 200
1018
+ begin
1019
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1020
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PartnerTopicsListResult.mapper()
1021
+ result.body = @client.deserialize(result_mapper, parsed_response)
1022
+ rescue Exception => e
1023
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1024
+ end
1025
+ end
1026
+
1027
+ result
1028
+ end
1029
+
1030
+ promise.execute
1031
+ end
1032
+
1033
+ #
1034
+ # List partner topics under an Azure subscription.
1035
+ #
1036
+ # List all the partner topics under an Azure subscription.
1037
+ #
1038
+ # @param filter [String] The query used to filter the search results using
1039
+ # OData syntax. Filtering is permitted on the 'name' property only and with
1040
+ # limited number of OData operations. These operations are: the 'contains'
1041
+ # function as well as the following logical operations: not, and, or, eq (for
1042
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
1043
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
1044
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
1045
+ # $filter=location eq 'westus'.
1046
+ # @param top [Integer] The number of results to return per page for the list
1047
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
1048
+ # default number of results to be returned is 20 items per page.
1049
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1050
+ # will be added to the HTTP request.
1051
+ #
1052
+ # @return [PartnerTopicsListResult] which provide lazy access to pages of the
1053
+ # response.
1054
+ #
1055
+ def list_by_subscription_as_lazy(filter:nil, top:nil, custom_headers:nil)
1056
+ response = list_by_subscription_async(filter:filter, top:top, custom_headers:custom_headers).value!
1057
+ unless response.nil?
1058
+ page = response.body
1059
+ page.next_method = Proc.new do |next_page_link|
1060
+ list_by_subscription_next_async(next_page_link, custom_headers:custom_headers)
1061
+ end
1062
+ page
1063
+ end
1064
+ end
1065
+
1066
+ #
1067
+ # List partner topics under a resource group.
1068
+ #
1069
+ # List all the partner topics under a resource group.
1070
+ #
1071
+ # @param resource_group_name [String] The name of the resource group within the
1072
+ # user's subscription.
1073
+ # @param filter [String] The query used to filter the search results using
1074
+ # OData syntax. Filtering is permitted on the 'name' property only and with
1075
+ # limited number of OData operations. These operations are: the 'contains'
1076
+ # function as well as the following logical operations: not, and, or, eq (for
1077
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
1078
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
1079
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
1080
+ # $filter=location eq 'westus'.
1081
+ # @param top [Integer] The number of results to return per page for the list
1082
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
1083
+ # default number of results to be returned is 20 items per page.
1084
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1085
+ # will be added to the HTTP request.
1086
+ #
1087
+ # @return [PartnerTopicsListResult] which provide lazy access to pages of the
1088
+ # response.
1089
+ #
1090
+ def list_by_resource_group_as_lazy(resource_group_name, filter:nil, top:nil, custom_headers:nil)
1091
+ response = list_by_resource_group_async(resource_group_name, filter:filter, top:top, custom_headers:custom_headers).value!
1092
+ unless response.nil?
1093
+ page = response.body
1094
+ page.next_method = Proc.new do |next_page_link|
1095
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1096
+ end
1097
+ page
1098
+ end
1099
+ end
1100
+
1101
+ end
1102
+ end