azure_mgmt_web 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (220) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/LICENSE.txt +21 -0
  4. data/Rakefile +5 -0
  5. data/azure_mgmt_web.gemspec +35 -0
  6. data/lib/azure_mgmt_web.rb +236 -0
  7. data/lib/azure_mgmt_web/certificates.rb +693 -0
  8. data/lib/azure_mgmt_web/classic_mobile_services.rb +208 -0
  9. data/lib/azure_mgmt_web/domains.rb +459 -0
  10. data/lib/azure_mgmt_web/global.rb +793 -0
  11. data/lib/azure_mgmt_web/global_domain_registration.rb +351 -0
  12. data/lib/azure_mgmt_web/global_resource_groups.rb +91 -0
  13. data/lib/azure_mgmt_web/hosting_environments.rb +2629 -0
  14. data/lib/azure_mgmt_web/managed_hosting_environments.rb +652 -0
  15. data/lib/azure_mgmt_web/models/access_control_entry_action.rb +16 -0
  16. data/lib/azure_mgmt_web/models/address.rb +101 -0
  17. data/lib/azure_mgmt_web/models/address_response.rb +105 -0
  18. data/lib/azure_mgmt_web/models/api_definition_info.rb +56 -0
  19. data/lib/azure_mgmt_web/models/application_logs_config.rb +97 -0
  20. data/lib/azure_mgmt_web/models/arm_plan.rb +92 -0
  21. data/lib/azure_mgmt_web/models/auto_heal_action_type.rb +17 -0
  22. data/lib/azure_mgmt_web/models/auto_heal_actions.rb +89 -0
  23. data/lib/azure_mgmt_web/models/auto_heal_custom_action.rb +66 -0
  24. data/lib/azure_mgmt_web/models/auto_heal_rules.rb +80 -0
  25. data/lib/azure_mgmt_web/models/auto_heal_triggers.rb +122 -0
  26. data/lib/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb +82 -0
  27. data/lib/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb +78 -0
  28. data/lib/azure_mgmt_web/models/azure_resource_type.rb +16 -0
  29. data/lib/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb +70 -0
  30. data/lib/azure_mgmt_web/models/backup_item.rb +92 -0
  31. data/lib/azure_mgmt_web/models/backup_item_collection.rb +85 -0
  32. data/lib/azure_mgmt_web/models/backup_item_properties.rb +215 -0
  33. data/lib/azure_mgmt_web/models/backup_item_status.rb +24 -0
  34. data/lib/azure_mgmt_web/models/backup_request.rb +92 -0
  35. data/lib/azure_mgmt_web/models/backup_request_properties.rb +136 -0
  36. data/lib/azure_mgmt_web/models/backup_restore_operation_type.rb +17 -0
  37. data/lib/azure_mgmt_web/models/backup_schedule.rb +118 -0
  38. data/lib/azure_mgmt_web/models/built_in_authentication_provider.rb +19 -0
  39. data/lib/azure_mgmt_web/models/certificate.rb +92 -0
  40. data/lib/azure_mgmt_web/models/certificate_collection.rb +85 -0
  41. data/lib/azure_mgmt_web/models/certificate_properties.rb +194 -0
  42. data/lib/azure_mgmt_web/models/channels.rb +18 -0
  43. data/lib/azure_mgmt_web/models/classic_mobile_service.rb +92 -0
  44. data/lib/azure_mgmt_web/models/classic_mobile_service_collection.rb +85 -0
  45. data/lib/azure_mgmt_web/models/classic_mobile_service_properties.rb +56 -0
  46. data/lib/azure_mgmt_web/models/clone_ability_result.rb +17 -0
  47. data/lib/azure_mgmt_web/models/cloning_info.rb +152 -0
  48. data/lib/azure_mgmt_web/models/compute_mode_options.rb +16 -0
  49. data/lib/azure_mgmt_web/models/conn_string_info.rb +79 -0
  50. data/lib/azure_mgmt_web/models/conn_string_value_type_pair.rb +70 -0
  51. data/lib/azure_mgmt_web/models/connection_string_dictionary.rb +102 -0
  52. data/lib/azure_mgmt_web/models/contact.rb +136 -0
  53. data/lib/azure_mgmt_web/models/cors_settings.rb +59 -0
  54. data/lib/azure_mgmt_web/models/csm_move_resource_envelope.rb +66 -0
  55. data/lib/azure_mgmt_web/models/csm_publishing_profile_options.rb +59 -0
  56. data/lib/azure_mgmt_web/models/csm_site_recovery_entity.rb +80 -0
  57. data/lib/azure_mgmt_web/models/csm_slot_entity.rb +67 -0
  58. data/lib/azure_mgmt_web/models/csm_usage_quota.rb +102 -0
  59. data/lib/azure_mgmt_web/models/csm_usage_quota_collection.rb +85 -0
  60. data/lib/azure_mgmt_web/models/csr.rb +92 -0
  61. data/lib/azure_mgmt_web/models/csr_properties.rb +110 -0
  62. data/lib/azure_mgmt_web/models/custom_host_name_dns_record_type.rb +16 -0
  63. data/lib/azure_mgmt_web/models/database_backup_setting.rb +91 -0
  64. data/lib/azure_mgmt_web/models/database_server_type.rb +18 -0
  65. data/lib/azure_mgmt_web/models/deleted_site.rb +92 -0
  66. data/lib/azure_mgmt_web/models/deleted_site_collection.rb +85 -0
  67. data/lib/azure_mgmt_web/models/deleted_site_properties.rb +365 -0
  68. data/lib/azure_mgmt_web/models/deployment.rb +92 -0
  69. data/lib/azure_mgmt_web/models/deployment_collection.rb +85 -0
  70. data/lib/azure_mgmt_web/models/deployment_properties.rb +142 -0
  71. data/lib/azure_mgmt_web/models/domain.rb +92 -0
  72. data/lib/azure_mgmt_web/models/domain_availablility_check_result.rb +79 -0
  73. data/lib/azure_mgmt_web/models/domain_collection.rb +85 -0
  74. data/lib/azure_mgmt_web/models/domain_control_center_sso_request.rb +75 -0
  75. data/lib/azure_mgmt_web/models/domain_properties.rb +262 -0
  76. data/lib/azure_mgmt_web/models/domain_purchase_consent.rb +79 -0
  77. data/lib/azure_mgmt_web/models/domain_recommendation_search_parameters.rb +67 -0
  78. data/lib/azure_mgmt_web/models/domain_registration_input.rb +92 -0
  79. data/lib/azure_mgmt_web/models/domain_registration_input_properties.rb +271 -0
  80. data/lib/azure_mgmt_web/models/domain_status.rb +35 -0
  81. data/lib/azure_mgmt_web/models/domain_type.rb +16 -0
  82. data/lib/azure_mgmt_web/models/enabled_config.rb +56 -0
  83. data/lib/azure_mgmt_web/models/experiments.rb +77 -0
  84. data/lib/azure_mgmt_web/models/file_system_application_logs_config.rb +60 -0
  85. data/lib/azure_mgmt_web/models/file_system_http_logs_config.rb +82 -0
  86. data/lib/azure_mgmt_web/models/frequency_unit.rb +16 -0
  87. data/lib/azure_mgmt_web/models/geo_region.rb +92 -0
  88. data/lib/azure_mgmt_web/models/geo_region_collection.rb +85 -0
  89. data/lib/azure_mgmt_web/models/geo_region_properties.rb +74 -0
  90. data/lib/azure_mgmt_web/models/handler_mapping.rb +79 -0
  91. data/lib/azure_mgmt_web/models/host_name.rb +120 -0
  92. data/lib/azure_mgmt_web/models/host_name_binding.rb +92 -0
  93. data/lib/azure_mgmt_web/models/host_name_binding_collection.rb +85 -0
  94. data/lib/azure_mgmt_web/models/host_name_binding_properties.rb +124 -0
  95. data/lib/azure_mgmt_web/models/host_name_ssl_state.rb +98 -0
  96. data/lib/azure_mgmt_web/models/host_name_type.rb +16 -0
  97. data/lib/azure_mgmt_web/models/hosting_environment.rb +92 -0
  98. data/lib/azure_mgmt_web/models/hosting_environment_collection.rb +85 -0
  99. data/lib/azure_mgmt_web/models/hosting_environment_diagnostics.rb +65 -0
  100. data/lib/azure_mgmt_web/models/hosting_environment_profile.rb +78 -0
  101. data/lib/azure_mgmt_web/models/hosting_environment_properties.rb +452 -0
  102. data/lib/azure_mgmt_web/models/hosting_environment_status.rb +18 -0
  103. data/lib/azure_mgmt_web/models/http_logs_config.rb +80 -0
  104. data/lib/azure_mgmt_web/models/internal_load_balancing_mode.rb +17 -0
  105. data/lib/azure_mgmt_web/models/key_value_pair_string_string.rb +65 -0
  106. data/lib/azure_mgmt_web/models/localizable_string.rb +65 -0
  107. data/lib/azure_mgmt_web/models/log_level.rb +19 -0
  108. data/lib/azure_mgmt_web/models/managed_hosting_environment.rb +92 -0
  109. data/lib/azure_mgmt_web/models/managed_hosting_environment_collection.rb +85 -0
  110. data/lib/azure_mgmt_web/models/managed_hosting_environment_properties.rb +179 -0
  111. data/lib/azure_mgmt_web/models/managed_hosting_environment_status.rb +17 -0
  112. data/lib/azure_mgmt_web/models/managed_pipeline_mode.rb +16 -0
  113. data/lib/azure_mgmt_web/models/metric_availabilily.rb +66 -0
  114. data/lib/azure_mgmt_web/models/metric_definition.rb +92 -0
  115. data/lib/azure_mgmt_web/models/metric_definition_collection.rb +85 -0
  116. data/lib/azure_mgmt_web/models/metric_definition_properties.rb +113 -0
  117. data/lib/azure_mgmt_web/models/name_identifier.rb +56 -0
  118. data/lib/azure_mgmt_web/models/name_identifier_collection.rb +85 -0
  119. data/lib/azure_mgmt_web/models/name_value_pair.rb +65 -0
  120. data/lib/azure_mgmt_web/models/network_access_control_entry.rb +88 -0
  121. data/lib/azure_mgmt_web/models/network_features.rb +94 -0
  122. data/lib/azure_mgmt_web/models/network_features_properties.rb +102 -0
  123. data/lib/azure_mgmt_web/models/notification_level.rb +18 -0
  124. data/lib/azure_mgmt_web/models/premier_add_on_request.rb +107 -0
  125. data/lib/azure_mgmt_web/models/provisioning_state.rb +19 -0
  126. data/lib/azure_mgmt_web/models/ramp_up_rule.rb +147 -0
  127. data/lib/azure_mgmt_web/models/recommendation.rb +210 -0
  128. data/lib/azure_mgmt_web/models/recommendation_rule.rb +146 -0
  129. data/lib/azure_mgmt_web/models/relay_service_connection_entity.rb +92 -0
  130. data/lib/azure_mgmt_web/models/relay_service_connection_entity_properties.rb +111 -0
  131. data/lib/azure_mgmt_web/models/requests_based_trigger.rb +66 -0
  132. data/lib/azure_mgmt_web/models/resource_metric.rb +171 -0
  133. data/lib/azure_mgmt_web/models/resource_metric_collection.rb +85 -0
  134. data/lib/azure_mgmt_web/models/resource_metric_name.rb +65 -0
  135. data/lib/azure_mgmt_web/models/resource_metric_value.rb +106 -0
  136. data/lib/azure_mgmt_web/models/resource_name_availability.rb +78 -0
  137. data/lib/azure_mgmt_web/models/resource_name_availability_request.rb +74 -0
  138. data/lib/azure_mgmt_web/models/restore_request.rb +92 -0
  139. data/lib/azure_mgmt_web/models/restore_request_properties.rb +162 -0
  140. data/lib/azure_mgmt_web/models/restore_response.rb +92 -0
  141. data/lib/azure_mgmt_web/models/restore_response_properties.rb +57 -0
  142. data/lib/azure_mgmt_web/models/routing_rule.rb +58 -0
  143. data/lib/azure_mgmt_web/models/server_farm_collection.rb +85 -0
  144. data/lib/azure_mgmt_web/models/server_farm_with_rich_sku.rb +108 -0
  145. data/lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb +164 -0
  146. data/lib/azure_mgmt_web/models/site.rb +92 -0
  147. data/lib/azure_mgmt_web/models/site_auth_settings.rb +379 -0
  148. data/lib/azure_mgmt_web/models/site_availability_state.rb +17 -0
  149. data/lib/azure_mgmt_web/models/site_cloneability.rb +157 -0
  150. data/lib/azure_mgmt_web/models/site_cloneability_criterion.rb +65 -0
  151. data/lib/azure_mgmt_web/models/site_collection.rb +85 -0
  152. data/lib/azure_mgmt_web/models/site_config.rb +92 -0
  153. data/lib/azure_mgmt_web/models/site_config_properties.rb +554 -0
  154. data/lib/azure_mgmt_web/models/site_instance.rb +92 -0
  155. data/lib/azure_mgmt_web/models/site_instance_collection.rb +85 -0
  156. data/lib/azure_mgmt_web/models/site_instance_properties.rb +56 -0
  157. data/lib/azure_mgmt_web/models/site_limits.rb +77 -0
  158. data/lib/azure_mgmt_web/models/site_load_balancing.rb +19 -0
  159. data/lib/azure_mgmt_web/models/site_logs_config.rb +92 -0
  160. data/lib/azure_mgmt_web/models/site_logs_config_properties.rb +110 -0
  161. data/lib/azure_mgmt_web/models/site_properties.rb +354 -0
  162. data/lib/azure_mgmt_web/models/site_source_control.rb +92 -0
  163. data/lib/azure_mgmt_web/models/site_source_control_properties.rb +92 -0
  164. data/lib/azure_mgmt_web/models/sku_capacity.rb +89 -0
  165. data/lib/azure_mgmt_web/models/sku_description.rb +93 -0
  166. data/lib/azure_mgmt_web/models/sku_info.rb +87 -0
  167. data/lib/azure_mgmt_web/models/sku_info_collection.rb +85 -0
  168. data/lib/azure_mgmt_web/models/slot_config_names.rb +69 -0
  169. data/lib/azure_mgmt_web/models/slot_config_names_resource.rb +92 -0
  170. data/lib/azure_mgmt_web/models/slot_config_names_resource_properties.rb +66 -0
  171. data/lib/azure_mgmt_web/models/slot_difference.rb +93 -0
  172. data/lib/azure_mgmt_web/models/slot_difference_collection.rb +85 -0
  173. data/lib/azure_mgmt_web/models/slot_difference_properties.rb +113 -0
  174. data/lib/azure_mgmt_web/models/slow_requests_based_trigger.rb +75 -0
  175. data/lib/azure_mgmt_web/models/source_control.rb +92 -0
  176. data/lib/azure_mgmt_web/models/source_control_collection.rb +85 -0
  177. data/lib/azure_mgmt_web/models/source_control_properties.rb +94 -0
  178. data/lib/azure_mgmt_web/models/ssl_state.rb +17 -0
  179. data/lib/azure_mgmt_web/models/stamp_capacity.rb +155 -0
  180. data/lib/azure_mgmt_web/models/stamp_capacity_collection.rb +85 -0
  181. data/lib/azure_mgmt_web/models/status_codes_based_trigger.rb +96 -0
  182. data/lib/azure_mgmt_web/models/status_options.rb +16 -0
  183. data/lib/azure_mgmt_web/models/string_dictionary.rb +86 -0
  184. data/lib/azure_mgmt_web/models/tld_legal_agreement.rb +83 -0
  185. data/lib/azure_mgmt_web/models/tld_legal_agreement_collection.rb +85 -0
  186. data/lib/azure_mgmt_web/models/top_level_domain.rb +92 -0
  187. data/lib/azure_mgmt_web/models/top_level_domain_agreement_option.rb +57 -0
  188. data/lib/azure_mgmt_web/models/top_level_domain_collection.rb +85 -0
  189. data/lib/azure_mgmt_web/models/top_level_domain_properties.rb +66 -0
  190. data/lib/azure_mgmt_web/models/unauthenticated_client_action.rb +16 -0
  191. data/lib/azure_mgmt_web/models/usage.rb +92 -0
  192. data/lib/azure_mgmt_web/models/usage_collection.rb +85 -0
  193. data/lib/azure_mgmt_web/models/usage_properties.rb +136 -0
  194. data/lib/azure_mgmt_web/models/usage_state.rb +16 -0
  195. data/lib/azure_mgmt_web/models/user.rb +92 -0
  196. data/lib/azure_mgmt_web/models/user_properties.rb +74 -0
  197. data/lib/azure_mgmt_web/models/virtual_application.rb +103 -0
  198. data/lib/azure_mgmt_web/models/virtual_directory.rb +65 -0
  199. data/lib/azure_mgmt_web/models/virtual_ipmapping.rb +85 -0
  200. data/lib/azure_mgmt_web/models/virtual_network_profile.rb +83 -0
  201. data/lib/azure_mgmt_web/models/vnet_gateway.rb +93 -0
  202. data/lib/azure_mgmt_web/models/vnet_gateway_properties.rb +65 -0
  203. data/lib/azure_mgmt_web/models/vnet_info.rb +93 -0
  204. data/lib/azure_mgmt_web/models/vnet_info_properties.rb +106 -0
  205. data/lib/azure_mgmt_web/models/vnet_route.rb +92 -0
  206. data/lib/azure_mgmt_web/models/vnet_route_properties.rb +97 -0
  207. data/lib/azure_mgmt_web/models/worker_pool.rb +108 -0
  208. data/lib/azure_mgmt_web/models/worker_pool_collection.rb +85 -0
  209. data/lib/azure_mgmt_web/models/worker_pool_properties.rb +100 -0
  210. data/lib/azure_mgmt_web/models/worker_size_options.rb +18 -0
  211. data/lib/azure_mgmt_web/module_definition.rb +8 -0
  212. data/lib/azure_mgmt_web/provider.rb +346 -0
  213. data/lib/azure_mgmt_web/recommendations.rb +320 -0
  214. data/lib/azure_mgmt_web/server_farms.rb +1409 -0
  215. data/lib/azure_mgmt_web/sites.rb +11072 -0
  216. data/lib/azure_mgmt_web/top_level_domains.rb +226 -0
  217. data/lib/azure_mgmt_web/usage_operations.rb +88 -0
  218. data/lib/azure_mgmt_web/version.rb +8 -0
  219. data/lib/azure_mgmt_web/web_site_management_client.rb +118 -0
  220. metadata +346 -0
@@ -0,0 +1,208 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Web
7
+ #
8
+ # Use these APIs to manage Azure Websites resources through the Azure
9
+ # Resource Manager. All task operations conform to the HTTP/1.1 protocol
10
+ # specification and each operation returns an x-ms-request-id header that
11
+ # can be used to obtain information about the request. You must make sure
12
+ # that requests made to these resources are secure. For more information,
13
+ # see <a
14
+ # href="https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx">Authenticating
15
+ # Azure Resource Manager requests.</a>
16
+ #
17
+ class ClassicMobileServices
18
+ include Azure::ARM::Web::Models
19
+ include MsRestAzure
20
+
21
+ #
22
+ # Creates and initializes a new instance of the ClassicMobileServices class.
23
+ # @param client service class for accessing basic functionality.
24
+ #
25
+ def initialize(client)
26
+ @client = client
27
+ end
28
+
29
+ # @return reference to the WebSiteManagementClient
30
+ attr_reader :client
31
+
32
+ #
33
+ # Get all mobile services in a resource group.
34
+ #
35
+ # @param resource_group_name [String] Name of resource group
36
+ # @param [Hash{String => String}] The hash of custom headers need to be
37
+ # applied to HTTP request.
38
+ #
39
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
40
+ # response.
41
+ #
42
+ def get_classic_mobile_services(resource_group_name, custom_headers = nil)
43
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
44
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
45
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
46
+ request_headers = {}
47
+
48
+ # Set Headers
49
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
50
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
51
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/classicMobileServices'
52
+ options = {
53
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
54
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
55
+ query_params: {'api-version' => @client.api_version},
56
+ headers: request_headers.merge(custom_headers || {})
57
+ }
58
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
59
+ promise = request.run_promise do |req|
60
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
61
+ end
62
+
63
+ promise = promise.then do |http_response|
64
+ status_code = http_response.status
65
+ response_content = http_response.body
66
+ unless status_code == 200
67
+ error_model = JSON.load(response_content)
68
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
69
+ end
70
+
71
+ # Create Result
72
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
73
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
74
+ # Deserialize Response
75
+ if status_code == 200
76
+ begin
77
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
78
+ unless parsed_response.nil?
79
+ parsed_response = ClassicMobileServiceCollection.deserialize_object(parsed_response)
80
+ end
81
+ result.body = parsed_response
82
+ rescue Exception => e
83
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
84
+ end
85
+ end
86
+
87
+ result
88
+ end
89
+
90
+ promise.execute
91
+ end
92
+
93
+ #
94
+ # Get a mobile service.
95
+ #
96
+ # @param resource_group_name [String] Name of resource group
97
+ # @param name [String] Name of mobile service
98
+ # @param [Hash{String => String}] The hash of custom headers need to be
99
+ # applied to HTTP request.
100
+ #
101
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
102
+ # response.
103
+ #
104
+ def get_classic_mobile_service(resource_group_name, name, custom_headers = nil)
105
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
106
+ fail ArgumentError, 'name is nil' if name.nil?
107
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
108
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
109
+ request_headers = {}
110
+
111
+ # Set Headers
112
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
113
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
114
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/classicMobileServices/{name}'
115
+ options = {
116
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
117
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
118
+ query_params: {'api-version' => @client.api_version},
119
+ headers: request_headers.merge(custom_headers || {})
120
+ }
121
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
122
+ promise = request.run_promise do |req|
123
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
124
+ end
125
+
126
+ promise = promise.then do |http_response|
127
+ status_code = http_response.status
128
+ response_content = http_response.body
129
+ unless status_code == 200
130
+ error_model = JSON.load(response_content)
131
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
132
+ end
133
+
134
+ # Create Result
135
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
136
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
137
+ # Deserialize Response
138
+ if status_code == 200
139
+ begin
140
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
141
+ unless parsed_response.nil?
142
+ parsed_response = ClassicMobileService.deserialize_object(parsed_response)
143
+ end
144
+ result.body = parsed_response
145
+ rescue Exception => e
146
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
147
+ end
148
+ end
149
+
150
+ result
151
+ end
152
+
153
+ promise.execute
154
+ end
155
+
156
+ #
157
+ # Delete a mobile service.
158
+ #
159
+ # @param resource_group_name [String] Name of resource group
160
+ # @param name [String] Name of mobile service
161
+ # @param [Hash{String => String}] The hash of custom headers need to be
162
+ # applied to HTTP request.
163
+ #
164
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
165
+ # response.
166
+ #
167
+ def delete_classic_mobile_service(resource_group_name, name, custom_headers = nil)
168
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
169
+ fail ArgumentError, 'name is nil' if name.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
+ request_headers = {}
173
+
174
+ # Set Headers
175
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
176
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
177
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/classicMobileServices/{name}'
178
+ options = {
179
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
180
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
181
+ query_params: {'api-version' => @client.api_version},
182
+ headers: request_headers.merge(custom_headers || {})
183
+ }
184
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :delete, options)
185
+ promise = request.run_promise do |req|
186
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
187
+ end
188
+
189
+ promise = promise.then do |http_response|
190
+ status_code = http_response.status
191
+ response_content = http_response.body
192
+ unless status_code == 200
193
+ error_model = JSON.load(response_content)
194
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
195
+ end
196
+
197
+ # Create Result
198
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
199
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
200
+
201
+ result
202
+ end
203
+
204
+ promise.execute
205
+ end
206
+
207
+ end
208
+ end
@@ -0,0 +1,459 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Web
7
+ #
8
+ # Use these APIs to manage Azure Websites resources through the Azure
9
+ # Resource Manager. All task operations conform to the HTTP/1.1 protocol
10
+ # specification and each operation returns an x-ms-request-id header that
11
+ # can be used to obtain information about the request. You must make sure
12
+ # that requests made to these resources are secure. For more information,
13
+ # see <a
14
+ # href="https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx">Authenticating
15
+ # Azure Resource Manager requests.</a>
16
+ #
17
+ class Domains
18
+ include Azure::ARM::Web::Models
19
+ include MsRestAzure
20
+
21
+ #
22
+ # Creates and initializes a new instance of the Domains class.
23
+ # @param client service class for accessing basic functionality.
24
+ #
25
+ def initialize(client)
26
+ @client = client
27
+ end
28
+
29
+ # @return reference to the WebSiteManagementClient
30
+ attr_reader :client
31
+
32
+ #
33
+ # Lists domains under a resource group
34
+ #
35
+ # @param resource_group_name [String] Name of the resource group
36
+ # @param [Hash{String => String}] The hash of custom headers need to be
37
+ # applied to HTTP request.
38
+ #
39
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
40
+ # response.
41
+ #
42
+ def get_domains(resource_group_name, custom_headers = nil)
43
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
44
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
45
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
46
+ request_headers = {}
47
+
48
+ # Set Headers
49
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
50
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
51
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'
52
+ options = {
53
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
54
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
55
+ query_params: {'api-version' => @client.api_version},
56
+ headers: request_headers.merge(custom_headers || {})
57
+ }
58
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
59
+ promise = request.run_promise do |req|
60
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
61
+ end
62
+
63
+ promise = promise.then do |http_response|
64
+ status_code = http_response.status
65
+ response_content = http_response.body
66
+ unless status_code == 200
67
+ error_model = JSON.load(response_content)
68
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
69
+ end
70
+
71
+ # Create Result
72
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
73
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
74
+ # Deserialize Response
75
+ if status_code == 200
76
+ begin
77
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
78
+ unless parsed_response.nil?
79
+ parsed_response = DomainCollection.deserialize_object(parsed_response)
80
+ end
81
+ result.body = parsed_response
82
+ rescue Exception => e
83
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
84
+ end
85
+ end
86
+
87
+ result
88
+ end
89
+
90
+ promise.execute
91
+ end
92
+
93
+ #
94
+ # Gets details of a domain
95
+ #
96
+ # @param resource_group_name [String] Name of the resource group
97
+ # @param domain_name [String] Name of the domain
98
+ # @param [Hash{String => String}] The hash of custom headers need to be
99
+ # applied to HTTP request.
100
+ #
101
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
102
+ # response.
103
+ #
104
+ def get_domain(resource_group_name, domain_name, custom_headers = nil)
105
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
106
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
107
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
108
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
109
+ request_headers = {}
110
+
111
+ # Set Headers
112
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
113
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
114
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'
115
+ options = {
116
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
117
+ path_params: {'resourceGroupName' => resource_group_name,'domainName' => domain_name,'subscriptionId' => @client.subscription_id},
118
+ query_params: {'api-version' => @client.api_version},
119
+ headers: request_headers.merge(custom_headers || {})
120
+ }
121
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
122
+ promise = request.run_promise do |req|
123
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
124
+ end
125
+
126
+ promise = promise.then do |http_response|
127
+ status_code = http_response.status
128
+ response_content = http_response.body
129
+ unless status_code == 200
130
+ error_model = JSON.load(response_content)
131
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
132
+ end
133
+
134
+ # Create Result
135
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
136
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
137
+ # Deserialize Response
138
+ if status_code == 200
139
+ begin
140
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
141
+ unless parsed_response.nil?
142
+ parsed_response = Domain.deserialize_object(parsed_response)
143
+ end
144
+ result.body = parsed_response
145
+ rescue Exception => e
146
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
147
+ end
148
+ end
149
+
150
+ result
151
+ end
152
+
153
+ promise.execute
154
+ end
155
+
156
+ #
157
+ # Creates a domain
158
+ #
159
+ # @param resource_group_name [String] &gt;Name of the resource group
160
+ # @param domain_name [String] Name of the domain
161
+ # @param domain [Domain] Domain registration information
162
+ # @param [Hash{String => String}] The hash of custom headers need to be
163
+ # applied to HTTP request.
164
+ #
165
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
166
+ # response.
167
+ #
168
+ def create_or_update_domain(resource_group_name, domain_name, domain, custom_headers = nil)
169
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
170
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
171
+ fail ArgumentError, 'domain is nil' if domain.nil?
172
+ domain.validate unless domain.nil?
173
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
174
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
175
+ request_headers = {}
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
+
181
+ # Serialize Request
182
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
183
+ unless domain.nil?
184
+ domain = Domain.serialize_object(domain)
185
+ end
186
+ request_content = JSON.generate(domain, quirks_mode: true)
187
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'
188
+ options = {
189
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
190
+ path_params: {'resourceGroupName' => resource_group_name,'domainName' => domain_name,'subscriptionId' => @client.subscription_id},
191
+ query_params: {'api-version' => @client.api_version},
192
+ body: request_content,
193
+ headers: request_headers.merge(custom_headers || {})
194
+ }
195
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :put, options)
196
+ promise = request.run_promise do |req|
197
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
198
+ end
199
+
200
+ promise = promise.then do |http_response|
201
+ status_code = http_response.status
202
+ response_content = http_response.body
203
+ unless status_code == 202 || status_code == 200
204
+ error_model = JSON.load(response_content)
205
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
206
+ end
207
+
208
+ # Create Result
209
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
210
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
211
+ # Deserialize Response
212
+ if status_code == 202
213
+ begin
214
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
215
+ unless parsed_response.nil?
216
+ parsed_response = Domain.deserialize_object(parsed_response)
217
+ end
218
+ result.body = parsed_response
219
+ rescue Exception => e
220
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
221
+ end
222
+ end
223
+ # Deserialize Response
224
+ if status_code == 200
225
+ begin
226
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
227
+ unless parsed_response.nil?
228
+ parsed_response = Domain.deserialize_object(parsed_response)
229
+ end
230
+ result.body = parsed_response
231
+ rescue Exception => e
232
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
233
+ end
234
+ end
235
+
236
+ result
237
+ end
238
+
239
+ promise.execute
240
+ end
241
+
242
+ #
243
+ # Deletes a domain
244
+ #
245
+ # @param resource_group_name [String] Name of the resource group
246
+ # @param domain_name [String] Name of the domain
247
+ # @param force_hard_delete_domain [Boolean] If true then the domain will be
248
+ # deleted immediately instead of after 24 hours
249
+ # @param [Hash{String => String}] The hash of custom headers need to be
250
+ # applied to HTTP request.
251
+ #
252
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
253
+ # response.
254
+ #
255
+ def delete_domain(resource_group_name, domain_name, force_hard_delete_domain = nil, custom_headers = nil)
256
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
257
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
258
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
259
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
260
+ request_headers = {}
261
+
262
+ # Set Headers
263
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
264
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
265
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'
266
+ options = {
267
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
268
+ path_params: {'resourceGroupName' => resource_group_name,'domainName' => domain_name,'subscriptionId' => @client.subscription_id},
269
+ query_params: {'forceHardDeleteDomain' => force_hard_delete_domain,'api-version' => @client.api_version},
270
+ headers: request_headers.merge(custom_headers || {})
271
+ }
272
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :delete, options)
273
+ promise = request.run_promise do |req|
274
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
275
+ end
276
+
277
+ promise = promise.then do |http_response|
278
+ status_code = http_response.status
279
+ response_content = http_response.body
280
+ unless status_code == 204
281
+ error_model = JSON.load(response_content)
282
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
283
+ end
284
+
285
+ # Create Result
286
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
287
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
288
+
289
+ result
290
+ end
291
+
292
+ promise.execute
293
+ end
294
+
295
+ #
296
+ # Creates a domain
297
+ #
298
+ # @param resource_group_name [String] &gt;Name of the resource group
299
+ # @param domain_name [String] Name of the domain
300
+ # @param domain [Domain] Domain registration information
301
+ # @param [Hash{String => String}] The hash of custom headers need to be
302
+ # applied to HTTP request.
303
+ #
304
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
305
+ # response.
306
+ #
307
+ def update_domain(resource_group_name, domain_name, domain, custom_headers = nil)
308
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
309
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
310
+ fail ArgumentError, 'domain is nil' if domain.nil?
311
+ domain.validate unless domain.nil?
312
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
313
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
314
+ request_headers = {}
315
+
316
+ # Set Headers
317
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
318
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
319
+
320
+ # Serialize Request
321
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
322
+ unless domain.nil?
323
+ domain = Domain.serialize_object(domain)
324
+ end
325
+ request_content = JSON.generate(domain, quirks_mode: true)
326
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'
327
+ options = {
328
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
329
+ path_params: {'resourceGroupName' => resource_group_name,'domainName' => domain_name,'subscriptionId' => @client.subscription_id},
330
+ query_params: {'api-version' => @client.api_version},
331
+ body: request_content,
332
+ headers: request_headers.merge(custom_headers || {})
333
+ }
334
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :patch, options)
335
+ promise = request.run_promise do |req|
336
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
337
+ end
338
+
339
+ promise = promise.then do |http_response|
340
+ status_code = http_response.status
341
+ response_content = http_response.body
342
+ unless status_code == 202 || status_code == 200
343
+ error_model = JSON.load(response_content)
344
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
345
+ end
346
+
347
+ # Create Result
348
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
349
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
350
+ # Deserialize Response
351
+ if status_code == 202
352
+ begin
353
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
354
+ unless parsed_response.nil?
355
+ parsed_response = Domain.deserialize_object(parsed_response)
356
+ end
357
+ result.body = parsed_response
358
+ rescue Exception => e
359
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
360
+ end
361
+ end
362
+ # Deserialize Response
363
+ if status_code == 200
364
+ begin
365
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
366
+ unless parsed_response.nil?
367
+ parsed_response = Domain.deserialize_object(parsed_response)
368
+ end
369
+ result.body = parsed_response
370
+ rescue Exception => e
371
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
372
+ end
373
+ end
374
+
375
+ result
376
+ end
377
+
378
+ promise.execute
379
+ end
380
+
381
+ #
382
+ # Retrieves the latest status of a domain purchase operation
383
+ #
384
+ # @param resource_group_name [String] Name of the resource group
385
+ # @param domain_name [String] Name of the domain
386
+ # @param operation_id [String] Domain purchase operation Id
387
+ # @param [Hash{String => String}] The hash of custom headers need to be
388
+ # applied to HTTP request.
389
+ #
390
+ # @return [Concurrent::Promise] Promise object which allows to get HTTP
391
+ # response.
392
+ #
393
+ def get_domain_operation(resource_group_name, domain_name, operation_id, custom_headers = nil)
394
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
395
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
396
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
397
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
398
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
399
+ request_headers = {}
400
+
401
+ # Set Headers
402
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
403
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
404
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/operationresults/{operationId}'
405
+ options = {
406
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
407
+ path_params: {'resourceGroupName' => resource_group_name,'domainName' => domain_name,'operationId' => operation_id,'subscriptionId' => @client.subscription_id},
408
+ query_params: {'api-version' => @client.api_version},
409
+ headers: request_headers.merge(custom_headers || {})
410
+ }
411
+ request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
412
+ promise = request.run_promise do |req|
413
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
414
+ end
415
+
416
+ promise = promise.then do |http_response|
417
+ status_code = http_response.status
418
+ response_content = http_response.body
419
+ unless status_code == 202 || status_code == 200 || status_code == 500
420
+ error_model = JSON.load(response_content)
421
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
422
+ end
423
+
424
+ # Create Result
425
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
426
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
427
+ # Deserialize Response
428
+ if status_code == 202
429
+ begin
430
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
431
+ unless parsed_response.nil?
432
+ parsed_response = Domain.deserialize_object(parsed_response)
433
+ end
434
+ result.body = parsed_response
435
+ rescue Exception => e
436
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
437
+ end
438
+ end
439
+ # Deserialize Response
440
+ if status_code == 200
441
+ begin
442
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
443
+ unless parsed_response.nil?
444
+ parsed_response = Domain.deserialize_object(parsed_response)
445
+ end
446
+ result.body = parsed_response
447
+ rescue Exception => e
448
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
449
+ end
450
+ end
451
+
452
+ result
453
+ end
454
+
455
+ promise.execute
456
+ end
457
+
458
+ end
459
+ end