azure_mgmt_web 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (376) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-04-01/generated/azure_mgmt_web.rb +75 -10
  3. data/lib/2015-04-01/generated/azure_mgmt_web/domain_registration_provider.rb +243 -0
  4. data/lib/2015-04-01/generated/azure_mgmt_web/domains.rb +337 -111
  5. data/lib/2015-04-01/generated/azure_mgmt_web/models/address.rb +6 -6
  6. data/lib/2015-04-01/generated/azure_mgmt_web/models/api_definition_info.rb +46 -0
  7. data/lib/2015-04-01/generated/azure_mgmt_web/models/app_service_plan.rb +316 -0
  8. data/lib/2015-04-01/generated/azure_mgmt_web/models/auto_heal_action_type.rb +17 -0
  9. data/lib/2015-04-01/generated/azure_mgmt_web/models/auto_heal_actions.rb +72 -0
  10. data/lib/2015-04-01/generated/azure_mgmt_web/models/auto_heal_custom_action.rb +58 -0
  11. data/lib/2015-04-01/generated/azure_mgmt_web/models/auto_heal_rules.rb +61 -0
  12. data/lib/2015-04-01/generated/azure_mgmt_web/models/auto_heal_triggers.rb +91 -0
  13. data/lib/2015-04-01/generated/azure_mgmt_web/models/capability.rb +68 -0
  14. data/lib/2015-04-01/generated/azure_mgmt_web/models/cloning_info.rb +182 -0
  15. data/lib/2015-04-01/generated/azure_mgmt_web/models/conn_string_info.rb +71 -0
  16. data/lib/2015-04-01/generated/azure_mgmt_web/models/connection_string_type.rb +25 -0
  17. data/lib/2015-04-01/generated/azure_mgmt_web/models/contact.rb +1 -1
  18. data/lib/2015-04-01/generated/azure_mgmt_web/models/cors_settings.rb +56 -0
  19. data/lib/2015-04-01/generated/azure_mgmt_web/models/csm_operation_collection.rb +99 -0
  20. data/lib/2015-04-01/generated/azure_mgmt_web/models/csm_operation_description.rb +82 -0
  21. data/lib/2015-04-01/generated/azure_mgmt_web/models/csm_operation_description_properties.rb +47 -0
  22. data/lib/2015-04-01/generated/azure_mgmt_web/models/csm_operation_display.rb +79 -0
  23. data/lib/2015-04-01/generated/azure_mgmt_web/models/dimension.rb +81 -0
  24. data/lib/2015-04-01/generated/azure_mgmt_web/models/domain.rb +0 -1
  25. data/lib/2015-04-01/generated/azure_mgmt_web/models/domain_collection.rb +1 -0
  26. data/lib/2015-04-01/generated/azure_mgmt_web/models/domain_ownership_identifier.rb +1 -25
  27. data/lib/2015-04-01/generated/azure_mgmt_web/models/domain_ownership_identifier_collection.rb +1 -0
  28. data/lib/2015-04-01/generated/azure_mgmt_web/models/domain_patch_resource.rb +348 -0
  29. data/lib/2015-04-01/generated/azure_mgmt_web/models/error_response.rb +57 -0
  30. data/lib/2015-04-01/generated/azure_mgmt_web/models/experiments.rb +55 -0
  31. data/lib/2015-04-01/generated/azure_mgmt_web/models/handler_mapping.rb +73 -0
  32. data/lib/2015-04-01/generated/azure_mgmt_web/models/host_name_ssl_state.rb +106 -0
  33. data/lib/2015-04-01/generated/azure_mgmt_web/models/host_type.rb +16 -0
  34. data/lib/2015-04-01/generated/azure_mgmt_web/models/hosting_environment_profile.rb +70 -0
  35. data/lib/2015-04-01/generated/azure_mgmt_web/models/hybrid_connection.rb +163 -0
  36. data/lib/2015-04-01/generated/azure_mgmt_web/models/hybrid_connection_key.rb +95 -0
  37. data/lib/2015-04-01/generated/azure_mgmt_web/models/identifier.rb +81 -0
  38. data/lib/2015-04-01/generated/azure_mgmt_web/models/ip_security_restriction.rb +58 -0
  39. data/lib/2015-04-01/generated/azure_mgmt_web/models/managed_pipeline_mode.rb +16 -0
  40. data/lib/2015-04-01/generated/azure_mgmt_web/models/managed_service_identity.rb +70 -0
  41. data/lib/2015-04-01/generated/azure_mgmt_web/models/metric_availability.rb +57 -0
  42. data/lib/2015-04-01/generated/azure_mgmt_web/models/metric_specification.rb +218 -0
  43. data/lib/2015-04-01/generated/azure_mgmt_web/models/name_identifier_collection.rb +1 -0
  44. data/lib/2015-04-01/generated/azure_mgmt_web/models/name_value_pair.rb +57 -0
  45. data/lib/2015-04-01/generated/azure_mgmt_web/models/push_settings.rb +123 -0
  46. data/lib/2015-04-01/generated/azure_mgmt_web/models/ramp_up_rule.rb +141 -0
  47. data/lib/2015-04-01/generated/azure_mgmt_web/models/requests_based_trigger.rb +57 -0
  48. data/lib/2015-04-01/generated/azure_mgmt_web/models/resource_metric_availability.rb +59 -0
  49. data/lib/2015-04-01/generated/azure_mgmt_web/models/resource_metric_definition.rb +173 -0
  50. data/lib/2015-04-01/generated/azure_mgmt_web/models/resource_metric_name.rb +59 -0
  51. data/lib/2015-04-01/generated/azure_mgmt_web/models/route_type.rb +17 -0
  52. data/lib/2015-04-01/generated/azure_mgmt_web/models/scm_type.rb +27 -0
  53. data/lib/2015-04-01/generated/azure_mgmt_web/models/service_specification.rb +56 -0
  54. data/lib/2015-04-01/generated/azure_mgmt_web/models/site.rb +555 -0
  55. data/lib/2015-04-01/generated/azure_mgmt_web/models/site_availability_state.rb +17 -0
  56. data/lib/2015-04-01/generated/azure_mgmt_web/models/site_config.rb +589 -0
  57. data/lib/2015-04-01/generated/azure_mgmt_web/models/site_limits.rb +68 -0
  58. data/lib/2015-04-01/generated/azure_mgmt_web/models/site_load_balancing.rb +19 -0
  59. data/lib/2015-04-01/generated/azure_mgmt_web/models/site_machine_key.rb +79 -0
  60. data/lib/2015-04-01/generated/azure_mgmt_web/models/sku_capacity.rb +83 -0
  61. data/lib/2015-04-01/generated/azure_mgmt_web/models/sku_description.rb +142 -0
  62. data/lib/2015-04-01/generated/azure_mgmt_web/models/slot_swap_status.rb +71 -0
  63. data/lib/2015-04-01/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb +68 -0
  64. data/lib/2015-04-01/generated/azure_mgmt_web/models/snapshot_recovery_request.rb +132 -0
  65. data/lib/2015-04-01/generated/azure_mgmt_web/models/snapshot_recovery_target.rb +62 -0
  66. data/lib/2015-04-01/generated/azure_mgmt_web/models/ssl_state.rb +17 -0
  67. data/lib/2015-04-01/generated/azure_mgmt_web/models/status_codes_based_trigger.rb +90 -0
  68. data/lib/2015-04-01/generated/azure_mgmt_web/models/status_options.rb +17 -0
  69. data/lib/2015-04-01/generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb +1 -0
  70. data/lib/2015-04-01/generated/azure_mgmt_web/models/top_level_domain_collection.rb +1 -0
  71. data/lib/2015-04-01/generated/azure_mgmt_web/models/usage_state.rb +16 -0
  72. data/lib/2015-04-01/generated/azure_mgmt_web/models/user.rb +125 -0
  73. data/lib/2015-04-01/generated/azure_mgmt_web/models/virtual_application.rb +90 -0
  74. data/lib/2015-04-01/generated/azure_mgmt_web/models/virtual_directory.rb +57 -0
  75. data/lib/2015-04-01/generated/azure_mgmt_web/models/vnet_gateway.rb +93 -0
  76. data/lib/2015-04-01/generated/azure_mgmt_web/models/vnet_info.rb +153 -0
  77. data/lib/2015-04-01/generated/azure_mgmt_web/models/vnet_route.rb +127 -0
  78. data/lib/2015-04-01/generated/azure_mgmt_web/top_level_domains.rb +36 -33
  79. data/lib/2015-04-01/generated/azure_mgmt_web/web_site_management_client.rb +8 -1
  80. data/lib/2015-08-01/generated/azure_mgmt_web.rb +70 -5
  81. data/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb +406 -136
  82. data/lib/2015-08-01/generated/azure_mgmt_web/certificate_registration_provider.rb +243 -0
  83. data/lib/2015-08-01/generated/azure_mgmt_web/models/api_definition_info.rb +46 -0
  84. data/lib/2015-08-01/generated/azure_mgmt_web/models/app_service_certificate_collection.rb +1 -0
  85. data/lib/2015-08-01/generated/azure_mgmt_web/models/app_service_certificate_order_collection.rb +1 -0
  86. data/lib/2015-08-01/generated/azure_mgmt_web/models/app_service_certificate_order_patch_resource.rb +335 -0
  87. data/lib/2015-08-01/generated/azure_mgmt_web/models/app_service_certificate_patch_resource.rb +112 -0
  88. data/lib/2015-08-01/generated/azure_mgmt_web/models/app_service_plan.rb +316 -0
  89. data/lib/2015-08-01/generated/azure_mgmt_web/models/auto_heal_action_type.rb +17 -0
  90. data/lib/2015-08-01/generated/azure_mgmt_web/models/auto_heal_actions.rb +72 -0
  91. data/lib/2015-08-01/generated/azure_mgmt_web/models/auto_heal_custom_action.rb +58 -0
  92. data/lib/2015-08-01/generated/azure_mgmt_web/models/auto_heal_rules.rb +61 -0
  93. data/lib/2015-08-01/generated/azure_mgmt_web/models/auto_heal_triggers.rb +91 -0
  94. data/lib/2015-08-01/generated/azure_mgmt_web/models/capability.rb +68 -0
  95. data/lib/2015-08-01/generated/azure_mgmt_web/models/certificate_details.rb +8 -8
  96. data/lib/2015-08-01/generated/azure_mgmt_web/models/certificate_order_action.rb +1 -25
  97. data/lib/2015-08-01/generated/azure_mgmt_web/models/cloning_info.rb +182 -0
  98. data/lib/2015-08-01/generated/azure_mgmt_web/models/conn_string_info.rb +71 -0
  99. data/lib/2015-08-01/generated/azure_mgmt_web/models/connection_string_type.rb +25 -0
  100. data/lib/2015-08-01/generated/azure_mgmt_web/models/cors_settings.rb +56 -0
  101. data/lib/2015-08-01/generated/azure_mgmt_web/models/csm_operation_collection.rb +99 -0
  102. data/lib/2015-08-01/generated/azure_mgmt_web/models/csm_operation_description.rb +82 -0
  103. data/lib/2015-08-01/generated/azure_mgmt_web/models/csm_operation_description_properties.rb +47 -0
  104. data/lib/2015-08-01/generated/azure_mgmt_web/models/csm_operation_display.rb +79 -0
  105. data/lib/2015-08-01/generated/azure_mgmt_web/models/dimension.rb +81 -0
  106. data/lib/2015-08-01/generated/azure_mgmt_web/models/experiments.rb +55 -0
  107. data/lib/2015-08-01/generated/azure_mgmt_web/models/handler_mapping.rb +73 -0
  108. data/lib/2015-08-01/generated/azure_mgmt_web/models/host_name_ssl_state.rb +106 -0
  109. data/lib/2015-08-01/generated/azure_mgmt_web/models/host_type.rb +16 -0
  110. data/lib/2015-08-01/generated/azure_mgmt_web/models/hosting_environment_profile.rb +70 -0
  111. data/lib/2015-08-01/generated/azure_mgmt_web/models/hybrid_connection.rb +163 -0
  112. data/lib/2015-08-01/generated/azure_mgmt_web/models/hybrid_connection_key.rb +95 -0
  113. data/lib/2015-08-01/generated/azure_mgmt_web/models/identifier.rb +81 -0
  114. data/lib/2015-08-01/generated/azure_mgmt_web/models/ip_security_restriction.rb +58 -0
  115. data/lib/2015-08-01/generated/azure_mgmt_web/models/managed_pipeline_mode.rb +16 -0
  116. data/lib/2015-08-01/generated/azure_mgmt_web/models/managed_service_identity.rb +70 -0
  117. data/lib/2015-08-01/generated/azure_mgmt_web/models/metric_availability.rb +57 -0
  118. data/lib/2015-08-01/generated/azure_mgmt_web/models/metric_specification.rb +218 -0
  119. data/lib/2015-08-01/generated/azure_mgmt_web/models/name_value_pair.rb +57 -0
  120. data/lib/2015-08-01/generated/azure_mgmt_web/models/push_settings.rb +123 -0
  121. data/lib/2015-08-01/generated/azure_mgmt_web/models/ramp_up_rule.rb +141 -0
  122. data/lib/2015-08-01/generated/azure_mgmt_web/models/reissue_certificate_order_request.rb +1 -25
  123. data/lib/2015-08-01/generated/azure_mgmt_web/models/renew_certificate_order_request.rb +1 -25
  124. data/lib/2015-08-01/generated/azure_mgmt_web/models/requests_based_trigger.rb +57 -0
  125. data/lib/2015-08-01/generated/azure_mgmt_web/models/resource_metric_availability.rb +59 -0
  126. data/lib/2015-08-01/generated/azure_mgmt_web/models/resource_metric_definition.rb +173 -0
  127. data/lib/2015-08-01/generated/azure_mgmt_web/models/resource_metric_name.rb +59 -0
  128. data/lib/2015-08-01/generated/azure_mgmt_web/models/route_type.rb +17 -0
  129. data/lib/2015-08-01/generated/azure_mgmt_web/models/scm_type.rb +27 -0
  130. data/lib/2015-08-01/generated/azure_mgmt_web/models/service_specification.rb +56 -0
  131. data/lib/2015-08-01/generated/azure_mgmt_web/models/site.rb +555 -0
  132. data/lib/2015-08-01/generated/azure_mgmt_web/models/site_availability_state.rb +17 -0
  133. data/lib/2015-08-01/generated/azure_mgmt_web/models/site_config.rb +589 -0
  134. data/lib/2015-08-01/generated/azure_mgmt_web/models/site_limits.rb +68 -0
  135. data/lib/2015-08-01/generated/azure_mgmt_web/models/site_load_balancing.rb +19 -0
  136. data/lib/2015-08-01/generated/azure_mgmt_web/models/site_machine_key.rb +79 -0
  137. data/lib/2015-08-01/generated/azure_mgmt_web/models/site_seal_request.rb +3 -2
  138. data/lib/2015-08-01/generated/azure_mgmt_web/models/sku_capacity.rb +83 -0
  139. data/lib/2015-08-01/generated/azure_mgmt_web/models/sku_description.rb +142 -0
  140. data/lib/2015-08-01/generated/azure_mgmt_web/models/slot_swap_status.rb +71 -0
  141. data/lib/2015-08-01/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb +68 -0
  142. data/lib/2015-08-01/generated/azure_mgmt_web/models/snapshot_recovery_request.rb +132 -0
  143. data/lib/2015-08-01/generated/azure_mgmt_web/models/snapshot_recovery_target.rb +62 -0
  144. data/lib/2015-08-01/generated/azure_mgmt_web/models/ssl_state.rb +17 -0
  145. data/lib/2015-08-01/generated/azure_mgmt_web/models/status_codes_based_trigger.rb +90 -0
  146. data/lib/2015-08-01/generated/azure_mgmt_web/models/status_options.rb +17 -0
  147. data/lib/2015-08-01/generated/azure_mgmt_web/models/usage_state.rb +16 -0
  148. data/lib/2015-08-01/generated/azure_mgmt_web/models/user.rb +125 -0
  149. data/lib/2015-08-01/generated/azure_mgmt_web/models/virtual_application.rb +90 -0
  150. data/lib/2015-08-01/generated/azure_mgmt_web/models/virtual_directory.rb +57 -0
  151. data/lib/2015-08-01/generated/azure_mgmt_web/models/vnet_gateway.rb +93 -0
  152. data/lib/2015-08-01/generated/azure_mgmt_web/models/vnet_info.rb +153 -0
  153. data/lib/2015-08-01/generated/azure_mgmt_web/models/vnet_route.rb +127 -0
  154. data/lib/2015-08-01/generated/azure_mgmt_web/web_site_management_client.rb +9 -1
  155. data/lib/2016-03-01/generated/azure_mgmt_web.rb +122 -23
  156. data/lib/2016-03-01/generated/azure_mgmt_web/certificates.rb +61 -57
  157. data/lib/2016-03-01/generated/azure_mgmt_web/deleted_web_apps.rb +15 -13
  158. data/lib/2016-03-01/generated/azure_mgmt_web/diagnostics.rb +2813 -0
  159. data/lib/2016-03-01/generated/azure_mgmt_web/models/abnormal_time_period.rb +98 -0
  160. data/lib/2016-03-01/generated/azure_mgmt_web/models/access_control_entry_action.rb +16 -0
  161. data/lib/2016-03-01/generated/azure_mgmt_web/models/analysis_data.rb +118 -0
  162. data/lib/2016-03-01/generated/azure_mgmt_web/models/analysis_definition.rb +82 -0
  163. data/lib/2016-03-01/generated/azure_mgmt_web/models/api_definition_info.rb +46 -0
  164. data/lib/{2016-09-01 → 2016-03-01}/generated/azure_mgmt_web/models/app_service_environment.rb +20 -1
  165. data/lib/2016-03-01/generated/azure_mgmt_web/models/app_service_plan.rb +316 -0
  166. data/lib/2016-03-01/generated/azure_mgmt_web/models/app_service_plan_collection.rb +66 -0
  167. data/lib/2016-03-01/generated/azure_mgmt_web/models/auto_heal_action_type.rb +17 -0
  168. data/lib/2016-03-01/generated/azure_mgmt_web/models/auto_heal_actions.rb +72 -0
  169. data/lib/2016-03-01/generated/azure_mgmt_web/models/auto_heal_custom_action.rb +58 -0
  170. data/lib/2016-03-01/generated/azure_mgmt_web/models/auto_heal_rules.rb +61 -0
  171. data/lib/2016-03-01/generated/azure_mgmt_web/models/auto_heal_triggers.rb +91 -0
  172. data/lib/2016-03-01/generated/azure_mgmt_web/models/certificate.rb +2 -14
  173. data/lib/2016-03-01/generated/azure_mgmt_web/models/certificate_collection.rb +1 -0
  174. data/lib/2016-03-01/generated/azure_mgmt_web/models/certificate_patch_resource.rb +323 -0
  175. data/lib/2016-03-01/generated/azure_mgmt_web/models/check_name_resource_types.rb +5 -0
  176. data/lib/2016-03-01/generated/azure_mgmt_web/models/cloning_info.rb +182 -0
  177. data/lib/2016-03-01/generated/azure_mgmt_web/models/compute_mode_options.rb +17 -0
  178. data/lib/2016-03-01/generated/azure_mgmt_web/models/conn_string_info.rb +71 -0
  179. data/lib/2016-03-01/generated/azure_mgmt_web/models/connection_string_type.rb +25 -0
  180. data/lib/2016-03-01/generated/azure_mgmt_web/models/cors_settings.rb +56 -0
  181. data/lib/2016-03-01/generated/azure_mgmt_web/models/csm_operation_collection.rb +1 -0
  182. data/lib/2016-03-01/generated/azure_mgmt_web/models/csm_operation_description.rb +2 -2
  183. data/lib/2016-03-01/generated/azure_mgmt_web/models/csm_operation_description_properties.rb +1 -2
  184. data/lib/2016-03-01/generated/azure_mgmt_web/models/csm_operation_display.rb +1 -2
  185. data/lib/2016-03-01/generated/azure_mgmt_web/models/csm_usage_quota.rb +91 -0
  186. data/lib/2016-03-01/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb +67 -0
  187. data/lib/2016-03-01/generated/azure_mgmt_web/models/data_source.rb +74 -0
  188. data/lib/2016-03-01/generated/azure_mgmt_web/models/deleted_site.rb +12 -0
  189. data/lib/2016-03-01/generated/azure_mgmt_web/models/deleted_web_app_collection.rb +1 -0
  190. data/lib/2016-03-01/generated/azure_mgmt_web/models/deployment_locations.rb +98 -0
  191. data/lib/2016-03-01/generated/azure_mgmt_web/models/detector_abnormal_time_period.rb +153 -0
  192. data/lib/2016-03-01/generated/azure_mgmt_web/models/detector_definition.rb +118 -0
  193. data/lib/2016-03-01/generated/azure_mgmt_web/models/diagnostic_analysis.rb +153 -0
  194. data/lib/2016-03-01/generated/azure_mgmt_web/models/diagnostic_analysis_collection.rb +99 -0
  195. data/lib/2016-03-01/generated/azure_mgmt_web/models/diagnostic_category.rb +82 -0
  196. data/lib/2016-03-01/generated/azure_mgmt_web/models/diagnostic_category_collection.rb +99 -0
  197. data/lib/2016-03-01/generated/azure_mgmt_web/models/diagnostic_detector_collection.rb +99 -0
  198. data/lib/2016-03-01/generated/azure_mgmt_web/models/diagnostic_detector_response.rb +197 -0
  199. data/lib/2016-03-01/generated/azure_mgmt_web/models/diagnostic_metric_sample.rb +109 -0
  200. data/lib/2016-03-01/generated/azure_mgmt_web/models/diagnostic_metric_set.rb +113 -0
  201. data/lib/2016-03-01/generated/azure_mgmt_web/models/dimension.rb +3 -2
  202. data/lib/2016-03-01/generated/azure_mgmt_web/models/error_entity.rb +118 -0
  203. data/lib/2016-03-01/generated/azure_mgmt_web/models/experiments.rb +55 -0
  204. data/lib/2016-03-01/generated/azure_mgmt_web/models/geo_region_collection.rb +1 -0
  205. data/lib/2016-03-01/generated/azure_mgmt_web/models/global_csm_sku_description.rb +22 -0
  206. data/lib/2016-03-01/generated/azure_mgmt_web/models/handler_mapping.rb +73 -0
  207. data/lib/2016-03-01/generated/azure_mgmt_web/models/host_name_ssl_state.rb +106 -0
  208. data/lib/2016-03-01/generated/azure_mgmt_web/models/host_type.rb +16 -0
  209. data/lib/2016-03-01/generated/azure_mgmt_web/models/hosting_environment_deployment_info.rb +57 -0
  210. data/lib/2016-03-01/generated/azure_mgmt_web/models/hosting_environment_status.rb +18 -0
  211. data/lib/2016-03-01/generated/azure_mgmt_web/models/hybrid_connection.rb +163 -0
  212. data/lib/2016-03-01/generated/azure_mgmt_web/models/hybrid_connection_key.rb +95 -0
  213. data/lib/2016-03-01/generated/azure_mgmt_web/models/identifier.rb +81 -0
  214. data/lib/2016-03-01/generated/azure_mgmt_web/models/identifier_collection.rb +99 -0
  215. data/lib/2016-03-01/generated/azure_mgmt_web/models/internal_load_balancing_mode.rb +17 -0
  216. data/lib/2016-03-01/generated/azure_mgmt_web/models/ip_security_restriction.rb +58 -0
  217. data/lib/2016-03-01/generated/azure_mgmt_web/models/issue_type.rb +22 -0
  218. data/lib/2016-03-01/generated/azure_mgmt_web/models/localizable_string.rb +57 -0
  219. data/lib/2016-03-01/generated/azure_mgmt_web/models/managed_pipeline_mode.rb +16 -0
  220. data/lib/2016-03-01/generated/azure_mgmt_web/models/managed_service_identity.rb +70 -0
  221. data/lib/2016-03-01/generated/azure_mgmt_web/models/metric_availability.rb +1 -2
  222. data/lib/2016-03-01/generated/azure_mgmt_web/models/metric_specification.rb +1 -2
  223. data/lib/2016-03-01/generated/azure_mgmt_web/models/name_identifier.rb +46 -0
  224. data/lib/2016-03-01/generated/azure_mgmt_web/models/name_value_pair.rb +57 -0
  225. data/lib/2016-03-01/generated/azure_mgmt_web/models/network_access_control_entry.rb +81 -0
  226. data/lib/2016-03-01/generated/azure_mgmt_web/models/operation.rb +135 -0
  227. data/lib/2016-03-01/generated/azure_mgmt_web/models/operation_status.rb +19 -0
  228. data/lib/2016-03-01/generated/azure_mgmt_web/models/premier_add_on_offer.rb +5 -5
  229. data/lib/2016-03-01/generated/azure_mgmt_web/models/premier_add_on_offer_collection.rb +1 -0
  230. data/lib/2016-03-01/generated/azure_mgmt_web/models/provisioning_state.rb +19 -0
  231. data/lib/2016-03-01/generated/azure_mgmt_web/models/push_settings.rb +123 -0
  232. data/lib/2016-03-01/generated/azure_mgmt_web/models/ramp_up_rule.rb +141 -0
  233. data/lib/2016-03-01/generated/azure_mgmt_web/models/recommendation.rb +2 -2
  234. data/lib/2016-03-01/generated/azure_mgmt_web/models/requests_based_trigger.rb +57 -0
  235. data/lib/2016-03-01/generated/azure_mgmt_web/models/resource_metric.rb +163 -0
  236. data/lib/2016-03-01/generated/azure_mgmt_web/models/resource_metric_availability.rb +59 -0
  237. data/lib/2016-03-01/generated/azure_mgmt_web/models/resource_metric_collection.rb +67 -0
  238. data/lib/2016-03-01/generated/azure_mgmt_web/models/resource_metric_definition.rb +173 -0
  239. data/lib/2016-03-01/generated/azure_mgmt_web/models/resource_metric_definition_collection.rb +67 -0
  240. data/lib/2016-03-01/generated/azure_mgmt_web/models/resource_metric_name.rb +59 -0
  241. data/lib/2016-03-01/generated/azure_mgmt_web/models/resource_metric_property.rb +57 -0
  242. data/lib/2016-03-01/generated/azure_mgmt_web/models/resource_metric_value.rb +129 -0
  243. data/lib/2016-03-01/generated/azure_mgmt_web/models/resource_name_availability_request.rb +3 -1
  244. data/lib/2016-03-01/generated/azure_mgmt_web/models/response_meta_data.rb +48 -0
  245. data/lib/2016-03-01/generated/azure_mgmt_web/models/route_type.rb +17 -0
  246. data/lib/2016-03-01/generated/azure_mgmt_web/models/scm_type.rb +27 -0
  247. data/lib/2016-03-01/generated/azure_mgmt_web/models/service_specification.rb +2 -2
  248. data/lib/2016-03-01/generated/azure_mgmt_web/models/site.rb +555 -0
  249. data/lib/2016-03-01/generated/azure_mgmt_web/models/site_availability_state.rb +17 -0
  250. data/lib/2016-03-01/generated/azure_mgmt_web/models/site_config.rb +589 -0
  251. data/lib/2016-03-01/generated/azure_mgmt_web/models/site_limits.rb +68 -0
  252. data/lib/2016-03-01/generated/azure_mgmt_web/models/site_load_balancing.rb +19 -0
  253. data/lib/2016-03-01/generated/azure_mgmt_web/models/site_machine_key.rb +79 -0
  254. data/lib/2016-03-01/generated/azure_mgmt_web/models/sku_description.rb +142 -0
  255. data/lib/2016-03-01/generated/azure_mgmt_web/models/slot_swap_status.rb +71 -0
  256. data/lib/2016-03-01/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb +68 -0
  257. data/lib/2016-03-01/generated/azure_mgmt_web/models/snapshot_recovery_request.rb +132 -0
  258. data/lib/2016-03-01/generated/azure_mgmt_web/models/snapshot_recovery_target.rb +62 -0
  259. data/lib/2016-03-01/generated/azure_mgmt_web/models/solution.rb +148 -0
  260. data/lib/2016-03-01/generated/azure_mgmt_web/models/solution_type.rb +17 -0
  261. data/lib/2016-03-01/generated/azure_mgmt_web/models/source_control_collection.rb +1 -0
  262. data/lib/2016-03-01/generated/azure_mgmt_web/models/ssl_state.rb +17 -0
  263. data/lib/2016-03-01/generated/azure_mgmt_web/models/stamp_capacity.rb +156 -0
  264. data/lib/2016-03-01/generated/azure_mgmt_web/models/status_codes_based_trigger.rb +90 -0
  265. data/lib/2016-03-01/generated/azure_mgmt_web/models/status_options.rb +17 -0
  266. data/lib/2016-03-01/generated/azure_mgmt_web/models/usage_state.rb +16 -0
  267. data/lib/2016-03-01/generated/azure_mgmt_web/models/validate_request.rb +12 -0
  268. data/lib/2016-03-01/generated/azure_mgmt_web/models/virtual_application.rb +90 -0
  269. data/lib/2016-03-01/generated/azure_mgmt_web/models/virtual_directory.rb +57 -0
  270. data/lib/2016-03-01/generated/azure_mgmt_web/models/virtual_ipmapping.rb +79 -0
  271. data/lib/2016-03-01/generated/azure_mgmt_web/models/virtual_network_profile.rb +81 -0
  272. data/lib/2016-03-01/generated/azure_mgmt_web/models/vnet_gateway.rb +93 -0
  273. data/lib/2016-03-01/generated/azure_mgmt_web/models/vnet_info.rb +153 -0
  274. data/lib/2016-03-01/generated/azure_mgmt_web/models/vnet_route.rb +127 -0
  275. data/lib/2016-03-01/generated/azure_mgmt_web/models/web_app_collection.rb +67 -0
  276. data/lib/2016-03-01/generated/azure_mgmt_web/models/worker_pool.rb +102 -0
  277. data/lib/2016-03-01/generated/azure_mgmt_web/models/worker_size_options.rb +21 -0
  278. data/lib/2016-03-01/generated/azure_mgmt_web/provider.rb +69 -23
  279. data/lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb +42 -35
  280. data/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb +602 -111
  281. data/lib/2016-08-01/generated/azure_mgmt_web.rb +86 -77
  282. data/lib/2016-08-01/generated/azure_mgmt_web/models/app_service_plan.rb +316 -0
  283. data/lib/2016-08-01/generated/azure_mgmt_web/models/backup_item_collection.rb +1 -0
  284. data/lib/2016-08-01/generated/azure_mgmt_web/models/capability.rb +68 -0
  285. data/lib/2016-08-01/generated/azure_mgmt_web/models/cloning_info.rb +2 -2
  286. data/lib/2016-08-01/generated/azure_mgmt_web/models/continuous_web_job.rb +9 -1
  287. data/lib/2016-08-01/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb +1 -0
  288. data/lib/2016-08-01/generated/azure_mgmt_web/models/deployment_collection.rb +1 -0
  289. data/lib/2016-08-01/generated/azure_mgmt_web/models/error_entity.rb +22 -22
  290. data/lib/2016-08-01/generated/azure_mgmt_web/models/function_envelope_collection.rb +1 -0
  291. data/lib/2016-08-01/generated/azure_mgmt_web/models/host_name_binding.rb +0 -11
  292. data/lib/2016-08-01/generated/azure_mgmt_web/models/host_name_binding_collection.rb +1 -0
  293. data/lib/2016-08-01/generated/azure_mgmt_web/models/identifier.rb +1 -1
  294. data/lib/2016-08-01/generated/azure_mgmt_web/models/identifier_collection.rb +1 -0
  295. data/lib/2016-08-01/generated/azure_mgmt_web/models/managed_service_identity.rb +70 -0
  296. data/lib/2016-08-01/generated/azure_mgmt_web/models/operation.rb +2 -2
  297. data/lib/2016-08-01/generated/azure_mgmt_web/models/perf_mon_counter_collection.rb +1 -0
  298. data/lib/2016-08-01/generated/azure_mgmt_web/models/premier_add_on.rb +8 -8
  299. data/lib/2016-08-01/generated/azure_mgmt_web/models/process_info_collection.rb +1 -0
  300. data/lib/2016-08-01/generated/azure_mgmt_web/models/process_module_info_collection.rb +1 -0
  301. data/lib/2016-08-01/generated/azure_mgmt_web/models/process_thread_info_collection.rb +1 -0
  302. data/lib/2016-08-01/generated/azure_mgmt_web/models/provisioning_state.rb +19 -0
  303. data/lib/2016-08-01/generated/azure_mgmt_web/models/public_certificate.rb +2 -2
  304. data/lib/2016-08-01/generated/azure_mgmt_web/models/public_certificate_collection.rb +1 -0
  305. data/lib/2016-08-01/generated/azure_mgmt_web/models/requests_based_trigger.rb +1 -1
  306. data/lib/2016-08-01/generated/azure_mgmt_web/models/resource_metric.rb +2 -1
  307. data/lib/2016-08-01/generated/azure_mgmt_web/models/resource_metric_collection.rb +1 -0
  308. data/lib/2016-08-01/generated/azure_mgmt_web/models/resource_metric_definition.rb +1 -1
  309. data/lib/2016-08-01/generated/azure_mgmt_web/models/resource_metric_definition_collection.rb +1 -0
  310. data/lib/2016-08-01/generated/azure_mgmt_web/models/resource_metric_value.rb +2 -1
  311. data/lib/2016-08-01/generated/azure_mgmt_web/models/site.rb +41 -1
  312. data/lib/2016-08-01/generated/azure_mgmt_web/models/site_config_resource_collection.rb +1 -0
  313. data/lib/2016-08-01/generated/azure_mgmt_web/models/site_configuration_snapshot_info_collection.rb +101 -0
  314. data/lib/2016-08-01/generated/azure_mgmt_web/models/site_extension_info_collection.rb +1 -0
  315. data/lib/2016-08-01/generated/azure_mgmt_web/models/site_machine_key.rb +1 -1
  316. data/lib/2016-08-01/generated/azure_mgmt_web/models/site_patch_resource.rb +519 -0
  317. data/lib/2016-08-01/generated/azure_mgmt_web/models/sku_capacity.rb +83 -0
  318. data/lib/2016-08-01/generated/azure_mgmt_web/models/sku_description.rb +142 -0
  319. data/lib/2016-08-01/generated/azure_mgmt_web/models/slot_difference_collection.rb +1 -0
  320. data/lib/2016-08-01/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb +1 -1
  321. data/lib/2016-08-01/generated/azure_mgmt_web/models/snapshot_collection.rb +1 -0
  322. data/lib/2016-08-01/generated/azure_mgmt_web/models/status_codes_based_trigger.rb +2 -2
  323. data/lib/2016-08-01/generated/azure_mgmt_web/models/status_options.rb +17 -0
  324. data/lib/2016-08-01/generated/azure_mgmt_web/models/triggered_job_history_collection.rb +1 -0
  325. data/lib/2016-08-01/generated/azure_mgmt_web/models/triggered_web_job.rb +9 -1
  326. data/lib/2016-08-01/generated/azure_mgmt_web/models/triggered_web_job_collection.rb +1 -0
  327. data/lib/2016-08-01/generated/azure_mgmt_web/models/vnet_info.rb +3 -3
  328. data/lib/2016-08-01/generated/azure_mgmt_web/models/web_app_collection.rb +1 -0
  329. data/lib/2016-08-01/generated/azure_mgmt_web/models/web_app_instance_collection.rb +1 -0
  330. data/lib/2016-08-01/generated/azure_mgmt_web/models/web_job.rb +9 -1
  331. data/lib/2016-08-01/generated/azure_mgmt_web/models/web_job_collection.rb +1 -0
  332. data/lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb +4415 -2983
  333. data/lib/2016-08-01/generated/azure_mgmt_web/web_site_management_client.rb +4 -1
  334. data/lib/2016-09-01/generated/azure_mgmt_web.rb +65 -61
  335. data/lib/2016-09-01/generated/azure_mgmt_web/app_service_environments.rb +851 -410
  336. data/lib/2016-09-01/generated/azure_mgmt_web/app_service_plans.rb +683 -200
  337. data/lib/2016-09-01/generated/azure_mgmt_web/models/app_service_environment_collection.rb +5 -4
  338. data/lib/2016-09-01/generated/azure_mgmt_web/models/app_service_environment_patch_resource.rb +569 -0
  339. data/lib/2016-09-01/generated/azure_mgmt_web/models/app_service_environment_resource.rb +19 -0
  340. data/lib/2016-09-01/generated/azure_mgmt_web/models/app_service_plan.rb +27 -2
  341. data/lib/2016-09-01/generated/azure_mgmt_web/models/app_service_plan_patch_resource.rb +280 -0
  342. data/lib/2016-09-01/generated/azure_mgmt_web/models/cloning_info.rb +2 -2
  343. data/lib/2016-09-01/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb +1 -0
  344. data/lib/2016-09-01/generated/azure_mgmt_web/models/hybrid_connection.rb +12 -0
  345. data/lib/2016-09-01/generated/azure_mgmt_web/models/hybrid_connection_collection.rb +1 -0
  346. data/lib/2016-09-01/generated/azure_mgmt_web/models/identifier.rb +81 -0
  347. data/lib/2016-09-01/generated/azure_mgmt_web/models/managed_service_identity.rb +70 -0
  348. data/lib/2016-09-01/generated/azure_mgmt_web/models/network_access_control_entry.rb +1 -1
  349. data/lib/2016-09-01/generated/azure_mgmt_web/models/operation.rb +2 -2
  350. data/lib/2016-09-01/generated/azure_mgmt_web/models/requests_based_trigger.rb +1 -1
  351. data/lib/2016-09-01/generated/azure_mgmt_web/models/resource_collection.rb +1 -0
  352. data/lib/2016-09-01/generated/azure_mgmt_web/models/resource_metric.rb +2 -1
  353. data/lib/2016-09-01/generated/azure_mgmt_web/models/resource_metric_collection.rb +1 -0
  354. data/lib/2016-09-01/generated/azure_mgmt_web/models/resource_metric_definition.rb +1 -1
  355. data/lib/2016-09-01/generated/azure_mgmt_web/models/resource_metric_definition_collection.rb +1 -0
  356. data/lib/2016-09-01/generated/azure_mgmt_web/models/resource_metric_value.rb +2 -1
  357. data/lib/2016-09-01/generated/azure_mgmt_web/models/site.rb +41 -37
  358. data/lib/2016-09-01/generated/azure_mgmt_web/models/site_machine_key.rb +1 -1
  359. data/lib/2016-09-01/generated/azure_mgmt_web/models/sku_info_collection.rb +1 -0
  360. data/lib/2016-09-01/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb +1 -1
  361. data/lib/2016-09-01/generated/azure_mgmt_web/models/stamp_capacity.rb +1 -1
  362. data/lib/2016-09-01/generated/azure_mgmt_web/models/stamp_capacity_collection.rb +1 -0
  363. data/lib/2016-09-01/generated/azure_mgmt_web/models/status_codes_based_trigger.rb +2 -2
  364. data/lib/2016-09-01/generated/azure_mgmt_web/models/status_options.rb +1 -0
  365. data/lib/2016-09-01/generated/azure_mgmt_web/models/usage_collection.rb +1 -0
  366. data/lib/2016-09-01/generated/azure_mgmt_web/models/user.rb +125 -0
  367. data/lib/2016-09-01/generated/azure_mgmt_web/models/vnet_info.rb +3 -3
  368. data/lib/2016-09-01/generated/azure_mgmt_web/models/web_app_collection.rb +1 -0
  369. data/lib/2016-09-01/generated/azure_mgmt_web/models/worker_pool_collection.rb +1 -0
  370. data/lib/2016-09-01/generated/azure_mgmt_web/models/worker_size_options.rb +3 -0
  371. data/lib/2016-09-01/generated/azure_mgmt_web/web_site_management_client.rb +4 -1
  372. data/lib/profiles/latest/modules/web_profile_module.rb +1122 -965
  373. data/lib/profiles/latest/web_latest_profile_client.rb +28 -9
  374. data/lib/profiles/latest/web_module_definition.rb +0 -1
  375. data/lib/version.rb +1 -1
  376. metadata +246 -4
@@ -31,8 +31,8 @@ module Azure::Web::Mgmt::V2016_03_01
31
31
  #
32
32
  # @return [Array<DeletedSite>] operation results.
33
33
  #
34
- def list(custom_headers = nil)
35
- first_page = list_as_lazy(custom_headers)
34
+ def list(custom_headers:nil)
35
+ first_page = list_as_lazy(custom_headers:custom_headers)
36
36
  first_page.get_all_items
37
37
  end
38
38
 
@@ -46,8 +46,8 @@ module Azure::Web::Mgmt::V2016_03_01
46
46
  #
47
47
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
48
  #
49
- def list_with_http_info(custom_headers = nil)
50
- list_async(custom_headers).value!
49
+ def list_with_http_info(custom_headers:nil)
50
+ list_async(custom_headers:custom_headers).value!
51
51
  end
52
52
 
53
53
  #
@@ -60,12 +60,13 @@ module Azure::Web::Mgmt::V2016_03_01
60
60
  #
61
61
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
62
  #
63
- def list_async(custom_headers = nil)
63
+ def list_async(custom_headers:nil)
64
64
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
65
65
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
66
66
 
67
67
 
68
68
  request_headers = {}
69
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
69
70
 
70
71
  # Set Headers
71
72
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -122,8 +123,8 @@ module Azure::Web::Mgmt::V2016_03_01
122
123
  #
123
124
  # @return [DeletedWebAppCollection] operation results.
124
125
  #
125
- def list_next(next_page_link, custom_headers = nil)
126
- response = list_next_async(next_page_link, custom_headers).value!
126
+ def list_next(next_page_link, custom_headers:nil)
127
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
127
128
  response.body unless response.nil?
128
129
  end
129
130
 
@@ -139,8 +140,8 @@ module Azure::Web::Mgmt::V2016_03_01
139
140
  #
140
141
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
141
142
  #
142
- def list_next_with_http_info(next_page_link, custom_headers = nil)
143
- list_next_async(next_page_link, custom_headers).value!
143
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
144
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
144
145
  end
145
146
 
146
147
  #
@@ -155,11 +156,12 @@ module Azure::Web::Mgmt::V2016_03_01
155
156
  #
156
157
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
157
158
  #
158
- def list_next_async(next_page_link, custom_headers = nil)
159
+ def list_next_async(next_page_link, custom_headers:nil)
159
160
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
160
161
 
161
162
 
162
163
  request_headers = {}
164
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
163
165
 
164
166
  # Set Headers
165
167
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -214,12 +216,12 @@ module Azure::Web::Mgmt::V2016_03_01
214
216
  # @return [DeletedWebAppCollection] which provide lazy access to pages of the
215
217
  # response.
216
218
  #
217
- def list_as_lazy(custom_headers = nil)
218
- response = list_async(custom_headers).value!
219
+ def list_as_lazy(custom_headers:nil)
220
+ response = list_async(custom_headers:custom_headers).value!
219
221
  unless response.nil?
220
222
  page = response.body
221
223
  page.next_method = Proc.new do |next_page_link|
222
- list_next_async(next_page_link, custom_headers)
224
+ list_next_async(next_page_link, custom_headers:custom_headers)
223
225
  end
224
226
  page
225
227
  end
@@ -0,0 +1,2813 @@
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::Web::Mgmt::V2016_03_01
7
+ #
8
+ # Diagnostics
9
+ #
10
+ class Diagnostics
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Diagnostics class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [WebSiteManagementClient] reference to the WebSiteManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Get Diagnostics Categories
26
+ #
27
+ # Get Diagnostics Categories
28
+ #
29
+ # @param resource_group_name [String] Name of the resource group to which the
30
+ # resource belongs.
31
+ # @param site_name [String] Site Name
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [Array<DiagnosticCategory>] operation results.
36
+ #
37
+ def list_site_diagnostic_categories(resource_group_name, site_name, custom_headers:nil)
38
+ first_page = list_site_diagnostic_categories_as_lazy(resource_group_name, site_name, custom_headers:custom_headers)
39
+ first_page.get_all_items
40
+ end
41
+
42
+ #
43
+ # Get Diagnostics Categories
44
+ #
45
+ # Get Diagnostics Categories
46
+ #
47
+ # @param resource_group_name [String] Name of the resource group to which the
48
+ # resource belongs.
49
+ # @param site_name [String] Site Name
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def list_site_diagnostic_categories_with_http_info(resource_group_name, site_name, custom_headers:nil)
56
+ list_site_diagnostic_categories_async(resource_group_name, site_name, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Get Diagnostics Categories
61
+ #
62
+ # Get Diagnostics Categories
63
+ #
64
+ # @param resource_group_name [String] Name of the resource group to which the
65
+ # resource belongs.
66
+ # @param site_name [String] Site Name
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def list_site_diagnostic_categories_async(resource_group_name, site_name, custom_headers:nil)
73
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
74
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
75
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
76
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
77
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
78
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
79
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
80
+
81
+
82
+ request_headers = {}
83
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
84
+
85
+ # Set Headers
86
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
87
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
88
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'
89
+
90
+ request_url = @base_url || @client.base_url
91
+
92
+ options = {
93
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
94
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'subscriptionId' => @client.subscription_id},
95
+ query_params: {'api-version' => @client.api_version},
96
+ headers: request_headers.merge(custom_headers || {}),
97
+ base_url: request_url
98
+ }
99
+ promise = @client.make_request_async(:get, path_template, options)
100
+
101
+ promise = promise.then do |result|
102
+ http_response = result.response
103
+ status_code = http_response.status
104
+ response_content = http_response.body
105
+ unless status_code == 200
106
+ error_model = JSON.load(response_content)
107
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
108
+ end
109
+
110
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
111
+ # Deserialize Response
112
+ if status_code == 200
113
+ begin
114
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
115
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticCategoryCollection.mapper()
116
+ result.body = @client.deserialize(result_mapper, parsed_response)
117
+ rescue Exception => e
118
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
119
+ end
120
+ end
121
+
122
+ result
123
+ end
124
+
125
+ promise.execute
126
+ end
127
+
128
+ #
129
+ # Get Diagnostics Category
130
+ #
131
+ # Get Diagnostics Category
132
+ #
133
+ # @param resource_group_name [String] Name of the resource group to which the
134
+ # resource belongs.
135
+ # @param site_name [String] Site Name
136
+ # @param diagnostic_category [String] Diagnostic Category
137
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
138
+ # will be added to the HTTP request.
139
+ #
140
+ # @return [DiagnosticCategory] operation results.
141
+ #
142
+ def get_site_diagnostic_category(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
143
+ response = get_site_diagnostic_category_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value!
144
+ response.body unless response.nil?
145
+ end
146
+
147
+ #
148
+ # Get Diagnostics Category
149
+ #
150
+ # Get Diagnostics Category
151
+ #
152
+ # @param resource_group_name [String] Name of the resource group to which the
153
+ # resource belongs.
154
+ # @param site_name [String] Site Name
155
+ # @param diagnostic_category [String] Diagnostic Category
156
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
157
+ # will be added to the HTTP request.
158
+ #
159
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
160
+ #
161
+ def get_site_diagnostic_category_with_http_info(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
162
+ get_site_diagnostic_category_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value!
163
+ end
164
+
165
+ #
166
+ # Get Diagnostics Category
167
+ #
168
+ # Get Diagnostics Category
169
+ #
170
+ # @param resource_group_name [String] Name of the resource group to which the
171
+ # resource belongs.
172
+ # @param site_name [String] Site Name
173
+ # @param diagnostic_category [String] Diagnostic Category
174
+ # @param [Hash{String => String}] A hash of custom headers that will be added
175
+ # to the HTTP request.
176
+ #
177
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
178
+ #
179
+ def get_site_diagnostic_category_async(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
180
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
181
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
182
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
183
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
184
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
185
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
186
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
187
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
188
+
189
+
190
+ request_headers = {}
191
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
192
+
193
+ # Set Headers
194
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
195
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
196
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'
197
+
198
+ request_url = @base_url || @client.base_url
199
+
200
+ options = {
201
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
202
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'subscriptionId' => @client.subscription_id},
203
+ query_params: {'api-version' => @client.api_version},
204
+ headers: request_headers.merge(custom_headers || {}),
205
+ base_url: request_url
206
+ }
207
+ promise = @client.make_request_async(:get, path_template, options)
208
+
209
+ promise = promise.then do |result|
210
+ http_response = result.response
211
+ status_code = http_response.status
212
+ response_content = http_response.body
213
+ unless status_code == 200
214
+ error_model = JSON.load(response_content)
215
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
216
+ end
217
+
218
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
219
+ # Deserialize Response
220
+ if status_code == 200
221
+ begin
222
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
223
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticCategory.mapper()
224
+ result.body = @client.deserialize(result_mapper, parsed_response)
225
+ rescue Exception => e
226
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
227
+ end
228
+ end
229
+
230
+ result
231
+ end
232
+
233
+ promise.execute
234
+ end
235
+
236
+ #
237
+ # Get Site Analyses
238
+ #
239
+ # Get Site Analyses
240
+ #
241
+ # @param resource_group_name [String] Name of the resource group to which the
242
+ # resource belongs.
243
+ # @param site_name [String] Site Name
244
+ # @param diagnostic_category [String] Diagnostic Category
245
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
246
+ # will be added to the HTTP request.
247
+ #
248
+ # @return [Array<AnalysisDefinition>] operation results.
249
+ #
250
+ def list_site_analyses(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
251
+ first_page = list_site_analyses_as_lazy(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers)
252
+ first_page.get_all_items
253
+ end
254
+
255
+ #
256
+ # Get Site Analyses
257
+ #
258
+ # Get Site Analyses
259
+ #
260
+ # @param resource_group_name [String] Name of the resource group to which the
261
+ # resource belongs.
262
+ # @param site_name [String] Site Name
263
+ # @param diagnostic_category [String] Diagnostic Category
264
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
265
+ # will be added to the HTTP request.
266
+ #
267
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
268
+ #
269
+ def list_site_analyses_with_http_info(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
270
+ list_site_analyses_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value!
271
+ end
272
+
273
+ #
274
+ # Get Site Analyses
275
+ #
276
+ # Get Site Analyses
277
+ #
278
+ # @param resource_group_name [String] Name of the resource group to which the
279
+ # resource belongs.
280
+ # @param site_name [String] Site Name
281
+ # @param diagnostic_category [String] Diagnostic Category
282
+ # @param [Hash{String => String}] A hash of custom headers that will be added
283
+ # to the HTTP request.
284
+ #
285
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
286
+ #
287
+ def list_site_analyses_async(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
288
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
289
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
290
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
291
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
292
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
293
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
294
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
295
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
296
+
297
+
298
+ request_headers = {}
299
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
300
+
301
+ # Set Headers
302
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
303
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
304
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'
305
+
306
+ request_url = @base_url || @client.base_url
307
+
308
+ options = {
309
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
310
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'subscriptionId' => @client.subscription_id},
311
+ query_params: {'api-version' => @client.api_version},
312
+ headers: request_headers.merge(custom_headers || {}),
313
+ base_url: request_url
314
+ }
315
+ promise = @client.make_request_async(:get, path_template, options)
316
+
317
+ promise = promise.then do |result|
318
+ http_response = result.response
319
+ status_code = http_response.status
320
+ response_content = http_response.body
321
+ unless status_code == 200
322
+ error_model = JSON.load(response_content)
323
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
324
+ end
325
+
326
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
327
+ # Deserialize Response
328
+ if status_code == 200
329
+ begin
330
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
331
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticAnalysisCollection.mapper()
332
+ result.body = @client.deserialize(result_mapper, parsed_response)
333
+ rescue Exception => e
334
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
335
+ end
336
+ end
337
+
338
+ result
339
+ end
340
+
341
+ promise.execute
342
+ end
343
+
344
+ #
345
+ # Get Site Analysis
346
+ #
347
+ # Get Site Analysis
348
+ #
349
+ # @param resource_group_name [String] Name of the resource group to which the
350
+ # resource belongs.
351
+ # @param site_name [String] Site Name
352
+ # @param diagnostic_category [String] Diagnostic Category
353
+ # @param analysis_name [String] Analysis Name
354
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
355
+ # will be added to the HTTP request.
356
+ #
357
+ # @return [DiagnosticAnalysis] operation results.
358
+ #
359
+ def get_site_analysis(resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers:nil)
360
+ response = get_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers:custom_headers).value!
361
+ response.body unless response.nil?
362
+ end
363
+
364
+ #
365
+ # Get Site Analysis
366
+ #
367
+ # Get Site Analysis
368
+ #
369
+ # @param resource_group_name [String] Name of the resource group to which the
370
+ # resource belongs.
371
+ # @param site_name [String] Site Name
372
+ # @param diagnostic_category [String] Diagnostic Category
373
+ # @param analysis_name [String] Analysis Name
374
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
375
+ # will be added to the HTTP request.
376
+ #
377
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
378
+ #
379
+ def get_site_analysis_with_http_info(resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers:nil)
380
+ get_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers:custom_headers).value!
381
+ end
382
+
383
+ #
384
+ # Get Site Analysis
385
+ #
386
+ # Get Site Analysis
387
+ #
388
+ # @param resource_group_name [String] Name of the resource group to which the
389
+ # resource belongs.
390
+ # @param site_name [String] Site Name
391
+ # @param diagnostic_category [String] Diagnostic Category
392
+ # @param analysis_name [String] Analysis Name
393
+ # @param [Hash{String => String}] A hash of custom headers that will be added
394
+ # to the HTTP request.
395
+ #
396
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
397
+ #
398
+ def get_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers:nil)
399
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
400
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
401
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
402
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
403
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
404
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
405
+ fail ArgumentError, 'analysis_name is nil' if analysis_name.nil?
406
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
407
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
408
+
409
+
410
+ request_headers = {}
411
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
412
+
413
+ # Set Headers
414
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
415
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
416
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'
417
+
418
+ request_url = @base_url || @client.base_url
419
+
420
+ options = {
421
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
422
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'analysisName' => analysis_name,'subscriptionId' => @client.subscription_id},
423
+ query_params: {'api-version' => @client.api_version},
424
+ headers: request_headers.merge(custom_headers || {}),
425
+ base_url: request_url
426
+ }
427
+ promise = @client.make_request_async(:get, path_template, options)
428
+
429
+ promise = promise.then do |result|
430
+ http_response = result.response
431
+ status_code = http_response.status
432
+ response_content = http_response.body
433
+ unless status_code == 200
434
+ error_model = JSON.load(response_content)
435
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
436
+ end
437
+
438
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
439
+ # Deserialize Response
440
+ if status_code == 200
441
+ begin
442
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
443
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticAnalysis.mapper()
444
+ result.body = @client.deserialize(result_mapper, parsed_response)
445
+ rescue Exception => e
446
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
447
+ end
448
+ end
449
+
450
+ result
451
+ end
452
+
453
+ promise.execute
454
+ end
455
+
456
+ #
457
+ # Execute Analysis
458
+ #
459
+ # Execute Analysis
460
+ #
461
+ # @param resource_group_name [String] Name of the resource group to which the
462
+ # resource belongs.
463
+ # @param site_name [String] Site Name
464
+ # @param diagnostic_category [String] Category Name
465
+ # @param analysis_name [String] Analysis Resource Name
466
+ # @param start_time [DateTime] Start Time
467
+ # @param end_time [DateTime] End Time
468
+ # @param time_grain [String] Time Grain
469
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
470
+ # will be added to the HTTP request.
471
+ #
472
+ # @return [DiagnosticAnalysis] operation results.
473
+ #
474
+ def execute_site_analysis(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
475
+ response = execute_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value!
476
+ response.body unless response.nil?
477
+ end
478
+
479
+ #
480
+ # Execute Analysis
481
+ #
482
+ # Execute Analysis
483
+ #
484
+ # @param resource_group_name [String] Name of the resource group to which the
485
+ # resource belongs.
486
+ # @param site_name [String] Site Name
487
+ # @param diagnostic_category [String] Category Name
488
+ # @param analysis_name [String] Analysis Resource Name
489
+ # @param start_time [DateTime] Start Time
490
+ # @param end_time [DateTime] End Time
491
+ # @param time_grain [String] Time Grain
492
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
493
+ # will be added to the HTTP request.
494
+ #
495
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
496
+ #
497
+ def execute_site_analysis_with_http_info(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
498
+ execute_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value!
499
+ end
500
+
501
+ #
502
+ # Execute Analysis
503
+ #
504
+ # Execute Analysis
505
+ #
506
+ # @param resource_group_name [String] Name of the resource group to which the
507
+ # resource belongs.
508
+ # @param site_name [String] Site Name
509
+ # @param diagnostic_category [String] Category Name
510
+ # @param analysis_name [String] Analysis Resource Name
511
+ # @param start_time [DateTime] Start Time
512
+ # @param end_time [DateTime] End Time
513
+ # @param time_grain [String] Time Grain
514
+ # @param [Hash{String => String}] A hash of custom headers that will be added
515
+ # to the HTTP request.
516
+ #
517
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
518
+ #
519
+ def execute_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
520
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
521
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
522
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
523
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
524
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
525
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
526
+ fail ArgumentError, 'analysis_name is nil' if analysis_name.nil?
527
+ fail ArgumentError, "'time_grain' should satisfy the constraint - 'Pattern': 'PT[1-9][0-9]+[SMH]'" if !time_grain.nil? && time_grain.match(Regexp.new('^PT[1-9][0-9]+[SMH]$')).nil?
528
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
529
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
530
+
531
+
532
+ request_headers = {}
533
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
534
+
535
+ # Set Headers
536
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
537
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
538
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'
539
+
540
+ request_url = @base_url || @client.base_url
541
+
542
+ options = {
543
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
544
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'analysisName' => analysis_name,'subscriptionId' => @client.subscription_id},
545
+ query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'api-version' => @client.api_version},
546
+ headers: request_headers.merge(custom_headers || {}),
547
+ base_url: request_url
548
+ }
549
+ promise = @client.make_request_async(:post, path_template, options)
550
+
551
+ promise = promise.then do |result|
552
+ http_response = result.response
553
+ status_code = http_response.status
554
+ response_content = http_response.body
555
+ unless status_code == 200
556
+ error_model = JSON.load(response_content)
557
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
558
+ end
559
+
560
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
561
+ # Deserialize Response
562
+ if status_code == 200
563
+ begin
564
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
565
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticAnalysis.mapper()
566
+ result.body = @client.deserialize(result_mapper, parsed_response)
567
+ rescue Exception => e
568
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
569
+ end
570
+ end
571
+
572
+ result
573
+ end
574
+
575
+ promise.execute
576
+ end
577
+
578
+ #
579
+ # Get Detectors
580
+ #
581
+ # Get Detectors
582
+ #
583
+ # @param resource_group_name [String] Name of the resource group to which the
584
+ # resource belongs.
585
+ # @param site_name [String] Site Name
586
+ # @param diagnostic_category [String] Diagnostic Category
587
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
588
+ # will be added to the HTTP request.
589
+ #
590
+ # @return [Array<DetectorDefinition>] operation results.
591
+ #
592
+ def list_site_detectors(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
593
+ first_page = list_site_detectors_as_lazy(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers)
594
+ first_page.get_all_items
595
+ end
596
+
597
+ #
598
+ # Get Detectors
599
+ #
600
+ # Get Detectors
601
+ #
602
+ # @param resource_group_name [String] Name of the resource group to which the
603
+ # resource belongs.
604
+ # @param site_name [String] Site Name
605
+ # @param diagnostic_category [String] Diagnostic Category
606
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
607
+ # will be added to the HTTP request.
608
+ #
609
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
610
+ #
611
+ def list_site_detectors_with_http_info(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
612
+ list_site_detectors_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value!
613
+ end
614
+
615
+ #
616
+ # Get Detectors
617
+ #
618
+ # Get Detectors
619
+ #
620
+ # @param resource_group_name [String] Name of the resource group to which the
621
+ # resource belongs.
622
+ # @param site_name [String] Site Name
623
+ # @param diagnostic_category [String] Diagnostic Category
624
+ # @param [Hash{String => String}] A hash of custom headers that will be added
625
+ # to the HTTP request.
626
+ #
627
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
628
+ #
629
+ def list_site_detectors_async(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
630
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
631
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
632
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
633
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
634
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
635
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
636
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
637
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
638
+
639
+
640
+ request_headers = {}
641
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
642
+
643
+ # Set Headers
644
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
645
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
646
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'
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,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'subscriptionId' => @client.subscription_id},
653
+ query_params: {'api-version' => @client.api_version},
654
+ headers: request_headers.merge(custom_headers || {}),
655
+ base_url: request_url
656
+ }
657
+ promise = @client.make_request_async(:get, path_template, options)
658
+
659
+ promise = promise.then do |result|
660
+ http_response = result.response
661
+ status_code = http_response.status
662
+ response_content = http_response.body
663
+ unless status_code == 200
664
+ error_model = JSON.load(response_content)
665
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
666
+ end
667
+
668
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
669
+ # Deserialize Response
670
+ if status_code == 200
671
+ begin
672
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
673
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticDetectorCollection.mapper()
674
+ result.body = @client.deserialize(result_mapper, parsed_response)
675
+ rescue Exception => e
676
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
677
+ end
678
+ end
679
+
680
+ result
681
+ end
682
+
683
+ promise.execute
684
+ end
685
+
686
+ #
687
+ # Get Detector
688
+ #
689
+ # Get Detector
690
+ #
691
+ # @param resource_group_name [String] Name of the resource group to which the
692
+ # resource belongs.
693
+ # @param site_name [String] Site Name
694
+ # @param diagnostic_category [String] Diagnostic Category
695
+ # @param detector_name [String] Detector Name
696
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
697
+ # will be added to the HTTP request.
698
+ #
699
+ # @return [Array<DetectorDefinition>] operation results.
700
+ #
701
+ def get_site_detector(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:nil)
702
+ first_page = get_site_detector_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:custom_headers)
703
+ first_page.get_all_items
704
+ end
705
+
706
+ #
707
+ # Get Detector
708
+ #
709
+ # Get Detector
710
+ #
711
+ # @param resource_group_name [String] Name of the resource group to which the
712
+ # resource belongs.
713
+ # @param site_name [String] Site Name
714
+ # @param diagnostic_category [String] Diagnostic Category
715
+ # @param detector_name [String] Detector Name
716
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
717
+ # will be added to the HTTP request.
718
+ #
719
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
720
+ #
721
+ def get_site_detector_with_http_info(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:nil)
722
+ get_site_detector_async(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:custom_headers).value!
723
+ end
724
+
725
+ #
726
+ # Get Detector
727
+ #
728
+ # Get Detector
729
+ #
730
+ # @param resource_group_name [String] Name of the resource group to which the
731
+ # resource belongs.
732
+ # @param site_name [String] Site Name
733
+ # @param diagnostic_category [String] Diagnostic Category
734
+ # @param detector_name [String] Detector Name
735
+ # @param [Hash{String => String}] A hash of custom headers that will be added
736
+ # to the HTTP request.
737
+ #
738
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
739
+ #
740
+ def get_site_detector_async(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:nil)
741
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
742
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
743
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
744
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
745
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
746
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
747
+ fail ArgumentError, 'detector_name is nil' if detector_name.nil?
748
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
749
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
750
+
751
+
752
+ request_headers = {}
753
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
754
+
755
+ # Set Headers
756
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
757
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
758
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'
759
+
760
+ request_url = @base_url || @client.base_url
761
+
762
+ options = {
763
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
764
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'detectorName' => detector_name,'subscriptionId' => @client.subscription_id},
765
+ query_params: {'api-version' => @client.api_version},
766
+ headers: request_headers.merge(custom_headers || {}),
767
+ base_url: request_url
768
+ }
769
+ promise = @client.make_request_async(:get, path_template, options)
770
+
771
+ promise = promise.then do |result|
772
+ http_response = result.response
773
+ status_code = http_response.status
774
+ response_content = http_response.body
775
+ unless status_code == 200
776
+ error_model = JSON.load(response_content)
777
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
778
+ end
779
+
780
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
781
+ # Deserialize Response
782
+ if status_code == 200
783
+ begin
784
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
785
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticDetectorCollection.mapper()
786
+ result.body = @client.deserialize(result_mapper, parsed_response)
787
+ rescue Exception => e
788
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
789
+ end
790
+ end
791
+
792
+ result
793
+ end
794
+
795
+ promise.execute
796
+ end
797
+
798
+ #
799
+ # Execute Detector
800
+ #
801
+ # Execute Detector
802
+ #
803
+ # @param resource_group_name [String] Name of the resource group to which the
804
+ # resource belongs.
805
+ # @param site_name [String] Site Name
806
+ # @param detector_name [String] Detector Resource Name
807
+ # @param diagnostic_category [String] Category Name
808
+ # @param start_time [DateTime] Start Time
809
+ # @param end_time [DateTime] End Time
810
+ # @param time_grain [String] Time Grain
811
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
812
+ # will be added to the HTTP request.
813
+ #
814
+ # @return [DiagnosticDetectorResponse] operation results.
815
+ #
816
+ def execute_site_detector(resource_group_name, site_name, detector_name, diagnostic_category, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
817
+ response = execute_site_detector_async(resource_group_name, site_name, detector_name, diagnostic_category, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value!
818
+ response.body unless response.nil?
819
+ end
820
+
821
+ #
822
+ # Execute Detector
823
+ #
824
+ # Execute Detector
825
+ #
826
+ # @param resource_group_name [String] Name of the resource group to which the
827
+ # resource belongs.
828
+ # @param site_name [String] Site Name
829
+ # @param detector_name [String] Detector Resource Name
830
+ # @param diagnostic_category [String] Category Name
831
+ # @param start_time [DateTime] Start Time
832
+ # @param end_time [DateTime] End Time
833
+ # @param time_grain [String] Time Grain
834
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
835
+ # will be added to the HTTP request.
836
+ #
837
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
838
+ #
839
+ def execute_site_detector_with_http_info(resource_group_name, site_name, detector_name, diagnostic_category, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
840
+ execute_site_detector_async(resource_group_name, site_name, detector_name, diagnostic_category, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value!
841
+ end
842
+
843
+ #
844
+ # Execute Detector
845
+ #
846
+ # Execute Detector
847
+ #
848
+ # @param resource_group_name [String] Name of the resource group to which the
849
+ # resource belongs.
850
+ # @param site_name [String] Site Name
851
+ # @param detector_name [String] Detector Resource Name
852
+ # @param diagnostic_category [String] Category Name
853
+ # @param start_time [DateTime] Start Time
854
+ # @param end_time [DateTime] End Time
855
+ # @param time_grain [String] Time Grain
856
+ # @param [Hash{String => String}] A hash of custom headers that will be added
857
+ # to the HTTP request.
858
+ #
859
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
860
+ #
861
+ def execute_site_detector_async(resource_group_name, site_name, detector_name, diagnostic_category, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
862
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
863
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
864
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
865
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
866
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
867
+ fail ArgumentError, 'detector_name is nil' if detector_name.nil?
868
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
869
+ fail ArgumentError, "'time_grain' should satisfy the constraint - 'Pattern': 'PT[1-9][0-9]+[SMH]'" if !time_grain.nil? && time_grain.match(Regexp.new('^PT[1-9][0-9]+[SMH]$')).nil?
870
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
871
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
872
+
873
+
874
+ request_headers = {}
875
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
876
+
877
+ # Set Headers
878
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
879
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
880
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'
881
+
882
+ request_url = @base_url || @client.base_url
883
+
884
+ options = {
885
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
886
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'detectorName' => detector_name,'diagnosticCategory' => diagnostic_category,'subscriptionId' => @client.subscription_id},
887
+ query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'api-version' => @client.api_version},
888
+ headers: request_headers.merge(custom_headers || {}),
889
+ base_url: request_url
890
+ }
891
+ promise = @client.make_request_async(:post, path_template, options)
892
+
893
+ promise = promise.then do |result|
894
+ http_response = result.response
895
+ status_code = http_response.status
896
+ response_content = http_response.body
897
+ unless status_code == 200
898
+ error_model = JSON.load(response_content)
899
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
900
+ end
901
+
902
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
903
+ # Deserialize Response
904
+ if status_code == 200
905
+ begin
906
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
907
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticDetectorResponse.mapper()
908
+ result.body = @client.deserialize(result_mapper, parsed_response)
909
+ rescue Exception => e
910
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
911
+ end
912
+ end
913
+
914
+ result
915
+ end
916
+
917
+ promise.execute
918
+ end
919
+
920
+ #
921
+ # Get Diagnostics Categories
922
+ #
923
+ # Get Diagnostics Categories
924
+ #
925
+ # @param resource_group_name [String] Name of the resource group to which the
926
+ # resource belongs.
927
+ # @param site_name [String] Site Name
928
+ # @param slot [String] Slot Name
929
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
930
+ # will be added to the HTTP request.
931
+ #
932
+ # @return [Array<DiagnosticCategory>] operation results.
933
+ #
934
+ def list_site_diagnostic_categories_slot(resource_group_name, site_name, slot, custom_headers:nil)
935
+ first_page = list_site_diagnostic_categories_slot_as_lazy(resource_group_name, site_name, slot, custom_headers:custom_headers)
936
+ first_page.get_all_items
937
+ end
938
+
939
+ #
940
+ # Get Diagnostics Categories
941
+ #
942
+ # Get Diagnostics Categories
943
+ #
944
+ # @param resource_group_name [String] Name of the resource group to which the
945
+ # resource belongs.
946
+ # @param site_name [String] Site Name
947
+ # @param slot [String] Slot Name
948
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
949
+ # will be added to the HTTP request.
950
+ #
951
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
952
+ #
953
+ def list_site_diagnostic_categories_slot_with_http_info(resource_group_name, site_name, slot, custom_headers:nil)
954
+ list_site_diagnostic_categories_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value!
955
+ end
956
+
957
+ #
958
+ # Get Diagnostics Categories
959
+ #
960
+ # Get Diagnostics Categories
961
+ #
962
+ # @param resource_group_name [String] Name of the resource group to which the
963
+ # resource belongs.
964
+ # @param site_name [String] Site Name
965
+ # @param slot [String] Slot Name
966
+ # @param [Hash{String => String}] A hash of custom headers that will be added
967
+ # to the HTTP request.
968
+ #
969
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
970
+ #
971
+ def list_site_diagnostic_categories_slot_async(resource_group_name, site_name, slot, custom_headers:nil)
972
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
973
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
974
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
975
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
976
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
977
+ fail ArgumentError, 'slot is nil' if slot.nil?
978
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
979
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
980
+
981
+
982
+ request_headers = {}
983
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
984
+
985
+ # Set Headers
986
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
987
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
988
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'
989
+
990
+ request_url = @base_url || @client.base_url
991
+
992
+ options = {
993
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
994
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
995
+ query_params: {'api-version' => @client.api_version},
996
+ headers: request_headers.merge(custom_headers || {}),
997
+ base_url: request_url
998
+ }
999
+ promise = @client.make_request_async(:get, path_template, options)
1000
+
1001
+ promise = promise.then do |result|
1002
+ http_response = result.response
1003
+ status_code = http_response.status
1004
+ response_content = http_response.body
1005
+ unless status_code == 200
1006
+ error_model = JSON.load(response_content)
1007
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1008
+ end
1009
+
1010
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1011
+ # Deserialize Response
1012
+ if status_code == 200
1013
+ begin
1014
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1015
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticCategoryCollection.mapper()
1016
+ result.body = @client.deserialize(result_mapper, parsed_response)
1017
+ rescue Exception => e
1018
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1019
+ end
1020
+ end
1021
+
1022
+ result
1023
+ end
1024
+
1025
+ promise.execute
1026
+ end
1027
+
1028
+ #
1029
+ # Get Diagnostics Category
1030
+ #
1031
+ # Get Diagnostics Category
1032
+ #
1033
+ # @param resource_group_name [String] Name of the resource group to which the
1034
+ # resource belongs.
1035
+ # @param site_name [String] Site Name
1036
+ # @param diagnostic_category [String] Diagnostic Category
1037
+ # @param slot [String] Slot Name
1038
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1039
+ # will be added to the HTTP request.
1040
+ #
1041
+ # @return [DiagnosticCategory] operation results.
1042
+ #
1043
+ def get_site_diagnostic_category_slot(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
1044
+ response = get_site_diagnostic_category_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value!
1045
+ response.body unless response.nil?
1046
+ end
1047
+
1048
+ #
1049
+ # Get Diagnostics Category
1050
+ #
1051
+ # Get Diagnostics Category
1052
+ #
1053
+ # @param resource_group_name [String] Name of the resource group to which the
1054
+ # resource belongs.
1055
+ # @param site_name [String] Site Name
1056
+ # @param diagnostic_category [String] Diagnostic Category
1057
+ # @param slot [String] Slot Name
1058
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1059
+ # will be added to the HTTP request.
1060
+ #
1061
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1062
+ #
1063
+ def get_site_diagnostic_category_slot_with_http_info(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
1064
+ get_site_diagnostic_category_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value!
1065
+ end
1066
+
1067
+ #
1068
+ # Get Diagnostics Category
1069
+ #
1070
+ # Get Diagnostics Category
1071
+ #
1072
+ # @param resource_group_name [String] Name of the resource group to which the
1073
+ # resource belongs.
1074
+ # @param site_name [String] Site Name
1075
+ # @param diagnostic_category [String] Diagnostic Category
1076
+ # @param slot [String] Slot Name
1077
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1078
+ # to the HTTP request.
1079
+ #
1080
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1081
+ #
1082
+ def get_site_diagnostic_category_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
1083
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1084
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1085
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1086
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1087
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1088
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
1089
+ fail ArgumentError, 'slot is nil' if slot.nil?
1090
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1091
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1092
+
1093
+
1094
+ request_headers = {}
1095
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1096
+
1097
+ # Set Headers
1098
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1099
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1100
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'
1101
+
1102
+ request_url = @base_url || @client.base_url
1103
+
1104
+ options = {
1105
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1106
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'slot' => slot,'subscriptionId' => @client.subscription_id},
1107
+ query_params: {'api-version' => @client.api_version},
1108
+ headers: request_headers.merge(custom_headers || {}),
1109
+ base_url: request_url
1110
+ }
1111
+ promise = @client.make_request_async(:get, path_template, options)
1112
+
1113
+ promise = promise.then do |result|
1114
+ http_response = result.response
1115
+ status_code = http_response.status
1116
+ response_content = http_response.body
1117
+ unless status_code == 200
1118
+ error_model = JSON.load(response_content)
1119
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1120
+ end
1121
+
1122
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1123
+ # Deserialize Response
1124
+ if status_code == 200
1125
+ begin
1126
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1127
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticCategory.mapper()
1128
+ result.body = @client.deserialize(result_mapper, parsed_response)
1129
+ rescue Exception => e
1130
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1131
+ end
1132
+ end
1133
+
1134
+ result
1135
+ end
1136
+
1137
+ promise.execute
1138
+ end
1139
+
1140
+ #
1141
+ # Get Site Analyses
1142
+ #
1143
+ # Get Site Analyses
1144
+ #
1145
+ # @param resource_group_name [String] Name of the resource group to which the
1146
+ # resource belongs.
1147
+ # @param site_name [String] Site Name
1148
+ # @param diagnostic_category [String] Diagnostic Category
1149
+ # @param slot [String] Slot Name
1150
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1151
+ # will be added to the HTTP request.
1152
+ #
1153
+ # @return [Array<AnalysisDefinition>] operation results.
1154
+ #
1155
+ def list_site_analyses_slot(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
1156
+ first_page = list_site_analyses_slot_as_lazy(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers)
1157
+ first_page.get_all_items
1158
+ end
1159
+
1160
+ #
1161
+ # Get Site Analyses
1162
+ #
1163
+ # Get Site Analyses
1164
+ #
1165
+ # @param resource_group_name [String] Name of the resource group to which the
1166
+ # resource belongs.
1167
+ # @param site_name [String] Site Name
1168
+ # @param diagnostic_category [String] Diagnostic Category
1169
+ # @param slot [String] Slot Name
1170
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1171
+ # will be added to the HTTP request.
1172
+ #
1173
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1174
+ #
1175
+ def list_site_analyses_slot_with_http_info(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
1176
+ list_site_analyses_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value!
1177
+ end
1178
+
1179
+ #
1180
+ # Get Site Analyses
1181
+ #
1182
+ # Get Site Analyses
1183
+ #
1184
+ # @param resource_group_name [String] Name of the resource group to which the
1185
+ # resource belongs.
1186
+ # @param site_name [String] Site Name
1187
+ # @param diagnostic_category [String] Diagnostic Category
1188
+ # @param slot [String] Slot Name
1189
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1190
+ # to the HTTP request.
1191
+ #
1192
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1193
+ #
1194
+ def list_site_analyses_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
1195
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1196
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1197
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1198
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1199
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1200
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
1201
+ fail ArgumentError, 'slot is nil' if slot.nil?
1202
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1203
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1204
+
1205
+
1206
+ request_headers = {}
1207
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1208
+
1209
+ # Set Headers
1210
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1211
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1212
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'
1213
+
1214
+ request_url = @base_url || @client.base_url
1215
+
1216
+ options = {
1217
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1218
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'slot' => slot,'subscriptionId' => @client.subscription_id},
1219
+ query_params: {'api-version' => @client.api_version},
1220
+ headers: request_headers.merge(custom_headers || {}),
1221
+ base_url: request_url
1222
+ }
1223
+ promise = @client.make_request_async(:get, path_template, options)
1224
+
1225
+ promise = promise.then do |result|
1226
+ http_response = result.response
1227
+ status_code = http_response.status
1228
+ response_content = http_response.body
1229
+ unless status_code == 200
1230
+ error_model = JSON.load(response_content)
1231
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1232
+ end
1233
+
1234
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1235
+ # Deserialize Response
1236
+ if status_code == 200
1237
+ begin
1238
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1239
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticAnalysisCollection.mapper()
1240
+ result.body = @client.deserialize(result_mapper, parsed_response)
1241
+ rescue Exception => e
1242
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1243
+ end
1244
+ end
1245
+
1246
+ result
1247
+ end
1248
+
1249
+ promise.execute
1250
+ end
1251
+
1252
+ #
1253
+ # Get Site Analysis
1254
+ #
1255
+ # Get Site Analysis
1256
+ #
1257
+ # @param resource_group_name [String] Name of the resource group to which the
1258
+ # resource belongs.
1259
+ # @param site_name [String] Site Name
1260
+ # @param diagnostic_category [String] Diagnostic Category
1261
+ # @param analysis_name [String] Analysis Name
1262
+ # @param slot [String] Slot - optional
1263
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1264
+ # will be added to the HTTP request.
1265
+ #
1266
+ # @return [DiagnosticAnalysis] operation results.
1267
+ #
1268
+ def get_site_analysis_slot(resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers:nil)
1269
+ response = get_site_analysis_slot_async(resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers:custom_headers).value!
1270
+ response.body unless response.nil?
1271
+ end
1272
+
1273
+ #
1274
+ # Get Site Analysis
1275
+ #
1276
+ # Get Site Analysis
1277
+ #
1278
+ # @param resource_group_name [String] Name of the resource group to which the
1279
+ # resource belongs.
1280
+ # @param site_name [String] Site Name
1281
+ # @param diagnostic_category [String] Diagnostic Category
1282
+ # @param analysis_name [String] Analysis Name
1283
+ # @param slot [String] Slot - optional
1284
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1285
+ # will be added to the HTTP request.
1286
+ #
1287
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1288
+ #
1289
+ def get_site_analysis_slot_with_http_info(resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers:nil)
1290
+ get_site_analysis_slot_async(resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers:custom_headers).value!
1291
+ end
1292
+
1293
+ #
1294
+ # Get Site Analysis
1295
+ #
1296
+ # Get Site Analysis
1297
+ #
1298
+ # @param resource_group_name [String] Name of the resource group to which the
1299
+ # resource belongs.
1300
+ # @param site_name [String] Site Name
1301
+ # @param diagnostic_category [String] Diagnostic Category
1302
+ # @param analysis_name [String] Analysis Name
1303
+ # @param slot [String] Slot - optional
1304
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1305
+ # to the HTTP request.
1306
+ #
1307
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1308
+ #
1309
+ def get_site_analysis_slot_async(resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers:nil)
1310
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1311
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1312
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1313
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1314
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1315
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
1316
+ fail ArgumentError, 'analysis_name is nil' if analysis_name.nil?
1317
+ fail ArgumentError, 'slot is nil' if slot.nil?
1318
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1319
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1320
+
1321
+
1322
+ request_headers = {}
1323
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1324
+
1325
+ # Set Headers
1326
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1327
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1328
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'
1329
+
1330
+ request_url = @base_url || @client.base_url
1331
+
1332
+ options = {
1333
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1334
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'analysisName' => analysis_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
1335
+ query_params: {'api-version' => @client.api_version},
1336
+ headers: request_headers.merge(custom_headers || {}),
1337
+ base_url: request_url
1338
+ }
1339
+ promise = @client.make_request_async(:get, path_template, options)
1340
+
1341
+ promise = promise.then do |result|
1342
+ http_response = result.response
1343
+ status_code = http_response.status
1344
+ response_content = http_response.body
1345
+ unless status_code == 200
1346
+ error_model = JSON.load(response_content)
1347
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1348
+ end
1349
+
1350
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1351
+ # Deserialize Response
1352
+ if status_code == 200
1353
+ begin
1354
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1355
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticAnalysis.mapper()
1356
+ result.body = @client.deserialize(result_mapper, parsed_response)
1357
+ rescue Exception => e
1358
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1359
+ end
1360
+ end
1361
+
1362
+ result
1363
+ end
1364
+
1365
+ promise.execute
1366
+ end
1367
+
1368
+ #
1369
+ # Execute Analysis
1370
+ #
1371
+ # Execute Analysis
1372
+ #
1373
+ # @param resource_group_name [String] Name of the resource group to which the
1374
+ # resource belongs.
1375
+ # @param site_name [String] Site Name
1376
+ # @param diagnostic_category [String] Category Name
1377
+ # @param analysis_name [String] Analysis Resource Name
1378
+ # @param slot [String] Slot Name
1379
+ # @param start_time [DateTime] Start Time
1380
+ # @param end_time [DateTime] End Time
1381
+ # @param time_grain [String] Time Grain
1382
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1383
+ # will be added to the HTTP request.
1384
+ #
1385
+ # @return [DiagnosticAnalysis] operation results.
1386
+ #
1387
+ def execute_site_analysis_slot(resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
1388
+ response = execute_site_analysis_slot_async(resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value!
1389
+ response.body unless response.nil?
1390
+ end
1391
+
1392
+ #
1393
+ # Execute Analysis
1394
+ #
1395
+ # Execute Analysis
1396
+ #
1397
+ # @param resource_group_name [String] Name of the resource group to which the
1398
+ # resource belongs.
1399
+ # @param site_name [String] Site Name
1400
+ # @param diagnostic_category [String] Category Name
1401
+ # @param analysis_name [String] Analysis Resource Name
1402
+ # @param slot [String] Slot Name
1403
+ # @param start_time [DateTime] Start Time
1404
+ # @param end_time [DateTime] End Time
1405
+ # @param time_grain [String] Time Grain
1406
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1407
+ # will be added to the HTTP request.
1408
+ #
1409
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1410
+ #
1411
+ def execute_site_analysis_slot_with_http_info(resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
1412
+ execute_site_analysis_slot_async(resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value!
1413
+ end
1414
+
1415
+ #
1416
+ # Execute Analysis
1417
+ #
1418
+ # Execute Analysis
1419
+ #
1420
+ # @param resource_group_name [String] Name of the resource group to which the
1421
+ # resource belongs.
1422
+ # @param site_name [String] Site Name
1423
+ # @param diagnostic_category [String] Category Name
1424
+ # @param analysis_name [String] Analysis Resource Name
1425
+ # @param slot [String] Slot Name
1426
+ # @param start_time [DateTime] Start Time
1427
+ # @param end_time [DateTime] End Time
1428
+ # @param time_grain [String] Time Grain
1429
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1430
+ # to the HTTP request.
1431
+ #
1432
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1433
+ #
1434
+ def execute_site_analysis_slot_async(resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
1435
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1436
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1437
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1438
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1439
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1440
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
1441
+ fail ArgumentError, 'analysis_name is nil' if analysis_name.nil?
1442
+ fail ArgumentError, 'slot is nil' if slot.nil?
1443
+ fail ArgumentError, "'time_grain' should satisfy the constraint - 'Pattern': 'PT[1-9][0-9]+[SMH]'" if !time_grain.nil? && time_grain.match(Regexp.new('^PT[1-9][0-9]+[SMH]$')).nil?
1444
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1445
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1446
+
1447
+
1448
+ request_headers = {}
1449
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1450
+
1451
+ # Set Headers
1452
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1453
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1454
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'
1455
+
1456
+ request_url = @base_url || @client.base_url
1457
+
1458
+ options = {
1459
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1460
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'analysisName' => analysis_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
1461
+ query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'api-version' => @client.api_version},
1462
+ headers: request_headers.merge(custom_headers || {}),
1463
+ base_url: request_url
1464
+ }
1465
+ promise = @client.make_request_async(:post, path_template, options)
1466
+
1467
+ promise = promise.then do |result|
1468
+ http_response = result.response
1469
+ status_code = http_response.status
1470
+ response_content = http_response.body
1471
+ unless status_code == 200
1472
+ error_model = JSON.load(response_content)
1473
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1474
+ end
1475
+
1476
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1477
+ # Deserialize Response
1478
+ if status_code == 200
1479
+ begin
1480
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1481
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticAnalysis.mapper()
1482
+ result.body = @client.deserialize(result_mapper, parsed_response)
1483
+ rescue Exception => e
1484
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1485
+ end
1486
+ end
1487
+
1488
+ result
1489
+ end
1490
+
1491
+ promise.execute
1492
+ end
1493
+
1494
+ #
1495
+ # Get Detectors
1496
+ #
1497
+ # Get Detectors
1498
+ #
1499
+ # @param resource_group_name [String] Name of the resource group to which the
1500
+ # resource belongs.
1501
+ # @param site_name [String] Site Name
1502
+ # @param diagnostic_category [String] Diagnostic Category
1503
+ # @param slot [String] Slot Name
1504
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1505
+ # will be added to the HTTP request.
1506
+ #
1507
+ # @return [Array<DetectorDefinition>] operation results.
1508
+ #
1509
+ def list_site_detectors_slot(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
1510
+ first_page = list_site_detectors_slot_as_lazy(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers)
1511
+ first_page.get_all_items
1512
+ end
1513
+
1514
+ #
1515
+ # Get Detectors
1516
+ #
1517
+ # Get Detectors
1518
+ #
1519
+ # @param resource_group_name [String] Name of the resource group to which the
1520
+ # resource belongs.
1521
+ # @param site_name [String] Site Name
1522
+ # @param diagnostic_category [String] Diagnostic Category
1523
+ # @param slot [String] Slot Name
1524
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1525
+ # will be added to the HTTP request.
1526
+ #
1527
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1528
+ #
1529
+ def list_site_detectors_slot_with_http_info(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
1530
+ list_site_detectors_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value!
1531
+ end
1532
+
1533
+ #
1534
+ # Get Detectors
1535
+ #
1536
+ # Get Detectors
1537
+ #
1538
+ # @param resource_group_name [String] Name of the resource group to which the
1539
+ # resource belongs.
1540
+ # @param site_name [String] Site Name
1541
+ # @param diagnostic_category [String] Diagnostic Category
1542
+ # @param slot [String] Slot Name
1543
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1544
+ # to the HTTP request.
1545
+ #
1546
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1547
+ #
1548
+ def list_site_detectors_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
1549
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1550
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1551
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1552
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1553
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1554
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
1555
+ fail ArgumentError, 'slot is nil' if slot.nil?
1556
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1557
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1558
+
1559
+
1560
+ request_headers = {}
1561
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1562
+
1563
+ # Set Headers
1564
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1565
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1566
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'
1567
+
1568
+ request_url = @base_url || @client.base_url
1569
+
1570
+ options = {
1571
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1572
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'slot' => slot,'subscriptionId' => @client.subscription_id},
1573
+ query_params: {'api-version' => @client.api_version},
1574
+ headers: request_headers.merge(custom_headers || {}),
1575
+ base_url: request_url
1576
+ }
1577
+ promise = @client.make_request_async(:get, path_template, options)
1578
+
1579
+ promise = promise.then do |result|
1580
+ http_response = result.response
1581
+ status_code = http_response.status
1582
+ response_content = http_response.body
1583
+ unless status_code == 200
1584
+ error_model = JSON.load(response_content)
1585
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1586
+ end
1587
+
1588
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1589
+ # Deserialize Response
1590
+ if status_code == 200
1591
+ begin
1592
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1593
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticDetectorCollection.mapper()
1594
+ result.body = @client.deserialize(result_mapper, parsed_response)
1595
+ rescue Exception => e
1596
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1597
+ end
1598
+ end
1599
+
1600
+ result
1601
+ end
1602
+
1603
+ promise.execute
1604
+ end
1605
+
1606
+ #
1607
+ # Get Detector
1608
+ #
1609
+ # Get Detector
1610
+ #
1611
+ # @param resource_group_name [String] Name of the resource group to which the
1612
+ # resource belongs.
1613
+ # @param site_name [String] Site Name
1614
+ # @param diagnostic_category [String] Diagnostic Category
1615
+ # @param detector_name [String] Detector Name
1616
+ # @param slot [String] Slot Name
1617
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1618
+ # will be added to the HTTP request.
1619
+ #
1620
+ # @return [Array<DetectorDefinition>] operation results.
1621
+ #
1622
+ def get_site_detector_slot(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:nil)
1623
+ first_page = get_site_detector_slot_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:custom_headers)
1624
+ first_page.get_all_items
1625
+ end
1626
+
1627
+ #
1628
+ # Get Detector
1629
+ #
1630
+ # Get Detector
1631
+ #
1632
+ # @param resource_group_name [String] Name of the resource group to which the
1633
+ # resource belongs.
1634
+ # @param site_name [String] Site Name
1635
+ # @param diagnostic_category [String] Diagnostic Category
1636
+ # @param detector_name [String] Detector Name
1637
+ # @param slot [String] Slot Name
1638
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1639
+ # will be added to the HTTP request.
1640
+ #
1641
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1642
+ #
1643
+ def get_site_detector_slot_with_http_info(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:nil)
1644
+ get_site_detector_slot_async(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:custom_headers).value!
1645
+ end
1646
+
1647
+ #
1648
+ # Get Detector
1649
+ #
1650
+ # Get Detector
1651
+ #
1652
+ # @param resource_group_name [String] Name of the resource group to which the
1653
+ # resource belongs.
1654
+ # @param site_name [String] Site Name
1655
+ # @param diagnostic_category [String] Diagnostic Category
1656
+ # @param detector_name [String] Detector Name
1657
+ # @param slot [String] Slot Name
1658
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1659
+ # to the HTTP request.
1660
+ #
1661
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1662
+ #
1663
+ def get_site_detector_slot_async(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:nil)
1664
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1665
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1666
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1667
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1668
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1669
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
1670
+ fail ArgumentError, 'detector_name is nil' if detector_name.nil?
1671
+ fail ArgumentError, 'slot is nil' if slot.nil?
1672
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1673
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1674
+
1675
+
1676
+ request_headers = {}
1677
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1678
+
1679
+ # Set Headers
1680
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1681
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1682
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'
1683
+
1684
+ request_url = @base_url || @client.base_url
1685
+
1686
+ options = {
1687
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1688
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'detectorName' => detector_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
1689
+ query_params: {'api-version' => @client.api_version},
1690
+ headers: request_headers.merge(custom_headers || {}),
1691
+ base_url: request_url
1692
+ }
1693
+ promise = @client.make_request_async(:get, path_template, options)
1694
+
1695
+ promise = promise.then do |result|
1696
+ http_response = result.response
1697
+ status_code = http_response.status
1698
+ response_content = http_response.body
1699
+ unless status_code == 200
1700
+ error_model = JSON.load(response_content)
1701
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1702
+ end
1703
+
1704
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1705
+ # Deserialize Response
1706
+ if status_code == 200
1707
+ begin
1708
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1709
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticDetectorCollection.mapper()
1710
+ result.body = @client.deserialize(result_mapper, parsed_response)
1711
+ rescue Exception => e
1712
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1713
+ end
1714
+ end
1715
+
1716
+ result
1717
+ end
1718
+
1719
+ promise.execute
1720
+ end
1721
+
1722
+ #
1723
+ # Execute Detector
1724
+ #
1725
+ # Execute Detector
1726
+ #
1727
+ # @param resource_group_name [String] Name of the resource group to which the
1728
+ # resource belongs.
1729
+ # @param site_name [String] Site Name
1730
+ # @param detector_name [String] Detector Resource Name
1731
+ # @param diagnostic_category [String] Category Name
1732
+ # @param slot [String] Slot Name
1733
+ # @param start_time [DateTime] Start Time
1734
+ # @param end_time [DateTime] End Time
1735
+ # @param time_grain [String] Time Grain
1736
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1737
+ # will be added to the HTTP request.
1738
+ #
1739
+ # @return [DiagnosticDetectorResponse] operation results.
1740
+ #
1741
+ def execute_site_detector_slot(resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
1742
+ response = execute_site_detector_slot_async(resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value!
1743
+ response.body unless response.nil?
1744
+ end
1745
+
1746
+ #
1747
+ # Execute Detector
1748
+ #
1749
+ # Execute Detector
1750
+ #
1751
+ # @param resource_group_name [String] Name of the resource group to which the
1752
+ # resource belongs.
1753
+ # @param site_name [String] Site Name
1754
+ # @param detector_name [String] Detector Resource Name
1755
+ # @param diagnostic_category [String] Category Name
1756
+ # @param slot [String] Slot Name
1757
+ # @param start_time [DateTime] Start Time
1758
+ # @param end_time [DateTime] End Time
1759
+ # @param time_grain [String] Time Grain
1760
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1761
+ # will be added to the HTTP request.
1762
+ #
1763
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1764
+ #
1765
+ def execute_site_detector_slot_with_http_info(resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
1766
+ execute_site_detector_slot_async(resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value!
1767
+ end
1768
+
1769
+ #
1770
+ # Execute Detector
1771
+ #
1772
+ # Execute Detector
1773
+ #
1774
+ # @param resource_group_name [String] Name of the resource group to which the
1775
+ # resource belongs.
1776
+ # @param site_name [String] Site Name
1777
+ # @param detector_name [String] Detector Resource Name
1778
+ # @param diagnostic_category [String] Category Name
1779
+ # @param slot [String] Slot Name
1780
+ # @param start_time [DateTime] Start Time
1781
+ # @param end_time [DateTime] End Time
1782
+ # @param time_grain [String] Time Grain
1783
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1784
+ # to the HTTP request.
1785
+ #
1786
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1787
+ #
1788
+ def execute_site_detector_slot_async(resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
1789
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1790
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1791
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1792
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1793
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1794
+ fail ArgumentError, 'detector_name is nil' if detector_name.nil?
1795
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
1796
+ fail ArgumentError, 'slot is nil' if slot.nil?
1797
+ fail ArgumentError, "'time_grain' should satisfy the constraint - 'Pattern': 'PT[1-9][0-9]+[SMH]'" if !time_grain.nil? && time_grain.match(Regexp.new('^PT[1-9][0-9]+[SMH]$')).nil?
1798
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1799
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1800
+
1801
+
1802
+ request_headers = {}
1803
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1804
+
1805
+ # Set Headers
1806
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1807
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1808
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'
1809
+
1810
+ request_url = @base_url || @client.base_url
1811
+
1812
+ options = {
1813
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1814
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'detectorName' => detector_name,'diagnosticCategory' => diagnostic_category,'slot' => slot,'subscriptionId' => @client.subscription_id},
1815
+ query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'api-version' => @client.api_version},
1816
+ headers: request_headers.merge(custom_headers || {}),
1817
+ base_url: request_url
1818
+ }
1819
+ promise = @client.make_request_async(:post, path_template, options)
1820
+
1821
+ promise = promise.then do |result|
1822
+ http_response = result.response
1823
+ status_code = http_response.status
1824
+ response_content = http_response.body
1825
+ unless status_code == 200
1826
+ error_model = JSON.load(response_content)
1827
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1828
+ end
1829
+
1830
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1831
+ # Deserialize Response
1832
+ if status_code == 200
1833
+ begin
1834
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1835
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticDetectorResponse.mapper()
1836
+ result.body = @client.deserialize(result_mapper, parsed_response)
1837
+ rescue Exception => e
1838
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1839
+ end
1840
+ end
1841
+
1842
+ result
1843
+ end
1844
+
1845
+ promise.execute
1846
+ end
1847
+
1848
+ #
1849
+ # Get Diagnostics Categories
1850
+ #
1851
+ # Get Diagnostics Categories
1852
+ #
1853
+ # @param next_page_link [String] The NextLink from the previous successful call
1854
+ # to List operation.
1855
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1856
+ # will be added to the HTTP request.
1857
+ #
1858
+ # @return [DiagnosticCategoryCollection] operation results.
1859
+ #
1860
+ def list_site_diagnostic_categories_next(next_page_link, custom_headers:nil)
1861
+ response = list_site_diagnostic_categories_next_async(next_page_link, custom_headers:custom_headers).value!
1862
+ response.body unless response.nil?
1863
+ end
1864
+
1865
+ #
1866
+ # Get Diagnostics Categories
1867
+ #
1868
+ # Get Diagnostics Categories
1869
+ #
1870
+ # @param next_page_link [String] The NextLink from the previous successful call
1871
+ # to List operation.
1872
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1873
+ # will be added to the HTTP request.
1874
+ #
1875
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1876
+ #
1877
+ def list_site_diagnostic_categories_next_with_http_info(next_page_link, custom_headers:nil)
1878
+ list_site_diagnostic_categories_next_async(next_page_link, custom_headers:custom_headers).value!
1879
+ end
1880
+
1881
+ #
1882
+ # Get Diagnostics Categories
1883
+ #
1884
+ # Get Diagnostics Categories
1885
+ #
1886
+ # @param next_page_link [String] The NextLink from the previous successful call
1887
+ # to List operation.
1888
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1889
+ # to the HTTP request.
1890
+ #
1891
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1892
+ #
1893
+ def list_site_diagnostic_categories_next_async(next_page_link, custom_headers:nil)
1894
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1895
+
1896
+
1897
+ request_headers = {}
1898
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1899
+
1900
+ # Set Headers
1901
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1902
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1903
+ path_template = '{nextLink}'
1904
+
1905
+ request_url = @base_url || @client.base_url
1906
+
1907
+ options = {
1908
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1909
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1910
+ headers: request_headers.merge(custom_headers || {}),
1911
+ base_url: request_url
1912
+ }
1913
+ promise = @client.make_request_async(:get, path_template, options)
1914
+
1915
+ promise = promise.then do |result|
1916
+ http_response = result.response
1917
+ status_code = http_response.status
1918
+ response_content = http_response.body
1919
+ unless status_code == 200
1920
+ error_model = JSON.load(response_content)
1921
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1922
+ end
1923
+
1924
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1925
+ # Deserialize Response
1926
+ if status_code == 200
1927
+ begin
1928
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1929
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticCategoryCollection.mapper()
1930
+ result.body = @client.deserialize(result_mapper, parsed_response)
1931
+ rescue Exception => e
1932
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1933
+ end
1934
+ end
1935
+
1936
+ result
1937
+ end
1938
+
1939
+ promise.execute
1940
+ end
1941
+
1942
+ #
1943
+ # Get Site Analyses
1944
+ #
1945
+ # Get Site Analyses
1946
+ #
1947
+ # @param next_page_link [String] The NextLink from the previous successful call
1948
+ # to List operation.
1949
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1950
+ # will be added to the HTTP request.
1951
+ #
1952
+ # @return [DiagnosticAnalysisCollection] operation results.
1953
+ #
1954
+ def list_site_analyses_next(next_page_link, custom_headers:nil)
1955
+ response = list_site_analyses_next_async(next_page_link, custom_headers:custom_headers).value!
1956
+ response.body unless response.nil?
1957
+ end
1958
+
1959
+ #
1960
+ # Get Site Analyses
1961
+ #
1962
+ # Get Site Analyses
1963
+ #
1964
+ # @param next_page_link [String] The NextLink from the previous successful call
1965
+ # to List operation.
1966
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1967
+ # will be added to the HTTP request.
1968
+ #
1969
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1970
+ #
1971
+ def list_site_analyses_next_with_http_info(next_page_link, custom_headers:nil)
1972
+ list_site_analyses_next_async(next_page_link, custom_headers:custom_headers).value!
1973
+ end
1974
+
1975
+ #
1976
+ # Get Site Analyses
1977
+ #
1978
+ # Get Site Analyses
1979
+ #
1980
+ # @param next_page_link [String] The NextLink from the previous successful call
1981
+ # to List operation.
1982
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1983
+ # to the HTTP request.
1984
+ #
1985
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1986
+ #
1987
+ def list_site_analyses_next_async(next_page_link, custom_headers:nil)
1988
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1989
+
1990
+
1991
+ request_headers = {}
1992
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1993
+
1994
+ # Set Headers
1995
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1996
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1997
+ path_template = '{nextLink}'
1998
+
1999
+ request_url = @base_url || @client.base_url
2000
+
2001
+ options = {
2002
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2003
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2004
+ headers: request_headers.merge(custom_headers || {}),
2005
+ base_url: request_url
2006
+ }
2007
+ promise = @client.make_request_async(:get, path_template, options)
2008
+
2009
+ promise = promise.then do |result|
2010
+ http_response = result.response
2011
+ status_code = http_response.status
2012
+ response_content = http_response.body
2013
+ unless status_code == 200
2014
+ error_model = JSON.load(response_content)
2015
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2016
+ end
2017
+
2018
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2019
+ # Deserialize Response
2020
+ if status_code == 200
2021
+ begin
2022
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2023
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticAnalysisCollection.mapper()
2024
+ result.body = @client.deserialize(result_mapper, parsed_response)
2025
+ rescue Exception => e
2026
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2027
+ end
2028
+ end
2029
+
2030
+ result
2031
+ end
2032
+
2033
+ promise.execute
2034
+ end
2035
+
2036
+ #
2037
+ # Get Detectors
2038
+ #
2039
+ # Get Detectors
2040
+ #
2041
+ # @param next_page_link [String] The NextLink from the previous successful call
2042
+ # to List operation.
2043
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2044
+ # will be added to the HTTP request.
2045
+ #
2046
+ # @return [DiagnosticDetectorCollection] operation results.
2047
+ #
2048
+ def list_site_detectors_next(next_page_link, custom_headers:nil)
2049
+ response = list_site_detectors_next_async(next_page_link, custom_headers:custom_headers).value!
2050
+ response.body unless response.nil?
2051
+ end
2052
+
2053
+ #
2054
+ # Get Detectors
2055
+ #
2056
+ # Get Detectors
2057
+ #
2058
+ # @param next_page_link [String] The NextLink from the previous successful call
2059
+ # to List operation.
2060
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2061
+ # will be added to the HTTP request.
2062
+ #
2063
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2064
+ #
2065
+ def list_site_detectors_next_with_http_info(next_page_link, custom_headers:nil)
2066
+ list_site_detectors_next_async(next_page_link, custom_headers:custom_headers).value!
2067
+ end
2068
+
2069
+ #
2070
+ # Get Detectors
2071
+ #
2072
+ # Get Detectors
2073
+ #
2074
+ # @param next_page_link [String] The NextLink from the previous successful call
2075
+ # to List operation.
2076
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2077
+ # to the HTTP request.
2078
+ #
2079
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2080
+ #
2081
+ def list_site_detectors_next_async(next_page_link, custom_headers:nil)
2082
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2083
+
2084
+
2085
+ request_headers = {}
2086
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2087
+
2088
+ # Set Headers
2089
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2090
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2091
+ path_template = '{nextLink}'
2092
+
2093
+ request_url = @base_url || @client.base_url
2094
+
2095
+ options = {
2096
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2097
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2098
+ headers: request_headers.merge(custom_headers || {}),
2099
+ base_url: request_url
2100
+ }
2101
+ promise = @client.make_request_async(:get, path_template, options)
2102
+
2103
+ promise = promise.then do |result|
2104
+ http_response = result.response
2105
+ status_code = http_response.status
2106
+ response_content = http_response.body
2107
+ unless status_code == 200
2108
+ error_model = JSON.load(response_content)
2109
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2110
+ end
2111
+
2112
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2113
+ # Deserialize Response
2114
+ if status_code == 200
2115
+ begin
2116
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2117
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticDetectorCollection.mapper()
2118
+ result.body = @client.deserialize(result_mapper, parsed_response)
2119
+ rescue Exception => e
2120
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2121
+ end
2122
+ end
2123
+
2124
+ result
2125
+ end
2126
+
2127
+ promise.execute
2128
+ end
2129
+
2130
+ #
2131
+ # Get Detector
2132
+ #
2133
+ # Get Detector
2134
+ #
2135
+ # @param next_page_link [String] The NextLink from the previous successful call
2136
+ # to List operation.
2137
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2138
+ # will be added to the HTTP request.
2139
+ #
2140
+ # @return [DiagnosticDetectorCollection] operation results.
2141
+ #
2142
+ def get_site_detector_next(next_page_link, custom_headers:nil)
2143
+ response = get_site_detector_next_async(next_page_link, custom_headers:custom_headers).value!
2144
+ response.body unless response.nil?
2145
+ end
2146
+
2147
+ #
2148
+ # Get Detector
2149
+ #
2150
+ # Get Detector
2151
+ #
2152
+ # @param next_page_link [String] The NextLink from the previous successful call
2153
+ # to List operation.
2154
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2155
+ # will be added to the HTTP request.
2156
+ #
2157
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2158
+ #
2159
+ def get_site_detector_next_with_http_info(next_page_link, custom_headers:nil)
2160
+ get_site_detector_next_async(next_page_link, custom_headers:custom_headers).value!
2161
+ end
2162
+
2163
+ #
2164
+ # Get Detector
2165
+ #
2166
+ # Get Detector
2167
+ #
2168
+ # @param next_page_link [String] The NextLink from the previous successful call
2169
+ # to List operation.
2170
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2171
+ # to the HTTP request.
2172
+ #
2173
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2174
+ #
2175
+ def get_site_detector_next_async(next_page_link, custom_headers:nil)
2176
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2177
+
2178
+
2179
+ request_headers = {}
2180
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2181
+
2182
+ # Set Headers
2183
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2184
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2185
+ path_template = '{nextLink}'
2186
+
2187
+ request_url = @base_url || @client.base_url
2188
+
2189
+ options = {
2190
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2191
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2192
+ headers: request_headers.merge(custom_headers || {}),
2193
+ base_url: request_url
2194
+ }
2195
+ promise = @client.make_request_async(:get, path_template, options)
2196
+
2197
+ promise = promise.then do |result|
2198
+ http_response = result.response
2199
+ status_code = http_response.status
2200
+ response_content = http_response.body
2201
+ unless status_code == 200
2202
+ error_model = JSON.load(response_content)
2203
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2204
+ end
2205
+
2206
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2207
+ # Deserialize Response
2208
+ if status_code == 200
2209
+ begin
2210
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2211
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticDetectorCollection.mapper()
2212
+ result.body = @client.deserialize(result_mapper, parsed_response)
2213
+ rescue Exception => e
2214
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2215
+ end
2216
+ end
2217
+
2218
+ result
2219
+ end
2220
+
2221
+ promise.execute
2222
+ end
2223
+
2224
+ #
2225
+ # Get Diagnostics Categories
2226
+ #
2227
+ # Get Diagnostics Categories
2228
+ #
2229
+ # @param next_page_link [String] The NextLink from the previous successful call
2230
+ # to List operation.
2231
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2232
+ # will be added to the HTTP request.
2233
+ #
2234
+ # @return [DiagnosticCategoryCollection] operation results.
2235
+ #
2236
+ def list_site_diagnostic_categories_slot_next(next_page_link, custom_headers:nil)
2237
+ response = list_site_diagnostic_categories_slot_next_async(next_page_link, custom_headers:custom_headers).value!
2238
+ response.body unless response.nil?
2239
+ end
2240
+
2241
+ #
2242
+ # Get Diagnostics Categories
2243
+ #
2244
+ # Get Diagnostics Categories
2245
+ #
2246
+ # @param next_page_link [String] The NextLink from the previous successful call
2247
+ # to List operation.
2248
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2249
+ # will be added to the HTTP request.
2250
+ #
2251
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2252
+ #
2253
+ def list_site_diagnostic_categories_slot_next_with_http_info(next_page_link, custom_headers:nil)
2254
+ list_site_diagnostic_categories_slot_next_async(next_page_link, custom_headers:custom_headers).value!
2255
+ end
2256
+
2257
+ #
2258
+ # Get Diagnostics Categories
2259
+ #
2260
+ # Get Diagnostics Categories
2261
+ #
2262
+ # @param next_page_link [String] The NextLink from the previous successful call
2263
+ # to List operation.
2264
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2265
+ # to the HTTP request.
2266
+ #
2267
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2268
+ #
2269
+ def list_site_diagnostic_categories_slot_next_async(next_page_link, custom_headers:nil)
2270
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2271
+
2272
+
2273
+ request_headers = {}
2274
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2275
+
2276
+ # Set Headers
2277
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2278
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2279
+ path_template = '{nextLink}'
2280
+
2281
+ request_url = @base_url || @client.base_url
2282
+
2283
+ options = {
2284
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2285
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2286
+ headers: request_headers.merge(custom_headers || {}),
2287
+ base_url: request_url
2288
+ }
2289
+ promise = @client.make_request_async(:get, path_template, options)
2290
+
2291
+ promise = promise.then do |result|
2292
+ http_response = result.response
2293
+ status_code = http_response.status
2294
+ response_content = http_response.body
2295
+ unless status_code == 200
2296
+ error_model = JSON.load(response_content)
2297
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2298
+ end
2299
+
2300
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2301
+ # Deserialize Response
2302
+ if status_code == 200
2303
+ begin
2304
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2305
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticCategoryCollection.mapper()
2306
+ result.body = @client.deserialize(result_mapper, parsed_response)
2307
+ rescue Exception => e
2308
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2309
+ end
2310
+ end
2311
+
2312
+ result
2313
+ end
2314
+
2315
+ promise.execute
2316
+ end
2317
+
2318
+ #
2319
+ # Get Site Analyses
2320
+ #
2321
+ # Get Site Analyses
2322
+ #
2323
+ # @param next_page_link [String] The NextLink from the previous successful call
2324
+ # to List operation.
2325
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2326
+ # will be added to the HTTP request.
2327
+ #
2328
+ # @return [DiagnosticAnalysisCollection] operation results.
2329
+ #
2330
+ def list_site_analyses_slot_next(next_page_link, custom_headers:nil)
2331
+ response = list_site_analyses_slot_next_async(next_page_link, custom_headers:custom_headers).value!
2332
+ response.body unless response.nil?
2333
+ end
2334
+
2335
+ #
2336
+ # Get Site Analyses
2337
+ #
2338
+ # Get Site Analyses
2339
+ #
2340
+ # @param next_page_link [String] The NextLink from the previous successful call
2341
+ # to List operation.
2342
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2343
+ # will be added to the HTTP request.
2344
+ #
2345
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2346
+ #
2347
+ def list_site_analyses_slot_next_with_http_info(next_page_link, custom_headers:nil)
2348
+ list_site_analyses_slot_next_async(next_page_link, custom_headers:custom_headers).value!
2349
+ end
2350
+
2351
+ #
2352
+ # Get Site Analyses
2353
+ #
2354
+ # Get Site Analyses
2355
+ #
2356
+ # @param next_page_link [String] The NextLink from the previous successful call
2357
+ # to List operation.
2358
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2359
+ # to the HTTP request.
2360
+ #
2361
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2362
+ #
2363
+ def list_site_analyses_slot_next_async(next_page_link, custom_headers:nil)
2364
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2365
+
2366
+
2367
+ request_headers = {}
2368
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2369
+
2370
+ # Set Headers
2371
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2372
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2373
+ path_template = '{nextLink}'
2374
+
2375
+ request_url = @base_url || @client.base_url
2376
+
2377
+ options = {
2378
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2379
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2380
+ headers: request_headers.merge(custom_headers || {}),
2381
+ base_url: request_url
2382
+ }
2383
+ promise = @client.make_request_async(:get, path_template, options)
2384
+
2385
+ promise = promise.then do |result|
2386
+ http_response = result.response
2387
+ status_code = http_response.status
2388
+ response_content = http_response.body
2389
+ unless status_code == 200
2390
+ error_model = JSON.load(response_content)
2391
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2392
+ end
2393
+
2394
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2395
+ # Deserialize Response
2396
+ if status_code == 200
2397
+ begin
2398
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2399
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticAnalysisCollection.mapper()
2400
+ result.body = @client.deserialize(result_mapper, parsed_response)
2401
+ rescue Exception => e
2402
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2403
+ end
2404
+ end
2405
+
2406
+ result
2407
+ end
2408
+
2409
+ promise.execute
2410
+ end
2411
+
2412
+ #
2413
+ # Get Detectors
2414
+ #
2415
+ # Get Detectors
2416
+ #
2417
+ # @param next_page_link [String] The NextLink from the previous successful call
2418
+ # to List operation.
2419
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2420
+ # will be added to the HTTP request.
2421
+ #
2422
+ # @return [DiagnosticDetectorCollection] operation results.
2423
+ #
2424
+ def list_site_detectors_slot_next(next_page_link, custom_headers:nil)
2425
+ response = list_site_detectors_slot_next_async(next_page_link, custom_headers:custom_headers).value!
2426
+ response.body unless response.nil?
2427
+ end
2428
+
2429
+ #
2430
+ # Get Detectors
2431
+ #
2432
+ # Get Detectors
2433
+ #
2434
+ # @param next_page_link [String] The NextLink from the previous successful call
2435
+ # to List operation.
2436
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2437
+ # will be added to the HTTP request.
2438
+ #
2439
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2440
+ #
2441
+ def list_site_detectors_slot_next_with_http_info(next_page_link, custom_headers:nil)
2442
+ list_site_detectors_slot_next_async(next_page_link, custom_headers:custom_headers).value!
2443
+ end
2444
+
2445
+ #
2446
+ # Get Detectors
2447
+ #
2448
+ # Get Detectors
2449
+ #
2450
+ # @param next_page_link [String] The NextLink from the previous successful call
2451
+ # to List operation.
2452
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2453
+ # to the HTTP request.
2454
+ #
2455
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2456
+ #
2457
+ def list_site_detectors_slot_next_async(next_page_link, custom_headers:nil)
2458
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2459
+
2460
+
2461
+ request_headers = {}
2462
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2463
+
2464
+ # Set Headers
2465
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2466
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2467
+ path_template = '{nextLink}'
2468
+
2469
+ request_url = @base_url || @client.base_url
2470
+
2471
+ options = {
2472
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2473
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2474
+ headers: request_headers.merge(custom_headers || {}),
2475
+ base_url: request_url
2476
+ }
2477
+ promise = @client.make_request_async(:get, path_template, options)
2478
+
2479
+ promise = promise.then do |result|
2480
+ http_response = result.response
2481
+ status_code = http_response.status
2482
+ response_content = http_response.body
2483
+ unless status_code == 200
2484
+ error_model = JSON.load(response_content)
2485
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2486
+ end
2487
+
2488
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2489
+ # Deserialize Response
2490
+ if status_code == 200
2491
+ begin
2492
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2493
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticDetectorCollection.mapper()
2494
+ result.body = @client.deserialize(result_mapper, parsed_response)
2495
+ rescue Exception => e
2496
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2497
+ end
2498
+ end
2499
+
2500
+ result
2501
+ end
2502
+
2503
+ promise.execute
2504
+ end
2505
+
2506
+ #
2507
+ # Get Detector
2508
+ #
2509
+ # Get Detector
2510
+ #
2511
+ # @param next_page_link [String] The NextLink from the previous successful call
2512
+ # to List operation.
2513
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2514
+ # will be added to the HTTP request.
2515
+ #
2516
+ # @return [DiagnosticDetectorCollection] operation results.
2517
+ #
2518
+ def get_site_detector_slot_next(next_page_link, custom_headers:nil)
2519
+ response = get_site_detector_slot_next_async(next_page_link, custom_headers:custom_headers).value!
2520
+ response.body unless response.nil?
2521
+ end
2522
+
2523
+ #
2524
+ # Get Detector
2525
+ #
2526
+ # Get Detector
2527
+ #
2528
+ # @param next_page_link [String] The NextLink from the previous successful call
2529
+ # to List operation.
2530
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2531
+ # will be added to the HTTP request.
2532
+ #
2533
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2534
+ #
2535
+ def get_site_detector_slot_next_with_http_info(next_page_link, custom_headers:nil)
2536
+ get_site_detector_slot_next_async(next_page_link, custom_headers:custom_headers).value!
2537
+ end
2538
+
2539
+ #
2540
+ # Get Detector
2541
+ #
2542
+ # Get Detector
2543
+ #
2544
+ # @param next_page_link [String] The NextLink from the previous successful call
2545
+ # to List operation.
2546
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2547
+ # to the HTTP request.
2548
+ #
2549
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2550
+ #
2551
+ def get_site_detector_slot_next_async(next_page_link, custom_headers:nil)
2552
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2553
+
2554
+
2555
+ request_headers = {}
2556
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2557
+
2558
+ # Set Headers
2559
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2560
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2561
+ path_template = '{nextLink}'
2562
+
2563
+ request_url = @base_url || @client.base_url
2564
+
2565
+ options = {
2566
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2567
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2568
+ headers: request_headers.merge(custom_headers || {}),
2569
+ base_url: request_url
2570
+ }
2571
+ promise = @client.make_request_async(:get, path_template, options)
2572
+
2573
+ promise = promise.then do |result|
2574
+ http_response = result.response
2575
+ status_code = http_response.status
2576
+ response_content = http_response.body
2577
+ unless status_code == 200
2578
+ error_model = JSON.load(response_content)
2579
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2580
+ end
2581
+
2582
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2583
+ # Deserialize Response
2584
+ if status_code == 200
2585
+ begin
2586
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2587
+ result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::DiagnosticDetectorCollection.mapper()
2588
+ result.body = @client.deserialize(result_mapper, parsed_response)
2589
+ rescue Exception => e
2590
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2591
+ end
2592
+ end
2593
+
2594
+ result
2595
+ end
2596
+
2597
+ promise.execute
2598
+ end
2599
+
2600
+ #
2601
+ # Get Diagnostics Categories
2602
+ #
2603
+ # Get Diagnostics Categories
2604
+ #
2605
+ # @param resource_group_name [String] Name of the resource group to which the
2606
+ # resource belongs.
2607
+ # @param site_name [String] Site Name
2608
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2609
+ # will be added to the HTTP request.
2610
+ #
2611
+ # @return [DiagnosticCategoryCollection] which provide lazy access to pages of
2612
+ # the response.
2613
+ #
2614
+ def list_site_diagnostic_categories_as_lazy(resource_group_name, site_name, custom_headers:nil)
2615
+ response = list_site_diagnostic_categories_async(resource_group_name, site_name, custom_headers:custom_headers).value!
2616
+ unless response.nil?
2617
+ page = response.body
2618
+ page.next_method = Proc.new do |next_page_link|
2619
+ list_site_diagnostic_categories_next_async(next_page_link, custom_headers:custom_headers)
2620
+ end
2621
+ page
2622
+ end
2623
+ end
2624
+
2625
+ #
2626
+ # Get Site Analyses
2627
+ #
2628
+ # Get Site Analyses
2629
+ #
2630
+ # @param resource_group_name [String] Name of the resource group to which the
2631
+ # resource belongs.
2632
+ # @param site_name [String] Site Name
2633
+ # @param diagnostic_category [String] Diagnostic Category
2634
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2635
+ # will be added to the HTTP request.
2636
+ #
2637
+ # @return [DiagnosticAnalysisCollection] which provide lazy access to pages of
2638
+ # the response.
2639
+ #
2640
+ def list_site_analyses_as_lazy(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
2641
+ response = list_site_analyses_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value!
2642
+ unless response.nil?
2643
+ page = response.body
2644
+ page.next_method = Proc.new do |next_page_link|
2645
+ list_site_analyses_next_async(next_page_link, custom_headers:custom_headers)
2646
+ end
2647
+ page
2648
+ end
2649
+ end
2650
+
2651
+ #
2652
+ # Get Detectors
2653
+ #
2654
+ # Get Detectors
2655
+ #
2656
+ # @param resource_group_name [String] Name of the resource group to which the
2657
+ # resource belongs.
2658
+ # @param site_name [String] Site Name
2659
+ # @param diagnostic_category [String] Diagnostic Category
2660
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2661
+ # will be added to the HTTP request.
2662
+ #
2663
+ # @return [DiagnosticDetectorCollection] which provide lazy access to pages of
2664
+ # the response.
2665
+ #
2666
+ def list_site_detectors_as_lazy(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
2667
+ response = list_site_detectors_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value!
2668
+ unless response.nil?
2669
+ page = response.body
2670
+ page.next_method = Proc.new do |next_page_link|
2671
+ list_site_detectors_next_async(next_page_link, custom_headers:custom_headers)
2672
+ end
2673
+ page
2674
+ end
2675
+ end
2676
+
2677
+ #
2678
+ # Get Detector
2679
+ #
2680
+ # Get Detector
2681
+ #
2682
+ # @param resource_group_name [String] Name of the resource group to which the
2683
+ # resource belongs.
2684
+ # @param site_name [String] Site Name
2685
+ # @param diagnostic_category [String] Diagnostic Category
2686
+ # @param detector_name [String] Detector Name
2687
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2688
+ # will be added to the HTTP request.
2689
+ #
2690
+ # @return [DiagnosticDetectorCollection] which provide lazy access to pages of
2691
+ # the response.
2692
+ #
2693
+ def get_site_detector_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:nil)
2694
+ response = get_site_detector_async(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:custom_headers).value!
2695
+ unless response.nil?
2696
+ page = response.body
2697
+ page.next_method = Proc.new do |next_page_link|
2698
+ get_site_detector_next_async(next_page_link, custom_headers:custom_headers)
2699
+ end
2700
+ page
2701
+ end
2702
+ end
2703
+
2704
+ #
2705
+ # Get Diagnostics Categories
2706
+ #
2707
+ # Get Diagnostics Categories
2708
+ #
2709
+ # @param resource_group_name [String] Name of the resource group to which the
2710
+ # resource belongs.
2711
+ # @param site_name [String] Site Name
2712
+ # @param slot [String] Slot Name
2713
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2714
+ # will be added to the HTTP request.
2715
+ #
2716
+ # @return [DiagnosticCategoryCollection] which provide lazy access to pages of
2717
+ # the response.
2718
+ #
2719
+ def list_site_diagnostic_categories_slot_as_lazy(resource_group_name, site_name, slot, custom_headers:nil)
2720
+ response = list_site_diagnostic_categories_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value!
2721
+ unless response.nil?
2722
+ page = response.body
2723
+ page.next_method = Proc.new do |next_page_link|
2724
+ list_site_diagnostic_categories_slot_next_async(next_page_link, custom_headers:custom_headers)
2725
+ end
2726
+ page
2727
+ end
2728
+ end
2729
+
2730
+ #
2731
+ # Get Site Analyses
2732
+ #
2733
+ # Get Site Analyses
2734
+ #
2735
+ # @param resource_group_name [String] Name of the resource group to which the
2736
+ # resource belongs.
2737
+ # @param site_name [String] Site Name
2738
+ # @param diagnostic_category [String] Diagnostic Category
2739
+ # @param slot [String] Slot Name
2740
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2741
+ # will be added to the HTTP request.
2742
+ #
2743
+ # @return [DiagnosticAnalysisCollection] which provide lazy access to pages of
2744
+ # the response.
2745
+ #
2746
+ def list_site_analyses_slot_as_lazy(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
2747
+ response = list_site_analyses_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value!
2748
+ unless response.nil?
2749
+ page = response.body
2750
+ page.next_method = Proc.new do |next_page_link|
2751
+ list_site_analyses_slot_next_async(next_page_link, custom_headers:custom_headers)
2752
+ end
2753
+ page
2754
+ end
2755
+ end
2756
+
2757
+ #
2758
+ # Get Detectors
2759
+ #
2760
+ # Get Detectors
2761
+ #
2762
+ # @param resource_group_name [String] Name of the resource group to which the
2763
+ # resource belongs.
2764
+ # @param site_name [String] Site Name
2765
+ # @param diagnostic_category [String] Diagnostic Category
2766
+ # @param slot [String] Slot Name
2767
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2768
+ # will be added to the HTTP request.
2769
+ #
2770
+ # @return [DiagnosticDetectorCollection] which provide lazy access to pages of
2771
+ # the response.
2772
+ #
2773
+ def list_site_detectors_slot_as_lazy(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
2774
+ response = list_site_detectors_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value!
2775
+ unless response.nil?
2776
+ page = response.body
2777
+ page.next_method = Proc.new do |next_page_link|
2778
+ list_site_detectors_slot_next_async(next_page_link, custom_headers:custom_headers)
2779
+ end
2780
+ page
2781
+ end
2782
+ end
2783
+
2784
+ #
2785
+ # Get Detector
2786
+ #
2787
+ # Get Detector
2788
+ #
2789
+ # @param resource_group_name [String] Name of the resource group to which the
2790
+ # resource belongs.
2791
+ # @param site_name [String] Site Name
2792
+ # @param diagnostic_category [String] Diagnostic Category
2793
+ # @param detector_name [String] Detector Name
2794
+ # @param slot [String] Slot Name
2795
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2796
+ # will be added to the HTTP request.
2797
+ #
2798
+ # @return [DiagnosticDetectorCollection] which provide lazy access to pages of
2799
+ # the response.
2800
+ #
2801
+ def get_site_detector_slot_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:nil)
2802
+ response = get_site_detector_slot_async(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:custom_headers).value!
2803
+ unless response.nil?
2804
+ page = response.body
2805
+ page.next_method = Proc.new do |next_page_link|
2806
+ get_site_detector_slot_next_async(next_page_link, custom_headers:custom_headers)
2807
+ end
2808
+ page
2809
+ end
2810
+ end
2811
+
2812
+ end
2813
+ end