azure_mgmt_resources 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +5 -13
  2. data/azure_mgmt_resources.gemspec +4 -4
  3. data/lib/azure_mgmt_resources.rb +3 -73
  4. data/lib/generated/azure_mgmt_resources.rb +77 -0
  5. data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/deployment_operations.rb +39 -15
  6. data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/deployments.rb +113 -60
  7. data/lib/generated/azure_mgmt_resources/models/alias_path_type.rb +61 -0
  8. data/lib/generated/azure_mgmt_resources/models/alias_type.rb +62 -0
  9. data/lib/generated/azure_mgmt_resources/models/basic_dependency.rb +64 -0
  10. data/lib/generated/azure_mgmt_resources/models/debug_setting.rb +44 -0
  11. data/lib/generated/azure_mgmt_resources/models/dependency.rb +82 -0
  12. data/lib/generated/azure_mgmt_resources/models/deployment.rb +45 -0
  13. data/lib/generated/azure_mgmt_resources/models/deployment_export_result.rb +44 -0
  14. data/lib/generated/azure_mgmt_resources/models/deployment_extended.rb +65 -0
  15. data/lib/generated/azure_mgmt_resources/models/deployment_extended_filter.rb +44 -0
  16. data/lib/generated/azure_mgmt_resources/models/deployment_list_result.rb +93 -0
  17. data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/models/deployment_mode.rb +0 -0
  18. data/lib/generated/azure_mgmt_resources/models/deployment_operation.rb +65 -0
  19. data/lib/generated/azure_mgmt_resources/models/deployment_operation_properties.rb +117 -0
  20. data/lib/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb +93 -0
  21. data/lib/generated/azure_mgmt_resources/models/deployment_properties.rb +103 -0
  22. data/lib/generated/azure_mgmt_resources/models/deployment_properties_extended.rb +179 -0
  23. data/lib/generated/azure_mgmt_resources/models/deployment_validate_result.rb +57 -0
  24. data/lib/generated/azure_mgmt_resources/models/export_template_request.rb +65 -0
  25. data/lib/generated/azure_mgmt_resources/models/generic_resource.rb +142 -0
  26. data/lib/generated/azure_mgmt_resources/models/generic_resource_filter.rb +64 -0
  27. data/lib/generated/azure_mgmt_resources/models/http_message.rb +44 -0
  28. data/lib/generated/azure_mgmt_resources/models/identity.rb +68 -0
  29. data/lib/generated/azure_mgmt_resources/models/parameters_link.rb +55 -0
  30. data/lib/generated/azure_mgmt_resources/models/plan.rb +74 -0
  31. data/lib/generated/azure_mgmt_resources/models/provider.rb +83 -0
  32. data/lib/generated/azure_mgmt_resources/models/provider_list_result.rb +93 -0
  33. data/lib/generated/azure_mgmt_resources/models/provider_resource_type.rb +115 -0
  34. data/lib/generated/azure_mgmt_resources/models/resource_group.rb +97 -0
  35. data/lib/generated/azure_mgmt_resources/models/resource_group_export_result.rb +55 -0
  36. data/lib/generated/azure_mgmt_resources/models/resource_group_filter.rb +54 -0
  37. data/lib/generated/azure_mgmt_resources/models/resource_group_list_result.rb +93 -0
  38. data/lib/generated/azure_mgmt_resources/models/resource_group_properties.rb +45 -0
  39. data/lib/generated/azure_mgmt_resources/models/resource_identity_type.rb +15 -0
  40. data/lib/generated/azure_mgmt_resources/models/resource_list_result.rb +93 -0
  41. data/lib/generated/azure_mgmt_resources/models/resource_management_error_with_details.rb +82 -0
  42. data/lib/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +85 -0
  43. data/lib/generated/azure_mgmt_resources/models/resources_move_info.rb +61 -0
  44. data/lib/generated/azure_mgmt_resources/models/sku.rb +94 -0
  45. data/lib/generated/azure_mgmt_resources/models/tag_count.rb +54 -0
  46. data/lib/generated/azure_mgmt_resources/models/tag_details.rb +83 -0
  47. data/lib/generated/azure_mgmt_resources/models/tag_value.rb +65 -0
  48. data/lib/generated/azure_mgmt_resources/models/tags_list_result.rb +93 -0
  49. data/lib/generated/azure_mgmt_resources/models/target_resource.rb +64 -0
  50. data/lib/generated/azure_mgmt_resources/models/template_link.rb +55 -0
  51. data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/module_definition.rb +0 -0
  52. data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/providers.rb +70 -34
  53. data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/resource_groups.rb +136 -68
  54. data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/resource_management_client.rb +8 -12
  55. data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/resources.rb +88 -43
  56. data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/tags.rb +46 -27
  57. data/lib/{azure_mgmt_resources → generated/azure_mgmt_resources}/version.rb +1 -1
  58. metadata +76 -78
  59. data/lib/azure_mgmt_resources/models/basic_dependency.rb +0 -74
  60. data/lib/azure_mgmt_resources/models/debug_setting.rb +0 -56
  61. data/lib/azure_mgmt_resources/models/dependency.rb +0 -103
  62. data/lib/azure_mgmt_resources/models/deployment.rb +0 -62
  63. data/lib/azure_mgmt_resources/models/deployment_export_result.rb +0 -56
  64. data/lib/azure_mgmt_resources/models/deployment_extended.rb +0 -82
  65. data/lib/azure_mgmt_resources/models/deployment_extended_filter.rb +0 -56
  66. data/lib/azure_mgmt_resources/models/deployment_list_result.rb +0 -86
  67. data/lib/azure_mgmt_resources/models/deployment_operation.rb +0 -81
  68. data/lib/azure_mgmt_resources/models/deployment_operation_properties.rb +0 -141
  69. data/lib/azure_mgmt_resources/models/deployment_operations_list_result.rb +0 -86
  70. data/lib/azure_mgmt_resources/models/deployment_properties.rb +0 -131
  71. data/lib/azure_mgmt_resources/models/deployment_properties_extended.rb +0 -231
  72. data/lib/azure_mgmt_resources/models/deployment_validate_result.rb +0 -80
  73. data/lib/azure_mgmt_resources/models/export_template_request.rb +0 -69
  74. data/lib/azure_mgmt_resources/models/generic_resource.rb +0 -101
  75. data/lib/azure_mgmt_resources/models/generic_resource_filter.rb +0 -74
  76. data/lib/azure_mgmt_resources/models/http_message.rb +0 -56
  77. data/lib/azure_mgmt_resources/models/parameters_link.rb +0 -66
  78. data/lib/azure_mgmt_resources/models/plan.rb +0 -83
  79. data/lib/azure_mgmt_resources/models/provider.rb +0 -104
  80. data/lib/azure_mgmt_resources/models/provider_list_result.rb +0 -85
  81. data/lib/azure_mgmt_resources/models/provider_resource_type.rb +0 -86
  82. data/lib/azure_mgmt_resources/models/resource_group.rb +0 -104
  83. data/lib/azure_mgmt_resources/models/resource_group_export_result.rb +0 -71
  84. data/lib/azure_mgmt_resources/models/resource_group_filter.rb +0 -65
  85. data/lib/azure_mgmt_resources/models/resource_group_list_result.rb +0 -87
  86. data/lib/azure_mgmt_resources/models/resource_group_properties.rb +0 -56
  87. data/lib/azure_mgmt_resources/models/resource_list_result.rb +0 -87
  88. data/lib/azure_mgmt_resources/models/resource_management_error_with_details.rb +0 -107
  89. data/lib/azure_mgmt_resources/models/resource_provider_operation_definition.rb +0 -72
  90. data/lib/azure_mgmt_resources/models/resource_provider_operation_detail_list_result.rb +0 -78
  91. data/lib/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +0 -93
  92. data/lib/azure_mgmt_resources/models/resources_move_info.rb +0 -65
  93. data/lib/azure_mgmt_resources/models/tag_count.rb +0 -65
  94. data/lib/azure_mgmt_resources/models/tag_details.rb +0 -110
  95. data/lib/azure_mgmt_resources/models/tag_value.rb +0 -80
  96. data/lib/azure_mgmt_resources/models/tags_list_result.rb +0 -86
  97. data/lib/azure_mgmt_resources/models/target_resource.rb +0 -74
  98. data/lib/azure_mgmt_resources/models/template_link.rb +0 -66
  99. data/lib/azure_mgmt_resources/resource_provider_operation_details.rb +0 -233
@@ -0,0 +1,65 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Resources
7
+ module Models
8
+ #
9
+ # Tag information.
10
+ #
11
+ class TagValue
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The tag ID.
16
+ attr_accessor :id
17
+
18
+ # @return [String] The tag value.
19
+ attr_accessor :tag_value
20
+
21
+ # @return [TagCount] The tag value count.
22
+ attr_accessor :count
23
+
24
+
25
+ #
26
+ # Mapper for TagValue class as Ruby Hash.
27
+ # This will be used for serialization/deserialization.
28
+ #
29
+ def self.mapper()
30
+ {
31
+ required: false,
32
+ serialized_name: 'TagValue',
33
+ type: {
34
+ name: 'Composite',
35
+ class_name: 'TagValue',
36
+ model_properties: {
37
+ id: {
38
+ required: false,
39
+ serialized_name: 'id',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ tag_value: {
45
+ required: false,
46
+ serialized_name: 'tagValue',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ },
51
+ count: {
52
+ required: false,
53
+ serialized_name: 'count',
54
+ type: {
55
+ name: 'Composite',
56
+ class_name: 'TagCount'
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,93 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Resources
7
+ module Models
8
+ #
9
+ # List of subscription tags.
10
+ #
11
+ class TagsListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<TagDetails>] The list of tags.
16
+ attr_accessor :value
17
+
18
+ # @return [String] The URL to get the next set of results.
19
+ attr_accessor :next_link
20
+
21
+ # return [Proc] with next page method call.
22
+ attr_accessor :next_method
23
+
24
+ #
25
+ # Gets the rest of the items for the request, enabling auto-pagination.
26
+ #
27
+ # @return [Array<TagDetails>] operation results.
28
+ #
29
+ def get_all_items
30
+ items = @value
31
+ page = self
32
+ while page.next_link != nil do
33
+ page = page.get_next_page
34
+ items.concat(page.value)
35
+ end
36
+ items
37
+ end
38
+
39
+ #
40
+ # Gets the next page of results.
41
+ #
42
+ # @return [TagsListResult] with next page content.
43
+ #
44
+ def get_next_page
45
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
46
+ unless response.nil?
47
+ @next_link = response.body.next_link
48
+ @value = response.body.value
49
+ self
50
+ end
51
+ end
52
+
53
+ #
54
+ # Mapper for TagsListResult class as Ruby Hash.
55
+ # This will be used for serialization/deserialization.
56
+ #
57
+ def self.mapper()
58
+ {
59
+ required: false,
60
+ serialized_name: 'TagsListResult',
61
+ type: {
62
+ name: 'Composite',
63
+ class_name: 'TagsListResult',
64
+ model_properties: {
65
+ value: {
66
+ required: false,
67
+ serialized_name: 'value',
68
+ type: {
69
+ name: 'Sequence',
70
+ element: {
71
+ required: false,
72
+ serialized_name: 'TagDetailsElementType',
73
+ type: {
74
+ name: 'Composite',
75
+ class_name: 'TagDetails'
76
+ }
77
+ }
78
+ }
79
+ },
80
+ next_link: {
81
+ required: true,
82
+ serialized_name: 'nextLink',
83
+ type: {
84
+ name: 'String'
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ end
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,64 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Resources
7
+ module Models
8
+ #
9
+ # Target resource.
10
+ #
11
+ class TargetResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The ID of the resource.
16
+ attr_accessor :id
17
+
18
+ # @return [String] The name of the resource.
19
+ attr_accessor :resource_name
20
+
21
+ # @return [String] The type of the resource.
22
+ attr_accessor :resource_type
23
+
24
+
25
+ #
26
+ # Mapper for TargetResource class as Ruby Hash.
27
+ # This will be used for serialization/deserialization.
28
+ #
29
+ def self.mapper()
30
+ {
31
+ required: false,
32
+ serialized_name: 'TargetResource',
33
+ type: {
34
+ name: 'Composite',
35
+ class_name: 'TargetResource',
36
+ model_properties: {
37
+ id: {
38
+ required: false,
39
+ serialized_name: 'id',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ resource_name: {
45
+ required: false,
46
+ serialized_name: 'resourceName',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ },
51
+ resource_type: {
52
+ required: false,
53
+ serialized_name: 'resourceType',
54
+ type: {
55
+ name: 'String'
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,55 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Resources
7
+ module Models
8
+ #
9
+ # Entity representing the reference to the template.
10
+ #
11
+ class TemplateLink
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] URI referencing the template.
16
+ attr_accessor :uri
17
+
18
+ # @return [String] If included it must match the ContentVersion in the
19
+ # template.
20
+ attr_accessor :content_version
21
+
22
+
23
+ #
24
+ # Mapper for TemplateLink class as Ruby Hash.
25
+ # This will be used for serialization/deserialization.
26
+ #
27
+ def self.mapper()
28
+ {
29
+ required: false,
30
+ serialized_name: 'TemplateLink',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'TemplateLink',
34
+ model_properties: {
35
+ uri: {
36
+ required: true,
37
+ serialized_name: 'uri',
38
+ type: {
39
+ name: 'String'
40
+ }
41
+ },
42
+ content_version: {
43
+ required: false,
44
+ serialized_name: 'contentVersion',
45
+ type: {
46
+ name: 'String'
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ end
53
+ end
54
+ end
55
+ end
@@ -65,6 +65,8 @@ module Azure::ARM::Resources
65
65
  fail ArgumentError, 'resource_provider_namespace is nil' if resource_provider_namespace.nil?
66
66
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
67
67
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
68
+
69
+
68
70
  request_headers = {}
69
71
 
70
72
  # Set Headers
@@ -100,10 +102,8 @@ module Azure::ARM::Resources
100
102
  if status_code == 200
101
103
  begin
102
104
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
103
- unless parsed_response.nil?
104
- parsed_response = Provider.deserialize_object(parsed_response)
105
- end
106
- result.body = parsed_response
105
+ result_mapper = Provider.mapper()
106
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
107
107
  rescue Exception => e
108
108
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
109
109
  end
@@ -158,6 +158,8 @@ module Azure::ARM::Resources
158
158
  fail ArgumentError, 'resource_provider_namespace is nil' if resource_provider_namespace.nil?
159
159
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
160
160
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
161
+
162
+
161
163
  request_headers = {}
162
164
 
163
165
  # Set Headers
@@ -193,10 +195,8 @@ module Azure::ARM::Resources
193
195
  if status_code == 200
194
196
  begin
195
197
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
196
- unless parsed_response.nil?
197
- parsed_response = Provider.deserialize_object(parsed_response)
198
- end
199
- result.body = parsed_response
198
+ result_mapper = Provider.mapper()
199
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
200
200
  rescue Exception => e
201
201
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
202
202
  end
@@ -213,14 +213,40 @@ module Azure::ARM::Resources
213
213
  #
214
214
  # @param top [Integer] Query parameters. If null is passed returns all
215
215
  # deployments.
216
+ # @param expand [String] The $expand query parameter. e.g. To include property
217
+ # aliases in response, use $expand=resourceTypes/aliases.
216
218
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
217
219
  # will be added to the HTTP request.
218
220
  #
219
- # @return [ProviderListResult] operation results.
221
+ # @return [ProviderListResult] which provide lazy access to pages of the
222
+ # response.
220
223
  #
221
- def list(top = nil, custom_headers = nil)
222
- response = list_async(top, custom_headers).value!
223
- response.body unless response.nil?
224
+ def list_as_lazy(top = nil, expand = nil, custom_headers = nil)
225
+ response = list_async(top, expand, custom_headers).value!
226
+ unless response.nil?
227
+ page = response.body
228
+ page.next_method = Proc.new do |next_link|
229
+ list_next_async(next_link, custom_headers)
230
+ end
231
+ page
232
+ end
233
+ end
234
+
235
+ #
236
+ # Gets a list of resource providers.
237
+ #
238
+ # @param top [Integer] Query parameters. If null is passed returns all
239
+ # deployments.
240
+ # @param expand [String] The $expand query parameter. e.g. To include property
241
+ # aliases in response, use $expand=resourceTypes/aliases.
242
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
243
+ # will be added to the HTTP request.
244
+ #
245
+ # @return [Array<Provider>] operation results.
246
+ #
247
+ def list(top = nil, expand = nil, custom_headers = nil)
248
+ first_page = list_as_lazy(top, expand, custom_headers)
249
+ first_page.get_all_items
224
250
  end
225
251
 
226
252
  #
@@ -228,13 +254,15 @@ module Azure::ARM::Resources
228
254
  #
229
255
  # @param top [Integer] Query parameters. If null is passed returns all
230
256
  # deployments.
257
+ # @param expand [String] The $expand query parameter. e.g. To include property
258
+ # aliases in response, use $expand=resourceTypes/aliases.
231
259
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
232
260
  # will be added to the HTTP request.
233
261
  #
234
262
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
235
263
  #
236
- def list_with_http_info(top = nil, custom_headers = nil)
237
- list_async(top, custom_headers).value!
264
+ def list_with_http_info(top = nil, expand = nil, custom_headers = nil)
265
+ list_async(top, expand, custom_headers).value!
238
266
  end
239
267
 
240
268
  #
@@ -242,14 +270,18 @@ module Azure::ARM::Resources
242
270
  #
243
271
  # @param top [Integer] Query parameters. If null is passed returns all
244
272
  # deployments.
273
+ # @param expand [String] The $expand query parameter. e.g. To include property
274
+ # aliases in response, use $expand=resourceTypes/aliases.
245
275
  # @param [Hash{String => String}] A hash of custom headers that will be added
246
276
  # to the HTTP request.
247
277
  #
248
278
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
249
279
  #
250
- def list_async(top = nil, custom_headers = nil)
280
+ def list_async(top = nil, expand = nil, custom_headers = nil)
251
281
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
252
282
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
283
+
284
+
253
285
  request_headers = {}
254
286
 
255
287
  # Set Headers
@@ -259,7 +291,7 @@ module Azure::ARM::Resources
259
291
  options = {
260
292
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
261
293
  path_params: {'subscriptionId' => @client.subscription_id},
262
- query_params: {'$top' => top,'api-version' => @client.api_version},
294
+ query_params: {'$top' => top,'$expand' => expand,'api-version' => @client.api_version},
263
295
  headers: request_headers.merge(custom_headers || {})
264
296
  }
265
297
 
@@ -285,10 +317,8 @@ module Azure::ARM::Resources
285
317
  if status_code == 200
286
318
  begin
287
319
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
288
- unless parsed_response.nil?
289
- parsed_response = ProviderListResult.deserialize_object(parsed_response)
290
- end
291
- result.body = parsed_response
320
+ result_mapper = ProviderListResult.mapper()
321
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
292
322
  rescue Exception => e
293
323
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
294
324
  end
@@ -305,13 +335,15 @@ module Azure::ARM::Resources
305
335
  #
306
336
  # @param resource_provider_namespace [String] Namespace of the resource
307
337
  # provider.
338
+ # @param expand [String] The $expand query parameter. e.g. To include property
339
+ # aliases in response, use $expand=resourceTypes/aliases.
308
340
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
309
341
  # will be added to the HTTP request.
310
342
  #
311
343
  # @return [Provider] operation results.
312
344
  #
313
- def get(resource_provider_namespace, custom_headers = nil)
314
- response = get_async(resource_provider_namespace, custom_headers).value!
345
+ def get(resource_provider_namespace, expand = nil, custom_headers = nil)
346
+ response = get_async(resource_provider_namespace, expand, custom_headers).value!
315
347
  response.body unless response.nil?
316
348
  end
317
349
 
@@ -320,13 +352,15 @@ module Azure::ARM::Resources
320
352
  #
321
353
  # @param resource_provider_namespace [String] Namespace of the resource
322
354
  # provider.
355
+ # @param expand [String] The $expand query parameter. e.g. To include property
356
+ # aliases in response, use $expand=resourceTypes/aliases.
323
357
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
324
358
  # will be added to the HTTP request.
325
359
  #
326
360
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
327
361
  #
328
- def get_with_http_info(resource_provider_namespace, custom_headers = nil)
329
- get_async(resource_provider_namespace, custom_headers).value!
362
+ def get_with_http_info(resource_provider_namespace, expand = nil, custom_headers = nil)
363
+ get_async(resource_provider_namespace, expand, custom_headers).value!
330
364
  end
331
365
 
332
366
  #
@@ -334,15 +368,19 @@ module Azure::ARM::Resources
334
368
  #
335
369
  # @param resource_provider_namespace [String] Namespace of the resource
336
370
  # provider.
371
+ # @param expand [String] The $expand query parameter. e.g. To include property
372
+ # aliases in response, use $expand=resourceTypes/aliases.
337
373
  # @param [Hash{String => String}] A hash of custom headers that will be added
338
374
  # to the HTTP request.
339
375
  #
340
376
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
341
377
  #
342
- def get_async(resource_provider_namespace, custom_headers = nil)
378
+ def get_async(resource_provider_namespace, expand = nil, custom_headers = nil)
343
379
  fail ArgumentError, 'resource_provider_namespace is nil' if resource_provider_namespace.nil?
344
380
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
345
381
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
382
+
383
+
346
384
  request_headers = {}
347
385
 
348
386
  # Set Headers
@@ -352,7 +390,7 @@ module Azure::ARM::Resources
352
390
  options = {
353
391
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
354
392
  path_params: {'resourceProviderNamespace' => resource_provider_namespace,'subscriptionId' => @client.subscription_id},
355
- query_params: {'api-version' => @client.api_version},
393
+ query_params: {'$expand' => expand,'api-version' => @client.api_version},
356
394
  headers: request_headers.merge(custom_headers || {})
357
395
  }
358
396
 
@@ -378,10 +416,8 @@ module Azure::ARM::Resources
378
416
  if status_code == 200
379
417
  begin
380
418
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
381
- unless parsed_response.nil?
382
- parsed_response = Provider.deserialize_object(parsed_response)
383
- end
384
- result.body = parsed_response
419
+ result_mapper = Provider.mapper()
420
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
385
421
  rescue Exception => e
386
422
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
387
423
  end
@@ -434,6 +470,8 @@ module Azure::ARM::Resources
434
470
  #
435
471
  def list_next_async(next_page_link, custom_headers = nil)
436
472
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
473
+
474
+
437
475
  request_headers = {}
438
476
 
439
477
  # Set Headers
@@ -468,10 +506,8 @@ module Azure::ARM::Resources
468
506
  if status_code == 200
469
507
  begin
470
508
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
471
- unless parsed_response.nil?
472
- parsed_response = ProviderListResult.deserialize_object(parsed_response)
473
- end
474
- result.body = parsed_response
509
+ result_mapper = ProviderListResult.mapper()
510
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
475
511
  rescue Exception => e
476
512
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
477
513
  end