azure_mgmt_web 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (418) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-04-01/generated/azure_mgmt_web.rb +41 -39
  3. data/lib/2015-04-01/generated/azure_mgmt_web/domain_registration_provider.rb +1 -1
  4. data/lib/2015-04-01/generated/azure_mgmt_web/domains.rb +1 -1
  5. data/lib/2015-04-01/generated/azure_mgmt_web/models/managed_service_identity.rb +3 -2
  6. data/lib/2015-04-01/generated/azure_mgmt_web/models/managed_service_identity_type.rb +15 -0
  7. data/lib/2015-04-01/generated/azure_mgmt_web/models/site_config.rb +26 -0
  8. data/lib/2015-04-01/generated/azure_mgmt_web/models/supported_tls_versions.rb +17 -0
  9. data/lib/2015-04-01/generated/azure_mgmt_web/top_level_domains.rb +1 -1
  10. data/lib/2015-04-01/generated/azure_mgmt_web/web_site_management_client.rb +11 -10
  11. data/lib/2015-08-01/generated/azure_mgmt_web.rb +2 -0
  12. data/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb +1 -1
  13. data/lib/2015-08-01/generated/azure_mgmt_web/certificate_registration_provider.rb +1 -1
  14. data/lib/2015-08-01/generated/azure_mgmt_web/models/managed_service_identity.rb +3 -2
  15. data/lib/2015-08-01/generated/azure_mgmt_web/models/managed_service_identity_type.rb +15 -0
  16. data/lib/2015-08-01/generated/azure_mgmt_web/models/site_config.rb +26 -0
  17. data/lib/2015-08-01/generated/azure_mgmt_web/models/supported_tls_versions.rb +17 -0
  18. data/lib/2015-08-01/generated/azure_mgmt_web/web_site_management_client.rb +7 -6
  19. data/lib/2016-03-01/generated/azure_mgmt_web.rb +76 -52
  20. data/lib/2016-03-01/generated/azure_mgmt_web/billing_meters.rb +235 -0
  21. data/lib/2016-03-01/generated/azure_mgmt_web/certificates.rb +1 -1
  22. data/lib/2016-03-01/generated/azure_mgmt_web/deleted_web_apps.rb +1 -1
  23. data/lib/2016-03-01/generated/azure_mgmt_web/diagnostics.rb +1143 -111
  24. data/lib/2016-03-01/generated/azure_mgmt_web/models/application_stack.rb +109 -0
  25. data/lib/2016-03-01/generated/azure_mgmt_web/models/application_stack_collection.rb +99 -0
  26. data/lib/2016-03-01/generated/azure_mgmt_web/models/billing_meter.rb +126 -0
  27. data/lib/2016-03-01/generated/azure_mgmt_web/models/billing_meter_collection.rb +99 -0
  28. data/lib/2016-03-01/generated/azure_mgmt_web/models/data_table_response_column.rb +68 -0
  29. data/lib/2016-03-01/generated/azure_mgmt_web/models/data_table_response_object.rb +94 -0
  30. data/lib/2016-03-01/generated/azure_mgmt_web/models/default_error_response.rb +48 -0
  31. data/lib/2016-03-01/generated/azure_mgmt_web/models/default_error_response_error.rb +104 -0
  32. data/lib/2016-03-01/generated/azure_mgmt_web/models/default_error_response_error_details_item.rb +72 -0
  33. data/lib/2016-03-01/generated/azure_mgmt_web/models/detector_info.rb +83 -0
  34. data/lib/2016-03-01/generated/azure_mgmt_web/models/detector_response.rb +102 -0
  35. data/lib/2016-03-01/generated/azure_mgmt_web/models/detector_response_collection.rb +99 -0
  36. data/lib/2016-03-01/generated/azure_mgmt_web/models/diagnostic_data.rb +60 -0
  37. data/lib/2016-03-01/generated/azure_mgmt_web/models/managed_service_identity.rb +3 -2
  38. data/lib/2016-03-01/generated/azure_mgmt_web/models/managed_service_identity_type.rb +15 -0
  39. data/lib/2016-03-01/generated/azure_mgmt_web/models/recommendation.rb +57 -22
  40. data/lib/2016-03-01/generated/azure_mgmt_web/models/recommendation_collection.rb +99 -0
  41. data/lib/2016-03-01/generated/azure_mgmt_web/models/recommendation_rule.rb +49 -14
  42. data/lib/2016-03-01/generated/azure_mgmt_web/models/rendering.rb +71 -0
  43. data/lib/2016-03-01/generated/azure_mgmt_web/models/rendering_type.rb +18 -0
  44. data/lib/2016-03-01/generated/azure_mgmt_web/models/resource_health_metadata.rb +93 -0
  45. data/lib/2016-03-01/generated/azure_mgmt_web/models/resource_health_metadata_collection.rb +99 -0
  46. data/lib/2016-03-01/generated/azure_mgmt_web/models/site_config.rb +26 -0
  47. data/lib/2016-03-01/generated/azure_mgmt_web/models/stack_major_version.rb +90 -0
  48. data/lib/2016-03-01/generated/azure_mgmt_web/models/stack_minor_version.rb +69 -0
  49. data/lib/2016-03-01/generated/azure_mgmt_web/models/supported_tls_versions.rb +17 -0
  50. data/lib/2016-03-01/generated/azure_mgmt_web/provider.rb +277 -17
  51. data/lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb +582 -67
  52. data/lib/2016-03-01/generated/azure_mgmt_web/resource_health_metadata_operations.rb +1161 -0
  53. data/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb +16 -6
  54. data/lib/2016-08-01/generated/azure_mgmt_web.rb +2 -0
  55. data/lib/2016-08-01/generated/azure_mgmt_web/models/managed_service_identity.rb +3 -2
  56. data/lib/2016-08-01/generated/azure_mgmt_web/models/managed_service_identity_type.rb +15 -0
  57. data/lib/2016-08-01/generated/azure_mgmt_web/models/site_config.rb +26 -0
  58. data/lib/2016-08-01/generated/azure_mgmt_web/models/site_config_resource.rb +26 -0
  59. data/lib/2016-08-01/generated/azure_mgmt_web/models/supported_tls_versions.rb +17 -0
  60. data/lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb +87 -102
  61. data/lib/2016-08-01/generated/azure_mgmt_web/web_site_management_client.rb +7 -6
  62. data/lib/2016-09-01/generated/azure_mgmt_web.rb +2 -0
  63. data/lib/2016-09-01/generated/azure_mgmt_web/app_service_environments.rb +3 -3
  64. data/lib/2016-09-01/generated/azure_mgmt_web/app_service_plans.rb +1 -1
  65. data/lib/2016-09-01/generated/azure_mgmt_web/models/managed_service_identity.rb +3 -2
  66. data/lib/2016-09-01/generated/azure_mgmt_web/models/managed_service_identity_type.rb +15 -0
  67. data/lib/2016-09-01/generated/azure_mgmt_web/models/site_config.rb +26 -0
  68. data/lib/2016-09-01/generated/azure_mgmt_web/models/supported_tls_versions.rb +17 -0
  69. data/lib/2016-09-01/generated/azure_mgmt_web/web_site_management_client.rb +7 -6
  70. data/lib/2018-02-01/generated/azure_mgmt_web.rb +369 -0
  71. data/lib/2018-02-01/generated/azure_mgmt_web/app_service_certificate_orders.rb +2651 -0
  72. data/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb +8089 -0
  73. data/lib/2018-02-01/generated/azure_mgmt_web/app_service_plans.rb +4314 -0
  74. data/lib/2018-02-01/generated/azure_mgmt_web/certificate_registration_provider.rb +243 -0
  75. data/lib/2018-02-01/generated/azure_mgmt_web/certificates.rb +882 -0
  76. data/lib/2018-02-01/generated/azure_mgmt_web/deleted_web_apps.rb +231 -0
  77. data/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb +3845 -0
  78. data/lib/2018-02-01/generated/azure_mgmt_web/domain_registration_provider.rb +243 -0
  79. data/lib/2018-02-01/generated/azure_mgmt_web/domains.rb +2145 -0
  80. data/lib/2018-02-01/generated/azure_mgmt_web/models/abnormal_time_period.rb +98 -0
  81. data/lib/2018-02-01/generated/azure_mgmt_web/models/access_control_entry_action.rb +16 -0
  82. data/lib/2018-02-01/generated/azure_mgmt_web/models/address.rb +101 -0
  83. data/lib/2018-02-01/generated/azure_mgmt_web/models/address_response.rb +97 -0
  84. data/lib/2018-02-01/generated/azure_mgmt_web/models/analysis_data.rb +118 -0
  85. data/lib/2018-02-01/generated/azure_mgmt_web/models/analysis_definition.rb +82 -0
  86. data/lib/2018-02-01/generated/azure_mgmt_web/models/api_definition_info.rb +46 -0
  87. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_certificate.rb +76 -0
  88. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_certificate_collection.rb +99 -0
  89. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_certificate_order.rb +359 -0
  90. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_certificate_order_collection.rb +99 -0
  91. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_certificate_order_patch_resource.rb +335 -0
  92. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_certificate_patch_resource.rb +112 -0
  93. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_certificate_resource.rb +136 -0
  94. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_environment.rb +570 -0
  95. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_environment_collection.rb +99 -0
  96. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_environment_patch_resource.rb +605 -0
  97. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_environment_resource.rb +629 -0
  98. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_plan.rb +329 -0
  99. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_plan_collection.rb +99 -0
  100. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_plan_patch_resource.rb +293 -0
  101. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_plan_restrictions.rb +20 -0
  102. data/lib/2018-02-01/generated/azure_mgmt_web/models/application_logs_config.rb +74 -0
  103. data/lib/2018-02-01/generated/azure_mgmt_web/models/application_stack.rb +109 -0
  104. data/lib/2018-02-01/generated/azure_mgmt_web/models/application_stack_collection.rb +99 -0
  105. data/lib/2018-02-01/generated/azure_mgmt_web/models/auto_heal_action_type.rb +17 -0
  106. data/lib/2018-02-01/generated/azure_mgmt_web/models/auto_heal_actions.rb +72 -0
  107. data/lib/2018-02-01/generated/azure_mgmt_web/models/auto_heal_custom_action.rb +58 -0
  108. data/lib/2018-02-01/generated/azure_mgmt_web/models/auto_heal_rules.rb +61 -0
  109. data/lib/2018-02-01/generated/azure_mgmt_web/models/auto_heal_triggers.rb +91 -0
  110. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb +73 -0
  111. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb +72 -0
  112. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_resource_type.rb +16 -0
  113. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb +60 -0
  114. data/lib/2018-02-01/generated/azure_mgmt_web/models/backup_item.rb +257 -0
  115. data/lib/2018-02-01/generated/azure_mgmt_web/models/backup_item_collection.rb +99 -0
  116. data/lib/2018-02-01/generated/azure_mgmt_web/models/backup_item_status.rb +24 -0
  117. data/lib/2018-02-01/generated/azure_mgmt_web/models/backup_request.rb +128 -0
  118. data/lib/2018-02-01/generated/azure_mgmt_web/models/backup_restore_operation_type.rb +19 -0
  119. data/lib/2018-02-01/generated/azure_mgmt_web/models/backup_schedule.rb +116 -0
  120. data/lib/2018-02-01/generated/azure_mgmt_web/models/billing_meter.rb +137 -0
  121. data/lib/2018-02-01/generated/azure_mgmt_web/models/billing_meter_collection.rb +99 -0
  122. data/lib/2018-02-01/generated/azure_mgmt_web/models/built_in_authentication_provider.rb +19 -0
  123. data/lib/2018-02-01/generated/azure_mgmt_web/models/capability.rb +68 -0
  124. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate.rb +335 -0
  125. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_collection.rb +99 -0
  126. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_details.rb +143 -0
  127. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_email.rb +92 -0
  128. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_order_action.rb +101 -0
  129. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_order_action_type.rb +28 -0
  130. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_order_status.rb +24 -0
  131. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_patch_resource.rb +311 -0
  132. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_product_type.rb +16 -0
  133. data/lib/2018-02-01/generated/azure_mgmt_web/models/channels.rb +19 -0
  134. data/lib/2018-02-01/generated/azure_mgmt_web/models/check_name_resource_types.rb +22 -0
  135. data/lib/2018-02-01/generated/azure_mgmt_web/models/clone_ability_result.rb +17 -0
  136. data/lib/2018-02-01/generated/azure_mgmt_web/models/cloning_info.rb +170 -0
  137. data/lib/2018-02-01/generated/azure_mgmt_web/models/compute_mode_options.rb +17 -0
  138. data/lib/2018-02-01/generated/azure_mgmt_web/models/conn_string_info.rb +71 -0
  139. data/lib/2018-02-01/generated/azure_mgmt_web/models/conn_string_value_type_pair.rb +60 -0
  140. data/lib/2018-02-01/generated/azure_mgmt_web/models/connection_string_dictionary.rb +90 -0
  141. data/lib/2018-02-01/generated/azure_mgmt_web/models/connection_string_type.rb +25 -0
  142. data/lib/2018-02-01/generated/azure_mgmt_web/models/contact.rb +138 -0
  143. data/lib/2018-02-01/generated/azure_mgmt_web/models/continuous_web_job.rb +192 -0
  144. data/lib/2018-02-01/generated/azure_mgmt_web/models/continuous_web_job_collection.rb +99 -0
  145. data/lib/2018-02-01/generated/azure_mgmt_web/models/continuous_web_job_status.rb +19 -0
  146. data/lib/2018-02-01/generated/azure_mgmt_web/models/cors_settings.rb +56 -0
  147. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_move_resource_envelope.rb +71 -0
  148. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_operation_collection.rb +99 -0
  149. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_operation_description.rb +82 -0
  150. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_operation_description_properties.rb +47 -0
  151. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_operation_display.rb +79 -0
  152. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_publishing_profile_options.rb +49 -0
  153. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_slot_entity.rb +58 -0
  154. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_usage_quota.rb +91 -0
  155. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb +99 -0
  156. data/lib/2018-02-01/generated/azure_mgmt_web/models/custom_host_name_dns_record_type.rb +16 -0
  157. data/lib/2018-02-01/generated/azure_mgmt_web/models/custom_hostname_analysis_result.rb +249 -0
  158. data/lib/2018-02-01/generated/azure_mgmt_web/models/data_source.rb +74 -0
  159. data/lib/2018-02-01/generated/azure_mgmt_web/models/data_table_response_column.rb +68 -0
  160. data/lib/2018-02-01/generated/azure_mgmt_web/models/data_table_response_object.rb +94 -0
  161. data/lib/2018-02-01/generated/azure_mgmt_web/models/database_backup_setting.rb +84 -0
  162. data/lib/2018-02-01/generated/azure_mgmt_web/models/database_type.rb +18 -0
  163. data/lib/2018-02-01/generated/azure_mgmt_web/models/default_error_response.rb +48 -0
  164. data/lib/2018-02-01/generated/azure_mgmt_web/models/default_error_response_error.rb +104 -0
  165. data/lib/2018-02-01/generated/azure_mgmt_web/models/default_error_response_error_details_item.rb +72 -0
  166. data/lib/2018-02-01/generated/azure_mgmt_web/models/deleted_app_restore_request.rb +107 -0
  167. data/lib/2018-02-01/generated/azure_mgmt_web/models/deleted_site.rb +107 -0
  168. data/lib/2018-02-01/generated/azure_mgmt_web/models/deleted_web_app_collection.rb +99 -0
  169. data/lib/2018-02-01/generated/azure_mgmt_web/models/deployment.rb +170 -0
  170. data/lib/2018-02-01/generated/azure_mgmt_web/models/deployment_collection.rb +99 -0
  171. data/lib/2018-02-01/generated/azure_mgmt_web/models/deployment_locations.rb +98 -0
  172. data/lib/2018-02-01/generated/azure_mgmt_web/models/detector_abnormal_time_period.rb +153 -0
  173. data/lib/2018-02-01/generated/azure_mgmt_web/models/detector_definition.rb +118 -0
  174. data/lib/2018-02-01/generated/azure_mgmt_web/models/detector_info.rb +83 -0
  175. data/lib/2018-02-01/generated/azure_mgmt_web/models/detector_response.rb +102 -0
  176. data/lib/2018-02-01/generated/azure_mgmt_web/models/detector_response_collection.rb +99 -0
  177. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_analysis.rb +153 -0
  178. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_analysis_collection.rb +99 -0
  179. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_category.rb +82 -0
  180. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_category_collection.rb +99 -0
  181. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_data.rb +60 -0
  182. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_detector_collection.rb +99 -0
  183. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_detector_response.rb +197 -0
  184. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_metric_sample.rb +109 -0
  185. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_metric_set.rb +113 -0
  186. data/lib/2018-02-01/generated/azure_mgmt_web/models/dimension.rb +81 -0
  187. data/lib/2018-02-01/generated/azure_mgmt_web/models/dns_type.rb +16 -0
  188. data/lib/2018-02-01/generated/azure_mgmt_web/models/dns_verification_test_result.rb +17 -0
  189. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain.rb +372 -0
  190. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_availablility_check_result.rb +73 -0
  191. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_collection.rb +99 -0
  192. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_control_center_sso_request.rb +72 -0
  193. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_ownership_identifier.rb +81 -0
  194. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_ownership_identifier_collection.rb +99 -0
  195. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_patch_resource.rb +348 -0
  196. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_purchase_consent.rb +79 -0
  197. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_recommendation_search_parameters.rb +58 -0
  198. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_status.rb +35 -0
  199. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_type.rb +16 -0
  200. data/lib/2018-02-01/generated/azure_mgmt_web/models/enabled_config.rb +47 -0
  201. data/lib/2018-02-01/generated/azure_mgmt_web/models/error_entity.rb +118 -0
  202. data/lib/2018-02-01/generated/azure_mgmt_web/models/experiments.rb +55 -0
  203. data/lib/2018-02-01/generated/azure_mgmt_web/models/file_system_application_logs_config.rb +49 -0
  204. data/lib/2018-02-01/generated/azure_mgmt_web/models/file_system_http_logs_config.rb +78 -0
  205. data/lib/2018-02-01/generated/azure_mgmt_web/models/frequency_unit.rb +16 -0
  206. data/lib/2018-02-01/generated/azure_mgmt_web/models/ftps_state.rb +17 -0
  207. data/lib/2018-02-01/generated/azure_mgmt_web/models/function_envelope.rb +177 -0
  208. data/lib/2018-02-01/generated/azure_mgmt_web/models/function_envelope_collection.rb +99 -0
  209. data/lib/2018-02-01/generated/azure_mgmt_web/models/function_secrets.rb +92 -0
  210. data/lib/2018-02-01/generated/azure_mgmt_web/models/geo_region.rb +94 -0
  211. data/lib/2018-02-01/generated/azure_mgmt_web/models/geo_region_collection.rb +99 -0
  212. data/lib/2018-02-01/generated/azure_mgmt_web/models/global_csm_sku_description.rb +131 -0
  213. data/lib/2018-02-01/generated/azure_mgmt_web/models/handler_mapping.rb +73 -0
  214. data/lib/2018-02-01/generated/azure_mgmt_web/models/host_name.rb +119 -0
  215. data/lib/2018-02-01/generated/azure_mgmt_web/models/host_name_binding.rb +179 -0
  216. data/lib/2018-02-01/generated/azure_mgmt_web/models/host_name_binding_collection.rb +99 -0
  217. data/lib/2018-02-01/generated/azure_mgmt_web/models/host_name_ssl_state.rb +106 -0
  218. data/lib/2018-02-01/generated/azure_mgmt_web/models/host_name_type.rb +16 -0
  219. data/lib/2018-02-01/generated/azure_mgmt_web/models/host_type.rb +16 -0
  220. data/lib/2018-02-01/generated/azure_mgmt_web/models/hosting_environment_deployment_info.rb +57 -0
  221. data/lib/2018-02-01/generated/azure_mgmt_web/models/hosting_environment_diagnostics.rb +57 -0
  222. data/lib/2018-02-01/generated/azure_mgmt_web/models/hosting_environment_profile.rb +70 -0
  223. data/lib/2018-02-01/generated/azure_mgmt_web/models/hosting_environment_status.rb +18 -0
  224. data/lib/2018-02-01/generated/azure_mgmt_web/models/http_logs_config.rb +61 -0
  225. data/lib/2018-02-01/generated/azure_mgmt_web/models/hybrid_connection.rb +163 -0
  226. data/lib/2018-02-01/generated/azure_mgmt_web/models/hybrid_connection_collection.rb +99 -0
  227. data/lib/2018-02-01/generated/azure_mgmt_web/models/hybrid_connection_key.rb +95 -0
  228. data/lib/2018-02-01/generated/azure_mgmt_web/models/hybrid_connection_limits.rb +95 -0
  229. data/lib/2018-02-01/generated/azure_mgmt_web/models/identifier.rb +81 -0
  230. data/lib/2018-02-01/generated/azure_mgmt_web/models/identifier_collection.rb +99 -0
  231. data/lib/2018-02-01/generated/azure_mgmt_web/models/in_availability_reason_type.rb +16 -0
  232. data/lib/2018-02-01/generated/azure_mgmt_web/models/internal_load_balancing_mode.rb +17 -0
  233. data/lib/2018-02-01/generated/azure_mgmt_web/models/ip_filter_tag.rb +16 -0
  234. data/lib/2018-02-01/generated/azure_mgmt_web/models/ip_security_restriction.rb +120 -0
  235. data/lib/2018-02-01/generated/azure_mgmt_web/models/issue_type.rb +22 -0
  236. data/lib/2018-02-01/generated/azure_mgmt_web/models/key_vault_secret_status.rb +25 -0
  237. data/lib/2018-02-01/generated/azure_mgmt_web/models/localizable_string.rb +57 -0
  238. data/lib/2018-02-01/generated/azure_mgmt_web/models/log_level.rb +19 -0
  239. data/lib/2018-02-01/generated/azure_mgmt_web/models/log_specification.rb +68 -0
  240. data/lib/2018-02-01/generated/azure_mgmt_web/models/managed_pipeline_mode.rb +16 -0
  241. data/lib/2018-02-01/generated/azure_mgmt_web/models/managed_service_identity.rb +91 -0
  242. data/lib/2018-02-01/generated/azure_mgmt_web/models/managed_service_identity_type.rb +16 -0
  243. data/lib/2018-02-01/generated/azure_mgmt_web/models/metric_availabilily.rb +57 -0
  244. data/lib/2018-02-01/generated/azure_mgmt_web/models/metric_availability.rb +57 -0
  245. data/lib/2018-02-01/generated/azure_mgmt_web/models/metric_definition.rb +128 -0
  246. data/lib/2018-02-01/generated/azure_mgmt_web/models/metric_specification.rb +218 -0
  247. data/lib/2018-02-01/generated/azure_mgmt_web/models/migrate_my_sql_request.rb +94 -0
  248. data/lib/2018-02-01/generated/azure_mgmt_web/models/migrate_my_sql_status.rb +108 -0
  249. data/lib/2018-02-01/generated/azure_mgmt_web/models/msdeploy.rb +165 -0
  250. data/lib/2018-02-01/generated/azure_mgmt_web/models/msdeploy_log.rb +91 -0
  251. data/lib/2018-02-01/generated/azure_mgmt_web/models/msdeploy_log_entry.rb +73 -0
  252. data/lib/2018-02-01/generated/azure_mgmt_web/models/msdeploy_log_entry_type.rb +17 -0
  253. data/lib/2018-02-01/generated/azure_mgmt_web/models/msdeploy_provisioning_state.rb +19 -0
  254. data/lib/2018-02-01/generated/azure_mgmt_web/models/msdeploy_status.rb +132 -0
  255. data/lib/2018-02-01/generated/azure_mgmt_web/models/my_sql_migration_type.rb +16 -0
  256. data/lib/2018-02-01/generated/azure_mgmt_web/models/name_identifier.rb +46 -0
  257. data/lib/2018-02-01/generated/azure_mgmt_web/models/name_identifier_collection.rb +99 -0
  258. data/lib/2018-02-01/generated/azure_mgmt_web/models/name_value_pair.rb +57 -0
  259. data/lib/2018-02-01/generated/azure_mgmt_web/models/network_access_control_entry.rb +81 -0
  260. data/lib/2018-02-01/generated/azure_mgmt_web/models/network_features.rb +140 -0
  261. data/lib/2018-02-01/generated/azure_mgmt_web/models/notification_level.rb +18 -0
  262. data/lib/2018-02-01/generated/azure_mgmt_web/models/operation.rb +135 -0
  263. data/lib/2018-02-01/generated/azure_mgmt_web/models/operation_status.rb +19 -0
  264. data/lib/2018-02-01/generated/azure_mgmt_web/models/perf_mon_counter_collection.rb +99 -0
  265. data/lib/2018-02-01/generated/azure_mgmt_web/models/perf_mon_response.rb +69 -0
  266. data/lib/2018-02-01/generated/azure_mgmt_web/models/perf_mon_sample.rb +68 -0
  267. data/lib/2018-02-01/generated/azure_mgmt_web/models/perf_mon_set.rb +100 -0
  268. data/lib/2018-02-01/generated/azure_mgmt_web/models/premier_add_on.rb +149 -0
  269. data/lib/2018-02-01/generated/azure_mgmt_web/models/premier_add_on_offer.rb +184 -0
  270. data/lib/2018-02-01/generated/azure_mgmt_web/models/premier_add_on_offer_collection.rb +99 -0
  271. data/lib/2018-02-01/generated/azure_mgmt_web/models/premier_add_on_patch_resource.rb +125 -0
  272. data/lib/2018-02-01/generated/azure_mgmt_web/models/private_access.rb +102 -0
  273. data/lib/2018-02-01/generated/azure_mgmt_web/models/private_access_subnet.rb +58 -0
  274. data/lib/2018-02-01/generated/azure_mgmt_web/models/private_access_virtual_network.rb +91 -0
  275. data/lib/2018-02-01/generated/azure_mgmt_web/models/process_info.rb +509 -0
  276. data/lib/2018-02-01/generated/azure_mgmt_web/models/process_info_collection.rb +99 -0
  277. data/lib/2018-02-01/generated/azure_mgmt_web/models/process_module_info.rb +192 -0
  278. data/lib/2018-02-01/generated/azure_mgmt_web/models/process_module_info_collection.rb +99 -0
  279. data/lib/2018-02-01/generated/azure_mgmt_web/models/process_thread_info.rb +214 -0
  280. data/lib/2018-02-01/generated/azure_mgmt_web/models/process_thread_info_collection.rb +99 -0
  281. data/lib/2018-02-01/generated/azure_mgmt_web/models/provisioning_state.rb +19 -0
  282. data/lib/2018-02-01/generated/azure_mgmt_web/models/proxy_only_resource.rb +83 -0
  283. data/lib/2018-02-01/generated/azure_mgmt_web/models/public_certificate.rb +106 -0
  284. data/lib/2018-02-01/generated/azure_mgmt_web/models/public_certificate_collection.rb +99 -0
  285. data/lib/2018-02-01/generated/azure_mgmt_web/models/public_certificate_location.rb +17 -0
  286. data/lib/2018-02-01/generated/azure_mgmt_web/models/publishing_profile_format.rb +17 -0
  287. data/lib/2018-02-01/generated/azure_mgmt_web/models/push_settings.rb +123 -0
  288. data/lib/2018-02-01/generated/azure_mgmt_web/models/ramp_up_rule.rb +141 -0
  289. data/lib/2018-02-01/generated/azure_mgmt_web/models/recommendation.rb +360 -0
  290. data/lib/2018-02-01/generated/azure_mgmt_web/models/recommendation_collection.rb +99 -0
  291. data/lib/2018-02-01/generated/azure_mgmt_web/models/recommendation_rule.rb +237 -0
  292. data/lib/2018-02-01/generated/azure_mgmt_web/models/reissue_certificate_order_request.rb +116 -0
  293. data/lib/2018-02-01/generated/azure_mgmt_web/models/relay_service_connection_entity.rb +147 -0
  294. data/lib/2018-02-01/generated/azure_mgmt_web/models/rendering.rb +71 -0
  295. data/lib/2018-02-01/generated/azure_mgmt_web/models/rendering_type.rb +18 -0
  296. data/lib/2018-02-01/generated/azure_mgmt_web/models/renew_certificate_order_request.rb +104 -0
  297. data/lib/2018-02-01/generated/azure_mgmt_web/models/requests_based_trigger.rb +57 -0
  298. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource.rb +112 -0
  299. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_collection.rb +98 -0
  300. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric.rb +163 -0
  301. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric_availability.rb +59 -0
  302. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric_collection.rb +99 -0
  303. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric_definition.rb +148 -0
  304. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric_definition_collection.rb +99 -0
  305. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric_name.rb +59 -0
  306. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric_property.rb +57 -0
  307. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric_value.rb +129 -0
  308. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_name_availability.rb +78 -0
  309. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_name_availability_request.rb +71 -0
  310. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_scope_type.rb +17 -0
  311. data/lib/2018-02-01/generated/azure_mgmt_web/models/response_meta_data.rb +48 -0
  312. data/lib/2018-02-01/generated/azure_mgmt_web/models/restore_request.rb +217 -0
  313. data/lib/2018-02-01/generated/azure_mgmt_web/models/route_type.rb +17 -0
  314. data/lib/2018-02-01/generated/azure_mgmt_web/models/scm_type.rb +27 -0
  315. data/lib/2018-02-01/generated/azure_mgmt_web/models/service_specification.rb +76 -0
  316. data/lib/2018-02-01/generated/azure_mgmt_web/models/site.rb +554 -0
  317. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_auth_settings.rb +477 -0
  318. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_availability_state.rb +17 -0
  319. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_cloneability.rb +113 -0
  320. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_cloneability_criterion.rb +57 -0
  321. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_config.rb +676 -0
  322. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_config_resource.rb +711 -0
  323. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_config_resource_collection.rb +99 -0
  324. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_configuration_snapshot_info.rb +94 -0
  325. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_configuration_snapshot_info_collection.rb +101 -0
  326. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_extension_info.rb +301 -0
  327. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_extension_info_collection.rb +99 -0
  328. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_extension_type.rb +16 -0
  329. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_instance.rb +82 -0
  330. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_limits.rb +68 -0
  331. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_load_balancing.rb +19 -0
  332. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_logs_config.rb +118 -0
  333. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_machine_key.rb +79 -0
  334. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_patch_resource.rb +518 -0
  335. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_php_error_log_flag.rb +114 -0
  336. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_seal.rb +46 -0
  337. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_seal_request.rb +58 -0
  338. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_source_control.rb +129 -0
  339. data/lib/2018-02-01/generated/azure_mgmt_web/models/sku_capacity.rb +83 -0
  340. data/lib/2018-02-01/generated/azure_mgmt_web/models/sku_description.rb +142 -0
  341. data/lib/2018-02-01/generated/azure_mgmt_web/models/sku_info.rb +70 -0
  342. data/lib/2018-02-01/generated/azure_mgmt_web/models/sku_info_collection.rb +99 -0
  343. data/lib/2018-02-01/generated/azure_mgmt_web/models/sku_infos.rb +67 -0
  344. data/lib/2018-02-01/generated/azure_mgmt_web/models/sku_name.rb +22 -0
  345. data/lib/2018-02-01/generated/azure_mgmt_web/models/slot_config_names_resource.rb +108 -0
  346. data/lib/2018-02-01/generated/azure_mgmt_web/models/slot_difference.rb +157 -0
  347. data/lib/2018-02-01/generated/azure_mgmt_web/models/slot_difference_collection.rb +99 -0
  348. data/lib/2018-02-01/generated/azure_mgmt_web/models/slot_swap_status.rb +71 -0
  349. data/lib/2018-02-01/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb +68 -0
  350. data/lib/2018-02-01/generated/azure_mgmt_web/models/snapshot.rb +82 -0
  351. data/lib/2018-02-01/generated/azure_mgmt_web/models/snapshot_collection.rb +100 -0
  352. data/lib/2018-02-01/generated/azure_mgmt_web/models/snapshot_recovery_source.rb +62 -0
  353. data/lib/2018-02-01/generated/azure_mgmt_web/models/snapshot_restore_request.rb +133 -0
  354. data/lib/2018-02-01/generated/azure_mgmt_web/models/solution.rb +148 -0
  355. data/lib/2018-02-01/generated/azure_mgmt_web/models/solution_type.rb +17 -0
  356. data/lib/2018-02-01/generated/azure_mgmt_web/models/source_control.rb +114 -0
  357. data/lib/2018-02-01/generated/azure_mgmt_web/models/source_control_collection.rb +99 -0
  358. data/lib/2018-02-01/generated/azure_mgmt_web/models/ssl_state.rb +17 -0
  359. data/lib/2018-02-01/generated/azure_mgmt_web/models/stack_major_version.rb +90 -0
  360. data/lib/2018-02-01/generated/azure_mgmt_web/models/stack_minor_version.rb +69 -0
  361. data/lib/2018-02-01/generated/azure_mgmt_web/models/stamp_capacity.rb +167 -0
  362. data/lib/2018-02-01/generated/azure_mgmt_web/models/stamp_capacity_collection.rb +99 -0
  363. data/lib/2018-02-01/generated/azure_mgmt_web/models/status_codes_based_trigger.rb +90 -0
  364. data/lib/2018-02-01/generated/azure_mgmt_web/models/status_options.rb +17 -0
  365. data/lib/2018-02-01/generated/azure_mgmt_web/models/storage_migration_options.rb +119 -0
  366. data/lib/2018-02-01/generated/azure_mgmt_web/models/storage_migration_response.rb +83 -0
  367. data/lib/2018-02-01/generated/azure_mgmt_web/models/string_dictionary.rb +89 -0
  368. data/lib/2018-02-01/generated/azure_mgmt_web/models/supported_tls_versions.rb +17 -0
  369. data/lib/2018-02-01/generated/azure_mgmt_web/models/swift_virtual_network.rb +96 -0
  370. data/lib/2018-02-01/generated/azure_mgmt_web/models/tld_legal_agreement.rb +79 -0
  371. data/lib/2018-02-01/generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb +99 -0
  372. data/lib/2018-02-01/generated/azure_mgmt_web/models/top_level_domain.rb +82 -0
  373. data/lib/2018-02-01/generated/azure_mgmt_web/models/top_level_domain_agreement_option.rb +61 -0
  374. data/lib/2018-02-01/generated/azure_mgmt_web/models/top_level_domain_collection.rb +99 -0
  375. data/lib/2018-02-01/generated/azure_mgmt_web/models/triggered_job_history.rb +91 -0
  376. data/lib/2018-02-01/generated/azure_mgmt_web/models/triggered_job_history_collection.rb +99 -0
  377. data/lib/2018-02-01/generated/azure_mgmt_web/models/triggered_job_run.rb +193 -0
  378. data/lib/2018-02-01/generated/azure_mgmt_web/models/triggered_web_job.rb +191 -0
  379. data/lib/2018-02-01/generated/azure_mgmt_web/models/triggered_web_job_collection.rb +99 -0
  380. data/lib/2018-02-01/generated/azure_mgmt_web/models/triggered_web_job_status.rb +17 -0
  381. data/lib/2018-02-01/generated/azure_mgmt_web/models/unauthenticated_client_action.rb +16 -0
  382. data/lib/2018-02-01/generated/azure_mgmt_web/models/usage.rb +168 -0
  383. data/lib/2018-02-01/generated/azure_mgmt_web/models/usage_collection.rb +99 -0
  384. data/lib/2018-02-01/generated/azure_mgmt_web/models/usage_state.rb +16 -0
  385. data/lib/2018-02-01/generated/azure_mgmt_web/models/user.rb +125 -0
  386. data/lib/2018-02-01/generated/azure_mgmt_web/models/validate_request.rb +155 -0
  387. data/lib/2018-02-01/generated/azure_mgmt_web/models/validate_resource_types.rb +16 -0
  388. data/lib/2018-02-01/generated/azure_mgmt_web/models/validate_response.rb +59 -0
  389. data/lib/2018-02-01/generated/azure_mgmt_web/models/validate_response_error.rb +57 -0
  390. data/lib/2018-02-01/generated/azure_mgmt_web/models/virtual_application.rb +90 -0
  391. data/lib/2018-02-01/generated/azure_mgmt_web/models/virtual_directory.rb +57 -0
  392. data/lib/2018-02-01/generated/azure_mgmt_web/models/virtual_ipmapping.rb +79 -0
  393. data/lib/2018-02-01/generated/azure_mgmt_web/models/virtual_network_profile.rb +81 -0
  394. data/lib/2018-02-01/generated/azure_mgmt_web/models/vnet_gateway.rb +93 -0
  395. data/lib/2018-02-01/generated/azure_mgmt_web/models/vnet_info.rb +153 -0
  396. data/lib/2018-02-01/generated/azure_mgmt_web/models/vnet_parameters.rb +103 -0
  397. data/lib/2018-02-01/generated/azure_mgmt_web/models/vnet_route.rb +115 -0
  398. data/lib/2018-02-01/generated/azure_mgmt_web/models/vnet_validation_failure_details.rb +102 -0
  399. data/lib/2018-02-01/generated/azure_mgmt_web/models/vnet_validation_test_failure.rb +93 -0
  400. data/lib/2018-02-01/generated/azure_mgmt_web/models/web_app_collection.rb +99 -0
  401. data/lib/2018-02-01/generated/azure_mgmt_web/models/web_app_instance_collection.rb +99 -0
  402. data/lib/2018-02-01/generated/azure_mgmt_web/models/web_job.rb +157 -0
  403. data/lib/2018-02-01/generated/azure_mgmt_web/models/web_job_collection.rb +99 -0
  404. data/lib/2018-02-01/generated/azure_mgmt_web/models/web_job_type.rb +16 -0
  405. data/lib/2018-02-01/generated/azure_mgmt_web/models/worker_pool.rb +102 -0
  406. data/lib/2018-02-01/generated/azure_mgmt_web/models/worker_pool_collection.rb +99 -0
  407. data/lib/2018-02-01/generated/azure_mgmt_web/models/worker_pool_resource.rb +149 -0
  408. data/lib/2018-02-01/generated/azure_mgmt_web/models/worker_size_options.rb +21 -0
  409. data/lib/2018-02-01/generated/azure_mgmt_web/module_definition.rb +9 -0
  410. data/lib/2018-02-01/generated/azure_mgmt_web/provider.rb +661 -0
  411. data/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb +1331 -0
  412. data/lib/2018-02-01/generated/azure_mgmt_web/top_level_domains.rb +566 -0
  413. data/lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb +45908 -0
  414. data/lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb +2701 -0
  415. data/lib/azure_mgmt_web.rb +3 -2
  416. data/lib/profiles/latest/modules/web_profile_module.rb +1045 -969
  417. data/lib/version.rb +1 -1
  418. metadata +382 -5
@@ -0,0 +1,231 @@
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::V2018_02_01
7
+ #
8
+ # WebSite Management Client
9
+ #
10
+ class DeletedWebApps
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the DeletedWebApps 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 all deleted apps for a subscription.
26
+ #
27
+ # Get all deleted apps for a subscription.
28
+ #
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [Array<DeletedSite>] operation results.
33
+ #
34
+ def list(custom_headers:nil)
35
+ first_page = list_as_lazy(custom_headers:custom_headers)
36
+ first_page.get_all_items
37
+ end
38
+
39
+ #
40
+ # Get all deleted apps for a subscription.
41
+ #
42
+ # Get all deleted apps for a subscription.
43
+ #
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_with_http_info(custom_headers:nil)
50
+ list_async(custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Get all deleted apps for a subscription.
55
+ #
56
+ # Get all deleted apps for a subscription.
57
+ #
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_async(custom_headers:nil)
64
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
65
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
66
+
67
+
68
+ request_headers = {}
69
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
70
+
71
+ # Set Headers
72
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
73
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
74
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'
75
+
76
+ request_url = @base_url || @client.base_url
77
+
78
+ options = {
79
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
80
+ path_params: {'subscriptionId' => @client.subscription_id},
81
+ query_params: {'api-version' => @client.api_version},
82
+ headers: request_headers.merge(custom_headers || {}),
83
+ base_url: request_url
84
+ }
85
+ promise = @client.make_request_async(:get, path_template, options)
86
+
87
+ promise = promise.then do |result|
88
+ http_response = result.response
89
+ status_code = http_response.status
90
+ response_content = http_response.body
91
+ unless status_code == 200
92
+ error_model = JSON.load(response_content)
93
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
94
+ end
95
+
96
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
97
+ # Deserialize Response
98
+ if status_code == 200
99
+ begin
100
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
101
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DeletedWebAppCollection.mapper()
102
+ result.body = @client.deserialize(result_mapper, parsed_response)
103
+ rescue Exception => e
104
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
105
+ end
106
+ end
107
+
108
+ result
109
+ end
110
+
111
+ promise.execute
112
+ end
113
+
114
+ #
115
+ # Get all deleted apps for a subscription.
116
+ #
117
+ # Get all deleted apps for a subscription.
118
+ #
119
+ # @param next_page_link [String] The NextLink from the previous successful call
120
+ # to List operation.
121
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
122
+ # will be added to the HTTP request.
123
+ #
124
+ # @return [DeletedWebAppCollection] operation results.
125
+ #
126
+ def list_next(next_page_link, custom_headers:nil)
127
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
128
+ response.body unless response.nil?
129
+ end
130
+
131
+ #
132
+ # Get all deleted apps for a subscription.
133
+ #
134
+ # Get all deleted apps for a subscription.
135
+ #
136
+ # @param next_page_link [String] The NextLink from the previous successful call
137
+ # to List operation.
138
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
139
+ # will be added to the HTTP request.
140
+ #
141
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
142
+ #
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!
145
+ end
146
+
147
+ #
148
+ # Get all deleted apps for a subscription.
149
+ #
150
+ # Get all deleted apps for a subscription.
151
+ #
152
+ # @param next_page_link [String] The NextLink from the previous successful call
153
+ # to List operation.
154
+ # @param [Hash{String => String}] A hash of custom headers that will be added
155
+ # to the HTTP request.
156
+ #
157
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
158
+ #
159
+ def list_next_async(next_page_link, custom_headers:nil)
160
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
161
+
162
+
163
+ request_headers = {}
164
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
165
+
166
+ # Set Headers
167
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
168
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
169
+ path_template = '{nextLink}'
170
+
171
+ request_url = @base_url || @client.base_url
172
+
173
+ options = {
174
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
175
+ skip_encoding_path_params: {'nextLink' => next_page_link},
176
+ headers: request_headers.merge(custom_headers || {}),
177
+ base_url: request_url
178
+ }
179
+ promise = @client.make_request_async(:get, path_template, options)
180
+
181
+ promise = promise.then do |result|
182
+ http_response = result.response
183
+ status_code = http_response.status
184
+ response_content = http_response.body
185
+ unless status_code == 200
186
+ error_model = JSON.load(response_content)
187
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
188
+ end
189
+
190
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
191
+ # Deserialize Response
192
+ if status_code == 200
193
+ begin
194
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
195
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DeletedWebAppCollection.mapper()
196
+ result.body = @client.deserialize(result_mapper, parsed_response)
197
+ rescue Exception => e
198
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
199
+ end
200
+ end
201
+
202
+ result
203
+ end
204
+
205
+ promise.execute
206
+ end
207
+
208
+ #
209
+ # Get all deleted apps for a subscription.
210
+ #
211
+ # Get all deleted apps for a subscription.
212
+ #
213
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
214
+ # will be added to the HTTP request.
215
+ #
216
+ # @return [DeletedWebAppCollection] which provide lazy access to pages of the
217
+ # response.
218
+ #
219
+ def list_as_lazy(custom_headers:nil)
220
+ response = list_async(custom_headers:custom_headers).value!
221
+ unless response.nil?
222
+ page = response.body
223
+ page.next_method = Proc.new do |next_page_link|
224
+ list_next_async(next_page_link, custom_headers:custom_headers)
225
+ end
226
+ page
227
+ end
228
+ end
229
+
230
+ end
231
+ end
@@ -0,0 +1,3845 @@
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::V2018_02_01
7
+ #
8
+ # WebSite Management Client
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
+ # List Hosting Environment Detector Responses
26
+ #
27
+ # List Hosting Environment Detector Responses
28
+ #
29
+ # @param resource_group_name [String] Name of the resource group to which the
30
+ # resource belongs.
31
+ # @param 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<DetectorResponse>] operation results.
36
+ #
37
+ def list_hosting_environment_detector_responses(resource_group_name, name, custom_headers:nil)
38
+ first_page = list_hosting_environment_detector_responses_as_lazy(resource_group_name, name, custom_headers:custom_headers)
39
+ first_page.get_all_items
40
+ end
41
+
42
+ #
43
+ # List Hosting Environment Detector Responses
44
+ #
45
+ # List Hosting Environment Detector Responses
46
+ #
47
+ # @param resource_group_name [String] Name of the resource group to which the
48
+ # resource belongs.
49
+ # @param 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_hosting_environment_detector_responses_with_http_info(resource_group_name, name, custom_headers:nil)
56
+ list_hosting_environment_detector_responses_async(resource_group_name, name, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # List Hosting Environment Detector Responses
61
+ #
62
+ # List Hosting Environment Detector Responses
63
+ #
64
+ # @param resource_group_name [String] Name of the resource group to which the
65
+ # resource belongs.
66
+ # @param 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_hosting_environment_detector_responses_async(resource_group_name, 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, 'name is nil' if 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/hostingEnvironments/{name}/detectors'
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,'name' => 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 MsRest::HttpOperationError.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::V2018_02_01::Models::DetectorResponseCollection.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 Hosting Environment Detector Response
130
+ #
131
+ # Get Hosting Environment Detector Response
132
+ #
133
+ # @param resource_group_name [String] Name of the resource group to which the
134
+ # resource belongs.
135
+ # @param name [String] App Service Environment Name
136
+ # @param detector_name [String] Detector Resource Name
137
+ # @param start_time [DateTime] Start Time
138
+ # @param end_time [DateTime] End Time
139
+ # @param time_grain [String] Time Grain
140
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
141
+ # will be added to the HTTP request.
142
+ #
143
+ # @return [DetectorResponse] operation results.
144
+ #
145
+ def get_hosting_environment_detector_response(resource_group_name, name, detector_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
146
+ response = get_hosting_environment_detector_response_async(resource_group_name, name, detector_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value!
147
+ response.body unless response.nil?
148
+ end
149
+
150
+ #
151
+ # Get Hosting Environment Detector Response
152
+ #
153
+ # Get Hosting Environment Detector Response
154
+ #
155
+ # @param resource_group_name [String] Name of the resource group to which the
156
+ # resource belongs.
157
+ # @param name [String] App Service Environment Name
158
+ # @param detector_name [String] Detector Resource Name
159
+ # @param start_time [DateTime] Start Time
160
+ # @param end_time [DateTime] End Time
161
+ # @param time_grain [String] Time Grain
162
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
163
+ # will be added to the HTTP request.
164
+ #
165
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
166
+ #
167
+ def get_hosting_environment_detector_response_with_http_info(resource_group_name, name, detector_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
168
+ get_hosting_environment_detector_response_async(resource_group_name, name, detector_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value!
169
+ end
170
+
171
+ #
172
+ # Get Hosting Environment Detector Response
173
+ #
174
+ # Get Hosting Environment Detector Response
175
+ #
176
+ # @param resource_group_name [String] Name of the resource group to which the
177
+ # resource belongs.
178
+ # @param name [String] App Service Environment Name
179
+ # @param detector_name [String] Detector Resource Name
180
+ # @param start_time [DateTime] Start Time
181
+ # @param end_time [DateTime] End Time
182
+ # @param time_grain [String] Time Grain
183
+ # @param [Hash{String => String}] A hash of custom headers that will be added
184
+ # to the HTTP request.
185
+ #
186
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
187
+ #
188
+ def get_hosting_environment_detector_response_async(resource_group_name, name, detector_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
189
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
190
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
191
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
192
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
193
+ fail ArgumentError, 'name is nil' if name.nil?
194
+ fail ArgumentError, 'detector_name is nil' if detector_name.nil?
195
+ 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?
196
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
197
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
198
+
199
+
200
+ request_headers = {}
201
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
202
+
203
+ # Set Headers
204
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
205
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
206
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'
207
+
208
+ request_url = @base_url || @client.base_url
209
+
210
+ options = {
211
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
212
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'detectorName' => detector_name,'subscriptionId' => @client.subscription_id},
213
+ query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'api-version' => @client.api_version},
214
+ headers: request_headers.merge(custom_headers || {}),
215
+ base_url: request_url
216
+ }
217
+ promise = @client.make_request_async(:get, path_template, options)
218
+
219
+ promise = promise.then do |result|
220
+ http_response = result.response
221
+ status_code = http_response.status
222
+ response_content = http_response.body
223
+ unless status_code == 200
224
+ error_model = JSON.load(response_content)
225
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
226
+ end
227
+
228
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
229
+ # Deserialize Response
230
+ if status_code == 200
231
+ begin
232
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
233
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DetectorResponse.mapper()
234
+ result.body = @client.deserialize(result_mapper, parsed_response)
235
+ rescue Exception => e
236
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
237
+ end
238
+ end
239
+
240
+ result
241
+ end
242
+
243
+ promise.execute
244
+ end
245
+
246
+ #
247
+ # List Site Detector Responses
248
+ #
249
+ # List Site Detector Responses
250
+ #
251
+ # @param resource_group_name [String] Name of the resource group to which the
252
+ # resource belongs.
253
+ # @param site_name [String] Site Name
254
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
255
+ # will be added to the HTTP request.
256
+ #
257
+ # @return [Array<DetectorResponse>] operation results.
258
+ #
259
+ def list_site_detector_responses(resource_group_name, site_name, custom_headers:nil)
260
+ first_page = list_site_detector_responses_as_lazy(resource_group_name, site_name, custom_headers:custom_headers)
261
+ first_page.get_all_items
262
+ end
263
+
264
+ #
265
+ # List Site Detector Responses
266
+ #
267
+ # List Site Detector Responses
268
+ #
269
+ # @param resource_group_name [String] Name of the resource group to which the
270
+ # resource belongs.
271
+ # @param site_name [String] Site Name
272
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
273
+ # will be added to the HTTP request.
274
+ #
275
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
276
+ #
277
+ def list_site_detector_responses_with_http_info(resource_group_name, site_name, custom_headers:nil)
278
+ list_site_detector_responses_async(resource_group_name, site_name, custom_headers:custom_headers).value!
279
+ end
280
+
281
+ #
282
+ # List Site Detector Responses
283
+ #
284
+ # List Site Detector Responses
285
+ #
286
+ # @param resource_group_name [String] Name of the resource group to which the
287
+ # resource belongs.
288
+ # @param site_name [String] Site Name
289
+ # @param [Hash{String => String}] A hash of custom headers that will be added
290
+ # to the HTTP request.
291
+ #
292
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
293
+ #
294
+ def list_site_detector_responses_async(resource_group_name, site_name, custom_headers:nil)
295
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
296
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
297
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
298
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
299
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
300
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
301
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
302
+
303
+
304
+ request_headers = {}
305
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
306
+
307
+ # Set Headers
308
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
309
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
310
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'
311
+
312
+ request_url = @base_url || @client.base_url
313
+
314
+ options = {
315
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
316
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'subscriptionId' => @client.subscription_id},
317
+ query_params: {'api-version' => @client.api_version},
318
+ headers: request_headers.merge(custom_headers || {}),
319
+ base_url: request_url
320
+ }
321
+ promise = @client.make_request_async(:get, path_template, options)
322
+
323
+ promise = promise.then do |result|
324
+ http_response = result.response
325
+ status_code = http_response.status
326
+ response_content = http_response.body
327
+ unless status_code == 200
328
+ error_model = JSON.load(response_content)
329
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
330
+ end
331
+
332
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
333
+ # Deserialize Response
334
+ if status_code == 200
335
+ begin
336
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
337
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DetectorResponseCollection.mapper()
338
+ result.body = @client.deserialize(result_mapper, parsed_response)
339
+ rescue Exception => e
340
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
341
+ end
342
+ end
343
+
344
+ result
345
+ end
346
+
347
+ promise.execute
348
+ end
349
+
350
+ #
351
+ # Get site detector response
352
+ #
353
+ # Get site detector response
354
+ #
355
+ # @param resource_group_name [String] Name of the resource group to which the
356
+ # resource belongs.
357
+ # @param site_name [String] Site Name
358
+ # @param detector_name [String] Detector Resource Name
359
+ # @param start_time [DateTime] Start Time
360
+ # @param end_time [DateTime] End Time
361
+ # @param time_grain [String] Time Grain
362
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
363
+ # will be added to the HTTP request.
364
+ #
365
+ # @return [DetectorResponse] operation results.
366
+ #
367
+ def get_site_detector_response(resource_group_name, site_name, detector_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
368
+ response = get_site_detector_response_async(resource_group_name, site_name, detector_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value!
369
+ response.body unless response.nil?
370
+ end
371
+
372
+ #
373
+ # Get site detector response
374
+ #
375
+ # Get site detector response
376
+ #
377
+ # @param resource_group_name [String] Name of the resource group to which the
378
+ # resource belongs.
379
+ # @param site_name [String] Site Name
380
+ # @param detector_name [String] Detector Resource Name
381
+ # @param start_time [DateTime] Start Time
382
+ # @param end_time [DateTime] End Time
383
+ # @param time_grain [String] Time Grain
384
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
385
+ # will be added to the HTTP request.
386
+ #
387
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
388
+ #
389
+ def get_site_detector_response_with_http_info(resource_group_name, site_name, detector_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
390
+ get_site_detector_response_async(resource_group_name, site_name, detector_name, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value!
391
+ end
392
+
393
+ #
394
+ # Get site detector response
395
+ #
396
+ # Get site detector response
397
+ #
398
+ # @param resource_group_name [String] Name of the resource group to which the
399
+ # resource belongs.
400
+ # @param site_name [String] Site Name
401
+ # @param detector_name [String] Detector Resource Name
402
+ # @param start_time [DateTime] Start Time
403
+ # @param end_time [DateTime] End Time
404
+ # @param time_grain [String] Time Grain
405
+ # @param [Hash{String => String}] A hash of custom headers that will be added
406
+ # to the HTTP request.
407
+ #
408
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
409
+ #
410
+ def get_site_detector_response_async(resource_group_name, site_name, detector_name, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
411
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
412
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
413
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
414
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
415
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
416
+ fail ArgumentError, 'detector_name is nil' if detector_name.nil?
417
+ 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?
418
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
419
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
420
+
421
+
422
+ request_headers = {}
423
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
424
+
425
+ # Set Headers
426
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
427
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
428
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'
429
+
430
+ request_url = @base_url || @client.base_url
431
+
432
+ options = {
433
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
434
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'detectorName' => detector_name,'subscriptionId' => @client.subscription_id},
435
+ query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'api-version' => @client.api_version},
436
+ headers: request_headers.merge(custom_headers || {}),
437
+ base_url: request_url
438
+ }
439
+ promise = @client.make_request_async(:get, path_template, options)
440
+
441
+ promise = promise.then do |result|
442
+ http_response = result.response
443
+ status_code = http_response.status
444
+ response_content = http_response.body
445
+ unless status_code == 200
446
+ error_model = JSON.load(response_content)
447
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
448
+ end
449
+
450
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
451
+ # Deserialize Response
452
+ if status_code == 200
453
+ begin
454
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
455
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DetectorResponse.mapper()
456
+ result.body = @client.deserialize(result_mapper, parsed_response)
457
+ rescue Exception => e
458
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
459
+ end
460
+ end
461
+
462
+ result
463
+ end
464
+
465
+ promise.execute
466
+ end
467
+
468
+ #
469
+ # Get Diagnostics Categories
470
+ #
471
+ # Get Diagnostics Categories
472
+ #
473
+ # @param resource_group_name [String] Name of the resource group to which the
474
+ # resource belongs.
475
+ # @param site_name [String] Site Name
476
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
477
+ # will be added to the HTTP request.
478
+ #
479
+ # @return [Array<DiagnosticCategory>] operation results.
480
+ #
481
+ def list_site_diagnostic_categories(resource_group_name, site_name, custom_headers:nil)
482
+ first_page = list_site_diagnostic_categories_as_lazy(resource_group_name, site_name, custom_headers:custom_headers)
483
+ first_page.get_all_items
484
+ end
485
+
486
+ #
487
+ # Get Diagnostics Categories
488
+ #
489
+ # Get Diagnostics Categories
490
+ #
491
+ # @param resource_group_name [String] Name of the resource group to which the
492
+ # resource belongs.
493
+ # @param site_name [String] Site Name
494
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
495
+ # will be added to the HTTP request.
496
+ #
497
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
498
+ #
499
+ def list_site_diagnostic_categories_with_http_info(resource_group_name, site_name, custom_headers:nil)
500
+ list_site_diagnostic_categories_async(resource_group_name, site_name, custom_headers:custom_headers).value!
501
+ end
502
+
503
+ #
504
+ # Get Diagnostics Categories
505
+ #
506
+ # Get Diagnostics Categories
507
+ #
508
+ # @param resource_group_name [String] Name of the resource group to which the
509
+ # resource belongs.
510
+ # @param site_name [String] Site Name
511
+ # @param [Hash{String => String}] A hash of custom headers that will be added
512
+ # to the HTTP request.
513
+ #
514
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
515
+ #
516
+ def list_site_diagnostic_categories_async(resource_group_name, site_name, custom_headers:nil)
517
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
518
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
519
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
520
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
521
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
522
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
523
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
524
+
525
+
526
+ request_headers = {}
527
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
528
+
529
+ # Set Headers
530
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
531
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
532
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'
533
+
534
+ request_url = @base_url || @client.base_url
535
+
536
+ options = {
537
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
538
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'subscriptionId' => @client.subscription_id},
539
+ query_params: {'api-version' => @client.api_version},
540
+ headers: request_headers.merge(custom_headers || {}),
541
+ base_url: request_url
542
+ }
543
+ promise = @client.make_request_async(:get, path_template, options)
544
+
545
+ promise = promise.then do |result|
546
+ http_response = result.response
547
+ status_code = http_response.status
548
+ response_content = http_response.body
549
+ unless status_code == 200
550
+ error_model = JSON.load(response_content)
551
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
552
+ end
553
+
554
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
555
+ # Deserialize Response
556
+ if status_code == 200
557
+ begin
558
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
559
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticCategoryCollection.mapper()
560
+ result.body = @client.deserialize(result_mapper, parsed_response)
561
+ rescue Exception => e
562
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
563
+ end
564
+ end
565
+
566
+ result
567
+ end
568
+
569
+ promise.execute
570
+ end
571
+
572
+ #
573
+ # Get Diagnostics Category
574
+ #
575
+ # Get Diagnostics Category
576
+ #
577
+ # @param resource_group_name [String] Name of the resource group to which the
578
+ # resource belongs.
579
+ # @param site_name [String] Site Name
580
+ # @param diagnostic_category [String] Diagnostic Category
581
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
582
+ # will be added to the HTTP request.
583
+ #
584
+ # @return [DiagnosticCategory] operation results.
585
+ #
586
+ def get_site_diagnostic_category(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
587
+ response = get_site_diagnostic_category_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value!
588
+ response.body unless response.nil?
589
+ end
590
+
591
+ #
592
+ # Get Diagnostics Category
593
+ #
594
+ # Get Diagnostics Category
595
+ #
596
+ # @param resource_group_name [String] Name of the resource group to which the
597
+ # resource belongs.
598
+ # @param site_name [String] Site Name
599
+ # @param diagnostic_category [String] Diagnostic Category
600
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
601
+ # will be added to the HTTP request.
602
+ #
603
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
604
+ #
605
+ def get_site_diagnostic_category_with_http_info(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
606
+ get_site_diagnostic_category_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value!
607
+ end
608
+
609
+ #
610
+ # Get Diagnostics Category
611
+ #
612
+ # Get Diagnostics Category
613
+ #
614
+ # @param resource_group_name [String] Name of the resource group to which the
615
+ # resource belongs.
616
+ # @param site_name [String] Site Name
617
+ # @param diagnostic_category [String] Diagnostic Category
618
+ # @param [Hash{String => String}] A hash of custom headers that will be added
619
+ # to the HTTP request.
620
+ #
621
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
622
+ #
623
+ def get_site_diagnostic_category_async(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
624
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
625
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
626
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
627
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
628
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
629
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
630
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
631
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
632
+
633
+
634
+ request_headers = {}
635
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
636
+
637
+ # Set Headers
638
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
639
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
640
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'
641
+
642
+ request_url = @base_url || @client.base_url
643
+
644
+ options = {
645
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
646
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'subscriptionId' => @client.subscription_id},
647
+ query_params: {'api-version' => @client.api_version},
648
+ headers: request_headers.merge(custom_headers || {}),
649
+ base_url: request_url
650
+ }
651
+ promise = @client.make_request_async(:get, path_template, options)
652
+
653
+ promise = promise.then do |result|
654
+ http_response = result.response
655
+ status_code = http_response.status
656
+ response_content = http_response.body
657
+ unless status_code == 200
658
+ error_model = JSON.load(response_content)
659
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
660
+ end
661
+
662
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
663
+ # Deserialize Response
664
+ if status_code == 200
665
+ begin
666
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
667
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticCategory.mapper()
668
+ result.body = @client.deserialize(result_mapper, parsed_response)
669
+ rescue Exception => e
670
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
671
+ end
672
+ end
673
+
674
+ result
675
+ end
676
+
677
+ promise.execute
678
+ end
679
+
680
+ #
681
+ # Get Site Analyses
682
+ #
683
+ # Get Site Analyses
684
+ #
685
+ # @param resource_group_name [String] Name of the resource group to which the
686
+ # resource belongs.
687
+ # @param site_name [String] Site Name
688
+ # @param diagnostic_category [String] Diagnostic Category
689
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
690
+ # will be added to the HTTP request.
691
+ #
692
+ # @return [Array<AnalysisDefinition>] operation results.
693
+ #
694
+ def list_site_analyses(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
695
+ first_page = list_site_analyses_as_lazy(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers)
696
+ first_page.get_all_items
697
+ end
698
+
699
+ #
700
+ # Get Site Analyses
701
+ #
702
+ # Get Site Analyses
703
+ #
704
+ # @param resource_group_name [String] Name of the resource group to which the
705
+ # resource belongs.
706
+ # @param site_name [String] Site Name
707
+ # @param diagnostic_category [String] Diagnostic Category
708
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
709
+ # will be added to the HTTP request.
710
+ #
711
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
712
+ #
713
+ def list_site_analyses_with_http_info(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
714
+ list_site_analyses_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value!
715
+ end
716
+
717
+ #
718
+ # Get Site Analyses
719
+ #
720
+ # Get Site Analyses
721
+ #
722
+ # @param resource_group_name [String] Name of the resource group to which the
723
+ # resource belongs.
724
+ # @param site_name [String] Site Name
725
+ # @param diagnostic_category [String] Diagnostic Category
726
+ # @param [Hash{String => String}] A hash of custom headers that will be added
727
+ # to the HTTP request.
728
+ #
729
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
730
+ #
731
+ def list_site_analyses_async(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
732
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
733
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
734
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
735
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
736
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
737
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
738
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
739
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
740
+
741
+
742
+ request_headers = {}
743
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
744
+
745
+ # Set Headers
746
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
747
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
748
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'
749
+
750
+ request_url = @base_url || @client.base_url
751
+
752
+ options = {
753
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
754
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'subscriptionId' => @client.subscription_id},
755
+ query_params: {'api-version' => @client.api_version},
756
+ headers: request_headers.merge(custom_headers || {}),
757
+ base_url: request_url
758
+ }
759
+ promise = @client.make_request_async(:get, path_template, options)
760
+
761
+ promise = promise.then do |result|
762
+ http_response = result.response
763
+ status_code = http_response.status
764
+ response_content = http_response.body
765
+ unless status_code == 200
766
+ error_model = JSON.load(response_content)
767
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
768
+ end
769
+
770
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
771
+ # Deserialize Response
772
+ if status_code == 200
773
+ begin
774
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
775
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticAnalysisCollection.mapper()
776
+ result.body = @client.deserialize(result_mapper, parsed_response)
777
+ rescue Exception => e
778
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
779
+ end
780
+ end
781
+
782
+ result
783
+ end
784
+
785
+ promise.execute
786
+ end
787
+
788
+ #
789
+ # Get Site Analysis
790
+ #
791
+ # Get Site Analysis
792
+ #
793
+ # @param resource_group_name [String] Name of the resource group to which the
794
+ # resource belongs.
795
+ # @param site_name [String] Site Name
796
+ # @param diagnostic_category [String] Diagnostic Category
797
+ # @param analysis_name [String] Analysis Name
798
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
799
+ # will be added to the HTTP request.
800
+ #
801
+ # @return [DiagnosticAnalysis] operation results.
802
+ #
803
+ def get_site_analysis(resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers:nil)
804
+ response = get_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers:custom_headers).value!
805
+ response.body unless response.nil?
806
+ end
807
+
808
+ #
809
+ # Get Site Analysis
810
+ #
811
+ # Get Site Analysis
812
+ #
813
+ # @param resource_group_name [String] Name of the resource group to which the
814
+ # resource belongs.
815
+ # @param site_name [String] Site Name
816
+ # @param diagnostic_category [String] Diagnostic Category
817
+ # @param analysis_name [String] Analysis Name
818
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
819
+ # will be added to the HTTP request.
820
+ #
821
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
822
+ #
823
+ def get_site_analysis_with_http_info(resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers:nil)
824
+ get_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers:custom_headers).value!
825
+ end
826
+
827
+ #
828
+ # Get Site Analysis
829
+ #
830
+ # Get Site Analysis
831
+ #
832
+ # @param resource_group_name [String] Name of the resource group to which the
833
+ # resource belongs.
834
+ # @param site_name [String] Site Name
835
+ # @param diagnostic_category [String] Diagnostic Category
836
+ # @param analysis_name [String] Analysis Name
837
+ # @param [Hash{String => String}] A hash of custom headers that will be added
838
+ # to the HTTP request.
839
+ #
840
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
841
+ #
842
+ def get_site_analysis_async(resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers:nil)
843
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
844
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
845
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
846
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
847
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
848
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
849
+ fail ArgumentError, 'analysis_name is nil' if analysis_name.nil?
850
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
851
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
852
+
853
+
854
+ request_headers = {}
855
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
856
+
857
+ # Set Headers
858
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
859
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
860
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'
861
+
862
+ request_url = @base_url || @client.base_url
863
+
864
+ options = {
865
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
866
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'analysisName' => analysis_name,'subscriptionId' => @client.subscription_id},
867
+ query_params: {'api-version' => @client.api_version},
868
+ headers: request_headers.merge(custom_headers || {}),
869
+ base_url: request_url
870
+ }
871
+ promise = @client.make_request_async(:get, path_template, options)
872
+
873
+ promise = promise.then do |result|
874
+ http_response = result.response
875
+ status_code = http_response.status
876
+ response_content = http_response.body
877
+ unless status_code == 200
878
+ error_model = JSON.load(response_content)
879
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
880
+ end
881
+
882
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
883
+ # Deserialize Response
884
+ if status_code == 200
885
+ begin
886
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
887
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticAnalysis.mapper()
888
+ result.body = @client.deserialize(result_mapper, parsed_response)
889
+ rescue Exception => e
890
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
891
+ end
892
+ end
893
+
894
+ result
895
+ end
896
+
897
+ promise.execute
898
+ end
899
+
900
+ #
901
+ # Execute Analysis
902
+ #
903
+ # Execute Analysis
904
+ #
905
+ # @param resource_group_name [String] Name of the resource group to which the
906
+ # resource belongs.
907
+ # @param site_name [String] Site Name
908
+ # @param diagnostic_category [String] Category Name
909
+ # @param analysis_name [String] Analysis Resource Name
910
+ # @param start_time [DateTime] Start Time
911
+ # @param end_time [DateTime] End Time
912
+ # @param time_grain [String] Time Grain
913
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
914
+ # will be added to the HTTP request.
915
+ #
916
+ # @return [DiagnosticAnalysis] operation results.
917
+ #
918
+ 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)
919
+ 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!
920
+ response.body unless response.nil?
921
+ end
922
+
923
+ #
924
+ # Execute Analysis
925
+ #
926
+ # Execute Analysis
927
+ #
928
+ # @param resource_group_name [String] Name of the resource group to which the
929
+ # resource belongs.
930
+ # @param site_name [String] Site Name
931
+ # @param diagnostic_category [String] Category Name
932
+ # @param analysis_name [String] Analysis Resource Name
933
+ # @param start_time [DateTime] Start Time
934
+ # @param end_time [DateTime] End Time
935
+ # @param time_grain [String] Time Grain
936
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
937
+ # will be added to the HTTP request.
938
+ #
939
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
940
+ #
941
+ 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)
942
+ 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!
943
+ end
944
+
945
+ #
946
+ # Execute Analysis
947
+ #
948
+ # Execute Analysis
949
+ #
950
+ # @param resource_group_name [String] Name of the resource group to which the
951
+ # resource belongs.
952
+ # @param site_name [String] Site Name
953
+ # @param diagnostic_category [String] Category Name
954
+ # @param analysis_name [String] Analysis Resource Name
955
+ # @param start_time [DateTime] Start Time
956
+ # @param end_time [DateTime] End Time
957
+ # @param time_grain [String] Time Grain
958
+ # @param [Hash{String => String}] A hash of custom headers that will be added
959
+ # to the HTTP request.
960
+ #
961
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
962
+ #
963
+ 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)
964
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
965
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
966
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
967
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
968
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
969
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
970
+ fail ArgumentError, 'analysis_name is nil' if analysis_name.nil?
971
+ 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?
972
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
973
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
974
+
975
+
976
+ request_headers = {}
977
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
978
+
979
+ # Set Headers
980
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
981
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
982
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'
983
+
984
+ request_url = @base_url || @client.base_url
985
+
986
+ options = {
987
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
988
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'analysisName' => analysis_name,'subscriptionId' => @client.subscription_id},
989
+ query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'api-version' => @client.api_version},
990
+ headers: request_headers.merge(custom_headers || {}),
991
+ base_url: request_url
992
+ }
993
+ promise = @client.make_request_async(:post, path_template, options)
994
+
995
+ promise = promise.then do |result|
996
+ http_response = result.response
997
+ status_code = http_response.status
998
+ response_content = http_response.body
999
+ unless status_code == 200
1000
+ error_model = JSON.load(response_content)
1001
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1002
+ end
1003
+
1004
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1005
+ # Deserialize Response
1006
+ if status_code == 200
1007
+ begin
1008
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1009
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticAnalysis.mapper()
1010
+ result.body = @client.deserialize(result_mapper, parsed_response)
1011
+ rescue Exception => e
1012
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1013
+ end
1014
+ end
1015
+
1016
+ result
1017
+ end
1018
+
1019
+ promise.execute
1020
+ end
1021
+
1022
+ #
1023
+ # Get Detectors
1024
+ #
1025
+ # Get Detectors
1026
+ #
1027
+ # @param resource_group_name [String] Name of the resource group to which the
1028
+ # resource belongs.
1029
+ # @param site_name [String] Site Name
1030
+ # @param diagnostic_category [String] Diagnostic Category
1031
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1032
+ # will be added to the HTTP request.
1033
+ #
1034
+ # @return [Array<DetectorDefinition>] operation results.
1035
+ #
1036
+ def list_site_detectors(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
1037
+ first_page = list_site_detectors_as_lazy(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers)
1038
+ first_page.get_all_items
1039
+ end
1040
+
1041
+ #
1042
+ # Get Detectors
1043
+ #
1044
+ # Get Detectors
1045
+ #
1046
+ # @param resource_group_name [String] Name of the resource group to which the
1047
+ # resource belongs.
1048
+ # @param site_name [String] Site Name
1049
+ # @param diagnostic_category [String] Diagnostic Category
1050
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1051
+ # will be added to the HTTP request.
1052
+ #
1053
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1054
+ #
1055
+ def list_site_detectors_with_http_info(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
1056
+ list_site_detectors_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value!
1057
+ end
1058
+
1059
+ #
1060
+ # Get Detectors
1061
+ #
1062
+ # Get Detectors
1063
+ #
1064
+ # @param resource_group_name [String] Name of the resource group to which the
1065
+ # resource belongs.
1066
+ # @param site_name [String] Site Name
1067
+ # @param diagnostic_category [String] Diagnostic Category
1068
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1069
+ # to the HTTP request.
1070
+ #
1071
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1072
+ #
1073
+ def list_site_detectors_async(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
1074
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1075
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1076
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1077
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1078
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1079
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
1080
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1081
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1082
+
1083
+
1084
+ request_headers = {}
1085
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1086
+
1087
+ # Set Headers
1088
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1089
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1090
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'
1091
+
1092
+ request_url = @base_url || @client.base_url
1093
+
1094
+ options = {
1095
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1096
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'subscriptionId' => @client.subscription_id},
1097
+ query_params: {'api-version' => @client.api_version},
1098
+ headers: request_headers.merge(custom_headers || {}),
1099
+ base_url: request_url
1100
+ }
1101
+ promise = @client.make_request_async(:get, path_template, options)
1102
+
1103
+ promise = promise.then do |result|
1104
+ http_response = result.response
1105
+ status_code = http_response.status
1106
+ response_content = http_response.body
1107
+ unless status_code == 200
1108
+ error_model = JSON.load(response_content)
1109
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1110
+ end
1111
+
1112
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1113
+ # Deserialize Response
1114
+ if status_code == 200
1115
+ begin
1116
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1117
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticDetectorCollection.mapper()
1118
+ result.body = @client.deserialize(result_mapper, parsed_response)
1119
+ rescue Exception => e
1120
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1121
+ end
1122
+ end
1123
+
1124
+ result
1125
+ end
1126
+
1127
+ promise.execute
1128
+ end
1129
+
1130
+ #
1131
+ # Get Detector
1132
+ #
1133
+ # Get Detector
1134
+ #
1135
+ # @param resource_group_name [String] Name of the resource group to which the
1136
+ # resource belongs.
1137
+ # @param site_name [String] Site Name
1138
+ # @param diagnostic_category [String] Diagnostic Category
1139
+ # @param detector_name [String] Detector Name
1140
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1141
+ # will be added to the HTTP request.
1142
+ #
1143
+ # @return [Array<DetectorDefinition>] operation results.
1144
+ #
1145
+ def get_site_detector(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:nil)
1146
+ first_page = get_site_detector_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:custom_headers)
1147
+ first_page.get_all_items
1148
+ end
1149
+
1150
+ #
1151
+ # Get Detector
1152
+ #
1153
+ # Get Detector
1154
+ #
1155
+ # @param resource_group_name [String] Name of the resource group to which the
1156
+ # resource belongs.
1157
+ # @param site_name [String] Site Name
1158
+ # @param diagnostic_category [String] Diagnostic Category
1159
+ # @param detector_name [String] Detector Name
1160
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1161
+ # will be added to the HTTP request.
1162
+ #
1163
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1164
+ #
1165
+ def get_site_detector_with_http_info(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:nil)
1166
+ get_site_detector_async(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:custom_headers).value!
1167
+ end
1168
+
1169
+ #
1170
+ # Get Detector
1171
+ #
1172
+ # Get Detector
1173
+ #
1174
+ # @param resource_group_name [String] Name of the resource group to which the
1175
+ # resource belongs.
1176
+ # @param site_name [String] Site Name
1177
+ # @param diagnostic_category [String] Diagnostic Category
1178
+ # @param detector_name [String] Detector Name
1179
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1180
+ # to the HTTP request.
1181
+ #
1182
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1183
+ #
1184
+ def get_site_detector_async(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:nil)
1185
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1186
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1187
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1188
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1189
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1190
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
1191
+ fail ArgumentError, 'detector_name is nil' if detector_name.nil?
1192
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1193
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1194
+
1195
+
1196
+ request_headers = {}
1197
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1198
+
1199
+ # Set Headers
1200
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1201
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1202
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'
1203
+
1204
+ request_url = @base_url || @client.base_url
1205
+
1206
+ options = {
1207
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1208
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'detectorName' => detector_name,'subscriptionId' => @client.subscription_id},
1209
+ query_params: {'api-version' => @client.api_version},
1210
+ headers: request_headers.merge(custom_headers || {}),
1211
+ base_url: request_url
1212
+ }
1213
+ promise = @client.make_request_async(:get, path_template, options)
1214
+
1215
+ promise = promise.then do |result|
1216
+ http_response = result.response
1217
+ status_code = http_response.status
1218
+ response_content = http_response.body
1219
+ unless status_code == 200
1220
+ error_model = JSON.load(response_content)
1221
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1222
+ end
1223
+
1224
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1225
+ # Deserialize Response
1226
+ if status_code == 200
1227
+ begin
1228
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1229
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticDetectorCollection.mapper()
1230
+ result.body = @client.deserialize(result_mapper, parsed_response)
1231
+ rescue Exception => e
1232
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1233
+ end
1234
+ end
1235
+
1236
+ result
1237
+ end
1238
+
1239
+ promise.execute
1240
+ end
1241
+
1242
+ #
1243
+ # Execute Detector
1244
+ #
1245
+ # Execute Detector
1246
+ #
1247
+ # @param resource_group_name [String] Name of the resource group to which the
1248
+ # resource belongs.
1249
+ # @param site_name [String] Site Name
1250
+ # @param detector_name [String] Detector Resource Name
1251
+ # @param diagnostic_category [String] Category Name
1252
+ # @param start_time [DateTime] Start Time
1253
+ # @param end_time [DateTime] End Time
1254
+ # @param time_grain [String] Time Grain
1255
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1256
+ # will be added to the HTTP request.
1257
+ #
1258
+ # @return [DiagnosticDetectorResponse] operation results.
1259
+ #
1260
+ 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)
1261
+ 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!
1262
+ response.body unless response.nil?
1263
+ end
1264
+
1265
+ #
1266
+ # Execute Detector
1267
+ #
1268
+ # Execute Detector
1269
+ #
1270
+ # @param resource_group_name [String] Name of the resource group to which the
1271
+ # resource belongs.
1272
+ # @param site_name [String] Site Name
1273
+ # @param detector_name [String] Detector Resource Name
1274
+ # @param diagnostic_category [String] Category Name
1275
+ # @param start_time [DateTime] Start Time
1276
+ # @param end_time [DateTime] End Time
1277
+ # @param time_grain [String] Time Grain
1278
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1279
+ # will be added to the HTTP request.
1280
+ #
1281
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1282
+ #
1283
+ 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)
1284
+ 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!
1285
+ end
1286
+
1287
+ #
1288
+ # Execute Detector
1289
+ #
1290
+ # Execute Detector
1291
+ #
1292
+ # @param resource_group_name [String] Name of the resource group to which the
1293
+ # resource belongs.
1294
+ # @param site_name [String] Site Name
1295
+ # @param detector_name [String] Detector Resource Name
1296
+ # @param diagnostic_category [String] Category Name
1297
+ # @param start_time [DateTime] Start Time
1298
+ # @param end_time [DateTime] End Time
1299
+ # @param time_grain [String] Time Grain
1300
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1301
+ # to the HTTP request.
1302
+ #
1303
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1304
+ #
1305
+ 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)
1306
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1307
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1308
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1309
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1310
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1311
+ fail ArgumentError, 'detector_name is nil' if detector_name.nil?
1312
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
1313
+ 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?
1314
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1315
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1316
+
1317
+
1318
+ request_headers = {}
1319
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1320
+
1321
+ # Set Headers
1322
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1323
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1324
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'
1325
+
1326
+ request_url = @base_url || @client.base_url
1327
+
1328
+ options = {
1329
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1330
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'detectorName' => detector_name,'diagnosticCategory' => diagnostic_category,'subscriptionId' => @client.subscription_id},
1331
+ query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'api-version' => @client.api_version},
1332
+ headers: request_headers.merge(custom_headers || {}),
1333
+ base_url: request_url
1334
+ }
1335
+ promise = @client.make_request_async(:post, path_template, options)
1336
+
1337
+ promise = promise.then do |result|
1338
+ http_response = result.response
1339
+ status_code = http_response.status
1340
+ response_content = http_response.body
1341
+ unless status_code == 200
1342
+ error_model = JSON.load(response_content)
1343
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1344
+ end
1345
+
1346
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1347
+ # Deserialize Response
1348
+ if status_code == 200
1349
+ begin
1350
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1351
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticDetectorResponse.mapper()
1352
+ result.body = @client.deserialize(result_mapper, parsed_response)
1353
+ rescue Exception => e
1354
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1355
+ end
1356
+ end
1357
+
1358
+ result
1359
+ end
1360
+
1361
+ promise.execute
1362
+ end
1363
+
1364
+ #
1365
+ # List Site Detector Responses
1366
+ #
1367
+ # List Site Detector Responses
1368
+ #
1369
+ # @param resource_group_name [String] Name of the resource group to which the
1370
+ # resource belongs.
1371
+ # @param site_name [String] Site Name
1372
+ # @param slot [String] Slot Name
1373
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1374
+ # will be added to the HTTP request.
1375
+ #
1376
+ # @return [Array<DetectorResponse>] operation results.
1377
+ #
1378
+ def list_site_detector_responses_slot(resource_group_name, site_name, slot, custom_headers:nil)
1379
+ first_page = list_site_detector_responses_slot_as_lazy(resource_group_name, site_name, slot, custom_headers:custom_headers)
1380
+ first_page.get_all_items
1381
+ end
1382
+
1383
+ #
1384
+ # List Site Detector Responses
1385
+ #
1386
+ # List Site Detector Responses
1387
+ #
1388
+ # @param resource_group_name [String] Name of the resource group to which the
1389
+ # resource belongs.
1390
+ # @param site_name [String] Site Name
1391
+ # @param slot [String] Slot Name
1392
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1393
+ # will be added to the HTTP request.
1394
+ #
1395
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1396
+ #
1397
+ def list_site_detector_responses_slot_with_http_info(resource_group_name, site_name, slot, custom_headers:nil)
1398
+ list_site_detector_responses_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value!
1399
+ end
1400
+
1401
+ #
1402
+ # List Site Detector Responses
1403
+ #
1404
+ # List Site Detector Responses
1405
+ #
1406
+ # @param resource_group_name [String] Name of the resource group to which the
1407
+ # resource belongs.
1408
+ # @param site_name [String] Site Name
1409
+ # @param slot [String] Slot Name
1410
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1411
+ # to the HTTP request.
1412
+ #
1413
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1414
+ #
1415
+ def list_site_detector_responses_slot_async(resource_group_name, site_name, slot, custom_headers:nil)
1416
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1417
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1418
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1419
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1420
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1421
+ fail ArgumentError, 'slot is nil' if slot.nil?
1422
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1423
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1424
+
1425
+
1426
+ request_headers = {}
1427
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1428
+
1429
+ # Set Headers
1430
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1431
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1432
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'
1433
+
1434
+ request_url = @base_url || @client.base_url
1435
+
1436
+ options = {
1437
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1438
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
1439
+ query_params: {'api-version' => @client.api_version},
1440
+ headers: request_headers.merge(custom_headers || {}),
1441
+ base_url: request_url
1442
+ }
1443
+ promise = @client.make_request_async(:get, path_template, options)
1444
+
1445
+ promise = promise.then do |result|
1446
+ http_response = result.response
1447
+ status_code = http_response.status
1448
+ response_content = http_response.body
1449
+ unless status_code == 200
1450
+ error_model = JSON.load(response_content)
1451
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1452
+ end
1453
+
1454
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1455
+ # Deserialize Response
1456
+ if status_code == 200
1457
+ begin
1458
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1459
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DetectorResponseCollection.mapper()
1460
+ result.body = @client.deserialize(result_mapper, parsed_response)
1461
+ rescue Exception => e
1462
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1463
+ end
1464
+ end
1465
+
1466
+ result
1467
+ end
1468
+
1469
+ promise.execute
1470
+ end
1471
+
1472
+ #
1473
+ # Get site detector response
1474
+ #
1475
+ # Get site detector response
1476
+ #
1477
+ # @param resource_group_name [String] Name of the resource group to which the
1478
+ # resource belongs.
1479
+ # @param site_name [String] Site Name
1480
+ # @param detector_name [String] Detector Resource Name
1481
+ # @param slot [String] Slot Name
1482
+ # @param start_time [DateTime] Start Time
1483
+ # @param end_time [DateTime] End Time
1484
+ # @param time_grain [String] Time Grain
1485
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1486
+ # will be added to the HTTP request.
1487
+ #
1488
+ # @return [DetectorResponse] operation results.
1489
+ #
1490
+ def get_site_detector_response_slot(resource_group_name, site_name, detector_name, slot, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
1491
+ response = get_site_detector_response_slot_async(resource_group_name, site_name, detector_name, slot, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value!
1492
+ response.body unless response.nil?
1493
+ end
1494
+
1495
+ #
1496
+ # Get site detector response
1497
+ #
1498
+ # Get site detector response
1499
+ #
1500
+ # @param resource_group_name [String] Name of the resource group to which the
1501
+ # resource belongs.
1502
+ # @param site_name [String] Site Name
1503
+ # @param detector_name [String] Detector Resource Name
1504
+ # @param slot [String] Slot Name
1505
+ # @param start_time [DateTime] Start Time
1506
+ # @param end_time [DateTime] End Time
1507
+ # @param time_grain [String] Time Grain
1508
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1509
+ # will be added to the HTTP request.
1510
+ #
1511
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1512
+ #
1513
+ def get_site_detector_response_slot_with_http_info(resource_group_name, site_name, detector_name, slot, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
1514
+ get_site_detector_response_slot_async(resource_group_name, site_name, detector_name, slot, start_time:start_time, end_time:end_time, time_grain:time_grain, custom_headers:custom_headers).value!
1515
+ end
1516
+
1517
+ #
1518
+ # Get site detector response
1519
+ #
1520
+ # Get site detector response
1521
+ #
1522
+ # @param resource_group_name [String] Name of the resource group to which the
1523
+ # resource belongs.
1524
+ # @param site_name [String] Site Name
1525
+ # @param detector_name [String] Detector Resource Name
1526
+ # @param slot [String] Slot Name
1527
+ # @param start_time [DateTime] Start Time
1528
+ # @param end_time [DateTime] End Time
1529
+ # @param time_grain [String] Time Grain
1530
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1531
+ # to the HTTP request.
1532
+ #
1533
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1534
+ #
1535
+ def get_site_detector_response_slot_async(resource_group_name, site_name, detector_name, slot, start_time:nil, end_time:nil, time_grain:nil, custom_headers:nil)
1536
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1537
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1538
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1539
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1540
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1541
+ fail ArgumentError, 'detector_name is nil' if detector_name.nil?
1542
+ fail ArgumentError, 'slot is nil' if slot.nil?
1543
+ 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?
1544
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1545
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1546
+
1547
+
1548
+ request_headers = {}
1549
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1550
+
1551
+ # Set Headers
1552
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1553
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1554
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'
1555
+
1556
+ request_url = @base_url || @client.base_url
1557
+
1558
+ options = {
1559
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1560
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'detectorName' => detector_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
1561
+ query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'api-version' => @client.api_version},
1562
+ headers: request_headers.merge(custom_headers || {}),
1563
+ base_url: request_url
1564
+ }
1565
+ promise = @client.make_request_async(:get, path_template, options)
1566
+
1567
+ promise = promise.then do |result|
1568
+ http_response = result.response
1569
+ status_code = http_response.status
1570
+ response_content = http_response.body
1571
+ unless status_code == 200
1572
+ error_model = JSON.load(response_content)
1573
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1574
+ end
1575
+
1576
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1577
+ # Deserialize Response
1578
+ if status_code == 200
1579
+ begin
1580
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1581
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DetectorResponse.mapper()
1582
+ result.body = @client.deserialize(result_mapper, parsed_response)
1583
+ rescue Exception => e
1584
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1585
+ end
1586
+ end
1587
+
1588
+ result
1589
+ end
1590
+
1591
+ promise.execute
1592
+ end
1593
+
1594
+ #
1595
+ # Get Diagnostics Categories
1596
+ #
1597
+ # Get Diagnostics Categories
1598
+ #
1599
+ # @param resource_group_name [String] Name of the resource group to which the
1600
+ # resource belongs.
1601
+ # @param site_name [String] Site Name
1602
+ # @param slot [String] Slot Name
1603
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1604
+ # will be added to the HTTP request.
1605
+ #
1606
+ # @return [Array<DiagnosticCategory>] operation results.
1607
+ #
1608
+ def list_site_diagnostic_categories_slot(resource_group_name, site_name, slot, custom_headers:nil)
1609
+ first_page = list_site_diagnostic_categories_slot_as_lazy(resource_group_name, site_name, slot, custom_headers:custom_headers)
1610
+ first_page.get_all_items
1611
+ end
1612
+
1613
+ #
1614
+ # Get Diagnostics Categories
1615
+ #
1616
+ # Get Diagnostics Categories
1617
+ #
1618
+ # @param resource_group_name [String] Name of the resource group to which the
1619
+ # resource belongs.
1620
+ # @param site_name [String] Site Name
1621
+ # @param slot [String] Slot Name
1622
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1623
+ # will be added to the HTTP request.
1624
+ #
1625
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1626
+ #
1627
+ def list_site_diagnostic_categories_slot_with_http_info(resource_group_name, site_name, slot, custom_headers:nil)
1628
+ list_site_diagnostic_categories_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value!
1629
+ end
1630
+
1631
+ #
1632
+ # Get Diagnostics Categories
1633
+ #
1634
+ # Get Diagnostics Categories
1635
+ #
1636
+ # @param resource_group_name [String] Name of the resource group to which the
1637
+ # resource belongs.
1638
+ # @param site_name [String] Site Name
1639
+ # @param slot [String] Slot Name
1640
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1641
+ # to the HTTP request.
1642
+ #
1643
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1644
+ #
1645
+ def list_site_diagnostic_categories_slot_async(resource_group_name, site_name, slot, custom_headers:nil)
1646
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1647
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1648
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1649
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1650
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1651
+ fail ArgumentError, 'slot is nil' if slot.nil?
1652
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1653
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1654
+
1655
+
1656
+ request_headers = {}
1657
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1658
+
1659
+ # Set Headers
1660
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1661
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1662
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'
1663
+
1664
+ request_url = @base_url || @client.base_url
1665
+
1666
+ options = {
1667
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1668
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
1669
+ query_params: {'api-version' => @client.api_version},
1670
+ headers: request_headers.merge(custom_headers || {}),
1671
+ base_url: request_url
1672
+ }
1673
+ promise = @client.make_request_async(:get, path_template, options)
1674
+
1675
+ promise = promise.then do |result|
1676
+ http_response = result.response
1677
+ status_code = http_response.status
1678
+ response_content = http_response.body
1679
+ unless status_code == 200
1680
+ error_model = JSON.load(response_content)
1681
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1682
+ end
1683
+
1684
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1685
+ # Deserialize Response
1686
+ if status_code == 200
1687
+ begin
1688
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1689
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticCategoryCollection.mapper()
1690
+ result.body = @client.deserialize(result_mapper, parsed_response)
1691
+ rescue Exception => e
1692
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1693
+ end
1694
+ end
1695
+
1696
+ result
1697
+ end
1698
+
1699
+ promise.execute
1700
+ end
1701
+
1702
+ #
1703
+ # Get Diagnostics Category
1704
+ #
1705
+ # Get Diagnostics Category
1706
+ #
1707
+ # @param resource_group_name [String] Name of the resource group to which the
1708
+ # resource belongs.
1709
+ # @param site_name [String] Site Name
1710
+ # @param diagnostic_category [String] Diagnostic Category
1711
+ # @param slot [String] Slot Name
1712
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1713
+ # will be added to the HTTP request.
1714
+ #
1715
+ # @return [DiagnosticCategory] operation results.
1716
+ #
1717
+ def get_site_diagnostic_category_slot(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
1718
+ response = get_site_diagnostic_category_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value!
1719
+ response.body unless response.nil?
1720
+ end
1721
+
1722
+ #
1723
+ # Get Diagnostics Category
1724
+ #
1725
+ # Get Diagnostics Category
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 diagnostic_category [String] Diagnostic Category
1731
+ # @param slot [String] Slot Name
1732
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1733
+ # will be added to the HTTP request.
1734
+ #
1735
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1736
+ #
1737
+ def get_site_diagnostic_category_slot_with_http_info(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
1738
+ get_site_diagnostic_category_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value!
1739
+ end
1740
+
1741
+ #
1742
+ # Get Diagnostics Category
1743
+ #
1744
+ # Get Diagnostics Category
1745
+ #
1746
+ # @param resource_group_name [String] Name of the resource group to which the
1747
+ # resource belongs.
1748
+ # @param site_name [String] Site Name
1749
+ # @param diagnostic_category [String] Diagnostic Category
1750
+ # @param slot [String] Slot Name
1751
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1752
+ # to the HTTP request.
1753
+ #
1754
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1755
+ #
1756
+ def get_site_diagnostic_category_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
1757
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1758
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1759
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1760
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1761
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1762
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
1763
+ fail ArgumentError, 'slot is nil' if slot.nil?
1764
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1765
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1766
+
1767
+
1768
+ request_headers = {}
1769
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1770
+
1771
+ # Set Headers
1772
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1773
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1774
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'
1775
+
1776
+ request_url = @base_url || @client.base_url
1777
+
1778
+ options = {
1779
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1780
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'slot' => slot,'subscriptionId' => @client.subscription_id},
1781
+ query_params: {'api-version' => @client.api_version},
1782
+ headers: request_headers.merge(custom_headers || {}),
1783
+ base_url: request_url
1784
+ }
1785
+ promise = @client.make_request_async(:get, path_template, options)
1786
+
1787
+ promise = promise.then do |result|
1788
+ http_response = result.response
1789
+ status_code = http_response.status
1790
+ response_content = http_response.body
1791
+ unless status_code == 200
1792
+ error_model = JSON.load(response_content)
1793
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1794
+ end
1795
+
1796
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1797
+ # Deserialize Response
1798
+ if status_code == 200
1799
+ begin
1800
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1801
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticCategory.mapper()
1802
+ result.body = @client.deserialize(result_mapper, parsed_response)
1803
+ rescue Exception => e
1804
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1805
+ end
1806
+ end
1807
+
1808
+ result
1809
+ end
1810
+
1811
+ promise.execute
1812
+ end
1813
+
1814
+ #
1815
+ # Get Site Analyses
1816
+ #
1817
+ # Get Site Analyses
1818
+ #
1819
+ # @param resource_group_name [String] Name of the resource group to which the
1820
+ # resource belongs.
1821
+ # @param site_name [String] Site Name
1822
+ # @param diagnostic_category [String] Diagnostic Category
1823
+ # @param slot [String] Slot Name
1824
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1825
+ # will be added to the HTTP request.
1826
+ #
1827
+ # @return [Array<AnalysisDefinition>] operation results.
1828
+ #
1829
+ def list_site_analyses_slot(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
1830
+ first_page = list_site_analyses_slot_as_lazy(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers)
1831
+ first_page.get_all_items
1832
+ end
1833
+
1834
+ #
1835
+ # Get Site Analyses
1836
+ #
1837
+ # Get Site Analyses
1838
+ #
1839
+ # @param resource_group_name [String] Name of the resource group to which the
1840
+ # resource belongs.
1841
+ # @param site_name [String] Site Name
1842
+ # @param diagnostic_category [String] Diagnostic Category
1843
+ # @param slot [String] Slot Name
1844
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1845
+ # will be added to the HTTP request.
1846
+ #
1847
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1848
+ #
1849
+ def list_site_analyses_slot_with_http_info(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
1850
+ list_site_analyses_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value!
1851
+ end
1852
+
1853
+ #
1854
+ # Get Site Analyses
1855
+ #
1856
+ # Get Site Analyses
1857
+ #
1858
+ # @param resource_group_name [String] Name of the resource group to which the
1859
+ # resource belongs.
1860
+ # @param site_name [String] Site Name
1861
+ # @param diagnostic_category [String] Diagnostic Category
1862
+ # @param slot [String] Slot Name
1863
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1864
+ # to the HTTP request.
1865
+ #
1866
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1867
+ #
1868
+ def list_site_analyses_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
1869
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1870
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1871
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1872
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1873
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1874
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
1875
+ fail ArgumentError, 'slot is nil' if slot.nil?
1876
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1877
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1878
+
1879
+
1880
+ request_headers = {}
1881
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1882
+
1883
+ # Set Headers
1884
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1885
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1886
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'
1887
+
1888
+ request_url = @base_url || @client.base_url
1889
+
1890
+ options = {
1891
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1892
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'slot' => slot,'subscriptionId' => @client.subscription_id},
1893
+ query_params: {'api-version' => @client.api_version},
1894
+ headers: request_headers.merge(custom_headers || {}),
1895
+ base_url: request_url
1896
+ }
1897
+ promise = @client.make_request_async(:get, path_template, options)
1898
+
1899
+ promise = promise.then do |result|
1900
+ http_response = result.response
1901
+ status_code = http_response.status
1902
+ response_content = http_response.body
1903
+ unless status_code == 200
1904
+ error_model = JSON.load(response_content)
1905
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1906
+ end
1907
+
1908
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1909
+ # Deserialize Response
1910
+ if status_code == 200
1911
+ begin
1912
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1913
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticAnalysisCollection.mapper()
1914
+ result.body = @client.deserialize(result_mapper, parsed_response)
1915
+ rescue Exception => e
1916
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1917
+ end
1918
+ end
1919
+
1920
+ result
1921
+ end
1922
+
1923
+ promise.execute
1924
+ end
1925
+
1926
+ #
1927
+ # Get Site Analysis
1928
+ #
1929
+ # Get Site Analysis
1930
+ #
1931
+ # @param resource_group_name [String] Name of the resource group to which the
1932
+ # resource belongs.
1933
+ # @param site_name [String] Site Name
1934
+ # @param diagnostic_category [String] Diagnostic Category
1935
+ # @param analysis_name [String] Analysis Name
1936
+ # @param slot [String] Slot - optional
1937
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1938
+ # will be added to the HTTP request.
1939
+ #
1940
+ # @return [DiagnosticAnalysis] operation results.
1941
+ #
1942
+ def get_site_analysis_slot(resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers:nil)
1943
+ response = get_site_analysis_slot_async(resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers:custom_headers).value!
1944
+ response.body unless response.nil?
1945
+ end
1946
+
1947
+ #
1948
+ # Get Site Analysis
1949
+ #
1950
+ # Get Site Analysis
1951
+ #
1952
+ # @param resource_group_name [String] Name of the resource group to which the
1953
+ # resource belongs.
1954
+ # @param site_name [String] Site Name
1955
+ # @param diagnostic_category [String] Diagnostic Category
1956
+ # @param analysis_name [String] Analysis Name
1957
+ # @param slot [String] Slot - optional
1958
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1959
+ # will be added to the HTTP request.
1960
+ #
1961
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1962
+ #
1963
+ def get_site_analysis_slot_with_http_info(resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers:nil)
1964
+ get_site_analysis_slot_async(resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers:custom_headers).value!
1965
+ end
1966
+
1967
+ #
1968
+ # Get Site Analysis
1969
+ #
1970
+ # Get Site Analysis
1971
+ #
1972
+ # @param resource_group_name [String] Name of the resource group to which the
1973
+ # resource belongs.
1974
+ # @param site_name [String] Site Name
1975
+ # @param diagnostic_category [String] Diagnostic Category
1976
+ # @param analysis_name [String] Analysis Name
1977
+ # @param slot [String] Slot - optional
1978
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1979
+ # to the HTTP request.
1980
+ #
1981
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1982
+ #
1983
+ def get_site_analysis_slot_async(resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers:nil)
1984
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1985
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1986
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1987
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1988
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
1989
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
1990
+ fail ArgumentError, 'analysis_name is nil' if analysis_name.nil?
1991
+ fail ArgumentError, 'slot is nil' if slot.nil?
1992
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1993
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1994
+
1995
+
1996
+ request_headers = {}
1997
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1998
+
1999
+ # Set Headers
2000
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2001
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2002
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'
2003
+
2004
+ request_url = @base_url || @client.base_url
2005
+
2006
+ options = {
2007
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2008
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'analysisName' => analysis_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
2009
+ query_params: {'api-version' => @client.api_version},
2010
+ headers: request_headers.merge(custom_headers || {}),
2011
+ base_url: request_url
2012
+ }
2013
+ promise = @client.make_request_async(:get, path_template, options)
2014
+
2015
+ promise = promise.then do |result|
2016
+ http_response = result.response
2017
+ status_code = http_response.status
2018
+ response_content = http_response.body
2019
+ unless status_code == 200
2020
+ error_model = JSON.load(response_content)
2021
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2022
+ end
2023
+
2024
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2025
+ # Deserialize Response
2026
+ if status_code == 200
2027
+ begin
2028
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2029
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticAnalysis.mapper()
2030
+ result.body = @client.deserialize(result_mapper, parsed_response)
2031
+ rescue Exception => e
2032
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2033
+ end
2034
+ end
2035
+
2036
+ result
2037
+ end
2038
+
2039
+ promise.execute
2040
+ end
2041
+
2042
+ #
2043
+ # Execute Analysis
2044
+ #
2045
+ # Execute Analysis
2046
+ #
2047
+ # @param resource_group_name [String] Name of the resource group to which the
2048
+ # resource belongs.
2049
+ # @param site_name [String] Site Name
2050
+ # @param diagnostic_category [String] Category Name
2051
+ # @param analysis_name [String] Analysis Resource Name
2052
+ # @param slot [String] Slot Name
2053
+ # @param start_time [DateTime] Start Time
2054
+ # @param end_time [DateTime] End Time
2055
+ # @param time_grain [String] Time Grain
2056
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2057
+ # will be added to the HTTP request.
2058
+ #
2059
+ # @return [DiagnosticAnalysis] operation results.
2060
+ #
2061
+ 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)
2062
+ 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!
2063
+ response.body unless response.nil?
2064
+ end
2065
+
2066
+ #
2067
+ # Execute Analysis
2068
+ #
2069
+ # Execute Analysis
2070
+ #
2071
+ # @param resource_group_name [String] Name of the resource group to which the
2072
+ # resource belongs.
2073
+ # @param site_name [String] Site Name
2074
+ # @param diagnostic_category [String] Category Name
2075
+ # @param analysis_name [String] Analysis Resource Name
2076
+ # @param slot [String] Slot Name
2077
+ # @param start_time [DateTime] Start Time
2078
+ # @param end_time [DateTime] End Time
2079
+ # @param time_grain [String] Time Grain
2080
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2081
+ # will be added to the HTTP request.
2082
+ #
2083
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2084
+ #
2085
+ 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)
2086
+ 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!
2087
+ end
2088
+
2089
+ #
2090
+ # Execute Analysis
2091
+ #
2092
+ # Execute Analysis
2093
+ #
2094
+ # @param resource_group_name [String] Name of the resource group to which the
2095
+ # resource belongs.
2096
+ # @param site_name [String] Site Name
2097
+ # @param diagnostic_category [String] Category Name
2098
+ # @param analysis_name [String] Analysis Resource Name
2099
+ # @param slot [String] Slot Name
2100
+ # @param start_time [DateTime] Start Time
2101
+ # @param end_time [DateTime] End Time
2102
+ # @param time_grain [String] Time Grain
2103
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2104
+ # to the HTTP request.
2105
+ #
2106
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2107
+ #
2108
+ 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)
2109
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2110
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2111
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2112
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2113
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
2114
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
2115
+ fail ArgumentError, 'analysis_name is nil' if analysis_name.nil?
2116
+ fail ArgumentError, 'slot is nil' if slot.nil?
2117
+ 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?
2118
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2119
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2120
+
2121
+
2122
+ request_headers = {}
2123
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2124
+
2125
+ # Set Headers
2126
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2127
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2128
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'
2129
+
2130
+ request_url = @base_url || @client.base_url
2131
+
2132
+ options = {
2133
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2134
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'analysisName' => analysis_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
2135
+ query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'api-version' => @client.api_version},
2136
+ headers: request_headers.merge(custom_headers || {}),
2137
+ base_url: request_url
2138
+ }
2139
+ promise = @client.make_request_async(:post, path_template, options)
2140
+
2141
+ promise = promise.then do |result|
2142
+ http_response = result.response
2143
+ status_code = http_response.status
2144
+ response_content = http_response.body
2145
+ unless status_code == 200
2146
+ error_model = JSON.load(response_content)
2147
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2148
+ end
2149
+
2150
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2151
+ # Deserialize Response
2152
+ if status_code == 200
2153
+ begin
2154
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2155
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticAnalysis.mapper()
2156
+ result.body = @client.deserialize(result_mapper, parsed_response)
2157
+ rescue Exception => e
2158
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2159
+ end
2160
+ end
2161
+
2162
+ result
2163
+ end
2164
+
2165
+ promise.execute
2166
+ end
2167
+
2168
+ #
2169
+ # Get Detectors
2170
+ #
2171
+ # Get Detectors
2172
+ #
2173
+ # @param resource_group_name [String] Name of the resource group to which the
2174
+ # resource belongs.
2175
+ # @param site_name [String] Site Name
2176
+ # @param diagnostic_category [String] Diagnostic Category
2177
+ # @param slot [String] Slot Name
2178
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2179
+ # will be added to the HTTP request.
2180
+ #
2181
+ # @return [Array<DetectorDefinition>] operation results.
2182
+ #
2183
+ def list_site_detectors_slot(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
2184
+ first_page = list_site_detectors_slot_as_lazy(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers)
2185
+ first_page.get_all_items
2186
+ end
2187
+
2188
+ #
2189
+ # Get Detectors
2190
+ #
2191
+ # Get Detectors
2192
+ #
2193
+ # @param resource_group_name [String] Name of the resource group to which the
2194
+ # resource belongs.
2195
+ # @param site_name [String] Site Name
2196
+ # @param diagnostic_category [String] Diagnostic Category
2197
+ # @param slot [String] Slot Name
2198
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2199
+ # will be added to the HTTP request.
2200
+ #
2201
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2202
+ #
2203
+ def list_site_detectors_slot_with_http_info(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
2204
+ list_site_detectors_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value!
2205
+ end
2206
+
2207
+ #
2208
+ # Get Detectors
2209
+ #
2210
+ # Get Detectors
2211
+ #
2212
+ # @param resource_group_name [String] Name of the resource group to which the
2213
+ # resource belongs.
2214
+ # @param site_name [String] Site Name
2215
+ # @param diagnostic_category [String] Diagnostic Category
2216
+ # @param slot [String] Slot Name
2217
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2218
+ # to the HTTP request.
2219
+ #
2220
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2221
+ #
2222
+ def list_site_detectors_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
2223
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2224
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2225
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2226
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2227
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
2228
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
2229
+ fail ArgumentError, 'slot is nil' if slot.nil?
2230
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2231
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2232
+
2233
+
2234
+ request_headers = {}
2235
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2236
+
2237
+ # Set Headers
2238
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2239
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2240
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'
2241
+
2242
+ request_url = @base_url || @client.base_url
2243
+
2244
+ options = {
2245
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2246
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'slot' => slot,'subscriptionId' => @client.subscription_id},
2247
+ query_params: {'api-version' => @client.api_version},
2248
+ headers: request_headers.merge(custom_headers || {}),
2249
+ base_url: request_url
2250
+ }
2251
+ promise = @client.make_request_async(:get, path_template, options)
2252
+
2253
+ promise = promise.then do |result|
2254
+ http_response = result.response
2255
+ status_code = http_response.status
2256
+ response_content = http_response.body
2257
+ unless status_code == 200
2258
+ error_model = JSON.load(response_content)
2259
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2260
+ end
2261
+
2262
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2263
+ # Deserialize Response
2264
+ if status_code == 200
2265
+ begin
2266
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2267
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticDetectorCollection.mapper()
2268
+ result.body = @client.deserialize(result_mapper, parsed_response)
2269
+ rescue Exception => e
2270
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2271
+ end
2272
+ end
2273
+
2274
+ result
2275
+ end
2276
+
2277
+ promise.execute
2278
+ end
2279
+
2280
+ #
2281
+ # Get Detector
2282
+ #
2283
+ # Get Detector
2284
+ #
2285
+ # @param resource_group_name [String] Name of the resource group to which the
2286
+ # resource belongs.
2287
+ # @param site_name [String] Site Name
2288
+ # @param diagnostic_category [String] Diagnostic Category
2289
+ # @param detector_name [String] Detector Name
2290
+ # @param slot [String] Slot Name
2291
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2292
+ # will be added to the HTTP request.
2293
+ #
2294
+ # @return [Array<DetectorDefinition>] operation results.
2295
+ #
2296
+ def get_site_detector_slot(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:nil)
2297
+ first_page = get_site_detector_slot_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:custom_headers)
2298
+ first_page.get_all_items
2299
+ end
2300
+
2301
+ #
2302
+ # Get Detector
2303
+ #
2304
+ # Get Detector
2305
+ #
2306
+ # @param resource_group_name [String] Name of the resource group to which the
2307
+ # resource belongs.
2308
+ # @param site_name [String] Site Name
2309
+ # @param diagnostic_category [String] Diagnostic Category
2310
+ # @param detector_name [String] Detector Name
2311
+ # @param slot [String] Slot Name
2312
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2313
+ # will be added to the HTTP request.
2314
+ #
2315
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2316
+ #
2317
+ def get_site_detector_slot_with_http_info(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:nil)
2318
+ get_site_detector_slot_async(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:custom_headers).value!
2319
+ end
2320
+
2321
+ #
2322
+ # Get Detector
2323
+ #
2324
+ # Get Detector
2325
+ #
2326
+ # @param resource_group_name [String] Name of the resource group to which the
2327
+ # resource belongs.
2328
+ # @param site_name [String] Site Name
2329
+ # @param diagnostic_category [String] Diagnostic Category
2330
+ # @param detector_name [String] Detector Name
2331
+ # @param slot [String] Slot Name
2332
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2333
+ # to the HTTP request.
2334
+ #
2335
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2336
+ #
2337
+ def get_site_detector_slot_async(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:nil)
2338
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2339
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2340
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2341
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2342
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
2343
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
2344
+ fail ArgumentError, 'detector_name is nil' if detector_name.nil?
2345
+ fail ArgumentError, 'slot is nil' if slot.nil?
2346
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2347
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2348
+
2349
+
2350
+ request_headers = {}
2351
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2352
+
2353
+ # Set Headers
2354
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2355
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2356
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'
2357
+
2358
+ request_url = @base_url || @client.base_url
2359
+
2360
+ options = {
2361
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2362
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'diagnosticCategory' => diagnostic_category,'detectorName' => detector_name,'slot' => slot,'subscriptionId' => @client.subscription_id},
2363
+ query_params: {'api-version' => @client.api_version},
2364
+ headers: request_headers.merge(custom_headers || {}),
2365
+ base_url: request_url
2366
+ }
2367
+ promise = @client.make_request_async(:get, path_template, options)
2368
+
2369
+ promise = promise.then do |result|
2370
+ http_response = result.response
2371
+ status_code = http_response.status
2372
+ response_content = http_response.body
2373
+ unless status_code == 200
2374
+ error_model = JSON.load(response_content)
2375
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2376
+ end
2377
+
2378
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2379
+ # Deserialize Response
2380
+ if status_code == 200
2381
+ begin
2382
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2383
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticDetectorCollection.mapper()
2384
+ result.body = @client.deserialize(result_mapper, parsed_response)
2385
+ rescue Exception => e
2386
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2387
+ end
2388
+ end
2389
+
2390
+ result
2391
+ end
2392
+
2393
+ promise.execute
2394
+ end
2395
+
2396
+ #
2397
+ # Execute Detector
2398
+ #
2399
+ # Execute Detector
2400
+ #
2401
+ # @param resource_group_name [String] Name of the resource group to which the
2402
+ # resource belongs.
2403
+ # @param site_name [String] Site Name
2404
+ # @param detector_name [String] Detector Resource Name
2405
+ # @param diagnostic_category [String] Category Name
2406
+ # @param slot [String] Slot Name
2407
+ # @param start_time [DateTime] Start Time
2408
+ # @param end_time [DateTime] End Time
2409
+ # @param time_grain [String] Time Grain
2410
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2411
+ # will be added to the HTTP request.
2412
+ #
2413
+ # @return [DiagnosticDetectorResponse] operation results.
2414
+ #
2415
+ 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)
2416
+ 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!
2417
+ response.body unless response.nil?
2418
+ end
2419
+
2420
+ #
2421
+ # Execute Detector
2422
+ #
2423
+ # Execute Detector
2424
+ #
2425
+ # @param resource_group_name [String] Name of the resource group to which the
2426
+ # resource belongs.
2427
+ # @param site_name [String] Site Name
2428
+ # @param detector_name [String] Detector Resource Name
2429
+ # @param diagnostic_category [String] Category Name
2430
+ # @param slot [String] Slot Name
2431
+ # @param start_time [DateTime] Start Time
2432
+ # @param end_time [DateTime] End Time
2433
+ # @param time_grain [String] Time Grain
2434
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2435
+ # will be added to the HTTP request.
2436
+ #
2437
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2438
+ #
2439
+ 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)
2440
+ 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!
2441
+ end
2442
+
2443
+ #
2444
+ # Execute Detector
2445
+ #
2446
+ # Execute Detector
2447
+ #
2448
+ # @param resource_group_name [String] Name of the resource group to which the
2449
+ # resource belongs.
2450
+ # @param site_name [String] Site Name
2451
+ # @param detector_name [String] Detector Resource Name
2452
+ # @param diagnostic_category [String] Category Name
2453
+ # @param slot [String] Slot Name
2454
+ # @param start_time [DateTime] Start Time
2455
+ # @param end_time [DateTime] End Time
2456
+ # @param time_grain [String] Time Grain
2457
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2458
+ # to the HTTP request.
2459
+ #
2460
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2461
+ #
2462
+ 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)
2463
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2464
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2465
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2466
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2467
+ fail ArgumentError, 'site_name is nil' if site_name.nil?
2468
+ fail ArgumentError, 'detector_name is nil' if detector_name.nil?
2469
+ fail ArgumentError, 'diagnostic_category is nil' if diagnostic_category.nil?
2470
+ fail ArgumentError, 'slot is nil' if slot.nil?
2471
+ 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?
2472
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2473
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2474
+
2475
+
2476
+ request_headers = {}
2477
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2478
+
2479
+ # Set Headers
2480
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2481
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2482
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'
2483
+
2484
+ request_url = @base_url || @client.base_url
2485
+
2486
+ options = {
2487
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2488
+ path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'detectorName' => detector_name,'diagnosticCategory' => diagnostic_category,'slot' => slot,'subscriptionId' => @client.subscription_id},
2489
+ query_params: {'startTime' => start_time,'endTime' => end_time,'timeGrain' => time_grain,'api-version' => @client.api_version},
2490
+ headers: request_headers.merge(custom_headers || {}),
2491
+ base_url: request_url
2492
+ }
2493
+ promise = @client.make_request_async(:post, path_template, options)
2494
+
2495
+ promise = promise.then do |result|
2496
+ http_response = result.response
2497
+ status_code = http_response.status
2498
+ response_content = http_response.body
2499
+ unless status_code == 200
2500
+ error_model = JSON.load(response_content)
2501
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2502
+ end
2503
+
2504
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2505
+ # Deserialize Response
2506
+ if status_code == 200
2507
+ begin
2508
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2509
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticDetectorResponse.mapper()
2510
+ result.body = @client.deserialize(result_mapper, parsed_response)
2511
+ rescue Exception => e
2512
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2513
+ end
2514
+ end
2515
+
2516
+ result
2517
+ end
2518
+
2519
+ promise.execute
2520
+ end
2521
+
2522
+ #
2523
+ # List Hosting Environment Detector Responses
2524
+ #
2525
+ # List Hosting Environment Detector Responses
2526
+ #
2527
+ # @param next_page_link [String] The NextLink from the previous successful call
2528
+ # to List operation.
2529
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2530
+ # will be added to the HTTP request.
2531
+ #
2532
+ # @return [DetectorResponseCollection] operation results.
2533
+ #
2534
+ def list_hosting_environment_detector_responses_next(next_page_link, custom_headers:nil)
2535
+ response = list_hosting_environment_detector_responses_next_async(next_page_link, custom_headers:custom_headers).value!
2536
+ response.body unless response.nil?
2537
+ end
2538
+
2539
+ #
2540
+ # List Hosting Environment Detector Responses
2541
+ #
2542
+ # List Hosting Environment Detector Responses
2543
+ #
2544
+ # @param next_page_link [String] The NextLink from the previous successful call
2545
+ # to List operation.
2546
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2547
+ # will be added to the HTTP request.
2548
+ #
2549
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2550
+ #
2551
+ def list_hosting_environment_detector_responses_next_with_http_info(next_page_link, custom_headers:nil)
2552
+ list_hosting_environment_detector_responses_next_async(next_page_link, custom_headers:custom_headers).value!
2553
+ end
2554
+
2555
+ #
2556
+ # List Hosting Environment Detector Responses
2557
+ #
2558
+ # List Hosting Environment Detector Responses
2559
+ #
2560
+ # @param next_page_link [String] The NextLink from the previous successful call
2561
+ # to List operation.
2562
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2563
+ # to the HTTP request.
2564
+ #
2565
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2566
+ #
2567
+ def list_hosting_environment_detector_responses_next_async(next_page_link, custom_headers:nil)
2568
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2569
+
2570
+
2571
+ request_headers = {}
2572
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2573
+
2574
+ # Set Headers
2575
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2576
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2577
+ path_template = '{nextLink}'
2578
+
2579
+ request_url = @base_url || @client.base_url
2580
+
2581
+ options = {
2582
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2583
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2584
+ headers: request_headers.merge(custom_headers || {}),
2585
+ base_url: request_url
2586
+ }
2587
+ promise = @client.make_request_async(:get, path_template, options)
2588
+
2589
+ promise = promise.then do |result|
2590
+ http_response = result.response
2591
+ status_code = http_response.status
2592
+ response_content = http_response.body
2593
+ unless status_code == 200
2594
+ error_model = JSON.load(response_content)
2595
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2596
+ end
2597
+
2598
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2599
+ # Deserialize Response
2600
+ if status_code == 200
2601
+ begin
2602
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2603
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DetectorResponseCollection.mapper()
2604
+ result.body = @client.deserialize(result_mapper, parsed_response)
2605
+ rescue Exception => e
2606
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2607
+ end
2608
+ end
2609
+
2610
+ result
2611
+ end
2612
+
2613
+ promise.execute
2614
+ end
2615
+
2616
+ #
2617
+ # List Site Detector Responses
2618
+ #
2619
+ # List Site Detector Responses
2620
+ #
2621
+ # @param next_page_link [String] The NextLink from the previous successful call
2622
+ # to List operation.
2623
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2624
+ # will be added to the HTTP request.
2625
+ #
2626
+ # @return [DetectorResponseCollection] operation results.
2627
+ #
2628
+ def list_site_detector_responses_next(next_page_link, custom_headers:nil)
2629
+ response = list_site_detector_responses_next_async(next_page_link, custom_headers:custom_headers).value!
2630
+ response.body unless response.nil?
2631
+ end
2632
+
2633
+ #
2634
+ # List Site Detector Responses
2635
+ #
2636
+ # List Site Detector Responses
2637
+ #
2638
+ # @param next_page_link [String] The NextLink from the previous successful call
2639
+ # to List operation.
2640
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2641
+ # will be added to the HTTP request.
2642
+ #
2643
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2644
+ #
2645
+ def list_site_detector_responses_next_with_http_info(next_page_link, custom_headers:nil)
2646
+ list_site_detector_responses_next_async(next_page_link, custom_headers:custom_headers).value!
2647
+ end
2648
+
2649
+ #
2650
+ # List Site Detector Responses
2651
+ #
2652
+ # List Site Detector Responses
2653
+ #
2654
+ # @param next_page_link [String] The NextLink from the previous successful call
2655
+ # to List operation.
2656
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2657
+ # to the HTTP request.
2658
+ #
2659
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2660
+ #
2661
+ def list_site_detector_responses_next_async(next_page_link, custom_headers:nil)
2662
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2663
+
2664
+
2665
+ request_headers = {}
2666
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2667
+
2668
+ # Set Headers
2669
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2670
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2671
+ path_template = '{nextLink}'
2672
+
2673
+ request_url = @base_url || @client.base_url
2674
+
2675
+ options = {
2676
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2677
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2678
+ headers: request_headers.merge(custom_headers || {}),
2679
+ base_url: request_url
2680
+ }
2681
+ promise = @client.make_request_async(:get, path_template, options)
2682
+
2683
+ promise = promise.then do |result|
2684
+ http_response = result.response
2685
+ status_code = http_response.status
2686
+ response_content = http_response.body
2687
+ unless status_code == 200
2688
+ error_model = JSON.load(response_content)
2689
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2690
+ end
2691
+
2692
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2693
+ # Deserialize Response
2694
+ if status_code == 200
2695
+ begin
2696
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2697
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DetectorResponseCollection.mapper()
2698
+ result.body = @client.deserialize(result_mapper, parsed_response)
2699
+ rescue Exception => e
2700
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2701
+ end
2702
+ end
2703
+
2704
+ result
2705
+ end
2706
+
2707
+ promise.execute
2708
+ end
2709
+
2710
+ #
2711
+ # Get Diagnostics Categories
2712
+ #
2713
+ # Get Diagnostics Categories
2714
+ #
2715
+ # @param next_page_link [String] The NextLink from the previous successful call
2716
+ # to List operation.
2717
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2718
+ # will be added to the HTTP request.
2719
+ #
2720
+ # @return [DiagnosticCategoryCollection] operation results.
2721
+ #
2722
+ def list_site_diagnostic_categories_next(next_page_link, custom_headers:nil)
2723
+ response = list_site_diagnostic_categories_next_async(next_page_link, custom_headers:custom_headers).value!
2724
+ response.body unless response.nil?
2725
+ end
2726
+
2727
+ #
2728
+ # Get Diagnostics Categories
2729
+ #
2730
+ # Get Diagnostics Categories
2731
+ #
2732
+ # @param next_page_link [String] The NextLink from the previous successful call
2733
+ # to List operation.
2734
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2735
+ # will be added to the HTTP request.
2736
+ #
2737
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2738
+ #
2739
+ def list_site_diagnostic_categories_next_with_http_info(next_page_link, custom_headers:nil)
2740
+ list_site_diagnostic_categories_next_async(next_page_link, custom_headers:custom_headers).value!
2741
+ end
2742
+
2743
+ #
2744
+ # Get Diagnostics Categories
2745
+ #
2746
+ # Get Diagnostics Categories
2747
+ #
2748
+ # @param next_page_link [String] The NextLink from the previous successful call
2749
+ # to List operation.
2750
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2751
+ # to the HTTP request.
2752
+ #
2753
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2754
+ #
2755
+ def list_site_diagnostic_categories_next_async(next_page_link, custom_headers:nil)
2756
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2757
+
2758
+
2759
+ request_headers = {}
2760
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2761
+
2762
+ # Set Headers
2763
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2764
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2765
+ path_template = '{nextLink}'
2766
+
2767
+ request_url = @base_url || @client.base_url
2768
+
2769
+ options = {
2770
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2771
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2772
+ headers: request_headers.merge(custom_headers || {}),
2773
+ base_url: request_url
2774
+ }
2775
+ promise = @client.make_request_async(:get, path_template, options)
2776
+
2777
+ promise = promise.then do |result|
2778
+ http_response = result.response
2779
+ status_code = http_response.status
2780
+ response_content = http_response.body
2781
+ unless status_code == 200
2782
+ error_model = JSON.load(response_content)
2783
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2784
+ end
2785
+
2786
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2787
+ # Deserialize Response
2788
+ if status_code == 200
2789
+ begin
2790
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2791
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticCategoryCollection.mapper()
2792
+ result.body = @client.deserialize(result_mapper, parsed_response)
2793
+ rescue Exception => e
2794
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2795
+ end
2796
+ end
2797
+
2798
+ result
2799
+ end
2800
+
2801
+ promise.execute
2802
+ end
2803
+
2804
+ #
2805
+ # Get Site Analyses
2806
+ #
2807
+ # Get Site Analyses
2808
+ #
2809
+ # @param next_page_link [String] The NextLink from the previous successful call
2810
+ # to List operation.
2811
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2812
+ # will be added to the HTTP request.
2813
+ #
2814
+ # @return [DiagnosticAnalysisCollection] operation results.
2815
+ #
2816
+ def list_site_analyses_next(next_page_link, custom_headers:nil)
2817
+ response = list_site_analyses_next_async(next_page_link, custom_headers:custom_headers).value!
2818
+ response.body unless response.nil?
2819
+ end
2820
+
2821
+ #
2822
+ # Get Site Analyses
2823
+ #
2824
+ # Get Site Analyses
2825
+ #
2826
+ # @param next_page_link [String] The NextLink from the previous successful call
2827
+ # to List operation.
2828
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2829
+ # will be added to the HTTP request.
2830
+ #
2831
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2832
+ #
2833
+ def list_site_analyses_next_with_http_info(next_page_link, custom_headers:nil)
2834
+ list_site_analyses_next_async(next_page_link, custom_headers:custom_headers).value!
2835
+ end
2836
+
2837
+ #
2838
+ # Get Site Analyses
2839
+ #
2840
+ # Get Site Analyses
2841
+ #
2842
+ # @param next_page_link [String] The NextLink from the previous successful call
2843
+ # to List operation.
2844
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2845
+ # to the HTTP request.
2846
+ #
2847
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2848
+ #
2849
+ def list_site_analyses_next_async(next_page_link, custom_headers:nil)
2850
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2851
+
2852
+
2853
+ request_headers = {}
2854
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2855
+
2856
+ # Set Headers
2857
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2858
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2859
+ path_template = '{nextLink}'
2860
+
2861
+ request_url = @base_url || @client.base_url
2862
+
2863
+ options = {
2864
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2865
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2866
+ headers: request_headers.merge(custom_headers || {}),
2867
+ base_url: request_url
2868
+ }
2869
+ promise = @client.make_request_async(:get, path_template, options)
2870
+
2871
+ promise = promise.then do |result|
2872
+ http_response = result.response
2873
+ status_code = http_response.status
2874
+ response_content = http_response.body
2875
+ unless status_code == 200
2876
+ error_model = JSON.load(response_content)
2877
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2878
+ end
2879
+
2880
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2881
+ # Deserialize Response
2882
+ if status_code == 200
2883
+ begin
2884
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2885
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticAnalysisCollection.mapper()
2886
+ result.body = @client.deserialize(result_mapper, parsed_response)
2887
+ rescue Exception => e
2888
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2889
+ end
2890
+ end
2891
+
2892
+ result
2893
+ end
2894
+
2895
+ promise.execute
2896
+ end
2897
+
2898
+ #
2899
+ # Get Detectors
2900
+ #
2901
+ # Get Detectors
2902
+ #
2903
+ # @param next_page_link [String] The NextLink from the previous successful call
2904
+ # to List operation.
2905
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2906
+ # will be added to the HTTP request.
2907
+ #
2908
+ # @return [DiagnosticDetectorCollection] operation results.
2909
+ #
2910
+ def list_site_detectors_next(next_page_link, custom_headers:nil)
2911
+ response = list_site_detectors_next_async(next_page_link, custom_headers:custom_headers).value!
2912
+ response.body unless response.nil?
2913
+ end
2914
+
2915
+ #
2916
+ # Get Detectors
2917
+ #
2918
+ # Get Detectors
2919
+ #
2920
+ # @param next_page_link [String] The NextLink from the previous successful call
2921
+ # to List operation.
2922
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2923
+ # will be added to the HTTP request.
2924
+ #
2925
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2926
+ #
2927
+ def list_site_detectors_next_with_http_info(next_page_link, custom_headers:nil)
2928
+ list_site_detectors_next_async(next_page_link, custom_headers:custom_headers).value!
2929
+ end
2930
+
2931
+ #
2932
+ # Get Detectors
2933
+ #
2934
+ # Get Detectors
2935
+ #
2936
+ # @param next_page_link [String] The NextLink from the previous successful call
2937
+ # to List operation.
2938
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2939
+ # to the HTTP request.
2940
+ #
2941
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2942
+ #
2943
+ def list_site_detectors_next_async(next_page_link, custom_headers:nil)
2944
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2945
+
2946
+
2947
+ request_headers = {}
2948
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2949
+
2950
+ # Set Headers
2951
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2952
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2953
+ path_template = '{nextLink}'
2954
+
2955
+ request_url = @base_url || @client.base_url
2956
+
2957
+ options = {
2958
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2959
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2960
+ headers: request_headers.merge(custom_headers || {}),
2961
+ base_url: request_url
2962
+ }
2963
+ promise = @client.make_request_async(:get, path_template, options)
2964
+
2965
+ promise = promise.then do |result|
2966
+ http_response = result.response
2967
+ status_code = http_response.status
2968
+ response_content = http_response.body
2969
+ unless status_code == 200
2970
+ error_model = JSON.load(response_content)
2971
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2972
+ end
2973
+
2974
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2975
+ # Deserialize Response
2976
+ if status_code == 200
2977
+ begin
2978
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2979
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticDetectorCollection.mapper()
2980
+ result.body = @client.deserialize(result_mapper, parsed_response)
2981
+ rescue Exception => e
2982
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2983
+ end
2984
+ end
2985
+
2986
+ result
2987
+ end
2988
+
2989
+ promise.execute
2990
+ end
2991
+
2992
+ #
2993
+ # Get Detector
2994
+ #
2995
+ # Get Detector
2996
+ #
2997
+ # @param next_page_link [String] The NextLink from the previous successful call
2998
+ # to List operation.
2999
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3000
+ # will be added to the HTTP request.
3001
+ #
3002
+ # @return [DiagnosticDetectorCollection] operation results.
3003
+ #
3004
+ def get_site_detector_next(next_page_link, custom_headers:nil)
3005
+ response = get_site_detector_next_async(next_page_link, custom_headers:custom_headers).value!
3006
+ response.body unless response.nil?
3007
+ end
3008
+
3009
+ #
3010
+ # Get Detector
3011
+ #
3012
+ # Get Detector
3013
+ #
3014
+ # @param next_page_link [String] The NextLink from the previous successful call
3015
+ # to List operation.
3016
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3017
+ # will be added to the HTTP request.
3018
+ #
3019
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3020
+ #
3021
+ def get_site_detector_next_with_http_info(next_page_link, custom_headers:nil)
3022
+ get_site_detector_next_async(next_page_link, custom_headers:custom_headers).value!
3023
+ end
3024
+
3025
+ #
3026
+ # Get Detector
3027
+ #
3028
+ # Get Detector
3029
+ #
3030
+ # @param next_page_link [String] The NextLink from the previous successful call
3031
+ # to List operation.
3032
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3033
+ # to the HTTP request.
3034
+ #
3035
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3036
+ #
3037
+ def get_site_detector_next_async(next_page_link, custom_headers:nil)
3038
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
3039
+
3040
+
3041
+ request_headers = {}
3042
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3043
+
3044
+ # Set Headers
3045
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3046
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3047
+ path_template = '{nextLink}'
3048
+
3049
+ request_url = @base_url || @client.base_url
3050
+
3051
+ options = {
3052
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3053
+ skip_encoding_path_params: {'nextLink' => next_page_link},
3054
+ headers: request_headers.merge(custom_headers || {}),
3055
+ base_url: request_url
3056
+ }
3057
+ promise = @client.make_request_async(:get, path_template, options)
3058
+
3059
+ promise = promise.then do |result|
3060
+ http_response = result.response
3061
+ status_code = http_response.status
3062
+ response_content = http_response.body
3063
+ unless status_code == 200
3064
+ error_model = JSON.load(response_content)
3065
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
3066
+ end
3067
+
3068
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3069
+ # Deserialize Response
3070
+ if status_code == 200
3071
+ begin
3072
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3073
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticDetectorCollection.mapper()
3074
+ result.body = @client.deserialize(result_mapper, parsed_response)
3075
+ rescue Exception => e
3076
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3077
+ end
3078
+ end
3079
+
3080
+ result
3081
+ end
3082
+
3083
+ promise.execute
3084
+ end
3085
+
3086
+ #
3087
+ # List Site Detector Responses
3088
+ #
3089
+ # List Site Detector Responses
3090
+ #
3091
+ # @param next_page_link [String] The NextLink from the previous successful call
3092
+ # to List operation.
3093
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3094
+ # will be added to the HTTP request.
3095
+ #
3096
+ # @return [DetectorResponseCollection] operation results.
3097
+ #
3098
+ def list_site_detector_responses_slot_next(next_page_link, custom_headers:nil)
3099
+ response = list_site_detector_responses_slot_next_async(next_page_link, custom_headers:custom_headers).value!
3100
+ response.body unless response.nil?
3101
+ end
3102
+
3103
+ #
3104
+ # List Site Detector Responses
3105
+ #
3106
+ # List Site Detector Responses
3107
+ #
3108
+ # @param next_page_link [String] The NextLink from the previous successful call
3109
+ # to List operation.
3110
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3111
+ # will be added to the HTTP request.
3112
+ #
3113
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3114
+ #
3115
+ def list_site_detector_responses_slot_next_with_http_info(next_page_link, custom_headers:nil)
3116
+ list_site_detector_responses_slot_next_async(next_page_link, custom_headers:custom_headers).value!
3117
+ end
3118
+
3119
+ #
3120
+ # List Site Detector Responses
3121
+ #
3122
+ # List Site Detector Responses
3123
+ #
3124
+ # @param next_page_link [String] The NextLink from the previous successful call
3125
+ # to List operation.
3126
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3127
+ # to the HTTP request.
3128
+ #
3129
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3130
+ #
3131
+ def list_site_detector_responses_slot_next_async(next_page_link, custom_headers:nil)
3132
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
3133
+
3134
+
3135
+ request_headers = {}
3136
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3137
+
3138
+ # Set Headers
3139
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3140
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3141
+ path_template = '{nextLink}'
3142
+
3143
+ request_url = @base_url || @client.base_url
3144
+
3145
+ options = {
3146
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3147
+ skip_encoding_path_params: {'nextLink' => next_page_link},
3148
+ headers: request_headers.merge(custom_headers || {}),
3149
+ base_url: request_url
3150
+ }
3151
+ promise = @client.make_request_async(:get, path_template, options)
3152
+
3153
+ promise = promise.then do |result|
3154
+ http_response = result.response
3155
+ status_code = http_response.status
3156
+ response_content = http_response.body
3157
+ unless status_code == 200
3158
+ error_model = JSON.load(response_content)
3159
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
3160
+ end
3161
+
3162
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3163
+ # Deserialize Response
3164
+ if status_code == 200
3165
+ begin
3166
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3167
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DetectorResponseCollection.mapper()
3168
+ result.body = @client.deserialize(result_mapper, parsed_response)
3169
+ rescue Exception => e
3170
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3171
+ end
3172
+ end
3173
+
3174
+ result
3175
+ end
3176
+
3177
+ promise.execute
3178
+ end
3179
+
3180
+ #
3181
+ # Get Diagnostics Categories
3182
+ #
3183
+ # Get Diagnostics Categories
3184
+ #
3185
+ # @param next_page_link [String] The NextLink from the previous successful call
3186
+ # to List operation.
3187
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3188
+ # will be added to the HTTP request.
3189
+ #
3190
+ # @return [DiagnosticCategoryCollection] operation results.
3191
+ #
3192
+ def list_site_diagnostic_categories_slot_next(next_page_link, custom_headers:nil)
3193
+ response = list_site_diagnostic_categories_slot_next_async(next_page_link, custom_headers:custom_headers).value!
3194
+ response.body unless response.nil?
3195
+ end
3196
+
3197
+ #
3198
+ # Get Diagnostics Categories
3199
+ #
3200
+ # Get Diagnostics Categories
3201
+ #
3202
+ # @param next_page_link [String] The NextLink from the previous successful call
3203
+ # to List operation.
3204
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3205
+ # will be added to the HTTP request.
3206
+ #
3207
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3208
+ #
3209
+ def list_site_diagnostic_categories_slot_next_with_http_info(next_page_link, custom_headers:nil)
3210
+ list_site_diagnostic_categories_slot_next_async(next_page_link, custom_headers:custom_headers).value!
3211
+ end
3212
+
3213
+ #
3214
+ # Get Diagnostics Categories
3215
+ #
3216
+ # Get Diagnostics Categories
3217
+ #
3218
+ # @param next_page_link [String] The NextLink from the previous successful call
3219
+ # to List operation.
3220
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3221
+ # to the HTTP request.
3222
+ #
3223
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3224
+ #
3225
+ def list_site_diagnostic_categories_slot_next_async(next_page_link, custom_headers:nil)
3226
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
3227
+
3228
+
3229
+ request_headers = {}
3230
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3231
+
3232
+ # Set Headers
3233
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3234
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3235
+ path_template = '{nextLink}'
3236
+
3237
+ request_url = @base_url || @client.base_url
3238
+
3239
+ options = {
3240
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3241
+ skip_encoding_path_params: {'nextLink' => next_page_link},
3242
+ headers: request_headers.merge(custom_headers || {}),
3243
+ base_url: request_url
3244
+ }
3245
+ promise = @client.make_request_async(:get, path_template, options)
3246
+
3247
+ promise = promise.then do |result|
3248
+ http_response = result.response
3249
+ status_code = http_response.status
3250
+ response_content = http_response.body
3251
+ unless status_code == 200
3252
+ error_model = JSON.load(response_content)
3253
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
3254
+ end
3255
+
3256
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3257
+ # Deserialize Response
3258
+ if status_code == 200
3259
+ begin
3260
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3261
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticCategoryCollection.mapper()
3262
+ result.body = @client.deserialize(result_mapper, parsed_response)
3263
+ rescue Exception => e
3264
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3265
+ end
3266
+ end
3267
+
3268
+ result
3269
+ end
3270
+
3271
+ promise.execute
3272
+ end
3273
+
3274
+ #
3275
+ # Get Site Analyses
3276
+ #
3277
+ # Get Site Analyses
3278
+ #
3279
+ # @param next_page_link [String] The NextLink from the previous successful call
3280
+ # to List operation.
3281
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3282
+ # will be added to the HTTP request.
3283
+ #
3284
+ # @return [DiagnosticAnalysisCollection] operation results.
3285
+ #
3286
+ def list_site_analyses_slot_next(next_page_link, custom_headers:nil)
3287
+ response = list_site_analyses_slot_next_async(next_page_link, custom_headers:custom_headers).value!
3288
+ response.body unless response.nil?
3289
+ end
3290
+
3291
+ #
3292
+ # Get Site Analyses
3293
+ #
3294
+ # Get Site Analyses
3295
+ #
3296
+ # @param next_page_link [String] The NextLink from the previous successful call
3297
+ # to List operation.
3298
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3299
+ # will be added to the HTTP request.
3300
+ #
3301
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3302
+ #
3303
+ def list_site_analyses_slot_next_with_http_info(next_page_link, custom_headers:nil)
3304
+ list_site_analyses_slot_next_async(next_page_link, custom_headers:custom_headers).value!
3305
+ end
3306
+
3307
+ #
3308
+ # Get Site Analyses
3309
+ #
3310
+ # Get Site Analyses
3311
+ #
3312
+ # @param next_page_link [String] The NextLink from the previous successful call
3313
+ # to List operation.
3314
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3315
+ # to the HTTP request.
3316
+ #
3317
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3318
+ #
3319
+ def list_site_analyses_slot_next_async(next_page_link, custom_headers:nil)
3320
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
3321
+
3322
+
3323
+ request_headers = {}
3324
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3325
+
3326
+ # Set Headers
3327
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3328
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3329
+ path_template = '{nextLink}'
3330
+
3331
+ request_url = @base_url || @client.base_url
3332
+
3333
+ options = {
3334
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3335
+ skip_encoding_path_params: {'nextLink' => next_page_link},
3336
+ headers: request_headers.merge(custom_headers || {}),
3337
+ base_url: request_url
3338
+ }
3339
+ promise = @client.make_request_async(:get, path_template, options)
3340
+
3341
+ promise = promise.then do |result|
3342
+ http_response = result.response
3343
+ status_code = http_response.status
3344
+ response_content = http_response.body
3345
+ unless status_code == 200
3346
+ error_model = JSON.load(response_content)
3347
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
3348
+ end
3349
+
3350
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3351
+ # Deserialize Response
3352
+ if status_code == 200
3353
+ begin
3354
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3355
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticAnalysisCollection.mapper()
3356
+ result.body = @client.deserialize(result_mapper, parsed_response)
3357
+ rescue Exception => e
3358
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3359
+ end
3360
+ end
3361
+
3362
+ result
3363
+ end
3364
+
3365
+ promise.execute
3366
+ end
3367
+
3368
+ #
3369
+ # Get Detectors
3370
+ #
3371
+ # Get Detectors
3372
+ #
3373
+ # @param next_page_link [String] The NextLink from the previous successful call
3374
+ # to List operation.
3375
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3376
+ # will be added to the HTTP request.
3377
+ #
3378
+ # @return [DiagnosticDetectorCollection] operation results.
3379
+ #
3380
+ def list_site_detectors_slot_next(next_page_link, custom_headers:nil)
3381
+ response = list_site_detectors_slot_next_async(next_page_link, custom_headers:custom_headers).value!
3382
+ response.body unless response.nil?
3383
+ end
3384
+
3385
+ #
3386
+ # Get Detectors
3387
+ #
3388
+ # Get Detectors
3389
+ #
3390
+ # @param next_page_link [String] The NextLink from the previous successful call
3391
+ # to List operation.
3392
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3393
+ # will be added to the HTTP request.
3394
+ #
3395
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3396
+ #
3397
+ def list_site_detectors_slot_next_with_http_info(next_page_link, custom_headers:nil)
3398
+ list_site_detectors_slot_next_async(next_page_link, custom_headers:custom_headers).value!
3399
+ end
3400
+
3401
+ #
3402
+ # Get Detectors
3403
+ #
3404
+ # Get Detectors
3405
+ #
3406
+ # @param next_page_link [String] The NextLink from the previous successful call
3407
+ # to List operation.
3408
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3409
+ # to the HTTP request.
3410
+ #
3411
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3412
+ #
3413
+ def list_site_detectors_slot_next_async(next_page_link, custom_headers:nil)
3414
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
3415
+
3416
+
3417
+ request_headers = {}
3418
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3419
+
3420
+ # Set Headers
3421
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3422
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3423
+ path_template = '{nextLink}'
3424
+
3425
+ request_url = @base_url || @client.base_url
3426
+
3427
+ options = {
3428
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3429
+ skip_encoding_path_params: {'nextLink' => next_page_link},
3430
+ headers: request_headers.merge(custom_headers || {}),
3431
+ base_url: request_url
3432
+ }
3433
+ promise = @client.make_request_async(:get, path_template, options)
3434
+
3435
+ promise = promise.then do |result|
3436
+ http_response = result.response
3437
+ status_code = http_response.status
3438
+ response_content = http_response.body
3439
+ unless status_code == 200
3440
+ error_model = JSON.load(response_content)
3441
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
3442
+ end
3443
+
3444
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3445
+ # Deserialize Response
3446
+ if status_code == 200
3447
+ begin
3448
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3449
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticDetectorCollection.mapper()
3450
+ result.body = @client.deserialize(result_mapper, parsed_response)
3451
+ rescue Exception => e
3452
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3453
+ end
3454
+ end
3455
+
3456
+ result
3457
+ end
3458
+
3459
+ promise.execute
3460
+ end
3461
+
3462
+ #
3463
+ # Get Detector
3464
+ #
3465
+ # Get Detector
3466
+ #
3467
+ # @param next_page_link [String] The NextLink from the previous successful call
3468
+ # to List operation.
3469
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3470
+ # will be added to the HTTP request.
3471
+ #
3472
+ # @return [DiagnosticDetectorCollection] operation results.
3473
+ #
3474
+ def get_site_detector_slot_next(next_page_link, custom_headers:nil)
3475
+ response = get_site_detector_slot_next_async(next_page_link, custom_headers:custom_headers).value!
3476
+ response.body unless response.nil?
3477
+ end
3478
+
3479
+ #
3480
+ # Get Detector
3481
+ #
3482
+ # Get Detector
3483
+ #
3484
+ # @param next_page_link [String] The NextLink from the previous successful call
3485
+ # to List operation.
3486
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3487
+ # will be added to the HTTP request.
3488
+ #
3489
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3490
+ #
3491
+ def get_site_detector_slot_next_with_http_info(next_page_link, custom_headers:nil)
3492
+ get_site_detector_slot_next_async(next_page_link, custom_headers:custom_headers).value!
3493
+ end
3494
+
3495
+ #
3496
+ # Get Detector
3497
+ #
3498
+ # Get Detector
3499
+ #
3500
+ # @param next_page_link [String] The NextLink from the previous successful call
3501
+ # to List operation.
3502
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3503
+ # to the HTTP request.
3504
+ #
3505
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3506
+ #
3507
+ def get_site_detector_slot_next_async(next_page_link, custom_headers:nil)
3508
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
3509
+
3510
+
3511
+ request_headers = {}
3512
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3513
+
3514
+ # Set Headers
3515
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3516
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3517
+ path_template = '{nextLink}'
3518
+
3519
+ request_url = @base_url || @client.base_url
3520
+
3521
+ options = {
3522
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3523
+ skip_encoding_path_params: {'nextLink' => next_page_link},
3524
+ headers: request_headers.merge(custom_headers || {}),
3525
+ base_url: request_url
3526
+ }
3527
+ promise = @client.make_request_async(:get, path_template, options)
3528
+
3529
+ promise = promise.then do |result|
3530
+ http_response = result.response
3531
+ status_code = http_response.status
3532
+ response_content = http_response.body
3533
+ unless status_code == 200
3534
+ error_model = JSON.load(response_content)
3535
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
3536
+ end
3537
+
3538
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3539
+ # Deserialize Response
3540
+ if status_code == 200
3541
+ begin
3542
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3543
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DiagnosticDetectorCollection.mapper()
3544
+ result.body = @client.deserialize(result_mapper, parsed_response)
3545
+ rescue Exception => e
3546
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3547
+ end
3548
+ end
3549
+
3550
+ result
3551
+ end
3552
+
3553
+ promise.execute
3554
+ end
3555
+
3556
+ #
3557
+ # List Hosting Environment Detector Responses
3558
+ #
3559
+ # List Hosting Environment Detector Responses
3560
+ #
3561
+ # @param resource_group_name [String] Name of the resource group to which the
3562
+ # resource belongs.
3563
+ # @param name [String] Site Name
3564
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3565
+ # will be added to the HTTP request.
3566
+ #
3567
+ # @return [DetectorResponseCollection] which provide lazy access to pages of
3568
+ # the response.
3569
+ #
3570
+ def list_hosting_environment_detector_responses_as_lazy(resource_group_name, name, custom_headers:nil)
3571
+ response = list_hosting_environment_detector_responses_async(resource_group_name, name, custom_headers:custom_headers).value!
3572
+ unless response.nil?
3573
+ page = response.body
3574
+ page.next_method = Proc.new do |next_page_link|
3575
+ list_hosting_environment_detector_responses_next_async(next_page_link, custom_headers:custom_headers)
3576
+ end
3577
+ page
3578
+ end
3579
+ end
3580
+
3581
+ #
3582
+ # List Site Detector Responses
3583
+ #
3584
+ # List Site Detector Responses
3585
+ #
3586
+ # @param resource_group_name [String] Name of the resource group to which the
3587
+ # resource belongs.
3588
+ # @param site_name [String] Site Name
3589
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3590
+ # will be added to the HTTP request.
3591
+ #
3592
+ # @return [DetectorResponseCollection] which provide lazy access to pages of
3593
+ # the response.
3594
+ #
3595
+ def list_site_detector_responses_as_lazy(resource_group_name, site_name, custom_headers:nil)
3596
+ response = list_site_detector_responses_async(resource_group_name, site_name, custom_headers:custom_headers).value!
3597
+ unless response.nil?
3598
+ page = response.body
3599
+ page.next_method = Proc.new do |next_page_link|
3600
+ list_site_detector_responses_next_async(next_page_link, custom_headers:custom_headers)
3601
+ end
3602
+ page
3603
+ end
3604
+ end
3605
+
3606
+ #
3607
+ # Get Diagnostics Categories
3608
+ #
3609
+ # Get Diagnostics Categories
3610
+ #
3611
+ # @param resource_group_name [String] Name of the resource group to which the
3612
+ # resource belongs.
3613
+ # @param site_name [String] Site Name
3614
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3615
+ # will be added to the HTTP request.
3616
+ #
3617
+ # @return [DiagnosticCategoryCollection] which provide lazy access to pages of
3618
+ # the response.
3619
+ #
3620
+ def list_site_diagnostic_categories_as_lazy(resource_group_name, site_name, custom_headers:nil)
3621
+ response = list_site_diagnostic_categories_async(resource_group_name, site_name, custom_headers:custom_headers).value!
3622
+ unless response.nil?
3623
+ page = response.body
3624
+ page.next_method = Proc.new do |next_page_link|
3625
+ list_site_diagnostic_categories_next_async(next_page_link, custom_headers:custom_headers)
3626
+ end
3627
+ page
3628
+ end
3629
+ end
3630
+
3631
+ #
3632
+ # Get Site Analyses
3633
+ #
3634
+ # Get Site Analyses
3635
+ #
3636
+ # @param resource_group_name [String] Name of the resource group to which the
3637
+ # resource belongs.
3638
+ # @param site_name [String] Site Name
3639
+ # @param diagnostic_category [String] Diagnostic Category
3640
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3641
+ # will be added to the HTTP request.
3642
+ #
3643
+ # @return [DiagnosticAnalysisCollection] which provide lazy access to pages of
3644
+ # the response.
3645
+ #
3646
+ def list_site_analyses_as_lazy(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
3647
+ response = list_site_analyses_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value!
3648
+ unless response.nil?
3649
+ page = response.body
3650
+ page.next_method = Proc.new do |next_page_link|
3651
+ list_site_analyses_next_async(next_page_link, custom_headers:custom_headers)
3652
+ end
3653
+ page
3654
+ end
3655
+ end
3656
+
3657
+ #
3658
+ # Get Detectors
3659
+ #
3660
+ # Get Detectors
3661
+ #
3662
+ # @param resource_group_name [String] Name of the resource group to which the
3663
+ # resource belongs.
3664
+ # @param site_name [String] Site Name
3665
+ # @param diagnostic_category [String] Diagnostic Category
3666
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3667
+ # will be added to the HTTP request.
3668
+ #
3669
+ # @return [DiagnosticDetectorCollection] which provide lazy access to pages of
3670
+ # the response.
3671
+ #
3672
+ def list_site_detectors_as_lazy(resource_group_name, site_name, diagnostic_category, custom_headers:nil)
3673
+ response = list_site_detectors_async(resource_group_name, site_name, diagnostic_category, custom_headers:custom_headers).value!
3674
+ unless response.nil?
3675
+ page = response.body
3676
+ page.next_method = Proc.new do |next_page_link|
3677
+ list_site_detectors_next_async(next_page_link, custom_headers:custom_headers)
3678
+ end
3679
+ page
3680
+ end
3681
+ end
3682
+
3683
+ #
3684
+ # Get Detector
3685
+ #
3686
+ # Get Detector
3687
+ #
3688
+ # @param resource_group_name [String] Name of the resource group to which the
3689
+ # resource belongs.
3690
+ # @param site_name [String] Site Name
3691
+ # @param diagnostic_category [String] Diagnostic Category
3692
+ # @param detector_name [String] Detector Name
3693
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3694
+ # will be added to the HTTP request.
3695
+ #
3696
+ # @return [DiagnosticDetectorCollection] which provide lazy access to pages of
3697
+ # the response.
3698
+ #
3699
+ def get_site_detector_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:nil)
3700
+ response = get_site_detector_async(resource_group_name, site_name, diagnostic_category, detector_name, custom_headers:custom_headers).value!
3701
+ unless response.nil?
3702
+ page = response.body
3703
+ page.next_method = Proc.new do |next_page_link|
3704
+ get_site_detector_next_async(next_page_link, custom_headers:custom_headers)
3705
+ end
3706
+ page
3707
+ end
3708
+ end
3709
+
3710
+ #
3711
+ # List Site Detector Responses
3712
+ #
3713
+ # List Site Detector Responses
3714
+ #
3715
+ # @param resource_group_name [String] Name of the resource group to which the
3716
+ # resource belongs.
3717
+ # @param site_name [String] Site Name
3718
+ # @param slot [String] Slot Name
3719
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3720
+ # will be added to the HTTP request.
3721
+ #
3722
+ # @return [DetectorResponseCollection] which provide lazy access to pages of
3723
+ # the response.
3724
+ #
3725
+ def list_site_detector_responses_slot_as_lazy(resource_group_name, site_name, slot, custom_headers:nil)
3726
+ response = list_site_detector_responses_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value!
3727
+ unless response.nil?
3728
+ page = response.body
3729
+ page.next_method = Proc.new do |next_page_link|
3730
+ list_site_detector_responses_slot_next_async(next_page_link, custom_headers:custom_headers)
3731
+ end
3732
+ page
3733
+ end
3734
+ end
3735
+
3736
+ #
3737
+ # Get Diagnostics Categories
3738
+ #
3739
+ # Get Diagnostics Categories
3740
+ #
3741
+ # @param resource_group_name [String] Name of the resource group to which the
3742
+ # resource belongs.
3743
+ # @param site_name [String] Site Name
3744
+ # @param slot [String] Slot Name
3745
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3746
+ # will be added to the HTTP request.
3747
+ #
3748
+ # @return [DiagnosticCategoryCollection] which provide lazy access to pages of
3749
+ # the response.
3750
+ #
3751
+ def list_site_diagnostic_categories_slot_as_lazy(resource_group_name, site_name, slot, custom_headers:nil)
3752
+ response = list_site_diagnostic_categories_slot_async(resource_group_name, site_name, slot, custom_headers:custom_headers).value!
3753
+ unless response.nil?
3754
+ page = response.body
3755
+ page.next_method = Proc.new do |next_page_link|
3756
+ list_site_diagnostic_categories_slot_next_async(next_page_link, custom_headers:custom_headers)
3757
+ end
3758
+ page
3759
+ end
3760
+ end
3761
+
3762
+ #
3763
+ # Get Site Analyses
3764
+ #
3765
+ # Get Site Analyses
3766
+ #
3767
+ # @param resource_group_name [String] Name of the resource group to which the
3768
+ # resource belongs.
3769
+ # @param site_name [String] Site Name
3770
+ # @param diagnostic_category [String] Diagnostic Category
3771
+ # @param slot [String] Slot Name
3772
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3773
+ # will be added to the HTTP request.
3774
+ #
3775
+ # @return [DiagnosticAnalysisCollection] which provide lazy access to pages of
3776
+ # the response.
3777
+ #
3778
+ def list_site_analyses_slot_as_lazy(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
3779
+ response = list_site_analyses_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value!
3780
+ unless response.nil?
3781
+ page = response.body
3782
+ page.next_method = Proc.new do |next_page_link|
3783
+ list_site_analyses_slot_next_async(next_page_link, custom_headers:custom_headers)
3784
+ end
3785
+ page
3786
+ end
3787
+ end
3788
+
3789
+ #
3790
+ # Get Detectors
3791
+ #
3792
+ # Get Detectors
3793
+ #
3794
+ # @param resource_group_name [String] Name of the resource group to which the
3795
+ # resource belongs.
3796
+ # @param site_name [String] Site Name
3797
+ # @param diagnostic_category [String] Diagnostic Category
3798
+ # @param slot [String] Slot Name
3799
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3800
+ # will be added to the HTTP request.
3801
+ #
3802
+ # @return [DiagnosticDetectorCollection] which provide lazy access to pages of
3803
+ # the response.
3804
+ #
3805
+ def list_site_detectors_slot_as_lazy(resource_group_name, site_name, diagnostic_category, slot, custom_headers:nil)
3806
+ response = list_site_detectors_slot_async(resource_group_name, site_name, diagnostic_category, slot, custom_headers:custom_headers).value!
3807
+ unless response.nil?
3808
+ page = response.body
3809
+ page.next_method = Proc.new do |next_page_link|
3810
+ list_site_detectors_slot_next_async(next_page_link, custom_headers:custom_headers)
3811
+ end
3812
+ page
3813
+ end
3814
+ end
3815
+
3816
+ #
3817
+ # Get Detector
3818
+ #
3819
+ # Get Detector
3820
+ #
3821
+ # @param resource_group_name [String] Name of the resource group to which the
3822
+ # resource belongs.
3823
+ # @param site_name [String] Site Name
3824
+ # @param diagnostic_category [String] Diagnostic Category
3825
+ # @param detector_name [String] Detector Name
3826
+ # @param slot [String] Slot Name
3827
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3828
+ # will be added to the HTTP request.
3829
+ #
3830
+ # @return [DiagnosticDetectorCollection] which provide lazy access to pages of
3831
+ # the response.
3832
+ #
3833
+ def get_site_detector_slot_as_lazy(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:nil)
3834
+ response = get_site_detector_slot_async(resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers:custom_headers).value!
3835
+ unless response.nil?
3836
+ page = response.body
3837
+ page.next_method = Proc.new do |next_page_link|
3838
+ get_site_detector_slot_next_async(next_page_link, custom_headers:custom_headers)
3839
+ end
3840
+ page
3841
+ end
3842
+ end
3843
+
3844
+ end
3845
+ end