azure_mgmt_devtestlabs 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_devtestlabs.rb +149 -55
  3. data/lib/generated/azure_mgmt_devtestlabs/arm_templates.rb +363 -0
  4. data/lib/generated/azure_mgmt_devtestlabs/{artifact_source_operations.rb → artifact_sources.rb} +85 -69
  5. data/lib/generated/azure_mgmt_devtestlabs/{artifact_operations.rb → artifacts.rb} +59 -43
  6. data/lib/generated/azure_mgmt_devtestlabs/costs.rb +244 -0
  7. data/lib/generated/azure_mgmt_devtestlabs/{custom_image_operations.rb → custom_images.rb} +81 -68
  8. data/lib/generated/azure_mgmt_devtestlabs/dev_test_labs_client.rb +73 -37
  9. data/lib/generated/azure_mgmt_devtestlabs/disks.rb +975 -0
  10. data/lib/generated/azure_mgmt_devtestlabs/environments.rb +672 -0
  11. data/lib/generated/azure_mgmt_devtestlabs/{formula_operations.rb → formulas.rb} +82 -64
  12. data/lib/generated/azure_mgmt_devtestlabs/{gallery_image_operations.rb → gallery_images.rb} +33 -26
  13. data/lib/generated/azure_mgmt_devtestlabs/global_schedules.rb +1121 -0
  14. data/lib/generated/azure_mgmt_devtestlabs/{lab_operations.rb → labs.rb} +439 -141
  15. data/lib/generated/azure_mgmt_devtestlabs/models/applicable_schedule.rb +105 -0
  16. data/lib/generated/azure_mgmt_devtestlabs/models/applicable_schedule_fragment.rb +105 -0
  17. data/lib/generated/azure_mgmt_devtestlabs/models/apply_artifacts_request.rb +2 -1
  18. data/lib/generated/azure_mgmt_devtestlabs/models/arm_template.rb +167 -0
  19. data/lib/generated/azure_mgmt_devtestlabs/models/arm_template_info.rb +2 -1
  20. data/lib/generated/azure_mgmt_devtestlabs/models/arm_template_parameter_properties.rb +55 -0
  21. data/lib/generated/azure_mgmt_devtestlabs/models/artifact.rb +70 -53
  22. data/lib/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties.rb +2 -1
  23. data/lib/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties_fragment.rb +68 -0
  24. data/lib/generated/azure_mgmt_devtestlabs/models/artifact_install_properties.rb +43 -1
  25. data/lib/generated/azure_mgmt_devtestlabs/models/artifact_install_properties_fragment.rb +105 -0
  26. data/lib/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties.rb +2 -1
  27. data/lib/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties_fragment.rb +55 -0
  28. data/lib/generated/azure_mgmt_devtestlabs/models/artifact_source.rb +75 -62
  29. data/lib/generated/azure_mgmt_devtestlabs/models/artifact_source_fragment.rb +185 -0
  30. data/lib/generated/azure_mgmt_devtestlabs/models/attach_disk_properties.rb +46 -0
  31. data/lib/generated/azure_mgmt_devtestlabs/models/attach_new_data_disk_options.rb +66 -0
  32. data/lib/generated/azure_mgmt_devtestlabs/models/bulk_creation_parameters.rb +45 -0
  33. data/lib/generated/azure_mgmt_devtestlabs/models/compute_data_disk.rb +76 -0
  34. data/lib/generated/azure_mgmt_devtestlabs/models/compute_data_disk_fragment.rb +76 -0
  35. data/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status.rb +65 -0
  36. data/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status_fragment.rb +65 -0
  37. data/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_properties.rb +131 -0
  38. data/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_properties_fragment.rb +131 -0
  39. data/lib/generated/azure_mgmt_devtestlabs/models/cost_threshold_properties.rb +92 -0
  40. data/lib/generated/azure_mgmt_devtestlabs/models/cost_threshold_status.rb +16 -0
  41. data/lib/generated/azure_mgmt_devtestlabs/models/{lab_cost_type.rb → cost_type.rb} +3 -3
  42. data/lib/generated/azure_mgmt_devtestlabs/models/custom_image.rb +58 -57
  43. data/lib/generated/azure_mgmt_devtestlabs/models/custom_image_os_type.rb +1 -1
  44. data/lib/generated/azure_mgmt_devtestlabs/models/custom_image_properties_custom.rb +5 -4
  45. data/lib/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_vm.rb +2 -1
  46. data/lib/generated/azure_mgmt_devtestlabs/models/data_disk_properties.rb +70 -0
  47. data/lib/generated/azure_mgmt_devtestlabs/models/day_details.rb +3 -2
  48. data/lib/generated/azure_mgmt_devtestlabs/models/{subscription_notification_properties.rb → day_details_fragment.rb} +11 -11
  49. data/lib/generated/azure_mgmt_devtestlabs/models/detach_data_disk_properties.rb +46 -0
  50. data/lib/generated/azure_mgmt_devtestlabs/models/detach_disk_properties.rb +46 -0
  51. data/lib/generated/azure_mgmt_devtestlabs/models/disk.rb +186 -0
  52. data/lib/generated/azure_mgmt_devtestlabs/models/dtl_environment.rb +146 -0
  53. data/lib/generated/azure_mgmt_devtestlabs/models/enable_status.rb +1 -1
  54. data/lib/generated/azure_mgmt_devtestlabs/models/environment_deployment_properties.rb +64 -0
  55. data/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_properties.rb +2 -1
  56. data/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_request.rb +2 -1
  57. data/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_response.rb +2 -1
  58. data/lib/generated/azure_mgmt_devtestlabs/models/event.rb +47 -0
  59. data/lib/generated/azure_mgmt_devtestlabs/models/event_fragment.rb +47 -0
  60. data/lib/generated/azure_mgmt_devtestlabs/models/export_resource_usage_parameters.rb +58 -0
  61. data/lib/generated/azure_mgmt_devtestlabs/models/external_subnet.rb +55 -0
  62. data/lib/generated/azure_mgmt_devtestlabs/models/external_subnet_fragment.rb +55 -0
  63. data/lib/generated/azure_mgmt_devtestlabs/models/file_upload_options.rb +16 -0
  64. data/lib/generated/azure_mgmt_devtestlabs/models/formula.rb +53 -61
  65. data/lib/generated/azure_mgmt_devtestlabs/models/formula_properties_from_vm.rb +2 -1
  66. data/lib/generated/azure_mgmt_devtestlabs/models/gallery_image.rb +44 -54
  67. data/lib/generated/azure_mgmt_devtestlabs/models/gallery_image_reference.rb +2 -1
  68. data/lib/generated/azure_mgmt_devtestlabs/models/gallery_image_reference_fragment.rb +85 -0
  69. data/lib/generated/azure_mgmt_devtestlabs/models/generate_arm_template_request.rb +14 -1
  70. data/lib/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_parameter.rb +2 -1
  71. data/lib/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_response.rb +2 -1
  72. data/lib/generated/azure_mgmt_devtestlabs/models/host_caching_options.rb +17 -0
  73. data/lib/generated/azure_mgmt_devtestlabs/models/hour_details.rb +2 -1
  74. data/lib/generated/azure_mgmt_devtestlabs/models/hour_details_fragment.rb +45 -0
  75. data/lib/generated/azure_mgmt_devtestlabs/models/identity_properties.rb +75 -0
  76. data/lib/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule.rb +70 -0
  77. data/lib/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule_fragment.rb +70 -0
  78. data/lib/generated/azure_mgmt_devtestlabs/models/lab.rb +85 -54
  79. data/lib/generated/azure_mgmt_devtestlabs/models/lab_cost.rb +204 -0
  80. data/lib/generated/azure_mgmt_devtestlabs/models/{cost_per_day_properties.rb → lab_cost_details_properties.rb} +7 -6
  81. data/lib/generated/azure_mgmt_devtestlabs/models/lab_cost_summary_properties.rb +45 -0
  82. data/lib/generated/azure_mgmt_devtestlabs/models/lab_fragment.rb +127 -0
  83. data/lib/generated/azure_mgmt_devtestlabs/models/{resource_cost_properties.rb → lab_resource_cost_properties.rb} +49 -28
  84. data/lib/generated/azure_mgmt_devtestlabs/models/lab_vhd.rb +3 -2
  85. data/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine.rb +141 -42
  86. data/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_creation_parameter.rb +412 -0
  87. data/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_fragment.rb +410 -0
  88. data/lib/generated/azure_mgmt_devtestlabs/models/linux_os_info.rb +5 -3
  89. data/lib/generated/azure_mgmt_devtestlabs/models/linux_os_state.rb +1 -1
  90. data/lib/generated/azure_mgmt_devtestlabs/models/network_interface_properties.rb +130 -0
  91. data/lib/generated/azure_mgmt_devtestlabs/models/network_interface_properties_fragment.rb +130 -0
  92. data/lib/generated/azure_mgmt_devtestlabs/models/notification_channel.rb +150 -0
  93. data/lib/generated/azure_mgmt_devtestlabs/models/notification_channel_event_type.rb +16 -0
  94. data/lib/generated/azure_mgmt_devtestlabs/models/{cost.rb → notification_channel_fragment.rb} +64 -64
  95. data/lib/generated/azure_mgmt_devtestlabs/models/notification_settings.rb +69 -0
  96. data/lib/generated/azure_mgmt_devtestlabs/models/notification_settings_fragment.rb +69 -0
  97. data/lib/generated/azure_mgmt_devtestlabs/models/notification_status.rb +16 -0
  98. data/lib/generated/azure_mgmt_devtestlabs/models/notify_parameters.rb +56 -0
  99. data/lib/generated/azure_mgmt_devtestlabs/models/parameter_info.rb +5 -5
  100. data/lib/generated/azure_mgmt_devtestlabs/models/parameters_value_file_info.rb +55 -0
  101. data/lib/generated/azure_mgmt_devtestlabs/models/percentage_cost_threshold_properties.rb +45 -0
  102. data/lib/generated/azure_mgmt_devtestlabs/models/policy.rb +62 -58
  103. data/lib/generated/azure_mgmt_devtestlabs/models/policy_evaluator_type.rb +1 -1
  104. data/lib/generated/azure_mgmt_devtestlabs/models/policy_fact_name.rb +4 -1
  105. data/lib/generated/azure_mgmt_devtestlabs/models/policy_fragment.rb +168 -0
  106. data/lib/generated/azure_mgmt_devtestlabs/models/policy_set_result.rb +2 -1
  107. data/lib/generated/azure_mgmt_devtestlabs/models/policy_status.rb +1 -1
  108. data/lib/generated/azure_mgmt_devtestlabs/models/policy_violation.rb +2 -1
  109. data/lib/generated/azure_mgmt_devtestlabs/models/port.rb +56 -0
  110. data/lib/generated/azure_mgmt_devtestlabs/models/port_fragment.rb +56 -0
  111. data/lib/generated/azure_mgmt_devtestlabs/models/premium_data_disk.rb +16 -0
  112. data/lib/generated/azure_mgmt_devtestlabs/models/reporting_cycle_type.rb +16 -0
  113. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_arm_template.rb +94 -0
  114. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact.rb +2 -1
  115. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact_source.rb +2 -1
  116. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_custom_image.rb +2 -1
  117. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_disk.rb +94 -0
  118. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_dtl_environment.rb +95 -0
  119. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_formula.rb +2 -1
  120. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_gallery_image.rb +2 -1
  121. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab.rb +2 -1
  122. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_vhd.rb +2 -1
  123. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_virtual_machine.rb +2 -1
  124. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_notification_channel.rb +96 -0
  125. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_policy.rb +2 -1
  126. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_schedule.rb +2 -1
  127. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_secret.rb +94 -0
  128. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_service_runner.rb +94 -0
  129. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_user.rb +94 -0
  130. data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_virtual_network.rb +2 -1
  131. data/lib/generated/azure_mgmt_devtestlabs/models/retarget_schedule_properties.rb +57 -0
  132. data/lib/generated/azure_mgmt_devtestlabs/models/schedule.rb +82 -57
  133. data/lib/generated/azure_mgmt_devtestlabs/models/schedule_fragment.rb +189 -0
  134. data/lib/generated/azure_mgmt_devtestlabs/models/secret.rb +110 -0
  135. data/lib/generated/azure_mgmt_devtestlabs/models/service_runner.rb +91 -0
  136. data/lib/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration.rb +54 -0
  137. data/lib/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration_fragment.rb +55 -0
  138. data/lib/generated/azure_mgmt_devtestlabs/models/shutdown_notification_content.rb +147 -0
  139. data/lib/generated/azure_mgmt_devtestlabs/models/source_control_type.rb +1 -1
  140. data/lib/generated/azure_mgmt_devtestlabs/models/{lab_storage_type.rb → storage_type.rb} +3 -3
  141. data/lib/generated/azure_mgmt_devtestlabs/models/subnet.rb +8 -7
  142. data/lib/generated/azure_mgmt_devtestlabs/models/subnet_fragment.rb +67 -0
  143. data/lib/generated/azure_mgmt_devtestlabs/models/subnet_override.rb +29 -6
  144. data/lib/generated/azure_mgmt_devtestlabs/models/subnet_override_fragment.rb +101 -0
  145. data/lib/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration.rb +54 -0
  146. data/lib/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.rb +55 -0
  147. data/lib/generated/azure_mgmt_devtestlabs/models/target_cost_properties.rb +105 -0
  148. data/lib/generated/azure_mgmt_devtestlabs/models/target_cost_status.rb +16 -0
  149. data/lib/generated/azure_mgmt_devtestlabs/models/transport_protocol.rb +16 -0
  150. data/lib/generated/azure_mgmt_devtestlabs/models/usage_permission_type.rb +1 -1
  151. data/lib/generated/azure_mgmt_devtestlabs/models/user.rb +133 -0
  152. data/lib/generated/azure_mgmt_devtestlabs/models/user_fragment.rb +122 -0
  153. data/lib/generated/azure_mgmt_devtestlabs/models/user_identity.rb +91 -0
  154. data/lib/generated/azure_mgmt_devtestlabs/models/user_identity_fragment.rb +91 -0
  155. data/lib/generated/azure_mgmt_devtestlabs/models/user_secret_store.rb +55 -0
  156. data/lib/generated/azure_mgmt_devtestlabs/models/user_secret_store_fragment.rb +55 -0
  157. data/lib/generated/azure_mgmt_devtestlabs/models/virtual_machine_creation_source.rb +16 -0
  158. data/lib/generated/azure_mgmt_devtestlabs/models/virtual_network.rb +77 -59
  159. data/lib/generated/azure_mgmt_devtestlabs/models/virtual_network_fragment.rb +177 -0
  160. data/lib/generated/azure_mgmt_devtestlabs/models/week_details.rb +5 -3
  161. data/lib/generated/azure_mgmt_devtestlabs/models/week_details_fragment.rb +63 -0
  162. data/lib/generated/azure_mgmt_devtestlabs/models/windows_os_info.rb +4 -2
  163. data/lib/generated/azure_mgmt_devtestlabs/models/windows_os_state.rb +1 -1
  164. data/lib/generated/azure_mgmt_devtestlabs/module_definition.rb +1 -1
  165. data/lib/generated/azure_mgmt_devtestlabs/notification_channels.rb +764 -0
  166. data/lib/generated/azure_mgmt_devtestlabs/{policy_operations.rb → policies.rb} +82 -69
  167. data/lib/generated/azure_mgmt_devtestlabs/{policy_set.rb → policy_sets.rb} +18 -16
  168. data/lib/generated/azure_mgmt_devtestlabs/{virtual_machine.rb → schedules.rb} +282 -417
  169. data/lib/generated/azure_mgmt_devtestlabs/secrets.rb +573 -0
  170. data/lib/generated/azure_mgmt_devtestlabs/service_runners.rb +545 -0
  171. data/lib/generated/azure_mgmt_devtestlabs/users.rb +704 -0
  172. data/lib/generated/azure_mgmt_devtestlabs/version.rb +2 -2
  173. data/lib/generated/azure_mgmt_devtestlabs/{schedule_operations.rb → virtual_machine_schedules.rb} +132 -92
  174. data/lib/generated/azure_mgmt_devtestlabs/virtual_machines.rb +1669 -0
  175. data/lib/generated/azure_mgmt_devtestlabs/{virtual_network_operations.rb → virtual_networks.rb} +94 -81
  176. metadata +118 -24
  177. data/lib/generated/azure_mgmt_devtestlabs/cost_operations.rb +0 -121
  178. data/lib/generated/azure_mgmt_devtestlabs/models/subscription_notification.rb +0 -68
  179. data/lib/generated/azure_mgmt_devtestlabs/models/subscription_notification_state.rb +0 -20
@@ -1,18 +1,17 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::DevTestLabs
7
7
  #
8
- # Azure DevTest Labs REST API.
8
+ # The DevTest Labs Client.
9
9
  #
10
- class LabOperations
11
- include Azure::ARM::DevTestLabs::Models
10
+ class Labs
12
11
  include MsRestAzure
13
12
 
14
13
  #
15
- # Creates and initializes a new instance of the LabOperations class.
14
+ # Creates and initializes a new instance of the Labs class.
16
15
  # @param client service class for accessing basic functionality.
17
16
  #
18
17
  def initialize(client)
@@ -25,52 +24,58 @@ module Azure::ARM::DevTestLabs
25
24
  #
26
25
  # List labs in a subscription.
27
26
  #
28
- # @param filter [String] The filter to apply on the operation.
27
+ # @param expand [String] Specify the $expand query. Example:
28
+ # 'properties($select=defaultStorageAccount)'
29
+ # @param filter [String] The filter to apply to the operation.
29
30
  # @param top [Integer] The maximum number of resources to return from the
30
31
  # operation.
31
- # @param order_by [String] The ordering expression for the results, using OData
32
+ # @param orderby [String] The ordering expression for the results, using OData
32
33
  # notation.
33
34
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
35
  # will be added to the HTTP request.
35
36
  #
36
37
  # @return [Array<Lab>] operation results.
37
38
  #
38
- def list_by_subscription(filter = nil, top = nil, order_by = nil, custom_headers = nil)
39
- first_page = list_by_subscription_as_lazy(filter, top, order_by, custom_headers)
39
+ def list_by_subscription(expand = nil, filter = nil, top = nil, orderby = nil, custom_headers = nil)
40
+ first_page = list_by_subscription_as_lazy(expand, filter, top, orderby, custom_headers)
40
41
  first_page.get_all_items
41
42
  end
42
43
 
43
44
  #
44
45
  # List labs in a subscription.
45
46
  #
46
- # @param filter [String] The filter to apply on the operation.
47
+ # @param expand [String] Specify the $expand query. Example:
48
+ # 'properties($select=defaultStorageAccount)'
49
+ # @param filter [String] The filter to apply to the operation.
47
50
  # @param top [Integer] The maximum number of resources to return from the
48
51
  # operation.
49
- # @param order_by [String] The ordering expression for the results, using OData
52
+ # @param orderby [String] The ordering expression for the results, using OData
50
53
  # notation.
51
54
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
52
55
  # will be added to the HTTP request.
53
56
  #
54
57
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
55
58
  #
56
- def list_by_subscription_with_http_info(filter = nil, top = nil, order_by = nil, custom_headers = nil)
57
- list_by_subscription_async(filter, top, order_by, custom_headers).value!
59
+ def list_by_subscription_with_http_info(expand = nil, filter = nil, top = nil, orderby = nil, custom_headers = nil)
60
+ list_by_subscription_async(expand, filter, top, orderby, custom_headers).value!
58
61
  end
59
62
 
60
63
  #
61
64
  # List labs in a subscription.
62
65
  #
63
- # @param filter [String] The filter to apply on the operation.
66
+ # @param expand [String] Specify the $expand query. Example:
67
+ # 'properties($select=defaultStorageAccount)'
68
+ # @param filter [String] The filter to apply to the operation.
64
69
  # @param top [Integer] The maximum number of resources to return from the
65
70
  # operation.
66
- # @param order_by [String] The ordering expression for the results, using OData
71
+ # @param orderby [String] The ordering expression for the results, using OData
67
72
  # notation.
68
73
  # @param [Hash{String => String}] A hash of custom headers that will be added
69
74
  # to the HTTP request.
70
75
  #
71
76
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
72
77
  #
73
- def list_by_subscription_async(filter = nil, top = nil, order_by = nil, custom_headers = nil)
78
+ def list_by_subscription_async(expand = nil, filter = nil, top = nil, orderby = nil, custom_headers = nil)
74
79
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
75
80
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
76
81
 
@@ -80,14 +85,14 @@ module Azure::ARM::DevTestLabs
80
85
  # Set Headers
81
86
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
82
87
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
83
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/labs'
88
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/labs'
84
89
 
85
90
  request_url = @base_url || @client.base_url
86
91
 
87
92
  options = {
88
93
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
89
94
  path_params: {'subscriptionId' => @client.subscription_id},
90
- query_params: {'$filter' => filter,'$top' => top,'$orderBy' => order_by,'api-version' => @client.api_version},
95
+ query_params: {'$expand' => expand,'$filter' => filter,'$top' => top,'$orderby' => orderby,'api-version' => @client.api_version},
91
96
  headers: request_headers.merge(custom_headers || {}),
92
97
  base_url: request_url
93
98
  }
@@ -107,8 +112,8 @@ module Azure::ARM::DevTestLabs
107
112
  if status_code == 200
108
113
  begin
109
114
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
110
- result_mapper = ResponseWithContinuationLab.mapper()
111
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
115
+ result_mapper = Azure::ARM::DevTestLabs::Models::ResponseWithContinuationLab.mapper()
116
+ result.body = @client.deserialize(result_mapper, parsed_response)
112
117
  rescue Exception => e
113
118
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
114
119
  end
@@ -124,18 +129,20 @@ module Azure::ARM::DevTestLabs
124
129
  # List labs in a resource group.
125
130
  #
126
131
  # @param resource_group_name [String] The name of the resource group.
127
- # @param filter [String] The filter to apply on the operation.
132
+ # @param expand [String] Specify the $expand query. Example:
133
+ # 'properties($select=defaultStorageAccount)'
134
+ # @param filter [String] The filter to apply to the operation.
128
135
  # @param top [Integer] The maximum number of resources to return from the
129
136
  # operation.
130
- # @param order_by [String] The ordering expression for the results, using OData
137
+ # @param orderby [String] The ordering expression for the results, using OData
131
138
  # notation.
132
139
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
133
140
  # will be added to the HTTP request.
134
141
  #
135
142
  # @return [Array<Lab>] operation results.
136
143
  #
137
- def list_by_resource_group(resource_group_name, filter = nil, top = nil, order_by = nil, custom_headers = nil)
138
- first_page = list_by_resource_group_as_lazy(resource_group_name, filter, top, order_by, custom_headers)
144
+ def list_by_resource_group(resource_group_name, expand = nil, filter = nil, top = nil, orderby = nil, custom_headers = nil)
145
+ first_page = list_by_resource_group_as_lazy(resource_group_name, expand, filter, top, orderby, custom_headers)
139
146
  first_page.get_all_items
140
147
  end
141
148
 
@@ -143,35 +150,39 @@ module Azure::ARM::DevTestLabs
143
150
  # List labs in a resource group.
144
151
  #
145
152
  # @param resource_group_name [String] The name of the resource group.
146
- # @param filter [String] The filter to apply on the operation.
153
+ # @param expand [String] Specify the $expand query. Example:
154
+ # 'properties($select=defaultStorageAccount)'
155
+ # @param filter [String] The filter to apply to the operation.
147
156
  # @param top [Integer] The maximum number of resources to return from the
148
157
  # operation.
149
- # @param order_by [String] The ordering expression for the results, using OData
158
+ # @param orderby [String] The ordering expression for the results, using OData
150
159
  # notation.
151
160
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
152
161
  # will be added to the HTTP request.
153
162
  #
154
163
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
155
164
  #
156
- def list_by_resource_group_with_http_info(resource_group_name, filter = nil, top = nil, order_by = nil, custom_headers = nil)
157
- list_by_resource_group_async(resource_group_name, filter, top, order_by, custom_headers).value!
165
+ def list_by_resource_group_with_http_info(resource_group_name, expand = nil, filter = nil, top = nil, orderby = nil, custom_headers = nil)
166
+ list_by_resource_group_async(resource_group_name, expand, filter, top, orderby, custom_headers).value!
158
167
  end
159
168
 
160
169
  #
161
170
  # List labs in a resource group.
162
171
  #
163
172
  # @param resource_group_name [String] The name of the resource group.
164
- # @param filter [String] The filter to apply on the operation.
173
+ # @param expand [String] Specify the $expand query. Example:
174
+ # 'properties($select=defaultStorageAccount)'
175
+ # @param filter [String] The filter to apply to the operation.
165
176
  # @param top [Integer] The maximum number of resources to return from the
166
177
  # operation.
167
- # @param order_by [String] The ordering expression for the results, using OData
178
+ # @param orderby [String] The ordering expression for the results, using OData
168
179
  # notation.
169
180
  # @param [Hash{String => String}] A hash of custom headers that will be added
170
181
  # to the HTTP request.
171
182
  #
172
183
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
173
184
  #
174
- def list_by_resource_group_async(resource_group_name, filter = nil, top = nil, order_by = nil, custom_headers = nil)
185
+ def list_by_resource_group_async(resource_group_name, expand = nil, filter = nil, top = nil, orderby = nil, custom_headers = nil)
175
186
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
176
187
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
177
188
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -182,14 +193,14 @@ module Azure::ARM::DevTestLabs
182
193
  # Set Headers
183
194
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
184
195
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
185
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs'
196
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs'
186
197
 
187
198
  request_url = @base_url || @client.base_url
188
199
 
189
200
  options = {
190
201
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
191
202
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
192
- query_params: {'$filter' => filter,'$top' => top,'$orderBy' => order_by,'api-version' => @client.api_version},
203
+ query_params: {'$expand' => expand,'$filter' => filter,'$top' => top,'$orderby' => orderby,'api-version' => @client.api_version},
193
204
  headers: request_headers.merge(custom_headers || {}),
194
205
  base_url: request_url
195
206
  }
@@ -209,8 +220,8 @@ module Azure::ARM::DevTestLabs
209
220
  if status_code == 200
210
221
  begin
211
222
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
212
- result_mapper = ResponseWithContinuationLab.mapper()
213
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
223
+ result_mapper = Azure::ARM::DevTestLabs::Models::ResponseWithContinuationLab.mapper()
224
+ result.body = @client.deserialize(result_mapper, parsed_response)
214
225
  rescue Exception => e
215
226
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
216
227
  end
@@ -227,13 +238,15 @@ module Azure::ARM::DevTestLabs
227
238
  #
228
239
  # @param resource_group_name [String] The name of the resource group.
229
240
  # @param name [String] The name of the lab.
241
+ # @param expand [String] Specify the $expand query. Example:
242
+ # 'properties($select=defaultStorageAccount)'
230
243
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
231
244
  # will be added to the HTTP request.
232
245
  #
233
246
  # @return [Lab] operation results.
234
247
  #
235
- def get_resource(resource_group_name, name, custom_headers = nil)
236
- response = get_resource_async(resource_group_name, name, custom_headers).value!
248
+ def get(resource_group_name, name, expand = nil, custom_headers = nil)
249
+ response = get_async(resource_group_name, name, expand, custom_headers).value!
237
250
  response.body unless response.nil?
238
251
  end
239
252
 
@@ -242,13 +255,15 @@ module Azure::ARM::DevTestLabs
242
255
  #
243
256
  # @param resource_group_name [String] The name of the resource group.
244
257
  # @param name [String] The name of the lab.
258
+ # @param expand [String] Specify the $expand query. Example:
259
+ # 'properties($select=defaultStorageAccount)'
245
260
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
246
261
  # will be added to the HTTP request.
247
262
  #
248
263
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
249
264
  #
250
- def get_resource_with_http_info(resource_group_name, name, custom_headers = nil)
251
- get_resource_async(resource_group_name, name, custom_headers).value!
265
+ def get_with_http_info(resource_group_name, name, expand = nil, custom_headers = nil)
266
+ get_async(resource_group_name, name, expand, custom_headers).value!
252
267
  end
253
268
 
254
269
  #
@@ -256,12 +271,14 @@ module Azure::ARM::DevTestLabs
256
271
  #
257
272
  # @param resource_group_name [String] The name of the resource group.
258
273
  # @param name [String] The name of the lab.
274
+ # @param expand [String] Specify the $expand query. Example:
275
+ # 'properties($select=defaultStorageAccount)'
259
276
  # @param [Hash{String => String}] A hash of custom headers that will be added
260
277
  # to the HTTP request.
261
278
  #
262
279
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
263
280
  #
264
- def get_resource_async(resource_group_name, name, custom_headers = nil)
281
+ def get_async(resource_group_name, name, expand = nil, custom_headers = nil)
265
282
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
266
283
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
267
284
  fail ArgumentError, 'name is nil' if name.nil?
@@ -273,14 +290,14 @@ module Azure::ARM::DevTestLabs
273
290
  # Set Headers
274
291
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
275
292
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
276
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'
293
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'
277
294
 
278
295
  request_url = @base_url || @client.base_url
279
296
 
280
297
  options = {
281
298
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
282
299
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'name' => name},
283
- query_params: {'api-version' => @client.api_version},
300
+ query_params: {'$expand' => expand,'api-version' => @client.api_version},
284
301
  headers: request_headers.merge(custom_headers || {}),
285
302
  base_url: request_url
286
303
  }
@@ -300,8 +317,8 @@ module Azure::ARM::DevTestLabs
300
317
  if status_code == 200
301
318
  begin
302
319
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
303
- result_mapper = Lab.mapper()
304
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
320
+ result_mapper = Azure::ARM::DevTestLabs::Models::Lab.mapper()
321
+ result.body = @client.deserialize(result_mapper, parsed_response)
305
322
  rescue Exception => e
306
323
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
307
324
  end
@@ -314,41 +331,41 @@ module Azure::ARM::DevTestLabs
314
331
  end
315
332
 
316
333
  #
317
- # Create or replace an existing Lab. This operation can take a while to
334
+ # Create or replace an existing lab. This operation can take a while to
318
335
  # complete.
319
336
  #
320
337
  # @param resource_group_name [String] The name of the resource group.
321
338
  # @param name [String] The name of the lab.
322
- # @param lab [Lab]
339
+ # @param lab [Lab] A lab.
323
340
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
324
341
  # will be added to the HTTP request.
325
342
  #
326
343
  # @return [Lab] operation results.
327
344
  #
328
- def create_or_update_resource(resource_group_name, name, lab, custom_headers = nil)
329
- response = create_or_update_resource_async(resource_group_name, name, lab, custom_headers).value!
345
+ def create_or_update(resource_group_name, name, lab, custom_headers = nil)
346
+ response = create_or_update_async(resource_group_name, name, lab, custom_headers).value!
330
347
  response.body unless response.nil?
331
348
  end
332
349
 
333
350
  #
334
351
  # @param resource_group_name [String] The name of the resource group.
335
352
  # @param name [String] The name of the lab.
336
- # @param lab [Lab]
353
+ # @param lab [Lab] A lab.
337
354
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
338
355
  # will be added to the HTTP request.
339
356
  #
340
357
  # @return [Concurrent::Promise] promise which provides async access to http
341
358
  # response.
342
359
  #
343
- def create_or_update_resource_async(resource_group_name, name, lab, custom_headers = nil)
360
+ def create_or_update_async(resource_group_name, name, lab, custom_headers = nil)
344
361
  # Send request
345
- promise = begin_create_or_update_resource_async(resource_group_name, name, lab, custom_headers)
362
+ promise = begin_create_or_update_async(resource_group_name, name, lab, custom_headers)
346
363
 
347
364
  promise = promise.then do |response|
348
365
  # Defining deserialization method.
349
366
  deserialize_method = lambda do |parsed_response|
350
- result_mapper = Lab.mapper()
351
- parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
367
+ result_mapper = Azure::ARM::DevTestLabs::Models::Lab.mapper()
368
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
352
369
  end
353
370
 
354
371
  # Waiting for response.
@@ -366,8 +383,8 @@ module Azure::ARM::DevTestLabs
366
383
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
367
384
  # will be added to the HTTP request.
368
385
  #
369
- def delete_resource(resource_group_name, name, custom_headers = nil)
370
- response = delete_resource_async(resource_group_name, name, custom_headers).value!
386
+ def delete(resource_group_name, name, custom_headers = nil)
387
+ response = delete_async(resource_group_name, name, custom_headers).value!
371
388
  nil
372
389
  end
373
390
 
@@ -380,9 +397,9 @@ module Azure::ARM::DevTestLabs
380
397
  # @return [Concurrent::Promise] promise which provides async access to http
381
398
  # response.
382
399
  #
383
- def delete_resource_async(resource_group_name, name, custom_headers = nil)
400
+ def delete_async(resource_group_name, name, custom_headers = nil)
384
401
  # Send request
385
- promise = begin_delete_resource_async(resource_group_name, name, custom_headers)
402
+ promise = begin_delete_async(resource_group_name, name, custom_headers)
386
403
 
387
404
  promise = promise.then do |response|
388
405
  # Defining deserialization method.
@@ -401,14 +418,14 @@ module Azure::ARM::DevTestLabs
401
418
  #
402
419
  # @param resource_group_name [String] The name of the resource group.
403
420
  # @param name [String] The name of the lab.
404
- # @param lab [Lab]
421
+ # @param lab [LabFragment] A lab.
405
422
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
406
423
  # will be added to the HTTP request.
407
424
  #
408
425
  # @return [Lab] operation results.
409
426
  #
410
- def patch_resource(resource_group_name, name, lab, custom_headers = nil)
411
- response = patch_resource_async(resource_group_name, name, lab, custom_headers).value!
427
+ def update(resource_group_name, name, lab, custom_headers = nil)
428
+ response = update_async(resource_group_name, name, lab, custom_headers).value!
412
429
  response.body unless response.nil?
413
430
  end
414
431
 
@@ -417,14 +434,14 @@ module Azure::ARM::DevTestLabs
417
434
  #
418
435
  # @param resource_group_name [String] The name of the resource group.
419
436
  # @param name [String] The name of the lab.
420
- # @param lab [Lab]
437
+ # @param lab [LabFragment] A lab.
421
438
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
422
439
  # will be added to the HTTP request.
423
440
  #
424
441
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
425
442
  #
426
- def patch_resource_with_http_info(resource_group_name, name, lab, custom_headers = nil)
427
- patch_resource_async(resource_group_name, name, lab, custom_headers).value!
443
+ def update_with_http_info(resource_group_name, name, lab, custom_headers = nil)
444
+ update_async(resource_group_name, name, lab, custom_headers).value!
428
445
  end
429
446
 
430
447
  #
@@ -432,13 +449,13 @@ module Azure::ARM::DevTestLabs
432
449
  #
433
450
  # @param resource_group_name [String] The name of the resource group.
434
451
  # @param name [String] The name of the lab.
435
- # @param lab [Lab]
452
+ # @param lab [LabFragment] A lab.
436
453
  # @param [Hash{String => String}] A hash of custom headers that will be added
437
454
  # to the HTTP request.
438
455
  #
439
456
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
440
457
  #
441
- def patch_resource_async(resource_group_name, name, lab, custom_headers = nil)
458
+ def update_async(resource_group_name, name, lab, custom_headers = nil)
442
459
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
443
460
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
444
461
  fail ArgumentError, 'name is nil' if name.nil?
@@ -455,11 +472,11 @@ module Azure::ARM::DevTestLabs
455
472
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
456
473
 
457
474
  # Serialize Request
458
- request_mapper = Lab.mapper()
459
- request_content = @client.serialize(request_mapper, lab, 'lab')
475
+ request_mapper = Azure::ARM::DevTestLabs::Models::LabFragment.mapper()
476
+ request_content = @client.serialize(request_mapper, lab)
460
477
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
461
478
 
462
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'
479
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'
463
480
 
464
481
  request_url = @base_url || @client.base_url
465
482
 
@@ -487,8 +504,8 @@ module Azure::ARM::DevTestLabs
487
504
  if status_code == 200
488
505
  begin
489
506
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
490
- result_mapper = Lab.mapper()
491
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
507
+ result_mapper = Azure::ARM::DevTestLabs::Models::Lab.mapper()
508
+ result.body = @client.deserialize(result_mapper, parsed_response)
492
509
  rescue Exception => e
493
510
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
494
511
  end
@@ -501,33 +518,119 @@ module Azure::ARM::DevTestLabs
501
518
  end
502
519
 
503
520
  #
504
- # Create virtual machines in a Lab. This operation can take a while to
521
+ # Claim a random claimable virtual machine in the lab. This operation can take
522
+ # a while to complete.
523
+ #
524
+ # @param resource_group_name [String] The name of the resource group.
525
+ # @param name [String] The name of the lab.
526
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
527
+ # will be added to the HTTP request.
528
+ #
529
+ def claim_any_vm(resource_group_name, name, custom_headers = nil)
530
+ response = claim_any_vm_async(resource_group_name, name, custom_headers).value!
531
+ nil
532
+ end
533
+
534
+ #
535
+ # @param resource_group_name [String] The name of the resource group.
536
+ # @param name [String] The name of the lab.
537
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
538
+ # will be added to the HTTP request.
539
+ #
540
+ # @return [Concurrent::Promise] promise which provides async access to http
541
+ # response.
542
+ #
543
+ def claim_any_vm_async(resource_group_name, name, custom_headers = nil)
544
+ # Send request
545
+ promise = begin_claim_any_vm_async(resource_group_name, name, custom_headers)
546
+
547
+ promise = promise.then do |response|
548
+ # Defining deserialization method.
549
+ deserialize_method = lambda do |parsed_response|
550
+ end
551
+
552
+ # Waiting for response.
553
+ @client.get_long_running_operation_result(response, deserialize_method)
554
+ end
555
+
556
+ promise
557
+ end
558
+
559
+ #
560
+ # Create virtual machines in a lab. This operation can take a while to
505
561
  # complete.
506
562
  #
507
563
  # @param resource_group_name [String] The name of the resource group.
508
564
  # @param name [String] The name of the lab.
509
- # @param lab_virtual_machine [LabVirtualMachine]
565
+ # @param lab_virtual_machine_creation_parameter
566
+ # [LabVirtualMachineCreationParameter] Properties for creating a virtual
567
+ # machine.
568
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
569
+ # will be added to the HTTP request.
570
+ #
571
+ def create_environment(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers = nil)
572
+ response = create_environment_async(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers).value!
573
+ nil
574
+ end
575
+
576
+ #
577
+ # @param resource_group_name [String] The name of the resource group.
578
+ # @param name [String] The name of the lab.
579
+ # @param lab_virtual_machine_creation_parameter
580
+ # [LabVirtualMachineCreationParameter] Properties for creating a virtual
581
+ # machine.
582
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
583
+ # will be added to the HTTP request.
584
+ #
585
+ # @return [Concurrent::Promise] promise which provides async access to http
586
+ # response.
587
+ #
588
+ def create_environment_async(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers = nil)
589
+ # Send request
590
+ promise = begin_create_environment_async(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers)
591
+
592
+ promise = promise.then do |response|
593
+ # Defining deserialization method.
594
+ deserialize_method = lambda do |parsed_response|
595
+ end
596
+
597
+ # Waiting for response.
598
+ @client.get_long_running_operation_result(response, deserialize_method)
599
+ end
600
+
601
+ promise
602
+ end
603
+
604
+ #
605
+ # Exports the lab resource usage into a storage account This operation can take
606
+ # a while to complete.
607
+ #
608
+ # @param resource_group_name [String] The name of the resource group.
609
+ # @param name [String] The name of the lab.
610
+ # @param export_resource_usage_parameters [ExportResourceUsageParameters] The
611
+ # parameters of the export operation.
510
612
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
511
613
  # will be added to the HTTP request.
512
614
  #
513
- def create_environment(resource_group_name, name, lab_virtual_machine, custom_headers = nil)
514
- response = create_environment_async(resource_group_name, name, lab_virtual_machine, custom_headers).value!
615
+ def export_resource_usage(resource_group_name, name, export_resource_usage_parameters, custom_headers = nil)
616
+ response = export_resource_usage_async(resource_group_name, name, export_resource_usage_parameters, custom_headers).value!
515
617
  nil
516
618
  end
517
619
 
518
620
  #
519
621
  # @param resource_group_name [String] The name of the resource group.
520
622
  # @param name [String] The name of the lab.
521
- # @param lab_virtual_machine [LabVirtualMachine]
623
+ # @param export_resource_usage_parameters [ExportResourceUsageParameters] The
624
+ # parameters of the export operation.
522
625
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
523
626
  # will be added to the HTTP request.
524
627
  #
525
628
  # @return [Concurrent::Promise] promise which provides async access to http
526
629
  # response.
527
630
  #
528
- def create_environment_async(resource_group_name, name, lab_virtual_machine, custom_headers = nil)
631
+ def export_resource_usage_async(resource_group_name, name, export_resource_usage_parameters, custom_headers = nil)
529
632
  # Send request
530
- promise = begin_create_environment_async(resource_group_name, name, lab_virtual_machine, custom_headers)
633
+ promise = begin_export_resource_usage_async(resource_group_name, name, export_resource_usage_parameters, custom_headers)
531
634
 
532
635
  promise = promise.then do |response|
533
636
  # Defining deserialization method.
@@ -546,7 +649,8 @@ module Azure::ARM::DevTestLabs
546
649
  #
547
650
  # @param resource_group_name [String] The name of the resource group.
548
651
  # @param name [String] The name of the lab.
549
- # @param generate_upload_uri_parameter [GenerateUploadUriParameter]
652
+ # @param generate_upload_uri_parameter [GenerateUploadUriParameter] Properties
653
+ # for generating an upload URI.
550
654
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
551
655
  # will be added to the HTTP request.
552
656
  #
@@ -562,7 +666,8 @@ module Azure::ARM::DevTestLabs
562
666
  #
563
667
  # @param resource_group_name [String] The name of the resource group.
564
668
  # @param name [String] The name of the lab.
565
- # @param generate_upload_uri_parameter [GenerateUploadUriParameter]
669
+ # @param generate_upload_uri_parameter [GenerateUploadUriParameter] Properties
670
+ # for generating an upload URI.
566
671
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
567
672
  # will be added to the HTTP request.
568
673
  #
@@ -577,7 +682,8 @@ module Azure::ARM::DevTestLabs
577
682
  #
578
683
  # @param resource_group_name [String] The name of the resource group.
579
684
  # @param name [String] The name of the lab.
580
- # @param generate_upload_uri_parameter [GenerateUploadUriParameter]
685
+ # @param generate_upload_uri_parameter [GenerateUploadUriParameter] Properties
686
+ # for generating an upload URI.
581
687
  # @param [Hash{String => String}] A hash of custom headers that will be added
582
688
  # to the HTTP request.
583
689
  #
@@ -600,11 +706,11 @@ module Azure::ARM::DevTestLabs
600
706
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
601
707
 
602
708
  # Serialize Request
603
- request_mapper = GenerateUploadUriParameter.mapper()
604
- request_content = @client.serialize(request_mapper, generate_upload_uri_parameter, 'generate_upload_uri_parameter')
709
+ request_mapper = Azure::ARM::DevTestLabs::Models::GenerateUploadUriParameter.mapper()
710
+ request_content = @client.serialize(request_mapper, generate_upload_uri_parameter)
605
711
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
606
712
 
607
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/generateUploadUri'
713
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/generateUploadUri'
608
714
 
609
715
  request_url = @base_url || @client.base_url
610
716
 
@@ -632,8 +738,8 @@ module Azure::ARM::DevTestLabs
632
738
  if status_code == 200
633
739
  begin
634
740
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
635
- result_mapper = GenerateUploadUriResponse.mapper()
636
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
741
+ result_mapper = Azure::ARM::DevTestLabs::Models::GenerateUploadUriResponse.mapper()
742
+ result.body = @client.deserialize(result_mapper, parsed_response)
637
743
  rescue Exception => e
638
744
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
639
745
  end
@@ -696,7 +802,7 @@ module Azure::ARM::DevTestLabs
696
802
  # Set Headers
697
803
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
698
804
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
699
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/listVhds'
805
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/listVhds'
700
806
 
701
807
  request_url = @base_url || @client.base_url
702
808
 
@@ -723,8 +829,8 @@ module Azure::ARM::DevTestLabs
723
829
  if status_code == 200
724
830
  begin
725
831
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
726
- result_mapper = ResponseWithContinuationLabVhd.mapper()
727
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
832
+ result_mapper = Azure::ARM::DevTestLabs::Models::ResponseWithContinuationLabVhd.mapper()
833
+ result.body = @client.deserialize(result_mapper, parsed_response)
728
834
  rescue Exception => e
729
835
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
730
836
  end
@@ -737,51 +843,51 @@ module Azure::ARM::DevTestLabs
737
843
  end
738
844
 
739
845
  #
740
- # Create or replace an existing Lab. This operation can take a while to
846
+ # Create or replace an existing lab. This operation can take a while to
741
847
  # complete.
742
848
  #
743
849
  # @param resource_group_name [String] The name of the resource group.
744
850
  # @param name [String] The name of the lab.
745
- # @param lab [Lab]
851
+ # @param lab [Lab] A lab.
746
852
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
747
853
  # will be added to the HTTP request.
748
854
  #
749
855
  # @return [Lab] operation results.
750
856
  #
751
- def begin_create_or_update_resource(resource_group_name, name, lab, custom_headers = nil)
752
- response = begin_create_or_update_resource_async(resource_group_name, name, lab, custom_headers).value!
857
+ def begin_create_or_update(resource_group_name, name, lab, custom_headers = nil)
858
+ response = begin_create_or_update_async(resource_group_name, name, lab, custom_headers).value!
753
859
  response.body unless response.nil?
754
860
  end
755
861
 
756
862
  #
757
- # Create or replace an existing Lab. This operation can take a while to
863
+ # Create or replace an existing lab. This operation can take a while to
758
864
  # complete.
759
865
  #
760
866
  # @param resource_group_name [String] The name of the resource group.
761
867
  # @param name [String] The name of the lab.
762
- # @param lab [Lab]
868
+ # @param lab [Lab] A lab.
763
869
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
764
870
  # will be added to the HTTP request.
765
871
  #
766
872
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
767
873
  #
768
- def begin_create_or_update_resource_with_http_info(resource_group_name, name, lab, custom_headers = nil)
769
- begin_create_or_update_resource_async(resource_group_name, name, lab, custom_headers).value!
874
+ def begin_create_or_update_with_http_info(resource_group_name, name, lab, custom_headers = nil)
875
+ begin_create_or_update_async(resource_group_name, name, lab, custom_headers).value!
770
876
  end
771
877
 
772
878
  #
773
- # Create or replace an existing Lab. This operation can take a while to
879
+ # Create or replace an existing lab. This operation can take a while to
774
880
  # complete.
775
881
  #
776
882
  # @param resource_group_name [String] The name of the resource group.
777
883
  # @param name [String] The name of the lab.
778
- # @param lab [Lab]
884
+ # @param lab [Lab] A lab.
779
885
  # @param [Hash{String => String}] A hash of custom headers that will be added
780
886
  # to the HTTP request.
781
887
  #
782
888
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
783
889
  #
784
- def begin_create_or_update_resource_async(resource_group_name, name, lab, custom_headers = nil)
890
+ def begin_create_or_update_async(resource_group_name, name, lab, custom_headers = nil)
785
891
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
786
892
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
787
893
  fail ArgumentError, 'name is nil' if name.nil?
@@ -798,11 +904,11 @@ module Azure::ARM::DevTestLabs
798
904
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
799
905
 
800
906
  # Serialize Request
801
- request_mapper = Lab.mapper()
802
- request_content = @client.serialize(request_mapper, lab, 'lab')
907
+ request_mapper = Azure::ARM::DevTestLabs::Models::Lab.mapper()
908
+ request_content = @client.serialize(request_mapper, lab)
803
909
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
804
910
 
805
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'
911
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'
806
912
 
807
913
  request_url = @base_url || @client.base_url
808
914
 
@@ -830,8 +936,8 @@ module Azure::ARM::DevTestLabs
830
936
  if status_code == 200
831
937
  begin
832
938
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
833
- result_mapper = Lab.mapper()
834
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
939
+ result_mapper = Azure::ARM::DevTestLabs::Models::Lab.mapper()
940
+ result.body = @client.deserialize(result_mapper, parsed_response)
835
941
  rescue Exception => e
836
942
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
837
943
  end
@@ -840,8 +946,8 @@ module Azure::ARM::DevTestLabs
840
946
  if status_code == 201
841
947
  begin
842
948
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
843
- result_mapper = Lab.mapper()
844
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
949
+ result_mapper = Azure::ARM::DevTestLabs::Models::Lab.mapper()
950
+ result.body = @client.deserialize(result_mapper, parsed_response)
845
951
  rescue Exception => e
846
952
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
847
953
  end
@@ -862,8 +968,8 @@ module Azure::ARM::DevTestLabs
862
968
  # will be added to the HTTP request.
863
969
  #
864
970
  #
865
- def begin_delete_resource(resource_group_name, name, custom_headers = nil)
866
- response = begin_delete_resource_async(resource_group_name, name, custom_headers).value!
971
+ def begin_delete(resource_group_name, name, custom_headers = nil)
972
+ response = begin_delete_async(resource_group_name, name, custom_headers).value!
867
973
  nil
868
974
  end
869
975
 
@@ -877,8 +983,8 @@ module Azure::ARM::DevTestLabs
877
983
  #
878
984
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
879
985
  #
880
- def begin_delete_resource_with_http_info(resource_group_name, name, custom_headers = nil)
881
- begin_delete_resource_async(resource_group_name, name, custom_headers).value!
986
+ def begin_delete_with_http_info(resource_group_name, name, custom_headers = nil)
987
+ begin_delete_async(resource_group_name, name, custom_headers).value!
882
988
  end
883
989
 
884
990
  #
@@ -891,7 +997,7 @@ module Azure::ARM::DevTestLabs
891
997
  #
892
998
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
893
999
  #
894
- def begin_delete_resource_async(resource_group_name, name, custom_headers = nil)
1000
+ def begin_delete_async(resource_group_name, name, custom_headers = nil)
895
1001
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
896
1002
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
897
1003
  fail ArgumentError, 'name is nil' if name.nil?
@@ -903,7 +1009,7 @@ module Azure::ARM::DevTestLabs
903
1009
  # Set Headers
904
1010
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
905
1011
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
906
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'
1012
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'
907
1013
 
908
1014
  request_url = @base_url || @client.base_url
909
1015
 
@@ -934,54 +1040,242 @@ module Azure::ARM::DevTestLabs
934
1040
  end
935
1041
 
936
1042
  #
937
- # Create virtual machines in a Lab. This operation can take a while to
1043
+ # Claim a random claimable virtual machine in the lab. This operation can take
1044
+ # a while to complete.
1045
+ #
1046
+ # @param resource_group_name [String] The name of the resource group.
1047
+ # @param name [String] The name of the lab.
1048
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1049
+ # will be added to the HTTP request.
1050
+ #
1051
+ #
1052
+ def begin_claim_any_vm(resource_group_name, name, custom_headers = nil)
1053
+ response = begin_claim_any_vm_async(resource_group_name, name, custom_headers).value!
1054
+ nil
1055
+ end
1056
+
1057
+ #
1058
+ # Claim a random claimable virtual machine in the lab. This operation can take
1059
+ # a while to complete.
1060
+ #
1061
+ # @param resource_group_name [String] The name of the resource group.
1062
+ # @param name [String] The name of the lab.
1063
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1064
+ # will be added to the HTTP request.
1065
+ #
1066
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1067
+ #
1068
+ def begin_claim_any_vm_with_http_info(resource_group_name, name, custom_headers = nil)
1069
+ begin_claim_any_vm_async(resource_group_name, name, custom_headers).value!
1070
+ end
1071
+
1072
+ #
1073
+ # Claim a random claimable virtual machine in the lab. This operation can take
1074
+ # a while to complete.
1075
+ #
1076
+ # @param resource_group_name [String] The name of the resource group.
1077
+ # @param name [String] The name of the lab.
1078
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1079
+ # to the HTTP request.
1080
+ #
1081
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1082
+ #
1083
+ def begin_claim_any_vm_async(resource_group_name, name, custom_headers = nil)
1084
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1085
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1086
+ fail ArgumentError, 'name is nil' if name.nil?
1087
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1088
+
1089
+
1090
+ request_headers = {}
1091
+
1092
+ # Set Headers
1093
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1094
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1095
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/claimAnyVm'
1096
+
1097
+ request_url = @base_url || @client.base_url
1098
+
1099
+ options = {
1100
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1101
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'name' => name},
1102
+ query_params: {'api-version' => @client.api_version},
1103
+ headers: request_headers.merge(custom_headers || {}),
1104
+ base_url: request_url
1105
+ }
1106
+ promise = @client.make_request_async(:post, path_template, options)
1107
+
1108
+ promise = promise.then do |result|
1109
+ http_response = result.response
1110
+ status_code = http_response.status
1111
+ response_content = http_response.body
1112
+ unless status_code == 200 || status_code == 202
1113
+ error_model = JSON.load(response_content)
1114
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1115
+ end
1116
+
1117
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1118
+
1119
+ result
1120
+ end
1121
+
1122
+ promise.execute
1123
+ end
1124
+
1125
+ #
1126
+ # Create virtual machines in a lab. This operation can take a while to
938
1127
  # complete.
939
1128
  #
940
1129
  # @param resource_group_name [String] The name of the resource group.
941
1130
  # @param name [String] The name of the lab.
942
- # @param lab_virtual_machine [LabVirtualMachine]
1131
+ # @param lab_virtual_machine_creation_parameter
1132
+ # [LabVirtualMachineCreationParameter] Properties for creating a virtual
1133
+ # machine.
943
1134
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
944
1135
  # will be added to the HTTP request.
945
1136
  #
946
1137
  #
947
- def begin_create_environment(resource_group_name, name, lab_virtual_machine, custom_headers = nil)
948
- response = begin_create_environment_async(resource_group_name, name, lab_virtual_machine, custom_headers).value!
1138
+ def begin_create_environment(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers = nil)
1139
+ response = begin_create_environment_async(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers).value!
949
1140
  nil
950
1141
  end
951
1142
 
952
1143
  #
953
- # Create virtual machines in a Lab. This operation can take a while to
1144
+ # Create virtual machines in a lab. This operation can take a while to
954
1145
  # complete.
955
1146
  #
956
1147
  # @param resource_group_name [String] The name of the resource group.
957
1148
  # @param name [String] The name of the lab.
958
- # @param lab_virtual_machine [LabVirtualMachine]
1149
+ # @param lab_virtual_machine_creation_parameter
1150
+ # [LabVirtualMachineCreationParameter] Properties for creating a virtual
1151
+ # machine.
959
1152
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
960
1153
  # will be added to the HTTP request.
961
1154
  #
962
1155
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
963
1156
  #
964
- def begin_create_environment_with_http_info(resource_group_name, name, lab_virtual_machine, custom_headers = nil)
965
- begin_create_environment_async(resource_group_name, name, lab_virtual_machine, custom_headers).value!
1157
+ def begin_create_environment_with_http_info(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers = nil)
1158
+ begin_create_environment_async(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers).value!
966
1159
  end
967
1160
 
968
1161
  #
969
- # Create virtual machines in a Lab. This operation can take a while to
1162
+ # Create virtual machines in a lab. This operation can take a while to
970
1163
  # complete.
971
1164
  #
972
1165
  # @param resource_group_name [String] The name of the resource group.
973
1166
  # @param name [String] The name of the lab.
974
- # @param lab_virtual_machine [LabVirtualMachine]
1167
+ # @param lab_virtual_machine_creation_parameter
1168
+ # [LabVirtualMachineCreationParameter] Properties for creating a virtual
1169
+ # machine.
1170
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1171
+ # to the HTTP request.
1172
+ #
1173
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1174
+ #
1175
+ def begin_create_environment_async(resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers = nil)
1176
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1177
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1178
+ fail ArgumentError, 'name is nil' if name.nil?
1179
+ fail ArgumentError, 'lab_virtual_machine_creation_parameter is nil' if lab_virtual_machine_creation_parameter.nil?
1180
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1181
+
1182
+
1183
+ request_headers = {}
1184
+
1185
+ # Set Headers
1186
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1187
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1188
+
1189
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1190
+
1191
+ # Serialize Request
1192
+ request_mapper = Azure::ARM::DevTestLabs::Models::LabVirtualMachineCreationParameter.mapper()
1193
+ request_content = @client.serialize(request_mapper, lab_virtual_machine_creation_parameter)
1194
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1195
+
1196
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/createEnvironment'
1197
+
1198
+ request_url = @base_url || @client.base_url
1199
+
1200
+ options = {
1201
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1202
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'name' => name},
1203
+ query_params: {'api-version' => @client.api_version},
1204
+ body: request_content,
1205
+ headers: request_headers.merge(custom_headers || {}),
1206
+ base_url: request_url
1207
+ }
1208
+ promise = @client.make_request_async(:post, path_template, options)
1209
+
1210
+ promise = promise.then do |result|
1211
+ http_response = result.response
1212
+ status_code = http_response.status
1213
+ response_content = http_response.body
1214
+ unless status_code == 200 || status_code == 202
1215
+ error_model = JSON.load(response_content)
1216
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1217
+ end
1218
+
1219
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1220
+
1221
+ result
1222
+ end
1223
+
1224
+ promise.execute
1225
+ end
1226
+
1227
+ #
1228
+ # Exports the lab resource usage into a storage account This operation can take
1229
+ # a while to complete.
1230
+ #
1231
+ # @param resource_group_name [String] The name of the resource group.
1232
+ # @param name [String] The name of the lab.
1233
+ # @param export_resource_usage_parameters [ExportResourceUsageParameters] The
1234
+ # parameters of the export operation.
1235
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1236
+ # will be added to the HTTP request.
1237
+ #
1238
+ #
1239
+ def begin_export_resource_usage(resource_group_name, name, export_resource_usage_parameters, custom_headers = nil)
1240
+ response = begin_export_resource_usage_async(resource_group_name, name, export_resource_usage_parameters, custom_headers).value!
1241
+ nil
1242
+ end
1243
+
1244
+ #
1245
+ # Exports the lab resource usage into a storage account This operation can take
1246
+ # a while to complete.
1247
+ #
1248
+ # @param resource_group_name [String] The name of the resource group.
1249
+ # @param name [String] The name of the lab.
1250
+ # @param export_resource_usage_parameters [ExportResourceUsageParameters] The
1251
+ # parameters of the export operation.
1252
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1253
+ # will be added to the HTTP request.
1254
+ #
1255
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1256
+ #
1257
+ def begin_export_resource_usage_with_http_info(resource_group_name, name, export_resource_usage_parameters, custom_headers = nil)
1258
+ begin_export_resource_usage_async(resource_group_name, name, export_resource_usage_parameters, custom_headers).value!
1259
+ end
1260
+
1261
+ #
1262
+ # Exports the lab resource usage into a storage account This operation can take
1263
+ # a while to complete.
1264
+ #
1265
+ # @param resource_group_name [String] The name of the resource group.
1266
+ # @param name [String] The name of the lab.
1267
+ # @param export_resource_usage_parameters [ExportResourceUsageParameters] The
1268
+ # parameters of the export operation.
975
1269
  # @param [Hash{String => String}] A hash of custom headers that will be added
976
1270
  # to the HTTP request.
977
1271
  #
978
1272
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
979
1273
  #
980
- def begin_create_environment_async(resource_group_name, name, lab_virtual_machine, custom_headers = nil)
1274
+ def begin_export_resource_usage_async(resource_group_name, name, export_resource_usage_parameters, custom_headers = nil)
981
1275
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
982
1276
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
983
1277
  fail ArgumentError, 'name is nil' if name.nil?
984
- fail ArgumentError, 'lab_virtual_machine is nil' if lab_virtual_machine.nil?
1278
+ fail ArgumentError, 'export_resource_usage_parameters is nil' if export_resource_usage_parameters.nil?
985
1279
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
986
1280
 
987
1281
 
@@ -994,11 +1288,11 @@ module Azure::ARM::DevTestLabs
994
1288
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
995
1289
 
996
1290
  # Serialize Request
997
- request_mapper = LabVirtualMachine.mapper()
998
- request_content = @client.serialize(request_mapper, lab_virtual_machine, 'lab_virtual_machine')
1291
+ request_mapper = Azure::ARM::DevTestLabs::Models::ExportResourceUsageParameters.mapper()
1292
+ request_content = @client.serialize(request_mapper, export_resource_usage_parameters)
999
1293
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1000
1294
 
1001
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/createEnvironment'
1295
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/exportResourceUsage'
1002
1296
 
1003
1297
  request_url = @base_url || @client.base_url
1004
1298
 
@@ -1103,8 +1397,8 @@ module Azure::ARM::DevTestLabs
1103
1397
  if status_code == 200
1104
1398
  begin
1105
1399
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1106
- result_mapper = ResponseWithContinuationLab.mapper()
1107
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1400
+ result_mapper = Azure::ARM::DevTestLabs::Models::ResponseWithContinuationLab.mapper()
1401
+ result.body = @client.deserialize(result_mapper, parsed_response)
1108
1402
  rescue Exception => e
1109
1403
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1110
1404
  end
@@ -1190,8 +1484,8 @@ module Azure::ARM::DevTestLabs
1190
1484
  if status_code == 200
1191
1485
  begin
1192
1486
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1193
- result_mapper = ResponseWithContinuationLab.mapper()
1194
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1487
+ result_mapper = Azure::ARM::DevTestLabs::Models::ResponseWithContinuationLab.mapper()
1488
+ result.body = @client.deserialize(result_mapper, parsed_response)
1195
1489
  rescue Exception => e
1196
1490
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1197
1491
  end
@@ -1277,8 +1571,8 @@ module Azure::ARM::DevTestLabs
1277
1571
  if status_code == 200
1278
1572
  begin
1279
1573
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1280
- result_mapper = ResponseWithContinuationLabVhd.mapper()
1281
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1574
+ result_mapper = Azure::ARM::DevTestLabs::Models::ResponseWithContinuationLabVhd.mapper()
1575
+ result.body = @client.deserialize(result_mapper, parsed_response)
1282
1576
  rescue Exception => e
1283
1577
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1284
1578
  end
@@ -1293,10 +1587,12 @@ module Azure::ARM::DevTestLabs
1293
1587
  #
1294
1588
  # List labs in a subscription.
1295
1589
  #
1296
- # @param filter [String] The filter to apply on the operation.
1590
+ # @param expand [String] Specify the $expand query. Example:
1591
+ # 'properties($select=defaultStorageAccount)'
1592
+ # @param filter [String] The filter to apply to the operation.
1297
1593
  # @param top [Integer] The maximum number of resources to return from the
1298
1594
  # operation.
1299
- # @param order_by [String] The ordering expression for the results, using OData
1595
+ # @param orderby [String] The ordering expression for the results, using OData
1300
1596
  # notation.
1301
1597
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1302
1598
  # will be added to the HTTP request.
@@ -1304,8 +1600,8 @@ module Azure::ARM::DevTestLabs
1304
1600
  # @return [ResponseWithContinuationLab] which provide lazy access to pages of
1305
1601
  # the response.
1306
1602
  #
1307
- def list_by_subscription_as_lazy(filter = nil, top = nil, order_by = nil, custom_headers = nil)
1308
- response = list_by_subscription_async(filter, top, order_by, custom_headers).value!
1603
+ def list_by_subscription_as_lazy(expand = nil, filter = nil, top = nil, orderby = nil, custom_headers = nil)
1604
+ response = list_by_subscription_async(expand, filter, top, orderby, custom_headers).value!
1309
1605
  unless response.nil?
1310
1606
  page = response.body
1311
1607
  page.next_method = Proc.new do |next_page_link|
@@ -1319,10 +1615,12 @@ module Azure::ARM::DevTestLabs
1319
1615
  # List labs in a resource group.
1320
1616
  #
1321
1617
  # @param resource_group_name [String] The name of the resource group.
1322
- # @param filter [String] The filter to apply on the operation.
1618
+ # @param expand [String] Specify the $expand query. Example:
1619
+ # 'properties($select=defaultStorageAccount)'
1620
+ # @param filter [String] The filter to apply to the operation.
1323
1621
  # @param top [Integer] The maximum number of resources to return from the
1324
1622
  # operation.
1325
- # @param order_by [String] The ordering expression for the results, using OData
1623
+ # @param orderby [String] The ordering expression for the results, using OData
1326
1624
  # notation.
1327
1625
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1328
1626
  # will be added to the HTTP request.
@@ -1330,8 +1628,8 @@ module Azure::ARM::DevTestLabs
1330
1628
  # @return [ResponseWithContinuationLab] which provide lazy access to pages of
1331
1629
  # the response.
1332
1630
  #
1333
- def list_by_resource_group_as_lazy(resource_group_name, filter = nil, top = nil, order_by = nil, custom_headers = nil)
1334
- response = list_by_resource_group_async(resource_group_name, filter, top, order_by, custom_headers).value!
1631
+ def list_by_resource_group_as_lazy(resource_group_name, expand = nil, filter = nil, top = nil, orderby = nil, custom_headers = nil)
1632
+ response = list_by_resource_group_async(resource_group_name, expand, filter, top, orderby, custom_headers).value!
1335
1633
  unless response.nil?
1336
1634
  page = response.body
1337
1635
  page.next_method = Proc.new do |next_page_link|