azure_mgmt_datashare 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare.rb +117 -0
  4. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/accounts.rb +981 -0
  5. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/consumer_invitations.rb +442 -0
  6. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/consumer_source_data_sets.rb +254 -0
  7. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/data_set_mappings.rb +603 -0
  8. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/data_sets.rb +587 -0
  9. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/data_share_management_client.rb +175 -0
  10. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/invitations.rb +587 -0
  11. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/account.rb +135 -0
  12. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/account_list.rb +99 -0
  13. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/account_update_parameters.rb +54 -0
  14. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen1file_data_set.rb +144 -0
  15. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen1folder_data_set.rb +133 -0
  16. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_data_set.rb +144 -0
  17. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_data_set_mapping.rb +167 -0
  18. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_system_data_set.rb +133 -0
  19. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_system_data_set_mapping.rb +144 -0
  20. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2folder_data_set.rb +144 -0
  21. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2folder_data_set_mapping.rb +155 -0
  22. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_container_data_set.rb +133 -0
  23. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_container_data_set_mapping.rb +144 -0
  24. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_data_set.rb +144 -0
  25. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_data_set_mapping.rb +167 -0
  26. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_folder_data_set.rb +144 -0
  27. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_folder_data_set_mapping.rb +155 -0
  28. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_invitation.rb +194 -0
  29. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_invitation_list.rb +99 -0
  30. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_source_data_set.rb +101 -0
  31. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_source_data_set_list.rb +99 -0
  32. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set.rb +71 -0
  33. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_list.rb +101 -0
  34. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_mapping.rb +71 -0
  35. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_mapping_list.rb +101 -0
  36. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_mapping_status.rb +16 -0
  37. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_type.rb +24 -0
  38. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_share_error.rb +47 -0
  39. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_share_error_info.rb +88 -0
  40. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/default_dto.rb +101 -0
  41. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/dimension_properties.rb +57 -0
  42. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/identity.rb +70 -0
  43. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/invitation.rb +159 -0
  44. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/invitation_list.rb +99 -0
  45. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/invitation_status.rb +18 -0
  46. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_list.rb +99 -0
  47. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_meta_log_specification.rb +68 -0
  48. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_meta_metric_specification.rb +181 -0
  49. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_meta_service_specification.rb +77 -0
  50. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_model.rb +81 -0
  51. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_model_properties.rb +79 -0
  52. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_response.rb +82 -0
  53. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/output_type.rb +16 -0
  54. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/provider_share_subscription.rb +148 -0
  55. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/provider_share_subscription_list.rb +99 -0
  56. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/provisioning_state.rb +19 -0
  57. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/proxy_dto.rb +71 -0
  58. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/recurrence_interval.rb +16 -0
  59. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/scheduled_source_synchronization_setting.rb +73 -0
  60. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/scheduled_synchronization_setting.rb +140 -0
  61. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/scheduled_trigger.rb +162 -0
  62. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share.rb +133 -0
  63. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_kind.rb +15 -0
  64. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_list.rb +98 -0
  65. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription.rb +197 -0
  66. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_list.rb +99 -0
  67. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_status.rb +18 -0
  68. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_synchronization.rb +106 -0
  69. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_synchronization_list.rb +99 -0
  70. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_synchronization.rb +123 -0
  71. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_synchronization_list.rb +99 -0
  72. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/source_share_synchronization_setting.rb +46 -0
  73. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/source_share_synchronization_setting_list.rb +101 -0
  74. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dbtable_data_set.rb +122 -0
  75. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dbtable_data_set_mapping.rb +133 -0
  76. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dwtable_data_set.rb +122 -0
  77. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dwtable_data_set_mapping.rb +133 -0
  78. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/status.rb +20 -0
  79. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_details.rb +221 -0
  80. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_details_list.rb +99 -0
  81. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_mode.rb +16 -0
  82. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_setting.rb +71 -0
  83. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_setting_list.rb +101 -0
  84. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronize.rb +48 -0
  85. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/trigger.rb +71 -0
  86. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/trigger_list.rb +101 -0
  87. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/trigger_status.rb +17 -0
  88. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/type.rb +15 -0
  89. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/module_definition.rb +9 -0
  90. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/operations.rb +232 -0
  91. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/provider_share_subscriptions.rb +636 -0
  92. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/share_subscriptions.rb +1685 -0
  93. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/shares.rb +1101 -0
  94. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/synchronization_settings.rb +667 -0
  95. data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/triggers.rb +701 -0
  96. data/lib/azure_mgmt_datashare.rb +6 -0
  97. data/lib/module_definition.rb +7 -0
  98. data/lib/profiles/latest/datashare_latest_profile_client.rb +40 -0
  99. data/lib/profiles/latest/datashare_module_definition.rb +8 -0
  100. data/lib/profiles/latest/modules/datashare_profile_module.rb +395 -0
  101. data/lib/version.rb +7 -0
  102. metadata +217 -0
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure end
7
+ module Azure::DataShare end
8
+ module Azure::DataShare::Mgmt end
9
+ module Azure::DataShare::Mgmt::V2018_11_01_preview end
@@ -0,0 +1,232 @@
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::DataShare::Mgmt::V2018_11_01_preview
7
+ #
8
+ # Creates a Microsoft.DataShare management client.
9
+ #
10
+ class Operations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Operations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [DataShareManagementClient] reference to the DataShareManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists the available operations
26
+ #
27
+ # List of available operations
28
+ #
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [Array<OperationModel>] operation results.
33
+ #
34
+ def list(custom_headers:nil)
35
+ first_page = list_as_lazy(custom_headers:custom_headers)
36
+ first_page.get_all_items
37
+ end
38
+
39
+ #
40
+ # Lists the available operations
41
+ #
42
+ # List of available operations
43
+ #
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_with_http_info(custom_headers:nil)
50
+ list_async(custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Lists the available operations
55
+ #
56
+ # List of available operations
57
+ #
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_async(custom_headers:nil)
64
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
65
+
66
+
67
+ request_headers = {}
68
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
69
+
70
+ # Set Headers
71
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
72
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
73
+ path_template = 'providers/Microsoft.DataShare/operations'
74
+
75
+ request_url = @base_url || @client.base_url
76
+
77
+ options = {
78
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
79
+ query_params: {'api-version' => @client.api_version},
80
+ headers: request_headers.merge(custom_headers || {}),
81
+ base_url: request_url
82
+ }
83
+ promise = @client.make_request_async(:get, path_template, options)
84
+
85
+ promise = promise.then do |result|
86
+ http_response = result.response
87
+ status_code = http_response.status
88
+ response_content = http_response.body
89
+ unless status_code == 200
90
+ error_model = JSON.load(response_content)
91
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
92
+ end
93
+
94
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
95
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
96
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
97
+ # Deserialize Response
98
+ if status_code == 200
99
+ begin
100
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
101
+ result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::OperationList.mapper()
102
+ result.body = @client.deserialize(result_mapper, parsed_response)
103
+ rescue Exception => e
104
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
105
+ end
106
+ end
107
+
108
+ result
109
+ end
110
+
111
+ promise.execute
112
+ end
113
+
114
+ #
115
+ # Lists the available operations
116
+ #
117
+ # List of available operations
118
+ #
119
+ # @param next_page_link [String] The NextLink from the previous successful call
120
+ # to List operation.
121
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
122
+ # will be added to the HTTP request.
123
+ #
124
+ # @return [OperationList] operation results.
125
+ #
126
+ def list_next(next_page_link, custom_headers:nil)
127
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
128
+ response.body unless response.nil?
129
+ end
130
+
131
+ #
132
+ # Lists the available operations
133
+ #
134
+ # List of available operations
135
+ #
136
+ # @param next_page_link [String] The NextLink from the previous successful call
137
+ # to List operation.
138
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
139
+ # will be added to the HTTP request.
140
+ #
141
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
142
+ #
143
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
144
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
145
+ end
146
+
147
+ #
148
+ # Lists the available operations
149
+ #
150
+ # List of available operations
151
+ #
152
+ # @param next_page_link [String] The NextLink from the previous successful call
153
+ # to List operation.
154
+ # @param [Hash{String => String}] A hash of custom headers that will be added
155
+ # to the HTTP request.
156
+ #
157
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
158
+ #
159
+ def list_next_async(next_page_link, custom_headers:nil)
160
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
161
+
162
+
163
+ request_headers = {}
164
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
165
+
166
+ # Set Headers
167
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
168
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
169
+ path_template = '{nextLink}'
170
+
171
+ request_url = @base_url || @client.base_url
172
+
173
+ options = {
174
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
175
+ skip_encoding_path_params: {'nextLink' => next_page_link},
176
+ headers: request_headers.merge(custom_headers || {}),
177
+ base_url: request_url
178
+ }
179
+ promise = @client.make_request_async(:get, path_template, options)
180
+
181
+ promise = promise.then do |result|
182
+ http_response = result.response
183
+ status_code = http_response.status
184
+ response_content = http_response.body
185
+ unless status_code == 200
186
+ error_model = JSON.load(response_content)
187
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
188
+ end
189
+
190
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
191
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
192
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
193
+ # Deserialize Response
194
+ if status_code == 200
195
+ begin
196
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
197
+ result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::OperationList.mapper()
198
+ result.body = @client.deserialize(result_mapper, parsed_response)
199
+ rescue Exception => e
200
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
201
+ end
202
+ end
203
+
204
+ result
205
+ end
206
+
207
+ promise.execute
208
+ end
209
+
210
+ #
211
+ # Lists the available operations
212
+ #
213
+ # List of available operations
214
+ #
215
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
216
+ # will be added to the HTTP request.
217
+ #
218
+ # @return [OperationList] which provide lazy access to pages of the response.
219
+ #
220
+ def list_as_lazy(custom_headers:nil)
221
+ response = list_async(custom_headers:custom_headers).value!
222
+ unless response.nil?
223
+ page = response.body
224
+ page.next_method = Proc.new do |next_page_link|
225
+ list_next_async(next_page_link, custom_headers:custom_headers)
226
+ end
227
+ page
228
+ end
229
+ end
230
+
231
+ end
232
+ end
@@ -0,0 +1,636 @@
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::DataShare::Mgmt::V2018_11_01_preview
7
+ #
8
+ # Creates a Microsoft.DataShare management client.
9
+ #
10
+ class ProviderShareSubscriptions
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ProviderShareSubscriptions class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [DataShareManagementClient] reference to the DataShareManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Get share subscription in a provider share.
26
+ #
27
+ # Get share subscription in a provider share
28
+ #
29
+ # @param resource_group_name [String] The resource group name.
30
+ # @param account_name [String] The name of the share account.
31
+ # @param share_name [String] The name of the share.
32
+ # @param provider_share_subscription_id [String] To locate shareSubscription
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ # @return [ProviderShareSubscription] operation results.
37
+ #
38
+ def get_by_share(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:nil)
39
+ response = get_by_share_async(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:custom_headers).value!
40
+ response.body unless response.nil?
41
+ end
42
+
43
+ #
44
+ # Get share subscription in a provider share.
45
+ #
46
+ # Get share subscription in a provider share
47
+ #
48
+ # @param resource_group_name [String] The resource group name.
49
+ # @param account_name [String] The name of the share account.
50
+ # @param share_name [String] The name of the share.
51
+ # @param provider_share_subscription_id [String] To locate shareSubscription
52
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
53
+ # will be added to the HTTP request.
54
+ #
55
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
56
+ #
57
+ def get_by_share_with_http_info(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:nil)
58
+ get_by_share_async(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:custom_headers).value!
59
+ end
60
+
61
+ #
62
+ # Get share subscription in a provider share.
63
+ #
64
+ # Get share subscription in a provider share
65
+ #
66
+ # @param resource_group_name [String] The resource group name.
67
+ # @param account_name [String] The name of the share account.
68
+ # @param share_name [String] The name of the share.
69
+ # @param provider_share_subscription_id [String] To locate shareSubscription
70
+ # @param [Hash{String => String}] A hash of custom headers that will be added
71
+ # to the HTTP request.
72
+ #
73
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
+ #
75
+ def get_by_share_async(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:nil)
76
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
77
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
78
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
79
+ fail ArgumentError, 'share_name is nil' if share_name.nil?
80
+ fail ArgumentError, 'provider_share_subscription_id is nil' if provider_share_subscription_id.nil?
81
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
82
+
83
+
84
+ request_headers = {}
85
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
86
+
87
+ # Set Headers
88
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
89
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
90
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}'
91
+
92
+ request_url = @base_url || @client.base_url
93
+
94
+ options = {
95
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
96
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareName' => share_name,'providerShareSubscriptionId' => provider_share_subscription_id},
97
+ query_params: {'api-version' => @client.api_version},
98
+ headers: request_headers.merge(custom_headers || {}),
99
+ base_url: request_url
100
+ }
101
+ promise = @client.make_request_async(:get, path_template, options)
102
+
103
+ promise = promise.then do |result|
104
+ http_response = result.response
105
+ status_code = http_response.status
106
+ response_content = http_response.body
107
+ unless status_code == 200
108
+ error_model = JSON.load(response_content)
109
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
110
+ end
111
+
112
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
113
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
114
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
115
+ # Deserialize Response
116
+ if status_code == 200
117
+ begin
118
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
119
+ result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::ProviderShareSubscription.mapper()
120
+ result.body = @client.deserialize(result_mapper, parsed_response)
121
+ rescue Exception => e
122
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
123
+ end
124
+ end
125
+
126
+ result
127
+ end
128
+
129
+ promise.execute
130
+ end
131
+
132
+ #
133
+ # List of available share subscriptions to a provider share.
134
+ #
135
+ # List share subscriptions in a provider share
136
+ #
137
+ # @param resource_group_name [String] The resource group name.
138
+ # @param account_name [String] The name of the share account.
139
+ # @param share_name [String] The name of the share.
140
+ # @param skip_token [String] Continuation Token
141
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
142
+ # will be added to the HTTP request.
143
+ #
144
+ # @return [Array<ProviderShareSubscription>] operation results.
145
+ #
146
+ def list_by_share(resource_group_name, account_name, share_name, skip_token:nil, custom_headers:nil)
147
+ first_page = list_by_share_as_lazy(resource_group_name, account_name, share_name, skip_token:skip_token, custom_headers:custom_headers)
148
+ first_page.get_all_items
149
+ end
150
+
151
+ #
152
+ # List of available share subscriptions to a provider share.
153
+ #
154
+ # List share subscriptions in a provider share
155
+ #
156
+ # @param resource_group_name [String] The resource group name.
157
+ # @param account_name [String] The name of the share account.
158
+ # @param share_name [String] The name of the share.
159
+ # @param skip_token [String] Continuation Token
160
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
161
+ # will be added to the HTTP request.
162
+ #
163
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
164
+ #
165
+ def list_by_share_with_http_info(resource_group_name, account_name, share_name, skip_token:nil, custom_headers:nil)
166
+ list_by_share_async(resource_group_name, account_name, share_name, skip_token:skip_token, custom_headers:custom_headers).value!
167
+ end
168
+
169
+ #
170
+ # List of available share subscriptions to a provider share.
171
+ #
172
+ # List share subscriptions in a provider share
173
+ #
174
+ # @param resource_group_name [String] The resource group name.
175
+ # @param account_name [String] The name of the share account.
176
+ # @param share_name [String] The name of the share.
177
+ # @param skip_token [String] Continuation Token
178
+ # @param [Hash{String => String}] A hash of custom headers that will be added
179
+ # to the HTTP request.
180
+ #
181
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
182
+ #
183
+ def list_by_share_async(resource_group_name, account_name, share_name, skip_token:nil, custom_headers:nil)
184
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
185
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
186
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
187
+ fail ArgumentError, 'share_name is nil' if share_name.nil?
188
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
189
+
190
+
191
+ request_headers = {}
192
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
193
+
194
+ # Set Headers
195
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
196
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
197
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions'
198
+
199
+ request_url = @base_url || @client.base_url
200
+
201
+ options = {
202
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
203
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareName' => share_name},
204
+ query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
205
+ headers: request_headers.merge(custom_headers || {}),
206
+ base_url: request_url
207
+ }
208
+ promise = @client.make_request_async(:get, path_template, options)
209
+
210
+ promise = promise.then do |result|
211
+ http_response = result.response
212
+ status_code = http_response.status
213
+ response_content = http_response.body
214
+ unless status_code == 200
215
+ error_model = JSON.load(response_content)
216
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
217
+ end
218
+
219
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
220
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
221
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
222
+ # Deserialize Response
223
+ if status_code == 200
224
+ begin
225
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
226
+ result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::ProviderShareSubscriptionList.mapper()
227
+ result.body = @client.deserialize(result_mapper, parsed_response)
228
+ rescue Exception => e
229
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
230
+ end
231
+ end
232
+
233
+ result
234
+ end
235
+
236
+ promise.execute
237
+ end
238
+
239
+ #
240
+ # Revoke share subscription in a provider share.
241
+ #
242
+ # Revoke share subscription in a provider share
243
+ #
244
+ # @param resource_group_name [String] The resource group name.
245
+ # @param account_name [String] The name of the share account.
246
+ # @param share_name [String] The name of the share.
247
+ # @param provider_share_subscription_id [String] To locate shareSubscription
248
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
249
+ # will be added to the HTTP request.
250
+ #
251
+ # @return [ProviderShareSubscription] operation results.
252
+ #
253
+ def revoke(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:nil)
254
+ response = revoke_async(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:custom_headers).value!
255
+ response.body unless response.nil?
256
+ end
257
+
258
+ #
259
+ # @param resource_group_name [String] The resource group name.
260
+ # @param account_name [String] The name of the share account.
261
+ # @param share_name [String] The name of the share.
262
+ # @param provider_share_subscription_id [String] To locate shareSubscription
263
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
264
+ # will be added to the HTTP request.
265
+ #
266
+ # @return [Concurrent::Promise] promise which provides async access to http
267
+ # response.
268
+ #
269
+ def revoke_async(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:nil)
270
+ # Send request
271
+ promise = begin_revoke_async(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:custom_headers)
272
+
273
+ promise = promise.then do |response|
274
+ # Defining deserialization method.
275
+ deserialize_method = lambda do |parsed_response|
276
+ result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::ProviderShareSubscription.mapper()
277
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
278
+ end
279
+
280
+ # Waiting for response.
281
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION)
282
+ end
283
+
284
+ promise
285
+ end
286
+
287
+ #
288
+ # Reinstate share subscription in a provider share.
289
+ #
290
+ # Reinstate share subscription in a provider share
291
+ #
292
+ # @param resource_group_name [String] The resource group name.
293
+ # @param account_name [String] The name of the share account.
294
+ # @param share_name [String] The name of the share.
295
+ # @param provider_share_subscription_id [String] To locate shareSubscription
296
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
297
+ # will be added to the HTTP request.
298
+ #
299
+ # @return [ProviderShareSubscription] operation results.
300
+ #
301
+ def reinstate(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:nil)
302
+ response = reinstate_async(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:custom_headers).value!
303
+ response.body unless response.nil?
304
+ end
305
+
306
+ #
307
+ # Reinstate share subscription in a provider share.
308
+ #
309
+ # Reinstate share subscription in a provider share
310
+ #
311
+ # @param resource_group_name [String] The resource group name.
312
+ # @param account_name [String] The name of the share account.
313
+ # @param share_name [String] The name of the share.
314
+ # @param provider_share_subscription_id [String] To locate shareSubscription
315
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
316
+ # will be added to the HTTP request.
317
+ #
318
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
319
+ #
320
+ def reinstate_with_http_info(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:nil)
321
+ reinstate_async(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:custom_headers).value!
322
+ end
323
+
324
+ #
325
+ # Reinstate share subscription in a provider share.
326
+ #
327
+ # Reinstate share subscription in a provider share
328
+ #
329
+ # @param resource_group_name [String] The resource group name.
330
+ # @param account_name [String] The name of the share account.
331
+ # @param share_name [String] The name of the share.
332
+ # @param provider_share_subscription_id [String] To locate shareSubscription
333
+ # @param [Hash{String => String}] A hash of custom headers that will be added
334
+ # to the HTTP request.
335
+ #
336
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
337
+ #
338
+ def reinstate_async(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:nil)
339
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
340
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
341
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
342
+ fail ArgumentError, 'share_name is nil' if share_name.nil?
343
+ fail ArgumentError, 'provider_share_subscription_id is nil' if provider_share_subscription_id.nil?
344
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
345
+
346
+
347
+ request_headers = {}
348
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
349
+
350
+ # Set Headers
351
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
352
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
353
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/reinstate'
354
+
355
+ request_url = @base_url || @client.base_url
356
+
357
+ options = {
358
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
359
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareName' => share_name,'providerShareSubscriptionId' => provider_share_subscription_id},
360
+ query_params: {'api-version' => @client.api_version},
361
+ headers: request_headers.merge(custom_headers || {}),
362
+ base_url: request_url
363
+ }
364
+ promise = @client.make_request_async(:post, path_template, options)
365
+
366
+ promise = promise.then do |result|
367
+ http_response = result.response
368
+ status_code = http_response.status
369
+ response_content = http_response.body
370
+ unless status_code == 200
371
+ error_model = JSON.load(response_content)
372
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
373
+ end
374
+
375
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
376
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
377
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
378
+ # Deserialize Response
379
+ if status_code == 200
380
+ begin
381
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
382
+ result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::ProviderShareSubscription.mapper()
383
+ result.body = @client.deserialize(result_mapper, parsed_response)
384
+ rescue Exception => e
385
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
386
+ end
387
+ end
388
+
389
+ result
390
+ end
391
+
392
+ promise.execute
393
+ end
394
+
395
+ #
396
+ # Revoke share subscription in a provider share.
397
+ #
398
+ # Revoke share subscription in a provider share
399
+ #
400
+ # @param resource_group_name [String] The resource group name.
401
+ # @param account_name [String] The name of the share account.
402
+ # @param share_name [String] The name of the share.
403
+ # @param provider_share_subscription_id [String] To locate shareSubscription
404
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
405
+ # will be added to the HTTP request.
406
+ #
407
+ # @return [ProviderShareSubscription] operation results.
408
+ #
409
+ def begin_revoke(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:nil)
410
+ response = begin_revoke_async(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:custom_headers).value!
411
+ response.body unless response.nil?
412
+ end
413
+
414
+ #
415
+ # Revoke share subscription in a provider share.
416
+ #
417
+ # Revoke share subscription in a provider share
418
+ #
419
+ # @param resource_group_name [String] The resource group name.
420
+ # @param account_name [String] The name of the share account.
421
+ # @param share_name [String] The name of the share.
422
+ # @param provider_share_subscription_id [String] To locate shareSubscription
423
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
424
+ # will be added to the HTTP request.
425
+ #
426
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
427
+ #
428
+ def begin_revoke_with_http_info(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:nil)
429
+ begin_revoke_async(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:custom_headers).value!
430
+ end
431
+
432
+ #
433
+ # Revoke share subscription in a provider share.
434
+ #
435
+ # Revoke share subscription in a provider share
436
+ #
437
+ # @param resource_group_name [String] The resource group name.
438
+ # @param account_name [String] The name of the share account.
439
+ # @param share_name [String] The name of the share.
440
+ # @param provider_share_subscription_id [String] To locate shareSubscription
441
+ # @param [Hash{String => String}] A hash of custom headers that will be added
442
+ # to the HTTP request.
443
+ #
444
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
445
+ #
446
+ def begin_revoke_async(resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers:nil)
447
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
448
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
449
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
450
+ fail ArgumentError, 'share_name is nil' if share_name.nil?
451
+ fail ArgumentError, 'provider_share_subscription_id is nil' if provider_share_subscription_id.nil?
452
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
453
+
454
+
455
+ request_headers = {}
456
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
457
+
458
+ # Set Headers
459
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
460
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
461
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/revoke'
462
+
463
+ request_url = @base_url || @client.base_url
464
+
465
+ options = {
466
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
467
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareName' => share_name,'providerShareSubscriptionId' => provider_share_subscription_id},
468
+ query_params: {'api-version' => @client.api_version},
469
+ headers: request_headers.merge(custom_headers || {}),
470
+ base_url: request_url
471
+ }
472
+ promise = @client.make_request_async(:post, path_template, options)
473
+
474
+ promise = promise.then do |result|
475
+ http_response = result.response
476
+ status_code = http_response.status
477
+ response_content = http_response.body
478
+ unless status_code == 200 || status_code == 202
479
+ error_model = JSON.load(response_content)
480
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
481
+ end
482
+
483
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
484
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
485
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
486
+ # Deserialize Response
487
+ if status_code == 200
488
+ begin
489
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
490
+ result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::ProviderShareSubscription.mapper()
491
+ result.body = @client.deserialize(result_mapper, parsed_response)
492
+ rescue Exception => e
493
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
494
+ end
495
+ end
496
+ # Deserialize Response
497
+ if status_code == 202
498
+ begin
499
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
500
+ result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::ProviderShareSubscription.mapper()
501
+ result.body = @client.deserialize(result_mapper, parsed_response)
502
+ rescue Exception => e
503
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
504
+ end
505
+ end
506
+
507
+ result
508
+ end
509
+
510
+ promise.execute
511
+ end
512
+
513
+ #
514
+ # List of available share subscriptions to a provider share.
515
+ #
516
+ # List share subscriptions in a provider share
517
+ #
518
+ # @param next_page_link [String] The NextLink from the previous successful call
519
+ # to List operation.
520
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
521
+ # will be added to the HTTP request.
522
+ #
523
+ # @return [ProviderShareSubscriptionList] operation results.
524
+ #
525
+ def list_by_share_next(next_page_link, custom_headers:nil)
526
+ response = list_by_share_next_async(next_page_link, custom_headers:custom_headers).value!
527
+ response.body unless response.nil?
528
+ end
529
+
530
+ #
531
+ # List of available share subscriptions to a provider share.
532
+ #
533
+ # List share subscriptions in a provider share
534
+ #
535
+ # @param next_page_link [String] The NextLink from the previous successful call
536
+ # to List operation.
537
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
538
+ # will be added to the HTTP request.
539
+ #
540
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
541
+ #
542
+ def list_by_share_next_with_http_info(next_page_link, custom_headers:nil)
543
+ list_by_share_next_async(next_page_link, custom_headers:custom_headers).value!
544
+ end
545
+
546
+ #
547
+ # List of available share subscriptions to a provider share.
548
+ #
549
+ # List share subscriptions in a provider share
550
+ #
551
+ # @param next_page_link [String] The NextLink from the previous successful call
552
+ # to List operation.
553
+ # @param [Hash{String => String}] A hash of custom headers that will be added
554
+ # to the HTTP request.
555
+ #
556
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
557
+ #
558
+ def list_by_share_next_async(next_page_link, custom_headers:nil)
559
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
560
+
561
+
562
+ request_headers = {}
563
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
564
+
565
+ # Set Headers
566
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
567
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
568
+ path_template = '{nextLink}'
569
+
570
+ request_url = @base_url || @client.base_url
571
+
572
+ options = {
573
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
574
+ skip_encoding_path_params: {'nextLink' => next_page_link},
575
+ headers: request_headers.merge(custom_headers || {}),
576
+ base_url: request_url
577
+ }
578
+ promise = @client.make_request_async(:get, path_template, options)
579
+
580
+ promise = promise.then do |result|
581
+ http_response = result.response
582
+ status_code = http_response.status
583
+ response_content = http_response.body
584
+ unless status_code == 200
585
+ error_model = JSON.load(response_content)
586
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
587
+ end
588
+
589
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
590
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
591
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
592
+ # Deserialize Response
593
+ if status_code == 200
594
+ begin
595
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
596
+ result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::ProviderShareSubscriptionList.mapper()
597
+ result.body = @client.deserialize(result_mapper, parsed_response)
598
+ rescue Exception => e
599
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
600
+ end
601
+ end
602
+
603
+ result
604
+ end
605
+
606
+ promise.execute
607
+ end
608
+
609
+ #
610
+ # List of available share subscriptions to a provider share.
611
+ #
612
+ # List share subscriptions in a provider share
613
+ #
614
+ # @param resource_group_name [String] The resource group name.
615
+ # @param account_name [String] The name of the share account.
616
+ # @param share_name [String] The name of the share.
617
+ # @param skip_token [String] Continuation Token
618
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
619
+ # will be added to the HTTP request.
620
+ #
621
+ # @return [ProviderShareSubscriptionList] which provide lazy access to pages of
622
+ # the response.
623
+ #
624
+ def list_by_share_as_lazy(resource_group_name, account_name, share_name, skip_token:nil, custom_headers:nil)
625
+ response = list_by_share_async(resource_group_name, account_name, share_name, skip_token:skip_token, custom_headers:custom_headers).value!
626
+ unless response.nil?
627
+ page = response.body
628
+ page.next_method = Proc.new do |next_page_link|
629
+ list_by_share_next_async(next_page_link, custom_headers:custom_headers)
630
+ end
631
+ page
632
+ end
633
+ end
634
+
635
+ end
636
+ end