azure_mgmt_time_series_insights 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights.rb +76 -0
  4. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/access_policies.rb +571 -0
  5. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/environments.rb +730 -0
  6. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/event_sources.rb +574 -0
  7. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/access_policy_create_or_update_parameters.rb +80 -0
  8. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/access_policy_list_response.rb +56 -0
  9. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/access_policy_resource.rb +109 -0
  10. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/access_policy_role.rb +16 -0
  11. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/access_policy_update_parameters.rb +68 -0
  12. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/azure_event_source_properties.rb +75 -0
  13. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/create_or_update_tracked_resource_properties.rb +67 -0
  14. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/environment_create_or_update_parameters.rb +101 -0
  15. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/environment_list_response.rb +56 -0
  16. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/environment_resource.rb +183 -0
  17. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/environment_update_parameters.rb +79 -0
  18. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/event_hub_event_source_common_properties.rb +118 -0
  19. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/event_hub_event_source_create_or_update_parameters.rb +190 -0
  20. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/event_hub_event_source_resource.rb +202 -0
  21. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/event_hub_event_source_update_parameters.rb +91 -0
  22. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/event_source_common_properties.rb +68 -0
  23. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/event_source_create_or_update_parameters.rb +68 -0
  24. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/event_source_list_response.rb +58 -0
  25. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/event_source_mutable_properties.rb +62 -0
  26. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/event_source_resource.rb +98 -0
  27. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/event_source_update_parameters.rb +55 -0
  28. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/io_thub_event_source_common_properties.rb +107 -0
  29. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/io_thub_event_source_create_or_update_parameters.rb +179 -0
  30. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/io_thub_event_source_resource.rb +191 -0
  31. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/io_thub_event_source_update_parameters.rb +91 -0
  32. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/local_timestamp.rb +67 -0
  33. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/local_timestamp_format.rb +17 -0
  34. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/local_timestamp_time_zone_offset.rb +54 -0
  35. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/operation.rb +62 -0
  36. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/operation_display.rb +86 -0
  37. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/operation_list_result.rb +104 -0
  38. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/provisioning_state.rb +20 -0
  39. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/reference_data_key_property_type.rb +18 -0
  40. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/reference_data_set_create_or_update_parameters.rb +81 -0
  41. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/reference_data_set_key_property.rb +60 -0
  42. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/reference_data_set_list_response.rb +56 -0
  43. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/reference_data_set_resource.rb +138 -0
  44. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/reference_data_set_update_parameters.rb +55 -0
  45. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/resource.rb +80 -0
  46. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/resource_properties.rb +62 -0
  47. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/sku.rb +65 -0
  48. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/sku_name.rb +16 -0
  49. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/storage_limit_exceeded_behavior.rb +16 -0
  50. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/models/tracked_resource.rb +92 -0
  51. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/module_definition.rb +9 -0
  52. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/operations.rb +219 -0
  53. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/reference_data_sets.rb +580 -0
  54. data/lib/2017-02-28-preview/generated/azure_mgmt_time_series_insights/time_series_insights_client.rb +148 -0
  55. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights.rb +83 -0
  56. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/access_policies.rb +571 -0
  57. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/environments.rb +736 -0
  58. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/event_sources.rb +574 -0
  59. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/access_policy_create_or_update_parameters.rb +80 -0
  60. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/access_policy_list_response.rb +56 -0
  61. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/access_policy_resource.rb +109 -0
  62. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/access_policy_role.rb +16 -0
  63. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/access_policy_update_parameters.rb +68 -0
  64. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/azure_event_source_properties.rb +74 -0
  65. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/create_or_update_tracked_resource_properties.rb +67 -0
  66. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/data_string_comparison_behavior.rb +16 -0
  67. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/environment_create_or_update_parameters.rb +123 -0
  68. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/environment_list_response.rb +56 -0
  69. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/environment_resource.rb +218 -0
  70. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/environment_state_details.rb +59 -0
  71. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/environment_status.rb +49 -0
  72. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/environment_update_parameters.rb +118 -0
  73. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/event_hub_event_source_common_properties.rb +117 -0
  74. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/event_hub_event_source_create_or_update_parameters.rb +189 -0
  75. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/event_hub_event_source_resource.rb +201 -0
  76. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/event_hub_event_source_update_parameters.rb +95 -0
  77. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/event_source_common_properties.rb +67 -0
  78. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/event_source_create_or_update_parameters.rb +68 -0
  79. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/event_source_list_response.rb +58 -0
  80. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/event_source_mutable_properties.rb +66 -0
  81. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/event_source_resource.rb +98 -0
  82. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/event_source_update_parameters.rb +55 -0
  83. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/ingress_environment_status.rb +63 -0
  84. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/ingress_state.rb +19 -0
  85. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/io_thub_event_source_common_properties.rb +106 -0
  86. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/io_thub_event_source_create_or_update_parameters.rb +178 -0
  87. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/io_thub_event_source_resource.rb +190 -0
  88. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/io_thub_event_source_update_parameters.rb +95 -0
  89. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/local_timestamp.rb +67 -0
  90. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/local_timestamp_format.rb +17 -0
  91. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/local_timestamp_time_zone_offset.rb +54 -0
  92. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/operation.rb +62 -0
  93. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/operation_display.rb +86 -0
  94. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/operation_list_result.rb +104 -0
  95. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/partition_key_property.rb +59 -0
  96. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/property_type.rb +15 -0
  97. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/provisioning_state.rb +20 -0
  98. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/reference_data_key_property_type.rb +18 -0
  99. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/reference_data_set_create_or_update_parameters.rb +99 -0
  100. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/reference_data_set_key_property.rb +60 -0
  101. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/reference_data_set_list_response.rb +56 -0
  102. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/reference_data_set_resource.rb +155 -0
  103. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/reference_data_set_update_parameters.rb +55 -0
  104. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/resource.rb +80 -0
  105. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/resource_properties.rb +61 -0
  106. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/sku.rb +65 -0
  107. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/sku_name.rb +16 -0
  108. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/storage_limit_exceeded_behavior.rb +16 -0
  109. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/models/tracked_resource.rb +92 -0
  110. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/module_definition.rb +9 -0
  111. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/operations.rb +219 -0
  112. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/reference_data_sets.rb +580 -0
  113. data/lib/2017-11-15/generated/azure_mgmt_time_series_insights/time_series_insights_client.rb +147 -0
  114. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights.rb +95 -0
  115. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/access_policies.rb +571 -0
  116. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/environments.rb +741 -0
  117. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/event_sources.rb +574 -0
  118. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/access_policy_create_or_update_parameters.rb +79 -0
  119. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/access_policy_list_response.rb +56 -0
  120. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/access_policy_resource.rb +108 -0
  121. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/access_policy_role.rb +16 -0
  122. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/access_policy_update_parameters.rb +67 -0
  123. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/azure_event_source_properties.rb +73 -0
  124. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/create_or_update_tracked_resource_properties.rb +67 -0
  125. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/data_string_comparison_behavior.rb +16 -0
  126. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/environment_create_or_update_parameters.rb +83 -0
  127. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/environment_list_response.rb +58 -0
  128. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/environment_resource.rb +111 -0
  129. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/environment_resource_properties.rb +93 -0
  130. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/environment_state_details.rb +59 -0
  131. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/environment_status.rb +62 -0
  132. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/environment_update_parameters.rb +55 -0
  133. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/event_hub_event_source_common_properties.rb +116 -0
  134. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/event_hub_event_source_create_or_update_parameters.rb +188 -0
  135. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/event_hub_event_source_resource.rb +200 -0
  136. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/event_hub_event_source_update_parameters.rb +95 -0
  137. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/event_source_common_properties.rb +66 -0
  138. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/event_source_create_or_update_parameters.rb +68 -0
  139. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/event_source_list_response.rb +58 -0
  140. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/event_source_mutable_properties.rb +66 -0
  141. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/event_source_resource.rb +98 -0
  142. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/event_source_update_parameters.rb +55 -0
  143. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/ingress_environment_status.rb +62 -0
  144. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/ingress_state.rb +19 -0
  145. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/io_thub_event_source_common_properties.rb +105 -0
  146. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/io_thub_event_source_create_or_update_parameters.rb +177 -0
  147. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/io_thub_event_source_resource.rb +189 -0
  148. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/io_thub_event_source_update_parameters.rb +95 -0
  149. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/local_timestamp.rb +66 -0
  150. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/local_timestamp_format.rb +17 -0
  151. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/local_timestamp_time_zone_offset.rb +54 -0
  152. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/long_term_environment_create_or_update_parameters.rb +133 -0
  153. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/long_term_environment_resource.rb +226 -0
  154. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/long_term_environment_update_parameters.rb +79 -0
  155. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/long_term_storage_configuration_input.rb +62 -0
  156. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/long_term_storage_configuration_mutable_properties.rb +51 -0
  157. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/long_term_storage_configuration_output.rb +49 -0
  158. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/operation.rb +62 -0
  159. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/operation_display.rb +86 -0
  160. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/operation_list_result.rb +104 -0
  161. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/property_type.rb +15 -0
  162. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/provisioning_state.rb +20 -0
  163. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/reference_data_key_property_type.rb +18 -0
  164. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/reference_data_set_create_or_update_parameters.rb +98 -0
  165. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/reference_data_set_key_property.rb +59 -0
  166. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/reference_data_set_list_response.rb +56 -0
  167. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/reference_data_set_resource.rb +153 -0
  168. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/reference_data_set_update_parameters.rb +55 -0
  169. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/resource.rb +80 -0
  170. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/resource_properties.rb +60 -0
  171. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/sku.rb +66 -0
  172. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/sku_name.rb +18 -0
  173. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/standard_environment_create_or_update_parameters.rb +135 -0
  174. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/standard_environment_resource.rb +228 -0
  175. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/standard_environment_update_parameters.rb +114 -0
  176. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/storage_limit_exceeded_behavior.rb +16 -0
  177. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/time_series_id_property.rb +59 -0
  178. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/tracked_resource.rb +92 -0
  179. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/warm_storage_environment_status.rb +82 -0
  180. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/models/warm_storage_properties_state.rb +17 -0
  181. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/module_definition.rb +9 -0
  182. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/operations.rb +219 -0
  183. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/reference_data_sets.rb +580 -0
  184. data/lib/2018-08-15-preview/generated/azure_mgmt_time_series_insights/time_series_insights_client.rb +147 -0
  185. data/lib/azure_mgmt_time_series_insights.rb +8 -0
  186. data/lib/module_definition.rb +7 -0
  187. data/lib/profiles/latest/modules/timeseriesinsights_profile_module.rb +321 -0
  188. data/lib/profiles/latest/timeseriesinsights_latest_profile_client.rb +40 -0
  189. data/lib/profiles/latest/timeseriesinsights_module_definition.rb +8 -0
  190. data/lib/version.rb +7 -0
  191. metadata +305 -0
@@ -0,0 +1,730 @@
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::TimeSeriesInsights::Mgmt::V2017_02_28_preview
7
+ #
8
+ # Time Series Insights client
9
+ #
10
+ class Environments
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Environments class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [TimeSeriesInsightsClient] reference to the TimeSeriesInsightsClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Create or update an environment in the specified subscription and resource
26
+ # group.
27
+ #
28
+ # @param resource_group_name [String] Name of an Azure Resource group.
29
+ # @param environment_name [String] Name of the environment
30
+ # @param parameters [EnvironmentCreateOrUpdateParameters] Parameters for
31
+ # creating an environment resource.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [EnvironmentResource] operation results.
36
+ #
37
+ def create_or_update(resource_group_name, environment_name, parameters, custom_headers:nil)
38
+ response = create_or_update_async(resource_group_name, environment_name, parameters, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # @param resource_group_name [String] Name of an Azure Resource group.
44
+ # @param environment_name [String] Name of the environment
45
+ # @param parameters [EnvironmentCreateOrUpdateParameters] Parameters for
46
+ # creating an environment resource.
47
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
48
+ # will be added to the HTTP request.
49
+ #
50
+ # @return [Concurrent::Promise] promise which provides async access to http
51
+ # response.
52
+ #
53
+ def create_or_update_async(resource_group_name, environment_name, parameters, custom_headers:nil)
54
+ # Send request
55
+ promise = begin_create_or_update_async(resource_group_name, environment_name, parameters, custom_headers:custom_headers)
56
+
57
+ promise = promise.then do |response|
58
+ # Defining deserialization method.
59
+ deserialize_method = lambda do |parsed_response|
60
+ result_mapper = Azure::TimeSeriesInsights::Mgmt::V2017_02_28_preview::Models::EnvironmentResource.mapper()
61
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
62
+ end
63
+
64
+ # Waiting for response.
65
+ @client.get_long_running_operation_result(response, deserialize_method)
66
+ end
67
+
68
+ promise
69
+ end
70
+
71
+ #
72
+ # Gets the environment with the specified name in the specified subscription
73
+ # and resource group.
74
+ #
75
+ # @param resource_group_name [String] Name of an Azure Resource group.
76
+ # @param environment_name [String] The name of the Time Series Insights
77
+ # environment associated with the specified resource group.
78
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
79
+ # will be added to the HTTP request.
80
+ #
81
+ # @return [EnvironmentResource] operation results.
82
+ #
83
+ def get(resource_group_name, environment_name, custom_headers:nil)
84
+ response = get_async(resource_group_name, environment_name, custom_headers:custom_headers).value!
85
+ response.body unless response.nil?
86
+ end
87
+
88
+ #
89
+ # Gets the environment with the specified name in the specified subscription
90
+ # and resource group.
91
+ #
92
+ # @param resource_group_name [String] Name of an Azure Resource group.
93
+ # @param environment_name [String] The name of the Time Series Insights
94
+ # environment associated with the specified resource group.
95
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
96
+ # will be added to the HTTP request.
97
+ #
98
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
99
+ #
100
+ def get_with_http_info(resource_group_name, environment_name, custom_headers:nil)
101
+ get_async(resource_group_name, environment_name, custom_headers:custom_headers).value!
102
+ end
103
+
104
+ #
105
+ # Gets the environment with the specified name in the specified subscription
106
+ # and resource group.
107
+ #
108
+ # @param resource_group_name [String] Name of an Azure Resource group.
109
+ # @param environment_name [String] The name of the Time Series Insights
110
+ # environment associated with the specified resource group.
111
+ # @param [Hash{String => String}] A hash of custom headers that will be added
112
+ # to the HTTP request.
113
+ #
114
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
115
+ #
116
+ def get_async(resource_group_name, environment_name, custom_headers:nil)
117
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
118
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
119
+ fail ArgumentError, 'environment_name is nil' if environment_name.nil?
120
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
121
+
122
+
123
+ request_headers = {}
124
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
125
+
126
+ # Set Headers
127
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
128
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
129
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}'
130
+
131
+ request_url = @base_url || @client.base_url
132
+
133
+ options = {
134
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
135
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'environmentName' => environment_name},
136
+ query_params: {'api-version' => @client.api_version},
137
+ headers: request_headers.merge(custom_headers || {}),
138
+ base_url: request_url
139
+ }
140
+ promise = @client.make_request_async(:get, path_template, options)
141
+
142
+ promise = promise.then do |result|
143
+ http_response = result.response
144
+ status_code = http_response.status
145
+ response_content = http_response.body
146
+ unless status_code == 200
147
+ error_model = JSON.load(response_content)
148
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
149
+ end
150
+
151
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
152
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
153
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
154
+ # Deserialize Response
155
+ if status_code == 200
156
+ begin
157
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
158
+ result_mapper = Azure::TimeSeriesInsights::Mgmt::V2017_02_28_preview::Models::EnvironmentResource.mapper()
159
+ result.body = @client.deserialize(result_mapper, parsed_response)
160
+ rescue Exception => e
161
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
162
+ end
163
+ end
164
+
165
+ result
166
+ end
167
+
168
+ promise.execute
169
+ end
170
+
171
+ #
172
+ # Updates the environment with the specified name in the specified subscription
173
+ # and resource group.
174
+ #
175
+ # @param resource_group_name [String] Name of an Azure Resource group.
176
+ # @param environment_name [String] The name of the Time Series Insights
177
+ # environment associated with the specified resource group.
178
+ # @param environment_update_parameters [EnvironmentUpdateParameters] Request
179
+ # object that contains the updated information for the environment.
180
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
181
+ # will be added to the HTTP request.
182
+ #
183
+ # @return [EnvironmentResource] operation results.
184
+ #
185
+ def update(resource_group_name, environment_name, environment_update_parameters, custom_headers:nil)
186
+ response = update_async(resource_group_name, environment_name, environment_update_parameters, custom_headers:custom_headers).value!
187
+ response.body unless response.nil?
188
+ end
189
+
190
+ #
191
+ # @param resource_group_name [String] Name of an Azure Resource group.
192
+ # @param environment_name [String] The name of the Time Series Insights
193
+ # environment associated with the specified resource group.
194
+ # @param environment_update_parameters [EnvironmentUpdateParameters] Request
195
+ # object that contains the updated information for the environment.
196
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
197
+ # will be added to the HTTP request.
198
+ #
199
+ # @return [Concurrent::Promise] promise which provides async access to http
200
+ # response.
201
+ #
202
+ def update_async(resource_group_name, environment_name, environment_update_parameters, custom_headers:nil)
203
+ # Send request
204
+ promise = begin_update_async(resource_group_name, environment_name, environment_update_parameters, custom_headers:custom_headers)
205
+
206
+ promise = promise.then do |response|
207
+ # Defining deserialization method.
208
+ deserialize_method = lambda do |parsed_response|
209
+ result_mapper = Azure::TimeSeriesInsights::Mgmt::V2017_02_28_preview::Models::EnvironmentResource.mapper()
210
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
211
+ end
212
+
213
+ # Waiting for response.
214
+ @client.get_long_running_operation_result(response, deserialize_method)
215
+ end
216
+
217
+ promise
218
+ end
219
+
220
+ #
221
+ # Deletes the environment with the specified name in the specified subscription
222
+ # and resource group.
223
+ #
224
+ # @param resource_group_name [String] Name of an Azure Resource group.
225
+ # @param environment_name [String] The name of the Time Series Insights
226
+ # environment associated with the specified resource group.
227
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
228
+ # will be added to the HTTP request.
229
+ #
230
+ #
231
+ def delete(resource_group_name, environment_name, custom_headers:nil)
232
+ response = delete_async(resource_group_name, environment_name, custom_headers:custom_headers).value!
233
+ nil
234
+ end
235
+
236
+ #
237
+ # Deletes the environment with the specified name in the specified subscription
238
+ # and resource group.
239
+ #
240
+ # @param resource_group_name [String] Name of an Azure Resource group.
241
+ # @param environment_name [String] The name of the Time Series Insights
242
+ # environment associated with the specified resource group.
243
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
244
+ # will be added to the HTTP request.
245
+ #
246
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
247
+ #
248
+ def delete_with_http_info(resource_group_name, environment_name, custom_headers:nil)
249
+ delete_async(resource_group_name, environment_name, custom_headers:custom_headers).value!
250
+ end
251
+
252
+ #
253
+ # Deletes the environment with the specified name in the specified subscription
254
+ # and resource group.
255
+ #
256
+ # @param resource_group_name [String] Name of an Azure Resource group.
257
+ # @param environment_name [String] The name of the Time Series Insights
258
+ # environment associated with the specified resource group.
259
+ # @param [Hash{String => String}] A hash of custom headers that will be added
260
+ # to the HTTP request.
261
+ #
262
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
263
+ #
264
+ def delete_async(resource_group_name, environment_name, custom_headers:nil)
265
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
266
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
267
+ fail ArgumentError, 'environment_name is nil' if environment_name.nil?
268
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
269
+
270
+
271
+ request_headers = {}
272
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
273
+
274
+ # Set Headers
275
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
276
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
277
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}'
278
+
279
+ request_url = @base_url || @client.base_url
280
+
281
+ options = {
282
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
283
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'environmentName' => environment_name},
284
+ query_params: {'api-version' => @client.api_version},
285
+ headers: request_headers.merge(custom_headers || {}),
286
+ base_url: request_url
287
+ }
288
+ promise = @client.make_request_async(:delete, path_template, options)
289
+
290
+ promise = promise.then do |result|
291
+ http_response = result.response
292
+ status_code = http_response.status
293
+ response_content = http_response.body
294
+ unless status_code == 200 || status_code == 204
295
+ error_model = JSON.load(response_content)
296
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
297
+ end
298
+
299
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
300
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
301
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
302
+
303
+ result
304
+ end
305
+
306
+ promise.execute
307
+ end
308
+
309
+ #
310
+ # Lists all the available environments associated with the subscription and
311
+ # within the specified resource group.
312
+ #
313
+ # @param resource_group_name [String] Name of an Azure Resource group.
314
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
315
+ # will be added to the HTTP request.
316
+ #
317
+ # @return [EnvironmentListResponse] operation results.
318
+ #
319
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
320
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
321
+ response.body unless response.nil?
322
+ end
323
+
324
+ #
325
+ # Lists all the available environments associated with the subscription and
326
+ # within the specified resource group.
327
+ #
328
+ # @param resource_group_name [String] Name of an Azure Resource group.
329
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
330
+ # will be added to the HTTP request.
331
+ #
332
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
333
+ #
334
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
335
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
336
+ end
337
+
338
+ #
339
+ # Lists all the available environments associated with the subscription and
340
+ # within the specified resource group.
341
+ #
342
+ # @param resource_group_name [String] Name of an Azure Resource group.
343
+ # @param [Hash{String => String}] A hash of custom headers that will be added
344
+ # to the HTTP request.
345
+ #
346
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
347
+ #
348
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
349
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
350
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
351
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
352
+
353
+
354
+ request_headers = {}
355
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
356
+
357
+ # Set Headers
358
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
359
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
360
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments'
361
+
362
+ request_url = @base_url || @client.base_url
363
+
364
+ options = {
365
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
366
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
367
+ query_params: {'api-version' => @client.api_version},
368
+ headers: request_headers.merge(custom_headers || {}),
369
+ base_url: request_url
370
+ }
371
+ promise = @client.make_request_async(:get, path_template, options)
372
+
373
+ promise = promise.then do |result|
374
+ http_response = result.response
375
+ status_code = http_response.status
376
+ response_content = http_response.body
377
+ unless status_code == 200
378
+ error_model = JSON.load(response_content)
379
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
380
+ end
381
+
382
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
383
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
384
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
385
+ # Deserialize Response
386
+ if status_code == 200
387
+ begin
388
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
389
+ result_mapper = Azure::TimeSeriesInsights::Mgmt::V2017_02_28_preview::Models::EnvironmentListResponse.mapper()
390
+ result.body = @client.deserialize(result_mapper, parsed_response)
391
+ rescue Exception => e
392
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
393
+ end
394
+ end
395
+
396
+ result
397
+ end
398
+
399
+ promise.execute
400
+ end
401
+
402
+ #
403
+ # Lists all the available environments within a subscription, irrespective of
404
+ # the resource groups.
405
+ #
406
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
407
+ # will be added to the HTTP request.
408
+ #
409
+ # @return [EnvironmentListResponse] operation results.
410
+ #
411
+ def list_by_subscription(custom_headers:nil)
412
+ response = list_by_subscription_async(custom_headers:custom_headers).value!
413
+ response.body unless response.nil?
414
+ end
415
+
416
+ #
417
+ # Lists all the available environments within a subscription, irrespective of
418
+ # the resource groups.
419
+ #
420
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
421
+ # will be added to the HTTP request.
422
+ #
423
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
424
+ #
425
+ def list_by_subscription_with_http_info(custom_headers:nil)
426
+ list_by_subscription_async(custom_headers:custom_headers).value!
427
+ end
428
+
429
+ #
430
+ # Lists all the available environments within a subscription, irrespective of
431
+ # the resource groups.
432
+ #
433
+ # @param [Hash{String => String}] A hash of custom headers that will be added
434
+ # to the HTTP request.
435
+ #
436
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
437
+ #
438
+ def list_by_subscription_async(custom_headers:nil)
439
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
440
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
441
+
442
+
443
+ request_headers = {}
444
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
445
+
446
+ # Set Headers
447
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
448
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
449
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.TimeSeriesInsights/environments'
450
+
451
+ request_url = @base_url || @client.base_url
452
+
453
+ options = {
454
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
455
+ path_params: {'subscriptionId' => @client.subscription_id},
456
+ query_params: {'api-version' => @client.api_version},
457
+ headers: request_headers.merge(custom_headers || {}),
458
+ base_url: request_url
459
+ }
460
+ promise = @client.make_request_async(:get, path_template, options)
461
+
462
+ promise = promise.then do |result|
463
+ http_response = result.response
464
+ status_code = http_response.status
465
+ response_content = http_response.body
466
+ unless status_code == 200
467
+ error_model = JSON.load(response_content)
468
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
469
+ end
470
+
471
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
472
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
473
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
474
+ # Deserialize Response
475
+ if status_code == 200
476
+ begin
477
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
478
+ result_mapper = Azure::TimeSeriesInsights::Mgmt::V2017_02_28_preview::Models::EnvironmentListResponse.mapper()
479
+ result.body = @client.deserialize(result_mapper, parsed_response)
480
+ rescue Exception => e
481
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
482
+ end
483
+ end
484
+
485
+ result
486
+ end
487
+
488
+ promise.execute
489
+ end
490
+
491
+ #
492
+ # Create or update an environment in the specified subscription and resource
493
+ # group.
494
+ #
495
+ # @param resource_group_name [String] Name of an Azure Resource group.
496
+ # @param environment_name [String] Name of the environment
497
+ # @param parameters [EnvironmentCreateOrUpdateParameters] Parameters for
498
+ # creating an environment resource.
499
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
500
+ # will be added to the HTTP request.
501
+ #
502
+ # @return [EnvironmentResource] operation results.
503
+ #
504
+ def begin_create_or_update(resource_group_name, environment_name, parameters, custom_headers:nil)
505
+ response = begin_create_or_update_async(resource_group_name, environment_name, parameters, custom_headers:custom_headers).value!
506
+ response.body unless response.nil?
507
+ end
508
+
509
+ #
510
+ # Create or update an environment in the specified subscription and resource
511
+ # group.
512
+ #
513
+ # @param resource_group_name [String] Name of an Azure Resource group.
514
+ # @param environment_name [String] Name of the environment
515
+ # @param parameters [EnvironmentCreateOrUpdateParameters] Parameters for
516
+ # creating an environment resource.
517
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
518
+ # will be added to the HTTP request.
519
+ #
520
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
521
+ #
522
+ def begin_create_or_update_with_http_info(resource_group_name, environment_name, parameters, custom_headers:nil)
523
+ begin_create_or_update_async(resource_group_name, environment_name, parameters, custom_headers:custom_headers).value!
524
+ end
525
+
526
+ #
527
+ # Create or update an environment in the specified subscription and resource
528
+ # group.
529
+ #
530
+ # @param resource_group_name [String] Name of an Azure Resource group.
531
+ # @param environment_name [String] Name of the environment
532
+ # @param parameters [EnvironmentCreateOrUpdateParameters] Parameters for
533
+ # creating an environment resource.
534
+ # @param [Hash{String => String}] A hash of custom headers that will be added
535
+ # to the HTTP request.
536
+ #
537
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
538
+ #
539
+ def begin_create_or_update_async(resource_group_name, environment_name, parameters, custom_headers:nil)
540
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
541
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
542
+ fail ArgumentError, 'environment_name is nil' if environment_name.nil?
543
+ fail ArgumentError, "'environment_name' should satisfy the constraint - 'MaxLength': '90'" if !environment_name.nil? && environment_name.length > 90
544
+ fail ArgumentError, "'environment_name' should satisfy the constraint - 'MinLength': '1'" if !environment_name.nil? && environment_name.length < 1
545
+ fail ArgumentError, "'environment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !environment_name.nil? && environment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
546
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
547
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
548
+
549
+
550
+ request_headers = {}
551
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
552
+
553
+ # Set Headers
554
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
555
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
556
+
557
+ # Serialize Request
558
+ request_mapper = Azure::TimeSeriesInsights::Mgmt::V2017_02_28_preview::Models::EnvironmentCreateOrUpdateParameters.mapper()
559
+ request_content = @client.serialize(request_mapper, parameters)
560
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
561
+
562
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}'
563
+
564
+ request_url = @base_url || @client.base_url
565
+
566
+ options = {
567
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
568
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'environmentName' => environment_name},
569
+ query_params: {'api-version' => @client.api_version},
570
+ body: request_content,
571
+ headers: request_headers.merge(custom_headers || {}),
572
+ base_url: request_url
573
+ }
574
+ promise = @client.make_request_async(:put, path_template, options)
575
+
576
+ promise = promise.then do |result|
577
+ http_response = result.response
578
+ status_code = http_response.status
579
+ response_content = http_response.body
580
+ unless status_code == 200 || status_code == 201 || status_code == 404
581
+ error_model = JSON.load(response_content)
582
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
583
+ end
584
+
585
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
586
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
587
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
588
+ # Deserialize Response
589
+ if status_code == 200
590
+ begin
591
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
592
+ result_mapper = Azure::TimeSeriesInsights::Mgmt::V2017_02_28_preview::Models::EnvironmentResource.mapper()
593
+ result.body = @client.deserialize(result_mapper, parsed_response)
594
+ rescue Exception => e
595
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
596
+ end
597
+ end
598
+ # Deserialize Response
599
+ if status_code == 201
600
+ begin
601
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
602
+ result_mapper = Azure::TimeSeriesInsights::Mgmt::V2017_02_28_preview::Models::EnvironmentResource.mapper()
603
+ result.body = @client.deserialize(result_mapper, parsed_response)
604
+ rescue Exception => e
605
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
606
+ end
607
+ end
608
+
609
+ result
610
+ end
611
+
612
+ promise.execute
613
+ end
614
+
615
+ #
616
+ # Updates the environment with the specified name in the specified subscription
617
+ # and resource group.
618
+ #
619
+ # @param resource_group_name [String] Name of an Azure Resource group.
620
+ # @param environment_name [String] The name of the Time Series Insights
621
+ # environment associated with the specified resource group.
622
+ # @param environment_update_parameters [EnvironmentUpdateParameters] Request
623
+ # object that contains the updated information for the environment.
624
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
625
+ # will be added to the HTTP request.
626
+ #
627
+ # @return [EnvironmentResource] operation results.
628
+ #
629
+ def begin_update(resource_group_name, environment_name, environment_update_parameters, custom_headers:nil)
630
+ response = begin_update_async(resource_group_name, environment_name, environment_update_parameters, custom_headers:custom_headers).value!
631
+ response.body unless response.nil?
632
+ end
633
+
634
+ #
635
+ # Updates the environment with the specified name in the specified subscription
636
+ # and resource group.
637
+ #
638
+ # @param resource_group_name [String] Name of an Azure Resource group.
639
+ # @param environment_name [String] The name of the Time Series Insights
640
+ # environment associated with the specified resource group.
641
+ # @param environment_update_parameters [EnvironmentUpdateParameters] Request
642
+ # object that contains the updated information for the environment.
643
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
644
+ # will be added to the HTTP request.
645
+ #
646
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
647
+ #
648
+ def begin_update_with_http_info(resource_group_name, environment_name, environment_update_parameters, custom_headers:nil)
649
+ begin_update_async(resource_group_name, environment_name, environment_update_parameters, custom_headers:custom_headers).value!
650
+ end
651
+
652
+ #
653
+ # Updates the environment with the specified name in the specified subscription
654
+ # and resource group.
655
+ #
656
+ # @param resource_group_name [String] Name of an Azure Resource group.
657
+ # @param environment_name [String] The name of the Time Series Insights
658
+ # environment associated with the specified resource group.
659
+ # @param environment_update_parameters [EnvironmentUpdateParameters] Request
660
+ # object that contains the updated information for the environment.
661
+ # @param [Hash{String => String}] A hash of custom headers that will be added
662
+ # to the HTTP request.
663
+ #
664
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
665
+ #
666
+ def begin_update_async(resource_group_name, environment_name, environment_update_parameters, custom_headers:nil)
667
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
668
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
669
+ fail ArgumentError, 'environment_name is nil' if environment_name.nil?
670
+ fail ArgumentError, 'environment_update_parameters is nil' if environment_update_parameters.nil?
671
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
672
+
673
+
674
+ request_headers = {}
675
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
676
+
677
+ # Set Headers
678
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
679
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
680
+
681
+ # Serialize Request
682
+ request_mapper = Azure::TimeSeriesInsights::Mgmt::V2017_02_28_preview::Models::EnvironmentUpdateParameters.mapper()
683
+ request_content = @client.serialize(request_mapper, environment_update_parameters)
684
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
685
+
686
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}'
687
+
688
+ request_url = @base_url || @client.base_url
689
+
690
+ options = {
691
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
692
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'environmentName' => environment_name},
693
+ query_params: {'api-version' => @client.api_version},
694
+ body: request_content,
695
+ headers: request_headers.merge(custom_headers || {}),
696
+ base_url: request_url
697
+ }
698
+ promise = @client.make_request_async(:patch, path_template, options)
699
+
700
+ promise = promise.then do |result|
701
+ http_response = result.response
702
+ status_code = http_response.status
703
+ response_content = http_response.body
704
+ unless status_code == 200
705
+ error_model = JSON.load(response_content)
706
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
707
+ end
708
+
709
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
710
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
711
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
712
+ # Deserialize Response
713
+ if status_code == 200
714
+ begin
715
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
716
+ result_mapper = Azure::TimeSeriesInsights::Mgmt::V2017_02_28_preview::Models::EnvironmentResource.mapper()
717
+ result.body = @client.deserialize(result_mapper, parsed_response)
718
+ rescue Exception => e
719
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
720
+ end
721
+ end
722
+
723
+ result
724
+ end
725
+
726
+ promise.execute
727
+ end
728
+
729
+ end
730
+ end