azure_mgmt_cdn 0.17.7 → 0.18.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (291) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-06-01/generated/azure_mgmt_cdn/cdn_management_client.rb +1 -1
  3. data/lib/2016-04-02/generated/azure_mgmt_cdn/cdn_management_client.rb +1 -1
  4. data/lib/2016-10-02/generated/azure_mgmt_cdn/cdn_management_client.rb +1 -1
  5. data/lib/2017-04-02/generated/azure_mgmt_cdn/cdn_management_client.rb +1 -1
  6. data/lib/2017-10-12/generated/azure_mgmt_cdn/cdn_management_client.rb +1 -1
  7. data/lib/2020-04-15/generated/azure_mgmt_cdn/cdn_management_client.rb +1 -1
  8. data/lib/2020-09-01/generated/azure_mgmt_cdn.rb +304 -0
  9. data/lib/2020-09-01/generated/azure_mgmt_cdn/afdcustom_domains.rb +1035 -0
  10. data/lib/2020-09-01/generated/azure_mgmt_cdn/afdendpoints.rb +1426 -0
  11. data/lib/2020-09-01/generated/azure_mgmt_cdn/afdorigin_groups.rb +1094 -0
  12. data/lib/2020-09-01/generated/azure_mgmt_cdn/afdorigins.rb +912 -0
  13. data/lib/2020-09-01/generated/azure_mgmt_cdn/afdprofiles.rb +362 -0
  14. data/lib/2020-09-01/generated/azure_mgmt_cdn/cdn_management_client.rb +533 -0
  15. data/lib/2020-09-01/generated/azure_mgmt_cdn/custom_domains.rb +1001 -0
  16. data/lib/2020-09-01/generated/azure_mgmt_cdn/edge_nodes.rb +225 -0
  17. data/lib/2020-09-01/generated/azure_mgmt_cdn/endpoints.rb +1946 -0
  18. data/lib/2020-09-01/generated/azure_mgmt_cdn/log_analytics.rb +748 -0
  19. data/lib/2020-09-01/generated/azure_mgmt_cdn/managed_rule_sets.rb +221 -0
  20. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/action_type.rb +18 -0
  21. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afd_certificate_type.rb +16 -0
  22. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afd_error_response.rb +51 -0
  23. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afd_minimum_tls_version.rb +16 -0
  24. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afd_provisioning_state.rb +19 -0
  25. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afd_purge_parameters.rb +74 -0
  26. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afddomain.rb +166 -0
  27. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afddomain_https_parameters.rb +73 -0
  28. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afddomain_list_result.rb +102 -0
  29. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afddomain_update_parameters.rb +62 -0
  30. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdendpoint.rb +166 -0
  31. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdendpoint_list_result.rb +102 -0
  32. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdendpoint_protocols.rb +16 -0
  33. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdendpoint_update_parameters.rb +82 -0
  34. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdorigin.rb +232 -0
  35. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdorigin_group.rb +169 -0
  36. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdorigin_group_list_result.rb +102 -0
  37. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdorigin_group_update_parameters.rb +105 -0
  38. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdorigin_list_result.rb +101 -0
  39. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdorigin_update_parameters.rb +166 -0
  40. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdstate_properties.rb +61 -0
  41. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/algorithm.rb +15 -0
  42. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cache_behavior.rb +17 -0
  43. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cache_expiration_action_parameters.rb +88 -0
  44. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cache_key_query_string_action_parameters.rb +75 -0
  45. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cdn_certificate_source_parameters.rb +62 -0
  46. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cdn_endpoint.rb +46 -0
  47. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cdn_managed_https_parameters.rb +82 -0
  48. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cdn_web_application_firewall_policy.rb +220 -0
  49. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cdn_web_application_firewall_policy_list.rb +103 -0
  50. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cdn_web_application_firewall_policy_patch_parameters.rb +55 -0
  51. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/certificate.rb +68 -0
  52. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/certificate_type.rb +16 -0
  53. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/check_name_availability_input.rb +60 -0
  54. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/check_name_availability_output.rb +72 -0
  55. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cidr_ip_address.rb +57 -0
  56. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/compression_settings.rb +70 -0
  57. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/continents_response.rb +75 -0
  58. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/continents_response_continents_item.rb +47 -0
  59. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/continents_response_country_or_regions_item.rb +58 -0
  60. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cookies_match_condition_parameters.rb +124 -0
  61. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/cookies_operator.rb +24 -0
  62. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_domain.rb +158 -0
  63. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_domain_https_parameters.rb +73 -0
  64. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_domain_list_result.rb +102 -0
  65. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_domain_parameters.rb +48 -0
  66. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_domain_resource_state.rb +17 -0
  67. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_https_provisioning_state.rb +19 -0
  68. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_https_provisioning_substate.rb +24 -0
  69. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_rule.rb +108 -0
  70. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_rule_enabled_state.rb +16 -0
  71. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/custom_rule_list.rb +55 -0
  72. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/customer_certificate.rb +122 -0
  73. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/customer_certificate_parameters.rb +144 -0
  74. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/deep_created_origin.rb +200 -0
  75. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/deep_created_origin_group.rb +114 -0
  76. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule.rb +107 -0
  77. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_action.rb +53 -0
  78. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_cache_expiration_action.rb +64 -0
  79. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_cache_key_query_string_action.rb +64 -0
  80. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_condition.rb +59 -0
  81. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_cookies_condition.rb +64 -0
  82. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_http_version_condition.rb +64 -0
  83. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_is_device_condition.rb +64 -0
  84. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_post_args_condition.rb +64 -0
  85. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_query_string_condition.rb +64 -0
  86. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_remote_address_condition.rb +64 -0
  87. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_request_body_condition.rb +64 -0
  88. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_request_header_action.rb +63 -0
  89. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_request_header_condition.rb +64 -0
  90. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_request_method_condition.rb +64 -0
  91. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_request_scheme_condition.rb +64 -0
  92. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_request_uri_condition.rb +64 -0
  93. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_response_header_action.rb +63 -0
  94. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_url_file_extension_condition.rb +64 -0
  95. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_url_file_name_condition.rb +64 -0
  96. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/delivery_rule_url_path_condition.rb +64 -0
  97. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/deployment_status.rb +18 -0
  98. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/destination_protocol.rb +17 -0
  99. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/domain_validation_properties.rb +60 -0
  100. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/domain_validation_state.rb +20 -0
  101. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/edge_node.rb +93 -0
  102. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/edgenode_result.rb +101 -0
  103. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/enabled_state.rb +16 -0
  104. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/endpoint.rb +401 -0
  105. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/endpoint_list_result.rb +101 -0
  106. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/endpoint_properties_update_parameters_delivery_policy.rb +67 -0
  107. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/endpoint_properties_update_parameters_web_application_firewall_policy_link.rb +49 -0
  108. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/endpoint_resource_state.rb +20 -0
  109. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/endpoint_update_parameters.rb +274 -0
  110. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/error_response.rb +60 -0
  111. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/forwarding_protocol.rb +17 -0
  112. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/geo_filter.rb +80 -0
  113. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/geo_filter_actions.rb +16 -0
  114. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/header_action.rb +17 -0
  115. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/header_action_parameters.rb +83 -0
  116. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/health_probe_parameters.rb +90 -0
  117. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/health_probe_request_type.rb +17 -0
  118. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/http_error_range_parameters.rb +65 -0
  119. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/http_version_match_condition_parameters.rb +95 -0
  120. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/https_redirect.rb +16 -0
  121. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/identity_type.rb +18 -0
  122. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/ip_address_group.rb +86 -0
  123. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/is_device_match_condition_parameters.rb +113 -0
  124. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/key_vault_certificate_source_parameters.rb +137 -0
  125. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/key_vault_signing_key_parameters.rb +106 -0
  126. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/link_to_default_domain.rb +16 -0
  127. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/load_balancing_settings_parameters.rb +71 -0
  128. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/load_parameters.rb +55 -0
  129. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_certificate.rb +59 -0
  130. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_certificate_parameters.rb +80 -0
  131. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_definition.rb +59 -0
  132. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_enabled_state.rb +16 -0
  133. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_group_definition.rb +81 -0
  134. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_group_override.rb +68 -0
  135. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_override.rb +72 -0
  136. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_set.rb +94 -0
  137. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_set_definition.rb +133 -0
  138. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_set_definition_list.rb +101 -0
  139. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/managed_rule_set_list.rb +55 -0
  140. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/match_condition.rb +125 -0
  141. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/match_processing_behavior.rb +16 -0
  142. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/match_variable.rb +23 -0
  143. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/metrics_response.rb +88 -0
  144. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/metrics_response_series_item.rb +99 -0
  145. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/metrics_response_series_item_data_item.rb +58 -0
  146. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/metrics_response_series_item_groups_item.rb +58 -0
  147. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/minimum_tls_version.rb +17 -0
  148. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/operation.rb +59 -0
  149. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/operation_display.rb +72 -0
  150. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/operations_list_result.rb +102 -0
  151. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/operator.rb +26 -0
  152. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/optimization_type.rb +19 -0
  153. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin.rb +266 -0
  154. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_group.rb +163 -0
  155. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_group_list_result.rb +102 -0
  156. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_group_override_action.rb +64 -0
  157. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_group_override_action_parameters.rb +63 -0
  158. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_group_resource_state.rb +17 -0
  159. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_group_update_parameters.rb +100 -0
  160. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_list_result.rb +101 -0
  161. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_resource_state.rb +17 -0
  162. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/origin_update_parameters.rb +187 -0
  163. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/param_indicator.rb +17 -0
  164. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/policy_enabled_state.rb +16 -0
  165. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/policy_mode.rb +16 -0
  166. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/policy_resource_state.rb +20 -0
  167. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/policy_settings.rb +99 -0
  168. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/post_args_match_condition_parameters.rb +124 -0
  169. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/post_args_operator.rb +24 -0
  170. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/private_endpoint_status.rb +19 -0
  171. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/probe_protocol.rb +17 -0
  172. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/profile.rb +147 -0
  173. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/profile_list_result.rb +101 -0
  174. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/profile_resource_state.rb +18 -0
  175. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/profile_update_parameters.rb +54 -0
  176. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/protocol_type.rb +16 -0
  177. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/provisioning_state.rb +17 -0
  178. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/proxy_resource.rb +76 -0
  179. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/purge_parameters.rb +55 -0
  180. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/query_string_behavior.rb +18 -0
  181. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/query_string_caching_behavior.rb +18 -0
  182. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/query_string_match_condition_parameters.rb +114 -0
  183. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/query_string_operator.rb +24 -0
  184. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rankings_response.rb +77 -0
  185. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rankings_response_tables_item.rb +67 -0
  186. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rankings_response_tables_item_data_item.rb +67 -0
  187. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rankings_response_tables_item_data_item_metrics_item.rb +70 -0
  188. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rate_limit_rule.rb +117 -0
  189. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rate_limit_rule_list.rb +55 -0
  190. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/redirect_type.rb +18 -0
  191. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/remote_address_match_condition_parameters.rb +114 -0
  192. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/remote_address_operator.rb +17 -0
  193. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_body_match_condition_parameters.rb +114 -0
  194. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_body_operator.rb +24 -0
  195. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_header_match_condition_parameters.rb +125 -0
  196. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_header_operator.rb +24 -0
  197. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_method_match_condition_parameters.rb +95 -0
  198. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_scheme_match_condition_parameters.rb +95 -0
  199. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_uri_match_condition_parameters.rb +114 -0
  200. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/request_uri_operator.rb +24 -0
  201. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resource.rb +80 -0
  202. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resource_reference.rb +46 -0
  203. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resource_type.rb +15 -0
  204. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resource_usage.rb +83 -0
  205. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resource_usage_list_result.rb +100 -0
  206. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resources_response.rb +75 -0
  207. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resources_response_custom_domains_item.rb +80 -0
  208. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resources_response_endpoints_item.rb +89 -0
  209. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/resources_response_endpoints_item_custom_domains_item.rb +81 -0
  210. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/response_based_detected_error_types.rb +17 -0
  211. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/response_based_origin_error_detection_parameters.rb +89 -0
  212. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/route.rb +299 -0
  213. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/route_list_result.rb +101 -0
  214. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/route_update_parameters.rb +235 -0
  215. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rule.rb +174 -0
  216. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rule_list_result.rb +101 -0
  217. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rule_set.rb +99 -0
  218. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rule_set_list_result.rb +102 -0
  219. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/rule_update_parameters.rb +110 -0
  220. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/secret.rb +113 -0
  221. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/secret_list_result.rb +102 -0
  222. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/secret_parameters.rb +46 -0
  223. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/secret_properties.rb +67 -0
  224. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/secret_type.rb +17 -0
  225. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/security_policy.rb +111 -0
  226. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/security_policy_list_result.rb +102 -0
  227. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/security_policy_parameters.rb +46 -0
  228. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/security_policy_web_application_firewall_association.rb +75 -0
  229. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/security_policy_web_application_firewall_parameters.rb +84 -0
  230. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/shared_private_link_resource_properties.rb +99 -0
  231. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/shared_private_link_resource_status.rb +19 -0
  232. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/sku.rb +54 -0
  233. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/sku_name.rb +28 -0
  234. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/sso_uri.rb +48 -0
  235. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/status.rb +18 -0
  236. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/supported_optimization_types_list_result.rb +56 -0
  237. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/system_data.rb +107 -0
  238. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/tracked_resource.rb +105 -0
  239. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/transform.rb +16 -0
  240. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/transform_type.rb +20 -0
  241. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_file_extension_match_condition_parameters.rb +114 -0
  242. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_file_extension_operator.rb +24 -0
  243. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_file_name_match_condition_parameters.rb +114 -0
  244. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_file_name_operator.rb +24 -0
  245. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_path_match_condition_parameters.rb +114 -0
  246. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_path_operator.rb +25 -0
  247. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_redirect_action.rb +64 -0
  248. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_redirect_action_parameters.rb +127 -0
  249. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_rewrite_action.rb +64 -0
  250. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_rewrite_action_parameters.rb +86 -0
  251. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_signing_action.rb +64 -0
  252. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_signing_action_parameters.rb +82 -0
  253. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_signing_key.rb +62 -0
  254. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_signing_key_parameters.rb +86 -0
  255. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/url_signing_param_identifier.rb +58 -0
  256. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/usage.rb +95 -0
  257. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/usage_name.rb +57 -0
  258. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/usages_list_result.rb +98 -0
  259. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/user_managed_https_parameters.rb +82 -0
  260. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validate_custom_domain_input.rb +47 -0
  261. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validate_custom_domain_output.rb +72 -0
  262. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validate_probe_input.rb +46 -0
  263. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validate_probe_output.rb +73 -0
  264. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validate_secret_input.rb +59 -0
  265. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validate_secret_output.rb +58 -0
  266. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validate_secret_type.rb +17 -0
  267. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/validation_token.rb +47 -0
  268. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/waf_metrics_response.rb +88 -0
  269. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/waf_metrics_response_series_item.rb +98 -0
  270. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/waf_metrics_response_series_item_data_item.rb +58 -0
  271. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/waf_metrics_response_series_item_groups_item.rb +58 -0
  272. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/waf_rankings_response.rb +96 -0
  273. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/waf_rankings_response_data_item.rb +75 -0
  274. data/lib/2020-09-01/generated/azure_mgmt_cdn/models/waf_rankings_response_data_item_metrics_item.rb +69 -0
  275. data/lib/2020-09-01/generated/azure_mgmt_cdn/module_definition.rb +9 -0
  276. data/lib/2020-09-01/generated/azure_mgmt_cdn/operations.rb +219 -0
  277. data/lib/2020-09-01/generated/azure_mgmt_cdn/origin_groups.rb +927 -0
  278. data/lib/2020-09-01/generated/azure_mgmt_cdn/origins.rb +922 -0
  279. data/lib/2020-09-01/generated/azure_mgmt_cdn/policies.rb +789 -0
  280. data/lib/2020-09-01/generated/azure_mgmt_cdn/profiles.rb +1482 -0
  281. data/lib/2020-09-01/generated/azure_mgmt_cdn/resource_usage_operations.rb +228 -0
  282. data/lib/2020-09-01/generated/azure_mgmt_cdn/routes.rb +913 -0
  283. data/lib/2020-09-01/generated/azure_mgmt_cdn/rule_sets.rb +908 -0
  284. data/lib/2020-09-01/generated/azure_mgmt_cdn/rules.rb +889 -0
  285. data/lib/2020-09-01/generated/azure_mgmt_cdn/secrets.rb +845 -0
  286. data/lib/2020-09-01/generated/azure_mgmt_cdn/security_policies.rb +868 -0
  287. data/lib/2020-09-01/generated/azure_mgmt_cdn/validate.rb +122 -0
  288. data/lib/azure_mgmt_cdn.rb +1 -0
  289. data/lib/profiles/latest/modules/cdn_profile_module.rb +802 -418
  290. data/lib/version.rb +1 -1
  291. metadata +282 -2
@@ -0,0 +1,912 @@
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::CDN::Mgmt::V2020_09_01
7
+ #
8
+ # Cdn Management Client
9
+ #
10
+ class AFDOrigins
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the AFDOrigins class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [CdnManagementClient] reference to the CdnManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists all of the existing origins within an origin group.
26
+ #
27
+ # @param resource_group_name [String] Name of the Resource group within the
28
+ # Azure subscription.
29
+ # @param profile_name [String] Name of the CDN profile which is unique within
30
+ # the resource group.
31
+ # @param origin_group_name [String] Name of the origin group which is unique
32
+ # within the profile.
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ # @return [Array<AFDOrigin>] operation results.
37
+ #
38
+ def list_by_origin_group(resource_group_name, profile_name, origin_group_name, custom_headers:nil)
39
+ first_page = list_by_origin_group_as_lazy(resource_group_name, profile_name, origin_group_name, custom_headers:custom_headers)
40
+ first_page.get_all_items
41
+ end
42
+
43
+ #
44
+ # Lists all of the existing origins within an origin group.
45
+ #
46
+ # @param resource_group_name [String] Name of the Resource group within the
47
+ # Azure subscription.
48
+ # @param profile_name [String] Name of the CDN profile which is unique within
49
+ # the resource group.
50
+ # @param origin_group_name [String] Name of the origin group which is unique
51
+ # within the profile.
52
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
53
+ # will be added to the HTTP request.
54
+ #
55
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
56
+ #
57
+ def list_by_origin_group_with_http_info(resource_group_name, profile_name, origin_group_name, custom_headers:nil)
58
+ list_by_origin_group_async(resource_group_name, profile_name, origin_group_name, custom_headers:custom_headers).value!
59
+ end
60
+
61
+ #
62
+ # Lists all of the existing origins within an origin group.
63
+ #
64
+ # @param resource_group_name [String] Name of the Resource group within the
65
+ # Azure subscription.
66
+ # @param profile_name [String] Name of the CDN profile which is unique within
67
+ # the resource group.
68
+ # @param origin_group_name [String] Name of the origin group which is unique
69
+ # within the profile.
70
+ # @param [Hash{String => String}] A hash of custom headers that will be added
71
+ # to the HTTP request.
72
+ #
73
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
+ #
75
+ def list_by_origin_group_async(resource_group_name, profile_name, origin_group_name, custom_headers:nil)
76
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
77
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
78
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
79
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
80
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
81
+ fail ArgumentError, 'origin_group_name is nil' if origin_group_name.nil?
82
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
83
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
84
+
85
+
86
+ request_headers = {}
87
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
88
+
89
+ # Set Headers
90
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
91
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
92
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins'
93
+
94
+ request_url = @base_url || @client.base_url
95
+
96
+ options = {
97
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
98
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'originGroupName' => origin_group_name,'subscriptionId' => @client.subscription_id},
99
+ query_params: {'api-version' => @client.api_version},
100
+ headers: request_headers.merge(custom_headers || {}),
101
+ base_url: request_url
102
+ }
103
+ promise = @client.make_request_async(:get, path_template, options)
104
+
105
+ promise = promise.then do |result|
106
+ http_response = result.response
107
+ status_code = http_response.status
108
+ response_content = http_response.body
109
+ unless status_code == 200
110
+ error_model = JSON.load(response_content)
111
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
112
+ end
113
+
114
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
115
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
116
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
117
+ # Deserialize Response
118
+ if status_code == 200
119
+ begin
120
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
121
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDOriginListResult.mapper()
122
+ result.body = @client.deserialize(result_mapper, parsed_response)
123
+ rescue Exception => e
124
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
125
+ end
126
+ end
127
+
128
+ result
129
+ end
130
+
131
+ promise.execute
132
+ end
133
+
134
+ #
135
+ # Gets an existing origin within an origin group.
136
+ #
137
+ # @param resource_group_name [String] Name of the Resource group within the
138
+ # Azure subscription.
139
+ # @param profile_name [String] Name of the CDN profile which is unique within
140
+ # the resource group.
141
+ # @param origin_group_name [String] Name of the origin group which is unique
142
+ # within the profile.
143
+ # @param origin_name [String] Name of the origin which is unique within the
144
+ # profile.
145
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
146
+ # will be added to the HTTP request.
147
+ #
148
+ # @return [AFDOrigin] operation results.
149
+ #
150
+ def get(resource_group_name, profile_name, origin_group_name, origin_name, custom_headers:nil)
151
+ response = get_async(resource_group_name, profile_name, origin_group_name, origin_name, custom_headers:custom_headers).value!
152
+ response.body unless response.nil?
153
+ end
154
+
155
+ #
156
+ # Gets an existing origin within an origin group.
157
+ #
158
+ # @param resource_group_name [String] Name of the Resource group within the
159
+ # Azure subscription.
160
+ # @param profile_name [String] Name of the CDN profile which is unique within
161
+ # the resource group.
162
+ # @param origin_group_name [String] Name of the origin group which is unique
163
+ # within the profile.
164
+ # @param origin_name [String] Name of the origin which is unique within the
165
+ # profile.
166
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
167
+ # will be added to the HTTP request.
168
+ #
169
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
170
+ #
171
+ def get_with_http_info(resource_group_name, profile_name, origin_group_name, origin_name, custom_headers:nil)
172
+ get_async(resource_group_name, profile_name, origin_group_name, origin_name, custom_headers:custom_headers).value!
173
+ end
174
+
175
+ #
176
+ # Gets an existing origin within an origin group.
177
+ #
178
+ # @param resource_group_name [String] Name of the Resource group within the
179
+ # Azure subscription.
180
+ # @param profile_name [String] Name of the CDN profile which is unique within
181
+ # the resource group.
182
+ # @param origin_group_name [String] Name of the origin group which is unique
183
+ # within the profile.
184
+ # @param origin_name [String] Name of the origin which is unique within the
185
+ # profile.
186
+ # @param [Hash{String => String}] A hash of custom headers that will be added
187
+ # to the HTTP request.
188
+ #
189
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
190
+ #
191
+ def get_async(resource_group_name, profile_name, origin_group_name, origin_name, custom_headers:nil)
192
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
193
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
194
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
195
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
196
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
197
+ fail ArgumentError, 'origin_group_name is nil' if origin_group_name.nil?
198
+ fail ArgumentError, 'origin_name is nil' if origin_name.nil?
199
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
200
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
201
+
202
+
203
+ request_headers = {}
204
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
205
+
206
+ # Set Headers
207
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
208
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
209
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}'
210
+
211
+ request_url = @base_url || @client.base_url
212
+
213
+ options = {
214
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
215
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'originGroupName' => origin_group_name,'originName' => origin_name,'subscriptionId' => @client.subscription_id},
216
+ query_params: {'api-version' => @client.api_version},
217
+ headers: request_headers.merge(custom_headers || {}),
218
+ base_url: request_url
219
+ }
220
+ promise = @client.make_request_async(:get, path_template, options)
221
+
222
+ promise = promise.then do |result|
223
+ http_response = result.response
224
+ status_code = http_response.status
225
+ response_content = http_response.body
226
+ unless status_code == 200
227
+ error_model = JSON.load(response_content)
228
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
229
+ end
230
+
231
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
232
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
233
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
234
+ # Deserialize Response
235
+ if status_code == 200
236
+ begin
237
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
238
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDOrigin.mapper()
239
+ result.body = @client.deserialize(result_mapper, parsed_response)
240
+ rescue Exception => e
241
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
242
+ end
243
+ end
244
+
245
+ result
246
+ end
247
+
248
+ promise.execute
249
+ end
250
+
251
+ #
252
+ # Creates a new origin within the specified origin group.
253
+ #
254
+ # @param resource_group_name [String] Name of the Resource group within the
255
+ # Azure subscription.
256
+ # @param profile_name [String] Name of the CDN profile which is unique within
257
+ # the resource group.
258
+ # @param origin_group_name [String] Name of the origin group which is unique
259
+ # within the profile.
260
+ # @param origin_name [String] Name of the origin that is unique within the
261
+ # profile.
262
+ # @param origin [AFDOrigin] Origin properties
263
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
264
+ # will be added to the HTTP request.
265
+ #
266
+ # @return [AFDOrigin] operation results.
267
+ #
268
+ def create(resource_group_name, profile_name, origin_group_name, origin_name, origin, custom_headers:nil)
269
+ response = create_async(resource_group_name, profile_name, origin_group_name, origin_name, origin, custom_headers:custom_headers).value!
270
+ response.body unless response.nil?
271
+ end
272
+
273
+ #
274
+ # @param resource_group_name [String] Name of the Resource group within the
275
+ # Azure subscription.
276
+ # @param profile_name [String] Name of the CDN profile which is unique within
277
+ # the resource group.
278
+ # @param origin_group_name [String] Name of the origin group which is unique
279
+ # within the profile.
280
+ # @param origin_name [String] Name of the origin that is unique within the
281
+ # profile.
282
+ # @param origin [AFDOrigin] Origin properties
283
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
284
+ # will be added to the HTTP request.
285
+ #
286
+ # @return [Concurrent::Promise] promise which provides async access to http
287
+ # response.
288
+ #
289
+ def create_async(resource_group_name, profile_name, origin_group_name, origin_name, origin, custom_headers:nil)
290
+ # Send request
291
+ promise = begin_create_async(resource_group_name, profile_name, origin_group_name, origin_name, origin, custom_headers:custom_headers)
292
+
293
+ promise = promise.then do |response|
294
+ # Defining deserialization method.
295
+ deserialize_method = lambda do |parsed_response|
296
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDOrigin.mapper()
297
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
298
+ end
299
+
300
+ # Waiting for response.
301
+ @client.get_long_running_operation_result(response, deserialize_method)
302
+ end
303
+
304
+ promise
305
+ end
306
+
307
+ #
308
+ # Updates an existing origin within an origin group.
309
+ #
310
+ # @param resource_group_name [String] Name of the Resource group within the
311
+ # Azure subscription.
312
+ # @param profile_name [String] Name of the CDN profile which is unique within
313
+ # the resource group.
314
+ # @param origin_group_name [String] Name of the origin group which is unique
315
+ # within the profile.
316
+ # @param origin_name [String] Name of the origin which is unique within the
317
+ # profile.
318
+ # @param origin_update_properties [AFDOriginUpdateParameters] Origin properties
319
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
320
+ # will be added to the HTTP request.
321
+ #
322
+ # @return [AFDOrigin] operation results.
323
+ #
324
+ def update(resource_group_name, profile_name, origin_group_name, origin_name, origin_update_properties, custom_headers:nil)
325
+ response = update_async(resource_group_name, profile_name, origin_group_name, origin_name, origin_update_properties, custom_headers:custom_headers).value!
326
+ response.body unless response.nil?
327
+ end
328
+
329
+ #
330
+ # @param resource_group_name [String] Name of the Resource group within the
331
+ # Azure subscription.
332
+ # @param profile_name [String] Name of the CDN profile which is unique within
333
+ # the resource group.
334
+ # @param origin_group_name [String] Name of the origin group which is unique
335
+ # within the profile.
336
+ # @param origin_name [String] Name of the origin which is unique within the
337
+ # profile.
338
+ # @param origin_update_properties [AFDOriginUpdateParameters] Origin properties
339
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
340
+ # will be added to the HTTP request.
341
+ #
342
+ # @return [Concurrent::Promise] promise which provides async access to http
343
+ # response.
344
+ #
345
+ def update_async(resource_group_name, profile_name, origin_group_name, origin_name, origin_update_properties, custom_headers:nil)
346
+ # Send request
347
+ promise = begin_update_async(resource_group_name, profile_name, origin_group_name, origin_name, origin_update_properties, custom_headers:custom_headers)
348
+
349
+ promise = promise.then do |response|
350
+ # Defining deserialization method.
351
+ deserialize_method = lambda do |parsed_response|
352
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDOrigin.mapper()
353
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
354
+ end
355
+
356
+ # Waiting for response.
357
+ @client.get_long_running_operation_result(response, deserialize_method)
358
+ end
359
+
360
+ promise
361
+ end
362
+
363
+ #
364
+ # Deletes an existing origin within an origin group.
365
+ #
366
+ # @param resource_group_name [String] Name of the Resource group within the
367
+ # Azure subscription.
368
+ # @param profile_name [String] Name of the CDN profile which is unique within
369
+ # the resource group.
370
+ # @param origin_group_name [String] Name of the origin group which is unique
371
+ # within the profile.
372
+ # @param origin_name [String] Name of the origin which is unique within the
373
+ # profile.
374
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
375
+ # will be added to the HTTP request.
376
+ #
377
+ def delete(resource_group_name, profile_name, origin_group_name, origin_name, custom_headers:nil)
378
+ response = delete_async(resource_group_name, profile_name, origin_group_name, origin_name, custom_headers:custom_headers).value!
379
+ nil
380
+ end
381
+
382
+ #
383
+ # @param resource_group_name [String] Name of the Resource group within the
384
+ # Azure subscription.
385
+ # @param profile_name [String] Name of the CDN profile which is unique within
386
+ # the resource group.
387
+ # @param origin_group_name [String] Name of the origin group which is unique
388
+ # within the profile.
389
+ # @param origin_name [String] Name of the origin which is unique within the
390
+ # profile.
391
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
392
+ # will be added to the HTTP request.
393
+ #
394
+ # @return [Concurrent::Promise] promise which provides async access to http
395
+ # response.
396
+ #
397
+ def delete_async(resource_group_name, profile_name, origin_group_name, origin_name, custom_headers:nil)
398
+ # Send request
399
+ promise = begin_delete_async(resource_group_name, profile_name, origin_group_name, origin_name, custom_headers:custom_headers)
400
+
401
+ promise = promise.then do |response|
402
+ # Defining deserialization method.
403
+ deserialize_method = lambda do |parsed_response|
404
+ end
405
+
406
+ # Waiting for response.
407
+ @client.get_long_running_operation_result(response, deserialize_method)
408
+ end
409
+
410
+ promise
411
+ end
412
+
413
+ #
414
+ # Creates a new origin within the specified origin group.
415
+ #
416
+ # @param resource_group_name [String] Name of the Resource group within the
417
+ # Azure subscription.
418
+ # @param profile_name [String] Name of the CDN profile which is unique within
419
+ # the resource group.
420
+ # @param origin_group_name [String] Name of the origin group which is unique
421
+ # within the profile.
422
+ # @param origin_name [String] Name of the origin that is unique within the
423
+ # profile.
424
+ # @param origin [AFDOrigin] Origin properties
425
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
426
+ # will be added to the HTTP request.
427
+ #
428
+ # @return [AFDOrigin] operation results.
429
+ #
430
+ def begin_create(resource_group_name, profile_name, origin_group_name, origin_name, origin, custom_headers:nil)
431
+ response = begin_create_async(resource_group_name, profile_name, origin_group_name, origin_name, origin, custom_headers:custom_headers).value!
432
+ response.body unless response.nil?
433
+ end
434
+
435
+ #
436
+ # Creates a new origin within the specified origin group.
437
+ #
438
+ # @param resource_group_name [String] Name of the Resource group within the
439
+ # Azure subscription.
440
+ # @param profile_name [String] Name of the CDN profile which is unique within
441
+ # the resource group.
442
+ # @param origin_group_name [String] Name of the origin group which is unique
443
+ # within the profile.
444
+ # @param origin_name [String] Name of the origin that is unique within the
445
+ # profile.
446
+ # @param origin [AFDOrigin] Origin properties
447
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
448
+ # will be added to the HTTP request.
449
+ #
450
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
451
+ #
452
+ def begin_create_with_http_info(resource_group_name, profile_name, origin_group_name, origin_name, origin, custom_headers:nil)
453
+ begin_create_async(resource_group_name, profile_name, origin_group_name, origin_name, origin, custom_headers:custom_headers).value!
454
+ end
455
+
456
+ #
457
+ # Creates a new origin within the specified origin group.
458
+ #
459
+ # @param resource_group_name [String] Name of the Resource group within the
460
+ # Azure subscription.
461
+ # @param profile_name [String] Name of the CDN profile which is unique within
462
+ # the resource group.
463
+ # @param origin_group_name [String] Name of the origin group which is unique
464
+ # within the profile.
465
+ # @param origin_name [String] Name of the origin that is unique within the
466
+ # profile.
467
+ # @param origin [AFDOrigin] Origin properties
468
+ # @param [Hash{String => String}] A hash of custom headers that will be added
469
+ # to the HTTP request.
470
+ #
471
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
472
+ #
473
+ def begin_create_async(resource_group_name, profile_name, origin_group_name, origin_name, origin, custom_headers:nil)
474
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
475
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
476
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
477
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
478
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
479
+ fail ArgumentError, 'origin_group_name is nil' if origin_group_name.nil?
480
+ fail ArgumentError, 'origin_name is nil' if origin_name.nil?
481
+ fail ArgumentError, 'origin is nil' if origin.nil?
482
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
483
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
484
+
485
+
486
+ request_headers = {}
487
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
488
+
489
+ # Set Headers
490
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
491
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
492
+
493
+ # Serialize Request
494
+ request_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDOrigin.mapper()
495
+ request_content = @client.serialize(request_mapper, origin)
496
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
497
+
498
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}'
499
+
500
+ request_url = @base_url || @client.base_url
501
+
502
+ options = {
503
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
504
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'originGroupName' => origin_group_name,'originName' => origin_name,'subscriptionId' => @client.subscription_id},
505
+ query_params: {'api-version' => @client.api_version},
506
+ body: request_content,
507
+ headers: request_headers.merge(custom_headers || {}),
508
+ base_url: request_url
509
+ }
510
+ promise = @client.make_request_async(:put, path_template, options)
511
+
512
+ promise = promise.then do |result|
513
+ http_response = result.response
514
+ status_code = http_response.status
515
+ response_content = http_response.body
516
+ unless status_code == 200 || status_code == 201
517
+ error_model = JSON.load(response_content)
518
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
519
+ end
520
+
521
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
522
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
523
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
524
+ # Deserialize Response
525
+ if status_code == 200
526
+ begin
527
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
528
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDOrigin.mapper()
529
+ result.body = @client.deserialize(result_mapper, parsed_response)
530
+ rescue Exception => e
531
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
532
+ end
533
+ end
534
+ # Deserialize Response
535
+ if status_code == 201
536
+ begin
537
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
538
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDOrigin.mapper()
539
+ result.body = @client.deserialize(result_mapper, parsed_response)
540
+ rescue Exception => e
541
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
542
+ end
543
+ end
544
+
545
+ result
546
+ end
547
+
548
+ promise.execute
549
+ end
550
+
551
+ #
552
+ # Updates an existing origin within an origin group.
553
+ #
554
+ # @param resource_group_name [String] Name of the Resource group within the
555
+ # Azure subscription.
556
+ # @param profile_name [String] Name of the CDN profile which is unique within
557
+ # the resource group.
558
+ # @param origin_group_name [String] Name of the origin group which is unique
559
+ # within the profile.
560
+ # @param origin_name [String] Name of the origin which is unique within the
561
+ # profile.
562
+ # @param origin_update_properties [AFDOriginUpdateParameters] Origin properties
563
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
564
+ # will be added to the HTTP request.
565
+ #
566
+ # @return [AFDOrigin] operation results.
567
+ #
568
+ def begin_update(resource_group_name, profile_name, origin_group_name, origin_name, origin_update_properties, custom_headers:nil)
569
+ response = begin_update_async(resource_group_name, profile_name, origin_group_name, origin_name, origin_update_properties, custom_headers:custom_headers).value!
570
+ response.body unless response.nil?
571
+ end
572
+
573
+ #
574
+ # Updates an existing origin within an origin group.
575
+ #
576
+ # @param resource_group_name [String] Name of the Resource group within the
577
+ # Azure subscription.
578
+ # @param profile_name [String] Name of the CDN profile which is unique within
579
+ # the resource group.
580
+ # @param origin_group_name [String] Name of the origin group which is unique
581
+ # within the profile.
582
+ # @param origin_name [String] Name of the origin which is unique within the
583
+ # profile.
584
+ # @param origin_update_properties [AFDOriginUpdateParameters] Origin properties
585
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
586
+ # will be added to the HTTP request.
587
+ #
588
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
589
+ #
590
+ def begin_update_with_http_info(resource_group_name, profile_name, origin_group_name, origin_name, origin_update_properties, custom_headers:nil)
591
+ begin_update_async(resource_group_name, profile_name, origin_group_name, origin_name, origin_update_properties, custom_headers:custom_headers).value!
592
+ end
593
+
594
+ #
595
+ # Updates an existing origin within an origin group.
596
+ #
597
+ # @param resource_group_name [String] Name of the Resource group within the
598
+ # Azure subscription.
599
+ # @param profile_name [String] Name of the CDN profile which is unique within
600
+ # the resource group.
601
+ # @param origin_group_name [String] Name of the origin group which is unique
602
+ # within the profile.
603
+ # @param origin_name [String] Name of the origin which is unique within the
604
+ # profile.
605
+ # @param origin_update_properties [AFDOriginUpdateParameters] Origin properties
606
+ # @param [Hash{String => String}] A hash of custom headers that will be added
607
+ # to the HTTP request.
608
+ #
609
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
610
+ #
611
+ def begin_update_async(resource_group_name, profile_name, origin_group_name, origin_name, origin_update_properties, custom_headers:nil)
612
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
613
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
614
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
615
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
616
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
617
+ fail ArgumentError, 'origin_group_name is nil' if origin_group_name.nil?
618
+ fail ArgumentError, 'origin_name is nil' if origin_name.nil?
619
+ fail ArgumentError, 'origin_update_properties is nil' if origin_update_properties.nil?
620
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
621
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
622
+
623
+
624
+ request_headers = {}
625
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
626
+
627
+ # Set Headers
628
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
629
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
630
+
631
+ # Serialize Request
632
+ request_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDOriginUpdateParameters.mapper()
633
+ request_content = @client.serialize(request_mapper, origin_update_properties)
634
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
635
+
636
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}'
637
+
638
+ request_url = @base_url || @client.base_url
639
+
640
+ options = {
641
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
642
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'originGroupName' => origin_group_name,'originName' => origin_name,'subscriptionId' => @client.subscription_id},
643
+ query_params: {'api-version' => @client.api_version},
644
+ body: request_content,
645
+ headers: request_headers.merge(custom_headers || {}),
646
+ base_url: request_url
647
+ }
648
+ promise = @client.make_request_async(:patch, path_template, options)
649
+
650
+ promise = promise.then do |result|
651
+ http_response = result.response
652
+ status_code = http_response.status
653
+ response_content = http_response.body
654
+ unless status_code == 200 || status_code == 202
655
+ error_model = JSON.load(response_content)
656
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
657
+ end
658
+
659
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
660
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
661
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
662
+ # Deserialize Response
663
+ if status_code == 200
664
+ begin
665
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
666
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDOrigin.mapper()
667
+ result.body = @client.deserialize(result_mapper, parsed_response)
668
+ rescue Exception => e
669
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
670
+ end
671
+ end
672
+ # Deserialize Response
673
+ if status_code == 202
674
+ begin
675
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
676
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDOrigin.mapper()
677
+ result.body = @client.deserialize(result_mapper, parsed_response)
678
+ rescue Exception => e
679
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
680
+ end
681
+ end
682
+
683
+ result
684
+ end
685
+
686
+ promise.execute
687
+ end
688
+
689
+ #
690
+ # Deletes an existing origin within an origin group.
691
+ #
692
+ # @param resource_group_name [String] Name of the Resource group within the
693
+ # Azure subscription.
694
+ # @param profile_name [String] Name of the CDN profile which is unique within
695
+ # the resource group.
696
+ # @param origin_group_name [String] Name of the origin group which is unique
697
+ # within the profile.
698
+ # @param origin_name [String] Name of the origin which is unique within the
699
+ # profile.
700
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
701
+ # will be added to the HTTP request.
702
+ #
703
+ #
704
+ def begin_delete(resource_group_name, profile_name, origin_group_name, origin_name, custom_headers:nil)
705
+ response = begin_delete_async(resource_group_name, profile_name, origin_group_name, origin_name, custom_headers:custom_headers).value!
706
+ nil
707
+ end
708
+
709
+ #
710
+ # Deletes an existing origin within an origin group.
711
+ #
712
+ # @param resource_group_name [String] Name of the Resource group within the
713
+ # Azure subscription.
714
+ # @param profile_name [String] Name of the CDN profile which is unique within
715
+ # the resource group.
716
+ # @param origin_group_name [String] Name of the origin group which is unique
717
+ # within the profile.
718
+ # @param origin_name [String] Name of the origin which is unique within the
719
+ # profile.
720
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
721
+ # will be added to the HTTP request.
722
+ #
723
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
724
+ #
725
+ def begin_delete_with_http_info(resource_group_name, profile_name, origin_group_name, origin_name, custom_headers:nil)
726
+ begin_delete_async(resource_group_name, profile_name, origin_group_name, origin_name, custom_headers:custom_headers).value!
727
+ end
728
+
729
+ #
730
+ # Deletes an existing origin within an origin group.
731
+ #
732
+ # @param resource_group_name [String] Name of the Resource group within the
733
+ # Azure subscription.
734
+ # @param profile_name [String] Name of the CDN profile which is unique within
735
+ # the resource group.
736
+ # @param origin_group_name [String] Name of the origin group which is unique
737
+ # within the profile.
738
+ # @param origin_name [String] Name of the origin which is unique within the
739
+ # profile.
740
+ # @param [Hash{String => String}] A hash of custom headers that will be added
741
+ # to the HTTP request.
742
+ #
743
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
744
+ #
745
+ def begin_delete_async(resource_group_name, profile_name, origin_group_name, origin_name, custom_headers:nil)
746
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
747
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
748
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
749
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
750
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
751
+ fail ArgumentError, 'origin_group_name is nil' if origin_group_name.nil?
752
+ fail ArgumentError, 'origin_name is nil' if origin_name.nil?
753
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
754
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
755
+
756
+
757
+ request_headers = {}
758
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
759
+
760
+ # Set Headers
761
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
762
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
763
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}'
764
+
765
+ request_url = @base_url || @client.base_url
766
+
767
+ options = {
768
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
769
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'originGroupName' => origin_group_name,'originName' => origin_name,'subscriptionId' => @client.subscription_id},
770
+ query_params: {'api-version' => @client.api_version},
771
+ headers: request_headers.merge(custom_headers || {}),
772
+ base_url: request_url
773
+ }
774
+ promise = @client.make_request_async(:delete, path_template, options)
775
+
776
+ promise = promise.then do |result|
777
+ http_response = result.response
778
+ status_code = http_response.status
779
+ response_content = http_response.body
780
+ unless status_code == 200 || status_code == 204
781
+ error_model = JSON.load(response_content)
782
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
783
+ end
784
+
785
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
786
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
787
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
788
+
789
+ result
790
+ end
791
+
792
+ promise.execute
793
+ end
794
+
795
+ #
796
+ # Lists all of the existing origins within an origin group.
797
+ #
798
+ # @param next_page_link [String] The NextLink from the previous successful call
799
+ # to List operation.
800
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
801
+ # will be added to the HTTP request.
802
+ #
803
+ # @return [AFDOriginListResult] operation results.
804
+ #
805
+ def list_by_origin_group_next(next_page_link, custom_headers:nil)
806
+ response = list_by_origin_group_next_async(next_page_link, custom_headers:custom_headers).value!
807
+ response.body unless response.nil?
808
+ end
809
+
810
+ #
811
+ # Lists all of the existing origins within an origin group.
812
+ #
813
+ # @param next_page_link [String] The NextLink from the previous successful call
814
+ # to List operation.
815
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
816
+ # will be added to the HTTP request.
817
+ #
818
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
819
+ #
820
+ def list_by_origin_group_next_with_http_info(next_page_link, custom_headers:nil)
821
+ list_by_origin_group_next_async(next_page_link, custom_headers:custom_headers).value!
822
+ end
823
+
824
+ #
825
+ # Lists all of the existing origins within an origin group.
826
+ #
827
+ # @param next_page_link [String] The NextLink from the previous successful call
828
+ # to List operation.
829
+ # @param [Hash{String => String}] A hash of custom headers that will be added
830
+ # to the HTTP request.
831
+ #
832
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
833
+ #
834
+ def list_by_origin_group_next_async(next_page_link, custom_headers:nil)
835
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
836
+
837
+
838
+ request_headers = {}
839
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
840
+
841
+ # Set Headers
842
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
843
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
844
+ path_template = '{nextLink}'
845
+
846
+ request_url = @base_url || @client.base_url
847
+
848
+ options = {
849
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
850
+ skip_encoding_path_params: {'nextLink' => next_page_link},
851
+ headers: request_headers.merge(custom_headers || {}),
852
+ base_url: request_url
853
+ }
854
+ promise = @client.make_request_async(:get, path_template, options)
855
+
856
+ promise = promise.then do |result|
857
+ http_response = result.response
858
+ status_code = http_response.status
859
+ response_content = http_response.body
860
+ unless status_code == 200
861
+ error_model = JSON.load(response_content)
862
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
863
+ end
864
+
865
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
866
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
867
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
868
+ # Deserialize Response
869
+ if status_code == 200
870
+ begin
871
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
872
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::AFDOriginListResult.mapper()
873
+ result.body = @client.deserialize(result_mapper, parsed_response)
874
+ rescue Exception => e
875
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
876
+ end
877
+ end
878
+
879
+ result
880
+ end
881
+
882
+ promise.execute
883
+ end
884
+
885
+ #
886
+ # Lists all of the existing origins within an origin group.
887
+ #
888
+ # @param resource_group_name [String] Name of the Resource group within the
889
+ # Azure subscription.
890
+ # @param profile_name [String] Name of the CDN profile which is unique within
891
+ # the resource group.
892
+ # @param origin_group_name [String] Name of the origin group which is unique
893
+ # within the profile.
894
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
895
+ # will be added to the HTTP request.
896
+ #
897
+ # @return [AFDOriginListResult] which provide lazy access to pages of the
898
+ # response.
899
+ #
900
+ def list_by_origin_group_as_lazy(resource_group_name, profile_name, origin_group_name, custom_headers:nil)
901
+ response = list_by_origin_group_async(resource_group_name, profile_name, origin_group_name, custom_headers:custom_headers).value!
902
+ unless response.nil?
903
+ page = response.body
904
+ page.next_method = Proc.new do |next_page_link|
905
+ list_by_origin_group_next_async(next_page_link, custom_headers:custom_headers)
906
+ end
907
+ page
908
+ end
909
+ end
910
+
911
+ end
912
+ end