azure_mgmt_web 0.17.1 → 0.17.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2015-04-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  3. data/lib/2015-08-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  4. data/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  5. data/lib/2016-08-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  6. data/lib/2016-09-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  7. data/lib/2018-02-01/generated/azure_mgmt_web.rb +99 -91
  8. data/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb +40 -40
  9. data/lib/2018-02-01/generated/azure_mgmt_web/app_service_plans.rb +8 -8
  10. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_plan.rb +26 -1
  11. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_plan_patch_resource.rb +26 -1
  12. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_storage_info_value.rb +109 -0
  13. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_storage_property_dictionary_resource.rb +90 -0
  14. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_storage_state.rb +17 -0
  15. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_storage_type.rb +16 -0
  16. data/lib/2018-02-01/generated/azure_mgmt_web/models/backup_request.rb +11 -0
  17. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_publishing_profile_options.rb +11 -0
  18. data/lib/2018-02-01/generated/azure_mgmt_web/models/deleted_site.rb +54 -7
  19. data/lib/2018-02-01/generated/azure_mgmt_web/models/network_trace.rb +70 -0
  20. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_health_metadata.rb +93 -0
  21. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_health_metadata_collection.rb +99 -0
  22. data/lib/2018-02-01/generated/azure_mgmt_web/models/site.rb +13 -1
  23. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_config.rb +21 -0
  24. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_config_resource.rb +21 -0
  25. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_patch_resource.rb +13 -1
  26. data/lib/2018-02-01/generated/azure_mgmt_web/models/sku_name.rb +2 -0
  27. data/lib/2018-02-01/generated/azure_mgmt_web/models/slot_config_names_resource.rb +20 -0
  28. data/lib/2018-02-01/generated/azure_mgmt_web/provider.rb +16 -8
  29. data/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb +20 -20
  30. data/lib/2018-02-01/generated/azure_mgmt_web/resource_health_metadata_operations.rb +1161 -0
  31. data/lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb +1716 -312
  32. data/lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb +36 -19
  33. data/lib/azure_mgmt_web.rb +1 -0
  34. data/lib/profiles/latest/modules/web_profile_module.rb +315 -285
  35. data/lib/profiles/v2018_03_01/modules/web_profile_module.rb +1235 -0
  36. data/lib/profiles/v2018_03_01/web_module_definition.rb +8 -0
  37. data/lib/profiles/v2018_03_01/web_v2018_03_01_profile_client.rb +40 -0
  38. data/lib/version.rb +1 -1
  39. metadata +14 -3
@@ -30,8 +30,8 @@ module Azure::Web::Mgmt::V2018_02_01
30
30
  # critical recommendations. The default is <code>false</code>, which returns
31
31
  # all recommendations.
32
32
  # @param filter [String] Filter is specified by using OData syntax. Example:
33
- # $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq
34
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
33
+ # $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq
34
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
35
35
  # duration'[PT1H|PT1M|P1D]
36
36
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
37
37
  # will be added to the HTTP request.
@@ -52,8 +52,8 @@ module Azure::Web::Mgmt::V2018_02_01
52
52
  # critical recommendations. The default is <code>false</code>, which returns
53
53
  # all recommendations.
54
54
  # @param filter [String] Filter is specified by using OData syntax. Example:
55
- # $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq
56
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
55
+ # $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq
56
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
57
57
  # duration'[PT1H|PT1M|P1D]
58
58
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
59
59
  # will be added to the HTTP request.
@@ -73,8 +73,8 @@ module Azure::Web::Mgmt::V2018_02_01
73
73
  # critical recommendations. The default is <code>false</code>, which returns
74
74
  # all recommendations.
75
75
  # @param filter [String] Filter is specified by using OData syntax. Example:
76
- # $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq
77
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
76
+ # $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq
77
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
78
78
  # duration'[PT1H|PT1M|P1D]
79
79
  # @param [Hash{String => String}] A hash of custom headers that will be added
80
80
  # to the HTTP request.
@@ -313,8 +313,8 @@ module Azure::Web::Mgmt::V2018_02_01
313
313
  # recommendations. The default is <code>true</code>, which returns only expired
314
314
  # recommendations.
315
315
  # @param filter [String] Filter is specified by using OData syntax. Example:
316
- # $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq
317
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
316
+ # $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq
317
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
318
318
  # duration'[PT1H|PT1M|P1D]
319
319
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
320
320
  # will be added to the HTTP request.
@@ -338,8 +338,8 @@ module Azure::Web::Mgmt::V2018_02_01
338
338
  # recommendations. The default is <code>true</code>, which returns only expired
339
339
  # recommendations.
340
340
  # @param filter [String] Filter is specified by using OData syntax. Example:
341
- # $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq
342
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
341
+ # $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq
342
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
343
343
  # duration'[PT1H|PT1M|P1D]
344
344
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
345
345
  # will be added to the HTTP request.
@@ -362,8 +362,8 @@ module Azure::Web::Mgmt::V2018_02_01
362
362
  # recommendations. The default is <code>true</code>, which returns only expired
363
363
  # recommendations.
364
364
  # @param filter [String] Filter is specified by using OData syntax. Example:
365
- # $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq
366
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
365
+ # $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq
366
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
367
367
  # duration'[PT1H|PT1M|P1D]
368
368
  # @param [Hash{String => String}] A hash of custom headers that will be added
369
369
  # to the HTTP request.
@@ -439,7 +439,7 @@ module Azure::Web::Mgmt::V2018_02_01
439
439
  # critical recommendations. The default is <code>false</code>, which returns
440
440
  # all recommendations.
441
441
  # @param filter [String] Return only channels specified in the filter. Filter
442
- # is specified by using OData syntax. Example: $filter=channels eq 'Api' or
442
+ # is specified by using OData syntax. Example: $filter=channel eq 'Api' or
443
443
  # channel eq 'Notification'
444
444
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
445
445
  # will be added to the HTTP request.
@@ -463,7 +463,7 @@ module Azure::Web::Mgmt::V2018_02_01
463
463
  # critical recommendations. The default is <code>false</code>, which returns
464
464
  # all recommendations.
465
465
  # @param filter [String] Return only channels specified in the filter. Filter
466
- # is specified by using OData syntax. Example: $filter=channels eq 'Api' or
466
+ # is specified by using OData syntax. Example: $filter=channel eq 'Api' or
467
467
  # channel eq 'Notification'
468
468
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
469
469
  # will be added to the HTTP request.
@@ -486,7 +486,7 @@ module Azure::Web::Mgmt::V2018_02_01
486
486
  # critical recommendations. The default is <code>false</code>, which returns
487
487
  # all recommendations.
488
488
  # @param filter [String] Return only channels specified in the filter. Filter
489
- # is specified by using OData syntax. Example: $filter=channels eq 'Api' or
489
+ # is specified by using OData syntax. Example: $filter=channel eq 'Api' or
490
490
  # channel eq 'Notification'
491
491
  # @param [Hash{String => String}] A hash of custom headers that will be added
492
492
  # to the HTTP request.
@@ -1244,8 +1244,8 @@ module Azure::Web::Mgmt::V2018_02_01
1244
1244
  # critical recommendations. The default is <code>false</code>, which returns
1245
1245
  # all recommendations.
1246
1246
  # @param filter [String] Filter is specified by using OData syntax. Example:
1247
- # $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq
1248
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
1247
+ # $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq
1248
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
1249
1249
  # duration'[PT1H|PT1M|P1D]
1250
1250
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1251
1251
  # will be added to the HTTP request.
@@ -1276,8 +1276,8 @@ module Azure::Web::Mgmt::V2018_02_01
1276
1276
  # recommendations. The default is <code>true</code>, which returns only expired
1277
1277
  # recommendations.
1278
1278
  # @param filter [String] Filter is specified by using OData syntax. Example:
1279
- # $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq
1280
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
1279
+ # $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq
1280
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
1281
1281
  # duration'[PT1H|PT1M|P1D]
1282
1282
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1283
1283
  # will be added to the HTTP request.
@@ -1308,7 +1308,7 @@ module Azure::Web::Mgmt::V2018_02_01
1308
1308
  # critical recommendations. The default is <code>false</code>, which returns
1309
1309
  # all recommendations.
1310
1310
  # @param filter [String] Return only channels specified in the filter. Filter
1311
- # is specified by using OData syntax. Example: $filter=channels eq 'Api' or
1311
+ # is specified by using OData syntax. Example: $filter=channel eq 'Api' or
1312
1312
  # channel eq 'Notification'
1313
1313
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1314
1314
  # will be added to the HTTP request.
@@ -0,0 +1,1161 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Web::Mgmt::V2018_02_01
7
+ #
8
+ # WebSite Management Client
9
+ #
10
+ class ResourceHealthMetadataOperations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ResourceHealthMetadataOperations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [WebSiteManagementClient] reference to the WebSiteManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # List all ResourceHealthMetadata for all sites in the subscription.
26
+ #
27
+ # List all ResourceHealthMetadata for all sites in the subscription.
28
+ #
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [Array<ResourceHealthMetadata>] operation results.
33
+ #
34
+ def list(custom_headers:nil)
35
+ first_page = list_as_lazy(custom_headers:custom_headers)
36
+ first_page.get_all_items
37
+ end
38
+
39
+ #
40
+ # List all ResourceHealthMetadata for all sites in the subscription.
41
+ #
42
+ # List all ResourceHealthMetadata for all sites in the subscription.
43
+ #
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_with_http_info(custom_headers:nil)
50
+ list_async(custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # List all ResourceHealthMetadata for all sites in the subscription.
55
+ #
56
+ # List all ResourceHealthMetadata for all sites in the subscription.
57
+ #
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_async(custom_headers:nil)
64
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
65
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
66
+
67
+
68
+ request_headers = {}
69
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
70
+
71
+ # Set Headers
72
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
73
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
74
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'
75
+
76
+ request_url = @base_url || @client.base_url
77
+
78
+ options = {
79
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
80
+ path_params: {'subscriptionId' => @client.subscription_id},
81
+ query_params: {'api-version' => @client.api_version},
82
+ headers: request_headers.merge(custom_headers || {}),
83
+ base_url: request_url
84
+ }
85
+ promise = @client.make_request_async(:get, path_template, options)
86
+
87
+ promise = promise.then do |result|
88
+ http_response = result.response
89
+ status_code = http_response.status
90
+ response_content = http_response.body
91
+ unless status_code == 200
92
+ error_model = JSON.load(response_content)
93
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
94
+ end
95
+
96
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
97
+ # Deserialize Response
98
+ if status_code == 200
99
+ begin
100
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
101
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ResourceHealthMetadataCollection.mapper()
102
+ result.body = @client.deserialize(result_mapper, parsed_response)
103
+ rescue Exception => e
104
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
105
+ end
106
+ end
107
+
108
+ result
109
+ end
110
+
111
+ promise.execute
112
+ end
113
+
114
+ #
115
+ # List all ResourceHealthMetadata for all sites in the resource group in the
116
+ # subscription.
117
+ #
118
+ # List all ResourceHealthMetadata for all sites in the resource group in the
119
+ # subscription.
120
+ #
121
+ # @param resource_group_name [String] Name of the resource group to which the
122
+ # resource belongs.
123
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
124
+ # will be added to the HTTP request.
125
+ #
126
+ # @return [Array<ResourceHealthMetadata>] operation results.
127
+ #
128
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
129
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
130
+ first_page.get_all_items
131
+ end
132
+
133
+ #
134
+ # List all ResourceHealthMetadata for all sites in the resource group in the
135
+ # subscription.
136
+ #
137
+ # List all ResourceHealthMetadata for all sites in the resource group in the
138
+ # subscription.
139
+ #
140
+ # @param resource_group_name [String] Name of the resource group to which the
141
+ # resource belongs.
142
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
143
+ # will be added to the HTTP request.
144
+ #
145
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
146
+ #
147
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
148
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
149
+ end
150
+
151
+ #
152
+ # List all ResourceHealthMetadata for all sites in the resource group in the
153
+ # subscription.
154
+ #
155
+ # List all ResourceHealthMetadata for all sites in the resource group in the
156
+ # subscription.
157
+ #
158
+ # @param resource_group_name [String] Name of the resource group to which the
159
+ # resource belongs.
160
+ # @param [Hash{String => String}] A hash of custom headers that will be added
161
+ # to the HTTP request.
162
+ #
163
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
164
+ #
165
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
166
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
167
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
168
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
169
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
170
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
171
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
172
+
173
+
174
+ request_headers = {}
175
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
176
+
177
+ # Set Headers
178
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
179
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
180
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'
181
+
182
+ request_url = @base_url || @client.base_url
183
+
184
+ options = {
185
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
186
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
187
+ query_params: {'api-version' => @client.api_version},
188
+ headers: request_headers.merge(custom_headers || {}),
189
+ base_url: request_url
190
+ }
191
+ promise = @client.make_request_async(:get, path_template, options)
192
+
193
+ promise = promise.then do |result|
194
+ http_response = result.response
195
+ status_code = http_response.status
196
+ response_content = http_response.body
197
+ unless status_code == 200
198
+ error_model = JSON.load(response_content)
199
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
200
+ end
201
+
202
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
203
+ # Deserialize Response
204
+ if status_code == 200
205
+ begin
206
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
207
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ResourceHealthMetadataCollection.mapper()
208
+ result.body = @client.deserialize(result_mapper, parsed_response)
209
+ rescue Exception => e
210
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
211
+ end
212
+ end
213
+
214
+ result
215
+ end
216
+
217
+ promise.execute
218
+ end
219
+
220
+ #
221
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
222
+ # collection
223
+ #
224
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
225
+ # collection
226
+ #
227
+ # @param resource_group_name [String] Name of the resource group to which the
228
+ # resource belongs.
229
+ # @param name [String] Name of web app.
230
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
231
+ # will be added to the HTTP request.
232
+ #
233
+ # @return [Array<ResourceHealthMetadata>] operation results.
234
+ #
235
+ def list_by_site(resource_group_name, name, custom_headers:nil)
236
+ first_page = list_by_site_as_lazy(resource_group_name, name, custom_headers:custom_headers)
237
+ first_page.get_all_items
238
+ end
239
+
240
+ #
241
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
242
+ # collection
243
+ #
244
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
245
+ # collection
246
+ #
247
+ # @param resource_group_name [String] Name of the resource group to which the
248
+ # resource belongs.
249
+ # @param name [String] Name of web app.
250
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
251
+ # will be added to the HTTP request.
252
+ #
253
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
254
+ #
255
+ def list_by_site_with_http_info(resource_group_name, name, custom_headers:nil)
256
+ list_by_site_async(resource_group_name, name, custom_headers:custom_headers).value!
257
+ end
258
+
259
+ #
260
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
261
+ # collection
262
+ #
263
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
264
+ # collection
265
+ #
266
+ # @param resource_group_name [String] Name of the resource group to which the
267
+ # resource belongs.
268
+ # @param name [String] Name of web app.
269
+ # @param [Hash{String => String}] A hash of custom headers that will be added
270
+ # to the HTTP request.
271
+ #
272
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
273
+ #
274
+ def list_by_site_async(resource_group_name, name, custom_headers:nil)
275
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
276
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
277
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
278
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
279
+ fail ArgumentError, 'name is nil' if name.nil?
280
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
281
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
282
+
283
+
284
+ request_headers = {}
285
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
286
+
287
+ # Set Headers
288
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
289
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
290
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'
291
+
292
+ request_url = @base_url || @client.base_url
293
+
294
+ options = {
295
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
296
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
297
+ query_params: {'api-version' => @client.api_version},
298
+ headers: request_headers.merge(custom_headers || {}),
299
+ base_url: request_url
300
+ }
301
+ promise = @client.make_request_async(:get, path_template, options)
302
+
303
+ promise = promise.then do |result|
304
+ http_response = result.response
305
+ status_code = http_response.status
306
+ response_content = http_response.body
307
+ unless status_code == 200
308
+ error_model = JSON.load(response_content)
309
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
310
+ end
311
+
312
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
313
+ # Deserialize Response
314
+ if status_code == 200
315
+ begin
316
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
317
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ResourceHealthMetadataCollection.mapper()
318
+ result.body = @client.deserialize(result_mapper, parsed_response)
319
+ rescue Exception => e
320
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
321
+ end
322
+ end
323
+
324
+ result
325
+ end
326
+
327
+ promise.execute
328
+ end
329
+
330
+ #
331
+ # Gets the category of ResourceHealthMetadata to use for the given site
332
+ #
333
+ # Gets the category of ResourceHealthMetadata to use for the given site
334
+ #
335
+ # @param resource_group_name [String] Name of the resource group to which the
336
+ # resource belongs.
337
+ # @param name [String] Name of web app
338
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
339
+ # will be added to the HTTP request.
340
+ #
341
+ # @return [ResourceHealthMetadata] operation results.
342
+ #
343
+ def get_by_site(resource_group_name, name, custom_headers:nil)
344
+ response = get_by_site_async(resource_group_name, name, custom_headers:custom_headers).value!
345
+ response.body unless response.nil?
346
+ end
347
+
348
+ #
349
+ # Gets the category of ResourceHealthMetadata to use for the given site
350
+ #
351
+ # Gets the category of ResourceHealthMetadata to use for the given site
352
+ #
353
+ # @param resource_group_name [String] Name of the resource group to which the
354
+ # resource belongs.
355
+ # @param name [String] Name of web app
356
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
357
+ # will be added to the HTTP request.
358
+ #
359
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
360
+ #
361
+ def get_by_site_with_http_info(resource_group_name, name, custom_headers:nil)
362
+ get_by_site_async(resource_group_name, name, custom_headers:custom_headers).value!
363
+ end
364
+
365
+ #
366
+ # Gets the category of ResourceHealthMetadata to use for the given site
367
+ #
368
+ # Gets the category of ResourceHealthMetadata to use for the given site
369
+ #
370
+ # @param resource_group_name [String] Name of the resource group to which the
371
+ # resource belongs.
372
+ # @param name [String] Name of web app
373
+ # @param [Hash{String => String}] A hash of custom headers that will be added
374
+ # to the HTTP request.
375
+ #
376
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
377
+ #
378
+ def get_by_site_async(resource_group_name, name, custom_headers:nil)
379
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
380
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
381
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
382
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
383
+ fail ArgumentError, 'name is nil' if name.nil?
384
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
385
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
386
+
387
+
388
+ request_headers = {}
389
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
390
+
391
+ # Set Headers
392
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
393
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
394
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'
395
+
396
+ request_url = @base_url || @client.base_url
397
+
398
+ options = {
399
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
400
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
401
+ query_params: {'api-version' => @client.api_version},
402
+ headers: request_headers.merge(custom_headers || {}),
403
+ base_url: request_url
404
+ }
405
+ promise = @client.make_request_async(:get, path_template, options)
406
+
407
+ promise = promise.then do |result|
408
+ http_response = result.response
409
+ status_code = http_response.status
410
+ response_content = http_response.body
411
+ unless status_code == 200
412
+ error_model = JSON.load(response_content)
413
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
414
+ end
415
+
416
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
417
+ # Deserialize Response
418
+ if status_code == 200
419
+ begin
420
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
421
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ResourceHealthMetadata.mapper()
422
+ result.body = @client.deserialize(result_mapper, parsed_response)
423
+ rescue Exception => e
424
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
425
+ end
426
+ end
427
+
428
+ result
429
+ end
430
+
431
+ promise.execute
432
+ end
433
+
434
+ #
435
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
436
+ # collection
437
+ #
438
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
439
+ # collection
440
+ #
441
+ # @param resource_group_name [String] Name of the resource group to which the
442
+ # resource belongs.
443
+ # @param name [String] Name of web app.
444
+ # @param slot [String] Name of web app slot. If not specified then will default
445
+ # to production slot.
446
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
447
+ # will be added to the HTTP request.
448
+ #
449
+ # @return [Array<ResourceHealthMetadata>] operation results.
450
+ #
451
+ def list_by_site_slot(resource_group_name, name, slot, custom_headers:nil)
452
+ first_page = list_by_site_slot_as_lazy(resource_group_name, name, slot, custom_headers:custom_headers)
453
+ first_page.get_all_items
454
+ end
455
+
456
+ #
457
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
458
+ # collection
459
+ #
460
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
461
+ # collection
462
+ #
463
+ # @param resource_group_name [String] Name of the resource group to which the
464
+ # resource belongs.
465
+ # @param name [String] Name of web app.
466
+ # @param slot [String] Name of web app slot. If not specified then will default
467
+ # to production slot.
468
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
469
+ # will be added to the HTTP request.
470
+ #
471
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
472
+ #
473
+ def list_by_site_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
474
+ list_by_site_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
475
+ end
476
+
477
+ #
478
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
479
+ # collection
480
+ #
481
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
482
+ # collection
483
+ #
484
+ # @param resource_group_name [String] Name of the resource group to which the
485
+ # resource belongs.
486
+ # @param name [String] Name of web app.
487
+ # @param slot [String] Name of web app slot. If not specified then will default
488
+ # to production slot.
489
+ # @param [Hash{String => String}] A hash of custom headers that will be added
490
+ # to the HTTP request.
491
+ #
492
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
493
+ #
494
+ def list_by_site_slot_async(resource_group_name, name, slot, custom_headers:nil)
495
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
496
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
497
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
498
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
499
+ fail ArgumentError, 'name is nil' if name.nil?
500
+ fail ArgumentError, 'slot is nil' if slot.nil?
501
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
502
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
503
+
504
+
505
+ request_headers = {}
506
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
507
+
508
+ # Set Headers
509
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
510
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
511
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'
512
+
513
+ request_url = @base_url || @client.base_url
514
+
515
+ options = {
516
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
517
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
518
+ query_params: {'api-version' => @client.api_version},
519
+ headers: request_headers.merge(custom_headers || {}),
520
+ base_url: request_url
521
+ }
522
+ promise = @client.make_request_async(:get, path_template, options)
523
+
524
+ promise = promise.then do |result|
525
+ http_response = result.response
526
+ status_code = http_response.status
527
+ response_content = http_response.body
528
+ unless status_code == 200
529
+ error_model = JSON.load(response_content)
530
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
531
+ end
532
+
533
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
534
+ # Deserialize Response
535
+ if status_code == 200
536
+ begin
537
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
538
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ResourceHealthMetadataCollection.mapper()
539
+ result.body = @client.deserialize(result_mapper, parsed_response)
540
+ rescue Exception => e
541
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
542
+ end
543
+ end
544
+
545
+ result
546
+ end
547
+
548
+ promise.execute
549
+ end
550
+
551
+ #
552
+ # Gets the category of ResourceHealthMetadata to use for the given site
553
+ #
554
+ # Gets the category of ResourceHealthMetadata to use for the given site
555
+ #
556
+ # @param resource_group_name [String] Name of the resource group to which the
557
+ # resource belongs.
558
+ # @param name [String] Name of web app
559
+ # @param slot [String] Name of web app slot. If not specified then will default
560
+ # to production slot.
561
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
562
+ # will be added to the HTTP request.
563
+ #
564
+ # @return [ResourceHealthMetadata] operation results.
565
+ #
566
+ def get_by_site_slot(resource_group_name, name, slot, custom_headers:nil)
567
+ response = get_by_site_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
568
+ response.body unless response.nil?
569
+ end
570
+
571
+ #
572
+ # Gets the category of ResourceHealthMetadata to use for the given site
573
+ #
574
+ # Gets the category of ResourceHealthMetadata to use for the given site
575
+ #
576
+ # @param resource_group_name [String] Name of the resource group to which the
577
+ # resource belongs.
578
+ # @param name [String] Name of web app
579
+ # @param slot [String] Name of web app slot. If not specified then will default
580
+ # to production slot.
581
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
582
+ # will be added to the HTTP request.
583
+ #
584
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
585
+ #
586
+ def get_by_site_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
587
+ get_by_site_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
588
+ end
589
+
590
+ #
591
+ # Gets the category of ResourceHealthMetadata to use for the given site
592
+ #
593
+ # Gets the category of ResourceHealthMetadata to use for the given site
594
+ #
595
+ # @param resource_group_name [String] Name of the resource group to which the
596
+ # resource belongs.
597
+ # @param name [String] Name of web app
598
+ # @param slot [String] Name of web app slot. If not specified then will default
599
+ # to production slot.
600
+ # @param [Hash{String => String}] A hash of custom headers that will be added
601
+ # to the HTTP request.
602
+ #
603
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
604
+ #
605
+ def get_by_site_slot_async(resource_group_name, name, slot, custom_headers:nil)
606
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
607
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
608
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
609
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
610
+ fail ArgumentError, 'name is nil' if name.nil?
611
+ fail ArgumentError, 'slot is nil' if slot.nil?
612
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
613
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
614
+
615
+
616
+ request_headers = {}
617
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
618
+
619
+ # Set Headers
620
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
621
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
622
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'
623
+
624
+ request_url = @base_url || @client.base_url
625
+
626
+ options = {
627
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
628
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
629
+ query_params: {'api-version' => @client.api_version},
630
+ headers: request_headers.merge(custom_headers || {}),
631
+ base_url: request_url
632
+ }
633
+ promise = @client.make_request_async(:get, path_template, options)
634
+
635
+ promise = promise.then do |result|
636
+ http_response = result.response
637
+ status_code = http_response.status
638
+ response_content = http_response.body
639
+ unless status_code == 200
640
+ error_model = JSON.load(response_content)
641
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
642
+ end
643
+
644
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
645
+ # Deserialize Response
646
+ if status_code == 200
647
+ begin
648
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
649
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ResourceHealthMetadata.mapper()
650
+ result.body = @client.deserialize(result_mapper, parsed_response)
651
+ rescue Exception => e
652
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
653
+ end
654
+ end
655
+
656
+ result
657
+ end
658
+
659
+ promise.execute
660
+ end
661
+
662
+ #
663
+ # List all ResourceHealthMetadata for all sites in the subscription.
664
+ #
665
+ # List all ResourceHealthMetadata for all sites in the subscription.
666
+ #
667
+ # @param next_page_link [String] The NextLink from the previous successful call
668
+ # to List operation.
669
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
670
+ # will be added to the HTTP request.
671
+ #
672
+ # @return [ResourceHealthMetadataCollection] operation results.
673
+ #
674
+ def list_next(next_page_link, custom_headers:nil)
675
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
676
+ response.body unless response.nil?
677
+ end
678
+
679
+ #
680
+ # List all ResourceHealthMetadata for all sites in the subscription.
681
+ #
682
+ # List all ResourceHealthMetadata for all sites in the subscription.
683
+ #
684
+ # @param next_page_link [String] The NextLink from the previous successful call
685
+ # to List operation.
686
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
687
+ # will be added to the HTTP request.
688
+ #
689
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
690
+ #
691
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
692
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
693
+ end
694
+
695
+ #
696
+ # List all ResourceHealthMetadata for all sites in the subscription.
697
+ #
698
+ # List all ResourceHealthMetadata for all sites in the subscription.
699
+ #
700
+ # @param next_page_link [String] The NextLink from the previous successful call
701
+ # to List operation.
702
+ # @param [Hash{String => String}] A hash of custom headers that will be added
703
+ # to the HTTP request.
704
+ #
705
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
706
+ #
707
+ def list_next_async(next_page_link, custom_headers:nil)
708
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
709
+
710
+
711
+ request_headers = {}
712
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
713
+
714
+ # Set Headers
715
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
716
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
717
+ path_template = '{nextLink}'
718
+
719
+ request_url = @base_url || @client.base_url
720
+
721
+ options = {
722
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
723
+ skip_encoding_path_params: {'nextLink' => next_page_link},
724
+ headers: request_headers.merge(custom_headers || {}),
725
+ base_url: request_url
726
+ }
727
+ promise = @client.make_request_async(:get, path_template, options)
728
+
729
+ promise = promise.then do |result|
730
+ http_response = result.response
731
+ status_code = http_response.status
732
+ response_content = http_response.body
733
+ unless status_code == 200
734
+ error_model = JSON.load(response_content)
735
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
736
+ end
737
+
738
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
739
+ # Deserialize Response
740
+ if status_code == 200
741
+ begin
742
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
743
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ResourceHealthMetadataCollection.mapper()
744
+ result.body = @client.deserialize(result_mapper, parsed_response)
745
+ rescue Exception => e
746
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
747
+ end
748
+ end
749
+
750
+ result
751
+ end
752
+
753
+ promise.execute
754
+ end
755
+
756
+ #
757
+ # List all ResourceHealthMetadata for all sites in the resource group in the
758
+ # subscription.
759
+ #
760
+ # List all ResourceHealthMetadata for all sites in the resource group in the
761
+ # subscription.
762
+ #
763
+ # @param next_page_link [String] The NextLink from the previous successful call
764
+ # to List operation.
765
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
766
+ # will be added to the HTTP request.
767
+ #
768
+ # @return [ResourceHealthMetadataCollection] operation results.
769
+ #
770
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
771
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
772
+ response.body unless response.nil?
773
+ end
774
+
775
+ #
776
+ # List all ResourceHealthMetadata for all sites in the resource group in the
777
+ # subscription.
778
+ #
779
+ # List all ResourceHealthMetadata for all sites in the resource group in the
780
+ # subscription.
781
+ #
782
+ # @param next_page_link [String] The NextLink from the previous successful call
783
+ # to List operation.
784
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
785
+ # will be added to the HTTP request.
786
+ #
787
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
788
+ #
789
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
790
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
791
+ end
792
+
793
+ #
794
+ # List all ResourceHealthMetadata for all sites in the resource group in the
795
+ # subscription.
796
+ #
797
+ # List all ResourceHealthMetadata for all sites in the resource group in the
798
+ # subscription.
799
+ #
800
+ # @param next_page_link [String] The NextLink from the previous successful call
801
+ # to List operation.
802
+ # @param [Hash{String => String}] A hash of custom headers that will be added
803
+ # to the HTTP request.
804
+ #
805
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
806
+ #
807
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
808
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
809
+
810
+
811
+ request_headers = {}
812
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
813
+
814
+ # Set Headers
815
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
816
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
817
+ path_template = '{nextLink}'
818
+
819
+ request_url = @base_url || @client.base_url
820
+
821
+ options = {
822
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
823
+ skip_encoding_path_params: {'nextLink' => next_page_link},
824
+ headers: request_headers.merge(custom_headers || {}),
825
+ base_url: request_url
826
+ }
827
+ promise = @client.make_request_async(:get, path_template, options)
828
+
829
+ promise = promise.then do |result|
830
+ http_response = result.response
831
+ status_code = http_response.status
832
+ response_content = http_response.body
833
+ unless status_code == 200
834
+ error_model = JSON.load(response_content)
835
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
836
+ end
837
+
838
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
839
+ # Deserialize Response
840
+ if status_code == 200
841
+ begin
842
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
843
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ResourceHealthMetadataCollection.mapper()
844
+ result.body = @client.deserialize(result_mapper, parsed_response)
845
+ rescue Exception => e
846
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
847
+ end
848
+ end
849
+
850
+ result
851
+ end
852
+
853
+ promise.execute
854
+ end
855
+
856
+ #
857
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
858
+ # collection
859
+ #
860
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
861
+ # collection
862
+ #
863
+ # @param next_page_link [String] The NextLink from the previous successful call
864
+ # to List operation.
865
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
866
+ # will be added to the HTTP request.
867
+ #
868
+ # @return [ResourceHealthMetadataCollection] operation results.
869
+ #
870
+ def list_by_site_next(next_page_link, custom_headers:nil)
871
+ response = list_by_site_next_async(next_page_link, custom_headers:custom_headers).value!
872
+ response.body unless response.nil?
873
+ end
874
+
875
+ #
876
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
877
+ # collection
878
+ #
879
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
880
+ # collection
881
+ #
882
+ # @param next_page_link [String] The NextLink from the previous successful call
883
+ # to List operation.
884
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
885
+ # will be added to the HTTP request.
886
+ #
887
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
888
+ #
889
+ def list_by_site_next_with_http_info(next_page_link, custom_headers:nil)
890
+ list_by_site_next_async(next_page_link, custom_headers:custom_headers).value!
891
+ end
892
+
893
+ #
894
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
895
+ # collection
896
+ #
897
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
898
+ # collection
899
+ #
900
+ # @param next_page_link [String] The NextLink from the previous successful call
901
+ # to List operation.
902
+ # @param [Hash{String => String}] A hash of custom headers that will be added
903
+ # to the HTTP request.
904
+ #
905
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
906
+ #
907
+ def list_by_site_next_async(next_page_link, custom_headers:nil)
908
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
909
+
910
+
911
+ request_headers = {}
912
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
913
+
914
+ # Set Headers
915
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
916
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
917
+ path_template = '{nextLink}'
918
+
919
+ request_url = @base_url || @client.base_url
920
+
921
+ options = {
922
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
923
+ skip_encoding_path_params: {'nextLink' => next_page_link},
924
+ headers: request_headers.merge(custom_headers || {}),
925
+ base_url: request_url
926
+ }
927
+ promise = @client.make_request_async(:get, path_template, options)
928
+
929
+ promise = promise.then do |result|
930
+ http_response = result.response
931
+ status_code = http_response.status
932
+ response_content = http_response.body
933
+ unless status_code == 200
934
+ error_model = JSON.load(response_content)
935
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
936
+ end
937
+
938
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
939
+ # Deserialize Response
940
+ if status_code == 200
941
+ begin
942
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
943
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ResourceHealthMetadataCollection.mapper()
944
+ result.body = @client.deserialize(result_mapper, parsed_response)
945
+ rescue Exception => e
946
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
947
+ end
948
+ end
949
+
950
+ result
951
+ end
952
+
953
+ promise.execute
954
+ end
955
+
956
+ #
957
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
958
+ # collection
959
+ #
960
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
961
+ # collection
962
+ #
963
+ # @param next_page_link [String] The NextLink from the previous successful call
964
+ # to List operation.
965
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
966
+ # will be added to the HTTP request.
967
+ #
968
+ # @return [ResourceHealthMetadataCollection] operation results.
969
+ #
970
+ def list_by_site_slot_next(next_page_link, custom_headers:nil)
971
+ response = list_by_site_slot_next_async(next_page_link, custom_headers:custom_headers).value!
972
+ response.body unless response.nil?
973
+ end
974
+
975
+ #
976
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
977
+ # collection
978
+ #
979
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
980
+ # collection
981
+ #
982
+ # @param next_page_link [String] The NextLink from the previous successful call
983
+ # to List operation.
984
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
985
+ # will be added to the HTTP request.
986
+ #
987
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
988
+ #
989
+ def list_by_site_slot_next_with_http_info(next_page_link, custom_headers:nil)
990
+ list_by_site_slot_next_async(next_page_link, custom_headers:custom_headers).value!
991
+ end
992
+
993
+ #
994
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
995
+ # collection
996
+ #
997
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
998
+ # collection
999
+ #
1000
+ # @param next_page_link [String] The NextLink from the previous successful call
1001
+ # to List operation.
1002
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1003
+ # to the HTTP request.
1004
+ #
1005
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1006
+ #
1007
+ def list_by_site_slot_next_async(next_page_link, custom_headers:nil)
1008
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1009
+
1010
+
1011
+ request_headers = {}
1012
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1013
+
1014
+ # Set Headers
1015
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1016
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1017
+ path_template = '{nextLink}'
1018
+
1019
+ request_url = @base_url || @client.base_url
1020
+
1021
+ options = {
1022
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1023
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1024
+ headers: request_headers.merge(custom_headers || {}),
1025
+ base_url: request_url
1026
+ }
1027
+ promise = @client.make_request_async(:get, path_template, options)
1028
+
1029
+ promise = promise.then do |result|
1030
+ http_response = result.response
1031
+ status_code = http_response.status
1032
+ response_content = http_response.body
1033
+ unless status_code == 200
1034
+ error_model = JSON.load(response_content)
1035
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1036
+ end
1037
+
1038
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1039
+ # Deserialize Response
1040
+ if status_code == 200
1041
+ begin
1042
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1043
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ResourceHealthMetadataCollection.mapper()
1044
+ result.body = @client.deserialize(result_mapper, parsed_response)
1045
+ rescue Exception => e
1046
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1047
+ end
1048
+ end
1049
+
1050
+ result
1051
+ end
1052
+
1053
+ promise.execute
1054
+ end
1055
+
1056
+ #
1057
+ # List all ResourceHealthMetadata for all sites in the subscription.
1058
+ #
1059
+ # List all ResourceHealthMetadata for all sites in the subscription.
1060
+ #
1061
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1062
+ # will be added to the HTTP request.
1063
+ #
1064
+ # @return [ResourceHealthMetadataCollection] which provide lazy access to pages
1065
+ # of the response.
1066
+ #
1067
+ def list_as_lazy(custom_headers:nil)
1068
+ response = list_async(custom_headers:custom_headers).value!
1069
+ unless response.nil?
1070
+ page = response.body
1071
+ page.next_method = Proc.new do |next_page_link|
1072
+ list_next_async(next_page_link, custom_headers:custom_headers)
1073
+ end
1074
+ page
1075
+ end
1076
+ end
1077
+
1078
+ #
1079
+ # List all ResourceHealthMetadata for all sites in the resource group in the
1080
+ # subscription.
1081
+ #
1082
+ # List all ResourceHealthMetadata for all sites in the resource group in the
1083
+ # subscription.
1084
+ #
1085
+ # @param resource_group_name [String] Name of the resource group to which the
1086
+ # resource belongs.
1087
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1088
+ # will be added to the HTTP request.
1089
+ #
1090
+ # @return [ResourceHealthMetadataCollection] which provide lazy access to pages
1091
+ # of the response.
1092
+ #
1093
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
1094
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
1095
+ unless response.nil?
1096
+ page = response.body
1097
+ page.next_method = Proc.new do |next_page_link|
1098
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1099
+ end
1100
+ page
1101
+ end
1102
+ end
1103
+
1104
+ #
1105
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
1106
+ # collection
1107
+ #
1108
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
1109
+ # collection
1110
+ #
1111
+ # @param resource_group_name [String] Name of the resource group to which the
1112
+ # resource belongs.
1113
+ # @param name [String] Name of web app.
1114
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1115
+ # will be added to the HTTP request.
1116
+ #
1117
+ # @return [ResourceHealthMetadataCollection] which provide lazy access to pages
1118
+ # of the response.
1119
+ #
1120
+ def list_by_site_as_lazy(resource_group_name, name, custom_headers:nil)
1121
+ response = list_by_site_async(resource_group_name, name, custom_headers:custom_headers).value!
1122
+ unless response.nil?
1123
+ page = response.body
1124
+ page.next_method = Proc.new do |next_page_link|
1125
+ list_by_site_next_async(next_page_link, custom_headers:custom_headers)
1126
+ end
1127
+ page
1128
+ end
1129
+ end
1130
+
1131
+ #
1132
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
1133
+ # collection
1134
+ #
1135
+ # Gets the category of ResourceHealthMetadata to use for the given site as a
1136
+ # collection
1137
+ #
1138
+ # @param resource_group_name [String] Name of the resource group to which the
1139
+ # resource belongs.
1140
+ # @param name [String] Name of web app.
1141
+ # @param slot [String] Name of web app slot. If not specified then will default
1142
+ # to production slot.
1143
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1144
+ # will be added to the HTTP request.
1145
+ #
1146
+ # @return [ResourceHealthMetadataCollection] which provide lazy access to pages
1147
+ # of the response.
1148
+ #
1149
+ def list_by_site_slot_as_lazy(resource_group_name, name, slot, custom_headers:nil)
1150
+ response = list_by_site_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
1151
+ unless response.nil?
1152
+ page = response.body
1153
+ page.next_method = Proc.new do |next_page_link|
1154
+ list_by_site_slot_next_async(next_page_link, custom_headers:custom_headers)
1155
+ end
1156
+ page
1157
+ end
1158
+ end
1159
+
1160
+ end
1161
+ end