azure_mgmt_service_fabric 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2016-09-01/generated/azure_mgmt_service_fabric/cluster_versions.rb +51 -44
  3. data/lib/2016-09-01/generated/azure_mgmt_service_fabric/clusters.rb +62 -58
  4. data/lib/2016-09-01/generated/azure_mgmt_service_fabric/operations.rb +15 -13
  5. data/lib/2016-09-01/generated/azure_mgmt_service_fabric/service_fabric_management_client.rb +4 -1
  6. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric.rb +91 -0
  7. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/application.rb +691 -0
  8. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/application_type.rb +487 -0
  9. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/cluster_versions.rb +471 -0
  10. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/clusters.rb +778 -0
  11. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/application_health_policy.rb +104 -0
  12. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/application_metric_description.rb +113 -0
  13. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/application_parameter.rb +58 -0
  14. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/application_resource.rb +206 -0
  15. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/application_resource_list.rb +55 -0
  16. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/application_resource_update.rb +182 -0
  17. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/application_type_resource.rb +83 -0
  18. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/application_type_resource_list.rb +55 -0
  19. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/application_upgrade_policy.rb +81 -0
  20. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/available_operation_display.rb +79 -0
  21. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/azure_active_directory.rb +68 -0
  22. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/certificate_description.rb +70 -0
  23. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/client_certificate_common_name.rb +70 -0
  24. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/client_certificate_thumbprint.rb +59 -0
  25. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/cluster.rb +398 -0
  26. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/cluster_code_versions_list_result.rb +66 -0
  27. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/cluster_code_versions_result.rb +102 -0
  28. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/cluster_health_policy.rb +70 -0
  29. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/cluster_list_result.rb +66 -0
  30. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/cluster_update_parameters.rb +246 -0
  31. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/cluster_upgrade_delta_health_policy.rb +97 -0
  32. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/cluster_upgrade_policy.rb +156 -0
  33. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/cluster_version_details.rb +69 -0
  34. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/diagnostics_storage_account_config.rb +91 -0
  35. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/endpoint_range_description.rb +57 -0
  36. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/error_model.rb +57 -0
  37. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/named_partition_scheme_description.rb +81 -0
  38. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/node_type_description.rb +189 -0
  39. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/operation_list_result.rb +101 -0
  40. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/operation_result.rb +81 -0
  41. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/partition_scheme_description.rb +48 -0
  42. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/provisioning_state.rb +18 -0
  43. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/proxy_resource.rb +82 -0
  44. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/resource.rb +101 -0
  45. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/rolling_upgrade_monitoring_policy.rb +90 -0
  46. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/service_correlation_description.rb +58 -0
  47. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/service_load_metric_description.rb +98 -0
  48. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/service_placement_policy_description.rb +46 -0
  49. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/service_properties.rb +151 -0
  50. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/service_properties_base.rb +123 -0
  51. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/service_resource.rb +207 -0
  52. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/service_resource_list.rb +55 -0
  53. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/service_resource_update.rb +169 -0
  54. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/service_type_delta_health_policy.rb +51 -0
  55. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/service_type_health_policy.rb +108 -0
  56. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/service_type_health_policy_map_item.rb +60 -0
  57. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/service_update_properties.rb +113 -0
  58. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/settings_parameter_description.rb +57 -0
  59. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/settings_section_description.rb +67 -0
  60. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/singleton_partition_scheme_description.rb +51 -0
  61. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/stateful_service_properties.rb +227 -0
  62. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/stateful_service_update_properties.rb +186 -0
  63. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/stateless_service_properties.rb +161 -0
  64. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/stateless_service_update_properties.rb +133 -0
  65. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/uniform_int64range_partition_scheme_description.rb +91 -0
  66. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/version_resource.rb +115 -0
  67. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/models/version_resource_list.rb +55 -0
  68. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/module_definition.rb +9 -0
  69. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/operations.rb +230 -0
  70. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/service.rb +735 -0
  71. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/service_fabric_management_client.rb +147 -0
  72. data/lib/2017-07-01-preview/generated/azure_mgmt_service_fabric/version.rb +559 -0
  73. data/lib/azure_mgmt_service_fabric.rb +1 -0
  74. data/lib/profiles/latest/modules/servicefabric_profile_module.rb +269 -114
  75. data/lib/profiles/latest/servicefabric_latest_profile_client.rb +28 -9
  76. data/lib/profiles/latest/servicefabric_module_definition.rb +0 -1
  77. data/lib/version.rb +1 -1
  78. metadata +70 -3
@@ -0,0 +1,487 @@
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::ServiceFabric::Mgmt::V2017_07_01_preview
7
+ #
8
+ # Azure Service Fabric Resource Provider API Client
9
+ #
10
+ class ApplicationType
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ApplicationType class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ServiceFabricManagementClient] reference to the ServiceFabricManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Returns an application type name resource.
26
+ #
27
+ # @param subscription_id [String] The customer subscription identifier
28
+ # @param resource_group_name [String] The name of the resource group.
29
+ # @param cluster_name [String] The name of the cluster resource
30
+ # @param application_type_name [String] The name of the application type name
31
+ # resource
32
+ # @param api_version [String] The version of the API.
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ # @return [ApplicationTypeResource] operation results.
37
+ #
38
+ def get(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:nil)
39
+ response = get_async(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:custom_headers).value!
40
+ response.body unless response.nil?
41
+ end
42
+
43
+ #
44
+ # Returns an application type name resource.
45
+ #
46
+ # @param subscription_id [String] The customer subscription identifier
47
+ # @param resource_group_name [String] The name of the resource group.
48
+ # @param cluster_name [String] The name of the cluster resource
49
+ # @param application_type_name [String] The name of the application type name
50
+ # resource
51
+ # @param api_version [String] The version of the API.
52
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
53
+ # will be added to the HTTP request.
54
+ #
55
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
56
+ #
57
+ def get_with_http_info(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:nil)
58
+ get_async(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:custom_headers).value!
59
+ end
60
+
61
+ #
62
+ # Returns an application type name resource.
63
+ #
64
+ # @param subscription_id [String] The customer subscription identifier
65
+ # @param resource_group_name [String] The name of the resource group.
66
+ # @param cluster_name [String] The name of the cluster resource
67
+ # @param application_type_name [String] The name of the application type name
68
+ # resource
69
+ # @param api_version [String] The version of the API.
70
+ # @param [Hash{String => String}] A hash of custom headers that will be added
71
+ # to the HTTP request.
72
+ #
73
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
+ #
75
+ def get_async(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:nil)
76
+ fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
77
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
78
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
79
+ fail ArgumentError, 'application_type_name is nil' if application_type_name.nil?
80
+ fail ArgumentError, 'api_version is nil' if api_version.nil?
81
+
82
+
83
+ request_headers = {}
84
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
85
+
86
+ # Set Headers
87
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
88
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
89
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}'
90
+
91
+ request_url = @base_url || @client.base_url
92
+
93
+ options = {
94
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
95
+ path_params: {'subscriptionId' => subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'applicationTypeName' => application_type_name},
96
+ query_params: {'api-version' => api_version},
97
+ headers: request_headers.merge(custom_headers || {}),
98
+ base_url: request_url
99
+ }
100
+ promise = @client.make_request_async(:get, path_template, options)
101
+
102
+ promise = promise.then do |result|
103
+ http_response = result.response
104
+ status_code = http_response.status
105
+ response_content = http_response.body
106
+ unless status_code == 200
107
+ error_model = JSON.load(response_content)
108
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
109
+ end
110
+
111
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
112
+ # Deserialize Response
113
+ if status_code == 200
114
+ begin
115
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
116
+ result_mapper = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationTypeResource.mapper()
117
+ result.body = @client.deserialize(result_mapper, parsed_response)
118
+ rescue Exception => e
119
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
120
+ end
121
+ end
122
+
123
+ result
124
+ end
125
+
126
+ promise.execute
127
+ end
128
+
129
+ #
130
+ # Creates the application type name resource.
131
+ #
132
+ # @param subscription_id [String] The customer subscription identifier
133
+ # @param resource_group_name [String] The name of the resource group.
134
+ # @param cluster_name [String] The name of the cluster resource
135
+ # @param application_type_name [String] The name of the application type name
136
+ # resource
137
+ # @param api_version [String] The version of the API.
138
+ # @param parameters [ApplicationTypeResource] The application type name
139
+ # resource.
140
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
141
+ # will be added to the HTTP request.
142
+ #
143
+ # @return [ApplicationTypeResource] operation results.
144
+ #
145
+ def put(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, parameters, custom_headers:nil)
146
+ response = put_async(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, parameters, custom_headers:custom_headers).value!
147
+ response.body unless response.nil?
148
+ end
149
+
150
+ #
151
+ # Creates the application type name resource.
152
+ #
153
+ # @param subscription_id [String] The customer subscription identifier
154
+ # @param resource_group_name [String] The name of the resource group.
155
+ # @param cluster_name [String] The name of the cluster resource
156
+ # @param application_type_name [String] The name of the application type name
157
+ # resource
158
+ # @param api_version [String] The version of the API.
159
+ # @param parameters [ApplicationTypeResource] The application type name
160
+ # resource.
161
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
162
+ # will be added to the HTTP request.
163
+ #
164
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
165
+ #
166
+ def put_with_http_info(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, parameters, custom_headers:nil)
167
+ put_async(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, parameters, custom_headers:custom_headers).value!
168
+ end
169
+
170
+ #
171
+ # Creates the application type name resource.
172
+ #
173
+ # @param subscription_id [String] The customer subscription identifier
174
+ # @param resource_group_name [String] The name of the resource group.
175
+ # @param cluster_name [String] The name of the cluster resource
176
+ # @param application_type_name [String] The name of the application type name
177
+ # resource
178
+ # @param api_version [String] The version of the API.
179
+ # @param parameters [ApplicationTypeResource] The application type name
180
+ # resource.
181
+ # @param [Hash{String => String}] A hash of custom headers that will be added
182
+ # to the HTTP request.
183
+ #
184
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
185
+ #
186
+ def put_async(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, parameters, custom_headers:nil)
187
+ fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
188
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
189
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
190
+ fail ArgumentError, 'application_type_name is nil' if application_type_name.nil?
191
+ fail ArgumentError, 'api_version is nil' if api_version.nil?
192
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
193
+
194
+
195
+ request_headers = {}
196
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
197
+
198
+ # Set Headers
199
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
200
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
201
+
202
+ # Serialize Request
203
+ request_mapper = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationTypeResource.mapper()
204
+ request_content = @client.serialize(request_mapper, parameters)
205
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
206
+
207
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}'
208
+
209
+ request_url = @base_url || @client.base_url
210
+
211
+ options = {
212
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
213
+ path_params: {'subscriptionId' => subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'applicationTypeName' => application_type_name},
214
+ query_params: {'api-version' => api_version},
215
+ body: request_content,
216
+ headers: request_headers.merge(custom_headers || {}),
217
+ base_url: request_url
218
+ }
219
+ promise = @client.make_request_async(:put, path_template, options)
220
+
221
+ promise = promise.then do |result|
222
+ http_response = result.response
223
+ status_code = http_response.status
224
+ response_content = http_response.body
225
+ unless status_code == 200
226
+ error_model = JSON.load(response_content)
227
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
228
+ end
229
+
230
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
231
+ # Deserialize Response
232
+ if status_code == 200
233
+ begin
234
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
235
+ result_mapper = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationTypeResource.mapper()
236
+ result.body = @client.deserialize(result_mapper, parsed_response)
237
+ rescue Exception => e
238
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
239
+ end
240
+ end
241
+
242
+ result
243
+ end
244
+
245
+ promise.execute
246
+ end
247
+
248
+ #
249
+ # Deletes the application type name resource.
250
+ #
251
+ # @param subscription_id [String] The customer subscription identifier
252
+ # @param resource_group_name [String] The name of the resource group.
253
+ # @param cluster_name [String] The name of the cluster resource
254
+ # @param application_type_name [String] The name of the application type name
255
+ # resource
256
+ # @param api_version [String] The version of the API.
257
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
258
+ # will be added to the HTTP request.
259
+ #
260
+ def delete(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:nil)
261
+ response = delete_async(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:custom_headers).value!
262
+ nil
263
+ end
264
+
265
+ #
266
+ # @param subscription_id [String] The customer subscription identifier
267
+ # @param resource_group_name [String] The name of the resource group.
268
+ # @param cluster_name [String] The name of the cluster resource
269
+ # @param application_type_name [String] The name of the application type name
270
+ # resource
271
+ # @param api_version [String] The version of the API.
272
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
273
+ # will be added to the HTTP request.
274
+ #
275
+ # @return [Concurrent::Promise] promise which provides async access to http
276
+ # response.
277
+ #
278
+ def delete_async(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:nil)
279
+ # Send request
280
+ promise = begin_delete_async(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:custom_headers)
281
+
282
+ promise = promise.then do |response|
283
+ # Defining deserialization method.
284
+ deserialize_method = lambda do |parsed_response|
285
+ end
286
+
287
+ # Waiting for response.
288
+ @client.get_long_running_operation_result(response, deserialize_method)
289
+ end
290
+
291
+ promise
292
+ end
293
+
294
+ #
295
+ # Returns all application type names in the specified cluster.
296
+ #
297
+ # @param subscription_id [String] The customer subscription identifier
298
+ # @param resource_group_name [String] The name of the resource group.
299
+ # @param cluster_name [String] The name of the cluster resource
300
+ # @param api_version [String] The version of the API.
301
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
302
+ # will be added to the HTTP request.
303
+ #
304
+ # @return [ApplicationTypeResourceList] operation results.
305
+ #
306
+ def list(subscription_id, resource_group_name, cluster_name, api_version, custom_headers:nil)
307
+ response = list_async(subscription_id, resource_group_name, cluster_name, api_version, custom_headers:custom_headers).value!
308
+ response.body unless response.nil?
309
+ end
310
+
311
+ #
312
+ # Returns all application type names in the specified cluster.
313
+ #
314
+ # @param subscription_id [String] The customer subscription identifier
315
+ # @param resource_group_name [String] The name of the resource group.
316
+ # @param cluster_name [String] The name of the cluster resource
317
+ # @param api_version [String] The version of the API.
318
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
319
+ # will be added to the HTTP request.
320
+ #
321
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
322
+ #
323
+ def list_with_http_info(subscription_id, resource_group_name, cluster_name, api_version, custom_headers:nil)
324
+ list_async(subscription_id, resource_group_name, cluster_name, api_version, custom_headers:custom_headers).value!
325
+ end
326
+
327
+ #
328
+ # Returns all application type names in the specified cluster.
329
+ #
330
+ # @param subscription_id [String] The customer subscription identifier
331
+ # @param resource_group_name [String] The name of the resource group.
332
+ # @param cluster_name [String] The name of the cluster resource
333
+ # @param api_version [String] The version of the API.
334
+ # @param [Hash{String => String}] A hash of custom headers that will be added
335
+ # to the HTTP request.
336
+ #
337
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
338
+ #
339
+ def list_async(subscription_id, resource_group_name, cluster_name, api_version, custom_headers:nil)
340
+ fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
341
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
342
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
343
+ fail ArgumentError, 'api_version is nil' if api_version.nil?
344
+
345
+
346
+ request_headers = {}
347
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
348
+
349
+ # Set Headers
350
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
351
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
352
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes'
353
+
354
+ request_url = @base_url || @client.base_url
355
+
356
+ options = {
357
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
358
+ path_params: {'subscriptionId' => subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
359
+ query_params: {'api-version' => api_version},
360
+ headers: request_headers.merge(custom_headers || {}),
361
+ base_url: request_url
362
+ }
363
+ promise = @client.make_request_async(:get, path_template, options)
364
+
365
+ promise = promise.then do |result|
366
+ http_response = result.response
367
+ status_code = http_response.status
368
+ response_content = http_response.body
369
+ unless status_code == 200
370
+ error_model = JSON.load(response_content)
371
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
372
+ end
373
+
374
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
375
+ # Deserialize Response
376
+ if status_code == 200
377
+ begin
378
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
379
+ result_mapper = Azure::ServiceFabric::Mgmt::V2017_07_01_preview::Models::ApplicationTypeResourceList.mapper()
380
+ result.body = @client.deserialize(result_mapper, parsed_response)
381
+ rescue Exception => e
382
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
383
+ end
384
+ end
385
+
386
+ result
387
+ end
388
+
389
+ promise.execute
390
+ end
391
+
392
+ #
393
+ # Deletes the application type name resource.
394
+ #
395
+ # @param subscription_id [String] The customer subscription identifier
396
+ # @param resource_group_name [String] The name of the resource group.
397
+ # @param cluster_name [String] The name of the cluster resource
398
+ # @param application_type_name [String] The name of the application type name
399
+ # resource
400
+ # @param api_version [String] The version of the API.
401
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
402
+ # will be added to the HTTP request.
403
+ #
404
+ #
405
+ def begin_delete(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:nil)
406
+ response = begin_delete_async(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:custom_headers).value!
407
+ nil
408
+ end
409
+
410
+ #
411
+ # Deletes the application type name resource.
412
+ #
413
+ # @param subscription_id [String] The customer subscription identifier
414
+ # @param resource_group_name [String] The name of the resource group.
415
+ # @param cluster_name [String] The name of the cluster resource
416
+ # @param application_type_name [String] The name of the application type name
417
+ # resource
418
+ # @param api_version [String] The version of the API.
419
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
420
+ # will be added to the HTTP request.
421
+ #
422
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
423
+ #
424
+ def begin_delete_with_http_info(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:nil)
425
+ begin_delete_async(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:custom_headers).value!
426
+ end
427
+
428
+ #
429
+ # Deletes the application type name resource.
430
+ #
431
+ # @param subscription_id [String] The customer subscription identifier
432
+ # @param resource_group_name [String] The name of the resource group.
433
+ # @param cluster_name [String] The name of the cluster resource
434
+ # @param application_type_name [String] The name of the application type name
435
+ # resource
436
+ # @param api_version [String] The version of the API.
437
+ # @param [Hash{String => String}] A hash of custom headers that will be added
438
+ # to the HTTP request.
439
+ #
440
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
441
+ #
442
+ def begin_delete_async(subscription_id, resource_group_name, cluster_name, application_type_name, api_version, custom_headers:nil)
443
+ fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
444
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
445
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
446
+ fail ArgumentError, 'application_type_name is nil' if application_type_name.nil?
447
+ fail ArgumentError, 'api_version is nil' if api_version.nil?
448
+
449
+
450
+ request_headers = {}
451
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
452
+
453
+ # Set Headers
454
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
455
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
456
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}'
457
+
458
+ request_url = @base_url || @client.base_url
459
+
460
+ options = {
461
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
462
+ path_params: {'subscriptionId' => subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'applicationTypeName' => application_type_name},
463
+ query_params: {'api-version' => api_version},
464
+ headers: request_headers.merge(custom_headers || {}),
465
+ base_url: request_url
466
+ }
467
+ promise = @client.make_request_async(:delete, path_template, options)
468
+
469
+ promise = promise.then do |result|
470
+ http_response = result.response
471
+ status_code = http_response.status
472
+ response_content = http_response.body
473
+ unless status_code == 202 || status_code == 204
474
+ error_model = JSON.load(response_content)
475
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
476
+ end
477
+
478
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
479
+
480
+ result
481
+ end
482
+
483
+ promise.execute
484
+ end
485
+
486
+ end
487
+ end