azure_mgmt_batch 0.16.0 → 0.18.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (330) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2015-12-01/generated/azure_mgmt_batch/application_operations.rb +12 -0
  3. data/lib/2015-12-01/generated/azure_mgmt_batch/application_package_operations.rb +8 -0
  4. data/lib/2015-12-01/generated/azure_mgmt_batch/batch_account_operations.rb +22 -0
  5. data/lib/2015-12-01/generated/azure_mgmt_batch/batch_management_client.rb +7 -6
  6. data/lib/2015-12-01/generated/azure_mgmt_batch/location.rb +2 -0
  7. data/lib/2015-12-01/generated/azure_mgmt_batch/models/batch_account_list_result.rb +1 -1
  8. data/lib/2015-12-01/generated/azure_mgmt_batch/models/list_applications_result.rb +1 -1
  9. data/lib/2015-12-01/generated/azure_mgmt_batch/models/resource.rb +9 -0
  10. data/lib/2017-01-01/generated/azure_mgmt_batch/application_operations.rb +12 -0
  11. data/lib/2017-01-01/generated/azure_mgmt_batch/application_package_operations.rb +8 -0
  12. data/lib/2017-01-01/generated/azure_mgmt_batch/batch_account_operations.rb +22 -0
  13. data/lib/2017-01-01/generated/azure_mgmt_batch/batch_management_client.rb +7 -6
  14. data/lib/2017-01-01/generated/azure_mgmt_batch/location.rb +2 -0
  15. data/lib/2017-01-01/generated/azure_mgmt_batch/models/batch_account_list_result.rb +1 -1
  16. data/lib/2017-01-01/generated/azure_mgmt_batch/models/list_applications_result.rb +1 -1
  17. data/lib/2017-01-01/generated/azure_mgmt_batch/models/resource.rb +9 -0
  18. data/lib/2017-05-01/generated/azure_mgmt_batch/application_operations.rb +12 -0
  19. data/lib/2017-05-01/generated/azure_mgmt_batch/application_package_operations.rb +8 -0
  20. data/lib/2017-05-01/generated/azure_mgmt_batch/batch_account_operations.rb +22 -0
  21. data/lib/2017-05-01/generated/azure_mgmt_batch/batch_management_client.rb +7 -6
  22. data/lib/2017-05-01/generated/azure_mgmt_batch/location.rb +4 -0
  23. data/lib/2017-05-01/generated/azure_mgmt_batch/models/batch_account_list_result.rb +1 -1
  24. data/lib/2017-05-01/generated/azure_mgmt_batch/models/list_applications_result.rb +1 -1
  25. data/lib/2017-05-01/generated/azure_mgmt_batch/models/operation_list_result.rb +1 -1
  26. data/lib/2017-05-01/generated/azure_mgmt_batch/models/resource.rb +9 -0
  27. data/lib/2017-05-01/generated/azure_mgmt_batch/operations.rb +4 -0
  28. data/lib/2017-09-01/generated/azure_mgmt_batch/application_operations.rb +12 -0
  29. data/lib/2017-09-01/generated/azure_mgmt_batch/application_package_operations.rb +8 -0
  30. data/lib/2017-09-01/generated/azure_mgmt_batch/batch_account_operations.rb +22 -0
  31. data/lib/2017-09-01/generated/azure_mgmt_batch/batch_management_client.rb +7 -6
  32. data/lib/2017-09-01/generated/azure_mgmt_batch/certificate_operations.rb +14 -0
  33. data/lib/2017-09-01/generated/azure_mgmt_batch/location.rb +4 -0
  34. data/lib/2017-09-01/generated/azure_mgmt_batch/models/batch_account_list_result.rb +1 -1
  35. data/lib/2017-09-01/generated/azure_mgmt_batch/models/list_applications_result.rb +1 -1
  36. data/lib/2017-09-01/generated/azure_mgmt_batch/models/list_certificates_result.rb +1 -1
  37. data/lib/2017-09-01/generated/azure_mgmt_batch/models/list_pools_result.rb +1 -1
  38. data/lib/2017-09-01/generated/azure_mgmt_batch/models/operation_list_result.rb +1 -1
  39. data/lib/2017-09-01/generated/azure_mgmt_batch/models/resource.rb +9 -0
  40. data/lib/2017-09-01/generated/azure_mgmt_batch/models/virtual_machine_configuration.rb +1 -1
  41. data/lib/2017-09-01/generated/azure_mgmt_batch/operations.rb +4 -0
  42. data/lib/2017-09-01/generated/azure_mgmt_batch/pool_operations.rb +16 -0
  43. data/lib/2018-12-01/generated/azure_mgmt_batch.rb +116 -0
  44. data/lib/2018-12-01/generated/azure_mgmt_batch/application_operations.rb +696 -0
  45. data/lib/2018-12-01/generated/azure_mgmt_batch/application_package_operations.rb +737 -0
  46. data/lib/2018-12-01/generated/azure_mgmt_batch/batch_account_operations.rb +1295 -0
  47. data/lib/2018-12-01/generated/azure_mgmt_batch/batch_management_client.rb +156 -0
  48. data/lib/2018-12-01/generated/azure_mgmt_batch/certificate_operations.rb +1023 -0
  49. data/lib/2018-12-01/generated/azure_mgmt_batch/location.rb +225 -0
  50. data/lib/2018-12-01/generated/azure_mgmt_batch/models/account_key_type.rb +16 -0
  51. data/lib/2018-12-01/generated/azure_mgmt_batch/models/activate_application_package_parameters.rb +46 -0
  52. data/lib/2018-12-01/generated/azure_mgmt_batch/models/allocation_state.rb +17 -0
  53. data/lib/2018-12-01/generated/azure_mgmt_batch/models/application.rb +107 -0
  54. data/lib/2018-12-01/generated/azure_mgmt_batch/models/application_package.rb +137 -0
  55. data/lib/2018-12-01/generated/azure_mgmt_batch/models/application_package_reference.rb +64 -0
  56. data/lib/2018-12-01/generated/azure_mgmt_batch/models/auto_scale_run.rb +74 -0
  57. data/lib/2018-12-01/generated/azure_mgmt_batch/models/auto_scale_run_error.rb +80 -0
  58. data/lib/2018-12-01/generated/azure_mgmt_batch/models/auto_scale_settings.rb +61 -0
  59. data/lib/2018-12-01/generated/azure_mgmt_batch/models/auto_storage_base_properties.rb +47 -0
  60. data/lib/2018-12-01/generated/azure_mgmt_batch/models/auto_storage_properties.rb +56 -0
  61. data/lib/2018-12-01/generated/azure_mgmt_batch/models/auto_user_scope.rb +16 -0
  62. data/lib/2018-12-01/generated/azure_mgmt_batch/models/auto_user_specification.rb +66 -0
  63. data/lib/2018-12-01/generated/azure_mgmt_batch/models/batch_account.rb +208 -0
  64. data/lib/2018-12-01/generated/azure_mgmt_batch/models/batch_account_create_parameters.rb +110 -0
  65. data/lib/2018-12-01/generated/azure_mgmt_batch/models/batch_account_keys.rb +71 -0
  66. data/lib/2018-12-01/generated/azure_mgmt_batch/models/batch_account_list_result.rb +99 -0
  67. data/lib/2018-12-01/generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb +48 -0
  68. data/lib/2018-12-01/generated/azure_mgmt_batch/models/batch_account_update_parameters.rb +68 -0
  69. data/lib/2018-12-01/generated/azure_mgmt_batch/models/batch_location_quota.rb +48 -0
  70. data/lib/2018-12-01/generated/azure_mgmt_batch/models/caching_type.rb +17 -0
  71. data/lib/2018-12-01/generated/azure_mgmt_batch/models/certificate.rb +192 -0
  72. data/lib/2018-12-01/generated/azure_mgmt_batch/models/certificate_base_properties.rb +75 -0
  73. data/lib/2018-12-01/generated/azure_mgmt_batch/models/certificate_create_or_update_parameters.rb +135 -0
  74. data/lib/2018-12-01/generated/azure_mgmt_batch/models/certificate_format.rb +16 -0
  75. data/lib/2018-12-01/generated/azure_mgmt_batch/models/certificate_provisioning_state.rb +17 -0
  76. data/lib/2018-12-01/generated/azure_mgmt_batch/models/certificate_reference.rb +112 -0
  77. data/lib/2018-12-01/generated/azure_mgmt_batch/models/certificate_store_location.rb +16 -0
  78. data/lib/2018-12-01/generated/azure_mgmt_batch/models/certificate_visibility.rb +17 -0
  79. data/lib/2018-12-01/generated/azure_mgmt_batch/models/check_name_availability_parameters.rb +61 -0
  80. data/lib/2018-12-01/generated/azure_mgmt_batch/models/check_name_availability_result.rb +78 -0
  81. data/lib/2018-12-01/generated/azure_mgmt_batch/models/cloud_service_configuration.rb +67 -0
  82. data/lib/2018-12-01/generated/azure_mgmt_batch/models/compute_node_deallocation_option.rb +18 -0
  83. data/lib/2018-12-01/generated/azure_mgmt_batch/models/compute_node_fill_type.rb +16 -0
  84. data/lib/2018-12-01/generated/azure_mgmt_batch/models/container_configuration.rb +95 -0
  85. data/lib/2018-12-01/generated/azure_mgmt_batch/models/container_registry.rb +70 -0
  86. data/lib/2018-12-01/generated/azure_mgmt_batch/models/data_disk.rb +101 -0
  87. data/lib/2018-12-01/generated/azure_mgmt_batch/models/delete_certificate_error.rb +92 -0
  88. data/lib/2018-12-01/generated/azure_mgmt_batch/models/deployment_configuration.rb +66 -0
  89. data/lib/2018-12-01/generated/azure_mgmt_batch/models/elevation_level.rb +16 -0
  90. data/lib/2018-12-01/generated/azure_mgmt_batch/models/environment_setting.rb +58 -0
  91. data/lib/2018-12-01/generated/azure_mgmt_batch/models/fixed_scale_settings.rb +93 -0
  92. data/lib/2018-12-01/generated/azure_mgmt_batch/models/image_reference.rb +108 -0
  93. data/lib/2018-12-01/generated/azure_mgmt_batch/models/inbound_endpoint_protocol.rb +16 -0
  94. data/lib/2018-12-01/generated/azure_mgmt_batch/models/inbound_nat_pool.rb +141 -0
  95. data/lib/2018-12-01/generated/azure_mgmt_batch/models/inter_node_communication_state.rb +16 -0
  96. data/lib/2018-12-01/generated/azure_mgmt_batch/models/key_vault_reference.rb +59 -0
  97. data/lib/2018-12-01/generated/azure_mgmt_batch/models/linux_user_configuration.rb +81 -0
  98. data/lib/2018-12-01/generated/azure_mgmt_batch/models/list_application_packages_result.rb +98 -0
  99. data/lib/2018-12-01/generated/azure_mgmt_batch/models/list_applications_result.rb +98 -0
  100. data/lib/2018-12-01/generated/azure_mgmt_batch/models/list_certificates_result.rb +98 -0
  101. data/lib/2018-12-01/generated/azure_mgmt_batch/models/list_pools_result.rb +98 -0
  102. data/lib/2018-12-01/generated/azure_mgmt_batch/models/login_mode.rb +16 -0
  103. data/lib/2018-12-01/generated/azure_mgmt_batch/models/metadata_item.rb +60 -0
  104. data/lib/2018-12-01/generated/azure_mgmt_batch/models/name_availability_reason.rb +16 -0
  105. data/lib/2018-12-01/generated/azure_mgmt_batch/models/network_configuration.rb +86 -0
  106. data/lib/2018-12-01/generated/azure_mgmt_batch/models/network_security_group_rule.rb +82 -0
  107. data/lib/2018-12-01/generated/azure_mgmt_batch/models/network_security_group_rule_access.rb +16 -0
  108. data/lib/2018-12-01/generated/azure_mgmt_batch/models/operation.rb +82 -0
  109. data/lib/2018-12-01/generated/azure_mgmt_batch/models/operation_display.rb +81 -0
  110. data/lib/2018-12-01/generated/azure_mgmt_batch/models/operation_list_result.rb +98 -0
  111. data/lib/2018-12-01/generated/azure_mgmt_batch/models/package_state.rb +16 -0
  112. data/lib/2018-12-01/generated/azure_mgmt_batch/models/pool.rb +459 -0
  113. data/lib/2018-12-01/generated/azure_mgmt_batch/models/pool_allocation_mode.rb +16 -0
  114. data/lib/2018-12-01/generated/azure_mgmt_batch/models/pool_endpoint_configuration.rb +60 -0
  115. data/lib/2018-12-01/generated/azure_mgmt_batch/models/pool_provisioning_state.rb +16 -0
  116. data/lib/2018-12-01/generated/azure_mgmt_batch/models/provisioning_state.rb +20 -0
  117. data/lib/2018-12-01/generated/azure_mgmt_batch/models/proxy_resource.rb +84 -0
  118. data/lib/2018-12-01/generated/azure_mgmt_batch/models/resize_error.rb +80 -0
  119. data/lib/2018-12-01/generated/azure_mgmt_batch/models/resize_operation_status.rb +127 -0
  120. data/lib/2018-12-01/generated/azure_mgmt_batch/models/resource.rb +112 -0
  121. data/lib/2018-12-01/generated/azure_mgmt_batch/models/resource_file.rb +139 -0
  122. data/lib/2018-12-01/generated/azure_mgmt_batch/models/scale_settings.rb +69 -0
  123. data/lib/2018-12-01/generated/azure_mgmt_batch/models/start_task.rb +168 -0
  124. data/lib/2018-12-01/generated/azure_mgmt_batch/models/storage_account_type.rb +16 -0
  125. data/lib/2018-12-01/generated/azure_mgmt_batch/models/task_container_settings.rb +77 -0
  126. data/lib/2018-12-01/generated/azure_mgmt_batch/models/task_scheduling_policy.rb +49 -0
  127. data/lib/2018-12-01/generated/azure_mgmt_batch/models/user_account.rb +104 -0
  128. data/lib/2018-12-01/generated/azure_mgmt_batch/models/user_identity.rb +64 -0
  129. data/lib/2018-12-01/generated/azure_mgmt_batch/models/virtual_machine_configuration.rb +141 -0
  130. data/lib/2018-12-01/generated/azure_mgmt_batch/models/windows_configuration.rb +48 -0
  131. data/lib/2018-12-01/generated/azure_mgmt_batch/models/windows_user_configuration.rb +51 -0
  132. data/lib/2018-12-01/generated/azure_mgmt_batch/module_definition.rb +9 -0
  133. data/lib/2018-12-01/generated/azure_mgmt_batch/operations.rb +219 -0
  134. data/lib/2018-12-01/generated/azure_mgmt_batch/pool_operations.rb +1148 -0
  135. data/lib/2019-04-01/generated/azure_mgmt_batch.rb +117 -0
  136. data/lib/2019-04-01/generated/azure_mgmt_batch/application_operations.rb +696 -0
  137. data/lib/2019-04-01/generated/azure_mgmt_batch/application_package_operations.rb +737 -0
  138. data/lib/2019-04-01/generated/azure_mgmt_batch/batch_account_operations.rb +1295 -0
  139. data/lib/2019-04-01/generated/azure_mgmt_batch/batch_management_client.rb +156 -0
  140. data/lib/2019-04-01/generated/azure_mgmt_batch/certificate_operations.rb +1023 -0
  141. data/lib/2019-04-01/generated/azure_mgmt_batch/location.rb +225 -0
  142. data/lib/2019-04-01/generated/azure_mgmt_batch/models/account_key_type.rb +16 -0
  143. data/lib/2019-04-01/generated/azure_mgmt_batch/models/activate_application_package_parameters.rb +46 -0
  144. data/lib/2019-04-01/generated/azure_mgmt_batch/models/allocation_state.rb +17 -0
  145. data/lib/2019-04-01/generated/azure_mgmt_batch/models/application.rb +107 -0
  146. data/lib/2019-04-01/generated/azure_mgmt_batch/models/application_package.rb +137 -0
  147. data/lib/2019-04-01/generated/azure_mgmt_batch/models/application_package_reference.rb +64 -0
  148. data/lib/2019-04-01/generated/azure_mgmt_batch/models/auto_scale_run.rb +74 -0
  149. data/lib/2019-04-01/generated/azure_mgmt_batch/models/auto_scale_run_error.rb +80 -0
  150. data/lib/2019-04-01/generated/azure_mgmt_batch/models/auto_scale_settings.rb +61 -0
  151. data/lib/2019-04-01/generated/azure_mgmt_batch/models/auto_storage_base_properties.rb +47 -0
  152. data/lib/2019-04-01/generated/azure_mgmt_batch/models/auto_storage_properties.rb +56 -0
  153. data/lib/2019-04-01/generated/azure_mgmt_batch/models/auto_user_scope.rb +16 -0
  154. data/lib/2019-04-01/generated/azure_mgmt_batch/models/auto_user_specification.rb +66 -0
  155. data/lib/2019-04-01/generated/azure_mgmt_batch/models/batch_account.rb +257 -0
  156. data/lib/2019-04-01/generated/azure_mgmt_batch/models/batch_account_create_parameters.rb +110 -0
  157. data/lib/2019-04-01/generated/azure_mgmt_batch/models/batch_account_keys.rb +71 -0
  158. data/lib/2019-04-01/generated/azure_mgmt_batch/models/batch_account_list_result.rb +99 -0
  159. data/lib/2019-04-01/generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb +48 -0
  160. data/lib/2019-04-01/generated/azure_mgmt_batch/models/batch_account_update_parameters.rb +68 -0
  161. data/lib/2019-04-01/generated/azure_mgmt_batch/models/batch_location_quota.rb +48 -0
  162. data/lib/2019-04-01/generated/azure_mgmt_batch/models/caching_type.rb +17 -0
  163. data/lib/2019-04-01/generated/azure_mgmt_batch/models/certificate.rb +192 -0
  164. data/lib/2019-04-01/generated/azure_mgmt_batch/models/certificate_base_properties.rb +75 -0
  165. data/lib/2019-04-01/generated/azure_mgmt_batch/models/certificate_create_or_update_parameters.rb +135 -0
  166. data/lib/2019-04-01/generated/azure_mgmt_batch/models/certificate_format.rb +16 -0
  167. data/lib/2019-04-01/generated/azure_mgmt_batch/models/certificate_provisioning_state.rb +17 -0
  168. data/lib/2019-04-01/generated/azure_mgmt_batch/models/certificate_reference.rb +112 -0
  169. data/lib/2019-04-01/generated/azure_mgmt_batch/models/certificate_store_location.rb +16 -0
  170. data/lib/2019-04-01/generated/azure_mgmt_batch/models/certificate_visibility.rb +17 -0
  171. data/lib/2019-04-01/generated/azure_mgmt_batch/models/check_name_availability_parameters.rb +61 -0
  172. data/lib/2019-04-01/generated/azure_mgmt_batch/models/check_name_availability_result.rb +78 -0
  173. data/lib/2019-04-01/generated/azure_mgmt_batch/models/cloud_service_configuration.rb +68 -0
  174. data/lib/2019-04-01/generated/azure_mgmt_batch/models/compute_node_deallocation_option.rb +18 -0
  175. data/lib/2019-04-01/generated/azure_mgmt_batch/models/compute_node_fill_type.rb +16 -0
  176. data/lib/2019-04-01/generated/azure_mgmt_batch/models/container_configuration.rb +95 -0
  177. data/lib/2019-04-01/generated/azure_mgmt_batch/models/container_registry.rb +70 -0
  178. data/lib/2019-04-01/generated/azure_mgmt_batch/models/data_disk.rb +101 -0
  179. data/lib/2019-04-01/generated/azure_mgmt_batch/models/delete_certificate_error.rb +92 -0
  180. data/lib/2019-04-01/generated/azure_mgmt_batch/models/deployment_configuration.rb +66 -0
  181. data/lib/2019-04-01/generated/azure_mgmt_batch/models/elevation_level.rb +16 -0
  182. data/lib/2019-04-01/generated/azure_mgmt_batch/models/environment_setting.rb +58 -0
  183. data/lib/2019-04-01/generated/azure_mgmt_batch/models/fixed_scale_settings.rb +93 -0
  184. data/lib/2019-04-01/generated/azure_mgmt_batch/models/image_reference.rb +108 -0
  185. data/lib/2019-04-01/generated/azure_mgmt_batch/models/inbound_endpoint_protocol.rb +16 -0
  186. data/lib/2019-04-01/generated/azure_mgmt_batch/models/inbound_nat_pool.rb +141 -0
  187. data/lib/2019-04-01/generated/azure_mgmt_batch/models/inter_node_communication_state.rb +16 -0
  188. data/lib/2019-04-01/generated/azure_mgmt_batch/models/key_vault_reference.rb +59 -0
  189. data/lib/2019-04-01/generated/azure_mgmt_batch/models/linux_user_configuration.rb +81 -0
  190. data/lib/2019-04-01/generated/azure_mgmt_batch/models/list_application_packages_result.rb +98 -0
  191. data/lib/2019-04-01/generated/azure_mgmt_batch/models/list_applications_result.rb +98 -0
  192. data/lib/2019-04-01/generated/azure_mgmt_batch/models/list_certificates_result.rb +98 -0
  193. data/lib/2019-04-01/generated/azure_mgmt_batch/models/list_pools_result.rb +98 -0
  194. data/lib/2019-04-01/generated/azure_mgmt_batch/models/login_mode.rb +16 -0
  195. data/lib/2019-04-01/generated/azure_mgmt_batch/models/metadata_item.rb +60 -0
  196. data/lib/2019-04-01/generated/azure_mgmt_batch/models/name_availability_reason.rb +16 -0
  197. data/lib/2019-04-01/generated/azure_mgmt_batch/models/network_configuration.rb +86 -0
  198. data/lib/2019-04-01/generated/azure_mgmt_batch/models/network_security_group_rule.rb +82 -0
  199. data/lib/2019-04-01/generated/azure_mgmt_batch/models/network_security_group_rule_access.rb +16 -0
  200. data/lib/2019-04-01/generated/azure_mgmt_batch/models/operation.rb +82 -0
  201. data/lib/2019-04-01/generated/azure_mgmt_batch/models/operation_display.rb +81 -0
  202. data/lib/2019-04-01/generated/azure_mgmt_batch/models/operation_list_result.rb +98 -0
  203. data/lib/2019-04-01/generated/azure_mgmt_batch/models/package_state.rb +16 -0
  204. data/lib/2019-04-01/generated/azure_mgmt_batch/models/pool.rb +462 -0
  205. data/lib/2019-04-01/generated/azure_mgmt_batch/models/pool_allocation_mode.rb +16 -0
  206. data/lib/2019-04-01/generated/azure_mgmt_batch/models/pool_endpoint_configuration.rb +60 -0
  207. data/lib/2019-04-01/generated/azure_mgmt_batch/models/pool_provisioning_state.rb +16 -0
  208. data/lib/2019-04-01/generated/azure_mgmt_batch/models/provisioning_state.rb +20 -0
  209. data/lib/2019-04-01/generated/azure_mgmt_batch/models/proxy_resource.rb +84 -0
  210. data/lib/2019-04-01/generated/azure_mgmt_batch/models/resize_error.rb +80 -0
  211. data/lib/2019-04-01/generated/azure_mgmt_batch/models/resize_operation_status.rb +127 -0
  212. data/lib/2019-04-01/generated/azure_mgmt_batch/models/resource.rb +112 -0
  213. data/lib/2019-04-01/generated/azure_mgmt_batch/models/resource_file.rb +139 -0
  214. data/lib/2019-04-01/generated/azure_mgmt_batch/models/scale_settings.rb +69 -0
  215. data/lib/2019-04-01/generated/azure_mgmt_batch/models/start_task.rb +174 -0
  216. data/lib/2019-04-01/generated/azure_mgmt_batch/models/storage_account_type.rb +16 -0
  217. data/lib/2019-04-01/generated/azure_mgmt_batch/models/task_container_settings.rb +77 -0
  218. data/lib/2019-04-01/generated/azure_mgmt_batch/models/task_scheduling_policy.rb +49 -0
  219. data/lib/2019-04-01/generated/azure_mgmt_batch/models/user_account.rb +104 -0
  220. data/lib/2019-04-01/generated/azure_mgmt_batch/models/user_identity.rb +64 -0
  221. data/lib/2019-04-01/generated/azure_mgmt_batch/models/virtual_machine_configuration.rb +141 -0
  222. data/lib/2019-04-01/generated/azure_mgmt_batch/models/virtual_machine_family_core_quota.rb +60 -0
  223. data/lib/2019-04-01/generated/azure_mgmt_batch/models/windows_configuration.rb +48 -0
  224. data/lib/2019-04-01/generated/azure_mgmt_batch/models/windows_user_configuration.rb +51 -0
  225. data/lib/2019-04-01/generated/azure_mgmt_batch/module_definition.rb +9 -0
  226. data/lib/2019-04-01/generated/azure_mgmt_batch/operations.rb +219 -0
  227. data/lib/2019-04-01/generated/azure_mgmt_batch/pool_operations.rb +1148 -0
  228. data/lib/2019-08-01/generated/azure_mgmt_batch.rb +123 -0
  229. data/lib/2019-08-01/generated/azure_mgmt_batch/application_operations.rb +696 -0
  230. data/lib/2019-08-01/generated/azure_mgmt_batch/application_package_operations.rb +749 -0
  231. data/lib/2019-08-01/generated/azure_mgmt_batch/batch_account_operations.rb +1295 -0
  232. data/lib/2019-08-01/generated/azure_mgmt_batch/batch_management_client.rb +156 -0
  233. data/lib/2019-08-01/generated/azure_mgmt_batch/certificate_operations.rb +1023 -0
  234. data/lib/2019-08-01/generated/azure_mgmt_batch/location.rb +225 -0
  235. data/lib/2019-08-01/generated/azure_mgmt_batch/models/account_key_type.rb +16 -0
  236. data/lib/2019-08-01/generated/azure_mgmt_batch/models/activate_application_package_parameters.rb +46 -0
  237. data/lib/2019-08-01/generated/azure_mgmt_batch/models/allocation_state.rb +17 -0
  238. data/lib/2019-08-01/generated/azure_mgmt_batch/models/application.rb +107 -0
  239. data/lib/2019-08-01/generated/azure_mgmt_batch/models/application_package.rb +137 -0
  240. data/lib/2019-08-01/generated/azure_mgmt_batch/models/application_package_reference.rb +64 -0
  241. data/lib/2019-08-01/generated/azure_mgmt_batch/models/auto_scale_run.rb +74 -0
  242. data/lib/2019-08-01/generated/azure_mgmt_batch/models/auto_scale_run_error.rb +80 -0
  243. data/lib/2019-08-01/generated/azure_mgmt_batch/models/auto_scale_settings.rb +61 -0
  244. data/lib/2019-08-01/generated/azure_mgmt_batch/models/auto_storage_base_properties.rb +47 -0
  245. data/lib/2019-08-01/generated/azure_mgmt_batch/models/auto_storage_properties.rb +56 -0
  246. data/lib/2019-08-01/generated/azure_mgmt_batch/models/auto_user_scope.rb +16 -0
  247. data/lib/2019-08-01/generated/azure_mgmt_batch/models/auto_user_specification.rb +68 -0
  248. data/lib/2019-08-01/generated/azure_mgmt_batch/models/azure_blob_file_system_configuration.rb +109 -0
  249. data/lib/2019-08-01/generated/azure_mgmt_batch/models/azure_file_share_configuration.rb +97 -0
  250. data/lib/2019-08-01/generated/azure_mgmt_batch/models/batch_account.rb +257 -0
  251. data/lib/2019-08-01/generated/azure_mgmt_batch/models/batch_account_create_parameters.rb +110 -0
  252. data/lib/2019-08-01/generated/azure_mgmt_batch/models/batch_account_keys.rb +71 -0
  253. data/lib/2019-08-01/generated/azure_mgmt_batch/models/batch_account_list_result.rb +99 -0
  254. data/lib/2019-08-01/generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb +48 -0
  255. data/lib/2019-08-01/generated/azure_mgmt_batch/models/batch_account_update_parameters.rb +68 -0
  256. data/lib/2019-08-01/generated/azure_mgmt_batch/models/batch_location_quota.rb +48 -0
  257. data/lib/2019-08-01/generated/azure_mgmt_batch/models/caching_type.rb +17 -0
  258. data/lib/2019-08-01/generated/azure_mgmt_batch/models/certificate.rb +192 -0
  259. data/lib/2019-08-01/generated/azure_mgmt_batch/models/certificate_base_properties.rb +75 -0
  260. data/lib/2019-08-01/generated/azure_mgmt_batch/models/certificate_create_or_update_parameters.rb +135 -0
  261. data/lib/2019-08-01/generated/azure_mgmt_batch/models/certificate_format.rb +16 -0
  262. data/lib/2019-08-01/generated/azure_mgmt_batch/models/certificate_provisioning_state.rb +17 -0
  263. data/lib/2019-08-01/generated/azure_mgmt_batch/models/certificate_reference.rb +112 -0
  264. data/lib/2019-08-01/generated/azure_mgmt_batch/models/certificate_store_location.rb +16 -0
  265. data/lib/2019-08-01/generated/azure_mgmt_batch/models/certificate_visibility.rb +17 -0
  266. data/lib/2019-08-01/generated/azure_mgmt_batch/models/check_name_availability_parameters.rb +61 -0
  267. data/lib/2019-08-01/generated/azure_mgmt_batch/models/check_name_availability_result.rb +78 -0
  268. data/lib/2019-08-01/generated/azure_mgmt_batch/models/cifsmount_configuration.rb +98 -0
  269. data/lib/2019-08-01/generated/azure_mgmt_batch/models/cloud_service_configuration.rb +68 -0
  270. data/lib/2019-08-01/generated/azure_mgmt_batch/models/compute_node_deallocation_option.rb +18 -0
  271. data/lib/2019-08-01/generated/azure_mgmt_batch/models/compute_node_fill_type.rb +16 -0
  272. data/lib/2019-08-01/generated/azure_mgmt_batch/models/container_configuration.rb +95 -0
  273. data/lib/2019-08-01/generated/azure_mgmt_batch/models/container_registry.rb +70 -0
  274. data/lib/2019-08-01/generated/azure_mgmt_batch/models/container_working_directory.rb +16 -0
  275. data/lib/2019-08-01/generated/azure_mgmt_batch/models/data_disk.rb +102 -0
  276. data/lib/2019-08-01/generated/azure_mgmt_batch/models/delete_certificate_error.rb +92 -0
  277. data/lib/2019-08-01/generated/azure_mgmt_batch/models/deployment_configuration.rb +66 -0
  278. data/lib/2019-08-01/generated/azure_mgmt_batch/models/elevation_level.rb +16 -0
  279. data/lib/2019-08-01/generated/azure_mgmt_batch/models/environment_setting.rb +58 -0
  280. data/lib/2019-08-01/generated/azure_mgmt_batch/models/fixed_scale_settings.rb +93 -0
  281. data/lib/2019-08-01/generated/azure_mgmt_batch/models/image_reference.rb +111 -0
  282. data/lib/2019-08-01/generated/azure_mgmt_batch/models/inbound_endpoint_protocol.rb +16 -0
  283. data/lib/2019-08-01/generated/azure_mgmt_batch/models/inbound_nat_pool.rb +141 -0
  284. data/lib/2019-08-01/generated/azure_mgmt_batch/models/inter_node_communication_state.rb +16 -0
  285. data/lib/2019-08-01/generated/azure_mgmt_batch/models/key_vault_reference.rb +59 -0
  286. data/lib/2019-08-01/generated/azure_mgmt_batch/models/linux_user_configuration.rb +81 -0
  287. data/lib/2019-08-01/generated/azure_mgmt_batch/models/list_application_packages_result.rb +98 -0
  288. data/lib/2019-08-01/generated/azure_mgmt_batch/models/list_applications_result.rb +98 -0
  289. data/lib/2019-08-01/generated/azure_mgmt_batch/models/list_certificates_result.rb +98 -0
  290. data/lib/2019-08-01/generated/azure_mgmt_batch/models/list_pools_result.rb +98 -0
  291. data/lib/2019-08-01/generated/azure_mgmt_batch/models/login_mode.rb +16 -0
  292. data/lib/2019-08-01/generated/azure_mgmt_batch/models/metadata_item.rb +60 -0
  293. data/lib/2019-08-01/generated/azure_mgmt_batch/models/mount_configuration.rb +91 -0
  294. data/lib/2019-08-01/generated/azure_mgmt_batch/models/name_availability_reason.rb +16 -0
  295. data/lib/2019-08-01/generated/azure_mgmt_batch/models/network_configuration.rb +111 -0
  296. data/lib/2019-08-01/generated/azure_mgmt_batch/models/network_security_group_rule.rb +106 -0
  297. data/lib/2019-08-01/generated/azure_mgmt_batch/models/network_security_group_rule_access.rb +16 -0
  298. data/lib/2019-08-01/generated/azure_mgmt_batch/models/nfsmount_configuration.rb +74 -0
  299. data/lib/2019-08-01/generated/azure_mgmt_batch/models/operation.rb +82 -0
  300. data/lib/2019-08-01/generated/azure_mgmt_batch/models/operation_display.rb +81 -0
  301. data/lib/2019-08-01/generated/azure_mgmt_batch/models/operation_list_result.rb +98 -0
  302. data/lib/2019-08-01/generated/azure_mgmt_batch/models/package_state.rb +16 -0
  303. data/lib/2019-08-01/generated/azure_mgmt_batch/models/pool.rb +484 -0
  304. data/lib/2019-08-01/generated/azure_mgmt_batch/models/pool_allocation_mode.rb +16 -0
  305. data/lib/2019-08-01/generated/azure_mgmt_batch/models/pool_endpoint_configuration.rb +60 -0
  306. data/lib/2019-08-01/generated/azure_mgmt_batch/models/pool_provisioning_state.rb +16 -0
  307. data/lib/2019-08-01/generated/azure_mgmt_batch/models/provisioning_state.rb +20 -0
  308. data/lib/2019-08-01/generated/azure_mgmt_batch/models/proxy_resource.rb +84 -0
  309. data/lib/2019-08-01/generated/azure_mgmt_batch/models/resize_error.rb +80 -0
  310. data/lib/2019-08-01/generated/azure_mgmt_batch/models/resize_operation_status.rb +127 -0
  311. data/lib/2019-08-01/generated/azure_mgmt_batch/models/resource.rb +112 -0
  312. data/lib/2019-08-01/generated/azure_mgmt_batch/models/resource_file.rb +139 -0
  313. data/lib/2019-08-01/generated/azure_mgmt_batch/models/scale_settings.rb +69 -0
  314. data/lib/2019-08-01/generated/azure_mgmt_batch/models/start_task.rb +174 -0
  315. data/lib/2019-08-01/generated/azure_mgmt_batch/models/storage_account_type.rb +16 -0
  316. data/lib/2019-08-01/generated/azure_mgmt_batch/models/task_container_settings.rb +92 -0
  317. data/lib/2019-08-01/generated/azure_mgmt_batch/models/task_scheduling_policy.rb +49 -0
  318. data/lib/2019-08-01/generated/azure_mgmt_batch/models/user_account.rb +104 -0
  319. data/lib/2019-08-01/generated/azure_mgmt_batch/models/user_identity.rb +64 -0
  320. data/lib/2019-08-01/generated/azure_mgmt_batch/models/virtual_machine_configuration.rb +141 -0
  321. data/lib/2019-08-01/generated/azure_mgmt_batch/models/virtual_machine_family_core_quota.rb +60 -0
  322. data/lib/2019-08-01/generated/azure_mgmt_batch/models/windows_configuration.rb +48 -0
  323. data/lib/2019-08-01/generated/azure_mgmt_batch/models/windows_user_configuration.rb +51 -0
  324. data/lib/2019-08-01/generated/azure_mgmt_batch/module_definition.rb +9 -0
  325. data/lib/2019-08-01/generated/azure_mgmt_batch/operations.rb +219 -0
  326. data/lib/2019-08-01/generated/azure_mgmt_batch/pool_operations.rb +1148 -0
  327. data/lib/azure_mgmt_batch.rb +3 -0
  328. data/lib/profiles/latest/modules/batch_profile_module.rb +244 -204
  329. data/lib/version.rb +1 -1
  330. metadata +289 -5
@@ -0,0 +1,749 @@
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::Batch::Mgmt::V2019_08_01
7
+ #
8
+ # ApplicationPackageOperations
9
+ #
10
+ class ApplicationPackageOperations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ApplicationPackageOperations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [BatchManagementClient] reference to the BatchManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Activates the specified application package. This should be done after the
26
+ # `ApplicationPackage` was created and uploaded. This needs to be done before
27
+ # an `ApplicationPackage` can be used on Pools or Tasks
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group that
30
+ # contains the Batch account.
31
+ # @param account_name [String] The name of the Batch account.
32
+ # @param application_name [String] The name of the application. This must be
33
+ # unique within the account.
34
+ # @param version_name [String] The version of the application.
35
+ # @param parameters [ActivateApplicationPackageParameters] The parameters for
36
+ # the request.
37
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
38
+ # will be added to the HTTP request.
39
+ #
40
+ # @return [ApplicationPackage] operation results.
41
+ #
42
+ def activate(resource_group_name, account_name, application_name, version_name, parameters, custom_headers:nil)
43
+ response = activate_async(resource_group_name, account_name, application_name, version_name, parameters, custom_headers:custom_headers).value!
44
+ response.body unless response.nil?
45
+ end
46
+
47
+ #
48
+ # Activates the specified application package. This should be done after the
49
+ # `ApplicationPackage` was created and uploaded. This needs to be done before
50
+ # an `ApplicationPackage` can be used on Pools or Tasks
51
+ #
52
+ # @param resource_group_name [String] The name of the resource group that
53
+ # contains the Batch account.
54
+ # @param account_name [String] The name of the Batch account.
55
+ # @param application_name [String] The name of the application. This must be
56
+ # unique within the account.
57
+ # @param version_name [String] The version of the application.
58
+ # @param parameters [ActivateApplicationPackageParameters] The parameters for
59
+ # the request.
60
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
61
+ # will be added to the HTTP request.
62
+ #
63
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
64
+ #
65
+ def activate_with_http_info(resource_group_name, account_name, application_name, version_name, parameters, custom_headers:nil)
66
+ activate_async(resource_group_name, account_name, application_name, version_name, parameters, custom_headers:custom_headers).value!
67
+ end
68
+
69
+ #
70
+ # Activates the specified application package. This should be done after the
71
+ # `ApplicationPackage` was created and uploaded. This needs to be done before
72
+ # an `ApplicationPackage` can be used on Pools or Tasks
73
+ #
74
+ # @param resource_group_name [String] The name of the resource group that
75
+ # contains the Batch account.
76
+ # @param account_name [String] The name of the Batch account.
77
+ # @param application_name [String] The name of the application. This must be
78
+ # unique within the account.
79
+ # @param version_name [String] The version of the application.
80
+ # @param parameters [ActivateApplicationPackageParameters] The parameters for
81
+ # the request.
82
+ # @param [Hash{String => String}] A hash of custom headers that will be added
83
+ # to the HTTP request.
84
+ #
85
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
86
+ #
87
+ def activate_async(resource_group_name, account_name, application_name, version_name, parameters, custom_headers:nil)
88
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
89
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
90
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
91
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
92
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
93
+ fail ArgumentError, 'application_name is nil' if application_name.nil?
94
+ fail ArgumentError, "'application_name' should satisfy the constraint - 'MaxLength': '64'" if !application_name.nil? && application_name.length > 64
95
+ fail ArgumentError, "'application_name' should satisfy the constraint - 'MinLength': '1'" if !application_name.nil? && application_name.length < 1
96
+ fail ArgumentError, "'application_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9_-]+$'" if !application_name.nil? && application_name.match(Regexp.new('^^[a-zA-Z0-9_-]+$$')).nil?
97
+ fail ArgumentError, 'version_name is nil' if version_name.nil?
98
+ fail ArgumentError, "'version_name' should satisfy the constraint - 'MaxLength': '64'" if !version_name.nil? && version_name.length > 64
99
+ fail ArgumentError, "'version_name' should satisfy the constraint - 'MinLength': '1'" if !version_name.nil? && version_name.length < 1
100
+ fail ArgumentError, "'version_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$'" if !version_name.nil? && version_name.match(Regexp.new('^^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$$')).nil?
101
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
102
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
103
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
104
+
105
+
106
+ request_headers = {}
107
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
108
+
109
+ # Set Headers
110
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
111
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
112
+
113
+ # Serialize Request
114
+ request_mapper = Azure::Batch::Mgmt::V2019_08_01::Models::ActivateApplicationPackageParameters.mapper()
115
+ request_content = @client.serialize(request_mapper, parameters)
116
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
117
+
118
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}/activate'
119
+
120
+ request_url = @base_url || @client.base_url
121
+
122
+ options = {
123
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
124
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'applicationName' => application_name,'versionName' => version_name,'subscriptionId' => @client.subscription_id},
125
+ query_params: {'api-version' => @client.api_version},
126
+ body: request_content,
127
+ headers: request_headers.merge(custom_headers || {}),
128
+ base_url: request_url
129
+ }
130
+ promise = @client.make_request_async(:post, path_template, options)
131
+
132
+ promise = promise.then do |result|
133
+ http_response = result.response
134
+ status_code = http_response.status
135
+ response_content = http_response.body
136
+ unless status_code == 200
137
+ error_model = JSON.load(response_content)
138
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
139
+ end
140
+
141
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
142
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
143
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
144
+ # Deserialize Response
145
+ if status_code == 200
146
+ begin
147
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
148
+ result_mapper = Azure::Batch::Mgmt::V2019_08_01::Models::ApplicationPackage.mapper()
149
+ result.body = @client.deserialize(result_mapper, parsed_response)
150
+ rescue Exception => e
151
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
152
+ end
153
+ end
154
+
155
+ result
156
+ end
157
+
158
+ promise.execute
159
+ end
160
+
161
+ #
162
+ # Creates an application package record. The record contains the SAS where the
163
+ # package should be uploaded to. Once it is uploaded the `ApplicationPackage`
164
+ # needs to be activated using `ApplicationPackageActive` before it can be used.
165
+ #
166
+ # @param resource_group_name [String] The name of the resource group that
167
+ # contains the Batch account.
168
+ # @param account_name [String] The name of the Batch account.
169
+ # @param application_name [String] The name of the application. This must be
170
+ # unique within the account.
171
+ # @param version_name [String] The version of the application.
172
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
173
+ # will be added to the HTTP request.
174
+ #
175
+ # @return [ApplicationPackage] operation results.
176
+ #
177
+ def create(resource_group_name, account_name, application_name, version_name, custom_headers:nil)
178
+ response = create_async(resource_group_name, account_name, application_name, version_name, custom_headers:custom_headers).value!
179
+ response.body unless response.nil?
180
+ end
181
+
182
+ #
183
+ # Creates an application package record. The record contains the SAS where the
184
+ # package should be uploaded to. Once it is uploaded the `ApplicationPackage`
185
+ # needs to be activated using `ApplicationPackageActive` before it can be used.
186
+ #
187
+ # @param resource_group_name [String] The name of the resource group that
188
+ # contains the Batch account.
189
+ # @param account_name [String] The name of the Batch account.
190
+ # @param application_name [String] The name of the application. This must be
191
+ # unique within the account.
192
+ # @param version_name [String] The version of the application.
193
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
194
+ # will be added to the HTTP request.
195
+ #
196
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
197
+ #
198
+ def create_with_http_info(resource_group_name, account_name, application_name, version_name, custom_headers:nil)
199
+ create_async(resource_group_name, account_name, application_name, version_name, custom_headers:custom_headers).value!
200
+ end
201
+
202
+ #
203
+ # Creates an application package record. The record contains the SAS where the
204
+ # package should be uploaded to. Once it is uploaded the `ApplicationPackage`
205
+ # needs to be activated using `ApplicationPackageActive` before it can be used.
206
+ #
207
+ # @param resource_group_name [String] The name of the resource group that
208
+ # contains the Batch account.
209
+ # @param account_name [String] The name of the Batch account.
210
+ # @param application_name [String] The name of the application. This must be
211
+ # unique within the account.
212
+ # @param version_name [String] The version of the application.
213
+ # @param [Hash{String => String}] A hash of custom headers that will be added
214
+ # to the HTTP request.
215
+ #
216
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
217
+ #
218
+ def create_async(resource_group_name, account_name, application_name, version_name, custom_headers:nil)
219
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
220
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
221
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
222
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
223
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
224
+ fail ArgumentError, 'application_name is nil' if application_name.nil?
225
+ fail ArgumentError, "'application_name' should satisfy the constraint - 'MaxLength': '64'" if !application_name.nil? && application_name.length > 64
226
+ fail ArgumentError, "'application_name' should satisfy the constraint - 'MinLength': '1'" if !application_name.nil? && application_name.length < 1
227
+ fail ArgumentError, "'application_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9_-]+$'" if !application_name.nil? && application_name.match(Regexp.new('^^[a-zA-Z0-9_-]+$$')).nil?
228
+ fail ArgumentError, 'version_name is nil' if version_name.nil?
229
+ fail ArgumentError, "'version_name' should satisfy the constraint - 'MaxLength': '64'" if !version_name.nil? && version_name.length > 64
230
+ fail ArgumentError, "'version_name' should satisfy the constraint - 'MinLength': '1'" if !version_name.nil? && version_name.length < 1
231
+ fail ArgumentError, "'version_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$'" if !version_name.nil? && version_name.match(Regexp.new('^^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$$')).nil?
232
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
233
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
234
+
235
+ parameters = nil
236
+
237
+ request_headers = {}
238
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
239
+
240
+ # Set Headers
241
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
242
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
243
+
244
+ # Serialize Request
245
+ request_mapper = Azure::Batch::Mgmt::V2019_08_01::Models::ApplicationPackage.mapper()
246
+ request_content = @client.serialize(request_mapper, parameters)
247
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
248
+
249
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}'
250
+
251
+ request_url = @base_url || @client.base_url
252
+
253
+ options = {
254
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
255
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'applicationName' => application_name,'versionName' => version_name,'subscriptionId' => @client.subscription_id},
256
+ query_params: {'api-version' => @client.api_version},
257
+ body: request_content,
258
+ headers: request_headers.merge(custom_headers || {}),
259
+ base_url: request_url
260
+ }
261
+ promise = @client.make_request_async(:put, path_template, options)
262
+
263
+ promise = promise.then do |result|
264
+ http_response = result.response
265
+ status_code = http_response.status
266
+ response_content = http_response.body
267
+ unless status_code == 200
268
+ error_model = JSON.load(response_content)
269
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
270
+ end
271
+
272
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
273
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
274
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
275
+ # Deserialize Response
276
+ if status_code == 200
277
+ begin
278
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
279
+ result_mapper = Azure::Batch::Mgmt::V2019_08_01::Models::ApplicationPackage.mapper()
280
+ result.body = @client.deserialize(result_mapper, parsed_response)
281
+ rescue Exception => e
282
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
283
+ end
284
+ end
285
+
286
+ result
287
+ end
288
+
289
+ promise.execute
290
+ end
291
+
292
+ #
293
+ # Deletes an application package record and its associated binary file.
294
+ #
295
+ # @param resource_group_name [String] The name of the resource group that
296
+ # contains the Batch account.
297
+ # @param account_name [String] The name of the Batch account.
298
+ # @param application_name [String] The name of the application. This must be
299
+ # unique within the account.
300
+ # @param version_name [String] The version of the application.
301
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
302
+ # will be added to the HTTP request.
303
+ #
304
+ #
305
+ def delete(resource_group_name, account_name, application_name, version_name, custom_headers:nil)
306
+ response = delete_async(resource_group_name, account_name, application_name, version_name, custom_headers:custom_headers).value!
307
+ nil
308
+ end
309
+
310
+ #
311
+ # Deletes an application package record and its associated binary file.
312
+ #
313
+ # @param resource_group_name [String] The name of the resource group that
314
+ # contains the Batch account.
315
+ # @param account_name [String] The name of the Batch account.
316
+ # @param application_name [String] The name of the application. This must be
317
+ # unique within the account.
318
+ # @param version_name [String] The version of the application.
319
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
320
+ # will be added to the HTTP request.
321
+ #
322
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
323
+ #
324
+ def delete_with_http_info(resource_group_name, account_name, application_name, version_name, custom_headers:nil)
325
+ delete_async(resource_group_name, account_name, application_name, version_name, custom_headers:custom_headers).value!
326
+ end
327
+
328
+ #
329
+ # Deletes an application package record and its associated binary file.
330
+ #
331
+ # @param resource_group_name [String] The name of the resource group that
332
+ # contains the Batch account.
333
+ # @param account_name [String] The name of the Batch account.
334
+ # @param application_name [String] The name of the application. This must be
335
+ # unique within the account.
336
+ # @param version_name [String] The version of the application.
337
+ # @param [Hash{String => String}] A hash of custom headers that will be added
338
+ # to the HTTP request.
339
+ #
340
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
341
+ #
342
+ def delete_async(resource_group_name, account_name, application_name, version_name, custom_headers:nil)
343
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
344
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
345
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
346
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
347
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
348
+ fail ArgumentError, 'application_name is nil' if application_name.nil?
349
+ fail ArgumentError, "'application_name' should satisfy the constraint - 'MaxLength': '64'" if !application_name.nil? && application_name.length > 64
350
+ fail ArgumentError, "'application_name' should satisfy the constraint - 'MinLength': '1'" if !application_name.nil? && application_name.length < 1
351
+ fail ArgumentError, "'application_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9_-]+$'" if !application_name.nil? && application_name.match(Regexp.new('^^[a-zA-Z0-9_-]+$$')).nil?
352
+ fail ArgumentError, 'version_name is nil' if version_name.nil?
353
+ fail ArgumentError, "'version_name' should satisfy the constraint - 'MaxLength': '64'" if !version_name.nil? && version_name.length > 64
354
+ fail ArgumentError, "'version_name' should satisfy the constraint - 'MinLength': '1'" if !version_name.nil? && version_name.length < 1
355
+ fail ArgumentError, "'version_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$'" if !version_name.nil? && version_name.match(Regexp.new('^^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$$')).nil?
356
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
357
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}'
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: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'applicationName' => application_name,'versionName' => version_name,'subscriptionId' => @client.subscription_id},
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(:delete, 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 || status_code == 204
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
+
392
+ result
393
+ end
394
+
395
+ promise.execute
396
+ end
397
+
398
+ #
399
+ # Gets information about the specified application package.
400
+ #
401
+ # @param resource_group_name [String] The name of the resource group that
402
+ # contains the Batch account.
403
+ # @param account_name [String] The name of the Batch account.
404
+ # @param application_name [String] The name of the application. This must be
405
+ # unique within the account.
406
+ # @param version_name [String] The version of the application.
407
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
408
+ # will be added to the HTTP request.
409
+ #
410
+ # @return [ApplicationPackage] operation results.
411
+ #
412
+ def get(resource_group_name, account_name, application_name, version_name, custom_headers:nil)
413
+ response = get_async(resource_group_name, account_name, application_name, version_name, custom_headers:custom_headers).value!
414
+ response.body unless response.nil?
415
+ end
416
+
417
+ #
418
+ # Gets information about the specified application package.
419
+ #
420
+ # @param resource_group_name [String] The name of the resource group that
421
+ # contains the Batch account.
422
+ # @param account_name [String] The name of the Batch account.
423
+ # @param application_name [String] The name of the application. This must be
424
+ # unique within the account.
425
+ # @param version_name [String] The version of the application.
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 get_with_http_info(resource_group_name, account_name, application_name, version_name, custom_headers:nil)
432
+ get_async(resource_group_name, account_name, application_name, version_name, custom_headers:custom_headers).value!
433
+ end
434
+
435
+ #
436
+ # Gets information about the specified application package.
437
+ #
438
+ # @param resource_group_name [String] The name of the resource group that
439
+ # contains the Batch account.
440
+ # @param account_name [String] The name of the Batch account.
441
+ # @param application_name [String] The name of the application. This must be
442
+ # unique within the account.
443
+ # @param version_name [String] The version of the application.
444
+ # @param [Hash{String => String}] A hash of custom headers that will be added
445
+ # to the HTTP request.
446
+ #
447
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
448
+ #
449
+ def get_async(resource_group_name, account_name, application_name, version_name, custom_headers:nil)
450
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
451
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
452
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
453
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
454
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
455
+ fail ArgumentError, 'application_name is nil' if application_name.nil?
456
+ fail ArgumentError, "'application_name' should satisfy the constraint - 'MaxLength': '64'" if !application_name.nil? && application_name.length > 64
457
+ fail ArgumentError, "'application_name' should satisfy the constraint - 'MinLength': '1'" if !application_name.nil? && application_name.length < 1
458
+ fail ArgumentError, "'application_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9_-]+$'" if !application_name.nil? && application_name.match(Regexp.new('^^[a-zA-Z0-9_-]+$$')).nil?
459
+ fail ArgumentError, 'version_name is nil' if version_name.nil?
460
+ fail ArgumentError, "'version_name' should satisfy the constraint - 'MaxLength': '64'" if !version_name.nil? && version_name.length > 64
461
+ fail ArgumentError, "'version_name' should satisfy the constraint - 'MinLength': '1'" if !version_name.nil? && version_name.length < 1
462
+ fail ArgumentError, "'version_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$'" if !version_name.nil? && version_name.match(Regexp.new('^^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$$')).nil?
463
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
464
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
465
+
466
+
467
+ request_headers = {}
468
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
469
+
470
+ # Set Headers
471
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
472
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
473
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}'
474
+
475
+ request_url = @base_url || @client.base_url
476
+
477
+ options = {
478
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
479
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'applicationName' => application_name,'versionName' => version_name,'subscriptionId' => @client.subscription_id},
480
+ query_params: {'api-version' => @client.api_version},
481
+ headers: request_headers.merge(custom_headers || {}),
482
+ base_url: request_url
483
+ }
484
+ promise = @client.make_request_async(:get, path_template, options)
485
+
486
+ promise = promise.then do |result|
487
+ http_response = result.response
488
+ status_code = http_response.status
489
+ response_content = http_response.body
490
+ unless status_code == 200
491
+ error_model = JSON.load(response_content)
492
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
493
+ end
494
+
495
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
496
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
497
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
498
+ # Deserialize Response
499
+ if status_code == 200
500
+ begin
501
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
502
+ result_mapper = Azure::Batch::Mgmt::V2019_08_01::Models::ApplicationPackage.mapper()
503
+ result.body = @client.deserialize(result_mapper, parsed_response)
504
+ rescue Exception => e
505
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
506
+ end
507
+ end
508
+
509
+ result
510
+ end
511
+
512
+ promise.execute
513
+ end
514
+
515
+ #
516
+ # Lists all of the application packages in the specified application.
517
+ #
518
+ # @param resource_group_name [String] The name of the resource group that
519
+ # contains the Batch account.
520
+ # @param account_name [String] The name of the Batch account.
521
+ # @param application_name [String] The name of the application. This must be
522
+ # unique within the account.
523
+ # @param maxresults [Integer] The maximum number of items to return in the
524
+ # response.
525
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
526
+ # will be added to the HTTP request.
527
+ #
528
+ # @return [Array<ApplicationPackage>] operation results.
529
+ #
530
+ def list(resource_group_name, account_name, application_name, maxresults:nil, custom_headers:nil)
531
+ first_page = list_as_lazy(resource_group_name, account_name, application_name, maxresults:maxresults, custom_headers:custom_headers)
532
+ first_page.get_all_items
533
+ end
534
+
535
+ #
536
+ # Lists all of the application packages in the specified application.
537
+ #
538
+ # @param resource_group_name [String] The name of the resource group that
539
+ # contains the Batch account.
540
+ # @param account_name [String] The name of the Batch account.
541
+ # @param application_name [String] The name of the application. This must be
542
+ # unique within the account.
543
+ # @param maxresults [Integer] The maximum number of items to return in the
544
+ # response.
545
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
546
+ # will be added to the HTTP request.
547
+ #
548
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
549
+ #
550
+ def list_with_http_info(resource_group_name, account_name, application_name, maxresults:nil, custom_headers:nil)
551
+ list_async(resource_group_name, account_name, application_name, maxresults:maxresults, custom_headers:custom_headers).value!
552
+ end
553
+
554
+ #
555
+ # Lists all of the application packages in the specified application.
556
+ #
557
+ # @param resource_group_name [String] The name of the resource group that
558
+ # contains the Batch account.
559
+ # @param account_name [String] The name of the Batch account.
560
+ # @param application_name [String] The name of the application. This must be
561
+ # unique within the account.
562
+ # @param maxresults [Integer] The maximum number of items to return in the
563
+ # response.
564
+ # @param [Hash{String => String}] A hash of custom headers that will be added
565
+ # to the HTTP request.
566
+ #
567
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
568
+ #
569
+ def list_async(resource_group_name, account_name, application_name, maxresults:nil, custom_headers:nil)
570
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
571
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
572
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
573
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
574
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
575
+ fail ArgumentError, 'application_name is nil' if application_name.nil?
576
+ fail ArgumentError, "'application_name' should satisfy the constraint - 'MaxLength': '64'" if !application_name.nil? && application_name.length > 64
577
+ fail ArgumentError, "'application_name' should satisfy the constraint - 'MinLength': '1'" if !application_name.nil? && application_name.length < 1
578
+ fail ArgumentError, "'application_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9_-]+$'" if !application_name.nil? && application_name.match(Regexp.new('^^[a-zA-Z0-9_-]+$$')).nil?
579
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
580
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
581
+
582
+
583
+ request_headers = {}
584
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
585
+
586
+ # Set Headers
587
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
588
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
589
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions'
590
+
591
+ request_url = @base_url || @client.base_url
592
+
593
+ options = {
594
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
595
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'applicationName' => application_name,'subscriptionId' => @client.subscription_id},
596
+ query_params: {'maxresults' => maxresults,'api-version' => @client.api_version},
597
+ headers: request_headers.merge(custom_headers || {}),
598
+ base_url: request_url
599
+ }
600
+ promise = @client.make_request_async(:get, path_template, options)
601
+
602
+ promise = promise.then do |result|
603
+ http_response = result.response
604
+ status_code = http_response.status
605
+ response_content = http_response.body
606
+ unless status_code == 200
607
+ error_model = JSON.load(response_content)
608
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
609
+ end
610
+
611
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
612
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
613
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
614
+ # Deserialize Response
615
+ if status_code == 200
616
+ begin
617
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
618
+ result_mapper = Azure::Batch::Mgmt::V2019_08_01::Models::ListApplicationPackagesResult.mapper()
619
+ result.body = @client.deserialize(result_mapper, parsed_response)
620
+ rescue Exception => e
621
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
622
+ end
623
+ end
624
+
625
+ result
626
+ end
627
+
628
+ promise.execute
629
+ end
630
+
631
+ #
632
+ # Lists all of the application packages in the specified application.
633
+ #
634
+ # @param next_page_link [String] The NextLink from the previous successful call
635
+ # to List operation.
636
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
637
+ # will be added to the HTTP request.
638
+ #
639
+ # @return [ListApplicationPackagesResult] operation results.
640
+ #
641
+ def list_next(next_page_link, custom_headers:nil)
642
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
643
+ response.body unless response.nil?
644
+ end
645
+
646
+ #
647
+ # Lists all of the application packages in the specified application.
648
+ #
649
+ # @param next_page_link [String] The NextLink from the previous successful call
650
+ # to List operation.
651
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
652
+ # will be added to the HTTP request.
653
+ #
654
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
655
+ #
656
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
657
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
658
+ end
659
+
660
+ #
661
+ # Lists all of the application packages in the specified application.
662
+ #
663
+ # @param next_page_link [String] The NextLink from the previous successful call
664
+ # to List operation.
665
+ # @param [Hash{String => String}] A hash of custom headers that will be added
666
+ # to the HTTP request.
667
+ #
668
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
669
+ #
670
+ def list_next_async(next_page_link, custom_headers:nil)
671
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
672
+
673
+
674
+ request_headers = {}
675
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
676
+
677
+ # Set Headers
678
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
679
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
680
+ path_template = '{nextLink}'
681
+
682
+ request_url = @base_url || @client.base_url
683
+
684
+ options = {
685
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
686
+ skip_encoding_path_params: {'nextLink' => next_page_link},
687
+ headers: request_headers.merge(custom_headers || {}),
688
+ base_url: request_url
689
+ }
690
+ promise = @client.make_request_async(:get, path_template, options)
691
+
692
+ promise = promise.then do |result|
693
+ http_response = result.response
694
+ status_code = http_response.status
695
+ response_content = http_response.body
696
+ unless status_code == 200
697
+ error_model = JSON.load(response_content)
698
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
699
+ end
700
+
701
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
702
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
703
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
704
+ # Deserialize Response
705
+ if status_code == 200
706
+ begin
707
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
708
+ result_mapper = Azure::Batch::Mgmt::V2019_08_01::Models::ListApplicationPackagesResult.mapper()
709
+ result.body = @client.deserialize(result_mapper, parsed_response)
710
+ rescue Exception => e
711
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
712
+ end
713
+ end
714
+
715
+ result
716
+ end
717
+
718
+ promise.execute
719
+ end
720
+
721
+ #
722
+ # Lists all of the application packages in the specified application.
723
+ #
724
+ # @param resource_group_name [String] The name of the resource group that
725
+ # contains the Batch account.
726
+ # @param account_name [String] The name of the Batch account.
727
+ # @param application_name [String] The name of the application. This must be
728
+ # unique within the account.
729
+ # @param maxresults [Integer] The maximum number of items to return in the
730
+ # response.
731
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
732
+ # will be added to the HTTP request.
733
+ #
734
+ # @return [ListApplicationPackagesResult] which provide lazy access to pages of
735
+ # the response.
736
+ #
737
+ def list_as_lazy(resource_group_name, account_name, application_name, maxresults:nil, custom_headers:nil)
738
+ response = list_async(resource_group_name, account_name, application_name, maxresults:maxresults, custom_headers:custom_headers).value!
739
+ unless response.nil?
740
+ page = response.body
741
+ page.next_method = Proc.new do |next_page_link|
742
+ list_next_async(next_page_link, custom_headers:custom_headers)
743
+ end
744
+ page
745
+ end
746
+ end
747
+
748
+ end
749
+ end