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,727 @@
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 Formulas
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Formulas 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 formulas in a given lab.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group.
28
+ # @param lab_name [String] The name of the lab.
29
+ # @param expand [String] Specify the $expand query. Example:
30
+ # 'properties($select=description)'
31
+ # @param filter [String] The filter to apply to the operation. Example:
32
+ # '$filter=contains(name,'myName')
33
+ # @param top [Integer] The maximum number of resources to return from the
34
+ # operation. Example: '$top=10'
35
+ # @param orderby [String] The ordering expression for the results, using OData
36
+ # notation. Example: '$orderby=name desc'
37
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
38
+ # will be added to the HTTP request.
39
+ #
40
+ # @return [Array<Formula>] operation results.
41
+ #
42
+ def list(resource_group_name, lab_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
43
+ first_page = list_as_lazy(resource_group_name, lab_name, expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers)
44
+ first_page.get_all_items
45
+ end
46
+
47
+ #
48
+ # List formulas in a given lab.
49
+ #
50
+ # @param resource_group_name [String] The name of the resource group.
51
+ # @param lab_name [String] The name of the lab.
52
+ # @param expand [String] Specify the $expand query. Example:
53
+ # 'properties($select=description)'
54
+ # @param filter [String] The filter to apply to the operation. Example:
55
+ # '$filter=contains(name,'myName')
56
+ # @param top [Integer] The maximum number of resources to return from the
57
+ # operation. Example: '$top=10'
58
+ # @param orderby [String] The ordering expression for the results, using OData
59
+ # notation. Example: '$orderby=name desc'
60
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
61
+ # will be added to the HTTP request.
62
+ #
63
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
64
+ #
65
+ def list_with_http_info(resource_group_name, lab_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
66
+ list_async(resource_group_name, lab_name, expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers).value!
67
+ end
68
+
69
+ #
70
+ # List formulas in a given lab.
71
+ #
72
+ # @param resource_group_name [String] The name of the resource group.
73
+ # @param lab_name [String] The name of the lab.
74
+ # @param expand [String] Specify the $expand query. Example:
75
+ # 'properties($select=description)'
76
+ # @param filter [String] The filter to apply to the operation. Example:
77
+ # '$filter=contains(name,'myName')
78
+ # @param top [Integer] The maximum number of resources to return from the
79
+ # operation. Example: '$top=10'
80
+ # @param orderby [String] The ordering expression for the results, using OData
81
+ # notation. Example: '$orderby=name desc'
82
+ # @param [Hash{String => String}] A hash of custom headers that will be added
83
+ # to the HTTP request.
84
+ #
85
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
86
+ #
87
+ def list_async(resource_group_name, lab_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
88
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
89
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
90
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
91
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
92
+
93
+
94
+ request_headers = {}
95
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
96
+
97
+ # Set Headers
98
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
99
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
100
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas'
101
+
102
+ request_url = @base_url || @client.base_url
103
+
104
+ options = {
105
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
106
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name},
107
+ query_params: {'$expand' => expand,'$filter' => filter,'$top' => top,'$orderby' => orderby,'api-version' => @client.api_version},
108
+ headers: request_headers.merge(custom_headers || {}),
109
+ base_url: request_url
110
+ }
111
+ promise = @client.make_request_async(:get, path_template, options)
112
+
113
+ promise = promise.then do |result|
114
+ http_response = result.response
115
+ status_code = http_response.status
116
+ response_content = http_response.body
117
+ unless status_code == 200
118
+ error_model = JSON.load(response_content)
119
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
120
+ end
121
+
122
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
123
+ # Deserialize Response
124
+ if status_code == 200
125
+ begin
126
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
127
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::FormulaList.mapper()
128
+ result.body = @client.deserialize(result_mapper, parsed_response)
129
+ rescue Exception => e
130
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
131
+ end
132
+ end
133
+
134
+ result
135
+ end
136
+
137
+ promise.execute
138
+ end
139
+
140
+ #
141
+ # Get formula.
142
+ #
143
+ # @param resource_group_name [String] The name of the resource group.
144
+ # @param lab_name [String] The name of the lab.
145
+ # @param name [String] The name of the formula.
146
+ # @param expand [String] Specify the $expand query. Example:
147
+ # 'properties($select=description)'
148
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
149
+ # will be added to the HTTP request.
150
+ #
151
+ # @return [Formula] operation results.
152
+ #
153
+ def get(resource_group_name, lab_name, name, expand:nil, custom_headers:nil)
154
+ response = get_async(resource_group_name, lab_name, name, expand:expand, custom_headers:custom_headers).value!
155
+ response.body unless response.nil?
156
+ end
157
+
158
+ #
159
+ # Get formula.
160
+ #
161
+ # @param resource_group_name [String] The name of the resource group.
162
+ # @param lab_name [String] The name of the lab.
163
+ # @param name [String] The name of the formula.
164
+ # @param expand [String] Specify the $expand query. Example:
165
+ # 'properties($select=description)'
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 get_with_http_info(resource_group_name, lab_name, name, expand:nil, custom_headers:nil)
172
+ get_async(resource_group_name, lab_name, name, expand:expand, custom_headers:custom_headers).value!
173
+ end
174
+
175
+ #
176
+ # Get formula.
177
+ #
178
+ # @param resource_group_name [String] The name of the resource group.
179
+ # @param lab_name [String] The name of the lab.
180
+ # @param name [String] The name of the formula.
181
+ # @param expand [String] Specify the $expand query. Example:
182
+ # 'properties($select=description)'
183
+ # @param [Hash{String => String}] A hash of custom headers that will be added
184
+ # to the HTTP request.
185
+ #
186
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
187
+ #
188
+ def get_async(resource_group_name, lab_name, name, expand:nil, custom_headers:nil)
189
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
190
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
191
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
192
+ fail ArgumentError, 'name is nil' if name.nil?
193
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
194
+
195
+
196
+ request_headers = {}
197
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
198
+
199
+ # Set Headers
200
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
201
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
202
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}'
203
+
204
+ request_url = @base_url || @client.base_url
205
+
206
+ options = {
207
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
208
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
209
+ query_params: {'$expand' => expand,'api-version' => @client.api_version},
210
+ headers: request_headers.merge(custom_headers || {}),
211
+ base_url: request_url
212
+ }
213
+ promise = @client.make_request_async(:get, path_template, options)
214
+
215
+ promise = promise.then do |result|
216
+ http_response = result.response
217
+ status_code = http_response.status
218
+ response_content = http_response.body
219
+ unless status_code == 200
220
+ error_model = JSON.load(response_content)
221
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
222
+ end
223
+
224
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
225
+ # Deserialize Response
226
+ if status_code == 200
227
+ begin
228
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
229
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Formula.mapper()
230
+ result.body = @client.deserialize(result_mapper, parsed_response)
231
+ rescue Exception => e
232
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
233
+ end
234
+ end
235
+
236
+ result
237
+ end
238
+
239
+ promise.execute
240
+ end
241
+
242
+ #
243
+ # Create or replace an existing Formula. This operation can take a while to
244
+ # complete.
245
+ #
246
+ # @param resource_group_name [String] The name of the resource group.
247
+ # @param lab_name [String] The name of the lab.
248
+ # @param name [String] The name of the formula.
249
+ # @param formula [Formula] A formula for creating a VM, specifying an image
250
+ # base and other parameters
251
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
252
+ # will be added to the HTTP request.
253
+ #
254
+ # @return [Formula] operation results.
255
+ #
256
+ def create_or_update(resource_group_name, lab_name, name, formula, custom_headers:nil)
257
+ response = create_or_update_async(resource_group_name, lab_name, name, formula, custom_headers:custom_headers).value!
258
+ response.body unless response.nil?
259
+ end
260
+
261
+ #
262
+ # @param resource_group_name [String] The name of the resource group.
263
+ # @param lab_name [String] The name of the lab.
264
+ # @param name [String] The name of the formula.
265
+ # @param formula [Formula] A formula for creating a VM, specifying an image
266
+ # base and other parameters
267
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
268
+ # will be added to the HTTP request.
269
+ #
270
+ # @return [Concurrent::Promise] promise which provides async access to http
271
+ # response.
272
+ #
273
+ def create_or_update_async(resource_group_name, lab_name, name, formula, custom_headers:nil)
274
+ # Send request
275
+ promise = begin_create_or_update_async(resource_group_name, lab_name, name, formula, custom_headers:custom_headers)
276
+
277
+ promise = promise.then do |response|
278
+ # Defining deserialization method.
279
+ deserialize_method = lambda do |parsed_response|
280
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Formula.mapper()
281
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
282
+ end
283
+
284
+ # Waiting for response.
285
+ @client.get_long_running_operation_result(response, deserialize_method)
286
+ end
287
+
288
+ promise
289
+ end
290
+
291
+ #
292
+ # Delete formula.
293
+ #
294
+ # @param resource_group_name [String] The name of the resource group.
295
+ # @param lab_name [String] The name of the lab.
296
+ # @param name [String] The name of the formula.
297
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
298
+ # will be added to the HTTP request.
299
+ #
300
+ #
301
+ def delete(resource_group_name, lab_name, name, custom_headers:nil)
302
+ response = delete_async(resource_group_name, lab_name, name, custom_headers:custom_headers).value!
303
+ nil
304
+ end
305
+
306
+ #
307
+ # Delete formula.
308
+ #
309
+ # @param resource_group_name [String] The name of the resource group.
310
+ # @param lab_name [String] The name of the lab.
311
+ # @param name [String] The name of the formula.
312
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
313
+ # will be added to the HTTP request.
314
+ #
315
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
316
+ #
317
+ def delete_with_http_info(resource_group_name, lab_name, name, custom_headers:nil)
318
+ delete_async(resource_group_name, lab_name, name, custom_headers:custom_headers).value!
319
+ end
320
+
321
+ #
322
+ # Delete formula.
323
+ #
324
+ # @param resource_group_name [String] The name of the resource group.
325
+ # @param lab_name [String] The name of the lab.
326
+ # @param name [String] The name of the formula.
327
+ # @param [Hash{String => String}] A hash of custom headers that will be added
328
+ # to the HTTP request.
329
+ #
330
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
331
+ #
332
+ def delete_async(resource_group_name, lab_name, name, custom_headers:nil)
333
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
334
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
335
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
336
+ fail ArgumentError, 'name is nil' if name.nil?
337
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
338
+
339
+
340
+ request_headers = {}
341
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
342
+
343
+ # Set Headers
344
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
345
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
346
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}'
347
+
348
+ request_url = @base_url || @client.base_url
349
+
350
+ options = {
351
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
352
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
353
+ query_params: {'api-version' => @client.api_version},
354
+ headers: request_headers.merge(custom_headers || {}),
355
+ base_url: request_url
356
+ }
357
+ promise = @client.make_request_async(:delete, path_template, options)
358
+
359
+ promise = promise.then do |result|
360
+ http_response = result.response
361
+ status_code = http_response.status
362
+ response_content = http_response.body
363
+ unless status_code == 200 || status_code == 204
364
+ error_model = JSON.load(response_content)
365
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
366
+ end
367
+
368
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
369
+
370
+ result
371
+ end
372
+
373
+ promise.execute
374
+ end
375
+
376
+ #
377
+ # Modify properties of formulas.
378
+ #
379
+ # @param resource_group_name [String] The name of the resource group.
380
+ # @param lab_name [String] The name of the lab.
381
+ # @param name [String] The name of the formula.
382
+ # @param formula [FormulaFragment] A formula for creating a VM, specifying an
383
+ # image base and other parameters
384
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
385
+ # will be added to the HTTP request.
386
+ #
387
+ # @return [Formula] operation results.
388
+ #
389
+ def update(resource_group_name, lab_name, name, formula, custom_headers:nil)
390
+ response = update_async(resource_group_name, lab_name, name, formula, custom_headers:custom_headers).value!
391
+ response.body unless response.nil?
392
+ end
393
+
394
+ #
395
+ # Modify properties of formulas.
396
+ #
397
+ # @param resource_group_name [String] The name of the resource group.
398
+ # @param lab_name [String] The name of the lab.
399
+ # @param name [String] The name of the formula.
400
+ # @param formula [FormulaFragment] A formula for creating a VM, specifying an
401
+ # image base and other parameters
402
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
403
+ # will be added to the HTTP request.
404
+ #
405
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
406
+ #
407
+ def update_with_http_info(resource_group_name, lab_name, name, formula, custom_headers:nil)
408
+ update_async(resource_group_name, lab_name, name, formula, custom_headers:custom_headers).value!
409
+ end
410
+
411
+ #
412
+ # Modify properties of formulas.
413
+ #
414
+ # @param resource_group_name [String] The name of the resource group.
415
+ # @param lab_name [String] The name of the lab.
416
+ # @param name [String] The name of the formula.
417
+ # @param formula [FormulaFragment] A formula for creating a VM, specifying an
418
+ # image base and other parameters
419
+ # @param [Hash{String => String}] A hash of custom headers that will be added
420
+ # to the HTTP request.
421
+ #
422
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
423
+ #
424
+ def update_async(resource_group_name, lab_name, name, formula, custom_headers:nil)
425
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
426
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
427
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
428
+ fail ArgumentError, 'name is nil' if name.nil?
429
+ fail ArgumentError, 'formula is nil' if formula.nil?
430
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
431
+
432
+
433
+ request_headers = {}
434
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
435
+
436
+ # Set Headers
437
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
438
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
439
+
440
+ # Serialize Request
441
+ request_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::FormulaFragment.mapper()
442
+ request_content = @client.serialize(request_mapper, formula)
443
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
444
+
445
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}'
446
+
447
+ request_url = @base_url || @client.base_url
448
+
449
+ options = {
450
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
451
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
452
+ query_params: {'api-version' => @client.api_version},
453
+ body: request_content,
454
+ headers: request_headers.merge(custom_headers || {}),
455
+ base_url: request_url
456
+ }
457
+ promise = @client.make_request_async(:patch, path_template, options)
458
+
459
+ promise = promise.then do |result|
460
+ http_response = result.response
461
+ status_code = http_response.status
462
+ response_content = http_response.body
463
+ unless status_code == 200
464
+ error_model = JSON.load(response_content)
465
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
466
+ end
467
+
468
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
469
+ # Deserialize Response
470
+ if status_code == 200
471
+ begin
472
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
473
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Formula.mapper()
474
+ result.body = @client.deserialize(result_mapper, parsed_response)
475
+ rescue Exception => e
476
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
477
+ end
478
+ end
479
+
480
+ result
481
+ end
482
+
483
+ promise.execute
484
+ end
485
+
486
+ #
487
+ # Create or replace an existing Formula. This operation can take a while to
488
+ # complete.
489
+ #
490
+ # @param resource_group_name [String] The name of the resource group.
491
+ # @param lab_name [String] The name of the lab.
492
+ # @param name [String] The name of the formula.
493
+ # @param formula [Formula] A formula for creating a VM, specifying an image
494
+ # base and other parameters
495
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
496
+ # will be added to the HTTP request.
497
+ #
498
+ # @return [Formula] operation results.
499
+ #
500
+ def begin_create_or_update(resource_group_name, lab_name, name, formula, custom_headers:nil)
501
+ response = begin_create_or_update_async(resource_group_name, lab_name, name, formula, custom_headers:custom_headers).value!
502
+ response.body unless response.nil?
503
+ end
504
+
505
+ #
506
+ # Create or replace an existing Formula. This operation can take a while to
507
+ # complete.
508
+ #
509
+ # @param resource_group_name [String] The name of the resource group.
510
+ # @param lab_name [String] The name of the lab.
511
+ # @param name [String] The name of the formula.
512
+ # @param formula [Formula] A formula for creating a VM, specifying an image
513
+ # base and other parameters
514
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
515
+ # will be added to the HTTP request.
516
+ #
517
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
518
+ #
519
+ def begin_create_or_update_with_http_info(resource_group_name, lab_name, name, formula, custom_headers:nil)
520
+ begin_create_or_update_async(resource_group_name, lab_name, name, formula, custom_headers:custom_headers).value!
521
+ end
522
+
523
+ #
524
+ # Create or replace an existing Formula. This operation can take a while to
525
+ # complete.
526
+ #
527
+ # @param resource_group_name [String] The name of the resource group.
528
+ # @param lab_name [String] The name of the lab.
529
+ # @param name [String] The name of the formula.
530
+ # @param formula [Formula] A formula for creating a VM, specifying an image
531
+ # base and other parameters
532
+ # @param [Hash{String => String}] A hash of custom headers that will be added
533
+ # to the HTTP request.
534
+ #
535
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
536
+ #
537
+ def begin_create_or_update_async(resource_group_name, lab_name, name, formula, custom_headers:nil)
538
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
539
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
540
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
541
+ fail ArgumentError, 'name is nil' if name.nil?
542
+ fail ArgumentError, 'formula is nil' if formula.nil?
543
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
544
+
545
+
546
+ request_headers = {}
547
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
548
+
549
+ # Set Headers
550
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
551
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
552
+
553
+ # Serialize Request
554
+ request_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Formula.mapper()
555
+ request_content = @client.serialize(request_mapper, formula)
556
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
557
+
558
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}'
559
+
560
+ request_url = @base_url || @client.base_url
561
+
562
+ options = {
563
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
564
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
565
+ query_params: {'api-version' => @client.api_version},
566
+ body: request_content,
567
+ headers: request_headers.merge(custom_headers || {}),
568
+ base_url: request_url
569
+ }
570
+ promise = @client.make_request_async(:put, path_template, options)
571
+
572
+ promise = promise.then do |result|
573
+ http_response = result.response
574
+ status_code = http_response.status
575
+ response_content = http_response.body
576
+ unless status_code == 200 || status_code == 201
577
+ error_model = JSON.load(response_content)
578
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
579
+ end
580
+
581
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
582
+ # Deserialize Response
583
+ if status_code == 200
584
+ begin
585
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
586
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Formula.mapper()
587
+ result.body = @client.deserialize(result_mapper, parsed_response)
588
+ rescue Exception => e
589
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
590
+ end
591
+ end
592
+ # Deserialize Response
593
+ if status_code == 201
594
+ begin
595
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
596
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Formula.mapper()
597
+ result.body = @client.deserialize(result_mapper, parsed_response)
598
+ rescue Exception => e
599
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
600
+ end
601
+ end
602
+
603
+ result
604
+ end
605
+
606
+ promise.execute
607
+ end
608
+
609
+ #
610
+ # List formulas in a given lab.
611
+ #
612
+ # @param next_page_link [String] The NextLink from the previous successful call
613
+ # to List operation.
614
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
615
+ # will be added to the HTTP request.
616
+ #
617
+ # @return [FormulaList] operation results.
618
+ #
619
+ def list_next(next_page_link, custom_headers:nil)
620
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
621
+ response.body unless response.nil?
622
+ end
623
+
624
+ #
625
+ # List formulas in a given lab.
626
+ #
627
+ # @param next_page_link [String] The NextLink from the previous successful call
628
+ # to List operation.
629
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
630
+ # will be added to the HTTP request.
631
+ #
632
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
633
+ #
634
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
635
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
636
+ end
637
+
638
+ #
639
+ # List formulas in a given lab.
640
+ #
641
+ # @param next_page_link [String] The NextLink from the previous successful call
642
+ # to List operation.
643
+ # @param [Hash{String => String}] A hash of custom headers that will be added
644
+ # to the HTTP request.
645
+ #
646
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
647
+ #
648
+ def list_next_async(next_page_link, custom_headers:nil)
649
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
650
+
651
+
652
+ request_headers = {}
653
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
654
+
655
+ # Set Headers
656
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
657
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
658
+ path_template = '{nextLink}'
659
+
660
+ request_url = @base_url || @client.base_url
661
+
662
+ options = {
663
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
664
+ skip_encoding_path_params: {'nextLink' => next_page_link},
665
+ headers: request_headers.merge(custom_headers || {}),
666
+ base_url: request_url
667
+ }
668
+ promise = @client.make_request_async(:get, path_template, options)
669
+
670
+ promise = promise.then do |result|
671
+ http_response = result.response
672
+ status_code = http_response.status
673
+ response_content = http_response.body
674
+ unless status_code == 200
675
+ error_model = JSON.load(response_content)
676
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
677
+ end
678
+
679
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
680
+ # Deserialize Response
681
+ if status_code == 200
682
+ begin
683
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
684
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::FormulaList.mapper()
685
+ result.body = @client.deserialize(result_mapper, parsed_response)
686
+ rescue Exception => e
687
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
688
+ end
689
+ end
690
+
691
+ result
692
+ end
693
+
694
+ promise.execute
695
+ end
696
+
697
+ #
698
+ # List formulas in a given lab.
699
+ #
700
+ # @param resource_group_name [String] The name of the resource group.
701
+ # @param lab_name [String] The name of the lab.
702
+ # @param expand [String] Specify the $expand query. Example:
703
+ # 'properties($select=description)'
704
+ # @param filter [String] The filter to apply to the operation. Example:
705
+ # '$filter=contains(name,'myName')
706
+ # @param top [Integer] The maximum number of resources to return from the
707
+ # operation. Example: '$top=10'
708
+ # @param orderby [String] The ordering expression for the results, using OData
709
+ # notation. Example: '$orderby=name desc'
710
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
711
+ # will be added to the HTTP request.
712
+ #
713
+ # @return [FormulaList] which provide lazy access to pages of the response.
714
+ #
715
+ def list_as_lazy(resource_group_name, lab_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
716
+ response = list_async(resource_group_name, lab_name, expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers).value!
717
+ unless response.nil?
718
+ page = response.body
719
+ page.next_method = Proc.new do |next_page_link|
720
+ list_next_async(next_page_link, custom_headers:custom_headers)
721
+ end
722
+ page
723
+ end
724
+ end
725
+
726
+ end
727
+ end