pulp_python_client 3.0.0b9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +175 -0
  4. data/Rakefile +10 -0
  5. data/docs/AsyncOperationResponse.md +17 -0
  6. data/docs/ContentPackagesApi.md +262 -0
  7. data/docs/ContentSummary.md +21 -0
  8. data/docs/DistributionsPypiApi.md +364 -0
  9. data/docs/InlineResponse200.md +23 -0
  10. data/docs/InlineResponse2001.md +23 -0
  11. data/docs/InlineResponse2002.md +23 -0
  12. data/docs/InlineResponse2003.md +23 -0
  13. data/docs/InlineResponse2004.md +23 -0
  14. data/docs/InlineResponse2005.md +23 -0
  15. data/docs/ProjectSpecifier.md +19 -0
  16. data/docs/PublicationsPypiApi.md +253 -0
  17. data/docs/PythonPythonDistribution.md +29 -0
  18. data/docs/PythonPythonDistributionRead.md +29 -0
  19. data/docs/PythonPythonPackageContentRead.md +69 -0
  20. data/docs/PythonPythonPublication.md +25 -0
  21. data/docs/PythonPythonPublicationRead.md +25 -0
  22. data/docs/PythonPythonRemote.md +49 -0
  23. data/docs/PythonPythonRemoteRead.md +49 -0
  24. data/docs/PythonPythonRepository.md +27 -0
  25. data/docs/PythonPythonRepositoryRead.md +27 -0
  26. data/docs/RemotesPythonApi.md +368 -0
  27. data/docs/RepositoriesPythonApi.md +468 -0
  28. data/docs/RepositoriesPythonVersionsApi.md +269 -0
  29. data/docs/RepositoryAddRemoveContent.md +21 -0
  30. data/docs/RepositorySyncURL.md +19 -0
  31. data/docs/RepositoryVersion.md +25 -0
  32. data/docs/RepositoryVersionRead.md +25 -0
  33. data/git_push.sh +58 -0
  34. data/lib/pulp_python_client.rb +67 -0
  35. data/lib/pulp_python_client/api/content_packages_api.rb +349 -0
  36. data/lib/pulp_python_client/api/distributions_pypi_api.rb +445 -0
  37. data/lib/pulp_python_client/api/publications_pypi_api.rb +306 -0
  38. data/lib/pulp_python_client/api/remotes_python_api.rb +451 -0
  39. data/lib/pulp_python_client/api/repositories_python_api.rb +573 -0
  40. data/lib/pulp_python_client/api/repositories_python_versions_api.rb +336 -0
  41. data/lib/pulp_python_client/api_client.rb +402 -0
  42. data/lib/pulp_python_client/api_error.rb +57 -0
  43. data/lib/pulp_python_client/configuration.rb +243 -0
  44. data/lib/pulp_python_client/models/async_operation_response.rb +212 -0
  45. data/lib/pulp_python_client/models/content_summary.rb +246 -0
  46. data/lib/pulp_python_client/models/inline_response200.rb +247 -0
  47. data/lib/pulp_python_client/models/inline_response2001.rb +247 -0
  48. data/lib/pulp_python_client/models/inline_response2002.rb +247 -0
  49. data/lib/pulp_python_client/models/inline_response2003.rb +247 -0
  50. data/lib/pulp_python_client/models/inline_response2004.rb +247 -0
  51. data/lib/pulp_python_client/models/inline_response2005.rb +247 -0
  52. data/lib/pulp_python_client/models/project_specifier.rb +242 -0
  53. data/lib/pulp_python_client/models/python_python_distribution.rb +331 -0
  54. data/lib/pulp_python_client/models/python_python_distribution_read.rb +331 -0
  55. data/lib/pulp_python_client/models/python_python_package_content_read.rb +550 -0
  56. data/lib/pulp_python_client/models/python_python_publication.rb +247 -0
  57. data/lib/pulp_python_client/models/python_python_publication_read.rb +247 -0
  58. data/lib/pulp_python_client/models/python_python_remote.rb +565 -0
  59. data/lib/pulp_python_client/models/python_python_remote_read.rb +565 -0
  60. data/lib/pulp_python_client/models/python_python_repository.rb +294 -0
  61. data/lib/pulp_python_client/models/python_python_repository_read.rb +294 -0
  62. data/lib/pulp_python_client/models/repository_add_remove_content.rb +231 -0
  63. data/lib/pulp_python_client/models/repository_sync_url.rb +224 -0
  64. data/lib/pulp_python_client/models/repository_version.rb +244 -0
  65. data/lib/pulp_python_client/models/repository_version_read.rb +244 -0
  66. data/lib/pulp_python_client/version.rb +15 -0
  67. data/pulp_python_client.gemspec +39 -0
  68. data/spec/api/content_packages_api_spec.rb +114 -0
  69. data/spec/api/distributions_pypi_api_spec.rb +121 -0
  70. data/spec/api/publications_pypi_api_spec.rb +96 -0
  71. data/spec/api/remotes_python_api_spec.rb +123 -0
  72. data/spec/api/repositories_python_api_spec.rb +143 -0
  73. data/spec/api/repositories_python_versions_api_spec.rb +103 -0
  74. data/spec/api_client_spec.rb +188 -0
  75. data/spec/configuration_spec.rb +42 -0
  76. data/spec/models/async_operation_response_spec.rb +41 -0
  77. data/spec/models/content_summary_spec.rb +53 -0
  78. data/spec/models/inline_response2001_spec.rb +59 -0
  79. data/spec/models/inline_response2002_spec.rb +59 -0
  80. data/spec/models/inline_response2003_spec.rb +59 -0
  81. data/spec/models/inline_response2004_spec.rb +59 -0
  82. data/spec/models/inline_response2005_spec.rb +59 -0
  83. data/spec/models/inline_response200_spec.rb +59 -0
  84. data/spec/models/project_specifier_spec.rb +47 -0
  85. data/spec/models/python_python_distribution_read_spec.rb +77 -0
  86. data/spec/models/python_python_distribution_spec.rb +77 -0
  87. data/spec/models/python_python_package_content_read_spec.rb +197 -0
  88. data/spec/models/python_python_publication_read_spec.rb +65 -0
  89. data/spec/models/python_python_publication_spec.rb +65 -0
  90. data/spec/models/python_python_remote_read_spec.rb +141 -0
  91. data/spec/models/python_python_remote_spec.rb +141 -0
  92. data/spec/models/python_python_repository_read_spec.rb +71 -0
  93. data/spec/models/python_python_repository_spec.rb +71 -0
  94. data/spec/models/repository_add_remove_content_spec.rb +53 -0
  95. data/spec/models/repository_sync_url_spec.rb +47 -0
  96. data/spec/models/repository_version_read_spec.rb +65 -0
  97. data/spec/models/repository_version_spec.rb +65 -0
  98. data/spec/spec_helper.rb +111 -0
  99. metadata +225 -0
@@ -0,0 +1,573 @@
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.3
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpPythonClient
16
+ class RepositoriesPythonApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a python repository
23
+ # A ViewSet for PythonRepository.
24
+ # @param data [PythonPythonRepository]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [PythonPythonRepositoryRead]
27
+ def create(data, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(data, opts)
29
+ data
30
+ end
31
+
32
+ # Create a python repository
33
+ # A ViewSet for PythonRepository.
34
+ # @param data [PythonPythonRepository]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(PythonPythonRepositoryRead, Integer, Hash)>] PythonPythonRepositoryRead 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: RepositoriesPythonApi.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 RepositoriesPythonApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/repositories/python/python/'
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] || 'PythonPythonRepositoryRead'
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: RepositoriesPythonApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Delete a python repository
87
+ # Trigger an asynchronous delete task
88
+ # @param python_repository_href [String] URI of Python Repository. e.g.: /pulp/api/v3/repositories/python/python/1/
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [AsyncOperationResponse]
91
+ def delete(python_repository_href, opts = {})
92
+ data, _status_code, _headers = delete_with_http_info(python_repository_href, opts)
93
+ data
94
+ end
95
+
96
+ # Delete a python repository
97
+ # Trigger an asynchronous delete task
98
+ # @param python_repository_href [String] URI of Python Repository. e.g.: /pulp/api/v3/repositories/python/python/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(python_repository_href, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: RepositoriesPythonApi.delete ...'
104
+ end
105
+ # verify the required parameter 'python_repository_href' is set
106
+ if @api_client.config.client_side_validation && python_repository_href.nil?
107
+ fail ArgumentError, "Missing the required parameter 'python_repository_href' when calling RepositoriesPythonApi.delete"
108
+ end
109
+ # resource path
110
+ local_var_path = '{python_repository_href}'.sub('{' + 'python_repository_href' + '}', CGI.escape(python_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: RepositoriesPythonApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # List python repositorys
149
+ # A ViewSet for PythonRepository.
150
+ # @param [Hash] opts the optional parameters
151
+ # @option opts [String] :ordering Which field to use when ordering the results.
152
+ # @option opts [String] :name
153
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
154
+ # @option opts [Integer] :limit Number of results to return per page.
155
+ # @option opts [Integer] :offset The initial index from which to return the results.
156
+ # @option opts [String] :fields A list of fields to include in the response.
157
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
158
+ # @return [InlineResponse2004]
159
+ def list(opts = {})
160
+ data, _status_code, _headers = list_with_http_info(opts)
161
+ data
162
+ end
163
+
164
+ # List python repositorys
165
+ # A ViewSet for PythonRepository.
166
+ # @param [Hash] opts the optional parameters
167
+ # @option opts [String] :ordering Which field to use when ordering the results.
168
+ # @option opts [String] :name
169
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
170
+ # @option opts [Integer] :limit Number of results to return per page.
171
+ # @option opts [Integer] :offset The initial index from which to return the results.
172
+ # @option opts [String] :fields A list of fields to include in the response.
173
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
174
+ # @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
175
+ def list_with_http_info(opts = {})
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug 'Calling API: RepositoriesPythonApi.list ...'
178
+ end
179
+ # resource path
180
+ local_var_path = '/pulp/api/v3/repositories/python/python/'
181
+
182
+ # query parameters
183
+ query_params = opts[:query_params] || {}
184
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
185
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
186
+ query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
187
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
188
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
189
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
190
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
191
+
192
+ # header parameters
193
+ header_params = opts[:header_params] || {}
194
+ # HTTP header 'Accept' (if needed)
195
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
196
+
197
+ # form parameters
198
+ form_params = opts[:form_params] || {}
199
+
200
+ # http body (model)
201
+ post_body = opts[:body]
202
+
203
+ # return_type
204
+ return_type = opts[:return_type] || 'InlineResponse2004'
205
+
206
+ # auth_names
207
+ auth_names = opts[:auth_names] || ['Basic']
208
+
209
+ new_options = opts.merge(
210
+ :header_params => header_params,
211
+ :query_params => query_params,
212
+ :form_params => form_params,
213
+ :body => post_body,
214
+ :auth_names => auth_names,
215
+ :return_type => return_type
216
+ )
217
+
218
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug "API called: RepositoriesPythonApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
221
+ end
222
+ return data, status_code, headers
223
+ end
224
+
225
+ # Modify Repository Content
226
+ # Trigger an asynchronous task to create a new repository version.
227
+ # @param python_repository_href [String] URI of Python Repository. e.g.: /pulp/api/v3/repositories/python/python/1/
228
+ # @param data [RepositoryAddRemoveContent]
229
+ # @param [Hash] opts the optional parameters
230
+ # @return [AsyncOperationResponse]
231
+ def modify(python_repository_href, data, opts = {})
232
+ data, _status_code, _headers = modify_with_http_info(python_repository_href, data, opts)
233
+ data
234
+ end
235
+
236
+ # Modify Repository Content
237
+ # Trigger an asynchronous task to create a new repository version.
238
+ # @param python_repository_href [String] URI of Python Repository. e.g.: /pulp/api/v3/repositories/python/python/1/
239
+ # @param data [RepositoryAddRemoveContent]
240
+ # @param [Hash] opts the optional parameters
241
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
242
+ def modify_with_http_info(python_repository_href, data, opts = {})
243
+ if @api_client.config.debugging
244
+ @api_client.config.logger.debug 'Calling API: RepositoriesPythonApi.modify ...'
245
+ end
246
+ # verify the required parameter 'python_repository_href' is set
247
+ if @api_client.config.client_side_validation && python_repository_href.nil?
248
+ fail ArgumentError, "Missing the required parameter 'python_repository_href' when calling RepositoriesPythonApi.modify"
249
+ end
250
+ # verify the required parameter 'data' is set
251
+ if @api_client.config.client_side_validation && data.nil?
252
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesPythonApi.modify"
253
+ end
254
+ # resource path
255
+ local_var_path = '{python_repository_href}modify/'.sub('{' + 'python_repository_href' + '}', CGI.escape(python_repository_href.to_s).gsub('%2F', '/'))
256
+
257
+ # query parameters
258
+ query_params = opts[:query_params] || {}
259
+
260
+ # header parameters
261
+ header_params = opts[:header_params] || {}
262
+ # HTTP header 'Accept' (if needed)
263
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
264
+ # HTTP header 'Content-Type'
265
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
266
+
267
+ # form parameters
268
+ form_params = opts[:form_params] || {}
269
+
270
+ # http body (model)
271
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
272
+
273
+ # return_type
274
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
275
+
276
+ # auth_names
277
+ auth_names = opts[:auth_names] || ['Basic']
278
+
279
+ new_options = opts.merge(
280
+ :header_params => header_params,
281
+ :query_params => query_params,
282
+ :form_params => form_params,
283
+ :body => post_body,
284
+ :auth_names => auth_names,
285
+ :return_type => return_type
286
+ )
287
+
288
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
289
+ if @api_client.config.debugging
290
+ @api_client.config.logger.debug "API called: RepositoriesPythonApi#modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
291
+ end
292
+ return data, status_code, headers
293
+ end
294
+
295
+ # Partially update a python repository
296
+ # Trigger an asynchronous partial update task
297
+ # @param python_repository_href [String] URI of Python Repository. e.g.: /pulp/api/v3/repositories/python/python/1/
298
+ # @param data [PythonPythonRepository]
299
+ # @param [Hash] opts the optional parameters
300
+ # @return [AsyncOperationResponse]
301
+ def partial_update(python_repository_href, data, opts = {})
302
+ data, _status_code, _headers = partial_update_with_http_info(python_repository_href, data, opts)
303
+ data
304
+ end
305
+
306
+ # Partially update a python repository
307
+ # Trigger an asynchronous partial update task
308
+ # @param python_repository_href [String] URI of Python Repository. e.g.: /pulp/api/v3/repositories/python/python/1/
309
+ # @param data [PythonPythonRepository]
310
+ # @param [Hash] opts the optional parameters
311
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
312
+ def partial_update_with_http_info(python_repository_href, data, opts = {})
313
+ if @api_client.config.debugging
314
+ @api_client.config.logger.debug 'Calling API: RepositoriesPythonApi.partial_update ...'
315
+ end
316
+ # verify the required parameter 'python_repository_href' is set
317
+ if @api_client.config.client_side_validation && python_repository_href.nil?
318
+ fail ArgumentError, "Missing the required parameter 'python_repository_href' when calling RepositoriesPythonApi.partial_update"
319
+ end
320
+ # verify the required parameter 'data' is set
321
+ if @api_client.config.client_side_validation && data.nil?
322
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesPythonApi.partial_update"
323
+ end
324
+ # resource path
325
+ local_var_path = '{python_repository_href}'.sub('{' + 'python_repository_href' + '}', CGI.escape(python_repository_href.to_s).gsub('%2F', '/'))
326
+
327
+ # query parameters
328
+ query_params = opts[:query_params] || {}
329
+
330
+ # header parameters
331
+ header_params = opts[:header_params] || {}
332
+ # HTTP header 'Accept' (if needed)
333
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
334
+ # HTTP header 'Content-Type'
335
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
336
+
337
+ # form parameters
338
+ form_params = opts[:form_params] || {}
339
+
340
+ # http body (model)
341
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
342
+
343
+ # return_type
344
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
345
+
346
+ # auth_names
347
+ auth_names = opts[:auth_names] || ['Basic']
348
+
349
+ new_options = opts.merge(
350
+ :header_params => header_params,
351
+ :query_params => query_params,
352
+ :form_params => form_params,
353
+ :body => post_body,
354
+ :auth_names => auth_names,
355
+ :return_type => return_type
356
+ )
357
+
358
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
359
+ if @api_client.config.debugging
360
+ @api_client.config.logger.debug "API called: RepositoriesPythonApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
361
+ end
362
+ return data, status_code, headers
363
+ end
364
+
365
+ # Inspect a python repository
366
+ # A ViewSet for PythonRepository.
367
+ # @param python_repository_href [String] URI of Python Repository. e.g.: /pulp/api/v3/repositories/python/python/1/
368
+ # @param [Hash] opts the optional parameters
369
+ # @option opts [String] :fields A list of fields to include in the response.
370
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
371
+ # @return [PythonPythonRepositoryRead]
372
+ def read(python_repository_href, opts = {})
373
+ data, _status_code, _headers = read_with_http_info(python_repository_href, opts)
374
+ data
375
+ end
376
+
377
+ # Inspect a python repository
378
+ # A ViewSet for PythonRepository.
379
+ # @param python_repository_href [String] URI of Python Repository. e.g.: /pulp/api/v3/repositories/python/python/1/
380
+ # @param [Hash] opts the optional parameters
381
+ # @option opts [String] :fields A list of fields to include in the response.
382
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
383
+ # @return [Array<(PythonPythonRepositoryRead, Integer, Hash)>] PythonPythonRepositoryRead data, response status code and response headers
384
+ def read_with_http_info(python_repository_href, opts = {})
385
+ if @api_client.config.debugging
386
+ @api_client.config.logger.debug 'Calling API: RepositoriesPythonApi.read ...'
387
+ end
388
+ # verify the required parameter 'python_repository_href' is set
389
+ if @api_client.config.client_side_validation && python_repository_href.nil?
390
+ fail ArgumentError, "Missing the required parameter 'python_repository_href' when calling RepositoriesPythonApi.read"
391
+ end
392
+ # resource path
393
+ local_var_path = '{python_repository_href}'.sub('{' + 'python_repository_href' + '}', CGI.escape(python_repository_href.to_s).gsub('%2F', '/'))
394
+
395
+ # query parameters
396
+ query_params = opts[:query_params] || {}
397
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
398
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
399
+
400
+ # header parameters
401
+ header_params = opts[:header_params] || {}
402
+ # HTTP header 'Accept' (if needed)
403
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
404
+
405
+ # form parameters
406
+ form_params = opts[:form_params] || {}
407
+
408
+ # http body (model)
409
+ post_body = opts[:body]
410
+
411
+ # return_type
412
+ return_type = opts[:return_type] || 'PythonPythonRepositoryRead'
413
+
414
+ # auth_names
415
+ auth_names = opts[:auth_names] || ['Basic']
416
+
417
+ new_options = opts.merge(
418
+ :header_params => header_params,
419
+ :query_params => query_params,
420
+ :form_params => form_params,
421
+ :body => post_body,
422
+ :auth_names => auth_names,
423
+ :return_type => return_type
424
+ )
425
+
426
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
427
+ if @api_client.config.debugging
428
+ @api_client.config.logger.debug "API called: RepositoriesPythonApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
429
+ end
430
+ return data, status_code, headers
431
+ end
432
+
433
+ # Sync from remote
434
+ # Trigger an asynchronous task to sync Python content.
435
+ # @param python_repository_href [String] URI of Python Repository. e.g.: /pulp/api/v3/repositories/python/python/1/
436
+ # @param data [RepositorySyncURL]
437
+ # @param [Hash] opts the optional parameters
438
+ # @return [AsyncOperationResponse]
439
+ def sync(python_repository_href, data, opts = {})
440
+ data, _status_code, _headers = sync_with_http_info(python_repository_href, data, opts)
441
+ data
442
+ end
443
+
444
+ # Sync from remote
445
+ # Trigger an asynchronous task to sync Python content.
446
+ # @param python_repository_href [String] URI of Python Repository. e.g.: /pulp/api/v3/repositories/python/python/1/
447
+ # @param data [RepositorySyncURL]
448
+ # @param [Hash] opts the optional parameters
449
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
450
+ def sync_with_http_info(python_repository_href, data, opts = {})
451
+ if @api_client.config.debugging
452
+ @api_client.config.logger.debug 'Calling API: RepositoriesPythonApi.sync ...'
453
+ end
454
+ # verify the required parameter 'python_repository_href' is set
455
+ if @api_client.config.client_side_validation && python_repository_href.nil?
456
+ fail ArgumentError, "Missing the required parameter 'python_repository_href' when calling RepositoriesPythonApi.sync"
457
+ end
458
+ # verify the required parameter 'data' is set
459
+ if @api_client.config.client_side_validation && data.nil?
460
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesPythonApi.sync"
461
+ end
462
+ # resource path
463
+ local_var_path = '{python_repository_href}sync/'.sub('{' + 'python_repository_href' + '}', CGI.escape(python_repository_href.to_s).gsub('%2F', '/'))
464
+
465
+ # query parameters
466
+ query_params = opts[:query_params] || {}
467
+
468
+ # header parameters
469
+ header_params = opts[:header_params] || {}
470
+ # HTTP header 'Accept' (if needed)
471
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
472
+ # HTTP header 'Content-Type'
473
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
474
+
475
+ # form parameters
476
+ form_params = opts[:form_params] || {}
477
+
478
+ # http body (model)
479
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
480
+
481
+ # return_type
482
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
483
+
484
+ # auth_names
485
+ auth_names = opts[:auth_names] || ['Basic']
486
+
487
+ new_options = opts.merge(
488
+ :header_params => header_params,
489
+ :query_params => query_params,
490
+ :form_params => form_params,
491
+ :body => post_body,
492
+ :auth_names => auth_names,
493
+ :return_type => return_type
494
+ )
495
+
496
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
497
+ if @api_client.config.debugging
498
+ @api_client.config.logger.debug "API called: RepositoriesPythonApi#sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
499
+ end
500
+ return data, status_code, headers
501
+ end
502
+
503
+ # Update a python repository
504
+ # Trigger an asynchronous update task
505
+ # @param python_repository_href [String] URI of Python Repository. e.g.: /pulp/api/v3/repositories/python/python/1/
506
+ # @param data [PythonPythonRepository]
507
+ # @param [Hash] opts the optional parameters
508
+ # @return [AsyncOperationResponse]
509
+ def update(python_repository_href, data, opts = {})
510
+ data, _status_code, _headers = update_with_http_info(python_repository_href, data, opts)
511
+ data
512
+ end
513
+
514
+ # Update a python repository
515
+ # Trigger an asynchronous update task
516
+ # @param python_repository_href [String] URI of Python Repository. e.g.: /pulp/api/v3/repositories/python/python/1/
517
+ # @param data [PythonPythonRepository]
518
+ # @param [Hash] opts the optional parameters
519
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
520
+ def update_with_http_info(python_repository_href, data, opts = {})
521
+ if @api_client.config.debugging
522
+ @api_client.config.logger.debug 'Calling API: RepositoriesPythonApi.update ...'
523
+ end
524
+ # verify the required parameter 'python_repository_href' is set
525
+ if @api_client.config.client_side_validation && python_repository_href.nil?
526
+ fail ArgumentError, "Missing the required parameter 'python_repository_href' when calling RepositoriesPythonApi.update"
527
+ end
528
+ # verify the required parameter 'data' is set
529
+ if @api_client.config.client_side_validation && data.nil?
530
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesPythonApi.update"
531
+ end
532
+ # resource path
533
+ local_var_path = '{python_repository_href}'.sub('{' + 'python_repository_href' + '}', CGI.escape(python_repository_href.to_s).gsub('%2F', '/'))
534
+
535
+ # query parameters
536
+ query_params = opts[:query_params] || {}
537
+
538
+ # header parameters
539
+ header_params = opts[:header_params] || {}
540
+ # HTTP header 'Accept' (if needed)
541
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
542
+ # HTTP header 'Content-Type'
543
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
544
+
545
+ # form parameters
546
+ form_params = opts[:form_params] || {}
547
+
548
+ # http body (model)
549
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
550
+
551
+ # return_type
552
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
553
+
554
+ # auth_names
555
+ auth_names = opts[:auth_names] || ['Basic']
556
+
557
+ new_options = opts.merge(
558
+ :header_params => header_params,
559
+ :query_params => query_params,
560
+ :form_params => form_params,
561
+ :body => post_body,
562
+ :auth_names => auth_names,
563
+ :return_type => return_type
564
+ )
565
+
566
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
567
+ if @api_client.config.debugging
568
+ @api_client.config.logger.debug "API called: RepositoriesPythonApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
569
+ end
570
+ return data, status_code, headers
571
+ end
572
+ end
573
+ end