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,922 @@
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 Origins
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Origins 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 endpoint.
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 endpoint_name [String] Name of the endpoint under the profile which is
32
+ # unique globally.
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<Origin>] operation results.
37
+ #
38
+ def list_by_endpoint(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
39
+ first_page = list_by_endpoint_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers)
40
+ first_page.get_all_items
41
+ end
42
+
43
+ #
44
+ # Lists all of the existing origins within an endpoint.
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 endpoint_name [String] Name of the endpoint under the profile which is
51
+ # unique globally.
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_endpoint_with_http_info(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
58
+ list_by_endpoint_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
59
+ end
60
+
61
+ #
62
+ # Lists all of the existing origins within an endpoint.
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 endpoint_name [String] Name of the endpoint under the profile which is
69
+ # unique globally.
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_endpoint_async(resource_group_name, profile_name, endpoint_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, 'endpoint_name is nil' if endpoint_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}/endpoints/{endpointName}/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,'endpointName' => endpoint_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::OriginListResult.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 endpoint.
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 endpoint_name [String] Name of the endpoint under the profile which is
142
+ # unique globally.
143
+ # @param origin_name [String] Name of the origin which is unique within the
144
+ # endpoint.
145
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
146
+ # will be added to the HTTP request.
147
+ #
148
+ # @return [Origin] operation results.
149
+ #
150
+ def get(resource_group_name, profile_name, endpoint_name, origin_name, custom_headers:nil)
151
+ response = get_async(resource_group_name, profile_name, endpoint_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 endpoint.
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 endpoint_name [String] Name of the endpoint under the profile which is
163
+ # unique globally.
164
+ # @param origin_name [String] Name of the origin which is unique within the
165
+ # endpoint.
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, endpoint_name, origin_name, custom_headers:nil)
172
+ get_async(resource_group_name, profile_name, endpoint_name, origin_name, custom_headers:custom_headers).value!
173
+ end
174
+
175
+ #
176
+ # Gets an existing origin within an endpoint.
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 endpoint_name [String] Name of the endpoint under the profile which is
183
+ # unique globally.
184
+ # @param origin_name [String] Name of the origin which is unique within the
185
+ # endpoint.
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, endpoint_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, 'endpoint_name is nil' if endpoint_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}/endpoints/{endpointName}/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,'endpointName' => endpoint_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::Origin.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 endpoint.
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 endpoint_name [String] Name of the endpoint under the profile which is
259
+ # unique globally.
260
+ # @param origin_name [String] Name of the origin that is unique within the
261
+ # endpoint.
262
+ # @param origin [Origin] 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 [Origin] operation results.
267
+ #
268
+ def create(resource_group_name, profile_name, endpoint_name, origin_name, origin, custom_headers:nil)
269
+ response = create_async(resource_group_name, profile_name, endpoint_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 endpoint_name [String] Name of the endpoint under the profile which is
279
+ # unique globally.
280
+ # @param origin_name [String] Name of the origin that is unique within the
281
+ # endpoint.
282
+ # @param origin [Origin] 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, endpoint_name, origin_name, origin, custom_headers:nil)
290
+ # Send request
291
+ promise = begin_create_async(resource_group_name, profile_name, endpoint_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::Origin.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 endpoint.
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 endpoint_name [String] Name of the endpoint under the profile which is
315
+ # unique globally.
316
+ # @param origin_name [String] Name of the origin which is unique within the
317
+ # endpoint.
318
+ # @param origin_update_properties [OriginUpdateParameters] 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 [Origin] operation results.
323
+ #
324
+ def update(resource_group_name, profile_name, endpoint_name, origin_name, origin_update_properties, custom_headers:nil)
325
+ response = update_async(resource_group_name, profile_name, endpoint_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 endpoint_name [String] Name of the endpoint under the profile which is
335
+ # unique globally.
336
+ # @param origin_name [String] Name of the origin which is unique within the
337
+ # endpoint.
338
+ # @param origin_update_properties [OriginUpdateParameters] 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, endpoint_name, origin_name, origin_update_properties, custom_headers:nil)
346
+ # Send request
347
+ promise = begin_update_async(resource_group_name, profile_name, endpoint_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::Origin.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 endpoint.
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 endpoint_name [String] Name of the endpoint under the profile which is
371
+ # unique globally.
372
+ # @param origin_name [String] Name of the origin which is unique within the
373
+ # endpoint.
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, endpoint_name, origin_name, custom_headers:nil)
378
+ response = delete_async(resource_group_name, profile_name, endpoint_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 endpoint_name [String] Name of the endpoint under the profile which is
388
+ # unique globally.
389
+ # @param origin_name [String] Name of the origin which is unique within the
390
+ # endpoint.
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, endpoint_name, origin_name, custom_headers:nil)
398
+ # Send request
399
+ promise = begin_delete_async(resource_group_name, profile_name, endpoint_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 endpoint.
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 endpoint_name [String] Name of the endpoint under the profile which is
421
+ # unique globally.
422
+ # @param origin_name [String] Name of the origin that is unique within the
423
+ # endpoint.
424
+ # @param origin [Origin] 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 [Origin] operation results.
429
+ #
430
+ def begin_create(resource_group_name, profile_name, endpoint_name, origin_name, origin, custom_headers:nil)
431
+ response = begin_create_async(resource_group_name, profile_name, endpoint_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 endpoint.
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 endpoint_name [String] Name of the endpoint under the profile which is
443
+ # unique globally.
444
+ # @param origin_name [String] Name of the origin that is unique within the
445
+ # endpoint.
446
+ # @param origin [Origin] 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, endpoint_name, origin_name, origin, custom_headers:nil)
453
+ begin_create_async(resource_group_name, profile_name, endpoint_name, origin_name, origin, custom_headers:custom_headers).value!
454
+ end
455
+
456
+ #
457
+ # Creates a new origin within the specified endpoint.
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 endpoint_name [String] Name of the endpoint under the profile which is
464
+ # unique globally.
465
+ # @param origin_name [String] Name of the origin that is unique within the
466
+ # endpoint.
467
+ # @param origin [Origin] 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, endpoint_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, 'endpoint_name is nil' if endpoint_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::Origin.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}/endpoints/{endpointName}/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,'endpointName' => endpoint_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 || status_code == 202
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::Origin.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::Origin.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
+ # Deserialize Response
545
+ if status_code == 202
546
+ begin
547
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
548
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::Origin.mapper()
549
+ result.body = @client.deserialize(result_mapper, parsed_response)
550
+ rescue Exception => e
551
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
552
+ end
553
+ end
554
+
555
+ result
556
+ end
557
+
558
+ promise.execute
559
+ end
560
+
561
+ #
562
+ # Updates an existing origin within an endpoint.
563
+ #
564
+ # @param resource_group_name [String] Name of the Resource group within the
565
+ # Azure subscription.
566
+ # @param profile_name [String] Name of the CDN profile which is unique within
567
+ # the resource group.
568
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
569
+ # unique globally.
570
+ # @param origin_name [String] Name of the origin which is unique within the
571
+ # endpoint.
572
+ # @param origin_update_properties [OriginUpdateParameters] Origin properties
573
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
574
+ # will be added to the HTTP request.
575
+ #
576
+ # @return [Origin] operation results.
577
+ #
578
+ def begin_update(resource_group_name, profile_name, endpoint_name, origin_name, origin_update_properties, custom_headers:nil)
579
+ response = begin_update_async(resource_group_name, profile_name, endpoint_name, origin_name, origin_update_properties, custom_headers:custom_headers).value!
580
+ response.body unless response.nil?
581
+ end
582
+
583
+ #
584
+ # Updates an existing origin within an endpoint.
585
+ #
586
+ # @param resource_group_name [String] Name of the Resource group within the
587
+ # Azure subscription.
588
+ # @param profile_name [String] Name of the CDN profile which is unique within
589
+ # the resource group.
590
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
591
+ # unique globally.
592
+ # @param origin_name [String] Name of the origin which is unique within the
593
+ # endpoint.
594
+ # @param origin_update_properties [OriginUpdateParameters] Origin properties
595
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
596
+ # will be added to the HTTP request.
597
+ #
598
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
599
+ #
600
+ def begin_update_with_http_info(resource_group_name, profile_name, endpoint_name, origin_name, origin_update_properties, custom_headers:nil)
601
+ begin_update_async(resource_group_name, profile_name, endpoint_name, origin_name, origin_update_properties, custom_headers:custom_headers).value!
602
+ end
603
+
604
+ #
605
+ # Updates an existing origin within an endpoint.
606
+ #
607
+ # @param resource_group_name [String] Name of the Resource group within the
608
+ # Azure subscription.
609
+ # @param profile_name [String] Name of the CDN profile which is unique within
610
+ # the resource group.
611
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
612
+ # unique globally.
613
+ # @param origin_name [String] Name of the origin which is unique within the
614
+ # endpoint.
615
+ # @param origin_update_properties [OriginUpdateParameters] Origin properties
616
+ # @param [Hash{String => String}] A hash of custom headers that will be added
617
+ # to the HTTP request.
618
+ #
619
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
620
+ #
621
+ def begin_update_async(resource_group_name, profile_name, endpoint_name, origin_name, origin_update_properties, custom_headers:nil)
622
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
623
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
624
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
625
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
626
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
627
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
628
+ fail ArgumentError, 'origin_name is nil' if origin_name.nil?
629
+ fail ArgumentError, 'origin_update_properties is nil' if origin_update_properties.nil?
630
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
631
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
632
+
633
+
634
+ request_headers = {}
635
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
636
+
637
+ # Set Headers
638
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
639
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
640
+
641
+ # Serialize Request
642
+ request_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::OriginUpdateParameters.mapper()
643
+ request_content = @client.serialize(request_mapper, origin_update_properties)
644
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
645
+
646
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}'
647
+
648
+ request_url = @base_url || @client.base_url
649
+
650
+ options = {
651
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
652
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'originName' => origin_name,'subscriptionId' => @client.subscription_id},
653
+ query_params: {'api-version' => @client.api_version},
654
+ body: request_content,
655
+ headers: request_headers.merge(custom_headers || {}),
656
+ base_url: request_url
657
+ }
658
+ promise = @client.make_request_async(:patch, path_template, options)
659
+
660
+ promise = promise.then do |result|
661
+ http_response = result.response
662
+ status_code = http_response.status
663
+ response_content = http_response.body
664
+ unless status_code == 200 || status_code == 202
665
+ error_model = JSON.load(response_content)
666
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
667
+ end
668
+
669
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
670
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
671
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
672
+ # Deserialize Response
673
+ if status_code == 200
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::Origin.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
+ # Deserialize Response
683
+ if status_code == 202
684
+ begin
685
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
686
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::Origin.mapper()
687
+ result.body = @client.deserialize(result_mapper, parsed_response)
688
+ rescue Exception => e
689
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
690
+ end
691
+ end
692
+
693
+ result
694
+ end
695
+
696
+ promise.execute
697
+ end
698
+
699
+ #
700
+ # Deletes an existing origin within an endpoint.
701
+ #
702
+ # @param resource_group_name [String] Name of the Resource group within the
703
+ # Azure subscription.
704
+ # @param profile_name [String] Name of the CDN profile which is unique within
705
+ # the resource group.
706
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
707
+ # unique globally.
708
+ # @param origin_name [String] Name of the origin which is unique within the
709
+ # endpoint.
710
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
711
+ # will be added to the HTTP request.
712
+ #
713
+ #
714
+ def begin_delete(resource_group_name, profile_name, endpoint_name, origin_name, custom_headers:nil)
715
+ response = begin_delete_async(resource_group_name, profile_name, endpoint_name, origin_name, custom_headers:custom_headers).value!
716
+ nil
717
+ end
718
+
719
+ #
720
+ # Deletes an existing origin within an endpoint.
721
+ #
722
+ # @param resource_group_name [String] Name of the Resource group within the
723
+ # Azure subscription.
724
+ # @param profile_name [String] Name of the CDN profile which is unique within
725
+ # the resource group.
726
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
727
+ # unique globally.
728
+ # @param origin_name [String] Name of the origin which is unique within the
729
+ # endpoint.
730
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
731
+ # will be added to the HTTP request.
732
+ #
733
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
734
+ #
735
+ def begin_delete_with_http_info(resource_group_name, profile_name, endpoint_name, origin_name, custom_headers:nil)
736
+ begin_delete_async(resource_group_name, profile_name, endpoint_name, origin_name, custom_headers:custom_headers).value!
737
+ end
738
+
739
+ #
740
+ # Deletes an existing origin within an endpoint.
741
+ #
742
+ # @param resource_group_name [String] Name of the Resource group within the
743
+ # Azure subscription.
744
+ # @param profile_name [String] Name of the CDN profile which is unique within
745
+ # the resource group.
746
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
747
+ # unique globally.
748
+ # @param origin_name [String] Name of the origin which is unique within the
749
+ # endpoint.
750
+ # @param [Hash{String => String}] A hash of custom headers that will be added
751
+ # to the HTTP request.
752
+ #
753
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
754
+ #
755
+ def begin_delete_async(resource_group_name, profile_name, endpoint_name, origin_name, custom_headers:nil)
756
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
757
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
758
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
759
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
760
+ fail ArgumentError, 'profile_name is nil' if profile_name.nil?
761
+ fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
762
+ fail ArgumentError, 'origin_name is nil' if origin_name.nil?
763
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
764
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
765
+
766
+
767
+ request_headers = {}
768
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
769
+
770
+ # Set Headers
771
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
772
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
773
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}'
774
+
775
+ request_url = @base_url || @client.base_url
776
+
777
+ options = {
778
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
779
+ path_params: {'resourceGroupName' => resource_group_name,'profileName' => profile_name,'endpointName' => endpoint_name,'originName' => origin_name,'subscriptionId' => @client.subscription_id},
780
+ query_params: {'api-version' => @client.api_version},
781
+ headers: request_headers.merge(custom_headers || {}),
782
+ base_url: request_url
783
+ }
784
+ promise = @client.make_request_async(:delete, path_template, options)
785
+
786
+ promise = promise.then do |result|
787
+ http_response = result.response
788
+ status_code = http_response.status
789
+ response_content = http_response.body
790
+ unless status_code == 202 || status_code == 204
791
+ error_model = JSON.load(response_content)
792
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
793
+ end
794
+
795
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
796
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
797
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
798
+
799
+ result
800
+ end
801
+
802
+ promise.execute
803
+ end
804
+
805
+ #
806
+ # Lists all of the existing origins within an endpoint.
807
+ #
808
+ # @param next_page_link [String] The NextLink from the previous successful call
809
+ # to List operation.
810
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
811
+ # will be added to the HTTP request.
812
+ #
813
+ # @return [OriginListResult] operation results.
814
+ #
815
+ def list_by_endpoint_next(next_page_link, custom_headers:nil)
816
+ response = list_by_endpoint_next_async(next_page_link, custom_headers:custom_headers).value!
817
+ response.body unless response.nil?
818
+ end
819
+
820
+ #
821
+ # Lists all of the existing origins within an endpoint.
822
+ #
823
+ # @param next_page_link [String] The NextLink from the previous successful call
824
+ # to List operation.
825
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
826
+ # will be added to the HTTP request.
827
+ #
828
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
829
+ #
830
+ def list_by_endpoint_next_with_http_info(next_page_link, custom_headers:nil)
831
+ list_by_endpoint_next_async(next_page_link, custom_headers:custom_headers).value!
832
+ end
833
+
834
+ #
835
+ # Lists all of the existing origins within an endpoint.
836
+ #
837
+ # @param next_page_link [String] The NextLink from the previous successful call
838
+ # to List operation.
839
+ # @param [Hash{String => String}] A hash of custom headers that will be added
840
+ # to the HTTP request.
841
+ #
842
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
843
+ #
844
+ def list_by_endpoint_next_async(next_page_link, custom_headers:nil)
845
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
846
+
847
+
848
+ request_headers = {}
849
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
850
+
851
+ # Set Headers
852
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
853
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
854
+ path_template = '{nextLink}'
855
+
856
+ request_url = @base_url || @client.base_url
857
+
858
+ options = {
859
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
860
+ skip_encoding_path_params: {'nextLink' => next_page_link},
861
+ headers: request_headers.merge(custom_headers || {}),
862
+ base_url: request_url
863
+ }
864
+ promise = @client.make_request_async(:get, path_template, options)
865
+
866
+ promise = promise.then do |result|
867
+ http_response = result.response
868
+ status_code = http_response.status
869
+ response_content = http_response.body
870
+ unless status_code == 200
871
+ error_model = JSON.load(response_content)
872
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
873
+ end
874
+
875
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
876
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
877
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
878
+ # Deserialize Response
879
+ if status_code == 200
880
+ begin
881
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
882
+ result_mapper = Azure::CDN::Mgmt::V2020_09_01::Models::OriginListResult.mapper()
883
+ result.body = @client.deserialize(result_mapper, parsed_response)
884
+ rescue Exception => e
885
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
886
+ end
887
+ end
888
+
889
+ result
890
+ end
891
+
892
+ promise.execute
893
+ end
894
+
895
+ #
896
+ # Lists all of the existing origins within an endpoint.
897
+ #
898
+ # @param resource_group_name [String] Name of the Resource group within the
899
+ # Azure subscription.
900
+ # @param profile_name [String] Name of the CDN profile which is unique within
901
+ # the resource group.
902
+ # @param endpoint_name [String] Name of the endpoint under the profile which is
903
+ # unique globally.
904
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
905
+ # will be added to the HTTP request.
906
+ #
907
+ # @return [OriginListResult] which provide lazy access to pages of the
908
+ # response.
909
+ #
910
+ def list_by_endpoint_as_lazy(resource_group_name, profile_name, endpoint_name, custom_headers:nil)
911
+ response = list_by_endpoint_async(resource_group_name, profile_name, endpoint_name, custom_headers:custom_headers).value!
912
+ unless response.nil?
913
+ page = response.body
914
+ page.next_method = Proc.new do |next_page_link|
915
+ list_by_endpoint_next_async(next_page_link, custom_headers:custom_headers)
916
+ end
917
+ page
918
+ end
919
+ end
920
+
921
+ end
922
+ end