azure_mgmt_devtestlabs 0.17.1 → 0.17.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (227) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/dev_test_labs_client.rb +1 -1
  3. data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/attach_new_data_disk_options.rb +1 -1
  4. data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/disk.rb +1 -1
  5. data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_response.rb +1 -1
  6. data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/notification_channels.rb +16 -16
  7. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs.rb +241 -0
  8. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/arm_templates.rb +369 -0
  9. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/artifact_sources.rb +673 -0
  10. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/artifacts.rb +486 -0
  11. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/costs.rb +244 -0
  12. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/custom_images.rb +759 -0
  13. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/dev_test_labs_client.rb +227 -0
  14. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/disks.rb +1090 -0
  15. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/environments.rb +793 -0
  16. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/formulas.rb +727 -0
  17. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/gallery_images.rb +259 -0
  18. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/global_schedules.rb +1131 -0
  19. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/labs.rb +1820 -0
  20. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/applicable_schedule.rb +113 -0
  21. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/applicable_schedule_fragment.rb +78 -0
  22. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/apply_artifacts_request.rb +56 -0
  23. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/arm_template.rb +194 -0
  24. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/arm_template_info.rb +57 -0
  25. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/arm_template_list.rb +98 -0
  26. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/arm_template_parameter_properties.rb +57 -0
  27. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/arm_template_parameter_properties_fragment.rb +57 -0
  28. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact.rb +182 -0
  29. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties.rb +70 -0
  30. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties_fragment.rb +71 -0
  31. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_install_properties.rb +123 -0
  32. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_install_properties_fragment.rb +123 -0
  33. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_list.rb +98 -0
  34. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties.rb +57 -0
  35. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties_fragment.rb +57 -0
  36. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_source.rb +215 -0
  37. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_source_fragment.rb +144 -0
  38. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_source_list.rb +98 -0
  39. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/attach_disk_properties.rb +47 -0
  40. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/attach_new_data_disk_options.rb +69 -0
  41. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/attach_new_data_disk_options_fragment.rb +69 -0
  42. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/bulk_creation_parameters.rb +46 -0
  43. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/bulk_creation_parameters_fragment.rb +46 -0
  44. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/compute_data_disk.rb +80 -0
  45. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/compute_data_disk_fragment.rb +80 -0
  46. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status.rb +68 -0
  47. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status_fragment.rb +68 -0
  48. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/compute_vm_properties.rb +141 -0
  49. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/compute_vm_properties_fragment.rb +141 -0
  50. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/cost_threshold_properties.rb +97 -0
  51. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/cost_threshold_status.rb +16 -0
  52. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/cost_type.rb +17 -0
  53. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image.rb +238 -0
  54. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_fragment.rb +167 -0
  55. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_list.rb +98 -0
  56. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_os_type.rb +17 -0
  57. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_properties_custom.rb +69 -0
  58. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_properties_custom_fragment.rb +69 -0
  59. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_plan.rb +70 -0
  60. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_plan_fragment.rb +70 -0
  61. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_vm.rb +70 -0
  62. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_vm_fragment.rb +70 -0
  63. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/data_disk_properties.rb +73 -0
  64. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/data_disk_properties_fragment.rb +73 -0
  65. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/data_disk_storage_type_info.rb +58 -0
  66. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/data_disk_storage_type_info_fragment.rb +58 -0
  67. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/day_details.rb +46 -0
  68. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/day_details_fragment.rb +46 -0
  69. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/detach_data_disk_properties.rb +47 -0
  70. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/detach_disk_properties.rb +47 -0
  71. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/disk.rb +204 -0
  72. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/disk_fragment.rb +133 -0
  73. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/disk_list.rb +98 -0
  74. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/dtl_environment.rb +160 -0
  75. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/dtl_environment_fragment.rb +76 -0
  76. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/dtl_environment_list.rb +98 -0
  77. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/enable_status.rb +16 -0
  78. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/environment_deployment_properties.rb +67 -0
  79. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/environment_deployment_properties_fragment.rb +67 -0
  80. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/environment_permission.rb +16 -0
  81. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/evaluate_policies_properties.rb +79 -0
  82. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/evaluate_policies_request.rb +55 -0
  83. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/evaluate_policies_response.rb +55 -0
  84. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/event.rb +48 -0
  85. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/event_fragment.rb +48 -0
  86. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/export_resource_usage_parameters.rb +60 -0
  87. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/external_subnet.rb +57 -0
  88. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/external_subnet_fragment.rb +57 -0
  89. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/file_upload_options.rb +16 -0
  90. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/formula.rb +182 -0
  91. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/formula_fragment.rb +111 -0
  92. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/formula_list.rb +98 -0
  93. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/formula_properties_from_vm.rb +47 -0
  94. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/formula_properties_from_vm_fragment.rb +47 -0
  95. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/gallery_image.rb +178 -0
  96. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/gallery_image_list.rb +98 -0
  97. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/gallery_image_reference.rb +90 -0
  98. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/gallery_image_reference_fragment.rb +90 -0
  99. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/generate_arm_template_request.rb +90 -0
  100. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_parameter.rb +46 -0
  101. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_response.rb +46 -0
  102. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/host_caching_options.rb +17 -0
  103. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/hour_details.rb +46 -0
  104. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/hour_details_fragment.rb +46 -0
  105. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/http_status_code.rb +56 -0
  106. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/identity_properties.rb +79 -0
  107. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/import_lab_virtual_machine_request.rb +59 -0
  108. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule.rb +73 -0
  109. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule_fragment.rb +73 -0
  110. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab.rb +363 -0
  111. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_announcement_properties.rb +117 -0
  112. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_announcement_properties_fragment.rb +93 -0
  113. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_cost.rb +224 -0
  114. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_cost_details_properties.rb +69 -0
  115. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_cost_summary_properties.rb +46 -0
  116. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_fragment.rb +181 -0
  117. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_list.rb +98 -0
  118. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_resource_cost_properties.rb +136 -0
  119. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_support_properties.rb +59 -0
  120. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_support_properties_fragment.rb +59 -0
  121. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_vhd.rb +46 -0
  122. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_vhd_list.rb +98 -0
  123. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine.rb +526 -0
  124. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_creation_parameter.rb +478 -0
  125. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.rb +480 -0
  126. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_fragment.rb +441 -0
  127. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_list.rb +98 -0
  128. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/linux_os_info.rb +49 -0
  129. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/linux_os_info_fragment.rb +49 -0
  130. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/linux_os_state.rb +17 -0
  131. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/network_interface_properties.rb +139 -0
  132. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/network_interface_properties_fragment.rb +139 -0
  133. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/notification_channel.rb +189 -0
  134. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/notification_channel_event_type.rb +16 -0
  135. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/notification_channel_fragment.rb +118 -0
  136. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/notification_channel_list.rb +98 -0
  137. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/notification_settings.rb +96 -0
  138. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/notification_settings_fragment.rb +96 -0
  139. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/notify_parameters.rb +58 -0
  140. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/operation_error.rb +57 -0
  141. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/operation_metadata.rb +59 -0
  142. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/operation_metadata_display.rb +80 -0
  143. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/operation_result.rb +82 -0
  144. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/parameter_info.rb +57 -0
  145. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/parameters_value_file_info.rb +57 -0
  146. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/percentage_cost_threshold_properties.rb +46 -0
  147. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy.rb +197 -0
  148. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy_evaluator_type.rb +16 -0
  149. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy_fact_name.rb +24 -0
  150. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy_fragment.rb +126 -0
  151. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy_list.rb +98 -0
  152. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy_set_result.rb +67 -0
  153. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy_status.rb +16 -0
  154. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy_violation.rb +57 -0
  155. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/port.rb +58 -0
  156. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/port_fragment.rb +58 -0
  157. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/premium_data_disk.rb +16 -0
  158. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/provider_operation_result.rb +101 -0
  159. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/rdp_connection.rb +46 -0
  160. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/reporting_cycle_type.rb +16 -0
  161. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/resize_lab_virtual_machine_properties.rb +46 -0
  162. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/resource.rb +110 -0
  163. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/retarget_schedule_properties.rb +59 -0
  164. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/schedule.rb +219 -0
  165. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/schedule_creation_parameter.rb +173 -0
  166. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/schedule_creation_parameter_fragment.rb +173 -0
  167. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/schedule_fragment.rb +148 -0
  168. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/schedule_list.rb +98 -0
  169. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/secret.rb +121 -0
  170. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/secret_fragment.rb +62 -0
  171. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/secret_list.rb +98 -0
  172. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/service_fabric.rb +147 -0
  173. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/service_fabric_fragment.rb +74 -0
  174. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/service_fabric_list.rb +98 -0
  175. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/service_runner.rb +98 -0
  176. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/service_runner_list.rb +98 -0
  177. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration.rb +56 -0
  178. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration_fragment.rb +57 -0
  179. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/shutdown_notification_content.rb +180 -0
  180. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/source_control_type.rb +16 -0
  181. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/storage_type.rb +16 -0
  182. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/subnet.rb +70 -0
  183. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/subnet_fragment.rb +70 -0
  184. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/subnet_override.rb +107 -0
  185. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/subnet_override_fragment.rb +107 -0
  186. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration.rb +56 -0
  187. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.rb +57 -0
  188. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/target_cost_properties.rb +112 -0
  189. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/target_cost_status.rb +16 -0
  190. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/transport_protocol.rb +16 -0
  191. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/update_resource.rb +54 -0
  192. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/usage_permission_type.rb +17 -0
  193. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/user.rb +146 -0
  194. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/user_fragment.rb +75 -0
  195. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/user_identity.rb +96 -0
  196. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/user_identity_fragment.rb +96 -0
  197. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/user_list.rb +98 -0
  198. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/user_secret_store.rb +57 -0
  199. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/user_secret_store_fragment.rb +57 -0
  200. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/virtual_machine_creation_source.rb +16 -0
  201. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/virtual_network.rb +207 -0
  202. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/virtual_network_fragment.rb +116 -0
  203. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/virtual_network_list.rb +98 -0
  204. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/week_details.rb +66 -0
  205. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/week_details_fragment.rb +66 -0
  206. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/windows_os_info.rb +48 -0
  207. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/windows_os_info_fragment.rb +48 -0
  208. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/windows_os_state.rb +17 -0
  209. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/module_definition.rb +9 -0
  210. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/notification_channels.rb +769 -0
  211. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/operations.rb +117 -0
  212. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/policies.rb +690 -0
  213. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/policy_sets.rb +135 -0
  214. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/provider_operations.rb +215 -0
  215. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/schedules.rb +1000 -0
  216. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/secrets.rb +742 -0
  217. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/service_fabric_schedules.rb +848 -0
  218. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/service_fabrics.rb +1147 -0
  219. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/service_runners.rb +552 -0
  220. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/users.rb +759 -0
  221. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/virtual_machine_schedules.rb +821 -0
  222. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/virtual_machines.rb +2431 -0
  223. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/virtual_networks.rb +760 -0
  224. data/lib/azure_mgmt_devtestlabs.rb +1 -0
  225. data/lib/profiles/latest/modules/devtestlabs_profile_module.rb +566 -430
  226. data/lib/version.rb +1 -1
  227. metadata +219 -2
@@ -0,0 +1,1820 @@
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::DevTestLabs::Mgmt::V2018_09_15
7
+ #
8
+ # The DevTest Labs Client.
9
+ #
10
+ class Labs
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Labs class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [DevTestLabsClient] reference to the DevTestLabsClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # List labs in a subscription.
26
+ #
27
+ # @param expand [String] Specify the $expand query. Example:
28
+ # 'properties($select=defaultStorageAccount)'
29
+ # @param filter [String] The filter to apply to the operation. Example:
30
+ # '$filter=contains(name,'myName')
31
+ # @param top [Integer] The maximum number of resources to return from the
32
+ # operation. Example: '$top=10'
33
+ # @param orderby [String] The ordering expression for the results, using OData
34
+ # notation. Example: '$orderby=name desc'
35
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
36
+ # will be added to the HTTP request.
37
+ #
38
+ # @return [Array<Lab>] operation results.
39
+ #
40
+ def list_by_subscription(expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
41
+ first_page = list_by_subscription_as_lazy(expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers)
42
+ first_page.get_all_items
43
+ end
44
+
45
+ #
46
+ # List labs in a subscription.
47
+ #
48
+ # @param expand [String] Specify the $expand query. Example:
49
+ # 'properties($select=defaultStorageAccount)'
50
+ # @param filter [String] The filter to apply to the operation. Example:
51
+ # '$filter=contains(name,'myName')
52
+ # @param top [Integer] The maximum number of resources to return from the
53
+ # operation. Example: '$top=10'
54
+ # @param orderby [String] The ordering expression for the results, using OData
55
+ # notation. Example: '$orderby=name desc'
56
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
57
+ # will be added to the HTTP request.
58
+ #
59
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
60
+ #
61
+ def list_by_subscription_with_http_info(expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
62
+ list_by_subscription_async(expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers).value!
63
+ end
64
+
65
+ #
66
+ # List labs in a subscription.
67
+ #
68
+ # @param expand [String] Specify the $expand query. Example:
69
+ # 'properties($select=defaultStorageAccount)'
70
+ # @param filter [String] The filter to apply to the operation. Example:
71
+ # '$filter=contains(name,'myName')
72
+ # @param top [Integer] The maximum number of resources to return from the
73
+ # operation. Example: '$top=10'
74
+ # @param orderby [String] The ordering expression for the results, using OData
75
+ # notation. Example: '$orderby=name desc'
76
+ # @param [Hash{String => String}] A hash of custom headers that will be added
77
+ # to the HTTP request.
78
+ #
79
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
80
+ #
81
+ def list_by_subscription_async(expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
82
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
83
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
84
+
85
+
86
+ request_headers = {}
87
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
88
+
89
+ # Set Headers
90
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
91
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
92
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/labs'
93
+
94
+ request_url = @base_url || @client.base_url
95
+
96
+ options = {
97
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
98
+ path_params: {'subscriptionId' => @client.subscription_id},
99
+ query_params: {'$expand' => expand,'$filter' => filter,'$top' => top,'$orderby' => orderby,'api-version' => @client.api_version},
100
+ headers: request_headers.merge(custom_headers || {}),
101
+ base_url: request_url
102
+ }
103
+ promise = @client.make_request_async(:get, path_template, options)
104
+
105
+ promise = promise.then do |result|
106
+ http_response = result.response
107
+ status_code = http_response.status
108
+ response_content = http_response.body
109
+ unless status_code == 200
110
+ error_model = JSON.load(response_content)
111
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
112
+ end
113
+
114
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
115
+ # Deserialize Response
116
+ if status_code == 200
117
+ begin
118
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
119
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::LabList.mapper()
120
+ result.body = @client.deserialize(result_mapper, parsed_response)
121
+ rescue Exception => e
122
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
123
+ end
124
+ end
125
+
126
+ result
127
+ end
128
+
129
+ promise.execute
130
+ end
131
+
132
+ #
133
+ # List labs in a resource group.
134
+ #
135
+ # @param resource_group_name [String] The name of the resource group.
136
+ # @param expand [String] Specify the $expand query. Example:
137
+ # 'properties($select=defaultStorageAccount)'
138
+ # @param filter [String] The filter to apply to the operation. Example:
139
+ # '$filter=contains(name,'myName')
140
+ # @param top [Integer] The maximum number of resources to return from the
141
+ # operation. Example: '$top=10'
142
+ # @param orderby [String] The ordering expression for the results, using OData
143
+ # notation. Example: '$orderby=name desc'
144
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
145
+ # will be added to the HTTP request.
146
+ #
147
+ # @return [Array<Lab>] operation results.
148
+ #
149
+ def list_by_resource_group(resource_group_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
150
+ first_page = list_by_resource_group_as_lazy(resource_group_name, expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers)
151
+ first_page.get_all_items
152
+ end
153
+
154
+ #
155
+ # List labs in a resource group.
156
+ #
157
+ # @param resource_group_name [String] The name of the resource group.
158
+ # @param expand [String] Specify the $expand query. Example:
159
+ # 'properties($select=defaultStorageAccount)'
160
+ # @param filter [String] The filter to apply to the operation. Example:
161
+ # '$filter=contains(name,'myName')
162
+ # @param top [Integer] The maximum number of resources to return from the
163
+ # operation. Example: '$top=10'
164
+ # @param orderby [String] The ordering expression for the results, using OData
165
+ # notation. Example: '$orderby=name desc'
166
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
167
+ # will be added to the HTTP request.
168
+ #
169
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
170
+ #
171
+ def list_by_resource_group_with_http_info(resource_group_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
172
+ list_by_resource_group_async(resource_group_name, expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers).value!
173
+ end
174
+
175
+ #
176
+ # List labs in a resource group.
177
+ #
178
+ # @param resource_group_name [String] The name of the resource group.
179
+ # @param expand [String] Specify the $expand query. Example:
180
+ # 'properties($select=defaultStorageAccount)'
181
+ # @param filter [String] The filter to apply to the operation. Example:
182
+ # '$filter=contains(name,'myName')
183
+ # @param top [Integer] The maximum number of resources to return from the
184
+ # operation. Example: '$top=10'
185
+ # @param orderby [String] The ordering expression for the results, using OData
186
+ # notation. Example: '$orderby=name desc'
187
+ # @param [Hash{String => String}] A hash of custom headers that will be added
188
+ # to the HTTP request.
189
+ #
190
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
191
+ #
192
+ def list_by_resource_group_async(resource_group_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
193
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
194
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
195
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
196
+
197
+
198
+ request_headers = {}
199
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
200
+
201
+ # Set Headers
202
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
203
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
204
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs'
205
+
206
+ request_url = @base_url || @client.base_url
207
+
208
+ options = {
209
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
210
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
211
+ query_params: {'$expand' => expand,'$filter' => filter,'$top' => top,'$orderby' => orderby,'api-version' => @client.api_version},
212
+ headers: request_headers.merge(custom_headers || {}),
213
+ base_url: request_url
214
+ }
215
+ promise = @client.make_request_async(:get, path_template, options)
216
+
217
+ promise = promise.then do |result|
218
+ http_response = result.response
219
+ status_code = http_response.status
220
+ response_content = http_response.body
221
+ unless status_code == 200
222
+ error_model = JSON.load(response_content)
223
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
224
+ end
225
+
226
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
227
+ # Deserialize Response
228
+ if status_code == 200
229
+ begin
230
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
231
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::LabList.mapper()
232
+ result.body = @client.deserialize(result_mapper, parsed_response)
233
+ rescue Exception => e
234
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
235
+ end
236
+ end
237
+
238
+ result
239
+ end
240
+
241
+ promise.execute
242
+ end
243
+
244
+ #
245
+ # Get lab.
246
+ #
247
+ # @param resource_group_name [String] The name of the resource group.
248
+ # @param name [String] The name of the lab.
249
+ # @param expand [String] Specify the $expand query. Example:
250
+ # 'properties($select=defaultStorageAccount)'
251
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
252
+ # will be added to the HTTP request.
253
+ #
254
+ # @return [Lab] operation results.
255
+ #
256
+ def get(resource_group_name, name, expand:nil, custom_headers:nil)
257
+ response = get_async(resource_group_name, name, expand:expand, custom_headers:custom_headers).value!
258
+ response.body unless response.nil?
259
+ end
260
+
261
+ #
262
+ # Get lab.
263
+ #
264
+ # @param resource_group_name [String] The name of the resource group.
265
+ # @param name [String] The name of the lab.
266
+ # @param expand [String] Specify the $expand query. Example:
267
+ # 'properties($select=defaultStorageAccount)'
268
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
269
+ # will be added to the HTTP request.
270
+ #
271
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
272
+ #
273
+ def get_with_http_info(resource_group_name, name, expand:nil, custom_headers:nil)
274
+ get_async(resource_group_name, name, expand:expand, custom_headers:custom_headers).value!
275
+ end
276
+
277
+ #
278
+ # Get lab.
279
+ #
280
+ # @param resource_group_name [String] The name of the resource group.
281
+ # @param name [String] The name of the lab.
282
+ # @param expand [String] Specify the $expand query. Example:
283
+ # 'properties($select=defaultStorageAccount)'
284
+ # @param [Hash{String => String}] A hash of custom headers that will be added
285
+ # to the HTTP request.
286
+ #
287
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
288
+ #
289
+ def get_async(resource_group_name, name, expand:nil, custom_headers:nil)
290
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
291
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
292
+ fail ArgumentError, 'name is nil' if name.nil?
293
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
294
+
295
+
296
+ request_headers = {}
297
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
298
+
299
+ # Set Headers
300
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
301
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
302
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'
303
+
304
+ request_url = @base_url || @client.base_url
305
+
306
+ options = {
307
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
308
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'name' => name},
309
+ query_params: {'$expand' => expand,'api-version' => @client.api_version},
310
+ headers: request_headers.merge(custom_headers || {}),
311
+ base_url: request_url
312
+ }
313
+ promise = @client.make_request_async(:get, path_template, options)
314
+
315
+ promise = promise.then do |result|
316
+ http_response = result.response
317
+ status_code = http_response.status
318
+ response_content = http_response.body
319
+ unless status_code == 200
320
+ error_model = JSON.load(response_content)
321
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
322
+ end
323
+
324
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
325
+ # Deserialize Response
326
+ if status_code == 200
327
+ begin
328
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
329
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Lab.mapper()
330
+ result.body = @client.deserialize(result_mapper, parsed_response)
331
+ rescue Exception => e
332
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
333
+ end
334
+ end
335
+
336
+ result
337
+ end
338
+
339
+ promise.execute
340
+ end
341
+
342
+ #
343
+ # Create or replace an existing lab. This operation can take a while to
344
+ # complete.
345
+ #
346
+ # @param resource_group_name [String] The name of the resource group.
347
+ # @param name [String] The name of the lab.
348
+ # @param lab [Lab] A lab.
349
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
350
+ # will be added to the HTTP request.
351
+ #
352
+ # @return [Lab] operation results.
353
+ #
354
+ def create_or_update(resource_group_name, name, lab, custom_headers:nil)
355
+ response = create_or_update_async(resource_group_name, name, lab, custom_headers:custom_headers).value!
356
+ response.body unless response.nil?
357
+ end
358
+
359
+ #
360
+ # @param resource_group_name [String] The name of the resource group.
361
+ # @param name [String] The name of the lab.
362
+ # @param lab [Lab] A lab.
363
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
364
+ # will be added to the HTTP request.
365
+ #
366
+ # @return [Concurrent::Promise] promise which provides async access to http
367
+ # response.
368
+ #
369
+ def create_or_update_async(resource_group_name, name, lab, custom_headers:nil)
370
+ # Send request
371
+ promise = begin_create_or_update_async(resource_group_name, name, lab, custom_headers:custom_headers)
372
+
373
+ promise = promise.then do |response|
374
+ # Defining deserialization method.
375
+ deserialize_method = lambda do |parsed_response|
376
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Lab.mapper()
377
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
378
+ end
379
+
380
+ # Waiting for response.
381
+ @client.get_long_running_operation_result(response, deserialize_method)
382
+ end
383
+
384
+ promise
385
+ end
386
+
387
+ #
388
+ # Delete lab. This operation can take a while to complete.
389
+ #
390
+ # @param resource_group_name [String] The name of the resource group.
391
+ # @param name [String] The name of the lab.
392
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
393
+ # will be added to the HTTP request.
394
+ #
395
+ def delete(resource_group_name, name, custom_headers:nil)
396
+ response = delete_async(resource_group_name, name, custom_headers:custom_headers).value!
397
+ nil
398
+ end
399
+
400
+ #
401
+ # @param resource_group_name [String] The name of the resource group.
402
+ # @param name [String] The name of the lab.
403
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
404
+ # will be added to the HTTP request.
405
+ #
406
+ # @return [Concurrent::Promise] promise which provides async access to http
407
+ # response.
408
+ #
409
+ def delete_async(resource_group_name, name, custom_headers:nil)
410
+ # Send request
411
+ promise = begin_delete_async(resource_group_name, name, custom_headers:custom_headers)
412
+
413
+ promise = promise.then do |response|
414
+ # Defining deserialization method.
415
+ deserialize_method = lambda do |parsed_response|
416
+ end
417
+
418
+ # Waiting for response.
419
+ @client.get_long_running_operation_result(response, deserialize_method)
420
+ end
421
+
422
+ promise
423
+ end
424
+
425
+ #
426
+ # Modify properties of labs.
427
+ #
428
+ # @param resource_group_name [String] The name of the resource group.
429
+ # @param name [String] The name of the lab.
430
+ # @param lab [LabFragment] A lab.
431
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
432
+ # will be added to the HTTP request.
433
+ #
434
+ # @return [Lab] operation results.
435
+ #
436
+ def update(resource_group_name, name, lab, custom_headers:nil)
437
+ response = update_async(resource_group_name, name, lab, custom_headers:custom_headers).value!
438
+ response.body unless response.nil?
439
+ end
440
+
441
+ #
442
+ # Modify properties of labs.
443
+ #
444
+ # @param resource_group_name [String] The name of the resource group.
445
+ # @param name [String] The name of the lab.
446
+ # @param lab [LabFragment] A lab.
447
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
448
+ # will be added to the HTTP request.
449
+ #
450
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
451
+ #
452
+ def update_with_http_info(resource_group_name, name, lab, custom_headers:nil)
453
+ update_async(resource_group_name, name, lab, custom_headers:custom_headers).value!
454
+ end
455
+
456
+ #
457
+ # Modify properties of labs.
458
+ #
459
+ # @param resource_group_name [String] The name of the resource group.
460
+ # @param name [String] The name of the lab.
461
+ # @param lab [LabFragment] A lab.
462
+ # @param [Hash{String => String}] A hash of custom headers that will be added
463
+ # to the HTTP request.
464
+ #
465
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
466
+ #
467
+ def update_async(resource_group_name, name, lab, custom_headers:nil)
468
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
469
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
470
+ fail ArgumentError, 'name is nil' if name.nil?
471
+ fail ArgumentError, 'lab is nil' if lab.nil?
472
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
473
+
474
+
475
+ request_headers = {}
476
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
477
+
478
+ # Set Headers
479
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
480
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
481
+
482
+ # Serialize Request
483
+ request_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::LabFragment.mapper()
484
+ request_content = @client.serialize(request_mapper, lab)
485
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
486
+
487
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'
488
+
489
+ request_url = @base_url || @client.base_url
490
+
491
+ options = {
492
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
493
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'name' => name},
494
+ query_params: {'api-version' => @client.api_version},
495
+ body: request_content,
496
+ headers: request_headers.merge(custom_headers || {}),
497
+ base_url: request_url
498
+ }
499
+ promise = @client.make_request_async(:patch, path_template, options)
500
+
501
+ promise = promise.then do |result|
502
+ http_response = result.response
503
+ status_code = http_response.status
504
+ response_content = http_response.body
505
+ unless status_code == 200
506
+ error_model = JSON.load(response_content)
507
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
508
+ end
509
+
510
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
511
+ # Deserialize Response
512
+ if status_code == 200
513
+ begin
514
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
515
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Lab.mapper()
516
+ result.body = @client.deserialize(result_mapper, parsed_response)
517
+ rescue Exception => e
518
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
519
+ end
520
+ end
521
+
522
+ result
523
+ end
524
+
525
+ promise.execute
526
+ end
527
+
528
+ #
529
+ # Claim a random claimable virtual machine in the lab. This operation can take
530
+ # a while to complete.
531
+ #
532
+ # @param resource_group_name [String] The name of the resource group.
533
+ # @param name [String] The name of the lab.
534
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
535
+ # will be added to the HTTP request.
536
+ #
537
+ def claim_any_vm(resource_group_name, name, custom_headers:nil)
538
+ response = claim_any_vm_async(resource_group_name, name, custom_headers:custom_headers).value!
539
+ nil
540
+ end
541
+
542
+ #
543
+ # @param resource_group_name [String] The name of the resource group.
544
+ # @param name [String] The name of the lab.
545
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
546
+ # will be added to the HTTP request.
547
+ #
548
+ # @return [Concurrent::Promise] promise which provides async access to http
549
+ # response.
550
+ #
551
+ def claim_any_vm_async(resource_group_name, name, custom_headers:nil)
552
+ # Send request
553
+ promise = begin_claim_any_vm_async(resource_group_name, name, custom_headers:custom_headers)
554
+
555
+ promise = promise.then do |response|
556
+ # Defining deserialization method.
557
+ deserialize_method = lambda do |parsed_response|
558
+ end
559
+
560
+ # Waiting for response.
561
+ @client.get_long_running_operation_result(response, deserialize_method)
562
+ end
563
+
564
+ promise
565
+ end
566
+
567
+ #
568
+ # Create virtual machines in a lab. This operation can take a while to
569
+ # complete.
570
+ #
571
+ # @param resource_group_name [String] The name of the resource group.
572
+ # @param name [String] The name of the lab.
573
+ # @param lab_virtual_machine_creation_parameter
574
+ # [LabVirtualMachineCreationParameter] Properties for creating a virtual
575
+ # machine.
576
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
577
+ # will be added to the HTTP request.
578
+ #
579
+ def create_environment(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers:nil)
580
+ response = create_environment_async(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers:custom_headers).value!
581
+ nil
582
+ end
583
+
584
+ #
585
+ # @param resource_group_name [String] The name of the resource group.
586
+ # @param name [String] The name of the lab.
587
+ # @param lab_virtual_machine_creation_parameter
588
+ # [LabVirtualMachineCreationParameter] Properties for creating a virtual
589
+ # machine.
590
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
591
+ # will be added to the HTTP request.
592
+ #
593
+ # @return [Concurrent::Promise] promise which provides async access to http
594
+ # response.
595
+ #
596
+ def create_environment_async(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers:nil)
597
+ # Send request
598
+ promise = begin_create_environment_async(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers:custom_headers)
599
+
600
+ promise = promise.then do |response|
601
+ # Defining deserialization method.
602
+ deserialize_method = lambda do |parsed_response|
603
+ end
604
+
605
+ # Waiting for response.
606
+ @client.get_long_running_operation_result(response, deserialize_method)
607
+ end
608
+
609
+ promise
610
+ end
611
+
612
+ #
613
+ # Exports the lab resource usage into a storage account This operation can take
614
+ # a while to complete.
615
+ #
616
+ # @param resource_group_name [String] The name of the resource group.
617
+ # @param name [String] The name of the lab.
618
+ # @param export_resource_usage_parameters [ExportResourceUsageParameters] The
619
+ # parameters of the export operation.
620
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
621
+ # will be added to the HTTP request.
622
+ #
623
+ def export_resource_usage(resource_group_name, name, export_resource_usage_parameters, custom_headers:nil)
624
+ response = export_resource_usage_async(resource_group_name, name, export_resource_usage_parameters, custom_headers:custom_headers).value!
625
+ nil
626
+ end
627
+
628
+ #
629
+ # @param resource_group_name [String] The name of the resource group.
630
+ # @param name [String] The name of the lab.
631
+ # @param export_resource_usage_parameters [ExportResourceUsageParameters] The
632
+ # parameters of the export operation.
633
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
634
+ # will be added to the HTTP request.
635
+ #
636
+ # @return [Concurrent::Promise] promise which provides async access to http
637
+ # response.
638
+ #
639
+ def export_resource_usage_async(resource_group_name, name, export_resource_usage_parameters, custom_headers:nil)
640
+ # Send request
641
+ promise = begin_export_resource_usage_async(resource_group_name, name, export_resource_usage_parameters, custom_headers:custom_headers)
642
+
643
+ promise = promise.then do |response|
644
+ # Defining deserialization method.
645
+ deserialize_method = lambda do |parsed_response|
646
+ end
647
+
648
+ # Waiting for response.
649
+ @client.get_long_running_operation_result(response, deserialize_method)
650
+ end
651
+
652
+ promise
653
+ end
654
+
655
+ #
656
+ # Generate a URI for uploading custom disk images to a Lab.
657
+ #
658
+ # @param resource_group_name [String] The name of the resource group.
659
+ # @param name [String] The name of the lab.
660
+ # @param generate_upload_uri_parameter [GenerateUploadUriParameter] Properties
661
+ # for generating an upload URI.
662
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
663
+ # will be added to the HTTP request.
664
+ #
665
+ # @return [GenerateUploadUriResponse] operation results.
666
+ #
667
+ def generate_upload_uri(resource_group_name, name, generate_upload_uri_parameter, custom_headers:nil)
668
+ response = generate_upload_uri_async(resource_group_name, name, generate_upload_uri_parameter, custom_headers:custom_headers).value!
669
+ response.body unless response.nil?
670
+ end
671
+
672
+ #
673
+ # Generate a URI for uploading custom disk images to a Lab.
674
+ #
675
+ # @param resource_group_name [String] The name of the resource group.
676
+ # @param name [String] The name of the lab.
677
+ # @param generate_upload_uri_parameter [GenerateUploadUriParameter] Properties
678
+ # for generating an upload URI.
679
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
680
+ # will be added to the HTTP request.
681
+ #
682
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
683
+ #
684
+ def generate_upload_uri_with_http_info(resource_group_name, name, generate_upload_uri_parameter, custom_headers:nil)
685
+ generate_upload_uri_async(resource_group_name, name, generate_upload_uri_parameter, custom_headers:custom_headers).value!
686
+ end
687
+
688
+ #
689
+ # Generate a URI for uploading custom disk images to a Lab.
690
+ #
691
+ # @param resource_group_name [String] The name of the resource group.
692
+ # @param name [String] The name of the lab.
693
+ # @param generate_upload_uri_parameter [GenerateUploadUriParameter] Properties
694
+ # for generating an upload URI.
695
+ # @param [Hash{String => String}] A hash of custom headers that will be added
696
+ # to the HTTP request.
697
+ #
698
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
699
+ #
700
+ def generate_upload_uri_async(resource_group_name, name, generate_upload_uri_parameter, custom_headers:nil)
701
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
702
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
703
+ fail ArgumentError, 'name is nil' if name.nil?
704
+ fail ArgumentError, 'generate_upload_uri_parameter is nil' if generate_upload_uri_parameter.nil?
705
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
706
+
707
+
708
+ request_headers = {}
709
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
710
+
711
+ # Set Headers
712
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
713
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
714
+
715
+ # Serialize Request
716
+ request_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::GenerateUploadUriParameter.mapper()
717
+ request_content = @client.serialize(request_mapper, generate_upload_uri_parameter)
718
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
719
+
720
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/generateUploadUri'
721
+
722
+ request_url = @base_url || @client.base_url
723
+
724
+ options = {
725
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
726
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'name' => name},
727
+ query_params: {'api-version' => @client.api_version},
728
+ body: request_content,
729
+ headers: request_headers.merge(custom_headers || {}),
730
+ base_url: request_url
731
+ }
732
+ promise = @client.make_request_async(:post, path_template, options)
733
+
734
+ promise = promise.then do |result|
735
+ http_response = result.response
736
+ status_code = http_response.status
737
+ response_content = http_response.body
738
+ unless status_code == 200
739
+ error_model = JSON.load(response_content)
740
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
741
+ end
742
+
743
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
744
+ # Deserialize Response
745
+ if status_code == 200
746
+ begin
747
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
748
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::GenerateUploadUriResponse.mapper()
749
+ result.body = @client.deserialize(result_mapper, parsed_response)
750
+ rescue Exception => e
751
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
752
+ end
753
+ end
754
+
755
+ result
756
+ end
757
+
758
+ promise.execute
759
+ end
760
+
761
+ #
762
+ # Import a virtual machine into a different lab. This operation can take a
763
+ # while to complete.
764
+ #
765
+ # @param resource_group_name [String] The name of the resource group.
766
+ # @param name [String] The name of the lab.
767
+ # @param import_lab_virtual_machine_request [ImportLabVirtualMachineRequest]
768
+ # This represents the payload required to import a virtual machine from a
769
+ # different lab into the current one
770
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
771
+ # will be added to the HTTP request.
772
+ #
773
+ def import_virtual_machine(resource_group_name, name, import_lab_virtual_machine_request, custom_headers:nil)
774
+ response = import_virtual_machine_async(resource_group_name, name, import_lab_virtual_machine_request, custom_headers:custom_headers).value!
775
+ nil
776
+ end
777
+
778
+ #
779
+ # @param resource_group_name [String] The name of the resource group.
780
+ # @param name [String] The name of the lab.
781
+ # @param import_lab_virtual_machine_request [ImportLabVirtualMachineRequest]
782
+ # This represents the payload required to import a virtual machine from a
783
+ # different lab into the current one
784
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
785
+ # will be added to the HTTP request.
786
+ #
787
+ # @return [Concurrent::Promise] promise which provides async access to http
788
+ # response.
789
+ #
790
+ def import_virtual_machine_async(resource_group_name, name, import_lab_virtual_machine_request, custom_headers:nil)
791
+ # Send request
792
+ promise = begin_import_virtual_machine_async(resource_group_name, name, import_lab_virtual_machine_request, custom_headers:custom_headers)
793
+
794
+ promise = promise.then do |response|
795
+ # Defining deserialization method.
796
+ deserialize_method = lambda do |parsed_response|
797
+ end
798
+
799
+ # Waiting for response.
800
+ @client.get_long_running_operation_result(response, deserialize_method)
801
+ end
802
+
803
+ promise
804
+ end
805
+
806
+ #
807
+ # List disk images available for custom image creation.
808
+ #
809
+ # @param resource_group_name [String] The name of the resource group.
810
+ # @param name [String] The name of the lab.
811
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
812
+ # will be added to the HTTP request.
813
+ #
814
+ # @return [Array<LabVhd>] operation results.
815
+ #
816
+ def list_vhds(resource_group_name, name, custom_headers:nil)
817
+ first_page = list_vhds_as_lazy(resource_group_name, name, custom_headers:custom_headers)
818
+ first_page.get_all_items
819
+ end
820
+
821
+ #
822
+ # List disk images available for custom image creation.
823
+ #
824
+ # @param resource_group_name [String] The name of the resource group.
825
+ # @param name [String] The name of the lab.
826
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
827
+ # will be added to the HTTP request.
828
+ #
829
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
830
+ #
831
+ def list_vhds_with_http_info(resource_group_name, name, custom_headers:nil)
832
+ list_vhds_async(resource_group_name, name, custom_headers:custom_headers).value!
833
+ end
834
+
835
+ #
836
+ # List disk images available for custom image creation.
837
+ #
838
+ # @param resource_group_name [String] The name of the resource group.
839
+ # @param name [String] The name of the lab.
840
+ # @param [Hash{String => String}] A hash of custom headers that will be added
841
+ # to the HTTP request.
842
+ #
843
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
844
+ #
845
+ def list_vhds_async(resource_group_name, name, custom_headers:nil)
846
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
847
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
848
+ fail ArgumentError, 'name is nil' if name.nil?
849
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
850
+
851
+
852
+ request_headers = {}
853
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
854
+
855
+ # Set Headers
856
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
857
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
858
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/listVhds'
859
+
860
+ request_url = @base_url || @client.base_url
861
+
862
+ options = {
863
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
864
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'name' => name},
865
+ query_params: {'api-version' => @client.api_version},
866
+ headers: request_headers.merge(custom_headers || {}),
867
+ base_url: request_url
868
+ }
869
+ promise = @client.make_request_async(:post, path_template, options)
870
+
871
+ promise = promise.then do |result|
872
+ http_response = result.response
873
+ status_code = http_response.status
874
+ response_content = http_response.body
875
+ unless status_code == 200
876
+ error_model = JSON.load(response_content)
877
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
878
+ end
879
+
880
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
881
+ # Deserialize Response
882
+ if status_code == 200
883
+ begin
884
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
885
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::LabVhdList.mapper()
886
+ result.body = @client.deserialize(result_mapper, parsed_response)
887
+ rescue Exception => e
888
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
889
+ end
890
+ end
891
+
892
+ result
893
+ end
894
+
895
+ promise.execute
896
+ end
897
+
898
+ #
899
+ # Create or replace an existing lab. This operation can take a while to
900
+ # complete.
901
+ #
902
+ # @param resource_group_name [String] The name of the resource group.
903
+ # @param name [String] The name of the lab.
904
+ # @param lab [Lab] A lab.
905
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
906
+ # will be added to the HTTP request.
907
+ #
908
+ # @return [Lab] operation results.
909
+ #
910
+ def begin_create_or_update(resource_group_name, name, lab, custom_headers:nil)
911
+ response = begin_create_or_update_async(resource_group_name, name, lab, custom_headers:custom_headers).value!
912
+ response.body unless response.nil?
913
+ end
914
+
915
+ #
916
+ # Create or replace an existing lab. This operation can take a while to
917
+ # complete.
918
+ #
919
+ # @param resource_group_name [String] The name of the resource group.
920
+ # @param name [String] The name of the lab.
921
+ # @param lab [Lab] A lab.
922
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
923
+ # will be added to the HTTP request.
924
+ #
925
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
926
+ #
927
+ def begin_create_or_update_with_http_info(resource_group_name, name, lab, custom_headers:nil)
928
+ begin_create_or_update_async(resource_group_name, name, lab, custom_headers:custom_headers).value!
929
+ end
930
+
931
+ #
932
+ # Create or replace an existing lab. This operation can take a while to
933
+ # complete.
934
+ #
935
+ # @param resource_group_name [String] The name of the resource group.
936
+ # @param name [String] The name of the lab.
937
+ # @param lab [Lab] A lab.
938
+ # @param [Hash{String => String}] A hash of custom headers that will be added
939
+ # to the HTTP request.
940
+ #
941
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
942
+ #
943
+ def begin_create_or_update_async(resource_group_name, name, lab, custom_headers:nil)
944
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
945
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
946
+ fail ArgumentError, 'name is nil' if name.nil?
947
+ fail ArgumentError, 'lab is nil' if lab.nil?
948
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
949
+
950
+
951
+ request_headers = {}
952
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
953
+
954
+ # Set Headers
955
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
956
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
957
+
958
+ # Serialize Request
959
+ request_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Lab.mapper()
960
+ request_content = @client.serialize(request_mapper, lab)
961
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
962
+
963
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'
964
+
965
+ request_url = @base_url || @client.base_url
966
+
967
+ options = {
968
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
969
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'name' => name},
970
+ query_params: {'api-version' => @client.api_version},
971
+ body: request_content,
972
+ headers: request_headers.merge(custom_headers || {}),
973
+ base_url: request_url
974
+ }
975
+ promise = @client.make_request_async(:put, path_template, options)
976
+
977
+ promise = promise.then do |result|
978
+ http_response = result.response
979
+ status_code = http_response.status
980
+ response_content = http_response.body
981
+ unless status_code == 200 || status_code == 201
982
+ error_model = JSON.load(response_content)
983
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
984
+ end
985
+
986
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
987
+ # Deserialize Response
988
+ if status_code == 200
989
+ begin
990
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
991
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Lab.mapper()
992
+ result.body = @client.deserialize(result_mapper, parsed_response)
993
+ rescue Exception => e
994
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
995
+ end
996
+ end
997
+ # Deserialize Response
998
+ if status_code == 201
999
+ begin
1000
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1001
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Lab.mapper()
1002
+ result.body = @client.deserialize(result_mapper, parsed_response)
1003
+ rescue Exception => e
1004
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1005
+ end
1006
+ end
1007
+
1008
+ result
1009
+ end
1010
+
1011
+ promise.execute
1012
+ end
1013
+
1014
+ #
1015
+ # Delete lab. This operation can take a while to complete.
1016
+ #
1017
+ # @param resource_group_name [String] The name of the resource group.
1018
+ # @param name [String] The name of the lab.
1019
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1020
+ # will be added to the HTTP request.
1021
+ #
1022
+ #
1023
+ def begin_delete(resource_group_name, name, custom_headers:nil)
1024
+ response = begin_delete_async(resource_group_name, name, custom_headers:custom_headers).value!
1025
+ nil
1026
+ end
1027
+
1028
+ #
1029
+ # Delete lab. This operation can take a while to complete.
1030
+ #
1031
+ # @param resource_group_name [String] The name of the resource group.
1032
+ # @param name [String] The name of the lab.
1033
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1034
+ # will be added to the HTTP request.
1035
+ #
1036
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1037
+ #
1038
+ def begin_delete_with_http_info(resource_group_name, name, custom_headers:nil)
1039
+ begin_delete_async(resource_group_name, name, custom_headers:custom_headers).value!
1040
+ end
1041
+
1042
+ #
1043
+ # Delete lab. This operation can take a while to complete.
1044
+ #
1045
+ # @param resource_group_name [String] The name of the resource group.
1046
+ # @param name [String] The name of the lab.
1047
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1048
+ # to the HTTP request.
1049
+ #
1050
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1051
+ #
1052
+ def begin_delete_async(resource_group_name, name, custom_headers:nil)
1053
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1054
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1055
+ fail ArgumentError, 'name is nil' if name.nil?
1056
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1057
+
1058
+
1059
+ request_headers = {}
1060
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1061
+
1062
+ # Set Headers
1063
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1064
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1065
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'
1066
+
1067
+ request_url = @base_url || @client.base_url
1068
+
1069
+ options = {
1070
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1071
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'name' => name},
1072
+ query_params: {'api-version' => @client.api_version},
1073
+ headers: request_headers.merge(custom_headers || {}),
1074
+ base_url: request_url
1075
+ }
1076
+ promise = @client.make_request_async(:delete, path_template, options)
1077
+
1078
+ promise = promise.then do |result|
1079
+ http_response = result.response
1080
+ status_code = http_response.status
1081
+ response_content = http_response.body
1082
+ unless status_code == 200 || status_code == 202 || status_code == 204
1083
+ error_model = JSON.load(response_content)
1084
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1085
+ end
1086
+
1087
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1088
+
1089
+ result
1090
+ end
1091
+
1092
+ promise.execute
1093
+ end
1094
+
1095
+ #
1096
+ # Claim a random claimable virtual machine in the lab. This operation can take
1097
+ # a while to complete.
1098
+ #
1099
+ # @param resource_group_name [String] The name of the resource group.
1100
+ # @param name [String] The name of the lab.
1101
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1102
+ # will be added to the HTTP request.
1103
+ #
1104
+ #
1105
+ def begin_claim_any_vm(resource_group_name, name, custom_headers:nil)
1106
+ response = begin_claim_any_vm_async(resource_group_name, name, custom_headers:custom_headers).value!
1107
+ nil
1108
+ end
1109
+
1110
+ #
1111
+ # Claim a random claimable virtual machine in the lab. This operation can take
1112
+ # a while to complete.
1113
+ #
1114
+ # @param resource_group_name [String] The name of the resource group.
1115
+ # @param name [String] The name of the lab.
1116
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1117
+ # will be added to the HTTP request.
1118
+ #
1119
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1120
+ #
1121
+ def begin_claim_any_vm_with_http_info(resource_group_name, name, custom_headers:nil)
1122
+ begin_claim_any_vm_async(resource_group_name, name, custom_headers:custom_headers).value!
1123
+ end
1124
+
1125
+ #
1126
+ # Claim a random claimable virtual machine in the lab. This operation can take
1127
+ # a while to complete.
1128
+ #
1129
+ # @param resource_group_name [String] The name of the resource group.
1130
+ # @param name [String] The name of the lab.
1131
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1132
+ # to the HTTP request.
1133
+ #
1134
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1135
+ #
1136
+ def begin_claim_any_vm_async(resource_group_name, name, custom_headers:nil)
1137
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1138
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1139
+ fail ArgumentError, 'name is nil' if name.nil?
1140
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1141
+
1142
+
1143
+ request_headers = {}
1144
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1145
+
1146
+ # Set Headers
1147
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1148
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1149
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/claimAnyVm'
1150
+
1151
+ request_url = @base_url || @client.base_url
1152
+
1153
+ options = {
1154
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1155
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'name' => name},
1156
+ query_params: {'api-version' => @client.api_version},
1157
+ headers: request_headers.merge(custom_headers || {}),
1158
+ base_url: request_url
1159
+ }
1160
+ promise = @client.make_request_async(:post, path_template, options)
1161
+
1162
+ promise = promise.then do |result|
1163
+ http_response = result.response
1164
+ status_code = http_response.status
1165
+ response_content = http_response.body
1166
+ unless status_code == 200 || status_code == 202
1167
+ error_model = JSON.load(response_content)
1168
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1169
+ end
1170
+
1171
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1172
+
1173
+ result
1174
+ end
1175
+
1176
+ promise.execute
1177
+ end
1178
+
1179
+ #
1180
+ # Create virtual machines in a lab. This operation can take a while to
1181
+ # complete.
1182
+ #
1183
+ # @param resource_group_name [String] The name of the resource group.
1184
+ # @param name [String] The name of the lab.
1185
+ # @param lab_virtual_machine_creation_parameter
1186
+ # [LabVirtualMachineCreationParameter] Properties for creating a virtual
1187
+ # machine.
1188
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1189
+ # will be added to the HTTP request.
1190
+ #
1191
+ #
1192
+ def begin_create_environment(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers:nil)
1193
+ response = begin_create_environment_async(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers:custom_headers).value!
1194
+ nil
1195
+ end
1196
+
1197
+ #
1198
+ # Create virtual machines in a lab. This operation can take a while to
1199
+ # complete.
1200
+ #
1201
+ # @param resource_group_name [String] The name of the resource group.
1202
+ # @param name [String] The name of the lab.
1203
+ # @param lab_virtual_machine_creation_parameter
1204
+ # [LabVirtualMachineCreationParameter] Properties for creating a virtual
1205
+ # machine.
1206
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1207
+ # will be added to the HTTP request.
1208
+ #
1209
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1210
+ #
1211
+ def begin_create_environment_with_http_info(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers:nil)
1212
+ begin_create_environment_async(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers:custom_headers).value!
1213
+ end
1214
+
1215
+ #
1216
+ # Create virtual machines in a lab. This operation can take a while to
1217
+ # complete.
1218
+ #
1219
+ # @param resource_group_name [String] The name of the resource group.
1220
+ # @param name [String] The name of the lab.
1221
+ # @param lab_virtual_machine_creation_parameter
1222
+ # [LabVirtualMachineCreationParameter] Properties for creating a virtual
1223
+ # machine.
1224
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1225
+ # to the HTTP request.
1226
+ #
1227
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1228
+ #
1229
+ def begin_create_environment_async(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers:nil)
1230
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1231
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1232
+ fail ArgumentError, 'name is nil' if name.nil?
1233
+ fail ArgumentError, 'lab_virtual_machine_creation_parameter is nil' if lab_virtual_machine_creation_parameter.nil?
1234
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1235
+
1236
+
1237
+ request_headers = {}
1238
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1239
+
1240
+ # Set Headers
1241
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1242
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1243
+
1244
+ # Serialize Request
1245
+ request_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::LabVirtualMachineCreationParameter.mapper()
1246
+ request_content = @client.serialize(request_mapper, lab_virtual_machine_creation_parameter)
1247
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1248
+
1249
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/createEnvironment'
1250
+
1251
+ request_url = @base_url || @client.base_url
1252
+
1253
+ options = {
1254
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1255
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'name' => name},
1256
+ query_params: {'api-version' => @client.api_version},
1257
+ body: request_content,
1258
+ headers: request_headers.merge(custom_headers || {}),
1259
+ base_url: request_url
1260
+ }
1261
+ promise = @client.make_request_async(:post, path_template, options)
1262
+
1263
+ promise = promise.then do |result|
1264
+ http_response = result.response
1265
+ status_code = http_response.status
1266
+ response_content = http_response.body
1267
+ unless status_code == 200 || status_code == 202
1268
+ error_model = JSON.load(response_content)
1269
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1270
+ end
1271
+
1272
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1273
+
1274
+ result
1275
+ end
1276
+
1277
+ promise.execute
1278
+ end
1279
+
1280
+ #
1281
+ # Exports the lab resource usage into a storage account This operation can take
1282
+ # a while to complete.
1283
+ #
1284
+ # @param resource_group_name [String] The name of the resource group.
1285
+ # @param name [String] The name of the lab.
1286
+ # @param export_resource_usage_parameters [ExportResourceUsageParameters] The
1287
+ # parameters of the export operation.
1288
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1289
+ # will be added to the HTTP request.
1290
+ #
1291
+ #
1292
+ def begin_export_resource_usage(resource_group_name, name, export_resource_usage_parameters, custom_headers:nil)
1293
+ response = begin_export_resource_usage_async(resource_group_name, name, export_resource_usage_parameters, custom_headers:custom_headers).value!
1294
+ nil
1295
+ end
1296
+
1297
+ #
1298
+ # Exports the lab resource usage into a storage account This operation can take
1299
+ # a while to complete.
1300
+ #
1301
+ # @param resource_group_name [String] The name of the resource group.
1302
+ # @param name [String] The name of the lab.
1303
+ # @param export_resource_usage_parameters [ExportResourceUsageParameters] The
1304
+ # parameters of the export operation.
1305
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1306
+ # will be added to the HTTP request.
1307
+ #
1308
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1309
+ #
1310
+ def begin_export_resource_usage_with_http_info(resource_group_name, name, export_resource_usage_parameters, custom_headers:nil)
1311
+ begin_export_resource_usage_async(resource_group_name, name, export_resource_usage_parameters, custom_headers:custom_headers).value!
1312
+ end
1313
+
1314
+ #
1315
+ # Exports the lab resource usage into a storage account This operation can take
1316
+ # a while to complete.
1317
+ #
1318
+ # @param resource_group_name [String] The name of the resource group.
1319
+ # @param name [String] The name of the lab.
1320
+ # @param export_resource_usage_parameters [ExportResourceUsageParameters] The
1321
+ # parameters of the export operation.
1322
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1323
+ # to the HTTP request.
1324
+ #
1325
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1326
+ #
1327
+ def begin_export_resource_usage_async(resource_group_name, name, export_resource_usage_parameters, custom_headers:nil)
1328
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1329
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1330
+ fail ArgumentError, 'name is nil' if name.nil?
1331
+ fail ArgumentError, 'export_resource_usage_parameters is nil' if export_resource_usage_parameters.nil?
1332
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1333
+
1334
+
1335
+ request_headers = {}
1336
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1337
+
1338
+ # Set Headers
1339
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1340
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1341
+
1342
+ # Serialize Request
1343
+ request_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::ExportResourceUsageParameters.mapper()
1344
+ request_content = @client.serialize(request_mapper, export_resource_usage_parameters)
1345
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1346
+
1347
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/exportResourceUsage'
1348
+
1349
+ request_url = @base_url || @client.base_url
1350
+
1351
+ options = {
1352
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1353
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'name' => name},
1354
+ query_params: {'api-version' => @client.api_version},
1355
+ body: request_content,
1356
+ headers: request_headers.merge(custom_headers || {}),
1357
+ base_url: request_url
1358
+ }
1359
+ promise = @client.make_request_async(:post, path_template, options)
1360
+
1361
+ promise = promise.then do |result|
1362
+ http_response = result.response
1363
+ status_code = http_response.status
1364
+ response_content = http_response.body
1365
+ unless status_code == 200 || status_code == 202
1366
+ error_model = JSON.load(response_content)
1367
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1368
+ end
1369
+
1370
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1371
+
1372
+ result
1373
+ end
1374
+
1375
+ promise.execute
1376
+ end
1377
+
1378
+ #
1379
+ # Import a virtual machine into a different lab. This operation can take a
1380
+ # while to complete.
1381
+ #
1382
+ # @param resource_group_name [String] The name of the resource group.
1383
+ # @param name [String] The name of the lab.
1384
+ # @param import_lab_virtual_machine_request [ImportLabVirtualMachineRequest]
1385
+ # This represents the payload required to import a virtual machine from a
1386
+ # different lab into the current one
1387
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1388
+ # will be added to the HTTP request.
1389
+ #
1390
+ #
1391
+ def begin_import_virtual_machine(resource_group_name, name, import_lab_virtual_machine_request, custom_headers:nil)
1392
+ response = begin_import_virtual_machine_async(resource_group_name, name, import_lab_virtual_machine_request, custom_headers:custom_headers).value!
1393
+ nil
1394
+ end
1395
+
1396
+ #
1397
+ # Import a virtual machine into a different lab. This operation can take a
1398
+ # while to complete.
1399
+ #
1400
+ # @param resource_group_name [String] The name of the resource group.
1401
+ # @param name [String] The name of the lab.
1402
+ # @param import_lab_virtual_machine_request [ImportLabVirtualMachineRequest]
1403
+ # This represents the payload required to import a virtual machine from a
1404
+ # different lab into the current one
1405
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1406
+ # will be added to the HTTP request.
1407
+ #
1408
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1409
+ #
1410
+ def begin_import_virtual_machine_with_http_info(resource_group_name, name, import_lab_virtual_machine_request, custom_headers:nil)
1411
+ begin_import_virtual_machine_async(resource_group_name, name, import_lab_virtual_machine_request, custom_headers:custom_headers).value!
1412
+ end
1413
+
1414
+ #
1415
+ # Import a virtual machine into a different lab. This operation can take a
1416
+ # while to complete.
1417
+ #
1418
+ # @param resource_group_name [String] The name of the resource group.
1419
+ # @param name [String] The name of the lab.
1420
+ # @param import_lab_virtual_machine_request [ImportLabVirtualMachineRequest]
1421
+ # This represents the payload required to import a virtual machine from a
1422
+ # different lab into the current one
1423
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1424
+ # to the HTTP request.
1425
+ #
1426
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1427
+ #
1428
+ def begin_import_virtual_machine_async(resource_group_name, name, import_lab_virtual_machine_request, custom_headers:nil)
1429
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1430
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1431
+ fail ArgumentError, 'name is nil' if name.nil?
1432
+ fail ArgumentError, 'import_lab_virtual_machine_request is nil' if import_lab_virtual_machine_request.nil?
1433
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1434
+
1435
+
1436
+ request_headers = {}
1437
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1438
+
1439
+ # Set Headers
1440
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1441
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1442
+
1443
+ # Serialize Request
1444
+ request_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::ImportLabVirtualMachineRequest.mapper()
1445
+ request_content = @client.serialize(request_mapper, import_lab_virtual_machine_request)
1446
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1447
+
1448
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/importVirtualMachine'
1449
+
1450
+ request_url = @base_url || @client.base_url
1451
+
1452
+ options = {
1453
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1454
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'name' => name},
1455
+ query_params: {'api-version' => @client.api_version},
1456
+ body: request_content,
1457
+ headers: request_headers.merge(custom_headers || {}),
1458
+ base_url: request_url
1459
+ }
1460
+ promise = @client.make_request_async(:post, path_template, options)
1461
+
1462
+ promise = promise.then do |result|
1463
+ http_response = result.response
1464
+ status_code = http_response.status
1465
+ response_content = http_response.body
1466
+ unless status_code == 200 || status_code == 202
1467
+ error_model = JSON.load(response_content)
1468
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1469
+ end
1470
+
1471
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1472
+
1473
+ result
1474
+ end
1475
+
1476
+ promise.execute
1477
+ end
1478
+
1479
+ #
1480
+ # List labs in a subscription.
1481
+ #
1482
+ # @param next_page_link [String] The NextLink from the previous successful call
1483
+ # to List operation.
1484
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1485
+ # will be added to the HTTP request.
1486
+ #
1487
+ # @return [LabList] operation results.
1488
+ #
1489
+ def list_by_subscription_next(next_page_link, custom_headers:nil)
1490
+ response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
1491
+ response.body unless response.nil?
1492
+ end
1493
+
1494
+ #
1495
+ # List labs in a subscription.
1496
+ #
1497
+ # @param next_page_link [String] The NextLink from the previous successful call
1498
+ # to List operation.
1499
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1500
+ # will be added to the HTTP request.
1501
+ #
1502
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1503
+ #
1504
+ def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil)
1505
+ list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
1506
+ end
1507
+
1508
+ #
1509
+ # List labs in a subscription.
1510
+ #
1511
+ # @param next_page_link [String] The NextLink from the previous successful call
1512
+ # to List operation.
1513
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1514
+ # to the HTTP request.
1515
+ #
1516
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1517
+ #
1518
+ def list_by_subscription_next_async(next_page_link, custom_headers:nil)
1519
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1520
+
1521
+
1522
+ request_headers = {}
1523
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1524
+
1525
+ # Set Headers
1526
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1527
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1528
+ path_template = '{nextLink}'
1529
+
1530
+ request_url = @base_url || @client.base_url
1531
+
1532
+ options = {
1533
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1534
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1535
+ headers: request_headers.merge(custom_headers || {}),
1536
+ base_url: request_url
1537
+ }
1538
+ promise = @client.make_request_async(:get, path_template, options)
1539
+
1540
+ promise = promise.then do |result|
1541
+ http_response = result.response
1542
+ status_code = http_response.status
1543
+ response_content = http_response.body
1544
+ unless status_code == 200
1545
+ error_model = JSON.load(response_content)
1546
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1547
+ end
1548
+
1549
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1550
+ # Deserialize Response
1551
+ if status_code == 200
1552
+ begin
1553
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1554
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::LabList.mapper()
1555
+ result.body = @client.deserialize(result_mapper, parsed_response)
1556
+ rescue Exception => e
1557
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1558
+ end
1559
+ end
1560
+
1561
+ result
1562
+ end
1563
+
1564
+ promise.execute
1565
+ end
1566
+
1567
+ #
1568
+ # List labs in a resource group.
1569
+ #
1570
+ # @param next_page_link [String] The NextLink from the previous successful call
1571
+ # to List operation.
1572
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1573
+ # will be added to the HTTP request.
1574
+ #
1575
+ # @return [LabList] operation results.
1576
+ #
1577
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1578
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1579
+ response.body unless response.nil?
1580
+ end
1581
+
1582
+ #
1583
+ # List labs in a resource group.
1584
+ #
1585
+ # @param next_page_link [String] The NextLink from the previous successful call
1586
+ # to List operation.
1587
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1588
+ # will be added to the HTTP request.
1589
+ #
1590
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1591
+ #
1592
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1593
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1594
+ end
1595
+
1596
+ #
1597
+ # List labs in a resource group.
1598
+ #
1599
+ # @param next_page_link [String] The NextLink from the previous successful call
1600
+ # to List operation.
1601
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1602
+ # to the HTTP request.
1603
+ #
1604
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1605
+ #
1606
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1607
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1608
+
1609
+
1610
+ request_headers = {}
1611
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1612
+
1613
+ # Set Headers
1614
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1615
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1616
+ path_template = '{nextLink}'
1617
+
1618
+ request_url = @base_url || @client.base_url
1619
+
1620
+ options = {
1621
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1622
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1623
+ headers: request_headers.merge(custom_headers || {}),
1624
+ base_url: request_url
1625
+ }
1626
+ promise = @client.make_request_async(:get, path_template, options)
1627
+
1628
+ promise = promise.then do |result|
1629
+ http_response = result.response
1630
+ status_code = http_response.status
1631
+ response_content = http_response.body
1632
+ unless status_code == 200
1633
+ error_model = JSON.load(response_content)
1634
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1635
+ end
1636
+
1637
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1638
+ # Deserialize Response
1639
+ if status_code == 200
1640
+ begin
1641
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1642
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::LabList.mapper()
1643
+ result.body = @client.deserialize(result_mapper, parsed_response)
1644
+ rescue Exception => e
1645
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1646
+ end
1647
+ end
1648
+
1649
+ result
1650
+ end
1651
+
1652
+ promise.execute
1653
+ end
1654
+
1655
+ #
1656
+ # List disk images available for custom image creation.
1657
+ #
1658
+ # @param next_page_link [String] The NextLink from the previous successful call
1659
+ # to List operation.
1660
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1661
+ # will be added to the HTTP request.
1662
+ #
1663
+ # @return [LabVhdList] operation results.
1664
+ #
1665
+ def list_vhds_next(next_page_link, custom_headers:nil)
1666
+ response = list_vhds_next_async(next_page_link, custom_headers:custom_headers).value!
1667
+ response.body unless response.nil?
1668
+ end
1669
+
1670
+ #
1671
+ # List disk images available for custom image creation.
1672
+ #
1673
+ # @param next_page_link [String] The NextLink from the previous successful call
1674
+ # to List operation.
1675
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1676
+ # will be added to the HTTP request.
1677
+ #
1678
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1679
+ #
1680
+ def list_vhds_next_with_http_info(next_page_link, custom_headers:nil)
1681
+ list_vhds_next_async(next_page_link, custom_headers:custom_headers).value!
1682
+ end
1683
+
1684
+ #
1685
+ # List disk images available for custom image creation.
1686
+ #
1687
+ # @param next_page_link [String] The NextLink from the previous successful call
1688
+ # to List operation.
1689
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1690
+ # to the HTTP request.
1691
+ #
1692
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1693
+ #
1694
+ def list_vhds_next_async(next_page_link, custom_headers:nil)
1695
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1696
+
1697
+
1698
+ request_headers = {}
1699
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1700
+
1701
+ # Set Headers
1702
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1703
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1704
+ path_template = '{nextLink}'
1705
+
1706
+ request_url = @base_url || @client.base_url
1707
+
1708
+ options = {
1709
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1710
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1711
+ headers: request_headers.merge(custom_headers || {}),
1712
+ base_url: request_url
1713
+ }
1714
+ promise = @client.make_request_async(:post, path_template, options)
1715
+
1716
+ promise = promise.then do |result|
1717
+ http_response = result.response
1718
+ status_code = http_response.status
1719
+ response_content = http_response.body
1720
+ unless status_code == 200
1721
+ error_model = JSON.load(response_content)
1722
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1723
+ end
1724
+
1725
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1726
+ # Deserialize Response
1727
+ if status_code == 200
1728
+ begin
1729
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1730
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::LabVhdList.mapper()
1731
+ result.body = @client.deserialize(result_mapper, parsed_response)
1732
+ rescue Exception => e
1733
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1734
+ end
1735
+ end
1736
+
1737
+ result
1738
+ end
1739
+
1740
+ promise.execute
1741
+ end
1742
+
1743
+ #
1744
+ # List labs in a subscription.
1745
+ #
1746
+ # @param expand [String] Specify the $expand query. Example:
1747
+ # 'properties($select=defaultStorageAccount)'
1748
+ # @param filter [String] The filter to apply to the operation. Example:
1749
+ # '$filter=contains(name,'myName')
1750
+ # @param top [Integer] The maximum number of resources to return from the
1751
+ # operation. Example: '$top=10'
1752
+ # @param orderby [String] The ordering expression for the results, using OData
1753
+ # notation. Example: '$orderby=name desc'
1754
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1755
+ # will be added to the HTTP request.
1756
+ #
1757
+ # @return [LabList] which provide lazy access to pages of the response.
1758
+ #
1759
+ def list_by_subscription_as_lazy(expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
1760
+ response = list_by_subscription_async(expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers).value!
1761
+ unless response.nil?
1762
+ page = response.body
1763
+ page.next_method = Proc.new do |next_page_link|
1764
+ list_by_subscription_next_async(next_page_link, custom_headers:custom_headers)
1765
+ end
1766
+ page
1767
+ end
1768
+ end
1769
+
1770
+ #
1771
+ # List labs in a resource group.
1772
+ #
1773
+ # @param resource_group_name [String] The name of the resource group.
1774
+ # @param expand [String] Specify the $expand query. Example:
1775
+ # 'properties($select=defaultStorageAccount)'
1776
+ # @param filter [String] The filter to apply to the operation. Example:
1777
+ # '$filter=contains(name,'myName')
1778
+ # @param top [Integer] The maximum number of resources to return from the
1779
+ # operation. Example: '$top=10'
1780
+ # @param orderby [String] The ordering expression for the results, using OData
1781
+ # notation. Example: '$orderby=name desc'
1782
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1783
+ # will be added to the HTTP request.
1784
+ #
1785
+ # @return [LabList] which provide lazy access to pages of the response.
1786
+ #
1787
+ def list_by_resource_group_as_lazy(resource_group_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
1788
+ response = list_by_resource_group_async(resource_group_name, expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers).value!
1789
+ unless response.nil?
1790
+ page = response.body
1791
+ page.next_method = Proc.new do |next_page_link|
1792
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1793
+ end
1794
+ page
1795
+ end
1796
+ end
1797
+
1798
+ #
1799
+ # List disk images available for custom image creation.
1800
+ #
1801
+ # @param resource_group_name [String] The name of the resource group.
1802
+ # @param name [String] The name of the lab.
1803
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1804
+ # will be added to the HTTP request.
1805
+ #
1806
+ # @return [LabVhdList] which provide lazy access to pages of the response.
1807
+ #
1808
+ def list_vhds_as_lazy(resource_group_name, name, custom_headers:nil)
1809
+ response = list_vhds_async(resource_group_name, name, custom_headers:custom_headers).value!
1810
+ unless response.nil?
1811
+ page = response.body
1812
+ page.next_method = Proc.new do |next_page_link|
1813
+ list_vhds_next_async(next_page_link, custom_headers:custom_headers)
1814
+ end
1815
+ page
1816
+ end
1817
+ end
1818
+
1819
+ end
1820
+ end