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,135 @@
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 PolicySets
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the PolicySets 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
+ # Evaluates lab policy.
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 name [String] The name of the policy set.
30
+ # @param evaluate_policies_request [EvaluatePoliciesRequest] Request body for
31
+ # evaluating a policy set.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [EvaluatePoliciesResponse] operation results.
36
+ #
37
+ def evaluate_policies(resource_group_name, lab_name, name, evaluate_policies_request, custom_headers:nil)
38
+ response = evaluate_policies_async(resource_group_name, lab_name, name, evaluate_policies_request, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # Evaluates lab policy.
44
+ #
45
+ # @param resource_group_name [String] The name of the resource group.
46
+ # @param lab_name [String] The name of the lab.
47
+ # @param name [String] The name of the policy set.
48
+ # @param evaluate_policies_request [EvaluatePoliciesRequest] Request body for
49
+ # evaluating a policy set.
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def evaluate_policies_with_http_info(resource_group_name, lab_name, name, evaluate_policies_request, custom_headers:nil)
56
+ evaluate_policies_async(resource_group_name, lab_name, name, evaluate_policies_request, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Evaluates lab policy.
61
+ #
62
+ # @param resource_group_name [String] The name of the resource group.
63
+ # @param lab_name [String] The name of the lab.
64
+ # @param name [String] The name of the policy set.
65
+ # @param evaluate_policies_request [EvaluatePoliciesRequest] Request body for
66
+ # evaluating a policy set.
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def evaluate_policies_async(resource_group_name, lab_name, name, evaluate_policies_request, custom_headers:nil)
73
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
74
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
75
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
76
+ fail ArgumentError, 'name is nil' if name.nil?
77
+ fail ArgumentError, 'evaluate_policies_request is nil' if evaluate_policies_request.nil?
78
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
79
+
80
+
81
+ request_headers = {}
82
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
83
+
84
+ # Set Headers
85
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
86
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
87
+
88
+ # Serialize Request
89
+ request_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::EvaluatePoliciesRequest.mapper()
90
+ request_content = @client.serialize(request_mapper, evaluate_policies_request)
91
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
92
+
93
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{name}/evaluatePolicies'
94
+
95
+ request_url = @base_url || @client.base_url
96
+
97
+ options = {
98
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
99
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
100
+ query_params: {'api-version' => @client.api_version},
101
+ body: request_content,
102
+ headers: request_headers.merge(custom_headers || {}),
103
+ base_url: request_url
104
+ }
105
+ promise = @client.make_request_async(:post, path_template, options)
106
+
107
+ promise = promise.then do |result|
108
+ http_response = result.response
109
+ status_code = http_response.status
110
+ response_content = http_response.body
111
+ unless status_code == 200
112
+ error_model = JSON.load(response_content)
113
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
114
+ end
115
+
116
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
117
+ # Deserialize Response
118
+ if status_code == 200
119
+ begin
120
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
121
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::EvaluatePoliciesResponse.mapper()
122
+ result.body = @client.deserialize(result_mapper, parsed_response)
123
+ rescue Exception => e
124
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
125
+ end
126
+ end
127
+
128
+ result
129
+ end
130
+
131
+ promise.execute
132
+ end
133
+
134
+ end
135
+ end
@@ -0,0 +1,215 @@
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 ProviderOperations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ProviderOperations 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
+ # Result of the request to list REST API operations
26
+ #
27
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
28
+ # will be added to the HTTP request.
29
+ #
30
+ # @return [Array<OperationMetadata>] operation results.
31
+ #
32
+ def list(custom_headers:nil)
33
+ first_page = list_as_lazy(custom_headers:custom_headers)
34
+ first_page.get_all_items
35
+ end
36
+
37
+ #
38
+ # Result of the request to list REST API operations
39
+ #
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
44
+ #
45
+ def list_with_http_info(custom_headers:nil)
46
+ list_async(custom_headers:custom_headers).value!
47
+ end
48
+
49
+ #
50
+ # Result of the request to list REST API operations
51
+ #
52
+ # @param [Hash{String => String}] A hash of custom headers that will be added
53
+ # to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
56
+ #
57
+ def list_async(custom_headers:nil)
58
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
59
+
60
+
61
+ request_headers = {}
62
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
63
+
64
+ # Set Headers
65
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
66
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
67
+ path_template = 'providers/Microsoft.DevTestLab/operations'
68
+
69
+ request_url = @base_url || @client.base_url
70
+
71
+ options = {
72
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
73
+ query_params: {'api-version' => @client.api_version},
74
+ headers: request_headers.merge(custom_headers || {}),
75
+ base_url: request_url
76
+ }
77
+ promise = @client.make_request_async(:get, path_template, options)
78
+
79
+ promise = promise.then do |result|
80
+ http_response = result.response
81
+ status_code = http_response.status
82
+ response_content = http_response.body
83
+ unless status_code == 200
84
+ error_model = JSON.load(response_content)
85
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
86
+ end
87
+
88
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
89
+ # Deserialize Response
90
+ if status_code == 200
91
+ begin
92
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
93
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::ProviderOperationResult.mapper()
94
+ result.body = @client.deserialize(result_mapper, parsed_response)
95
+ rescue Exception => e
96
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
97
+ end
98
+ end
99
+
100
+ result
101
+ end
102
+
103
+ promise.execute
104
+ end
105
+
106
+ #
107
+ # Result of the request to list REST API operations
108
+ #
109
+ # @param next_page_link [String] The NextLink from the previous successful call
110
+ # to List operation.
111
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
112
+ # will be added to the HTTP request.
113
+ #
114
+ # @return [ProviderOperationResult] operation results.
115
+ #
116
+ def list_next(next_page_link, custom_headers:nil)
117
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
118
+ response.body unless response.nil?
119
+ end
120
+
121
+ #
122
+ # Result of the request to list REST API operations
123
+ #
124
+ # @param next_page_link [String] The NextLink from the previous successful call
125
+ # to List operation.
126
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
127
+ # will be added to the HTTP request.
128
+ #
129
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
130
+ #
131
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
132
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
133
+ end
134
+
135
+ #
136
+ # Result of the request to list REST API operations
137
+ #
138
+ # @param next_page_link [String] The NextLink from the previous successful call
139
+ # to List operation.
140
+ # @param [Hash{String => String}] A hash of custom headers that will be added
141
+ # to the HTTP request.
142
+ #
143
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
144
+ #
145
+ def list_next_async(next_page_link, custom_headers:nil)
146
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
147
+
148
+
149
+ request_headers = {}
150
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
151
+
152
+ # Set Headers
153
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
154
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
155
+ path_template = '{nextLink}'
156
+
157
+ request_url = @base_url || @client.base_url
158
+
159
+ options = {
160
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
161
+ skip_encoding_path_params: {'nextLink' => next_page_link},
162
+ headers: request_headers.merge(custom_headers || {}),
163
+ base_url: request_url
164
+ }
165
+ promise = @client.make_request_async(:get, path_template, options)
166
+
167
+ promise = promise.then do |result|
168
+ http_response = result.response
169
+ status_code = http_response.status
170
+ response_content = http_response.body
171
+ unless status_code == 200
172
+ error_model = JSON.load(response_content)
173
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
174
+ end
175
+
176
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
177
+ # Deserialize Response
178
+ if status_code == 200
179
+ begin
180
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
181
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::ProviderOperationResult.mapper()
182
+ result.body = @client.deserialize(result_mapper, parsed_response)
183
+ rescue Exception => e
184
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
185
+ end
186
+ end
187
+
188
+ result
189
+ end
190
+
191
+ promise.execute
192
+ end
193
+
194
+ #
195
+ # Result of the request to list REST API operations
196
+ #
197
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
198
+ # will be added to the HTTP request.
199
+ #
200
+ # @return [ProviderOperationResult] which provide lazy access to pages of the
201
+ # response.
202
+ #
203
+ def list_as_lazy(custom_headers:nil)
204
+ response = list_async(custom_headers:custom_headers).value!
205
+ unless response.nil?
206
+ page = response.body
207
+ page.next_method = Proc.new do |next_page_link|
208
+ list_next_async(next_page_link, custom_headers:custom_headers)
209
+ end
210
+ page
211
+ end
212
+ end
213
+
214
+ end
215
+ end
@@ -0,0 +1,1000 @@
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 Schedules
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Schedules 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 schedules 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=status)'
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<Schedule>] 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 schedules 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=status)'
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 schedules 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=status)'
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}/schedules'
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::ScheduleList.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 schedule.
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 schedule.
146
+ # @param expand [String] Specify the $expand query. Example:
147
+ # 'properties($select=status)'
148
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
149
+ # will be added to the HTTP request.
150
+ #
151
+ # @return [Schedule] 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 schedule.
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 schedule.
164
+ # @param expand [String] Specify the $expand query. Example:
165
+ # 'properties($select=status)'
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 schedule.
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 schedule.
181
+ # @param expand [String] Specify the $expand query. Example:
182
+ # 'properties($select=status)'
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}/schedules/{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::Schedule.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 schedule.
244
+ #
245
+ # @param resource_group_name [String] The name of the resource group.
246
+ # @param lab_name [String] The name of the lab.
247
+ # @param name [String] The name of the schedule.
248
+ # @param schedule [Schedule] A schedule.
249
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
250
+ # will be added to the HTTP request.
251
+ #
252
+ # @return [Schedule] operation results.
253
+ #
254
+ def create_or_update(resource_group_name, lab_name, name, schedule, custom_headers:nil)
255
+ response = create_or_update_async(resource_group_name, lab_name, name, schedule, custom_headers:custom_headers).value!
256
+ response.body unless response.nil?
257
+ end
258
+
259
+ #
260
+ # Create or replace an existing schedule.
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 schedule.
265
+ # @param schedule [Schedule] A schedule.
266
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
267
+ # will be added to the HTTP request.
268
+ #
269
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
270
+ #
271
+ def create_or_update_with_http_info(resource_group_name, lab_name, name, schedule, custom_headers:nil)
272
+ create_or_update_async(resource_group_name, lab_name, name, schedule, custom_headers:custom_headers).value!
273
+ end
274
+
275
+ #
276
+ # Create or replace an existing schedule.
277
+ #
278
+ # @param resource_group_name [String] The name of the resource group.
279
+ # @param lab_name [String] The name of the lab.
280
+ # @param name [String] The name of the schedule.
281
+ # @param schedule [Schedule] A schedule.
282
+ # @param [Hash{String => String}] A hash of custom headers that will be added
283
+ # to the HTTP request.
284
+ #
285
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
286
+ #
287
+ def create_or_update_async(resource_group_name, lab_name, name, schedule, custom_headers:nil)
288
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
289
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
290
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
291
+ fail ArgumentError, 'name is nil' if name.nil?
292
+ fail ArgumentError, 'schedule is nil' if schedule.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
+
303
+ # Serialize Request
304
+ request_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Schedule.mapper()
305
+ request_content = @client.serialize(request_mapper, schedule)
306
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
307
+
308
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}'
309
+
310
+ request_url = @base_url || @client.base_url
311
+
312
+ options = {
313
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
314
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
315
+ query_params: {'api-version' => @client.api_version},
316
+ body: request_content,
317
+ headers: request_headers.merge(custom_headers || {}),
318
+ base_url: request_url
319
+ }
320
+ promise = @client.make_request_async(:put, path_template, options)
321
+
322
+ promise = promise.then do |result|
323
+ http_response = result.response
324
+ status_code = http_response.status
325
+ response_content = http_response.body
326
+ unless status_code == 200 || status_code == 201
327
+ error_model = JSON.load(response_content)
328
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
329
+ end
330
+
331
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
332
+ # Deserialize Response
333
+ if status_code == 200
334
+ begin
335
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
336
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Schedule.mapper()
337
+ result.body = @client.deserialize(result_mapper, parsed_response)
338
+ rescue Exception => e
339
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
340
+ end
341
+ end
342
+ # Deserialize Response
343
+ if status_code == 201
344
+ begin
345
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
346
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Schedule.mapper()
347
+ result.body = @client.deserialize(result_mapper, parsed_response)
348
+ rescue Exception => e
349
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
350
+ end
351
+ end
352
+
353
+ result
354
+ end
355
+
356
+ promise.execute
357
+ end
358
+
359
+ #
360
+ # Delete schedule.
361
+ #
362
+ # @param resource_group_name [String] The name of the resource group.
363
+ # @param lab_name [String] The name of the lab.
364
+ # @param name [String] The name of the schedule.
365
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
366
+ # will be added to the HTTP request.
367
+ #
368
+ #
369
+ def delete(resource_group_name, lab_name, name, custom_headers:nil)
370
+ response = delete_async(resource_group_name, lab_name, name, custom_headers:custom_headers).value!
371
+ nil
372
+ end
373
+
374
+ #
375
+ # Delete schedule.
376
+ #
377
+ # @param resource_group_name [String] The name of the resource group.
378
+ # @param lab_name [String] The name of the lab.
379
+ # @param name [String] The name of the schedule.
380
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
381
+ # will be added to the HTTP request.
382
+ #
383
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
384
+ #
385
+ def delete_with_http_info(resource_group_name, lab_name, name, custom_headers:nil)
386
+ delete_async(resource_group_name, lab_name, name, custom_headers:custom_headers).value!
387
+ end
388
+
389
+ #
390
+ # Delete schedule.
391
+ #
392
+ # @param resource_group_name [String] The name of the resource group.
393
+ # @param lab_name [String] The name of the lab.
394
+ # @param name [String] The name of the schedule.
395
+ # @param [Hash{String => String}] A hash of custom headers that will be added
396
+ # to the HTTP request.
397
+ #
398
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
399
+ #
400
+ def delete_async(resource_group_name, lab_name, name, custom_headers:nil)
401
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
402
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
403
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
404
+ fail ArgumentError, 'name is nil' if name.nil?
405
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
406
+
407
+
408
+ request_headers = {}
409
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
410
+
411
+ # Set Headers
412
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
413
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
414
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}'
415
+
416
+ request_url = @base_url || @client.base_url
417
+
418
+ options = {
419
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
420
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
421
+ query_params: {'api-version' => @client.api_version},
422
+ headers: request_headers.merge(custom_headers || {}),
423
+ base_url: request_url
424
+ }
425
+ promise = @client.make_request_async(:delete, path_template, options)
426
+
427
+ promise = promise.then do |result|
428
+ http_response = result.response
429
+ status_code = http_response.status
430
+ response_content = http_response.body
431
+ unless status_code == 200 || status_code == 204
432
+ error_model = JSON.load(response_content)
433
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
434
+ end
435
+
436
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
437
+
438
+ result
439
+ end
440
+
441
+ promise.execute
442
+ end
443
+
444
+ #
445
+ # Modify properties of schedules.
446
+ #
447
+ # @param resource_group_name [String] The name of the resource group.
448
+ # @param lab_name [String] The name of the lab.
449
+ # @param name [String] The name of the schedule.
450
+ # @param schedule [ScheduleFragment] A schedule.
451
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
452
+ # will be added to the HTTP request.
453
+ #
454
+ # @return [Schedule] operation results.
455
+ #
456
+ def update(resource_group_name, lab_name, name, schedule, custom_headers:nil)
457
+ response = update_async(resource_group_name, lab_name, name, schedule, custom_headers:custom_headers).value!
458
+ response.body unless response.nil?
459
+ end
460
+
461
+ #
462
+ # Modify properties of schedules.
463
+ #
464
+ # @param resource_group_name [String] The name of the resource group.
465
+ # @param lab_name [String] The name of the lab.
466
+ # @param name [String] The name of the schedule.
467
+ # @param schedule [ScheduleFragment] A schedule.
468
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
469
+ # will be added to the HTTP request.
470
+ #
471
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
472
+ #
473
+ def update_with_http_info(resource_group_name, lab_name, name, schedule, custom_headers:nil)
474
+ update_async(resource_group_name, lab_name, name, schedule, custom_headers:custom_headers).value!
475
+ end
476
+
477
+ #
478
+ # Modify properties of schedules.
479
+ #
480
+ # @param resource_group_name [String] The name of the resource group.
481
+ # @param lab_name [String] The name of the lab.
482
+ # @param name [String] The name of the schedule.
483
+ # @param schedule [ScheduleFragment] A schedule.
484
+ # @param [Hash{String => String}] A hash of custom headers that will be added
485
+ # to the HTTP request.
486
+ #
487
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
488
+ #
489
+ def update_async(resource_group_name, lab_name, name, schedule, custom_headers:nil)
490
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
491
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
492
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
493
+ fail ArgumentError, 'name is nil' if name.nil?
494
+ fail ArgumentError, 'schedule is nil' if schedule.nil?
495
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
496
+
497
+
498
+ request_headers = {}
499
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
500
+
501
+ # Set Headers
502
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
503
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
504
+
505
+ # Serialize Request
506
+ request_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::ScheduleFragment.mapper()
507
+ request_content = @client.serialize(request_mapper, schedule)
508
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
509
+
510
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}'
511
+
512
+ request_url = @base_url || @client.base_url
513
+
514
+ options = {
515
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
516
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
517
+ query_params: {'api-version' => @client.api_version},
518
+ body: request_content,
519
+ headers: request_headers.merge(custom_headers || {}),
520
+ base_url: request_url
521
+ }
522
+ promise = @client.make_request_async(:patch, path_template, options)
523
+
524
+ promise = promise.then do |result|
525
+ http_response = result.response
526
+ status_code = http_response.status
527
+ response_content = http_response.body
528
+ unless status_code == 200
529
+ error_model = JSON.load(response_content)
530
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
531
+ end
532
+
533
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
534
+ # Deserialize Response
535
+ if status_code == 200
536
+ begin
537
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
538
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Schedule.mapper()
539
+ result.body = @client.deserialize(result_mapper, parsed_response)
540
+ rescue Exception => e
541
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
542
+ end
543
+ end
544
+
545
+ result
546
+ end
547
+
548
+ promise.execute
549
+ end
550
+
551
+ #
552
+ # Execute a schedule. This operation can take a while to complete.
553
+ #
554
+ # @param resource_group_name [String] The name of the resource group.
555
+ # @param lab_name [String] The name of the lab.
556
+ # @param name [String] The name of the schedule.
557
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
558
+ # will be added to the HTTP request.
559
+ #
560
+ def execute(resource_group_name, lab_name, name, custom_headers:nil)
561
+ response = execute_async(resource_group_name, lab_name, name, custom_headers:custom_headers).value!
562
+ nil
563
+ end
564
+
565
+ #
566
+ # @param resource_group_name [String] The name of the resource group.
567
+ # @param lab_name [String] The name of the lab.
568
+ # @param name [String] The name of the schedule.
569
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
570
+ # will be added to the HTTP request.
571
+ #
572
+ # @return [Concurrent::Promise] promise which provides async access to http
573
+ # response.
574
+ #
575
+ def execute_async(resource_group_name, lab_name, name, custom_headers:nil)
576
+ # Send request
577
+ promise = begin_execute_async(resource_group_name, lab_name, name, custom_headers:custom_headers)
578
+
579
+ promise = promise.then do |response|
580
+ # Defining deserialization method.
581
+ deserialize_method = lambda do |parsed_response|
582
+ end
583
+
584
+ # Waiting for response.
585
+ @client.get_long_running_operation_result(response, deserialize_method)
586
+ end
587
+
588
+ promise
589
+ end
590
+
591
+ #
592
+ # Lists all applicable schedules
593
+ #
594
+ # @param resource_group_name [String] The name of the resource group.
595
+ # @param lab_name [String] The name of the lab.
596
+ # @param name [String] The name of the schedule.
597
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
598
+ # will be added to the HTTP request.
599
+ #
600
+ # @return [Array<Schedule>] operation results.
601
+ #
602
+ def list_applicable(resource_group_name, lab_name, name, custom_headers:nil)
603
+ first_page = list_applicable_as_lazy(resource_group_name, lab_name, name, custom_headers:custom_headers)
604
+ first_page.get_all_items
605
+ end
606
+
607
+ #
608
+ # Lists all applicable schedules
609
+ #
610
+ # @param resource_group_name [String] The name of the resource group.
611
+ # @param lab_name [String] The name of the lab.
612
+ # @param name [String] The name of the schedule.
613
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
614
+ # will be added to the HTTP request.
615
+ #
616
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
617
+ #
618
+ def list_applicable_with_http_info(resource_group_name, lab_name, name, custom_headers:nil)
619
+ list_applicable_async(resource_group_name, lab_name, name, custom_headers:custom_headers).value!
620
+ end
621
+
622
+ #
623
+ # Lists all applicable schedules
624
+ #
625
+ # @param resource_group_name [String] The name of the resource group.
626
+ # @param lab_name [String] The name of the lab.
627
+ # @param name [String] The name of the schedule.
628
+ # @param [Hash{String => String}] A hash of custom headers that will be added
629
+ # to the HTTP request.
630
+ #
631
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
632
+ #
633
+ def list_applicable_async(resource_group_name, lab_name, name, custom_headers:nil)
634
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
635
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
636
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
637
+ fail ArgumentError, 'name is nil' if name.nil?
638
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
639
+
640
+
641
+ request_headers = {}
642
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
643
+
644
+ # Set Headers
645
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
646
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
647
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/listApplicable'
648
+
649
+ request_url = @base_url || @client.base_url
650
+
651
+ options = {
652
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
653
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
654
+ query_params: {'api-version' => @client.api_version},
655
+ headers: request_headers.merge(custom_headers || {}),
656
+ base_url: request_url
657
+ }
658
+ promise = @client.make_request_async(:post, path_template, options)
659
+
660
+ promise = promise.then do |result|
661
+ http_response = result.response
662
+ status_code = http_response.status
663
+ response_content = http_response.body
664
+ unless status_code == 200
665
+ error_model = JSON.load(response_content)
666
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
667
+ end
668
+
669
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
670
+ # Deserialize Response
671
+ if status_code == 200
672
+ begin
673
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
674
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::ScheduleList.mapper()
675
+ result.body = @client.deserialize(result_mapper, parsed_response)
676
+ rescue Exception => e
677
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
678
+ end
679
+ end
680
+
681
+ result
682
+ end
683
+
684
+ promise.execute
685
+ end
686
+
687
+ #
688
+ # Execute a schedule. This operation can take a while to complete.
689
+ #
690
+ # @param resource_group_name [String] The name of the resource group.
691
+ # @param lab_name [String] The name of the lab.
692
+ # @param name [String] The name of the schedule.
693
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
694
+ # will be added to the HTTP request.
695
+ #
696
+ #
697
+ def begin_execute(resource_group_name, lab_name, name, custom_headers:nil)
698
+ response = begin_execute_async(resource_group_name, lab_name, name, custom_headers:custom_headers).value!
699
+ nil
700
+ end
701
+
702
+ #
703
+ # Execute a schedule. This operation can take a while to complete.
704
+ #
705
+ # @param resource_group_name [String] The name of the resource group.
706
+ # @param lab_name [String] The name of the lab.
707
+ # @param name [String] The name of the schedule.
708
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
709
+ # will be added to the HTTP request.
710
+ #
711
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
712
+ #
713
+ def begin_execute_with_http_info(resource_group_name, lab_name, name, custom_headers:nil)
714
+ begin_execute_async(resource_group_name, lab_name, name, custom_headers:custom_headers).value!
715
+ end
716
+
717
+ #
718
+ # Execute a schedule. This operation can take a while to complete.
719
+ #
720
+ # @param resource_group_name [String] The name of the resource group.
721
+ # @param lab_name [String] The name of the lab.
722
+ # @param name [String] The name of the schedule.
723
+ # @param [Hash{String => String}] A hash of custom headers that will be added
724
+ # to the HTTP request.
725
+ #
726
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
727
+ #
728
+ def begin_execute_async(resource_group_name, lab_name, name, custom_headers:nil)
729
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
730
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
731
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
732
+ fail ArgumentError, 'name is nil' if name.nil?
733
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
734
+
735
+
736
+ request_headers = {}
737
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
738
+
739
+ # Set Headers
740
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
741
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
742
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/execute'
743
+
744
+ request_url = @base_url || @client.base_url
745
+
746
+ options = {
747
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
748
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
749
+ query_params: {'api-version' => @client.api_version},
750
+ headers: request_headers.merge(custom_headers || {}),
751
+ base_url: request_url
752
+ }
753
+ promise = @client.make_request_async(:post, path_template, options)
754
+
755
+ promise = promise.then do |result|
756
+ http_response = result.response
757
+ status_code = http_response.status
758
+ response_content = http_response.body
759
+ unless status_code == 200 || status_code == 202
760
+ error_model = JSON.load(response_content)
761
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
762
+ end
763
+
764
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
765
+
766
+ result
767
+ end
768
+
769
+ promise.execute
770
+ end
771
+
772
+ #
773
+ # List schedules in a given lab.
774
+ #
775
+ # @param next_page_link [String] The NextLink from the previous successful call
776
+ # to List operation.
777
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
778
+ # will be added to the HTTP request.
779
+ #
780
+ # @return [ScheduleList] operation results.
781
+ #
782
+ def list_next(next_page_link, custom_headers:nil)
783
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
784
+ response.body unless response.nil?
785
+ end
786
+
787
+ #
788
+ # List schedules in a given lab.
789
+ #
790
+ # @param next_page_link [String] The NextLink from the previous successful call
791
+ # to List operation.
792
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
793
+ # will be added to the HTTP request.
794
+ #
795
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
796
+ #
797
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
798
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
799
+ end
800
+
801
+ #
802
+ # List schedules in a given lab.
803
+ #
804
+ # @param next_page_link [String] The NextLink from the previous successful call
805
+ # to List operation.
806
+ # @param [Hash{String => String}] A hash of custom headers that will be added
807
+ # to the HTTP request.
808
+ #
809
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
810
+ #
811
+ def list_next_async(next_page_link, custom_headers:nil)
812
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
813
+
814
+
815
+ request_headers = {}
816
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
817
+
818
+ # Set Headers
819
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
820
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
821
+ path_template = '{nextLink}'
822
+
823
+ request_url = @base_url || @client.base_url
824
+
825
+ options = {
826
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
827
+ skip_encoding_path_params: {'nextLink' => next_page_link},
828
+ headers: request_headers.merge(custom_headers || {}),
829
+ base_url: request_url
830
+ }
831
+ promise = @client.make_request_async(:get, path_template, options)
832
+
833
+ promise = promise.then do |result|
834
+ http_response = result.response
835
+ status_code = http_response.status
836
+ response_content = http_response.body
837
+ unless status_code == 200
838
+ error_model = JSON.load(response_content)
839
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
840
+ end
841
+
842
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
843
+ # Deserialize Response
844
+ if status_code == 200
845
+ begin
846
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
847
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::ScheduleList.mapper()
848
+ result.body = @client.deserialize(result_mapper, parsed_response)
849
+ rescue Exception => e
850
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
851
+ end
852
+ end
853
+
854
+ result
855
+ end
856
+
857
+ promise.execute
858
+ end
859
+
860
+ #
861
+ # Lists all applicable schedules
862
+ #
863
+ # @param next_page_link [String] The NextLink from the previous successful call
864
+ # to List operation.
865
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
866
+ # will be added to the HTTP request.
867
+ #
868
+ # @return [ScheduleList] operation results.
869
+ #
870
+ def list_applicable_next(next_page_link, custom_headers:nil)
871
+ response = list_applicable_next_async(next_page_link, custom_headers:custom_headers).value!
872
+ response.body unless response.nil?
873
+ end
874
+
875
+ #
876
+ # Lists all applicable schedules
877
+ #
878
+ # @param next_page_link [String] The NextLink from the previous successful call
879
+ # to List operation.
880
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
881
+ # will be added to the HTTP request.
882
+ #
883
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
884
+ #
885
+ def list_applicable_next_with_http_info(next_page_link, custom_headers:nil)
886
+ list_applicable_next_async(next_page_link, custom_headers:custom_headers).value!
887
+ end
888
+
889
+ #
890
+ # Lists all applicable schedules
891
+ #
892
+ # @param next_page_link [String] The NextLink from the previous successful call
893
+ # to List operation.
894
+ # @param [Hash{String => String}] A hash of custom headers that will be added
895
+ # to the HTTP request.
896
+ #
897
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
898
+ #
899
+ def list_applicable_next_async(next_page_link, custom_headers:nil)
900
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
901
+
902
+
903
+ request_headers = {}
904
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
905
+
906
+ # Set Headers
907
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
908
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
909
+ path_template = '{nextLink}'
910
+
911
+ request_url = @base_url || @client.base_url
912
+
913
+ options = {
914
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
915
+ skip_encoding_path_params: {'nextLink' => next_page_link},
916
+ headers: request_headers.merge(custom_headers || {}),
917
+ base_url: request_url
918
+ }
919
+ promise = @client.make_request_async(:post, path_template, options)
920
+
921
+ promise = promise.then do |result|
922
+ http_response = result.response
923
+ status_code = http_response.status
924
+ response_content = http_response.body
925
+ unless status_code == 200
926
+ error_model = JSON.load(response_content)
927
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
928
+ end
929
+
930
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
931
+ # Deserialize Response
932
+ if status_code == 200
933
+ begin
934
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
935
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::ScheduleList.mapper()
936
+ result.body = @client.deserialize(result_mapper, parsed_response)
937
+ rescue Exception => e
938
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
939
+ end
940
+ end
941
+
942
+ result
943
+ end
944
+
945
+ promise.execute
946
+ end
947
+
948
+ #
949
+ # List schedules in a given lab.
950
+ #
951
+ # @param resource_group_name [String] The name of the resource group.
952
+ # @param lab_name [String] The name of the lab.
953
+ # @param expand [String] Specify the $expand query. Example:
954
+ # 'properties($select=status)'
955
+ # @param filter [String] The filter to apply to the operation. Example:
956
+ # '$filter=contains(name,'myName')
957
+ # @param top [Integer] The maximum number of resources to return from the
958
+ # operation. Example: '$top=10'
959
+ # @param orderby [String] The ordering expression for the results, using OData
960
+ # notation. Example: '$orderby=name desc'
961
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
962
+ # will be added to the HTTP request.
963
+ #
964
+ # @return [ScheduleList] which provide lazy access to pages of the response.
965
+ #
966
+ def list_as_lazy(resource_group_name, lab_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
967
+ response = list_async(resource_group_name, lab_name, expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers).value!
968
+ unless response.nil?
969
+ page = response.body
970
+ page.next_method = Proc.new do |next_page_link|
971
+ list_next_async(next_page_link, custom_headers:custom_headers)
972
+ end
973
+ page
974
+ end
975
+ end
976
+
977
+ #
978
+ # Lists all applicable schedules
979
+ #
980
+ # @param resource_group_name [String] The name of the resource group.
981
+ # @param lab_name [String] The name of the lab.
982
+ # @param name [String] The name of the schedule.
983
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
984
+ # will be added to the HTTP request.
985
+ #
986
+ # @return [ScheduleList] which provide lazy access to pages of the response.
987
+ #
988
+ def list_applicable_as_lazy(resource_group_name, lab_name, name, custom_headers:nil)
989
+ response = list_applicable_async(resource_group_name, lab_name, name, custom_headers:custom_headers).value!
990
+ unless response.nil?
991
+ page = response.body
992
+ page.next_method = Proc.new do |next_page_link|
993
+ list_applicable_next_async(next_page_link, custom_headers:custom_headers)
994
+ end
995
+ page
996
+ end
997
+ end
998
+
999
+ end
1000
+ end