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