azure_mgmt_appconfiguration 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 (65) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +20 -20
  3. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration.rb +43 -43
  4. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/app_configuration_management_client.rb +1 -1
  5. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb +1386 -1386
  6. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/api_key.rb +111 -111
  7. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/api_key_list_result.rb +99 -99
  8. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/check_name_availability_parameters.rb +60 -60
  9. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store.rb +126 -126
  10. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store_list_result.rb +99 -99
  11. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store_update_parameters.rb +65 -65
  12. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/error.rb +57 -57
  13. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/name_availability_status.rb +73 -73
  14. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition.rb +59 -59
  15. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition_display.rb +81 -81
  16. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition_list_result.rb +99 -99
  17. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/provisioning_state.rb +20 -20
  18. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/regenerate_key_parameters.rb +46 -46
  19. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/models/resource.rb +111 -111
  20. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/module_definition.rb +9 -9
  21. data/lib/2019-02-01-preview/generated/azure_mgmt_appconfiguration/operations.rb +339 -339
  22. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration.rb +0 -0
  23. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/app_configuration_management_client.rb +1 -1
  24. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/configuration_stores.rb +0 -0
  25. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/actions_required.rb +0 -0
  26. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/api_key.rb +0 -0
  27. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/api_key_list_result.rb +0 -0
  28. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/check_name_availability_parameters.rb +0 -0
  29. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store.rb +0 -0
  30. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store_list_result.rb +0 -0
  31. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/configuration_store_update_parameters.rb +0 -0
  32. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/connection_status.rb +0 -0
  33. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/encryption_properties.rb +0 -0
  34. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/error.rb +0 -0
  35. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/identity_type.rb +0 -0
  36. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/key_value.rb +0 -0
  37. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/key_vault_properties.rb +0 -0
  38. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/list_key_value_parameters.rb +0 -0
  39. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/name_availability_status.rb +0 -0
  40. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition.rb +0 -0
  41. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition_display.rb +0 -0
  42. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/operation_definition_list_result.rb +0 -0
  43. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_endpoint.rb +0 -0
  44. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection.rb +0 -0
  45. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_endpoint_connection_list_result.rb +0 -0
  46. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_link_resource.rb +0 -0
  47. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_link_resource_list_result.rb +0 -0
  48. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/private_link_service_connection_state.rb +0 -0
  49. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/provisioning_state.rb +0 -0
  50. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/regenerate_key_parameters.rb +0 -0
  51. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/resource.rb +0 -0
  52. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/resource_identity.rb +0 -0
  53. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/sku.rb +0 -0
  54. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/models/user_identity.rb +0 -0
  55. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/module_definition.rb +0 -0
  56. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/operations.rb +0 -0
  57. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/private_endpoint_connections.rb +0 -0
  58. data/lib/2019-11-01-preview/generated/azure_mgmt_appconfiguration/private_link_resources.rb +0 -0
  59. data/lib/azure_mgmt_appconfiguration.rb +0 -0
  60. data/lib/module_definition.rb +7 -7
  61. data/lib/profiles/latest/appconfiguration_latest_profile_client.rb +40 -40
  62. data/lib/profiles/latest/appconfiguration_module_definition.rb +8 -8
  63. data/lib/profiles/latest/modules/appconfiguration_profile_module.rb +0 -0
  64. data/lib/version.rb +1 -1
  65. metadata +5 -5
@@ -1,9 +1,9 @@
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 end
7
- module Azure::Appconfiguration end
8
- module Azure::Appconfiguration::Mgmt end
9
- module Azure::Appconfiguration::Mgmt::V2019_02_01_preview end
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 end
7
+ module Azure::Appconfiguration end
8
+ module Azure::Appconfiguration::Mgmt end
9
+ module Azure::Appconfiguration::Mgmt::V2019_02_01_preview end
@@ -1,339 +1,339 @@
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::Appconfiguration::Mgmt::V2019_02_01_preview
7
- #
8
- # Operations
9
- #
10
- class Operations
11
- include MsRestAzure
12
-
13
- #
14
- # Creates and initializes a new instance of the Operations class.
15
- # @param client service class for accessing basic functionality.
16
- #
17
- def initialize(client)
18
- @client = client
19
- end
20
-
21
- # @return [AppConfigurationManagementClient] reference to the AppConfigurationManagementClient
22
- attr_reader :client
23
-
24
- #
25
- # Checks whether the configuration store name is available for use.
26
- #
27
- # @param check_name_availability_parameters [CheckNameAvailabilityParameters]
28
- # The object containing information for the availability request.
29
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
- # will be added to the HTTP request.
31
- #
32
- # @return [NameAvailabilityStatus] operation results.
33
- #
34
- def check_name_availability(check_name_availability_parameters, custom_headers:nil)
35
- response = check_name_availability_async(check_name_availability_parameters, custom_headers:custom_headers).value!
36
- response.body unless response.nil?
37
- end
38
-
39
- #
40
- # Checks whether the configuration store name is available for use.
41
- #
42
- # @param check_name_availability_parameters [CheckNameAvailabilityParameters]
43
- # The object containing information for the availability request.
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 check_name_availability_with_http_info(check_name_availability_parameters, custom_headers:nil)
50
- check_name_availability_async(check_name_availability_parameters, custom_headers:custom_headers).value!
51
- end
52
-
53
- #
54
- # Checks whether the configuration store name is available for use.
55
- #
56
- # @param check_name_availability_parameters [CheckNameAvailabilityParameters]
57
- # The object containing information for the availability request.
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 check_name_availability_async(check_name_availability_parameters, 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
- fail ArgumentError, 'check_name_availability_parameters is nil' if check_name_availability_parameters.nil?
67
-
68
-
69
- request_headers = {}
70
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
71
-
72
- # Set Headers
73
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
74
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
75
-
76
- # Serialize Request
77
- request_mapper = Azure::Appconfiguration::Mgmt::V2019_02_01_preview::Models::CheckNameAvailabilityParameters.mapper()
78
- request_content = @client.serialize(request_mapper, check_name_availability_parameters)
79
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
80
-
81
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/checkNameAvailability'
82
-
83
- request_url = @base_url || @client.base_url
84
-
85
- options = {
86
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
87
- path_params: {'subscriptionId' => @client.subscription_id},
88
- query_params: {'api-version' => @client.api_version},
89
- body: request_content,
90
- headers: request_headers.merge(custom_headers || {}),
91
- base_url: request_url
92
- }
93
- promise = @client.make_request_async(:post, path_template, options)
94
-
95
- promise = promise.then do |result|
96
- http_response = result.response
97
- status_code = http_response.status
98
- response_content = http_response.body
99
- unless status_code == 200
100
- error_model = JSON.load(response_content)
101
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
102
- end
103
-
104
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
105
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
106
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
107
- # Deserialize Response
108
- if status_code == 200
109
- begin
110
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
111
- result_mapper = Azure::Appconfiguration::Mgmt::V2019_02_01_preview::Models::NameAvailabilityStatus.mapper()
112
- result.body = @client.deserialize(result_mapper, parsed_response)
113
- rescue Exception => e
114
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
115
- end
116
- end
117
-
118
- result
119
- end
120
-
121
- promise.execute
122
- end
123
-
124
- #
125
- # Lists the operations available from this provider.
126
- #
127
- # @param skip_token [String] A skip token is used to continue retrieving items
128
- # after an operation returns a partial result. If a previous response contains
129
- # a nextLink element, the value of the nextLink element will include a
130
- # skipToken parameter that specifies a starting point to use for subsequent
131
- # calls.
132
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
133
- # will be added to the HTTP request.
134
- #
135
- # @return [Array<OperationDefinition>] operation results.
136
- #
137
- def list(skip_token:nil, custom_headers:nil)
138
- first_page = list_as_lazy(skip_token:skip_token, custom_headers:custom_headers)
139
- first_page.get_all_items
140
- end
141
-
142
- #
143
- # Lists the operations available from this provider.
144
- #
145
- # @param skip_token [String] A skip token is used to continue retrieving items
146
- # after an operation returns a partial result. If a previous response contains
147
- # a nextLink element, the value of the nextLink element will include a
148
- # skipToken parameter that specifies a starting point to use for subsequent
149
- # calls.
150
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
151
- # will be added to the HTTP request.
152
- #
153
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
154
- #
155
- def list_with_http_info(skip_token:nil, custom_headers:nil)
156
- list_async(skip_token:skip_token, custom_headers:custom_headers).value!
157
- end
158
-
159
- #
160
- # Lists the operations available from this provider.
161
- #
162
- # @param skip_token [String] A skip token is used to continue retrieving items
163
- # after an operation returns a partial result. If a previous response contains
164
- # a nextLink element, the value of the nextLink element will include a
165
- # skipToken parameter that specifies a starting point to use for subsequent
166
- # calls.
167
- # @param [Hash{String => String}] A hash of custom headers that will be added
168
- # to the HTTP request.
169
- #
170
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
171
- #
172
- def list_async(skip_token:nil, custom_headers:nil)
173
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
174
-
175
-
176
- request_headers = {}
177
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
178
-
179
- # Set Headers
180
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
181
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
182
- path_template = 'providers/Microsoft.AppConfiguration/operations'
183
-
184
- request_url = @base_url || @client.base_url
185
-
186
- options = {
187
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
188
- query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
189
- headers: request_headers.merge(custom_headers || {}),
190
- base_url: request_url
191
- }
192
- promise = @client.make_request_async(:get, path_template, options)
193
-
194
- promise = promise.then do |result|
195
- http_response = result.response
196
- status_code = http_response.status
197
- response_content = http_response.body
198
- unless status_code == 200
199
- error_model = JSON.load(response_content)
200
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
201
- end
202
-
203
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
204
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
205
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
206
- # Deserialize Response
207
- if status_code == 200
208
- begin
209
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
210
- result_mapper = Azure::Appconfiguration::Mgmt::V2019_02_01_preview::Models::OperationDefinitionListResult.mapper()
211
- result.body = @client.deserialize(result_mapper, parsed_response)
212
- rescue Exception => e
213
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
214
- end
215
- end
216
-
217
- result
218
- end
219
-
220
- promise.execute
221
- end
222
-
223
- #
224
- # Lists the operations available from this provider.
225
- #
226
- # @param next_page_link [String] The NextLink from the previous successful call
227
- # to List operation.
228
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
229
- # will be added to the HTTP request.
230
- #
231
- # @return [OperationDefinitionListResult] operation results.
232
- #
233
- def list_next(next_page_link, custom_headers:nil)
234
- response = list_next_async(next_page_link, custom_headers:custom_headers).value!
235
- response.body unless response.nil?
236
- end
237
-
238
- #
239
- # Lists the operations available from this provider.
240
- #
241
- # @param next_page_link [String] The NextLink from the previous successful call
242
- # to List operation.
243
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
244
- # will be added to the HTTP request.
245
- #
246
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
247
- #
248
- def list_next_with_http_info(next_page_link, custom_headers:nil)
249
- list_next_async(next_page_link, custom_headers:custom_headers).value!
250
- end
251
-
252
- #
253
- # Lists the operations available from this provider.
254
- #
255
- # @param next_page_link [String] The NextLink from the previous successful call
256
- # to List operation.
257
- # @param [Hash{String => String}] A hash of custom headers that will be added
258
- # to the HTTP request.
259
- #
260
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
261
- #
262
- def list_next_async(next_page_link, custom_headers:nil)
263
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
264
-
265
-
266
- request_headers = {}
267
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
268
-
269
- # Set Headers
270
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
271
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
272
- path_template = '{nextLink}'
273
-
274
- request_url = @base_url || @client.base_url
275
-
276
- options = {
277
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
278
- skip_encoding_path_params: {'nextLink' => next_page_link},
279
- headers: request_headers.merge(custom_headers || {}),
280
- base_url: request_url
281
- }
282
- promise = @client.make_request_async(:get, path_template, options)
283
-
284
- promise = promise.then do |result|
285
- http_response = result.response
286
- status_code = http_response.status
287
- response_content = http_response.body
288
- unless status_code == 200
289
- error_model = JSON.load(response_content)
290
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
291
- end
292
-
293
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
294
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
295
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
296
- # Deserialize Response
297
- if status_code == 200
298
- begin
299
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
300
- result_mapper = Azure::Appconfiguration::Mgmt::V2019_02_01_preview::Models::OperationDefinitionListResult.mapper()
301
- result.body = @client.deserialize(result_mapper, parsed_response)
302
- rescue Exception => e
303
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
304
- end
305
- end
306
-
307
- result
308
- end
309
-
310
- promise.execute
311
- end
312
-
313
- #
314
- # Lists the operations available from this provider.
315
- #
316
- # @param skip_token [String] A skip token is used to continue retrieving items
317
- # after an operation returns a partial result. If a previous response contains
318
- # a nextLink element, the value of the nextLink element will include a
319
- # skipToken parameter that specifies a starting point to use for subsequent
320
- # calls.
321
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
322
- # will be added to the HTTP request.
323
- #
324
- # @return [OperationDefinitionListResult] which provide lazy access to pages of
325
- # the response.
326
- #
327
- def list_as_lazy(skip_token:nil, custom_headers:nil)
328
- response = list_async(skip_token:skip_token, custom_headers:custom_headers).value!
329
- unless response.nil?
330
- page = response.body
331
- page.next_method = Proc.new do |next_page_link|
332
- list_next_async(next_page_link, custom_headers:custom_headers)
333
- end
334
- page
335
- end
336
- end
337
-
338
- end
339
- end
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::Appconfiguration::Mgmt::V2019_02_01_preview
7
+ #
8
+ # Operations
9
+ #
10
+ class Operations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Operations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [AppConfigurationManagementClient] reference to the AppConfigurationManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Checks whether the configuration store name is available for use.
26
+ #
27
+ # @param check_name_availability_parameters [CheckNameAvailabilityParameters]
28
+ # The object containing information for the availability request.
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [NameAvailabilityStatus] operation results.
33
+ #
34
+ def check_name_availability(check_name_availability_parameters, custom_headers:nil)
35
+ response = check_name_availability_async(check_name_availability_parameters, custom_headers:custom_headers).value!
36
+ response.body unless response.nil?
37
+ end
38
+
39
+ #
40
+ # Checks whether the configuration store name is available for use.
41
+ #
42
+ # @param check_name_availability_parameters [CheckNameAvailabilityParameters]
43
+ # The object containing information for the availability request.
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 check_name_availability_with_http_info(check_name_availability_parameters, custom_headers:nil)
50
+ check_name_availability_async(check_name_availability_parameters, custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Checks whether the configuration store name is available for use.
55
+ #
56
+ # @param check_name_availability_parameters [CheckNameAvailabilityParameters]
57
+ # The object containing information for the availability request.
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 check_name_availability_async(check_name_availability_parameters, 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
+ fail ArgumentError, 'check_name_availability_parameters is nil' if check_name_availability_parameters.nil?
67
+
68
+
69
+ request_headers = {}
70
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
71
+
72
+ # Set Headers
73
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
74
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
75
+
76
+ # Serialize Request
77
+ request_mapper = Azure::Appconfiguration::Mgmt::V2019_02_01_preview::Models::CheckNameAvailabilityParameters.mapper()
78
+ request_content = @client.serialize(request_mapper, check_name_availability_parameters)
79
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
80
+
81
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/checkNameAvailability'
82
+
83
+ request_url = @base_url || @client.base_url
84
+
85
+ options = {
86
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
87
+ path_params: {'subscriptionId' => @client.subscription_id},
88
+ query_params: {'api-version' => @client.api_version},
89
+ body: request_content,
90
+ headers: request_headers.merge(custom_headers || {}),
91
+ base_url: request_url
92
+ }
93
+ promise = @client.make_request_async(:post, path_template, options)
94
+
95
+ promise = promise.then do |result|
96
+ http_response = result.response
97
+ status_code = http_response.status
98
+ response_content = http_response.body
99
+ unless status_code == 200
100
+ error_model = JSON.load(response_content)
101
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
102
+ end
103
+
104
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
105
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
106
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
107
+ # Deserialize Response
108
+ if status_code == 200
109
+ begin
110
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
111
+ result_mapper = Azure::Appconfiguration::Mgmt::V2019_02_01_preview::Models::NameAvailabilityStatus.mapper()
112
+ result.body = @client.deserialize(result_mapper, parsed_response)
113
+ rescue Exception => e
114
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
115
+ end
116
+ end
117
+
118
+ result
119
+ end
120
+
121
+ promise.execute
122
+ end
123
+
124
+ #
125
+ # Lists the operations available from this provider.
126
+ #
127
+ # @param skip_token [String] A skip token is used to continue retrieving items
128
+ # after an operation returns a partial result. If a previous response contains
129
+ # a nextLink element, the value of the nextLink element will include a
130
+ # skipToken parameter that specifies a starting point to use for subsequent
131
+ # calls.
132
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
133
+ # will be added to the HTTP request.
134
+ #
135
+ # @return [Array<OperationDefinition>] operation results.
136
+ #
137
+ def list(skip_token:nil, custom_headers:nil)
138
+ first_page = list_as_lazy(skip_token:skip_token, custom_headers:custom_headers)
139
+ first_page.get_all_items
140
+ end
141
+
142
+ #
143
+ # Lists the operations available from this provider.
144
+ #
145
+ # @param skip_token [String] A skip token is used to continue retrieving items
146
+ # after an operation returns a partial result. If a previous response contains
147
+ # a nextLink element, the value of the nextLink element will include a
148
+ # skipToken parameter that specifies a starting point to use for subsequent
149
+ # calls.
150
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
151
+ # will be added to the HTTP request.
152
+ #
153
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
154
+ #
155
+ def list_with_http_info(skip_token:nil, custom_headers:nil)
156
+ list_async(skip_token:skip_token, custom_headers:custom_headers).value!
157
+ end
158
+
159
+ #
160
+ # Lists the operations available from this provider.
161
+ #
162
+ # @param skip_token [String] A skip token is used to continue retrieving items
163
+ # after an operation returns a partial result. If a previous response contains
164
+ # a nextLink element, the value of the nextLink element will include a
165
+ # skipToken parameter that specifies a starting point to use for subsequent
166
+ # calls.
167
+ # @param [Hash{String => String}] A hash of custom headers that will be added
168
+ # to the HTTP request.
169
+ #
170
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
171
+ #
172
+ def list_async(skip_token:nil, custom_headers:nil)
173
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
174
+
175
+
176
+ request_headers = {}
177
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
178
+
179
+ # Set Headers
180
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
181
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
182
+ path_template = 'providers/Microsoft.AppConfiguration/operations'
183
+
184
+ request_url = @base_url || @client.base_url
185
+
186
+ options = {
187
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
188
+ query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
189
+ headers: request_headers.merge(custom_headers || {}),
190
+ base_url: request_url
191
+ }
192
+ promise = @client.make_request_async(:get, path_template, options)
193
+
194
+ promise = promise.then do |result|
195
+ http_response = result.response
196
+ status_code = http_response.status
197
+ response_content = http_response.body
198
+ unless status_code == 200
199
+ error_model = JSON.load(response_content)
200
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
201
+ end
202
+
203
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
204
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
205
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
206
+ # Deserialize Response
207
+ if status_code == 200
208
+ begin
209
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
210
+ result_mapper = Azure::Appconfiguration::Mgmt::V2019_02_01_preview::Models::OperationDefinitionListResult.mapper()
211
+ result.body = @client.deserialize(result_mapper, parsed_response)
212
+ rescue Exception => e
213
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
214
+ end
215
+ end
216
+
217
+ result
218
+ end
219
+
220
+ promise.execute
221
+ end
222
+
223
+ #
224
+ # Lists the operations available from this provider.
225
+ #
226
+ # @param next_page_link [String] The NextLink from the previous successful call
227
+ # to List operation.
228
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
229
+ # will be added to the HTTP request.
230
+ #
231
+ # @return [OperationDefinitionListResult] operation results.
232
+ #
233
+ def list_next(next_page_link, custom_headers:nil)
234
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
235
+ response.body unless response.nil?
236
+ end
237
+
238
+ #
239
+ # Lists the operations available from this provider.
240
+ #
241
+ # @param next_page_link [String] The NextLink from the previous successful call
242
+ # to List operation.
243
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
244
+ # will be added to the HTTP request.
245
+ #
246
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
247
+ #
248
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
249
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
250
+ end
251
+
252
+ #
253
+ # Lists the operations available from this provider.
254
+ #
255
+ # @param next_page_link [String] The NextLink from the previous successful call
256
+ # to List operation.
257
+ # @param [Hash{String => String}] A hash of custom headers that will be added
258
+ # to the HTTP request.
259
+ #
260
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
261
+ #
262
+ def list_next_async(next_page_link, custom_headers:nil)
263
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
264
+
265
+
266
+ request_headers = {}
267
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
268
+
269
+ # Set Headers
270
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
271
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
272
+ path_template = '{nextLink}'
273
+
274
+ request_url = @base_url || @client.base_url
275
+
276
+ options = {
277
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
278
+ skip_encoding_path_params: {'nextLink' => next_page_link},
279
+ headers: request_headers.merge(custom_headers || {}),
280
+ base_url: request_url
281
+ }
282
+ promise = @client.make_request_async(:get, path_template, options)
283
+
284
+ promise = promise.then do |result|
285
+ http_response = result.response
286
+ status_code = http_response.status
287
+ response_content = http_response.body
288
+ unless status_code == 200
289
+ error_model = JSON.load(response_content)
290
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
291
+ end
292
+
293
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
294
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
295
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
296
+ # Deserialize Response
297
+ if status_code == 200
298
+ begin
299
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
300
+ result_mapper = Azure::Appconfiguration::Mgmt::V2019_02_01_preview::Models::OperationDefinitionListResult.mapper()
301
+ result.body = @client.deserialize(result_mapper, parsed_response)
302
+ rescue Exception => e
303
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
304
+ end
305
+ end
306
+
307
+ result
308
+ end
309
+
310
+ promise.execute
311
+ end
312
+
313
+ #
314
+ # Lists the operations available from this provider.
315
+ #
316
+ # @param skip_token [String] A skip token is used to continue retrieving items
317
+ # after an operation returns a partial result. If a previous response contains
318
+ # a nextLink element, the value of the nextLink element will include a
319
+ # skipToken parameter that specifies a starting point to use for subsequent
320
+ # calls.
321
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
322
+ # will be added to the HTTP request.
323
+ #
324
+ # @return [OperationDefinitionListResult] which provide lazy access to pages of
325
+ # the response.
326
+ #
327
+ def list_as_lazy(skip_token:nil, custom_headers:nil)
328
+ response = list_async(skip_token:skip_token, custom_headers:custom_headers).value!
329
+ unless response.nil?
330
+ page = response.body
331
+ page.next_method = Proc.new do |next_page_link|
332
+ list_next_async(next_page_link, custom_headers:custom_headers)
333
+ end
334
+ page
335
+ end
336
+ end
337
+
338
+ end
339
+ end