azure_mgmt_batchai 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai.rb +107 -0
  4. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/batch_aimanagement_client.rb +143 -0
  5. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb +1261 -0
  6. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/file_servers.rb +918 -0
  7. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/jobs.rb +1536 -0
  8. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/allocation_state.rb +16 -0
  9. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/auto_scale_settings.rb +75 -0
  10. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/azure_blob_file_system_reference.rb +97 -0
  11. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/azure_file_share_reference.rb +109 -0
  12. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/azure_storage_credentials_info.rb +63 -0
  13. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/batch_aierror.rb +80 -0
  14. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/caching_type.rb +17 -0
  15. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/caffe2settings.rb +70 -0
  16. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/caffe_settings.rb +97 -0
  17. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/chainer_settings.rb +83 -0
  18. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/cluster.rb +310 -0
  19. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/cluster_create_parameters.rb +161 -0
  20. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/cluster_list_result.rb +98 -0
  21. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/cluster_update_parameters.rb +67 -0
  22. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/clusters_list_by_resource_group_options.rb +69 -0
  23. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/clusters_list_options.rb +69 -0
  24. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/cntksettings.rb +110 -0
  25. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/container_settings.rb +47 -0
  26. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/custom_toolkit_settings.rb +46 -0
  27. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/data_disks.rb +88 -0
  28. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/deallocation_option.rb +18 -0
  29. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/environment_setting.rb +57 -0
  30. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/execution_state.rb +19 -0
  31. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file.rb +85 -0
  32. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_list_result.rb +99 -0
  33. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_server.rb +197 -0
  34. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_server_create_parameters.rb +116 -0
  35. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_server_list_result.rb +98 -0
  36. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_server_provisioning_state.rb +19 -0
  37. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_server_reference.rb +85 -0
  38. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_server_type.rb +16 -0
  39. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_servers_list_by_resource_group_options.rb +69 -0
  40. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_servers_list_options.rb +69 -0
  41. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/image_reference.rb +79 -0
  42. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/image_source_registry.rb +70 -0
  43. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/input_directory.rb +62 -0
  44. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/job.rb +427 -0
  45. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/job_base_properties_constraints.rb +48 -0
  46. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/job_create_parameters.rb +313 -0
  47. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/job_list_result.rb +98 -0
  48. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/job_preparation.rb +48 -0
  49. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/job_properties_constraints.rb +48 -0
  50. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/job_properties_execution_info.rb +96 -0
  51. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/jobs_list_by_resource_group_options.rb +69 -0
  52. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/jobs_list_options.rb +69 -0
  53. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/jobs_list_output_files_options.rb +71 -0
  54. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/key_vault_key_reference.rb +58 -0
  55. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/key_vault_secret_reference.rb +58 -0
  56. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/local_data_volume.rb +59 -0
  57. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/manual_scale_settings.rb +65 -0
  58. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/mount_settings.rb +81 -0
  59. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/mount_volumes.rb +121 -0
  60. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/name_value_pair.rb +57 -0
  61. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/node_setup.rb +67 -0
  62. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/node_state_counts.rb +91 -0
  63. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/operation.rb +83 -0
  64. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/operation_display.rb +80 -0
  65. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/operation_list_result.rb +99 -0
  66. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/output_directory.rb +104 -0
  67. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/output_type.rb +18 -0
  68. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/private_registry_credentials.rb +73 -0
  69. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/provisioning_state.rb +18 -0
  70. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/remote_login_information.rb +68 -0
  71. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/remote_login_information_list_result.rb +99 -0
  72. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/resource.rb +112 -0
  73. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/resource_id.rb +47 -0
  74. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/scale_settings.rb +64 -0
  75. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/setup_task.rb +92 -0
  76. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/ssh_configuration.rb +68 -0
  77. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/storage_account_type.rb +16 -0
  78. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/tensor_flow_settings.rb +123 -0
  79. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/tool_type.rb +20 -0
  80. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/unmanaged_file_system_reference.rb +59 -0
  81. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/user_account_settings.rb +71 -0
  82. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/virtual_machine_configuration.rb +47 -0
  83. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/vm_priority.rb +16 -0
  84. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/module_definition.rb +9 -0
  85. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/operations.rb +219 -0
  86. data/lib/2018-03-01/generated/azure_mgmt_batchai.rb +115 -0
  87. data/lib/2018-03-01/generated/azure_mgmt_batchai/batch_aimanagement_client.rb +147 -0
  88. data/lib/2018-03-01/generated/azure_mgmt_batchai/clusters.rb +1261 -0
  89. data/lib/2018-03-01/generated/azure_mgmt_batchai/file_servers.rb +918 -0
  90. data/lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb +1547 -0
  91. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/allocation_state.rb +16 -0
  92. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/app_insights_reference.rb +77 -0
  93. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/auto_scale_settings.rb +75 -0
  94. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/azure_blob_file_system_reference.rb +99 -0
  95. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/azure_file_share_reference.rb +110 -0
  96. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/azure_storage_credentials_info.rb +63 -0
  97. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/batch_aierror.rb +80 -0
  98. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/caching_type.rb +17 -0
  99. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/caffe2settings.rb +70 -0
  100. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/caffe_settings.rb +97 -0
  101. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/chainer_settings.rb +83 -0
  102. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/cluster.rb +310 -0
  103. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/cluster_create_parameters.rb +161 -0
  104. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/cluster_list_result.rb +98 -0
  105. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/cluster_update_parameters.rb +67 -0
  106. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/clusters_list_by_resource_group_options.rb +69 -0
  107. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/clusters_list_options.rb +69 -0
  108. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/cntksettings.rb +110 -0
  109. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/container_settings.rb +47 -0
  110. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/custom_toolkit_settings.rb +46 -0
  111. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/data_disks.rb +87 -0
  112. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/deallocation_option.rb +18 -0
  113. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/environment_variable.rb +57 -0
  114. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/environment_variable_with_secret_value.rb +75 -0
  115. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/execution_state.rb +19 -0
  116. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file.rb +92 -0
  117. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_list_result.rb +100 -0
  118. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_server.rb +197 -0
  119. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_server_create_parameters.rb +116 -0
  120. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_server_list_result.rb +98 -0
  121. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_server_provisioning_state.rb +19 -0
  122. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_server_reference.rb +86 -0
  123. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_server_type.rb +16 -0
  124. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_servers_list_by_resource_group_options.rb +69 -0
  125. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_servers_list_options.rb +69 -0
  126. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/image_reference.rb +99 -0
  127. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/image_source_registry.rb +70 -0
  128. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/input_directory.rb +59 -0
  129. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/job.rb +490 -0
  130. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/job_base_properties_constraints.rb +48 -0
  131. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/job_create_parameters.rb +360 -0
  132. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/job_list_result.rb +98 -0
  133. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/job_preparation.rb +48 -0
  134. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/job_properties_constraints.rb +48 -0
  135. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/job_properties_execution_info.rb +96 -0
  136. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/jobs_list_by_resource_group_options.rb +69 -0
  137. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/jobs_list_options.rb +69 -0
  138. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/jobs_list_output_files_options.rb +82 -0
  139. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/key_vault_key_reference.rb +58 -0
  140. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/key_vault_secret_reference.rb +58 -0
  141. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/list_usages_result.rb +100 -0
  142. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/local_data_volume.rb +59 -0
  143. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/manual_scale_settings.rb +65 -0
  144. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/mount_settings.rb +81 -0
  145. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/mount_volumes.rb +121 -0
  146. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/name_value_pair.rb +57 -0
  147. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/node_setup.rb +82 -0
  148. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/node_state_counts.rb +91 -0
  149. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/operation.rb +83 -0
  150. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/operation_display.rb +80 -0
  151. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/operation_list_result.rb +99 -0
  152. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/output_directory.rb +110 -0
  153. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/output_type.rb +18 -0
  154. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/performance_counters_settings.rb +50 -0
  155. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/private_registry_credentials.rb +73 -0
  156. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/provisioning_state.rb +18 -0
  157. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/py_torch_settings.rb +95 -0
  158. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/remote_login_information.rb +68 -0
  159. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/remote_login_information_list_result.rb +99 -0
  160. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/resource.rb +112 -0
  161. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/resource_id.rb +47 -0
  162. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/scale_settings.rb +64 -0
  163. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/setup_task.rb +134 -0
  164. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/ssh_configuration.rb +69 -0
  165. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/storage_account_type.rb +16 -0
  166. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/tensor_flow_settings.rb +123 -0
  167. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/tool_type.rb +20 -0
  168. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/unmanaged_file_system_reference.rb +61 -0
  169. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/usage.rb +83 -0
  170. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/usage_name.rb +57 -0
  171. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/user_account_settings.rb +71 -0
  172. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/virtual_machine_configuration.rb +47 -0
  173. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/vm_priority.rb +16 -0
  174. data/lib/2018-03-01/generated/azure_mgmt_batchai/module_definition.rb +9 -0
  175. data/lib/2018-03-01/generated/azure_mgmt_batchai/operations.rb +219 -0
  176. data/lib/2018-03-01/generated/azure_mgmt_batchai/usage_operations.rb +234 -0
  177. data/lib/2018-05-01/generated/azure_mgmt_batchai.rb +125 -0
  178. data/lib/2018-05-01/generated/azure_mgmt_batchai/batch_aimanagement_client.rb +155 -0
  179. data/lib/2018-05-01/generated/azure_mgmt_batchai/clusters.rb +1122 -0
  180. data/lib/2018-05-01/generated/azure_mgmt_batchai/experiments.rb +712 -0
  181. data/lib/2018-05-01/generated/azure_mgmt_batchai/file_servers.rb +743 -0
  182. data/lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb +1560 -0
  183. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/allocation_state.rb +16 -0
  184. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/app_insights_reference.rb +76 -0
  185. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/auto_scale_settings.rb +77 -0
  186. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/azure_blob_file_system_reference.rb +98 -0
  187. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/azure_file_share_reference.rb +111 -0
  188. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/azure_storage_credentials_info.rb +61 -0
  189. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/batch_aierror.rb +83 -0
  190. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/caching_type.rb +17 -0
  191. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/caffe2settings.rb +70 -0
  192. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/caffe_settings.rb +97 -0
  193. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/chainer_settings.rb +83 -0
  194. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/cluster.rb +279 -0
  195. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/cluster_create_parameters.rb +134 -0
  196. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/cluster_list_result.rb +100 -0
  197. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/cluster_update_parameters.rb +48 -0
  198. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/clusters_list_by_workspace_options.rb +47 -0
  199. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/cntksettings.rb +111 -0
  200. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/container_settings.rb +60 -0
  201. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/custom_mpi_settings.rb +60 -0
  202. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/custom_toolkit_settings.rb +47 -0
  203. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/data_disks.rb +92 -0
  204. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/deallocation_option.rb +17 -0
  205. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/environment_variable.rb +57 -0
  206. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/environment_variable_with_secret_value.rb +73 -0
  207. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/execution_state.rb +19 -0
  208. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/experiment.rb +101 -0
  209. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/experiment_list_result.rb +100 -0
  210. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/experiments_list_by_workspace_options.rb +47 -0
  211. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file.rb +98 -0
  212. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_list_result.rb +101 -0
  213. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_server.rb +171 -0
  214. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_server_create_parameters.rb +88 -0
  215. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_server_list_result.rb +99 -0
  216. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_server_provisioning_state.rb +19 -0
  217. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_server_reference.rb +88 -0
  218. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_servers_list_by_workspace_options.rb +47 -0
  219. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_type.rb +16 -0
  220. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/horovod_settings.rb +83 -0
  221. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/image_reference.rb +99 -0
  222. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/image_source_registry.rb +70 -0
  223. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/input_directory.rb +59 -0
  224. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job.rb +490 -0
  225. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job_base_properties_constraints.rb +48 -0
  226. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job_create_parameters.rb +340 -0
  227. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job_list_result.rb +100 -0
  228. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job_preparation.rb +49 -0
  229. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job_priority.rb +17 -0
  230. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job_properties_constraints.rb +48 -0
  231. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job_properties_execution_info.rb +99 -0
  232. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/jobs_list_by_experiment_options.rb +47 -0
  233. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/jobs_list_output_files_options.rb +82 -0
  234. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/key_vault_secret_reference.rb +60 -0
  235. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/list_usages_result.rb +102 -0
  236. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/manual_scale_settings.rb +63 -0
  237. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/mount_settings.rb +71 -0
  238. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/mount_volumes.rb +122 -0
  239. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/name_value_pair.rb +57 -0
  240. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/node_setup.rb +79 -0
  241. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/node_state_counts.rb +100 -0
  242. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/operation.rb +85 -0
  243. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/operation_display.rb +84 -0
  244. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/operation_list_result.rb +101 -0
  245. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/output_directory.rb +77 -0
  246. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/performance_counters_settings.rb +50 -0
  247. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/private_registry_credentials.rb +74 -0
  248. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/provisioning_state.rb +18 -0
  249. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/proxy_resource.rb +71 -0
  250. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/py_torch_settings.rb +96 -0
  251. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/remote_login_information.rb +71 -0
  252. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/remote_login_information_list_result.rb +101 -0
  253. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/resource.rb +112 -0
  254. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/resource_id.rb +47 -0
  255. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/scale_settings.rb +64 -0
  256. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/setup_task.rb +124 -0
  257. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/ssh_configuration.rb +70 -0
  258. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/storage_account_type.rb +16 -0
  259. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/tensor_flow_settings.rb +126 -0
  260. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/tool_type.rb +22 -0
  261. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/unmanaged_file_system_reference.rb +62 -0
  262. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/usage.rb +85 -0
  263. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/usage_name.rb +59 -0
  264. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/usage_unit.rb +15 -0
  265. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/user_account_settings.rb +71 -0
  266. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/virtual_machine_configuration.rb +48 -0
  267. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/vm_priority.rb +16 -0
  268. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/workspace.rb +127 -0
  269. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/workspace_create_parameters.rb +66 -0
  270. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/workspace_list_result.rb +100 -0
  271. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/workspace_update_parameters.rb +55 -0
  272. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/workspaces_list_by_resource_group_options.rb +47 -0
  273. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/workspaces_list_options.rb +47 -0
  274. data/lib/2018-05-01/generated/azure_mgmt_batchai/module_definition.rb +9 -0
  275. data/lib/2018-05-01/generated/azure_mgmt_batchai/operations.rb +219 -0
  276. data/lib/2018-05-01/generated/azure_mgmt_batchai/usages.rb +234 -0
  277. data/lib/2018-05-01/generated/azure_mgmt_batchai/workspaces.rb +991 -0
  278. data/lib/azure_mgmt_batchai.rb +8 -0
  279. data/lib/module_definition.rb +7 -0
  280. data/lib/profiles/latest/batchai_latest_profile_client.rb +40 -0
  281. data/lib/profiles/latest/batchai_module_definition.rb +8 -0
  282. data/lib/profiles/latest/modules/batchai_profile_module.rb +437 -0
  283. data/lib/version.rb +7 -0
  284. metadata +399 -0
@@ -0,0 +1,234 @@
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::BatchAI::Mgmt::V2018_05_01
7
+ #
8
+ # The Azure BatchAI Management API.
9
+ #
10
+ class Usages
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Usages class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [BatchAIManagementClient] reference to the BatchAIManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets the current usage information as well as limits for Batch AI resources
26
+ # for given subscription.
27
+ #
28
+ # @param location [String] The location for which resource usage is queried.
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [Array<Usage>] operation results.
33
+ #
34
+ def list(location, custom_headers:nil)
35
+ first_page = list_as_lazy(location, custom_headers:custom_headers)
36
+ first_page.get_all_items
37
+ end
38
+
39
+ #
40
+ # Gets the current usage information as well as limits for Batch AI resources
41
+ # for given subscription.
42
+ #
43
+ # @param location [String] The location for which resource usage is queried.
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_with_http_info(location, custom_headers:nil)
50
+ list_async(location, custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Gets the current usage information as well as limits for Batch AI resources
55
+ # for given subscription.
56
+ #
57
+ # @param location [String] The location for which resource usage is queried.
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_async(location, custom_headers:nil)
64
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
65
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
66
+ fail ArgumentError, 'location is nil' if location.nil?
67
+ fail ArgumentError, "'location' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !location.nil? && location.match(Regexp.new('^^[-\w\._]+$$')).nil?
68
+
69
+
70
+ request_headers = {}
71
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
72
+
73
+ # Set Headers
74
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
75
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
76
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.BatchAI/locations/{location}/usages'
77
+
78
+ request_url = @base_url || @client.base_url
79
+
80
+ options = {
81
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
82
+ path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
83
+ query_params: {'api-version' => @client.api_version},
84
+ headers: request_headers.merge(custom_headers || {}),
85
+ base_url: request_url
86
+ }
87
+ promise = @client.make_request_async(:get, path_template, options)
88
+
89
+ promise = promise.then do |result|
90
+ http_response = result.response
91
+ status_code = http_response.status
92
+ response_content = http_response.body
93
+ unless status_code == 200
94
+ error_model = JSON.load(response_content)
95
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
96
+ end
97
+
98
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
99
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
100
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
101
+ # Deserialize Response
102
+ if status_code == 200
103
+ begin
104
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
105
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::ListUsagesResult.mapper()
106
+ result.body = @client.deserialize(result_mapper, parsed_response)
107
+ rescue Exception => e
108
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
109
+ end
110
+ end
111
+
112
+ result
113
+ end
114
+
115
+ promise.execute
116
+ end
117
+
118
+ #
119
+ # Gets the current usage information as well as limits for Batch AI resources
120
+ # for given subscription.
121
+ #
122
+ # @param next_page_link [String] The NextLink from the previous successful call
123
+ # to List operation.
124
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
125
+ # will be added to the HTTP request.
126
+ #
127
+ # @return [ListUsagesResult] operation results.
128
+ #
129
+ def list_next(next_page_link, custom_headers:nil)
130
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
131
+ response.body unless response.nil?
132
+ end
133
+
134
+ #
135
+ # Gets the current usage information as well as limits for Batch AI resources
136
+ # for given subscription.
137
+ #
138
+ # @param next_page_link [String] The NextLink from the previous successful call
139
+ # to List operation.
140
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
141
+ # will be added to the HTTP request.
142
+ #
143
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
144
+ #
145
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
146
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
147
+ end
148
+
149
+ #
150
+ # Gets the current usage information as well as limits for Batch AI resources
151
+ # for given subscription.
152
+ #
153
+ # @param next_page_link [String] The NextLink from the previous successful call
154
+ # to List operation.
155
+ # @param [Hash{String => String}] A hash of custom headers that will be added
156
+ # to the HTTP request.
157
+ #
158
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
159
+ #
160
+ def list_next_async(next_page_link, custom_headers:nil)
161
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
162
+
163
+
164
+ request_headers = {}
165
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
166
+
167
+ # Set Headers
168
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
169
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
170
+ path_template = '{nextLink}'
171
+
172
+ request_url = @base_url || @client.base_url
173
+
174
+ options = {
175
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
176
+ skip_encoding_path_params: {'nextLink' => next_page_link},
177
+ headers: request_headers.merge(custom_headers || {}),
178
+ base_url: request_url
179
+ }
180
+ promise = @client.make_request_async(:get, path_template, options)
181
+
182
+ promise = promise.then do |result|
183
+ http_response = result.response
184
+ status_code = http_response.status
185
+ response_content = http_response.body
186
+ unless status_code == 200
187
+ error_model = JSON.load(response_content)
188
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
189
+ end
190
+
191
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
192
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
193
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
194
+ # Deserialize Response
195
+ if status_code == 200
196
+ begin
197
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
198
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::ListUsagesResult.mapper()
199
+ result.body = @client.deserialize(result_mapper, parsed_response)
200
+ rescue Exception => e
201
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
202
+ end
203
+ end
204
+
205
+ result
206
+ end
207
+
208
+ promise.execute
209
+ end
210
+
211
+ #
212
+ # Gets the current usage information as well as limits for Batch AI resources
213
+ # for given subscription.
214
+ #
215
+ # @param location [String] The location for which resource usage is queried.
216
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
217
+ # will be added to the HTTP request.
218
+ #
219
+ # @return [ListUsagesResult] which provide lazy access to pages of the
220
+ # response.
221
+ #
222
+ def list_as_lazy(location, custom_headers:nil)
223
+ response = list_async(location, custom_headers:custom_headers).value!
224
+ unless response.nil?
225
+ page = response.body
226
+ page.next_method = Proc.new do |next_page_link|
227
+ list_next_async(next_page_link, custom_headers:custom_headers)
228
+ end
229
+ page
230
+ end
231
+ end
232
+
233
+ end
234
+ end
@@ -0,0 +1,991 @@
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::BatchAI::Mgmt::V2018_05_01
7
+ #
8
+ # The Azure BatchAI Management API.
9
+ #
10
+ class Workspaces
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Workspaces class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [BatchAIManagementClient] reference to the BatchAIManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets a list of Workspaces associated with the given subscription.
26
+ #
27
+ # @param workspaces_list_options [WorkspacesListOptions] Additional parameters
28
+ # for the operation
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [Array<Workspace>] operation results.
33
+ #
34
+ def list(workspaces_list_options:nil, custom_headers:nil)
35
+ first_page = list_as_lazy(workspaces_list_options:workspaces_list_options, custom_headers:custom_headers)
36
+ first_page.get_all_items
37
+ end
38
+
39
+ #
40
+ # Gets a list of Workspaces associated with the given subscription.
41
+ #
42
+ # @param workspaces_list_options [WorkspacesListOptions] Additional parameters
43
+ # for the operation
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_with_http_info(workspaces_list_options:nil, custom_headers:nil)
50
+ list_async(workspaces_list_options:workspaces_list_options, custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Gets a list of Workspaces associated with the given subscription.
55
+ #
56
+ # @param workspaces_list_options [WorkspacesListOptions] Additional parameters
57
+ # for the operation
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_async(workspaces_list_options:nil, custom_headers:nil)
64
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
65
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
66
+
67
+ max_results = nil
68
+ unless workspaces_list_options.nil?
69
+ max_results = workspaces_list_options.maxResults
70
+ end
71
+
72
+ request_headers = {}
73
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
74
+
75
+ # Set Headers
76
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
77
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
78
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.BatchAI/workspaces'
79
+
80
+ request_url = @base_url || @client.base_url
81
+
82
+ options = {
83
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
84
+ path_params: {'subscriptionId' => @client.subscription_id},
85
+ query_params: {'api-version' => @client.api_version,'maxresults' => max_results},
86
+ headers: request_headers.merge(custom_headers || {}),
87
+ base_url: request_url
88
+ }
89
+ promise = @client.make_request_async(:get, path_template, options)
90
+
91
+ promise = promise.then do |result|
92
+ http_response = result.response
93
+ status_code = http_response.status
94
+ response_content = http_response.body
95
+ unless status_code == 200
96
+ error_model = JSON.load(response_content)
97
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
98
+ end
99
+
100
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
101
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
102
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
103
+ # Deserialize Response
104
+ if status_code == 200
105
+ begin
106
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
107
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::WorkspaceListResult.mapper()
108
+ result.body = @client.deserialize(result_mapper, parsed_response)
109
+ rescue Exception => e
110
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
111
+ end
112
+ end
113
+
114
+ result
115
+ end
116
+
117
+ promise.execute
118
+ end
119
+
120
+ #
121
+ # Gets a list of Workspaces within the specified resource group.
122
+ #
123
+ # @param resource_group_name [String] Name of the resource group to which the
124
+ # resource belongs.
125
+ # @param workspaces_list_by_resource_group_options
126
+ # [WorkspacesListByResourceGroupOptions] Additional parameters for the
127
+ # operation
128
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
129
+ # will be added to the HTTP request.
130
+ #
131
+ # @return [Array<Workspace>] operation results.
132
+ #
133
+ def list_by_resource_group(resource_group_name, workspaces_list_by_resource_group_options:nil, custom_headers:nil)
134
+ first_page = list_by_resource_group_as_lazy(resource_group_name, workspaces_list_by_resource_group_options:workspaces_list_by_resource_group_options, custom_headers:custom_headers)
135
+ first_page.get_all_items
136
+ end
137
+
138
+ #
139
+ # Gets a list of Workspaces within the specified resource group.
140
+ #
141
+ # @param resource_group_name [String] Name of the resource group to which the
142
+ # resource belongs.
143
+ # @param workspaces_list_by_resource_group_options
144
+ # [WorkspacesListByResourceGroupOptions] Additional parameters for the
145
+ # operation
146
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
147
+ # will be added to the HTTP request.
148
+ #
149
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
150
+ #
151
+ def list_by_resource_group_with_http_info(resource_group_name, workspaces_list_by_resource_group_options:nil, custom_headers:nil)
152
+ list_by_resource_group_async(resource_group_name, workspaces_list_by_resource_group_options:workspaces_list_by_resource_group_options, custom_headers:custom_headers).value!
153
+ end
154
+
155
+ #
156
+ # Gets a list of Workspaces within the specified resource group.
157
+ #
158
+ # @param resource_group_name [String] Name of the resource group to which the
159
+ # resource belongs.
160
+ # @param workspaces_list_by_resource_group_options
161
+ # [WorkspacesListByResourceGroupOptions] Additional parameters for the
162
+ # operation
163
+ # @param [Hash{String => String}] A hash of custom headers that will be added
164
+ # to the HTTP request.
165
+ #
166
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
167
+ #
168
+ def list_by_resource_group_async(resource_group_name, workspaces_list_by_resource_group_options:nil, custom_headers:nil)
169
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
170
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
171
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
172
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
173
+
174
+ max_results = nil
175
+ unless workspaces_list_by_resource_group_options.nil?
176
+ max_results = workspaces_list_by_resource_group_options.maxResults
177
+ end
178
+
179
+ request_headers = {}
180
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
181
+
182
+ # Set Headers
183
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
184
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
185
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces'
186
+
187
+ request_url = @base_url || @client.base_url
188
+
189
+ options = {
190
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
191
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
192
+ query_params: {'api-version' => @client.api_version,'maxresults' => max_results},
193
+ headers: request_headers.merge(custom_headers || {}),
194
+ base_url: request_url
195
+ }
196
+ promise = @client.make_request_async(:get, path_template, options)
197
+
198
+ promise = promise.then do |result|
199
+ http_response = result.response
200
+ status_code = http_response.status
201
+ response_content = http_response.body
202
+ unless status_code == 200
203
+ error_model = JSON.load(response_content)
204
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
205
+ end
206
+
207
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
208
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
209
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
210
+ # Deserialize Response
211
+ if status_code == 200
212
+ begin
213
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
214
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::WorkspaceListResult.mapper()
215
+ result.body = @client.deserialize(result_mapper, parsed_response)
216
+ rescue Exception => e
217
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
218
+ end
219
+ end
220
+
221
+ result
222
+ end
223
+
224
+ promise.execute
225
+ end
226
+
227
+ #
228
+ # Creates a Workspace.
229
+ #
230
+ # @param resource_group_name [String] Name of the resource group to which the
231
+ # resource belongs.
232
+ # @param workspace_name [String] The name of the workspace. Workspace names can
233
+ # only contain a combination of alphanumeric characters along with dash (-) and
234
+ # underscore (_). The name must be from 1 through 64 characters long.
235
+ # @param parameters [WorkspaceCreateParameters] Workspace creation parameters.
236
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
237
+ # will be added to the HTTP request.
238
+ #
239
+ # @return [Workspace] operation results.
240
+ #
241
+ def create(resource_group_name, workspace_name, parameters, custom_headers:nil)
242
+ response = create_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
243
+ response.body unless response.nil?
244
+ end
245
+
246
+ #
247
+ # @param resource_group_name [String] Name of the resource group to which the
248
+ # resource belongs.
249
+ # @param workspace_name [String] The name of the workspace. Workspace names can
250
+ # only contain a combination of alphanumeric characters along with dash (-) and
251
+ # underscore (_). The name must be from 1 through 64 characters long.
252
+ # @param parameters [WorkspaceCreateParameters] Workspace creation parameters.
253
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
254
+ # will be added to the HTTP request.
255
+ #
256
+ # @return [Concurrent::Promise] promise which provides async access to http
257
+ # response.
258
+ #
259
+ def create_async(resource_group_name, workspace_name, parameters, custom_headers:nil)
260
+ # Send request
261
+ promise = begin_create_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers)
262
+
263
+ promise = promise.then do |response|
264
+ # Defining deserialization method.
265
+ deserialize_method = lambda do |parsed_response|
266
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::Workspace.mapper()
267
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
268
+ end
269
+
270
+ # Waiting for response.
271
+ @client.get_long_running_operation_result(response, deserialize_method)
272
+ end
273
+
274
+ promise
275
+ end
276
+
277
+ #
278
+ # Updates properties of a Workspace.
279
+ #
280
+ # @param resource_group_name [String] Name of the resource group to which the
281
+ # resource belongs.
282
+ # @param workspace_name [String] The name of the workspace. Workspace names can
283
+ # only contain a combination of alphanumeric characters along with dash (-) and
284
+ # underscore (_). The name must be from 1 through 64 characters long.
285
+ # @param parameters [WorkspaceUpdateParameters] Additional parameters for
286
+ # workspace update.
287
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
288
+ # will be added to the HTTP request.
289
+ #
290
+ # @return [Workspace] operation results.
291
+ #
292
+ def update(resource_group_name, workspace_name, parameters, custom_headers:nil)
293
+ response = update_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
294
+ response.body unless response.nil?
295
+ end
296
+
297
+ #
298
+ # Updates properties of a Workspace.
299
+ #
300
+ # @param resource_group_name [String] Name of the resource group to which the
301
+ # resource belongs.
302
+ # @param workspace_name [String] The name of the workspace. Workspace names can
303
+ # only contain a combination of alphanumeric characters along with dash (-) and
304
+ # underscore (_). The name must be from 1 through 64 characters long.
305
+ # @param parameters [WorkspaceUpdateParameters] Additional parameters for
306
+ # workspace update.
307
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
308
+ # will be added to the HTTP request.
309
+ #
310
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
311
+ #
312
+ def update_with_http_info(resource_group_name, workspace_name, parameters, custom_headers:nil)
313
+ update_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
314
+ end
315
+
316
+ #
317
+ # Updates properties of a Workspace.
318
+ #
319
+ # @param resource_group_name [String] Name of the resource group to which the
320
+ # resource belongs.
321
+ # @param workspace_name [String] The name of the workspace. Workspace names can
322
+ # only contain a combination of alphanumeric characters along with dash (-) and
323
+ # underscore (_). The name must be from 1 through 64 characters long.
324
+ # @param parameters [WorkspaceUpdateParameters] Additional parameters for
325
+ # workspace update.
326
+ # @param [Hash{String => String}] A hash of custom headers that will be added
327
+ # to the HTTP request.
328
+ #
329
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
330
+ #
331
+ def update_async(resource_group_name, workspace_name, parameters, custom_headers:nil)
332
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
333
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
334
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
335
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
336
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
337
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
338
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
339
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
340
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
341
+
342
+
343
+ request_headers = {}
344
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
345
+
346
+ # Set Headers
347
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
348
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
349
+
350
+ # Serialize Request
351
+ request_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::WorkspaceUpdateParameters.mapper()
352
+ request_content = @client.serialize(request_mapper, parameters)
353
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
354
+
355
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}'
356
+
357
+ request_url = @base_url || @client.base_url
358
+
359
+ options = {
360
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
361
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id},
362
+ query_params: {'api-version' => @client.api_version},
363
+ body: request_content,
364
+ headers: request_headers.merge(custom_headers || {}),
365
+ base_url: request_url
366
+ }
367
+ promise = @client.make_request_async(:patch, path_template, options)
368
+
369
+ promise = promise.then do |result|
370
+ http_response = result.response
371
+ status_code = http_response.status
372
+ response_content = http_response.body
373
+ unless status_code == 200
374
+ error_model = JSON.load(response_content)
375
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
376
+ end
377
+
378
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
379
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
380
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
381
+ # Deserialize Response
382
+ if status_code == 200
383
+ begin
384
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
385
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::Workspace.mapper()
386
+ result.body = @client.deserialize(result_mapper, parsed_response)
387
+ rescue Exception => e
388
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
389
+ end
390
+ end
391
+
392
+ result
393
+ end
394
+
395
+ promise.execute
396
+ end
397
+
398
+ #
399
+ # Deletes a Workspace.
400
+ #
401
+ # @param resource_group_name [String] Name of the resource group to which the
402
+ # resource belongs.
403
+ # @param workspace_name [String] The name of the workspace. Workspace names can
404
+ # only contain a combination of alphanumeric characters along with dash (-) and
405
+ # underscore (_). The name must be from 1 through 64 characters long.
406
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
407
+ # will be added to the HTTP request.
408
+ #
409
+ def delete(resource_group_name, workspace_name, custom_headers:nil)
410
+ response = delete_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
411
+ nil
412
+ end
413
+
414
+ #
415
+ # @param resource_group_name [String] Name of the resource group to which the
416
+ # resource belongs.
417
+ # @param workspace_name [String] The name of the workspace. Workspace names can
418
+ # only contain a combination of alphanumeric characters along with dash (-) and
419
+ # underscore (_). The name must be from 1 through 64 characters long.
420
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
421
+ # will be added to the HTTP request.
422
+ #
423
+ # @return [Concurrent::Promise] promise which provides async access to http
424
+ # response.
425
+ #
426
+ def delete_async(resource_group_name, workspace_name, custom_headers:nil)
427
+ # Send request
428
+ promise = begin_delete_async(resource_group_name, workspace_name, custom_headers:custom_headers)
429
+
430
+ promise = promise.then do |response|
431
+ # Defining deserialization method.
432
+ deserialize_method = lambda do |parsed_response|
433
+ end
434
+
435
+ # Waiting for response.
436
+ @client.get_long_running_operation_result(response, deserialize_method)
437
+ end
438
+
439
+ promise
440
+ end
441
+
442
+ #
443
+ # Gets information about a Workspace.
444
+ #
445
+ # @param resource_group_name [String] Name of the resource group to which the
446
+ # resource belongs.
447
+ # @param workspace_name [String] The name of the workspace. Workspace names can
448
+ # only contain a combination of alphanumeric characters along with dash (-) and
449
+ # underscore (_). The name must be from 1 through 64 characters long.
450
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
451
+ # will be added to the HTTP request.
452
+ #
453
+ # @return [Workspace] operation results.
454
+ #
455
+ def get(resource_group_name, workspace_name, custom_headers:nil)
456
+ response = get_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
457
+ response.body unless response.nil?
458
+ end
459
+
460
+ #
461
+ # Gets information about a Workspace.
462
+ #
463
+ # @param resource_group_name [String] Name of the resource group to which the
464
+ # resource belongs.
465
+ # @param workspace_name [String] The name of the workspace. Workspace names can
466
+ # only contain a combination of alphanumeric characters along with dash (-) and
467
+ # underscore (_). The name must be from 1 through 64 characters long.
468
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
469
+ # will be added to the HTTP request.
470
+ #
471
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
472
+ #
473
+ def get_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
474
+ get_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
475
+ end
476
+
477
+ #
478
+ # Gets information about a Workspace.
479
+ #
480
+ # @param resource_group_name [String] Name of the resource group to which the
481
+ # resource belongs.
482
+ # @param workspace_name [String] The name of the workspace. Workspace names can
483
+ # only contain a combination of alphanumeric characters along with dash (-) and
484
+ # underscore (_). The name must be from 1 through 64 characters long.
485
+ # @param [Hash{String => String}] A hash of custom headers that will be added
486
+ # to the HTTP request.
487
+ #
488
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
489
+ #
490
+ def get_async(resource_group_name, workspace_name, custom_headers:nil)
491
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
492
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
493
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
494
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
495
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
496
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
497
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
498
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
499
+
500
+
501
+ request_headers = {}
502
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
503
+
504
+ # Set Headers
505
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
506
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
507
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}'
508
+
509
+ request_url = @base_url || @client.base_url
510
+
511
+ options = {
512
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
513
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id},
514
+ query_params: {'api-version' => @client.api_version},
515
+ headers: request_headers.merge(custom_headers || {}),
516
+ base_url: request_url
517
+ }
518
+ promise = @client.make_request_async(:get, path_template, options)
519
+
520
+ promise = promise.then do |result|
521
+ http_response = result.response
522
+ status_code = http_response.status
523
+ response_content = http_response.body
524
+ unless status_code == 200
525
+ error_model = JSON.load(response_content)
526
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
527
+ end
528
+
529
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
530
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
531
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
532
+ # Deserialize Response
533
+ if status_code == 200
534
+ begin
535
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
536
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::Workspace.mapper()
537
+ result.body = @client.deserialize(result_mapper, parsed_response)
538
+ rescue Exception => e
539
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
540
+ end
541
+ end
542
+
543
+ result
544
+ end
545
+
546
+ promise.execute
547
+ end
548
+
549
+ #
550
+ # Creates a Workspace.
551
+ #
552
+ # @param resource_group_name [String] Name of the resource group to which the
553
+ # resource belongs.
554
+ # @param workspace_name [String] The name of the workspace. Workspace names can
555
+ # only contain a combination of alphanumeric characters along with dash (-) and
556
+ # underscore (_). The name must be from 1 through 64 characters long.
557
+ # @param parameters [WorkspaceCreateParameters] Workspace creation parameters.
558
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
559
+ # will be added to the HTTP request.
560
+ #
561
+ # @return [Workspace] operation results.
562
+ #
563
+ def begin_create(resource_group_name, workspace_name, parameters, custom_headers:nil)
564
+ response = begin_create_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
565
+ response.body unless response.nil?
566
+ end
567
+
568
+ #
569
+ # Creates a Workspace.
570
+ #
571
+ # @param resource_group_name [String] Name of the resource group to which the
572
+ # resource belongs.
573
+ # @param workspace_name [String] The name of the workspace. Workspace names can
574
+ # only contain a combination of alphanumeric characters along with dash (-) and
575
+ # underscore (_). The name must be from 1 through 64 characters long.
576
+ # @param parameters [WorkspaceCreateParameters] Workspace creation parameters.
577
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
578
+ # will be added to the HTTP request.
579
+ #
580
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
581
+ #
582
+ def begin_create_with_http_info(resource_group_name, workspace_name, parameters, custom_headers:nil)
583
+ begin_create_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
584
+ end
585
+
586
+ #
587
+ # Creates a Workspace.
588
+ #
589
+ # @param resource_group_name [String] Name of the resource group to which the
590
+ # resource belongs.
591
+ # @param workspace_name [String] The name of the workspace. Workspace names can
592
+ # only contain a combination of alphanumeric characters along with dash (-) and
593
+ # underscore (_). The name must be from 1 through 64 characters long.
594
+ # @param parameters [WorkspaceCreateParameters] Workspace creation parameters.
595
+ # @param [Hash{String => String}] A hash of custom headers that will be added
596
+ # to the HTTP request.
597
+ #
598
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
599
+ #
600
+ def begin_create_async(resource_group_name, workspace_name, parameters, custom_headers:nil)
601
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
602
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
603
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
604
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
605
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
606
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
607
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
608
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
609
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
610
+
611
+
612
+ request_headers = {}
613
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
614
+
615
+ # Set Headers
616
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
617
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
618
+
619
+ # Serialize Request
620
+ request_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::WorkspaceCreateParameters.mapper()
621
+ request_content = @client.serialize(request_mapper, parameters)
622
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
623
+
624
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}'
625
+
626
+ request_url = @base_url || @client.base_url
627
+
628
+ options = {
629
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
630
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id},
631
+ query_params: {'api-version' => @client.api_version},
632
+ body: request_content,
633
+ headers: request_headers.merge(custom_headers || {}),
634
+ base_url: request_url
635
+ }
636
+ promise = @client.make_request_async(:put, path_template, options)
637
+
638
+ promise = promise.then do |result|
639
+ http_response = result.response
640
+ status_code = http_response.status
641
+ response_content = http_response.body
642
+ unless status_code == 200 || status_code == 202
643
+ error_model = JSON.load(response_content)
644
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
645
+ end
646
+
647
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
648
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
649
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
650
+ # Deserialize Response
651
+ if status_code == 200
652
+ begin
653
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
654
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::Workspace.mapper()
655
+ result.body = @client.deserialize(result_mapper, parsed_response)
656
+ rescue Exception => e
657
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
658
+ end
659
+ end
660
+
661
+ result
662
+ end
663
+
664
+ promise.execute
665
+ end
666
+
667
+ #
668
+ # Deletes a Workspace.
669
+ #
670
+ # @param resource_group_name [String] Name of the resource group to which the
671
+ # resource belongs.
672
+ # @param workspace_name [String] The name of the workspace. Workspace names can
673
+ # only contain a combination of alphanumeric characters along with dash (-) and
674
+ # underscore (_). The name must be from 1 through 64 characters long.
675
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
676
+ # will be added to the HTTP request.
677
+ #
678
+ #
679
+ def begin_delete(resource_group_name, workspace_name, custom_headers:nil)
680
+ response = begin_delete_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
681
+ nil
682
+ end
683
+
684
+ #
685
+ # Deletes a Workspace.
686
+ #
687
+ # @param resource_group_name [String] Name of the resource group to which the
688
+ # resource belongs.
689
+ # @param workspace_name [String] The name of the workspace. Workspace names can
690
+ # only contain a combination of alphanumeric characters along with dash (-) and
691
+ # underscore (_). The name must be from 1 through 64 characters long.
692
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
693
+ # will be added to the HTTP request.
694
+ #
695
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
696
+ #
697
+ def begin_delete_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
698
+ begin_delete_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
699
+ end
700
+
701
+ #
702
+ # Deletes a Workspace.
703
+ #
704
+ # @param resource_group_name [String] Name of the resource group to which the
705
+ # resource belongs.
706
+ # @param workspace_name [String] The name of the workspace. Workspace names can
707
+ # only contain a combination of alphanumeric characters along with dash (-) and
708
+ # underscore (_). The name must be from 1 through 64 characters long.
709
+ # @param [Hash{String => String}] A hash of custom headers that will be added
710
+ # to the HTTP request.
711
+ #
712
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
713
+ #
714
+ def begin_delete_async(resource_group_name, workspace_name, custom_headers:nil)
715
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
716
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
717
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
718
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
719
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
720
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
721
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
722
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
723
+
724
+
725
+ request_headers = {}
726
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
727
+
728
+ # Set Headers
729
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
730
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
731
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}'
732
+
733
+ request_url = @base_url || @client.base_url
734
+
735
+ options = {
736
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
737
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id},
738
+ query_params: {'api-version' => @client.api_version},
739
+ headers: request_headers.merge(custom_headers || {}),
740
+ base_url: request_url
741
+ }
742
+ promise = @client.make_request_async(:delete, path_template, options)
743
+
744
+ promise = promise.then do |result|
745
+ http_response = result.response
746
+ status_code = http_response.status
747
+ response_content = http_response.body
748
+ unless status_code == 200 || status_code == 202 || status_code == 204
749
+ error_model = JSON.load(response_content)
750
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
751
+ end
752
+
753
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
754
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
755
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
756
+
757
+ result
758
+ end
759
+
760
+ promise.execute
761
+ end
762
+
763
+ #
764
+ # Gets a list of Workspaces associated with the given subscription.
765
+ #
766
+ # @param next_page_link [String] The NextLink from the previous successful call
767
+ # to List operation.
768
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
769
+ # will be added to the HTTP request.
770
+ #
771
+ # @return [WorkspaceListResult] operation results.
772
+ #
773
+ def list_next(next_page_link, custom_headers:nil)
774
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
775
+ response.body unless response.nil?
776
+ end
777
+
778
+ #
779
+ # Gets a list of Workspaces associated with the given subscription.
780
+ #
781
+ # @param next_page_link [String] The NextLink from the previous successful call
782
+ # to List operation.
783
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
784
+ # will be added to the HTTP request.
785
+ #
786
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
787
+ #
788
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
789
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
790
+ end
791
+
792
+ #
793
+ # Gets a list of Workspaces associated with the given subscription.
794
+ #
795
+ # @param next_page_link [String] The NextLink from the previous successful call
796
+ # to List operation.
797
+ # @param [Hash{String => String}] A hash of custom headers that will be added
798
+ # to the HTTP request.
799
+ #
800
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
801
+ #
802
+ def list_next_async(next_page_link, custom_headers:nil)
803
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
804
+
805
+
806
+ request_headers = {}
807
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
808
+
809
+ # Set Headers
810
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
811
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
812
+ path_template = '{nextLink}'
813
+
814
+ request_url = @base_url || @client.base_url
815
+
816
+ options = {
817
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
818
+ skip_encoding_path_params: {'nextLink' => next_page_link},
819
+ headers: request_headers.merge(custom_headers || {}),
820
+ base_url: request_url
821
+ }
822
+ promise = @client.make_request_async(:get, path_template, options)
823
+
824
+ promise = promise.then do |result|
825
+ http_response = result.response
826
+ status_code = http_response.status
827
+ response_content = http_response.body
828
+ unless status_code == 200
829
+ error_model = JSON.load(response_content)
830
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
831
+ end
832
+
833
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
834
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
835
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
836
+ # Deserialize Response
837
+ if status_code == 200
838
+ begin
839
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
840
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::WorkspaceListResult.mapper()
841
+ result.body = @client.deserialize(result_mapper, parsed_response)
842
+ rescue Exception => e
843
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
844
+ end
845
+ end
846
+
847
+ result
848
+ end
849
+
850
+ promise.execute
851
+ end
852
+
853
+ #
854
+ # Gets a list of Workspaces within the specified resource group.
855
+ #
856
+ # @param next_page_link [String] The NextLink from the previous successful call
857
+ # to List operation.
858
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
859
+ # will be added to the HTTP request.
860
+ #
861
+ # @return [WorkspaceListResult] operation results.
862
+ #
863
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
864
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
865
+ response.body unless response.nil?
866
+ end
867
+
868
+ #
869
+ # Gets a list of Workspaces within the specified resource group.
870
+ #
871
+ # @param next_page_link [String] The NextLink from the previous successful call
872
+ # to List operation.
873
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
874
+ # will be added to the HTTP request.
875
+ #
876
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
877
+ #
878
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
879
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
880
+ end
881
+
882
+ #
883
+ # Gets a list of Workspaces within the specified resource group.
884
+ #
885
+ # @param next_page_link [String] The NextLink from the previous successful call
886
+ # to List operation.
887
+ # @param [Hash{String => String}] A hash of custom headers that will be added
888
+ # to the HTTP request.
889
+ #
890
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
891
+ #
892
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
893
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
894
+
895
+
896
+ request_headers = {}
897
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
898
+
899
+ # Set Headers
900
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
901
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
902
+ path_template = '{nextLink}'
903
+
904
+ request_url = @base_url || @client.base_url
905
+
906
+ options = {
907
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
908
+ skip_encoding_path_params: {'nextLink' => next_page_link},
909
+ headers: request_headers.merge(custom_headers || {}),
910
+ base_url: request_url
911
+ }
912
+ promise = @client.make_request_async(:get, path_template, options)
913
+
914
+ promise = promise.then do |result|
915
+ http_response = result.response
916
+ status_code = http_response.status
917
+ response_content = http_response.body
918
+ unless status_code == 200
919
+ error_model = JSON.load(response_content)
920
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
921
+ end
922
+
923
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
924
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
925
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
926
+ # Deserialize Response
927
+ if status_code == 200
928
+ begin
929
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
930
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::WorkspaceListResult.mapper()
931
+ result.body = @client.deserialize(result_mapper, parsed_response)
932
+ rescue Exception => e
933
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
934
+ end
935
+ end
936
+
937
+ result
938
+ end
939
+
940
+ promise.execute
941
+ end
942
+
943
+ #
944
+ # Gets a list of Workspaces associated with the given subscription.
945
+ #
946
+ # @param workspaces_list_options [WorkspacesListOptions] Additional parameters
947
+ # for the operation
948
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
949
+ # will be added to the HTTP request.
950
+ #
951
+ # @return [WorkspaceListResult] which provide lazy access to pages of the
952
+ # response.
953
+ #
954
+ def list_as_lazy(workspaces_list_options:nil, custom_headers:nil)
955
+ response = list_async(workspaces_list_options:workspaces_list_options, custom_headers:custom_headers).value!
956
+ unless response.nil?
957
+ page = response.body
958
+ page.next_method = Proc.new do |next_page_link|
959
+ list_next_async(next_page_link, custom_headers:custom_headers)
960
+ end
961
+ page
962
+ end
963
+ end
964
+
965
+ #
966
+ # Gets a list of Workspaces within the specified resource group.
967
+ #
968
+ # @param resource_group_name [String] Name of the resource group to which the
969
+ # resource belongs.
970
+ # @param workspaces_list_by_resource_group_options
971
+ # [WorkspacesListByResourceGroupOptions] Additional parameters for the
972
+ # operation
973
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
974
+ # will be added to the HTTP request.
975
+ #
976
+ # @return [WorkspaceListResult] which provide lazy access to pages of the
977
+ # response.
978
+ #
979
+ def list_by_resource_group_as_lazy(resource_group_name, workspaces_list_by_resource_group_options:nil, custom_headers:nil)
980
+ response = list_by_resource_group_async(resource_group_name, workspaces_list_by_resource_group_options:workspaces_list_by_resource_group_options, custom_headers:custom_headers).value!
981
+ unless response.nil?
982
+ page = response.body
983
+ page.next_method = Proc.new do |next_page_link|
984
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
985
+ end
986
+ page
987
+ end
988
+ end
989
+
990
+ end
991
+ end