pulp_file_client 0.1.0b4 → 0.1.0rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -9
  3. data/docs/ContentFilesApi.md +2 -2
  4. data/docs/ContentSummary.md +21 -0
  5. data/docs/DistributionsFileApi.md +8 -8
  6. data/docs/FileExportersFileApi.md +408 -0
  7. data/docs/{FileContent.md → FileFileContent.md} +2 -6
  8. data/docs/{FileDistribution.md → FileFileDistribution.md} +2 -2
  9. data/docs/FileFileFileSystemExporter.md +23 -0
  10. data/docs/{FilePublication.md → FileFilePublication.md} +2 -2
  11. data/docs/{FileRemote.md → FileFileRemote.md} +10 -14
  12. data/docs/FileFileRepository.md +27 -0
  13. data/docs/InlineResponse200.md +1 -1
  14. data/docs/InlineResponse2001.md +1 -1
  15. data/docs/InlineResponse2002.md +1 -1
  16. data/docs/InlineResponse2003.md +1 -1
  17. data/docs/InlineResponse2004.md +23 -0
  18. data/docs/InlineResponse2005.md +23 -0
  19. data/docs/InlineResponse2006.md +23 -0
  20. data/docs/PublicationExport.md +17 -0
  21. data/docs/PublicationsFileApi.md +9 -9
  22. data/docs/RemotesFileApi.md +12 -67
  23. data/docs/RepositoriesFileApi.md +464 -0
  24. data/docs/RepositoriesFileVersionsApi.md +214 -0
  25. data/docs/RepositoryAddRemoveContent.md +21 -0
  26. data/docs/RepositorySyncURL.md +2 -2
  27. data/docs/RepositoryVersion.md +25 -0
  28. data/lib/pulp_file_client/api/content_files_api.rb +4 -4
  29. data/lib/pulp_file_client/api/distributions_file_api.rb +10 -10
  30. data/lib/pulp_file_client/api/file_exporters_file_api.rb +496 -0
  31. data/lib/pulp_file_client/api/publications_file_api.rb +15 -15
  32. data/lib/pulp_file_client/api/remotes_file_api.rb +16 -84
  33. data/lib/pulp_file_client/api/repositories_file_api.rb +566 -0
  34. data/lib/pulp_file_client/api/repositories_file_versions_api.rb +268 -0
  35. data/lib/pulp_file_client/api_client.rb +1 -1
  36. data/lib/pulp_file_client/api_error.rb +1 -1
  37. data/lib/pulp_file_client/configuration.rb +1 -1
  38. data/lib/pulp_file_client/models/async_operation_response.rb +12 -2
  39. data/lib/pulp_file_client/models/content_summary.rb +246 -0
  40. data/lib/pulp_file_client/models/{file_content.rb → file_file_content.rb} +16 -26
  41. data/lib/pulp_file_client/models/{file_distribution.rb → file_file_distribution.rb} +17 -23
  42. data/lib/pulp_file_client/models/file_file_file_system_exporter.rb +284 -0
  43. data/lib/pulp_file_client/models/{file_publication.rb → file_file_publication.rb} +16 -5
  44. data/lib/pulp_file_client/models/{file_remote.rb → file_file_remote.rb} +69 -105
  45. data/lib/pulp_file_client/models/file_file_repository.rb +294 -0
  46. data/lib/pulp_file_client/models/inline_response200.rb +15 -3
  47. data/lib/pulp_file_client/models/inline_response2001.rb +15 -3
  48. data/lib/pulp_file_client/models/inline_response2002.rb +15 -3
  49. data/lib/pulp_file_client/models/inline_response2003.rb +15 -3
  50. data/lib/pulp_file_client/models/inline_response2004.rb +247 -0
  51. data/lib/pulp_file_client/models/inline_response2005.rb +247 -0
  52. data/lib/pulp_file_client/models/inline_response2006.rb +247 -0
  53. data/lib/pulp_file_client/models/publication_export.rb +212 -0
  54. data/lib/pulp_file_client/models/repository_add_remove_content.rb +231 -0
  55. data/lib/pulp_file_client/models/repository_sync_url.rb +22 -12
  56. data/lib/pulp_file_client/models/repository_version.rb +244 -0
  57. data/lib/pulp_file_client/version.rb +2 -2
  58. data/lib/pulp_file_client.rb +17 -5
  59. data/pulp_file_client.gemspec +1 -1
  60. data/spec/api/content_files_api_spec.rb +2 -2
  61. data/spec/api/distributions_file_api_spec.rb +2 -2
  62. data/spec/api/file_exporters_file_api_spec.rb +128 -0
  63. data/spec/api/publications_file_api_spec.rb +6 -6
  64. data/spec/api/remotes_file_api_spec.rb +4 -16
  65. data/spec/api/repositories_file_api_spec.rb +140 -0
  66. data/spec/api/repositories_file_versions_api_spec.rb +91 -0
  67. data/spec/api_client_spec.rb +1 -1
  68. data/spec/configuration_spec.rb +1 -1
  69. data/spec/models/async_operation_response_spec.rb +1 -1
  70. data/spec/models/content_summary_spec.rb +53 -0
  71. data/spec/models/{file_content_spec.rb → file_file_content_spec.rb} +7 -19
  72. data/spec/models/{file_distribution_spec.rb → file_file_distribution_spec.rb} +7 -7
  73. data/spec/models/file_file_file_system_exporter_spec.rb +59 -0
  74. data/spec/models/{file_publication_spec.rb → file_file_publication_spec.rb} +7 -7
  75. data/spec/models/{file_remote_spec.rb → file_file_remote_spec.rb} +11 -23
  76. data/spec/models/file_file_repository_spec.rb +71 -0
  77. data/spec/models/inline_response2001_spec.rb +1 -1
  78. data/spec/models/inline_response2002_spec.rb +1 -1
  79. data/spec/models/inline_response2003_spec.rb +1 -1
  80. data/spec/models/inline_response2004_spec.rb +59 -0
  81. data/spec/models/inline_response2005_spec.rb +59 -0
  82. data/spec/models/inline_response2006_spec.rb +59 -0
  83. data/spec/models/inline_response200_spec.rb +1 -1
  84. data/spec/models/publication_export_spec.rb +41 -0
  85. data/spec/models/repository_add_remove_content_spec.rb +53 -0
  86. data/spec/models/repository_sync_url_spec.rb +2 -2
  87. data/spec/models/repository_version_spec.rb +65 -0
  88. data/spec/spec_helper.rb +1 -1
  89. metadata +66 -18
@@ -0,0 +1,566 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpFileClient
16
+ class RepositoriesFileApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a file repository
23
+ # FileRepository represents a single file repository, to which content can be synced, added, or removed.
24
+ # @param data [FileFileRepository]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [FileFileRepository]
27
+ def create(data, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(data, opts)
29
+ data
30
+ end
31
+
32
+ # Create a file repository
33
+ # FileRepository represents a single file repository, to which content can be synced, added, or removed.
34
+ # @param data [FileFileRepository]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(FileFileRepository, Integer, Hash)>] FileFileRepository data, response status code and response headers
37
+ def create_with_http_info(data, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: RepositoriesFileApi.create ...'
40
+ end
41
+ # verify the required parameter 'data' is set
42
+ if @api_client.config.client_side_validation && data.nil?
43
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesFileApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/repositories/file/file/'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'FileFileRepository'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['Basic']
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: RepositoriesFileApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Delete a file repository
87
+ # Trigger an asynchronous task to delete a repository.
88
+ # @param file_repository_href [String] URI of File Repository. e.g.: /pulp/api/v3/repositories/file/file/1/
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [AsyncOperationResponse]
91
+ def delete(file_repository_href, opts = {})
92
+ data, _status_code, _headers = delete_with_http_info(file_repository_href, opts)
93
+ data
94
+ end
95
+
96
+ # Delete a file repository
97
+ # Trigger an asynchronous task to delete a repository.
98
+ # @param file_repository_href [String] URI of File Repository. e.g.: /pulp/api/v3/repositories/file/file/1/
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
101
+ def delete_with_http_info(file_repository_href, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: RepositoriesFileApi.delete ...'
104
+ end
105
+ # verify the required parameter 'file_repository_href' is set
106
+ if @api_client.config.client_side_validation && file_repository_href.nil?
107
+ fail ArgumentError, "Missing the required parameter 'file_repository_href' when calling RepositoriesFileApi.delete"
108
+ end
109
+ # resource path
110
+ local_var_path = '{file_repository_href}'.sub('{' + 'file_repository_href' + '}', CGI.escape(file_repository_href.to_s).gsub('%2F', '/'))
111
+
112
+ # query parameters
113
+ query_params = opts[:query_params] || {}
114
+
115
+ # header parameters
116
+ header_params = opts[:header_params] || {}
117
+ # HTTP header 'Accept' (if needed)
118
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
119
+
120
+ # form parameters
121
+ form_params = opts[:form_params] || {}
122
+
123
+ # http body (model)
124
+ post_body = opts[:body]
125
+
126
+ # return_type
127
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
128
+
129
+ # auth_names
130
+ auth_names = opts[:auth_names] || ['Basic']
131
+
132
+ new_options = opts.merge(
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: RepositoriesFileApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # List file repositorys
149
+ # FileRepository represents a single file repository, to which content can be synced, added, or removed.
150
+ # @param [Hash] opts the optional parameters
151
+ # @option opts [String] :name
152
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
153
+ # @option opts [Integer] :limit Number of results to return per page.
154
+ # @option opts [Integer] :offset The initial index from which to return the results.
155
+ # @option opts [String] :fields A list of fields to include in the response.
156
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
157
+ # @return [InlineResponse2005]
158
+ def list(opts = {})
159
+ data, _status_code, _headers = list_with_http_info(opts)
160
+ data
161
+ end
162
+
163
+ # List file repositorys
164
+ # FileRepository represents a single file repository, to which content can be synced, added, or removed.
165
+ # @param [Hash] opts the optional parameters
166
+ # @option opts [String] :name
167
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
168
+ # @option opts [Integer] :limit Number of results to return per page.
169
+ # @option opts [Integer] :offset The initial index from which to return the results.
170
+ # @option opts [String] :fields A list of fields to include in the response.
171
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
172
+ # @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers
173
+ def list_with_http_info(opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: RepositoriesFileApi.list ...'
176
+ end
177
+ # resource path
178
+ local_var_path = '/pulp/api/v3/repositories/file/file/'
179
+
180
+ # query parameters
181
+ query_params = opts[:query_params] || {}
182
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
183
+ query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
184
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
185
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
186
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
187
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
188
+
189
+ # header parameters
190
+ header_params = opts[:header_params] || {}
191
+ # HTTP header 'Accept' (if needed)
192
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
193
+
194
+ # form parameters
195
+ form_params = opts[:form_params] || {}
196
+
197
+ # http body (model)
198
+ post_body = opts[:body]
199
+
200
+ # return_type
201
+ return_type = opts[:return_type] || 'InlineResponse2005'
202
+
203
+ # auth_names
204
+ auth_names = opts[:auth_names] || ['Basic']
205
+
206
+ new_options = opts.merge(
207
+ :header_params => header_params,
208
+ :query_params => query_params,
209
+ :form_params => form_params,
210
+ :body => post_body,
211
+ :auth_names => auth_names,
212
+ :return_type => return_type
213
+ )
214
+
215
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
216
+ if @api_client.config.debugging
217
+ @api_client.config.logger.debug "API called: RepositoriesFileApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
218
+ end
219
+ return data, status_code, headers
220
+ end
221
+
222
+ # Trigger an asynchronous task to create a new repository version.
223
+ # @param file_repository_href [String] URI of File Repository. e.g.: /pulp/api/v3/repositories/file/file/1/
224
+ # @param data [RepositoryAddRemoveContent]
225
+ # @param [Hash] opts the optional parameters
226
+ # @return [AsyncOperationResponse]
227
+ def modify(file_repository_href, data, opts = {})
228
+ data, _status_code, _headers = modify_with_http_info(file_repository_href, data, opts)
229
+ data
230
+ end
231
+
232
+ # Trigger an asynchronous task to create a new repository version.
233
+ # @param file_repository_href [String] URI of File Repository. e.g.: /pulp/api/v3/repositories/file/file/1/
234
+ # @param data [RepositoryAddRemoveContent]
235
+ # @param [Hash] opts the optional parameters
236
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
237
+ def modify_with_http_info(file_repository_href, data, opts = {})
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug 'Calling API: RepositoriesFileApi.modify ...'
240
+ end
241
+ # verify the required parameter 'file_repository_href' is set
242
+ if @api_client.config.client_side_validation && file_repository_href.nil?
243
+ fail ArgumentError, "Missing the required parameter 'file_repository_href' when calling RepositoriesFileApi.modify"
244
+ end
245
+ # verify the required parameter 'data' is set
246
+ if @api_client.config.client_side_validation && data.nil?
247
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesFileApi.modify"
248
+ end
249
+ # resource path
250
+ local_var_path = '{file_repository_href}modify/'.sub('{' + 'file_repository_href' + '}', CGI.escape(file_repository_href.to_s).gsub('%2F', '/'))
251
+
252
+ # query parameters
253
+ query_params = opts[:query_params] || {}
254
+
255
+ # header parameters
256
+ header_params = opts[:header_params] || {}
257
+ # HTTP header 'Accept' (if needed)
258
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
259
+ # HTTP header 'Content-Type'
260
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
261
+
262
+ # form parameters
263
+ form_params = opts[:form_params] || {}
264
+
265
+ # http body (model)
266
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
267
+
268
+ # return_type
269
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
270
+
271
+ # auth_names
272
+ auth_names = opts[:auth_names] || ['Basic']
273
+
274
+ new_options = opts.merge(
275
+ :header_params => header_params,
276
+ :query_params => query_params,
277
+ :form_params => form_params,
278
+ :body => post_body,
279
+ :auth_names => auth_names,
280
+ :return_type => return_type
281
+ )
282
+
283
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
284
+ if @api_client.config.debugging
285
+ @api_client.config.logger.debug "API called: RepositoriesFileApi#modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
286
+ end
287
+ return data, status_code, headers
288
+ end
289
+
290
+ # Partially update a file repository
291
+ # FileRepository represents a single file repository, to which content can be synced, added, or removed.
292
+ # @param file_repository_href [String] URI of File Repository. e.g.: /pulp/api/v3/repositories/file/file/1/
293
+ # @param data [FileFileRepository]
294
+ # @param [Hash] opts the optional parameters
295
+ # @return [FileFileRepository]
296
+ def partial_update(file_repository_href, data, opts = {})
297
+ data, _status_code, _headers = partial_update_with_http_info(file_repository_href, data, opts)
298
+ data
299
+ end
300
+
301
+ # Partially update a file repository
302
+ # FileRepository represents a single file repository, to which content can be synced, added, or removed.
303
+ # @param file_repository_href [String] URI of File Repository. e.g.: /pulp/api/v3/repositories/file/file/1/
304
+ # @param data [FileFileRepository]
305
+ # @param [Hash] opts the optional parameters
306
+ # @return [Array<(FileFileRepository, Integer, Hash)>] FileFileRepository data, response status code and response headers
307
+ def partial_update_with_http_info(file_repository_href, data, opts = {})
308
+ if @api_client.config.debugging
309
+ @api_client.config.logger.debug 'Calling API: RepositoriesFileApi.partial_update ...'
310
+ end
311
+ # verify the required parameter 'file_repository_href' is set
312
+ if @api_client.config.client_side_validation && file_repository_href.nil?
313
+ fail ArgumentError, "Missing the required parameter 'file_repository_href' when calling RepositoriesFileApi.partial_update"
314
+ end
315
+ # verify the required parameter 'data' is set
316
+ if @api_client.config.client_side_validation && data.nil?
317
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesFileApi.partial_update"
318
+ end
319
+ # resource path
320
+ local_var_path = '{file_repository_href}'.sub('{' + 'file_repository_href' + '}', CGI.escape(file_repository_href.to_s).gsub('%2F', '/'))
321
+
322
+ # query parameters
323
+ query_params = opts[:query_params] || {}
324
+
325
+ # header parameters
326
+ header_params = opts[:header_params] || {}
327
+ # HTTP header 'Accept' (if needed)
328
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
329
+ # HTTP header 'Content-Type'
330
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
331
+
332
+ # form parameters
333
+ form_params = opts[:form_params] || {}
334
+
335
+ # http body (model)
336
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
337
+
338
+ # return_type
339
+ return_type = opts[:return_type] || 'FileFileRepository'
340
+
341
+ # auth_names
342
+ auth_names = opts[:auth_names] || ['Basic']
343
+
344
+ new_options = opts.merge(
345
+ :header_params => header_params,
346
+ :query_params => query_params,
347
+ :form_params => form_params,
348
+ :body => post_body,
349
+ :auth_names => auth_names,
350
+ :return_type => return_type
351
+ )
352
+
353
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
354
+ if @api_client.config.debugging
355
+ @api_client.config.logger.debug "API called: RepositoriesFileApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
356
+ end
357
+ return data, status_code, headers
358
+ end
359
+
360
+ # Inspect a file repository
361
+ # FileRepository represents a single file repository, to which content can be synced, added, or removed.
362
+ # @param file_repository_href [String] URI of File Repository. e.g.: /pulp/api/v3/repositories/file/file/1/
363
+ # @param [Hash] opts the optional parameters
364
+ # @option opts [String] :fields A list of fields to include in the response.
365
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
366
+ # @return [FileFileRepository]
367
+ def read(file_repository_href, opts = {})
368
+ data, _status_code, _headers = read_with_http_info(file_repository_href, opts)
369
+ data
370
+ end
371
+
372
+ # Inspect a file repository
373
+ # FileRepository represents a single file repository, to which content can be synced, added, or removed.
374
+ # @param file_repository_href [String] URI of File Repository. e.g.: /pulp/api/v3/repositories/file/file/1/
375
+ # @param [Hash] opts the optional parameters
376
+ # @option opts [String] :fields A list of fields to include in the response.
377
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
378
+ # @return [Array<(FileFileRepository, Integer, Hash)>] FileFileRepository data, response status code and response headers
379
+ def read_with_http_info(file_repository_href, opts = {})
380
+ if @api_client.config.debugging
381
+ @api_client.config.logger.debug 'Calling API: RepositoriesFileApi.read ...'
382
+ end
383
+ # verify the required parameter 'file_repository_href' is set
384
+ if @api_client.config.client_side_validation && file_repository_href.nil?
385
+ fail ArgumentError, "Missing the required parameter 'file_repository_href' when calling RepositoriesFileApi.read"
386
+ end
387
+ # resource path
388
+ local_var_path = '{file_repository_href}'.sub('{' + 'file_repository_href' + '}', CGI.escape(file_repository_href.to_s).gsub('%2F', '/'))
389
+
390
+ # query parameters
391
+ query_params = opts[:query_params] || {}
392
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
393
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
394
+
395
+ # header parameters
396
+ header_params = opts[:header_params] || {}
397
+ # HTTP header 'Accept' (if needed)
398
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
399
+
400
+ # form parameters
401
+ form_params = opts[:form_params] || {}
402
+
403
+ # http body (model)
404
+ post_body = opts[:body]
405
+
406
+ # return_type
407
+ return_type = opts[:return_type] || 'FileFileRepository'
408
+
409
+ # auth_names
410
+ auth_names = opts[:auth_names] || ['Basic']
411
+
412
+ new_options = opts.merge(
413
+ :header_params => header_params,
414
+ :query_params => query_params,
415
+ :form_params => form_params,
416
+ :body => post_body,
417
+ :auth_names => auth_names,
418
+ :return_type => return_type
419
+ )
420
+
421
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
422
+ if @api_client.config.debugging
423
+ @api_client.config.logger.debug "API called: RepositoriesFileApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
424
+ end
425
+ return data, status_code, headers
426
+ end
427
+
428
+ # Trigger an asynchronous task to sync file content.
429
+ # @param file_repository_href [String] URI of File Repository. e.g.: /pulp/api/v3/repositories/file/file/1/
430
+ # @param data [RepositorySyncURL]
431
+ # @param [Hash] opts the optional parameters
432
+ # @return [AsyncOperationResponse]
433
+ def sync(file_repository_href, data, opts = {})
434
+ data, _status_code, _headers = sync_with_http_info(file_repository_href, data, opts)
435
+ data
436
+ end
437
+
438
+ # Trigger an asynchronous task to sync file content.
439
+ # @param file_repository_href [String] URI of File Repository. e.g.: /pulp/api/v3/repositories/file/file/1/
440
+ # @param data [RepositorySyncURL]
441
+ # @param [Hash] opts the optional parameters
442
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
443
+ def sync_with_http_info(file_repository_href, data, opts = {})
444
+ if @api_client.config.debugging
445
+ @api_client.config.logger.debug 'Calling API: RepositoriesFileApi.sync ...'
446
+ end
447
+ # verify the required parameter 'file_repository_href' is set
448
+ if @api_client.config.client_side_validation && file_repository_href.nil?
449
+ fail ArgumentError, "Missing the required parameter 'file_repository_href' when calling RepositoriesFileApi.sync"
450
+ end
451
+ # verify the required parameter 'data' is set
452
+ if @api_client.config.client_side_validation && data.nil?
453
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesFileApi.sync"
454
+ end
455
+ # resource path
456
+ local_var_path = '{file_repository_href}sync/'.sub('{' + 'file_repository_href' + '}', CGI.escape(file_repository_href.to_s).gsub('%2F', '/'))
457
+
458
+ # query parameters
459
+ query_params = opts[:query_params] || {}
460
+
461
+ # header parameters
462
+ header_params = opts[:header_params] || {}
463
+ # HTTP header 'Accept' (if needed)
464
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
465
+ # HTTP header 'Content-Type'
466
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
467
+
468
+ # form parameters
469
+ form_params = opts[:form_params] || {}
470
+
471
+ # http body (model)
472
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
473
+
474
+ # return_type
475
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
476
+
477
+ # auth_names
478
+ auth_names = opts[:auth_names] || ['Basic']
479
+
480
+ new_options = opts.merge(
481
+ :header_params => header_params,
482
+ :query_params => query_params,
483
+ :form_params => form_params,
484
+ :body => post_body,
485
+ :auth_names => auth_names,
486
+ :return_type => return_type
487
+ )
488
+
489
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
490
+ if @api_client.config.debugging
491
+ @api_client.config.logger.debug "API called: RepositoriesFileApi#sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
492
+ end
493
+ return data, status_code, headers
494
+ end
495
+
496
+ # Update a file repository
497
+ # Trigger an asynchronous task to update a repository.
498
+ # @param file_repository_href [String] URI of File Repository. e.g.: /pulp/api/v3/repositories/file/file/1/
499
+ # @param data [FileFileRepository]
500
+ # @param [Hash] opts the optional parameters
501
+ # @return [AsyncOperationResponse]
502
+ def update(file_repository_href, data, opts = {})
503
+ data, _status_code, _headers = update_with_http_info(file_repository_href, data, opts)
504
+ data
505
+ end
506
+
507
+ # Update a file repository
508
+ # Trigger an asynchronous task to update a repository.
509
+ # @param file_repository_href [String] URI of File Repository. e.g.: /pulp/api/v3/repositories/file/file/1/
510
+ # @param data [FileFileRepository]
511
+ # @param [Hash] opts the optional parameters
512
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
513
+ def update_with_http_info(file_repository_href, data, opts = {})
514
+ if @api_client.config.debugging
515
+ @api_client.config.logger.debug 'Calling API: RepositoriesFileApi.update ...'
516
+ end
517
+ # verify the required parameter 'file_repository_href' is set
518
+ if @api_client.config.client_side_validation && file_repository_href.nil?
519
+ fail ArgumentError, "Missing the required parameter 'file_repository_href' when calling RepositoriesFileApi.update"
520
+ end
521
+ # verify the required parameter 'data' is set
522
+ if @api_client.config.client_side_validation && data.nil?
523
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesFileApi.update"
524
+ end
525
+ # resource path
526
+ local_var_path = '{file_repository_href}'.sub('{' + 'file_repository_href' + '}', CGI.escape(file_repository_href.to_s).gsub('%2F', '/'))
527
+
528
+ # query parameters
529
+ query_params = opts[:query_params] || {}
530
+
531
+ # header parameters
532
+ header_params = opts[:header_params] || {}
533
+ # HTTP header 'Accept' (if needed)
534
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
535
+ # HTTP header 'Content-Type'
536
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
537
+
538
+ # form parameters
539
+ form_params = opts[:form_params] || {}
540
+
541
+ # http body (model)
542
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
543
+
544
+ # return_type
545
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
546
+
547
+ # auth_names
548
+ auth_names = opts[:auth_names] || ['Basic']
549
+
550
+ new_options = opts.merge(
551
+ :header_params => header_params,
552
+ :query_params => query_params,
553
+ :form_params => form_params,
554
+ :body => post_body,
555
+ :auth_names => auth_names,
556
+ :return_type => return_type
557
+ )
558
+
559
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
560
+ if @api_client.config.debugging
561
+ @api_client.config.logger.debug "API called: RepositoriesFileApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
562
+ end
563
+ return data, status_code, headers
564
+ end
565
+ end
566
+ end