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