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,349 @@
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 ContentPackagesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a python package content
23
+ # Trigger an asynchronous task to create content,optionally create new repository version.
24
+ # @param relative_path [String] Path where the artifact is located relative to distributions base_path
25
+ # @param filename [String] The name of the distribution package, usually of the format: {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}.{packagetype}
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [String] :artifact Artifact file representing the physical content
28
+ # @option opts [File] :file An uploaded file that may be turned into the artifact of the content unit.
29
+ # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
30
+ # @option opts [String] :summary A one-line summary of what the package does.
31
+ # @option opts [String] :description A longer description of the package that can run to several paragraphs.
32
+ # @option opts [String] :keywords Additional keywords to be used to assist searching for the package in a larger catalog.
33
+ # @option opts [String] :home_page The URL for the package's home page.
34
+ # @option opts [String] :download_url Legacy field denoting the URL from which this package can be downloaded.
35
+ # @option opts [String] :author Text containing the author's name. Contact information can also be added, separated with newlines.
36
+ # @option opts [String] :author_email The author's e-mail address.
37
+ # @option opts [String] :maintainer The maintainer's name at a minimum; additional contact information may be provided.
38
+ # @option opts [String] :maintainer_email The maintainer's e-mail address.
39
+ # @option opts [String] :license Text indicating the license covering the distribution
40
+ # @option opts [String] :requires_python The Python version(s) that the distribution is guaranteed to be compatible with.
41
+ # @option opts [String] :project_url A browsable URL for the project and a label for it, separated by a comma.
42
+ # @option opts [String] :platform A comma-separated list of platform specifications, summarizing the operating systems supported by the package.
43
+ # @option opts [String] :supported_platform Field to specify the OS and CPU for which the binary package was compiled.
44
+ # @option opts [String] :requires_dist A JSON list containing names of some other distutils project required by this distribution.
45
+ # @option opts [String] :provides_dist A JSON list containing names of a Distutils project which is contained within this distribution.
46
+ # @option opts [String] :obsoletes_dist A JSON list containing names of a distutils project's distribution which this distribution renders obsolete, meaning that the two projects should not be installed at the same time.
47
+ # @option opts [String] :requires_external A JSON list containing some dependency in the system that the distribution is to be used.
48
+ # @option opts [String] :classifiers A JSON list containing classification values for a Python package.
49
+ # @return [AsyncOperationResponse]
50
+ def create(relative_path, filename, opts = {})
51
+ data, _status_code, _headers = create_with_http_info(relative_path, filename, opts)
52
+ data
53
+ end
54
+
55
+ # Create a python package content
56
+ # Trigger an asynchronous task to create content,optionally create new repository version.
57
+ # @param relative_path [String] Path where the artifact is located relative to distributions base_path
58
+ # @param filename [String] The name of the distribution package, usually of the format: {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}.{packagetype}
59
+ # @param [Hash] opts the optional parameters
60
+ # @option opts [String] :artifact Artifact file representing the physical content
61
+ # @option opts [File] :file An uploaded file that may be turned into the artifact of the content unit.
62
+ # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
63
+ # @option opts [String] :summary A one-line summary of what the package does.
64
+ # @option opts [String] :description A longer description of the package that can run to several paragraphs.
65
+ # @option opts [String] :keywords Additional keywords to be used to assist searching for the package in a larger catalog.
66
+ # @option opts [String] :home_page The URL for the package's home page.
67
+ # @option opts [String] :download_url Legacy field denoting the URL from which this package can be downloaded.
68
+ # @option opts [String] :author Text containing the author's name. Contact information can also be added, separated with newlines.
69
+ # @option opts [String] :author_email The author's e-mail address.
70
+ # @option opts [String] :maintainer The maintainer's name at a minimum; additional contact information may be provided.
71
+ # @option opts [String] :maintainer_email The maintainer's e-mail address.
72
+ # @option opts [String] :license Text indicating the license covering the distribution
73
+ # @option opts [String] :requires_python The Python version(s) that the distribution is guaranteed to be compatible with.
74
+ # @option opts [String] :project_url A browsable URL for the project and a label for it, separated by a comma.
75
+ # @option opts [String] :platform A comma-separated list of platform specifications, summarizing the operating systems supported by the package.
76
+ # @option opts [String] :supported_platform Field to specify the OS and CPU for which the binary package was compiled.
77
+ # @option opts [String] :requires_dist A JSON list containing names of some other distutils project required by this distribution.
78
+ # @option opts [String] :provides_dist A JSON list containing names of a Distutils project which is contained within this distribution.
79
+ # @option opts [String] :obsoletes_dist A JSON list containing names of a distutils project's distribution which this distribution renders obsolete, meaning that the two projects should not be installed at the same time.
80
+ # @option opts [String] :requires_external A JSON list containing some dependency in the system that the distribution is to be used.
81
+ # @option opts [String] :classifiers A JSON list containing classification values for a Python package.
82
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
83
+ def create_with_http_info(relative_path, filename, opts = {})
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug 'Calling API: ContentPackagesApi.create ...'
86
+ end
87
+ # verify the required parameter 'relative_path' is set
88
+ if @api_client.config.client_side_validation && relative_path.nil?
89
+ fail ArgumentError, "Missing the required parameter 'relative_path' when calling ContentPackagesApi.create"
90
+ end
91
+ if @api_client.config.client_side_validation && relative_path.to_s.length < 1
92
+ fail ArgumentError, 'invalid value for "relative_path" when calling ContentPackagesApi.create, the character length must be great than or equal to 1.'
93
+ end
94
+
95
+ # verify the required parameter 'filename' is set
96
+ if @api_client.config.client_side_validation && filename.nil?
97
+ fail ArgumentError, "Missing the required parameter 'filename' when calling ContentPackagesApi.create"
98
+ end
99
+ if @api_client.config.client_side_validation && filename.to_s.length < 1
100
+ fail ArgumentError, 'invalid value for "filename" when calling ContentPackagesApi.create, the character length must be great than or equal to 1.'
101
+ end
102
+
103
+ # resource path
104
+ local_var_path = '/pulp/api/v3/content/python/packages/'
105
+
106
+ # query parameters
107
+ query_params = opts[:query_params] || {}
108
+
109
+ # header parameters
110
+ header_params = opts[:header_params] || {}
111
+ # HTTP header 'Accept' (if needed)
112
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
113
+ # HTTP header 'Content-Type'
114
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
115
+
116
+ # form parameters
117
+ form_params = opts[:form_params] || {}
118
+ form_params['relative_path'] = relative_path
119
+ form_params['filename'] = filename
120
+ form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
121
+ form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
122
+ form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
123
+ form_params['summary'] = opts[:'summary'] if !opts[:'summary'].nil?
124
+ form_params['description'] = opts[:'description'] if !opts[:'description'].nil?
125
+ form_params['keywords'] = opts[:'keywords'] if !opts[:'keywords'].nil?
126
+ form_params['home_page'] = opts[:'home_page'] if !opts[:'home_page'].nil?
127
+ form_params['download_url'] = opts[:'download_url'] if !opts[:'download_url'].nil?
128
+ form_params['author'] = opts[:'author'] if !opts[:'author'].nil?
129
+ form_params['author_email'] = opts[:'author_email'] if !opts[:'author_email'].nil?
130
+ form_params['maintainer'] = opts[:'maintainer'] if !opts[:'maintainer'].nil?
131
+ form_params['maintainer_email'] = opts[:'maintainer_email'] if !opts[:'maintainer_email'].nil?
132
+ form_params['license'] = opts[:'license'] if !opts[:'license'].nil?
133
+ form_params['requires_python'] = opts[:'requires_python'] if !opts[:'requires_python'].nil?
134
+ form_params['project_url'] = opts[:'project_url'] if !opts[:'project_url'].nil?
135
+ form_params['platform'] = opts[:'platform'] if !opts[:'platform'].nil?
136
+ form_params['supported_platform'] = opts[:'supported_platform'] if !opts[:'supported_platform'].nil?
137
+ form_params['requires_dist'] = opts[:'requires_dist'] if !opts[:'requires_dist'].nil?
138
+ form_params['provides_dist'] = opts[:'provides_dist'] if !opts[:'provides_dist'].nil?
139
+ form_params['obsoletes_dist'] = opts[:'obsoletes_dist'] if !opts[:'obsoletes_dist'].nil?
140
+ form_params['requires_external'] = opts[:'requires_external'] if !opts[:'requires_external'].nil?
141
+ form_params['classifiers'] = opts[:'classifiers'] if !opts[:'classifiers'].nil?
142
+
143
+ # http body (model)
144
+ post_body = opts[:body]
145
+
146
+ # return_type
147
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
148
+
149
+ # auth_names
150
+ auth_names = opts[:auth_names] || ['Basic']
151
+
152
+ new_options = opts.merge(
153
+ :header_params => header_params,
154
+ :query_params => query_params,
155
+ :form_params => form_params,
156
+ :body => post_body,
157
+ :auth_names => auth_names,
158
+ :return_type => return_type
159
+ )
160
+
161
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
162
+ if @api_client.config.debugging
163
+ @api_client.config.logger.debug "API called: ContentPackagesApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
164
+ end
165
+ return data, status_code, headers
166
+ end
167
+
168
+ # List python package contents
169
+ # PythonPackageContent represents each individually installable Python package. In the Python ecosystem, this is called a Python Distribution, sometimes (ambiguously) refered to as a package. In Pulp Python, we refer to it as PythonPackageContent. Each PythonPackageContent corresponds to a single filename, for example `pulpcore-3.0.0rc1-py3-none-any.whl` or `pulpcore-3.0.0rc1.tar.gz`.
170
+ # @param [Hash] opts the optional parameters
171
+ # @option opts [String] :ordering Which field to use when ordering the results.
172
+ # @option opts [String] :name Filter results where name matches value
173
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
174
+ # @option opts [String] :author Filter results where author matches value
175
+ # @option opts [String] :author__in Filter results where author is in a comma-separated list of values
176
+ # @option opts [String] :packagetype Filter results where packagetype matches value
177
+ # @option opts [String] :packagetype__in Filter results where packagetype is in a comma-separated list of values
178
+ # @option opts [String] :filename Filter results where filename matches value
179
+ # @option opts [String] :filename__in Filter results where filename is in a comma-separated list of values
180
+ # @option opts [String] :filename__contains Filter results where filename contains value
181
+ # @option opts [String] :keywords__in Filter results where keywords is in a comma-separated list of values
182
+ # @option opts [String] :keywords__contains Filter results where keywords contains value
183
+ # @option opts [String] :repository_version Repository Version referenced by HREF
184
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
185
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
186
+ # @option opts [Integer] :limit Number of results to return per page.
187
+ # @option opts [Integer] :offset The initial index from which to return the results.
188
+ # @option opts [String] :fields A list of fields to include in the response.
189
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
190
+ # @return [InlineResponse200]
191
+ def list(opts = {})
192
+ data, _status_code, _headers = list_with_http_info(opts)
193
+ data
194
+ end
195
+
196
+ # List python package contents
197
+ # PythonPackageContent represents each individually installable Python package. In the Python ecosystem, this is called a Python Distribution, sometimes (ambiguously) refered to as a package. In Pulp Python, we refer to it as PythonPackageContent. Each PythonPackageContent corresponds to a single filename, for example &#x60;pulpcore-3.0.0rc1-py3-none-any.whl&#x60; or &#x60;pulpcore-3.0.0rc1.tar.gz&#x60;.
198
+ # @param [Hash] opts the optional parameters
199
+ # @option opts [String] :ordering Which field to use when ordering the results.
200
+ # @option opts [String] :name Filter results where name matches value
201
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
202
+ # @option opts [String] :author Filter results where author matches value
203
+ # @option opts [String] :author__in Filter results where author is in a comma-separated list of values
204
+ # @option opts [String] :packagetype Filter results where packagetype matches value
205
+ # @option opts [String] :packagetype__in Filter results where packagetype is in a comma-separated list of values
206
+ # @option opts [String] :filename Filter results where filename matches value
207
+ # @option opts [String] :filename__in Filter results where filename is in a comma-separated list of values
208
+ # @option opts [String] :filename__contains Filter results where filename contains value
209
+ # @option opts [String] :keywords__in Filter results where keywords is in a comma-separated list of values
210
+ # @option opts [String] :keywords__contains Filter results where keywords contains value
211
+ # @option opts [String] :repository_version Repository Version referenced by HREF
212
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
213
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
214
+ # @option opts [Integer] :limit Number of results to return per page.
215
+ # @option opts [Integer] :offset The initial index from which to return the results.
216
+ # @option opts [String] :fields A list of fields to include in the response.
217
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
218
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
219
+ def list_with_http_info(opts = {})
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug 'Calling API: ContentPackagesApi.list ...'
222
+ end
223
+ # resource path
224
+ local_var_path = '/pulp/api/v3/content/python/packages/'
225
+
226
+ # query parameters
227
+ query_params = opts[:query_params] || {}
228
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
229
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
230
+ query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
231
+ query_params[:'author'] = opts[:'author'] if !opts[:'author'].nil?
232
+ query_params[:'author__in'] = opts[:'author__in'] if !opts[:'author__in'].nil?
233
+ query_params[:'packagetype'] = opts[:'packagetype'] if !opts[:'packagetype'].nil?
234
+ query_params[:'packagetype__in'] = opts[:'packagetype__in'] if !opts[:'packagetype__in'].nil?
235
+ query_params[:'filename'] = opts[:'filename'] if !opts[:'filename'].nil?
236
+ query_params[:'filename__in'] = opts[:'filename__in'] if !opts[:'filename__in'].nil?
237
+ query_params[:'filename__contains'] = opts[:'filename__contains'] if !opts[:'filename__contains'].nil?
238
+ query_params[:'keywords__in'] = opts[:'keywords__in'] if !opts[:'keywords__in'].nil?
239
+ query_params[:'keywords__contains'] = opts[:'keywords__contains'] if !opts[:'keywords__contains'].nil?
240
+ query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
241
+ query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
242
+ query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
243
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
244
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
245
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
246
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
247
+
248
+ # header parameters
249
+ header_params = opts[:header_params] || {}
250
+ # HTTP header 'Accept' (if needed)
251
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
252
+
253
+ # form parameters
254
+ form_params = opts[:form_params] || {}
255
+
256
+ # http body (model)
257
+ post_body = opts[:body]
258
+
259
+ # return_type
260
+ return_type = opts[:return_type] || 'InlineResponse200'
261
+
262
+ # auth_names
263
+ auth_names = opts[:auth_names] || ['Basic']
264
+
265
+ new_options = opts.merge(
266
+ :header_params => header_params,
267
+ :query_params => query_params,
268
+ :form_params => form_params,
269
+ :body => post_body,
270
+ :auth_names => auth_names,
271
+ :return_type => return_type
272
+ )
273
+
274
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
275
+ if @api_client.config.debugging
276
+ @api_client.config.logger.debug "API called: ContentPackagesApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
277
+ end
278
+ return data, status_code, headers
279
+ end
280
+
281
+ # Inspect a python package content
282
+ # PythonPackageContent represents each individually installable Python package. In the Python ecosystem, this is called a Python Distribution, sometimes (ambiguously) refered to as a package. In Pulp Python, we refer to it as PythonPackageContent. Each PythonPackageContent corresponds to a single filename, for example `pulpcore-3.0.0rc1-py3-none-any.whl` or `pulpcore-3.0.0rc1.tar.gz`.
283
+ # @param python_package_content_href [String] URI of Python Package Content. e.g.: /pulp/api/v3/content/python/packages/1/
284
+ # @param [Hash] opts the optional parameters
285
+ # @option opts [String] :fields A list of fields to include in the response.
286
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
287
+ # @return [PythonPythonPackageContentRead]
288
+ def read(python_package_content_href, opts = {})
289
+ data, _status_code, _headers = read_with_http_info(python_package_content_href, opts)
290
+ data
291
+ end
292
+
293
+ # Inspect a python package content
294
+ # PythonPackageContent represents each individually installable Python package. In the Python ecosystem, this is called a Python Distribution, sometimes (ambiguously) refered to as a package. In Pulp Python, we refer to it as PythonPackageContent. Each PythonPackageContent corresponds to a single filename, for example &#x60;pulpcore-3.0.0rc1-py3-none-any.whl&#x60; or &#x60;pulpcore-3.0.0rc1.tar.gz&#x60;.
295
+ # @param python_package_content_href [String] URI of Python Package Content. e.g.: /pulp/api/v3/content/python/packages/1/
296
+ # @param [Hash] opts the optional parameters
297
+ # @option opts [String] :fields A list of fields to include in the response.
298
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
299
+ # @return [Array<(PythonPythonPackageContentRead, Integer, Hash)>] PythonPythonPackageContentRead data, response status code and response headers
300
+ def read_with_http_info(python_package_content_href, opts = {})
301
+ if @api_client.config.debugging
302
+ @api_client.config.logger.debug 'Calling API: ContentPackagesApi.read ...'
303
+ end
304
+ # verify the required parameter 'python_package_content_href' is set
305
+ if @api_client.config.client_side_validation && python_package_content_href.nil?
306
+ fail ArgumentError, "Missing the required parameter 'python_package_content_href' when calling ContentPackagesApi.read"
307
+ end
308
+ # resource path
309
+ local_var_path = '{python_package_content_href}'.sub('{' + 'python_package_content_href' + '}', CGI.escape(python_package_content_href.to_s).gsub('%2F', '/'))
310
+
311
+ # query parameters
312
+ query_params = opts[:query_params] || {}
313
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
314
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
315
+
316
+ # header parameters
317
+ header_params = opts[:header_params] || {}
318
+ # HTTP header 'Accept' (if needed)
319
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
320
+
321
+ # form parameters
322
+ form_params = opts[:form_params] || {}
323
+
324
+ # http body (model)
325
+ post_body = opts[:body]
326
+
327
+ # return_type
328
+ return_type = opts[:return_type] || 'PythonPythonPackageContentRead'
329
+
330
+ # auth_names
331
+ auth_names = opts[:auth_names] || ['Basic']
332
+
333
+ new_options = opts.merge(
334
+ :header_params => header_params,
335
+ :query_params => query_params,
336
+ :form_params => form_params,
337
+ :body => post_body,
338
+ :auth_names => auth_names,
339
+ :return_type => return_type
340
+ )
341
+
342
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
343
+ if @api_client.config.debugging
344
+ @api_client.config.logger.debug "API called: ContentPackagesApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
345
+ end
346
+ return data, status_code, headers
347
+ end
348
+ end
349
+ end
@@ -0,0 +1,445 @@
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 DistributionsPypiApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a python distribution
23
+ # Trigger an asynchronous create task
24
+ # @param data [PythonPythonDistribution]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [AsyncOperationResponse]
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 distribution
33
+ # Trigger an asynchronous create task
34
+ # @param data [PythonPythonDistribution]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse 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: DistributionsPypiApi.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 DistributionsPypiApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/distributions/python/pypi/'
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] || 'AsyncOperationResponse'
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: DistributionsPypiApi#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 distribution
87
+ # Trigger an asynchronous delete task
88
+ # @param python_distribution_href [String] URI of Python Distribution. e.g.: /pulp/api/v3/distributions/python/pypi/1/
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [AsyncOperationResponse]
91
+ def delete(python_distribution_href, opts = {})
92
+ data, _status_code, _headers = delete_with_http_info(python_distribution_href, opts)
93
+ data
94
+ end
95
+
96
+ # Delete a python distribution
97
+ # Trigger an asynchronous delete task
98
+ # @param python_distribution_href [String] URI of Python Distribution. e.g.: /pulp/api/v3/distributions/python/pypi/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_distribution_href, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: DistributionsPypiApi.delete ...'
104
+ end
105
+ # verify the required parameter 'python_distribution_href' is set
106
+ if @api_client.config.client_side_validation && python_distribution_href.nil?
107
+ fail ArgumentError, "Missing the required parameter 'python_distribution_href' when calling DistributionsPypiApi.delete"
108
+ end
109
+ # resource path
110
+ local_var_path = '{python_distribution_href}'.sub('{' + 'python_distribution_href' + '}', CGI.escape(python_distribution_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: DistributionsPypiApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # List python distributions
149
+ # Pulp Python Distributions are used to distribute Python Publications. Pulp Python Distributions should not be confused with \"Python Distribution\" as defined by the Python community. In Pulp usage, Python content is refered to as Python Package Content.
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 [String] :base_path
155
+ # @option opts [String] :base_path__contains Filter results where base_path contains value
156
+ # @option opts [String] :base_path__icontains Filter results where base_path contains value
157
+ # @option opts [String] :base_path__in Filter results where base_path is in a comma-separated list of values
158
+ # @option opts [Integer] :limit Number of results to return per page.
159
+ # @option opts [Integer] :offset The initial index from which to return the results.
160
+ # @option opts [String] :fields A list of fields to include in the response.
161
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
162
+ # @return [InlineResponse2001]
163
+ def list(opts = {})
164
+ data, _status_code, _headers = list_with_http_info(opts)
165
+ data
166
+ end
167
+
168
+ # List python distributions
169
+ # Pulp Python Distributions are used to distribute Python Publications. Pulp Python Distributions should not be confused with \&quot;Python Distribution\&quot; as defined by the Python community. In Pulp usage, Python content is refered to as Python Package Content.
170
+ # @param [Hash] opts the optional parameters
171
+ # @option opts [String] :ordering Which field to use when ordering the results.
172
+ # @option opts [String] :name
173
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
174
+ # @option opts [String] :base_path
175
+ # @option opts [String] :base_path__contains Filter results where base_path contains value
176
+ # @option opts [String] :base_path__icontains Filter results where base_path contains value
177
+ # @option opts [String] :base_path__in Filter results where base_path is in a comma-separated list of values
178
+ # @option opts [Integer] :limit Number of results to return per page.
179
+ # @option opts [Integer] :offset The initial index from which to return the results.
180
+ # @option opts [String] :fields A list of fields to include in the response.
181
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
182
+ # @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
183
+ def list_with_http_info(opts = {})
184
+ if @api_client.config.debugging
185
+ @api_client.config.logger.debug 'Calling API: DistributionsPypiApi.list ...'
186
+ end
187
+ # resource path
188
+ local_var_path = '/pulp/api/v3/distributions/python/pypi/'
189
+
190
+ # query parameters
191
+ query_params = opts[:query_params] || {}
192
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
193
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
194
+ query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
195
+ query_params[:'base_path'] = opts[:'base_path'] if !opts[:'base_path'].nil?
196
+ query_params[:'base_path__contains'] = opts[:'base_path__contains'] if !opts[:'base_path__contains'].nil?
197
+ query_params[:'base_path__icontains'] = opts[:'base_path__icontains'] if !opts[:'base_path__icontains'].nil?
198
+ query_params[:'base_path__in'] = opts[:'base_path__in'] if !opts[:'base_path__in'].nil?
199
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
200
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
201
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
202
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
203
+
204
+ # header parameters
205
+ header_params = opts[:header_params] || {}
206
+ # HTTP header 'Accept' (if needed)
207
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
208
+
209
+ # form parameters
210
+ form_params = opts[:form_params] || {}
211
+
212
+ # http body (model)
213
+ post_body = opts[:body]
214
+
215
+ # return_type
216
+ return_type = opts[:return_type] || 'InlineResponse2001'
217
+
218
+ # auth_names
219
+ auth_names = opts[:auth_names] || ['Basic']
220
+
221
+ new_options = opts.merge(
222
+ :header_params => header_params,
223
+ :query_params => query_params,
224
+ :form_params => form_params,
225
+ :body => post_body,
226
+ :auth_names => auth_names,
227
+ :return_type => return_type
228
+ )
229
+
230
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
231
+ if @api_client.config.debugging
232
+ @api_client.config.logger.debug "API called: DistributionsPypiApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
233
+ end
234
+ return data, status_code, headers
235
+ end
236
+
237
+ # Partially update a python distribution
238
+ # Trigger an asynchronous partial update task
239
+ # @param python_distribution_href [String] URI of Python Distribution. e.g.: /pulp/api/v3/distributions/python/pypi/1/
240
+ # @param data [PythonPythonDistribution]
241
+ # @param [Hash] opts the optional parameters
242
+ # @return [AsyncOperationResponse]
243
+ def partial_update(python_distribution_href, data, opts = {})
244
+ data, _status_code, _headers = partial_update_with_http_info(python_distribution_href, data, opts)
245
+ data
246
+ end
247
+
248
+ # Partially update a python distribution
249
+ # Trigger an asynchronous partial update task
250
+ # @param python_distribution_href [String] URI of Python Distribution. e.g.: /pulp/api/v3/distributions/python/pypi/1/
251
+ # @param data [PythonPythonDistribution]
252
+ # @param [Hash] opts the optional parameters
253
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
254
+ def partial_update_with_http_info(python_distribution_href, data, opts = {})
255
+ if @api_client.config.debugging
256
+ @api_client.config.logger.debug 'Calling API: DistributionsPypiApi.partial_update ...'
257
+ end
258
+ # verify the required parameter 'python_distribution_href' is set
259
+ if @api_client.config.client_side_validation && python_distribution_href.nil?
260
+ fail ArgumentError, "Missing the required parameter 'python_distribution_href' when calling DistributionsPypiApi.partial_update"
261
+ end
262
+ # verify the required parameter 'data' is set
263
+ if @api_client.config.client_side_validation && data.nil?
264
+ fail ArgumentError, "Missing the required parameter 'data' when calling DistributionsPypiApi.partial_update"
265
+ end
266
+ # resource path
267
+ local_var_path = '{python_distribution_href}'.sub('{' + 'python_distribution_href' + '}', CGI.escape(python_distribution_href.to_s).gsub('%2F', '/'))
268
+
269
+ # query parameters
270
+ query_params = opts[:query_params] || {}
271
+
272
+ # header parameters
273
+ header_params = opts[:header_params] || {}
274
+ # HTTP header 'Accept' (if needed)
275
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
276
+ # HTTP header 'Content-Type'
277
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
278
+
279
+ # form parameters
280
+ form_params = opts[:form_params] || {}
281
+
282
+ # http body (model)
283
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
284
+
285
+ # return_type
286
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
287
+
288
+ # auth_names
289
+ auth_names = opts[:auth_names] || ['Basic']
290
+
291
+ new_options = opts.merge(
292
+ :header_params => header_params,
293
+ :query_params => query_params,
294
+ :form_params => form_params,
295
+ :body => post_body,
296
+ :auth_names => auth_names,
297
+ :return_type => return_type
298
+ )
299
+
300
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
301
+ if @api_client.config.debugging
302
+ @api_client.config.logger.debug "API called: DistributionsPypiApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
303
+ end
304
+ return data, status_code, headers
305
+ end
306
+
307
+ # Inspect a python distribution
308
+ # Pulp Python Distributions are used to distribute Python Publications. Pulp Python Distributions should not be confused with \"Python Distribution\" as defined by the Python community. In Pulp usage, Python content is refered to as Python Package Content.
309
+ # @param python_distribution_href [String] URI of Python Distribution. e.g.: /pulp/api/v3/distributions/python/pypi/1/
310
+ # @param [Hash] opts the optional parameters
311
+ # @option opts [String] :fields A list of fields to include in the response.
312
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
313
+ # @return [PythonPythonDistributionRead]
314
+ def read(python_distribution_href, opts = {})
315
+ data, _status_code, _headers = read_with_http_info(python_distribution_href, opts)
316
+ data
317
+ end
318
+
319
+ # Inspect a python distribution
320
+ # Pulp Python Distributions are used to distribute Python Publications. Pulp Python Distributions should not be confused with \&quot;Python Distribution\&quot; as defined by the Python community. In Pulp usage, Python content is refered to as Python Package Content.
321
+ # @param python_distribution_href [String] URI of Python Distribution. e.g.: /pulp/api/v3/distributions/python/pypi/1/
322
+ # @param [Hash] opts the optional parameters
323
+ # @option opts [String] :fields A list of fields to include in the response.
324
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
325
+ # @return [Array<(PythonPythonDistributionRead, Integer, Hash)>] PythonPythonDistributionRead data, response status code and response headers
326
+ def read_with_http_info(python_distribution_href, opts = {})
327
+ if @api_client.config.debugging
328
+ @api_client.config.logger.debug 'Calling API: DistributionsPypiApi.read ...'
329
+ end
330
+ # verify the required parameter 'python_distribution_href' is set
331
+ if @api_client.config.client_side_validation && python_distribution_href.nil?
332
+ fail ArgumentError, "Missing the required parameter 'python_distribution_href' when calling DistributionsPypiApi.read"
333
+ end
334
+ # resource path
335
+ local_var_path = '{python_distribution_href}'.sub('{' + 'python_distribution_href' + '}', CGI.escape(python_distribution_href.to_s).gsub('%2F', '/'))
336
+
337
+ # query parameters
338
+ query_params = opts[:query_params] || {}
339
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
340
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
341
+
342
+ # header parameters
343
+ header_params = opts[:header_params] || {}
344
+ # HTTP header 'Accept' (if needed)
345
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
346
+
347
+ # form parameters
348
+ form_params = opts[:form_params] || {}
349
+
350
+ # http body (model)
351
+ post_body = opts[:body]
352
+
353
+ # return_type
354
+ return_type = opts[:return_type] || 'PythonPythonDistributionRead'
355
+
356
+ # auth_names
357
+ auth_names = opts[:auth_names] || ['Basic']
358
+
359
+ new_options = opts.merge(
360
+ :header_params => header_params,
361
+ :query_params => query_params,
362
+ :form_params => form_params,
363
+ :body => post_body,
364
+ :auth_names => auth_names,
365
+ :return_type => return_type
366
+ )
367
+
368
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
369
+ if @api_client.config.debugging
370
+ @api_client.config.logger.debug "API called: DistributionsPypiApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
371
+ end
372
+ return data, status_code, headers
373
+ end
374
+
375
+ # Update a python distribution
376
+ # Trigger an asynchronous update task
377
+ # @param python_distribution_href [String] URI of Python Distribution. e.g.: /pulp/api/v3/distributions/python/pypi/1/
378
+ # @param data [PythonPythonDistribution]
379
+ # @param [Hash] opts the optional parameters
380
+ # @return [AsyncOperationResponse]
381
+ def update(python_distribution_href, data, opts = {})
382
+ data, _status_code, _headers = update_with_http_info(python_distribution_href, data, opts)
383
+ data
384
+ end
385
+
386
+ # Update a python distribution
387
+ # Trigger an asynchronous update task
388
+ # @param python_distribution_href [String] URI of Python Distribution. e.g.: /pulp/api/v3/distributions/python/pypi/1/
389
+ # @param data [PythonPythonDistribution]
390
+ # @param [Hash] opts the optional parameters
391
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
392
+ def update_with_http_info(python_distribution_href, data, opts = {})
393
+ if @api_client.config.debugging
394
+ @api_client.config.logger.debug 'Calling API: DistributionsPypiApi.update ...'
395
+ end
396
+ # verify the required parameter 'python_distribution_href' is set
397
+ if @api_client.config.client_side_validation && python_distribution_href.nil?
398
+ fail ArgumentError, "Missing the required parameter 'python_distribution_href' when calling DistributionsPypiApi.update"
399
+ end
400
+ # verify the required parameter 'data' is set
401
+ if @api_client.config.client_side_validation && data.nil?
402
+ fail ArgumentError, "Missing the required parameter 'data' when calling DistributionsPypiApi.update"
403
+ end
404
+ # resource path
405
+ local_var_path = '{python_distribution_href}'.sub('{' + 'python_distribution_href' + '}', CGI.escape(python_distribution_href.to_s).gsub('%2F', '/'))
406
+
407
+ # query parameters
408
+ query_params = opts[:query_params] || {}
409
+
410
+ # header parameters
411
+ header_params = opts[:header_params] || {}
412
+ # HTTP header 'Accept' (if needed)
413
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
414
+ # HTTP header 'Content-Type'
415
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
416
+
417
+ # form parameters
418
+ form_params = opts[:form_params] || {}
419
+
420
+ # http body (model)
421
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
422
+
423
+ # return_type
424
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
425
+
426
+ # auth_names
427
+ auth_names = opts[:auth_names] || ['Basic']
428
+
429
+ new_options = opts.merge(
430
+ :header_params => header_params,
431
+ :query_params => query_params,
432
+ :form_params => form_params,
433
+ :body => post_body,
434
+ :auth_names => auth_names,
435
+ :return_type => return_type
436
+ )
437
+
438
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
439
+ if @api_client.config.debugging
440
+ @api_client.config.logger.debug "API called: DistributionsPypiApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
441
+ end
442
+ return data, status_code, headers
443
+ end
444
+ end
445
+ end