azure_mgmt_synapse 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 (97) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse.rb +124 -37
  3. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_auth_keys_operations.rb +263 -0
  4. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_connection_infos.rb +137 -0
  5. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_credentials.rb +138 -0
  6. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_monitoring_data_operations.rb +137 -0
  7. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_node_ip_address_operations.rb +141 -0
  8. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_nodes.rb +379 -0
  9. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_object_metadata.rb +262 -0
  10. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_status_operations.rb +137 -0
  11. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtimes.rb +1053 -0
  12. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/ip_firewall_rules.rb +106 -0
  13. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/big_data_pool_resource_info.rb +0 -4
  14. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/cmdkey_setup.rb +86 -0
  15. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/component_setup.rb +75 -0
  16. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/custom_setup_base.rb +48 -0
  17. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/data_flow_compute_type.rb +17 -0
  18. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/entity_reference.rb +59 -0
  19. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/environment_variable_setup.rb +72 -0
  20. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/get_ssis_object_metadata_request.rb +46 -0
  21. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime.rb +78 -0
  22. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_auth_key_name.rb +16 -0
  23. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_auth_keys.rb +57 -0
  24. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_auto_update.rb +16 -0
  25. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_compute_properties.rb +135 -0
  26. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_connection_info.rb +130 -0
  27. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_custom_setup_script_properties.rb +61 -0
  28. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_data_flow_properties.rb +94 -0
  29. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_data_proxy_properties.rb +72 -0
  30. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_edition.rb +16 -0
  31. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_entity_reference_type.rb +16 -0
  32. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_internal_channel_encryption_mode.rb +17 -0
  33. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_license_type.rb +16 -0
  34. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_list_response.rb +100 -0
  35. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_monitoring_data.rb +67 -0
  36. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_node_ip_address.rb +48 -0
  37. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_node_monitoring_data.rb +154 -0
  38. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_regenerate_key_parameters.rb +48 -0
  39. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_resource.rb +85 -0
  40. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_ssis_catalog_info.rb +107 -0
  41. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_ssis_catalog_pricing_tier.rb +18 -0
  42. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_ssis_properties.rb +141 -0
  43. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_state.rb +24 -0
  44. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_status.rb +94 -0
  45. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_status_response.rb +61 -0
  46. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_type.rb +16 -0
  47. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_update_result.rb +17 -0
  48. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_vnet_properties.rb +98 -0
  49. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/linked_integration_runtime.rb +98 -0
  50. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/linked_integration_runtime_key_authorization.rb +62 -0
  51. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/linked_integration_runtime_rbac_authorization.rb +64 -0
  52. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/linked_integration_runtime_type.rb +47 -0
  53. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/managed_integration_runtime.rb +115 -0
  54. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/managed_integration_runtime_error.rb +91 -0
  55. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/managed_integration_runtime_node.rb +82 -0
  56. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/managed_integration_runtime_node_status.rb +18 -0
  57. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/managed_integration_runtime_operation_result.rb +115 -0
  58. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/managed_integration_runtime_status.rb +154 -0
  59. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_endpoint.rb +47 -0
  60. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_endpoint_connection.rb +100 -0
  61. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_endpoint_connection_list.rb +100 -0
  62. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_link_hub.rb +99 -0
  63. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_link_hub_info_list_result.rb +98 -0
  64. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_link_hub_patch_info.rb +54 -0
  65. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_link_resource.rb +76 -0
  66. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_link_resource_list_result.rb +100 -0
  67. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_link_resource_properties.rb +89 -0
  68. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_link_service_connection_state.rb +71 -0
  69. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/secret_base.rb +46 -0
  70. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/secure_string.rb +62 -0
  71. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/self_hosted_integration_runtime.rb +87 -0
  72. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/self_hosted_integration_runtime_node.rb +273 -0
  73. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/self_hosted_integration_runtime_node_status.rb +21 -0
  74. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/self_hosted_integration_runtime_status.rb +322 -0
  75. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_environment.rb +105 -0
  76. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_environment_reference.rb +79 -0
  77. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_folder.rb +74 -0
  78. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_object_metadata.rb +82 -0
  79. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_object_metadata_list_response.rb +69 -0
  80. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_object_metadata_status_response.rb +79 -0
  81. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_object_metadata_type.rb +18 -0
  82. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_package.rb +127 -0
  83. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_parameter.rb +167 -0
  84. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_project.rb +137 -0
  85. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_variable.rb +112 -0
  86. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/sub_resource.rb +83 -0
  87. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/update_integration_runtime_node_request.rb +51 -0
  88. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/update_integration_runtime_request.rb +61 -0
  89. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/workspace.rb +34 -0
  90. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/private_endpoint_connections.rb +673 -0
  91. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/private_link_hubs.rb +878 -0
  92. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/private_link_resources.rb +369 -0
  93. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/sql_pools.rb +1 -1
  94. data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/synapse_management_client.rb +55 -1
  95. data/lib/profiles/latest/modules/synapse_profile_module.rb +440 -116
  96. data/lib/version.rb +1 -1
  97. metadata +89 -2
@@ -0,0 +1,878 @@
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::Synapse::Mgmt::V2019_06_01_preview
7
+ #
8
+ # Azure Synapse Analytics Management Client
9
+ #
10
+ class PrivateLinkHubs
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the PrivateLinkHubs class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [SynapseManagementClient] reference to the SynapseManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Returns a list of privateLinkHubs in a resource group
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group. The name
28
+ # is case insensitive.
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [Array<PrivateLinkHub>] operation results.
33
+ #
34
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
35
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
36
+ first_page.get_all_items
37
+ end
38
+
39
+ #
40
+ # Returns a list of privateLinkHubs in a resource group
41
+ #
42
+ # @param resource_group_name [String] The name of the resource group. The name
43
+ # is case insensitive.
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
50
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Returns a list of privateLinkHubs in a resource group
55
+ #
56
+ # @param resource_group_name [String] The name of the resource group. The name
57
+ # is case insensitive.
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
64
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
65
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
66
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
67
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
68
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
69
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
70
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
71
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
72
+
73
+
74
+ request_headers = {}
75
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
76
+
77
+ # Set Headers
78
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
79
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
80
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHub'
81
+
82
+ request_url = @base_url || @client.base_url
83
+
84
+ options = {
85
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
86
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
87
+ query_params: {'api-version' => @client.api_version},
88
+ headers: request_headers.merge(custom_headers || {}),
89
+ base_url: request_url
90
+ }
91
+ promise = @client.make_request_async(:get, path_template, options)
92
+
93
+ promise = promise.then do |result|
94
+ http_response = result.response
95
+ status_code = http_response.status
96
+ response_content = http_response.body
97
+ unless status_code == 200
98
+ error_model = JSON.load(response_content)
99
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
100
+ end
101
+
102
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
103
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
104
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
105
+ # Deserialize Response
106
+ if status_code == 200
107
+ begin
108
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
109
+ result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::PrivateLinkHubInfoListResult.mapper()
110
+ result.body = @client.deserialize(result_mapper, parsed_response)
111
+ rescue Exception => e
112
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
113
+ end
114
+ end
115
+
116
+ result
117
+ end
118
+
119
+ promise.execute
120
+ end
121
+
122
+ #
123
+ # Gets a privateLinkHub
124
+ #
125
+ # @param resource_group_name [String] The name of the resource group. The name
126
+ # is case insensitive.
127
+ # @param private_link_hub_name [String] The name of the privateLinkHub
128
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
129
+ # will be added to the HTTP request.
130
+ #
131
+ # @return [PrivateLinkHub] operation results.
132
+ #
133
+ def get(resource_group_name, private_link_hub_name, custom_headers:nil)
134
+ response = get_async(resource_group_name, private_link_hub_name, custom_headers:custom_headers).value!
135
+ response.body unless response.nil?
136
+ end
137
+
138
+ #
139
+ # Gets a privateLinkHub
140
+ #
141
+ # @param resource_group_name [String] The name of the resource group. The name
142
+ # is case insensitive.
143
+ # @param private_link_hub_name [String] The name of the privateLinkHub
144
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
145
+ # will be added to the HTTP request.
146
+ #
147
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
148
+ #
149
+ def get_with_http_info(resource_group_name, private_link_hub_name, custom_headers:nil)
150
+ get_async(resource_group_name, private_link_hub_name, custom_headers:custom_headers).value!
151
+ end
152
+
153
+ #
154
+ # Gets a privateLinkHub
155
+ #
156
+ # @param resource_group_name [String] The name of the resource group. The name
157
+ # is case insensitive.
158
+ # @param private_link_hub_name [String] The name of the privateLinkHub
159
+ # @param [Hash{String => String}] A hash of custom headers that will be added
160
+ # to the HTTP request.
161
+ #
162
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
163
+ #
164
+ def get_async(resource_group_name, private_link_hub_name, custom_headers:nil)
165
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
166
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
167
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
168
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
169
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
170
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
171
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
172
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
173
+ fail ArgumentError, 'private_link_hub_name is nil' if private_link_hub_name.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 = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}'
183
+
184
+ request_url = @base_url || @client.base_url
185
+
186
+ options = {
187
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
188
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'privateLinkHubName' => private_link_hub_name},
189
+ query_params: {'api-version' => @client.api_version},
190
+ headers: request_headers.merge(custom_headers || {}),
191
+ base_url: request_url
192
+ }
193
+ promise = @client.make_request_async(:get, path_template, options)
194
+
195
+ promise = promise.then do |result|
196
+ http_response = result.response
197
+ status_code = http_response.status
198
+ response_content = http_response.body
199
+ unless status_code == 200
200
+ error_model = JSON.load(response_content)
201
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
202
+ end
203
+
204
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
205
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
206
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
207
+ # Deserialize Response
208
+ if status_code == 200
209
+ begin
210
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
211
+ result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::PrivateLinkHub.mapper()
212
+ result.body = @client.deserialize(result_mapper, parsed_response)
213
+ rescue Exception => e
214
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
215
+ end
216
+ end
217
+
218
+ result
219
+ end
220
+
221
+ promise.execute
222
+ end
223
+
224
+ #
225
+ # Updates a privateLinkHub
226
+ #
227
+ # @param resource_group_name [String] The name of the resource group. The name
228
+ # is case insensitive.
229
+ # @param private_link_hub_name [String] The name of the privateLinkHub
230
+ # @param private_link_hub_patch_info [PrivateLinkHubPatchInfo] PrivateLinkHub
231
+ # patch request properties
232
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
233
+ # will be added to the HTTP request.
234
+ #
235
+ # @return [PrivateLinkHub] operation results.
236
+ #
237
+ def update(resource_group_name, private_link_hub_name, private_link_hub_patch_info, custom_headers:nil)
238
+ response = update_async(resource_group_name, private_link_hub_name, private_link_hub_patch_info, custom_headers:custom_headers).value!
239
+ response.body unless response.nil?
240
+ end
241
+
242
+ #
243
+ # Updates a privateLinkHub
244
+ #
245
+ # @param resource_group_name [String] The name of the resource group. The name
246
+ # is case insensitive.
247
+ # @param private_link_hub_name [String] The name of the privateLinkHub
248
+ # @param private_link_hub_patch_info [PrivateLinkHubPatchInfo] PrivateLinkHub
249
+ # patch request properties
250
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
251
+ # will be added to the HTTP request.
252
+ #
253
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
254
+ #
255
+ def update_with_http_info(resource_group_name, private_link_hub_name, private_link_hub_patch_info, custom_headers:nil)
256
+ update_async(resource_group_name, private_link_hub_name, private_link_hub_patch_info, custom_headers:custom_headers).value!
257
+ end
258
+
259
+ #
260
+ # Updates a privateLinkHub
261
+ #
262
+ # @param resource_group_name [String] The name of the resource group. The name
263
+ # is case insensitive.
264
+ # @param private_link_hub_name [String] The name of the privateLinkHub
265
+ # @param private_link_hub_patch_info [PrivateLinkHubPatchInfo] PrivateLinkHub
266
+ # patch request properties
267
+ # @param [Hash{String => String}] A hash of custom headers that will be added
268
+ # to the HTTP request.
269
+ #
270
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
271
+ #
272
+ def update_async(resource_group_name, private_link_hub_name, private_link_hub_patch_info, custom_headers:nil)
273
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
274
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
275
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
276
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
277
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
278
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
279
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
280
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
281
+ fail ArgumentError, 'private_link_hub_name is nil' if private_link_hub_name.nil?
282
+ fail ArgumentError, 'private_link_hub_patch_info is nil' if private_link_hub_patch_info.nil?
283
+
284
+
285
+ request_headers = {}
286
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
287
+
288
+ # Set Headers
289
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
290
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
291
+
292
+ # Serialize Request
293
+ request_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::PrivateLinkHubPatchInfo.mapper()
294
+ request_content = @client.serialize(request_mapper, private_link_hub_patch_info)
295
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
296
+
297
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}'
298
+
299
+ request_url = @base_url || @client.base_url
300
+
301
+ options = {
302
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
303
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'privateLinkHubName' => private_link_hub_name},
304
+ query_params: {'api-version' => @client.api_version},
305
+ body: request_content,
306
+ headers: request_headers.merge(custom_headers || {}),
307
+ base_url: request_url
308
+ }
309
+ promise = @client.make_request_async(:patch, path_template, options)
310
+
311
+ promise = promise.then do |result|
312
+ http_response = result.response
313
+ status_code = http_response.status
314
+ response_content = http_response.body
315
+ unless status_code == 200 || status_code == 201
316
+ error_model = JSON.load(response_content)
317
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
318
+ end
319
+
320
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
321
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
322
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
323
+ # Deserialize Response
324
+ if status_code == 200
325
+ begin
326
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
327
+ result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::PrivateLinkHub.mapper()
328
+ result.body = @client.deserialize(result_mapper, parsed_response)
329
+ rescue Exception => e
330
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
331
+ end
332
+ end
333
+ # Deserialize Response
334
+ if status_code == 201
335
+ begin
336
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
337
+ result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::PrivateLinkHub.mapper()
338
+ result.body = @client.deserialize(result_mapper, parsed_response)
339
+ rescue Exception => e
340
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
341
+ end
342
+ end
343
+
344
+ result
345
+ end
346
+
347
+ promise.execute
348
+ end
349
+
350
+ #
351
+ # Creates or updates a privateLinkHub
352
+ #
353
+ # @param resource_group_name [String] The name of the resource group. The name
354
+ # is case insensitive.
355
+ # @param private_link_hub_name [String] The name of the privateLinkHub
356
+ # @param private_link_hub_info [PrivateLinkHub] PrivateLinkHub create or update
357
+ # request properties
358
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
359
+ # will be added to the HTTP request.
360
+ #
361
+ # @return [PrivateLinkHub] operation results.
362
+ #
363
+ def create_or_update(resource_group_name, private_link_hub_name, private_link_hub_info, custom_headers:nil)
364
+ response = create_or_update_async(resource_group_name, private_link_hub_name, private_link_hub_info, custom_headers:custom_headers).value!
365
+ response.body unless response.nil?
366
+ end
367
+
368
+ #
369
+ # Creates or updates a privateLinkHub
370
+ #
371
+ # @param resource_group_name [String] The name of the resource group. The name
372
+ # is case insensitive.
373
+ # @param private_link_hub_name [String] The name of the privateLinkHub
374
+ # @param private_link_hub_info [PrivateLinkHub] PrivateLinkHub create or update
375
+ # request properties
376
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
377
+ # will be added to the HTTP request.
378
+ #
379
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
380
+ #
381
+ def create_or_update_with_http_info(resource_group_name, private_link_hub_name, private_link_hub_info, custom_headers:nil)
382
+ create_or_update_async(resource_group_name, private_link_hub_name, private_link_hub_info, custom_headers:custom_headers).value!
383
+ end
384
+
385
+ #
386
+ # Creates or updates a privateLinkHub
387
+ #
388
+ # @param resource_group_name [String] The name of the resource group. The name
389
+ # is case insensitive.
390
+ # @param private_link_hub_name [String] The name of the privateLinkHub
391
+ # @param private_link_hub_info [PrivateLinkHub] PrivateLinkHub create or update
392
+ # request properties
393
+ # @param [Hash{String => String}] A hash of custom headers that will be added
394
+ # to the HTTP request.
395
+ #
396
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
397
+ #
398
+ def create_or_update_async(resource_group_name, private_link_hub_name, private_link_hub_info, custom_headers:nil)
399
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
400
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
401
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
402
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
403
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
404
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
405
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
406
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
407
+ fail ArgumentError, 'private_link_hub_name is nil' if private_link_hub_name.nil?
408
+ fail ArgumentError, 'private_link_hub_info is nil' if private_link_hub_info.nil?
409
+
410
+
411
+ request_headers = {}
412
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
413
+
414
+ # Set Headers
415
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
416
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
417
+
418
+ # Serialize Request
419
+ request_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::PrivateLinkHub.mapper()
420
+ request_content = @client.serialize(request_mapper, private_link_hub_info)
421
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
422
+
423
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}'
424
+
425
+ request_url = @base_url || @client.base_url
426
+
427
+ options = {
428
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
429
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'privateLinkHubName' => private_link_hub_name},
430
+ query_params: {'api-version' => @client.api_version},
431
+ body: request_content,
432
+ headers: request_headers.merge(custom_headers || {}),
433
+ base_url: request_url
434
+ }
435
+ promise = @client.make_request_async(:put, path_template, options)
436
+
437
+ promise = promise.then do |result|
438
+ http_response = result.response
439
+ status_code = http_response.status
440
+ response_content = http_response.body
441
+ unless status_code == 200 || status_code == 201
442
+ error_model = JSON.load(response_content)
443
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
444
+ end
445
+
446
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
447
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
448
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
449
+ # Deserialize Response
450
+ if status_code == 200
451
+ begin
452
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
453
+ result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::PrivateLinkHub.mapper()
454
+ result.body = @client.deserialize(result_mapper, parsed_response)
455
+ rescue Exception => e
456
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
457
+ end
458
+ end
459
+ # Deserialize Response
460
+ if status_code == 201
461
+ begin
462
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
463
+ result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::PrivateLinkHub.mapper()
464
+ result.body = @client.deserialize(result_mapper, parsed_response)
465
+ rescue Exception => e
466
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
467
+ end
468
+ end
469
+
470
+ result
471
+ end
472
+
473
+ promise.execute
474
+ end
475
+
476
+ #
477
+ # Deletes a privateLinkHub
478
+ #
479
+ # @param resource_group_name [String] The name of the resource group. The name
480
+ # is case insensitive.
481
+ # @param private_link_hub_name [String] The name of the privateLinkHub
482
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
483
+ # will be added to the HTTP request.
484
+ #
485
+ #
486
+ def delete(resource_group_name, private_link_hub_name, custom_headers:nil)
487
+ response = delete_async(resource_group_name, private_link_hub_name, custom_headers:custom_headers).value!
488
+ nil
489
+ end
490
+
491
+ #
492
+ # Deletes a privateLinkHub
493
+ #
494
+ # @param resource_group_name [String] The name of the resource group. The name
495
+ # is case insensitive.
496
+ # @param private_link_hub_name [String] The name of the privateLinkHub
497
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
498
+ # will be added to the HTTP request.
499
+ #
500
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
501
+ #
502
+ def delete_with_http_info(resource_group_name, private_link_hub_name, custom_headers:nil)
503
+ delete_async(resource_group_name, private_link_hub_name, custom_headers:custom_headers).value!
504
+ end
505
+
506
+ #
507
+ # Deletes a privateLinkHub
508
+ #
509
+ # @param resource_group_name [String] The name of the resource group. The name
510
+ # is case insensitive.
511
+ # @param private_link_hub_name [String] The name of the privateLinkHub
512
+ # @param [Hash{String => String}] A hash of custom headers that will be added
513
+ # to the HTTP request.
514
+ #
515
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
516
+ #
517
+ def delete_async(resource_group_name, private_link_hub_name, custom_headers:nil)
518
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
519
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
520
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
521
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
522
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
523
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
524
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
525
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
526
+ fail ArgumentError, 'private_link_hub_name is nil' if private_link_hub_name.nil?
527
+
528
+
529
+ request_headers = {}
530
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
531
+
532
+ # Set Headers
533
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
534
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
535
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}'
536
+
537
+ request_url = @base_url || @client.base_url
538
+
539
+ options = {
540
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
541
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'privateLinkHubName' => private_link_hub_name},
542
+ query_params: {'api-version' => @client.api_version},
543
+ headers: request_headers.merge(custom_headers || {}),
544
+ base_url: request_url
545
+ }
546
+ promise = @client.make_request_async(:delete, path_template, options)
547
+
548
+ promise = promise.then do |result|
549
+ http_response = result.response
550
+ status_code = http_response.status
551
+ response_content = http_response.body
552
+ unless status_code == 200 || status_code == 204
553
+ error_model = JSON.load(response_content)
554
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
555
+ end
556
+
557
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
558
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
559
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
560
+
561
+ result
562
+ end
563
+
564
+ promise.execute
565
+ end
566
+
567
+ #
568
+ # Returns a list of privateLinkHubs in a subscription
569
+ #
570
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
571
+ # will be added to the HTTP request.
572
+ #
573
+ # @return [Array<PrivateLinkHub>] operation results.
574
+ #
575
+ def list(custom_headers:nil)
576
+ first_page = list_as_lazy(custom_headers:custom_headers)
577
+ first_page.get_all_items
578
+ end
579
+
580
+ #
581
+ # Returns a list of privateLinkHubs in a subscription
582
+ #
583
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
584
+ # will be added to the HTTP request.
585
+ #
586
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
587
+ #
588
+ def list_with_http_info(custom_headers:nil)
589
+ list_async(custom_headers:custom_headers).value!
590
+ end
591
+
592
+ #
593
+ # Returns a list of privateLinkHubs in a subscription
594
+ #
595
+ # @param [Hash{String => String}] A hash of custom headers that will be added
596
+ # to the HTTP request.
597
+ #
598
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
599
+ #
600
+ def list_async(custom_headers:nil)
601
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
602
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
603
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
604
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
605
+
606
+
607
+ request_headers = {}
608
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
609
+
610
+ # Set Headers
611
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
612
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
613
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Synapse/privateLinkHubs'
614
+
615
+ request_url = @base_url || @client.base_url
616
+
617
+ options = {
618
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
619
+ path_params: {'subscriptionId' => @client.subscription_id},
620
+ query_params: {'api-version' => @client.api_version},
621
+ headers: request_headers.merge(custom_headers || {}),
622
+ base_url: request_url
623
+ }
624
+ promise = @client.make_request_async(:get, path_template, options)
625
+
626
+ promise = promise.then do |result|
627
+ http_response = result.response
628
+ status_code = http_response.status
629
+ response_content = http_response.body
630
+ unless status_code == 200
631
+ error_model = JSON.load(response_content)
632
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
633
+ end
634
+
635
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
636
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
637
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
638
+ # Deserialize Response
639
+ if status_code == 200
640
+ begin
641
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
642
+ result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::PrivateLinkHubInfoListResult.mapper()
643
+ result.body = @client.deserialize(result_mapper, parsed_response)
644
+ rescue Exception => e
645
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
646
+ end
647
+ end
648
+
649
+ result
650
+ end
651
+
652
+ promise.execute
653
+ end
654
+
655
+ #
656
+ # Returns a list of privateLinkHubs in a resource group
657
+ #
658
+ # @param next_page_link [String] The NextLink from the previous successful call
659
+ # to List operation.
660
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
661
+ # will be added to the HTTP request.
662
+ #
663
+ # @return [PrivateLinkHubInfoListResult] operation results.
664
+ #
665
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
666
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
667
+ response.body unless response.nil?
668
+ end
669
+
670
+ #
671
+ # Returns a list of privateLinkHubs in a resource group
672
+ #
673
+ # @param next_page_link [String] The NextLink from the previous successful call
674
+ # to List operation.
675
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
676
+ # will be added to the HTTP request.
677
+ #
678
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
679
+ #
680
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
681
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
682
+ end
683
+
684
+ #
685
+ # Returns a list of privateLinkHubs in a resource group
686
+ #
687
+ # @param next_page_link [String] The NextLink from the previous successful call
688
+ # to List operation.
689
+ # @param [Hash{String => String}] A hash of custom headers that will be added
690
+ # to the HTTP request.
691
+ #
692
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
693
+ #
694
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
695
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
696
+
697
+
698
+ request_headers = {}
699
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
700
+
701
+ # Set Headers
702
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
703
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
704
+ path_template = '{nextLink}'
705
+
706
+ request_url = @base_url || @client.base_url
707
+
708
+ options = {
709
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
710
+ skip_encoding_path_params: {'nextLink' => next_page_link},
711
+ headers: request_headers.merge(custom_headers || {}),
712
+ base_url: request_url
713
+ }
714
+ promise = @client.make_request_async(:get, path_template, options)
715
+
716
+ promise = promise.then do |result|
717
+ http_response = result.response
718
+ status_code = http_response.status
719
+ response_content = http_response.body
720
+ unless status_code == 200
721
+ error_model = JSON.load(response_content)
722
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
723
+ end
724
+
725
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
726
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
727
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
728
+ # Deserialize Response
729
+ if status_code == 200
730
+ begin
731
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
732
+ result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::PrivateLinkHubInfoListResult.mapper()
733
+ result.body = @client.deserialize(result_mapper, parsed_response)
734
+ rescue Exception => e
735
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
736
+ end
737
+ end
738
+
739
+ result
740
+ end
741
+
742
+ promise.execute
743
+ end
744
+
745
+ #
746
+ # Returns a list of privateLinkHubs in a subscription
747
+ #
748
+ # @param next_page_link [String] The NextLink from the previous successful call
749
+ # to List operation.
750
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
751
+ # will be added to the HTTP request.
752
+ #
753
+ # @return [PrivateLinkHubInfoListResult] operation results.
754
+ #
755
+ def list_next(next_page_link, custom_headers:nil)
756
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
757
+ response.body unless response.nil?
758
+ end
759
+
760
+ #
761
+ # Returns a list of privateLinkHubs in a subscription
762
+ #
763
+ # @param next_page_link [String] The NextLink from the previous successful call
764
+ # to List operation.
765
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
766
+ # will be added to the HTTP request.
767
+ #
768
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
769
+ #
770
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
771
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
772
+ end
773
+
774
+ #
775
+ # Returns a list of privateLinkHubs in a subscription
776
+ #
777
+ # @param next_page_link [String] The NextLink from the previous successful call
778
+ # to List operation.
779
+ # @param [Hash{String => String}] A hash of custom headers that will be added
780
+ # to the HTTP request.
781
+ #
782
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
783
+ #
784
+ def list_next_async(next_page_link, custom_headers:nil)
785
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
786
+
787
+
788
+ request_headers = {}
789
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
790
+
791
+ # Set Headers
792
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
793
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
794
+ path_template = '{nextLink}'
795
+
796
+ request_url = @base_url || @client.base_url
797
+
798
+ options = {
799
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
800
+ skip_encoding_path_params: {'nextLink' => next_page_link},
801
+ headers: request_headers.merge(custom_headers || {}),
802
+ base_url: request_url
803
+ }
804
+ promise = @client.make_request_async(:get, path_template, options)
805
+
806
+ promise = promise.then do |result|
807
+ http_response = result.response
808
+ status_code = http_response.status
809
+ response_content = http_response.body
810
+ unless status_code == 200
811
+ error_model = JSON.load(response_content)
812
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
813
+ end
814
+
815
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
816
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
817
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
818
+ # Deserialize Response
819
+ if status_code == 200
820
+ begin
821
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
822
+ result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::PrivateLinkHubInfoListResult.mapper()
823
+ result.body = @client.deserialize(result_mapper, parsed_response)
824
+ rescue Exception => e
825
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
826
+ end
827
+ end
828
+
829
+ result
830
+ end
831
+
832
+ promise.execute
833
+ end
834
+
835
+ #
836
+ # Returns a list of privateLinkHubs in a resource group
837
+ #
838
+ # @param resource_group_name [String] The name of the resource group. The name
839
+ # is case insensitive.
840
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
841
+ # will be added to the HTTP request.
842
+ #
843
+ # @return [PrivateLinkHubInfoListResult] which provide lazy access to pages of
844
+ # the response.
845
+ #
846
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
847
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
848
+ unless response.nil?
849
+ page = response.body
850
+ page.next_method = Proc.new do |next_page_link|
851
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
852
+ end
853
+ page
854
+ end
855
+ end
856
+
857
+ #
858
+ # Returns a list of privateLinkHubs in a subscription
859
+ #
860
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
861
+ # will be added to the HTTP request.
862
+ #
863
+ # @return [PrivateLinkHubInfoListResult] which provide lazy access to pages of
864
+ # the response.
865
+ #
866
+ def list_as_lazy(custom_headers:nil)
867
+ response = list_async(custom_headers:custom_headers).value!
868
+ unless response.nil?
869
+ page = response.body
870
+ page.next_method = Proc.new do |next_page_link|
871
+ list_next_async(next_page_link, custom_headers:custom_headers)
872
+ end
873
+ page
874
+ end
875
+ end
876
+
877
+ end
878
+ end