pulp_python_client 3.21.0 → 3.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -5
- data/docs/ContentPackagesApi.md +6 -2
- data/docs/ContentProvenanceApi.md +428 -0
- data/docs/FiletypeEnum.md +15 -0
- data/docs/MetadataVersionEnum.md +15 -0
- data/docs/PaginatedpythonPackageProvenanceResponseList.md +24 -0
- data/docs/PatchedpythonPythonRemote.md +3 -1
- data/docs/ProtocolVersionEnum.md +15 -0
- data/docs/PypiLegacyApi.md +9 -1
- data/docs/PypiProvenanceApi.md +91 -0
- data/docs/PypiSimpleApi.md +9 -1
- data/docs/PythonPackageProvenanceResponse.md +34 -0
- data/docs/PythonPythonPackageContentResponse.md +3 -1
- data/docs/PythonPythonRemote.md +3 -1
- data/docs/PythonPythonRemoteResponse.md +3 -1
- data/lib/pulp_python_client/api/content_packages_api.rb +6 -0
- data/lib/pulp_python_client/api/content_provenance_api.rb +448 -0
- data/lib/pulp_python_client/api/pypi_legacy_api.rb +12 -0
- data/lib/pulp_python_client/api/pypi_provenance_api.rb +110 -0
- data/lib/pulp_python_client/api/pypi_simple_api.rb +12 -0
- data/lib/pulp_python_client/models/filetype_enum.rb +40 -0
- data/lib/pulp_python_client/models/metadata_version_enum.rb +46 -0
- data/lib/pulp_python_client/models/paginatedpython_package_provenance_response_list.rb +257 -0
- data/lib/pulp_python_client/models/patchedpython_python_remote.rb +16 -4
- data/lib/pulp_python_client/models/protocol_version_enum.rb +39 -0
- data/lib/pulp_python_client/models/python_package_provenance_response.rb +302 -0
- data/lib/pulp_python_client/models/python_python_package_content_response.rb +15 -5
- data/lib/pulp_python_client/models/python_python_remote.rb +16 -4
- data/lib/pulp_python_client/models/python_python_remote_response.rb +16 -4
- data/lib/pulp_python_client/version.rb +1 -1
- data/lib/pulp_python_client.rb +7 -0
- data/spec/api/content_packages_api_spec.rb +2 -0
- data/spec/api/content_provenance_api_spec.rb +123 -0
- data/spec/api/pypi_legacy_api_spec.rb +4 -0
- data/spec/api/pypi_provenance_api_spec.rb +53 -0
- data/spec/api/pypi_simple_api_spec.rb +4 -0
- data/spec/models/filetype_enum_spec.rb +30 -0
- data/spec/models/metadata_version_enum_spec.rb +30 -0
- data/spec/models/paginatedpython_package_provenance_response_list_spec.rb +54 -0
- data/spec/models/patchedpython_python_remote_spec.rb +6 -0
- data/spec/models/protocol_version_enum_spec.rb +30 -0
- data/spec/models/python_package_provenance_response_spec.rb +84 -0
- data/spec/models/python_python_package_content_response_spec.rb +6 -0
- data/spec/models/python_python_remote_response_spec.rb +6 -0
- data/spec/models/python_python_remote_spec.rb +6 -0
- metadata +30 -2
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
Contact: pulp-list@redhat.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module PulpPythonClient
|
|
16
|
+
class ContentProvenanceApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a package provenance
|
|
23
|
+
# Trigger an asynchronous task to create content,optionally create new repository version.
|
|
24
|
+
# @param package [String] The package that the provenance is for.
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
27
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
|
28
|
+
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
29
|
+
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
30
|
+
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
31
|
+
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
32
|
+
# @option opts [Boolean] :verify Verify each attestation in the provenance. (default to true)
|
|
33
|
+
# @return [AsyncOperationResponse]
|
|
34
|
+
def create(package, opts = {})
|
|
35
|
+
data, _status_code, _headers = create_with_http_info(package, opts)
|
|
36
|
+
data
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Create a package provenance
|
|
40
|
+
# Trigger an asynchronous task to create content,optionally create new repository version.
|
|
41
|
+
# @param package [String] The package that the provenance is for.
|
|
42
|
+
# @param [Hash] opts the optional parameters
|
|
43
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
44
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
|
45
|
+
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
46
|
+
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
47
|
+
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
48
|
+
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
49
|
+
# @option opts [Boolean] :verify Verify each attestation in the provenance. (default to true)
|
|
50
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
51
|
+
def create_with_http_info(package, opts = {})
|
|
52
|
+
if @api_client.config.debugging
|
|
53
|
+
@api_client.config.logger.debug 'Calling API: ContentProvenanceApi.create ...'
|
|
54
|
+
end
|
|
55
|
+
# verify the required parameter 'package' is set
|
|
56
|
+
if @api_client.config.client_side_validation && package.nil?
|
|
57
|
+
fail ArgumentError, "Missing the required parameter 'package' when calling ContentProvenanceApi.create"
|
|
58
|
+
end
|
|
59
|
+
if @api_client.config.client_side_validation && !opts[:'file_url'].nil? && opts[:'file_url'].to_s.length < 1
|
|
60
|
+
fail ArgumentError, 'invalid value for "opts[:"file_url"]" when calling ContentProvenanceApi.create, the character length must be great than or equal to 1.'
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# resource path
|
|
64
|
+
local_var_path = '/pulp/api/v3/content/python/provenance/'
|
|
65
|
+
|
|
66
|
+
# query parameters
|
|
67
|
+
query_params = opts[:query_params] || {}
|
|
68
|
+
|
|
69
|
+
# header parameters
|
|
70
|
+
header_params = opts[:header_params] || {}
|
|
71
|
+
# HTTP header 'Accept' (if needed)
|
|
72
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
73
|
+
# HTTP header 'Content-Type'
|
|
74
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
|
|
75
|
+
if !content_type.nil?
|
|
76
|
+
header_params['Content-Type'] = content_type
|
|
77
|
+
end
|
|
78
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
79
|
+
|
|
80
|
+
# form parameters
|
|
81
|
+
form_params = opts[:form_params] || {}
|
|
82
|
+
form_params['package'] = package
|
|
83
|
+
form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
|
84
|
+
form_params['pulp_labels'] = opts[:'pulp_labels'] if !opts[:'pulp_labels'].nil?
|
|
85
|
+
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
|
86
|
+
form_params['upload'] = opts[:'upload'] if !opts[:'upload'].nil?
|
|
87
|
+
form_params['file_url'] = opts[:'file_url'] if !opts[:'file_url'].nil?
|
|
88
|
+
form_params['verify'] = opts[:'verify'] if !opts[:'verify'].nil?
|
|
89
|
+
|
|
90
|
+
# http body (model)
|
|
91
|
+
post_body = opts[:debug_body]
|
|
92
|
+
|
|
93
|
+
# return_type
|
|
94
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
|
95
|
+
|
|
96
|
+
# auth_names
|
|
97
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
98
|
+
|
|
99
|
+
new_options = opts.merge(
|
|
100
|
+
:operation => :"ContentProvenanceApi.create",
|
|
101
|
+
:header_params => header_params,
|
|
102
|
+
:query_params => query_params,
|
|
103
|
+
:form_params => form_params,
|
|
104
|
+
:body => post_body,
|
|
105
|
+
:auth_names => auth_names,
|
|
106
|
+
:return_type => return_type
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
110
|
+
if @api_client.config.debugging
|
|
111
|
+
@api_client.config.logger.debug "API called: ContentProvenanceApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
112
|
+
end
|
|
113
|
+
return data, status_code, headers
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# List package provenances
|
|
117
|
+
# PackageProvenance represents a PEP 740 provenance object for a Python package. Use ?minimal=true to get a human readable representation of the provenance.
|
|
118
|
+
# @param [Hash] opts the optional parameters
|
|
119
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
120
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
|
121
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
122
|
+
# @option opts [Array<String>] :ordering Ordering * `pk` - Pk * `-pk` - Pk (descending)
|
|
123
|
+
# @option opts [Float] :orphaned_for Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
|
|
124
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
|
125
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
|
126
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
127
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
128
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
129
|
+
# @option opts [String] :repository_version Repository Version referenced by HREF/PRN
|
|
130
|
+
# @option opts [String] :repository_version_added Repository Version referenced by HREF/PRN
|
|
131
|
+
# @option opts [String] :repository_version_removed Repository Version referenced by HREF/PRN
|
|
132
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
133
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
134
|
+
# @return [PaginatedpythonPackageProvenanceResponseList]
|
|
135
|
+
def list(opts = {})
|
|
136
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
|
137
|
+
data
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# List package provenances
|
|
141
|
+
# PackageProvenance represents a PEP 740 provenance object for a Python package. Use ?minimal=true to get a human readable representation of the provenance.
|
|
142
|
+
# @param [Hash] opts the optional parameters
|
|
143
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
144
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
|
145
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
146
|
+
# @option opts [Array<String>] :ordering Ordering * `pk` - Pk * `-pk` - Pk (descending)
|
|
147
|
+
# @option opts [Float] :orphaned_for Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
|
|
148
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
|
149
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
|
150
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
151
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
152
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
153
|
+
# @option opts [String] :repository_version Repository Version referenced by HREF/PRN
|
|
154
|
+
# @option opts [String] :repository_version_added Repository Version referenced by HREF/PRN
|
|
155
|
+
# @option opts [String] :repository_version_removed Repository Version referenced by HREF/PRN
|
|
156
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
157
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
158
|
+
# @return [Array<(PaginatedpythonPackageProvenanceResponseList, Integer, Hash)>] PaginatedpythonPackageProvenanceResponseList data, response status code and response headers
|
|
159
|
+
def list_with_http_info(opts = {})
|
|
160
|
+
if @api_client.config.debugging
|
|
161
|
+
@api_client.config.logger.debug 'Calling API: ContentProvenanceApi.list ...'
|
|
162
|
+
end
|
|
163
|
+
allowable_values = ["-pk", "pk"]
|
|
164
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
|
165
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
|
166
|
+
end
|
|
167
|
+
# resource path
|
|
168
|
+
local_var_path = '/pulp/api/v3/content/python/provenance/'
|
|
169
|
+
|
|
170
|
+
# query parameters
|
|
171
|
+
query_params = opts[:query_params] || {}
|
|
172
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
173
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
174
|
+
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
|
175
|
+
query_params[:'orphaned_for'] = opts[:'orphaned_for'] if !opts[:'orphaned_for'].nil?
|
|
176
|
+
query_params[:'prn__in'] = @api_client.build_collection_param(opts[:'prn__in'], :csv) if !opts[:'prn__in'].nil?
|
|
177
|
+
query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
|
|
178
|
+
query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
|
|
179
|
+
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
|
180
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
181
|
+
query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
|
|
182
|
+
query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
|
|
183
|
+
query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
|
|
184
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
|
185
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
|
186
|
+
|
|
187
|
+
# header parameters
|
|
188
|
+
header_params = opts[:header_params] || {}
|
|
189
|
+
# HTTP header 'Accept' (if needed)
|
|
190
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
191
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
192
|
+
|
|
193
|
+
# form parameters
|
|
194
|
+
form_params = opts[:form_params] || {}
|
|
195
|
+
|
|
196
|
+
# http body (model)
|
|
197
|
+
post_body = opts[:debug_body]
|
|
198
|
+
|
|
199
|
+
# return_type
|
|
200
|
+
return_type = opts[:debug_return_type] || 'PaginatedpythonPackageProvenanceResponseList'
|
|
201
|
+
|
|
202
|
+
# auth_names
|
|
203
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
204
|
+
|
|
205
|
+
new_options = opts.merge(
|
|
206
|
+
:operation => :"ContentProvenanceApi.list",
|
|
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: ContentProvenanceApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
218
|
+
end
|
|
219
|
+
return data, status_code, headers
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Inspect a package provenance
|
|
223
|
+
# PackageProvenance represents a PEP 740 provenance object for a Python package. Use ?minimal=true to get a human readable representation of the provenance.
|
|
224
|
+
# @param python_package_provenance_href [String]
|
|
225
|
+
# @param [Hash] opts the optional parameters
|
|
226
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
227
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
228
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
229
|
+
# @return [PythonPackageProvenanceResponse]
|
|
230
|
+
def read(python_package_provenance_href, opts = {})
|
|
231
|
+
data, _status_code, _headers = read_with_http_info(python_package_provenance_href, opts)
|
|
232
|
+
data
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Inspect a package provenance
|
|
236
|
+
# PackageProvenance represents a PEP 740 provenance object for a Python package. Use ?minimal=true to get a human readable representation of the provenance.
|
|
237
|
+
# @param python_package_provenance_href [String]
|
|
238
|
+
# @param [Hash] opts the optional parameters
|
|
239
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
240
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
241
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
242
|
+
# @return [Array<(PythonPackageProvenanceResponse, Integer, Hash)>] PythonPackageProvenanceResponse data, response status code and response headers
|
|
243
|
+
def read_with_http_info(python_package_provenance_href, opts = {})
|
|
244
|
+
if @api_client.config.debugging
|
|
245
|
+
@api_client.config.logger.debug 'Calling API: ContentProvenanceApi.read ...'
|
|
246
|
+
end
|
|
247
|
+
# verify the required parameter 'python_package_provenance_href' is set
|
|
248
|
+
if @api_client.config.client_side_validation && python_package_provenance_href.nil?
|
|
249
|
+
fail ArgumentError, "Missing the required parameter 'python_package_provenance_href' when calling ContentProvenanceApi.read"
|
|
250
|
+
end
|
|
251
|
+
# resource path
|
|
252
|
+
local_var_path = '{python_package_provenance_href}'.sub('{' + 'python_package_provenance_href' + '}', CGI.escape(python_package_provenance_href.to_s).gsub('%2F', '/'))
|
|
253
|
+
|
|
254
|
+
# query parameters
|
|
255
|
+
query_params = opts[:query_params] || {}
|
|
256
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
|
257
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
|
258
|
+
|
|
259
|
+
# header parameters
|
|
260
|
+
header_params = opts[:header_params] || {}
|
|
261
|
+
# HTTP header 'Accept' (if needed)
|
|
262
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
263
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
264
|
+
|
|
265
|
+
# form parameters
|
|
266
|
+
form_params = opts[:form_params] || {}
|
|
267
|
+
|
|
268
|
+
# http body (model)
|
|
269
|
+
post_body = opts[:debug_body]
|
|
270
|
+
|
|
271
|
+
# return_type
|
|
272
|
+
return_type = opts[:debug_return_type] || 'PythonPackageProvenanceResponse'
|
|
273
|
+
|
|
274
|
+
# auth_names
|
|
275
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
276
|
+
|
|
277
|
+
new_options = opts.merge(
|
|
278
|
+
:operation => :"ContentProvenanceApi.read",
|
|
279
|
+
:header_params => header_params,
|
|
280
|
+
:query_params => query_params,
|
|
281
|
+
:form_params => form_params,
|
|
282
|
+
:body => post_body,
|
|
283
|
+
:auth_names => auth_names,
|
|
284
|
+
:return_type => return_type
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
288
|
+
if @api_client.config.debugging
|
|
289
|
+
@api_client.config.logger.debug "API called: ContentProvenanceApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
290
|
+
end
|
|
291
|
+
return data, status_code, headers
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
# Set a label
|
|
295
|
+
# Set a single pulp_label on the object to a specific value or null.
|
|
296
|
+
# @param python_package_provenance_href [String]
|
|
297
|
+
# @param set_label [SetLabel]
|
|
298
|
+
# @param [Hash] opts the optional parameters
|
|
299
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
300
|
+
# @return [SetLabelResponse]
|
|
301
|
+
def set_label(python_package_provenance_href, set_label, opts = {})
|
|
302
|
+
data, _status_code, _headers = set_label_with_http_info(python_package_provenance_href, set_label, opts)
|
|
303
|
+
data
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# Set a label
|
|
307
|
+
# Set a single pulp_label on the object to a specific value or null.
|
|
308
|
+
# @param python_package_provenance_href [String]
|
|
309
|
+
# @param set_label [SetLabel]
|
|
310
|
+
# @param [Hash] opts the optional parameters
|
|
311
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
312
|
+
# @return [Array<(SetLabelResponse, Integer, Hash)>] SetLabelResponse data, response status code and response headers
|
|
313
|
+
def set_label_with_http_info(python_package_provenance_href, set_label, opts = {})
|
|
314
|
+
if @api_client.config.debugging
|
|
315
|
+
@api_client.config.logger.debug 'Calling API: ContentProvenanceApi.set_label ...'
|
|
316
|
+
end
|
|
317
|
+
# verify the required parameter 'python_package_provenance_href' is set
|
|
318
|
+
if @api_client.config.client_side_validation && python_package_provenance_href.nil?
|
|
319
|
+
fail ArgumentError, "Missing the required parameter 'python_package_provenance_href' when calling ContentProvenanceApi.set_label"
|
|
320
|
+
end
|
|
321
|
+
# verify the required parameter 'set_label' is set
|
|
322
|
+
if @api_client.config.client_side_validation && set_label.nil?
|
|
323
|
+
fail ArgumentError, "Missing the required parameter 'set_label' when calling ContentProvenanceApi.set_label"
|
|
324
|
+
end
|
|
325
|
+
# resource path
|
|
326
|
+
local_var_path = '{python_package_provenance_href}set_label/'.sub('{' + 'python_package_provenance_href' + '}', CGI.escape(python_package_provenance_href.to_s).gsub('%2F', '/'))
|
|
327
|
+
|
|
328
|
+
# query parameters
|
|
329
|
+
query_params = opts[:query_params] || {}
|
|
330
|
+
|
|
331
|
+
# header parameters
|
|
332
|
+
header_params = opts[:header_params] || {}
|
|
333
|
+
# HTTP header 'Accept' (if needed)
|
|
334
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
335
|
+
# HTTP header 'Content-Type'
|
|
336
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
337
|
+
if !content_type.nil?
|
|
338
|
+
header_params['Content-Type'] = content_type
|
|
339
|
+
end
|
|
340
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
341
|
+
|
|
342
|
+
# form parameters
|
|
343
|
+
form_params = opts[:form_params] || {}
|
|
344
|
+
|
|
345
|
+
# http body (model)
|
|
346
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_label)
|
|
347
|
+
|
|
348
|
+
# return_type
|
|
349
|
+
return_type = opts[:debug_return_type] || 'SetLabelResponse'
|
|
350
|
+
|
|
351
|
+
# auth_names
|
|
352
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
353
|
+
|
|
354
|
+
new_options = opts.merge(
|
|
355
|
+
:operation => :"ContentProvenanceApi.set_label",
|
|
356
|
+
:header_params => header_params,
|
|
357
|
+
:query_params => query_params,
|
|
358
|
+
:form_params => form_params,
|
|
359
|
+
:body => post_body,
|
|
360
|
+
:auth_names => auth_names,
|
|
361
|
+
:return_type => return_type
|
|
362
|
+
)
|
|
363
|
+
|
|
364
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
365
|
+
if @api_client.config.debugging
|
|
366
|
+
@api_client.config.logger.debug "API called: ContentProvenanceApi#set_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
367
|
+
end
|
|
368
|
+
return data, status_code, headers
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
# Unset a label
|
|
372
|
+
# Unset a single pulp_label on the object.
|
|
373
|
+
# @param python_package_provenance_href [String]
|
|
374
|
+
# @param unset_label [UnsetLabel]
|
|
375
|
+
# @param [Hash] opts the optional parameters
|
|
376
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
377
|
+
# @return [UnsetLabelResponse]
|
|
378
|
+
def unset_label(python_package_provenance_href, unset_label, opts = {})
|
|
379
|
+
data, _status_code, _headers = unset_label_with_http_info(python_package_provenance_href, unset_label, opts)
|
|
380
|
+
data
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# Unset a label
|
|
384
|
+
# Unset a single pulp_label on the object.
|
|
385
|
+
# @param python_package_provenance_href [String]
|
|
386
|
+
# @param unset_label [UnsetLabel]
|
|
387
|
+
# @param [Hash] opts the optional parameters
|
|
388
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
389
|
+
# @return [Array<(UnsetLabelResponse, Integer, Hash)>] UnsetLabelResponse data, response status code and response headers
|
|
390
|
+
def unset_label_with_http_info(python_package_provenance_href, unset_label, opts = {})
|
|
391
|
+
if @api_client.config.debugging
|
|
392
|
+
@api_client.config.logger.debug 'Calling API: ContentProvenanceApi.unset_label ...'
|
|
393
|
+
end
|
|
394
|
+
# verify the required parameter 'python_package_provenance_href' is set
|
|
395
|
+
if @api_client.config.client_side_validation && python_package_provenance_href.nil?
|
|
396
|
+
fail ArgumentError, "Missing the required parameter 'python_package_provenance_href' when calling ContentProvenanceApi.unset_label"
|
|
397
|
+
end
|
|
398
|
+
# verify the required parameter 'unset_label' is set
|
|
399
|
+
if @api_client.config.client_side_validation && unset_label.nil?
|
|
400
|
+
fail ArgumentError, "Missing the required parameter 'unset_label' when calling ContentProvenanceApi.unset_label"
|
|
401
|
+
end
|
|
402
|
+
# resource path
|
|
403
|
+
local_var_path = '{python_package_provenance_href}unset_label/'.sub('{' + 'python_package_provenance_href' + '}', CGI.escape(python_package_provenance_href.to_s).gsub('%2F', '/'))
|
|
404
|
+
|
|
405
|
+
# query parameters
|
|
406
|
+
query_params = opts[:query_params] || {}
|
|
407
|
+
|
|
408
|
+
# header parameters
|
|
409
|
+
header_params = opts[:header_params] || {}
|
|
410
|
+
# HTTP header 'Accept' (if needed)
|
|
411
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
412
|
+
# HTTP header 'Content-Type'
|
|
413
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
414
|
+
if !content_type.nil?
|
|
415
|
+
header_params['Content-Type'] = content_type
|
|
416
|
+
end
|
|
417
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
418
|
+
|
|
419
|
+
# form parameters
|
|
420
|
+
form_params = opts[:form_params] || {}
|
|
421
|
+
|
|
422
|
+
# http body (model)
|
|
423
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(unset_label)
|
|
424
|
+
|
|
425
|
+
# return_type
|
|
426
|
+
return_type = opts[:debug_return_type] || 'UnsetLabelResponse'
|
|
427
|
+
|
|
428
|
+
# auth_names
|
|
429
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
430
|
+
|
|
431
|
+
new_options = opts.merge(
|
|
432
|
+
:operation => :"ContentProvenanceApi.unset_label",
|
|
433
|
+
:header_params => header_params,
|
|
434
|
+
:query_params => query_params,
|
|
435
|
+
:form_params => form_params,
|
|
436
|
+
:body => post_body,
|
|
437
|
+
:auth_names => auth_names,
|
|
438
|
+
:return_type => return_type
|
|
439
|
+
)
|
|
440
|
+
|
|
441
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
442
|
+
if @api_client.config.debugging
|
|
443
|
+
@api_client.config.logger.debug "API called: ContentProvenanceApi#unset_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
444
|
+
end
|
|
445
|
+
return data, status_code, headers
|
|
446
|
+
end
|
|
447
|
+
end
|
|
448
|
+
end
|
|
@@ -27,6 +27,10 @@ module PulpPythonClient
|
|
|
27
27
|
# @param [Hash] opts the optional parameters
|
|
28
28
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
29
29
|
# @option opts [String] :action Defaults to `file_upload`, don't change it or request will fail! (default to 'file_upload')
|
|
30
|
+
# @option opts [ProtocolVersionEnum] :protocol_version Protocol version to use for the upload. Only version 1 is supported. * `1` - 1
|
|
31
|
+
# @option opts [FiletypeEnum] :filetype Type of artifact to upload. * `bdist_wheel` - bdist_wheel * `sdist` - sdist
|
|
32
|
+
# @option opts [MetadataVersionEnum] :metadata_version Metadata version of the uploaded package. * `1.0` - 1.0 * `1.1` - 1.1 * `1.2` - 1.2 * `2.0` - 2.0 * `2.1` - 2.1 * `2.2` - 2.2 * `2.3` - 2.3 * `2.4` - 2.4
|
|
33
|
+
# @option opts [Object] :attestations
|
|
30
34
|
# @return [PackageUploadTaskResponse]
|
|
31
35
|
def create(path, content, sha256_digest, opts = {})
|
|
32
36
|
data, _status_code, _headers = create_with_http_info(path, content, sha256_digest, opts)
|
|
@@ -41,6 +45,10 @@ module PulpPythonClient
|
|
|
41
45
|
# @param [Hash] opts the optional parameters
|
|
42
46
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
43
47
|
# @option opts [String] :action Defaults to `file_upload`, don't change it or request will fail! (default to 'file_upload')
|
|
48
|
+
# @option opts [ProtocolVersionEnum] :protocol_version Protocol version to use for the upload. Only version 1 is supported. * `1` - 1
|
|
49
|
+
# @option opts [FiletypeEnum] :filetype Type of artifact to upload. * `bdist_wheel` - bdist_wheel * `sdist` - sdist
|
|
50
|
+
# @option opts [MetadataVersionEnum] :metadata_version Metadata version of the uploaded package. * `1.0` - 1.0 * `1.1` - 1.1 * `1.2` - 1.2 * `2.0` - 2.0 * `2.1` - 2.1 * `2.2` - 2.2 * `2.3` - 2.3 * `2.4` - 2.4
|
|
51
|
+
# @option opts [Object] :attestations
|
|
44
52
|
# @return [Array<(PackageUploadTaskResponse, Integer, Hash)>] PackageUploadTaskResponse data, response status code and response headers
|
|
45
53
|
def create_with_http_info(path, content, sha256_digest, opts = {})
|
|
46
54
|
if @api_client.config.debugging
|
|
@@ -92,6 +100,10 @@ module PulpPythonClient
|
|
|
92
100
|
form_params['content'] = content
|
|
93
101
|
form_params['sha256_digest'] = sha256_digest
|
|
94
102
|
form_params['action'] = opts[:'action'] if !opts[:'action'].nil?
|
|
103
|
+
form_params['protocol_version'] = opts[:'protocol_version'] if !opts[:'protocol_version'].nil?
|
|
104
|
+
form_params['filetype'] = opts[:'filetype'] if !opts[:'filetype'].nil?
|
|
105
|
+
form_params['metadata_version'] = opts[:'metadata_version'] if !opts[:'metadata_version'].nil?
|
|
106
|
+
form_params['attestations'] = opts[:'attestations'] if !opts[:'attestations'].nil?
|
|
95
107
|
|
|
96
108
|
# http body (model)
|
|
97
109
|
post_body = opts[:debug_body]
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
Contact: pulp-list@redhat.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module PulpPythonClient
|
|
16
|
+
class PypiProvenanceApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get package provenance
|
|
23
|
+
# Gets the provenance for a package.
|
|
24
|
+
# @param filename [String]
|
|
25
|
+
# @param package [String]
|
|
26
|
+
# @param path [String]
|
|
27
|
+
# @param version [String]
|
|
28
|
+
# @param [Hash] opts the optional parameters
|
|
29
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
30
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
31
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
32
|
+
# @return [nil]
|
|
33
|
+
def read(filename, package, path, version, opts = {})
|
|
34
|
+
read_with_http_info(filename, package, path, version, opts)
|
|
35
|
+
nil
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Get package provenance
|
|
39
|
+
# Gets the provenance for a package.
|
|
40
|
+
# @param filename [String]
|
|
41
|
+
# @param package [String]
|
|
42
|
+
# @param path [String]
|
|
43
|
+
# @param version [String]
|
|
44
|
+
# @param [Hash] opts the optional parameters
|
|
45
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
46
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
47
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
48
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
49
|
+
def read_with_http_info(filename, package, path, version, opts = {})
|
|
50
|
+
if @api_client.config.debugging
|
|
51
|
+
@api_client.config.logger.debug 'Calling API: PypiProvenanceApi.read ...'
|
|
52
|
+
end
|
|
53
|
+
# verify the required parameter 'filename' is set
|
|
54
|
+
if @api_client.config.client_side_validation && filename.nil?
|
|
55
|
+
fail ArgumentError, "Missing the required parameter 'filename' when calling PypiProvenanceApi.read"
|
|
56
|
+
end
|
|
57
|
+
# verify the required parameter 'package' is set
|
|
58
|
+
if @api_client.config.client_side_validation && package.nil?
|
|
59
|
+
fail ArgumentError, "Missing the required parameter 'package' when calling PypiProvenanceApi.read"
|
|
60
|
+
end
|
|
61
|
+
# verify the required parameter 'path' is set
|
|
62
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
63
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling PypiProvenanceApi.read"
|
|
64
|
+
end
|
|
65
|
+
# verify the required parameter 'version' is set
|
|
66
|
+
if @api_client.config.client_side_validation && version.nil?
|
|
67
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling PypiProvenanceApi.read"
|
|
68
|
+
end
|
|
69
|
+
# resource path
|
|
70
|
+
local_var_path = '/pypi/{path}/integrity/{package}/{version}/{filename}/provenance/'.sub('{' + 'filename' + '}', CGI.escape(filename.to_s).gsub('%2F', '/')).sub('{' + 'package' + '}', CGI.escape(package.to_s).gsub('%2F', '/')).sub('{' + 'path' + '}', CGI.escape(path.to_s).gsub('%2F', '/')).sub('{' + 'version' + '}', CGI.escape(version.to_s).gsub('%2F', '/'))
|
|
71
|
+
|
|
72
|
+
# query parameters
|
|
73
|
+
query_params = opts[:query_params] || {}
|
|
74
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
|
75
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
|
76
|
+
|
|
77
|
+
# header parameters
|
|
78
|
+
header_params = opts[:header_params] || {}
|
|
79
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
80
|
+
|
|
81
|
+
# form parameters
|
|
82
|
+
form_params = opts[:form_params] || {}
|
|
83
|
+
|
|
84
|
+
# http body (model)
|
|
85
|
+
post_body = opts[:debug_body]
|
|
86
|
+
|
|
87
|
+
# return_type
|
|
88
|
+
return_type = opts[:debug_return_type]
|
|
89
|
+
|
|
90
|
+
# auth_names
|
|
91
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
92
|
+
|
|
93
|
+
new_options = opts.merge(
|
|
94
|
+
:operation => :"PypiProvenanceApi.read",
|
|
95
|
+
:header_params => header_params,
|
|
96
|
+
:query_params => query_params,
|
|
97
|
+
:form_params => form_params,
|
|
98
|
+
:body => post_body,
|
|
99
|
+
:auth_names => auth_names,
|
|
100
|
+
:return_type => return_type
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
104
|
+
if @api_client.config.debugging
|
|
105
|
+
@api_client.config.logger.debug "API called: PypiProvenanceApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
106
|
+
end
|
|
107
|
+
return data, status_code, headers
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
@@ -27,6 +27,10 @@ module PulpPythonClient
|
|
|
27
27
|
# @param [Hash] opts the optional parameters
|
|
28
28
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
29
29
|
# @option opts [String] :action Defaults to `file_upload`, don't change it or request will fail! (default to 'file_upload')
|
|
30
|
+
# @option opts [ProtocolVersionEnum] :protocol_version Protocol version to use for the upload. Only version 1 is supported. * `1` - 1
|
|
31
|
+
# @option opts [FiletypeEnum] :filetype Type of artifact to upload. * `bdist_wheel` - bdist_wheel * `sdist` - sdist
|
|
32
|
+
# @option opts [MetadataVersionEnum] :metadata_version Metadata version of the uploaded package. * `1.0` - 1.0 * `1.1` - 1.1 * `1.2` - 1.2 * `2.0` - 2.0 * `2.1` - 2.1 * `2.2` - 2.2 * `2.3` - 2.3 * `2.4` - 2.4
|
|
33
|
+
# @option opts [Object] :attestations
|
|
30
34
|
# @return [PackageUploadTaskResponse]
|
|
31
35
|
def create(path, content, sha256_digest, opts = {})
|
|
32
36
|
data, _status_code, _headers = create_with_http_info(path, content, sha256_digest, opts)
|
|
@@ -41,6 +45,10 @@ module PulpPythonClient
|
|
|
41
45
|
# @param [Hash] opts the optional parameters
|
|
42
46
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
43
47
|
# @option opts [String] :action Defaults to `file_upload`, don't change it or request will fail! (default to 'file_upload')
|
|
48
|
+
# @option opts [ProtocolVersionEnum] :protocol_version Protocol version to use for the upload. Only version 1 is supported. * `1` - 1
|
|
49
|
+
# @option opts [FiletypeEnum] :filetype Type of artifact to upload. * `bdist_wheel` - bdist_wheel * `sdist` - sdist
|
|
50
|
+
# @option opts [MetadataVersionEnum] :metadata_version Metadata version of the uploaded package. * `1.0` - 1.0 * `1.1` - 1.1 * `1.2` - 1.2 * `2.0` - 2.0 * `2.1` - 2.1 * `2.2` - 2.2 * `2.3` - 2.3 * `2.4` - 2.4
|
|
51
|
+
# @option opts [Object] :attestations
|
|
44
52
|
# @return [Array<(PackageUploadTaskResponse, Integer, Hash)>] PackageUploadTaskResponse data, response status code and response headers
|
|
45
53
|
def create_with_http_info(path, content, sha256_digest, opts = {})
|
|
46
54
|
if @api_client.config.debugging
|
|
@@ -92,6 +100,10 @@ module PulpPythonClient
|
|
|
92
100
|
form_params['content'] = content
|
|
93
101
|
form_params['sha256_digest'] = sha256_digest
|
|
94
102
|
form_params['action'] = opts[:'action'] if !opts[:'action'].nil?
|
|
103
|
+
form_params['protocol_version'] = opts[:'protocol_version'] if !opts[:'protocol_version'].nil?
|
|
104
|
+
form_params['filetype'] = opts[:'filetype'] if !opts[:'filetype'].nil?
|
|
105
|
+
form_params['metadata_version'] = opts[:'metadata_version'] if !opts[:'metadata_version'].nil?
|
|
106
|
+
form_params['attestations'] = opts[:'attestations'] if !opts[:'attestations'].nil?
|
|
95
107
|
|
|
96
108
|
# http body (model)
|
|
97
109
|
post_body = opts[:debug_body]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
Contact: pulp-list@redhat.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PulpPythonClient
|
|
17
|
+
class FiletypeEnum
|
|
18
|
+
BDIST_WHEEL = "bdist_wheel".freeze
|
|
19
|
+
SDIST = "sdist".freeze
|
|
20
|
+
|
|
21
|
+
def self.all_vars
|
|
22
|
+
@all_vars ||= [BDIST_WHEEL, SDIST].freeze
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Builds the enum from string
|
|
26
|
+
# @param [String] The enum value in the form of the string
|
|
27
|
+
# @return [String] The enum value
|
|
28
|
+
def self.build_from_hash(value)
|
|
29
|
+
new.build_from_hash(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Builds the enum from string
|
|
33
|
+
# @param [String] The enum value in the form of the string
|
|
34
|
+
# @return [String] The enum value
|
|
35
|
+
def build_from_hash(value)
|
|
36
|
+
return value if FiletypeEnum.all_vars.include?(value)
|
|
37
|
+
raise "Invalid ENUM value #{value} for class #FiletypeEnum"
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|