pulp_python_client 3.28.2 → 3.29.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 +11 -4
- data/docs/PaginatedpythonPythonBlocklistEntryResponseList.md +24 -0
- data/docs/PythonPythonBlocklistEntry.md +22 -0
- data/docs/PythonPythonBlocklistEntryResponse.md +34 -0
- data/docs/PythonPythonRepositoryResponse.md +3 -1
- data/docs/RepositoriesPythonBlocklistEntriesApi.md +320 -0
- data/lib/pulp_python_client/api/repositories_python_blocklist_entries_api.rb +313 -0
- data/lib/pulp_python_client/models/paginatedpython_python_blocklist_entry_response_list.rb +257 -0
- data/lib/pulp_python_client/models/python_python_blocklist_entry.rb +284 -0
- data/lib/pulp_python_client/models/python_python_blocklist_entry_response.rb +299 -0
- data/lib/pulp_python_client/models/python_python_repository_response.rb +14 -4
- data/lib/pulp_python_client/version.rb +1 -1
- data/lib/pulp_python_client.rb +4 -0
- data/spec/api/repositories_python_blocklist_entries_api_spec.rb +94 -0
- data/spec/models/paginatedpython_python_blocklist_entry_response_list_spec.rb +54 -0
- data/spec/models/python_python_blocklist_entry_response_spec.rb +84 -0
- data/spec/models/python_python_blocklist_entry_spec.rb +48 -0
- data/spec/models/python_python_repository_response_spec.rb +6 -0
- metadata +18 -2
|
@@ -0,0 +1,284 @@
|
|
|
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
|
+
# Serializer for PythonBlocklistEntry. The `repository` is supplied by the URL (not the request body) and is injected by the viewset before saving.
|
|
18
|
+
class PythonPythonBlocklistEntry
|
|
19
|
+
# Package name to block (for all versions). Compared after PEP 503 normalization. Required when 'filename' is not provided.
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
# Exact version string to block (e.g. '1.0'). Only used when 'name' is set.
|
|
23
|
+
attr_accessor :version
|
|
24
|
+
|
|
25
|
+
# Exact filename to block. Required when 'name' is not provided.
|
|
26
|
+
attr_accessor :filename
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'name' => :'name',
|
|
32
|
+
:'version' => :'version',
|
|
33
|
+
:'filename' => :'filename'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'name' => :'String',
|
|
46
|
+
:'version' => :'String',
|
|
47
|
+
:'filename' => :'String'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
:'name',
|
|
55
|
+
:'version',
|
|
56
|
+
:'filename'
|
|
57
|
+
])
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Initializes the object
|
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
62
|
+
def initialize(attributes = {})
|
|
63
|
+
if (!attributes.is_a?(Hash))
|
|
64
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::PythonPythonBlocklistEntry` initialize method"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::PythonPythonBlocklistEntry`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'name')
|
|
76
|
+
self.name = attributes[:'name']
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'version')
|
|
80
|
+
self.version = attributes[:'version']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'filename')
|
|
84
|
+
self.filename = attributes[:'filename']
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
89
|
+
# @return Array for valid properties with the reasons
|
|
90
|
+
def list_invalid_properties
|
|
91
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
92
|
+
invalid_properties = Array.new
|
|
93
|
+
if !@name.nil? && @name.to_s.length < 1
|
|
94
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if !@version.nil? && @version.to_s.length < 1
|
|
98
|
+
invalid_properties.push('invalid value for "version", the character length must be great than or equal to 1.')
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if !@filename.nil? && @filename.to_s.length < 1
|
|
102
|
+
invalid_properties.push('invalid value for "filename", the character length must be great than or equal to 1.')
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
invalid_properties
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Check to see if the all the properties in the model are valid
|
|
109
|
+
# @return true if the model is valid
|
|
110
|
+
def valid?
|
|
111
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
112
|
+
return false if !@name.nil? && @name.to_s.length < 1
|
|
113
|
+
return false if !@version.nil? && @version.to_s.length < 1
|
|
114
|
+
return false if !@filename.nil? && @filename.to_s.length < 1
|
|
115
|
+
true
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param [Object] name Value to be assigned
|
|
120
|
+
def name=(name)
|
|
121
|
+
if !name.nil? && name.to_s.length < 1
|
|
122
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
@name = name
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Custom attribute writer method with validation
|
|
129
|
+
# @param [Object] version Value to be assigned
|
|
130
|
+
def version=(version)
|
|
131
|
+
if !version.nil? && version.to_s.length < 1
|
|
132
|
+
fail ArgumentError, 'invalid value for "version", the character length must be great than or equal to 1.'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
@version = version
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Custom attribute writer method with validation
|
|
139
|
+
# @param [Object] filename Value to be assigned
|
|
140
|
+
def filename=(filename)
|
|
141
|
+
if !filename.nil? && filename.to_s.length < 1
|
|
142
|
+
fail ArgumentError, 'invalid value for "filename", the character length must be great than or equal to 1.'
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
@filename = filename
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Checks equality by comparing each attribute.
|
|
149
|
+
# @param [Object] Object to be compared
|
|
150
|
+
def ==(o)
|
|
151
|
+
return true if self.equal?(o)
|
|
152
|
+
self.class == o.class &&
|
|
153
|
+
name == o.name &&
|
|
154
|
+
version == o.version &&
|
|
155
|
+
filename == o.filename
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# @see the `==` method
|
|
159
|
+
# @param [Object] Object to be compared
|
|
160
|
+
def eql?(o)
|
|
161
|
+
self == o
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Calculates hash code according to all attributes.
|
|
165
|
+
# @return [Integer] Hash code
|
|
166
|
+
def hash
|
|
167
|
+
[name, version, filename].hash
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Builds the object from hash
|
|
171
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
172
|
+
# @return [Object] Returns the model itself
|
|
173
|
+
def self.build_from_hash(attributes)
|
|
174
|
+
return nil unless attributes.is_a?(Hash)
|
|
175
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
176
|
+
transformed_hash = {}
|
|
177
|
+
openapi_types.each_pair do |key, type|
|
|
178
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
179
|
+
transformed_hash["#{key}"] = nil
|
|
180
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
181
|
+
# check to ensure the input is an array given that the attribute
|
|
182
|
+
# is documented as an array but the input is not
|
|
183
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
184
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
185
|
+
end
|
|
186
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
187
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
new(transformed_hash)
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Deserializes the data based on type
|
|
194
|
+
# @param string type Data type
|
|
195
|
+
# @param string value Value to be deserialized
|
|
196
|
+
# @return [Object] Deserialized data
|
|
197
|
+
def self._deserialize(type, value)
|
|
198
|
+
case type.to_sym
|
|
199
|
+
when :Time
|
|
200
|
+
Time.parse(value)
|
|
201
|
+
when :Date
|
|
202
|
+
Date.parse(value)
|
|
203
|
+
when :String
|
|
204
|
+
value.to_s
|
|
205
|
+
when :Integer
|
|
206
|
+
value.to_i
|
|
207
|
+
when :Float
|
|
208
|
+
value.to_f
|
|
209
|
+
when :Boolean
|
|
210
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
211
|
+
true
|
|
212
|
+
else
|
|
213
|
+
false
|
|
214
|
+
end
|
|
215
|
+
when :Object
|
|
216
|
+
# generic object (usually a Hash), return directly
|
|
217
|
+
value
|
|
218
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
219
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
220
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
221
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
222
|
+
k_type = Regexp.last_match[:k_type]
|
|
223
|
+
v_type = Regexp.last_match[:v_type]
|
|
224
|
+
{}.tap do |hash|
|
|
225
|
+
value.each do |k, v|
|
|
226
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
else # model
|
|
230
|
+
# models (e.g. Pet) or oneOf
|
|
231
|
+
klass = PulpPythonClient.const_get(type)
|
|
232
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Returns the string representation of the object
|
|
237
|
+
# @return [String] String presentation of the object
|
|
238
|
+
def to_s
|
|
239
|
+
to_hash.to_s
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
243
|
+
# @return [Hash] Returns the object in the form of hash
|
|
244
|
+
def to_body
|
|
245
|
+
to_hash
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Returns the object in the form of hash
|
|
249
|
+
# @return [Hash] Returns the object in the form of hash
|
|
250
|
+
def to_hash
|
|
251
|
+
hash = {}
|
|
252
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
253
|
+
value = self.send(attr)
|
|
254
|
+
if value.nil?
|
|
255
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
256
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
hash[param] = _to_hash(value)
|
|
260
|
+
end
|
|
261
|
+
hash
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Outputs non-array value in the form of hash
|
|
265
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
266
|
+
# @param [Object] value Any valid value
|
|
267
|
+
# @return [Hash] Returns the value in the form of hash
|
|
268
|
+
def _to_hash(value)
|
|
269
|
+
if value.is_a?(Array)
|
|
270
|
+
value.compact.map { |v| _to_hash(v) }
|
|
271
|
+
elsif value.is_a?(Hash)
|
|
272
|
+
{}.tap do |hash|
|
|
273
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
274
|
+
end
|
|
275
|
+
elsif value.respond_to? :to_hash
|
|
276
|
+
value.to_hash
|
|
277
|
+
else
|
|
278
|
+
value
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
end
|
|
@@ -0,0 +1,299 @@
|
|
|
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
|
+
# Serializer for PythonBlocklistEntry. The `repository` is supplied by the URL (not the request body) and is injected by the viewset before saving.
|
|
18
|
+
class PythonPythonBlocklistEntryResponse
|
|
19
|
+
# The URL of this blocklist entry.
|
|
20
|
+
attr_accessor :pulp_href
|
|
21
|
+
|
|
22
|
+
# The Pulp Resource Name (PRN).
|
|
23
|
+
attr_accessor :prn
|
|
24
|
+
|
|
25
|
+
# Timestamp of creation.
|
|
26
|
+
attr_accessor :pulp_created
|
|
27
|
+
|
|
28
|
+
# Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.
|
|
29
|
+
attr_accessor :pulp_last_updated
|
|
30
|
+
|
|
31
|
+
# Repository this blocklist entry belongs to.
|
|
32
|
+
attr_accessor :repository
|
|
33
|
+
|
|
34
|
+
# Package name to block (for all versions). Compared after PEP 503 normalization. Required when 'filename' is not provided.
|
|
35
|
+
attr_accessor :name
|
|
36
|
+
|
|
37
|
+
# Exact version string to block (e.g. '1.0'). Only used when 'name' is set.
|
|
38
|
+
attr_accessor :version
|
|
39
|
+
|
|
40
|
+
# Exact filename to block. Required when 'name' is not provided.
|
|
41
|
+
attr_accessor :filename
|
|
42
|
+
|
|
43
|
+
# PRN of the user who added this blocklist entry.
|
|
44
|
+
attr_accessor :added_by
|
|
45
|
+
|
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
+
def self.attribute_map
|
|
48
|
+
{
|
|
49
|
+
:'pulp_href' => :'pulp_href',
|
|
50
|
+
:'prn' => :'prn',
|
|
51
|
+
:'pulp_created' => :'pulp_created',
|
|
52
|
+
:'pulp_last_updated' => :'pulp_last_updated',
|
|
53
|
+
:'repository' => :'repository',
|
|
54
|
+
:'name' => :'name',
|
|
55
|
+
:'version' => :'version',
|
|
56
|
+
:'filename' => :'filename',
|
|
57
|
+
:'added_by' => :'added_by'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Returns all the JSON keys this model knows about
|
|
62
|
+
def self.acceptable_attributes
|
|
63
|
+
attribute_map.values
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Attribute type mapping.
|
|
67
|
+
def self.openapi_types
|
|
68
|
+
{
|
|
69
|
+
:'pulp_href' => :'String',
|
|
70
|
+
:'prn' => :'String',
|
|
71
|
+
:'pulp_created' => :'Time',
|
|
72
|
+
:'pulp_last_updated' => :'Time',
|
|
73
|
+
:'repository' => :'String',
|
|
74
|
+
:'name' => :'String',
|
|
75
|
+
:'version' => :'String',
|
|
76
|
+
:'filename' => :'String',
|
|
77
|
+
:'added_by' => :'String'
|
|
78
|
+
}
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# List of attributes with nullable: true
|
|
82
|
+
def self.openapi_nullable
|
|
83
|
+
Set.new([
|
|
84
|
+
:'name',
|
|
85
|
+
:'version',
|
|
86
|
+
:'filename',
|
|
87
|
+
])
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Initializes the object
|
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
92
|
+
def initialize(attributes = {})
|
|
93
|
+
if (!attributes.is_a?(Hash))
|
|
94
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::PythonPythonBlocklistEntryResponse` initialize method"
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
98
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
99
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
100
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::PythonPythonBlocklistEntryResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
101
|
+
end
|
|
102
|
+
h[k.to_sym] = v
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'pulp_href')
|
|
106
|
+
self.pulp_href = attributes[:'pulp_href']
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'prn')
|
|
110
|
+
self.prn = attributes[:'prn']
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'pulp_created')
|
|
114
|
+
self.pulp_created = attributes[:'pulp_created']
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'pulp_last_updated')
|
|
118
|
+
self.pulp_last_updated = attributes[:'pulp_last_updated']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'repository')
|
|
122
|
+
self.repository = attributes[:'repository']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'name')
|
|
126
|
+
self.name = attributes[:'name']
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'version')
|
|
130
|
+
self.version = attributes[:'version']
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'filename')
|
|
134
|
+
self.filename = attributes[:'filename']
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'added_by')
|
|
138
|
+
self.added_by = attributes[:'added_by']
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
143
|
+
# @return Array for valid properties with the reasons
|
|
144
|
+
def list_invalid_properties
|
|
145
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
146
|
+
invalid_properties = Array.new
|
|
147
|
+
invalid_properties
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Check to see if the all the properties in the model are valid
|
|
151
|
+
# @return true if the model is valid
|
|
152
|
+
def valid?
|
|
153
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
154
|
+
true
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Checks equality by comparing each attribute.
|
|
158
|
+
# @param [Object] Object to be compared
|
|
159
|
+
def ==(o)
|
|
160
|
+
return true if self.equal?(o)
|
|
161
|
+
self.class == o.class &&
|
|
162
|
+
pulp_href == o.pulp_href &&
|
|
163
|
+
prn == o.prn &&
|
|
164
|
+
pulp_created == o.pulp_created &&
|
|
165
|
+
pulp_last_updated == o.pulp_last_updated &&
|
|
166
|
+
repository == o.repository &&
|
|
167
|
+
name == o.name &&
|
|
168
|
+
version == o.version &&
|
|
169
|
+
filename == o.filename &&
|
|
170
|
+
added_by == o.added_by
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# @see the `==` method
|
|
174
|
+
# @param [Object] Object to be compared
|
|
175
|
+
def eql?(o)
|
|
176
|
+
self == o
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Calculates hash code according to all attributes.
|
|
180
|
+
# @return [Integer] Hash code
|
|
181
|
+
def hash
|
|
182
|
+
[pulp_href, prn, pulp_created, pulp_last_updated, repository, name, version, filename, added_by].hash
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Builds the object from hash
|
|
186
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
187
|
+
# @return [Object] Returns the model itself
|
|
188
|
+
def self.build_from_hash(attributes)
|
|
189
|
+
return nil unless attributes.is_a?(Hash)
|
|
190
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
191
|
+
transformed_hash = {}
|
|
192
|
+
openapi_types.each_pair do |key, type|
|
|
193
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
194
|
+
transformed_hash["#{key}"] = nil
|
|
195
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
196
|
+
# check to ensure the input is an array given that the attribute
|
|
197
|
+
# is documented as an array but the input is not
|
|
198
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
199
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
200
|
+
end
|
|
201
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
202
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
new(transformed_hash)
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Deserializes the data based on type
|
|
209
|
+
# @param string type Data type
|
|
210
|
+
# @param string value Value to be deserialized
|
|
211
|
+
# @return [Object] Deserialized data
|
|
212
|
+
def self._deserialize(type, value)
|
|
213
|
+
case type.to_sym
|
|
214
|
+
when :Time
|
|
215
|
+
Time.parse(value)
|
|
216
|
+
when :Date
|
|
217
|
+
Date.parse(value)
|
|
218
|
+
when :String
|
|
219
|
+
value.to_s
|
|
220
|
+
when :Integer
|
|
221
|
+
value.to_i
|
|
222
|
+
when :Float
|
|
223
|
+
value.to_f
|
|
224
|
+
when :Boolean
|
|
225
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
226
|
+
true
|
|
227
|
+
else
|
|
228
|
+
false
|
|
229
|
+
end
|
|
230
|
+
when :Object
|
|
231
|
+
# generic object (usually a Hash), return directly
|
|
232
|
+
value
|
|
233
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
234
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
235
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
236
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
237
|
+
k_type = Regexp.last_match[:k_type]
|
|
238
|
+
v_type = Regexp.last_match[:v_type]
|
|
239
|
+
{}.tap do |hash|
|
|
240
|
+
value.each do |k, v|
|
|
241
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
else # model
|
|
245
|
+
# models (e.g. Pet) or oneOf
|
|
246
|
+
klass = PulpPythonClient.const_get(type)
|
|
247
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Returns the string representation of the object
|
|
252
|
+
# @return [String] String presentation of the object
|
|
253
|
+
def to_s
|
|
254
|
+
to_hash.to_s
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
258
|
+
# @return [Hash] Returns the object in the form of hash
|
|
259
|
+
def to_body
|
|
260
|
+
to_hash
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Returns the object in the form of hash
|
|
264
|
+
# @return [Hash] Returns the object in the form of hash
|
|
265
|
+
def to_hash
|
|
266
|
+
hash = {}
|
|
267
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
268
|
+
value = self.send(attr)
|
|
269
|
+
if value.nil?
|
|
270
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
271
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
hash[param] = _to_hash(value)
|
|
275
|
+
end
|
|
276
|
+
hash
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# Outputs non-array value in the form of hash
|
|
280
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
281
|
+
# @param [Object] value Any valid value
|
|
282
|
+
# @return [Hash] Returns the value in the form of hash
|
|
283
|
+
def _to_hash(value)
|
|
284
|
+
if value.is_a?(Array)
|
|
285
|
+
value.compact.map { |v| _to_hash(v) }
|
|
286
|
+
elsif value.is_a?(Hash)
|
|
287
|
+
{}.tap do |hash|
|
|
288
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
289
|
+
end
|
|
290
|
+
elsif value.respond_to? :to_hash
|
|
291
|
+
value.to_hash
|
|
292
|
+
else
|
|
293
|
+
value
|
|
294
|
+
end
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
end
|
|
@@ -54,6 +54,9 @@ module PulpPythonClient
|
|
|
54
54
|
# Whether to allow package substitution (replacing existing packages with packages that have the same filename but a different checksum). When False, any new repository version that would cause such a substitution will be rejected. This applies to all repository version creation paths including uploads, modify, and sync. When True (the default), package substitution is allowed.
|
|
55
55
|
attr_accessor :allow_package_substitution
|
|
56
56
|
|
|
57
|
+
# URL to the blocklist entries for this repository.
|
|
58
|
+
attr_accessor :blocklist_entries_href
|
|
59
|
+
|
|
57
60
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
58
61
|
def self.attribute_map
|
|
59
62
|
{
|
|
@@ -70,7 +73,8 @@ module PulpPythonClient
|
|
|
70
73
|
:'retain_checkpoints' => :'retain_checkpoints',
|
|
71
74
|
:'remote' => :'remote',
|
|
72
75
|
:'autopublish' => :'autopublish',
|
|
73
|
-
:'allow_package_substitution' => :'allow_package_substitution'
|
|
76
|
+
:'allow_package_substitution' => :'allow_package_substitution',
|
|
77
|
+
:'blocklist_entries_href' => :'blocklist_entries_href'
|
|
74
78
|
}
|
|
75
79
|
end
|
|
76
80
|
|
|
@@ -95,7 +99,8 @@ module PulpPythonClient
|
|
|
95
99
|
:'retain_checkpoints' => :'Integer',
|
|
96
100
|
:'remote' => :'String',
|
|
97
101
|
:'autopublish' => :'Boolean',
|
|
98
|
-
:'allow_package_substitution' => :'Boolean'
|
|
102
|
+
:'allow_package_substitution' => :'Boolean',
|
|
103
|
+
:'blocklist_entries_href' => :'String'
|
|
99
104
|
}
|
|
100
105
|
end
|
|
101
106
|
|
|
@@ -187,6 +192,10 @@ module PulpPythonClient
|
|
|
187
192
|
else
|
|
188
193
|
self.allow_package_substitution = true
|
|
189
194
|
end
|
|
195
|
+
|
|
196
|
+
if attributes.key?(:'blocklist_entries_href')
|
|
197
|
+
self.blocklist_entries_href = attributes[:'blocklist_entries_href']
|
|
198
|
+
end
|
|
190
199
|
end
|
|
191
200
|
|
|
192
201
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -257,7 +266,8 @@ module PulpPythonClient
|
|
|
257
266
|
retain_checkpoints == o.retain_checkpoints &&
|
|
258
267
|
remote == o.remote &&
|
|
259
268
|
autopublish == o.autopublish &&
|
|
260
|
-
allow_package_substitution == o.allow_package_substitution
|
|
269
|
+
allow_package_substitution == o.allow_package_substitution &&
|
|
270
|
+
blocklist_entries_href == o.blocklist_entries_href
|
|
261
271
|
end
|
|
262
272
|
|
|
263
273
|
# @see the `==` method
|
|
@@ -269,7 +279,7 @@ module PulpPythonClient
|
|
|
269
279
|
# Calculates hash code according to all attributes.
|
|
270
280
|
# @return [Integer] Hash code
|
|
271
281
|
def hash
|
|
272
|
-
[pulp_href, prn, pulp_created, pulp_last_updated, versions_href, pulp_labels, latest_version_href, name, description, retain_repo_versions, retain_checkpoints, remote, autopublish, allow_package_substitution].hash
|
|
282
|
+
[pulp_href, prn, pulp_created, pulp_last_updated, versions_href, pulp_labels, latest_version_href, name, description, retain_repo_versions, retain_checkpoints, remote, autopublish, allow_package_substitution, blocklist_entries_href].hash
|
|
273
283
|
end
|
|
274
284
|
|
|
275
285
|
# Builds the object from hash
|
data/lib/pulp_python_client.rb
CHANGED
|
@@ -31,6 +31,7 @@ require 'pulp_python_client/models/package_types_enum'
|
|
|
31
31
|
require 'pulp_python_client/models/package_upload_task_response'
|
|
32
32
|
require 'pulp_python_client/models/paginated_repository_version_response_list'
|
|
33
33
|
require 'pulp_python_client/models/paginatedpython_package_provenance_response_list'
|
|
34
|
+
require 'pulp_python_client/models/paginatedpython_python_blocklist_entry_response_list'
|
|
34
35
|
require 'pulp_python_client/models/paginatedpython_python_distribution_response_list'
|
|
35
36
|
require 'pulp_python_client/models/paginatedpython_python_package_content_response_list'
|
|
36
37
|
require 'pulp_python_client/models/paginatedpython_python_publication_response_list'
|
|
@@ -42,6 +43,8 @@ require 'pulp_python_client/models/patchedpython_python_repository'
|
|
|
42
43
|
require 'pulp_python_client/models/policy_enum'
|
|
43
44
|
require 'pulp_python_client/models/protocol_version_enum'
|
|
44
45
|
require 'pulp_python_client/models/python_package_provenance_response'
|
|
46
|
+
require 'pulp_python_client/models/python_python_blocklist_entry'
|
|
47
|
+
require 'pulp_python_client/models/python_python_blocklist_entry_response'
|
|
45
48
|
require 'pulp_python_client/models/python_python_distribution'
|
|
46
49
|
require 'pulp_python_client/models/python_python_distribution_response'
|
|
47
50
|
require 'pulp_python_client/models/python_python_package_content_response'
|
|
@@ -76,6 +79,7 @@ require 'pulp_python_client/api/pypi_provenance_api'
|
|
|
76
79
|
require 'pulp_python_client/api/pypi_simple_api'
|
|
77
80
|
require 'pulp_python_client/api/remotes_python_api'
|
|
78
81
|
require 'pulp_python_client/api/repositories_python_api'
|
|
82
|
+
require 'pulp_python_client/api/repositories_python_blocklist_entries_api'
|
|
79
83
|
require 'pulp_python_client/api/repositories_python_versions_api'
|
|
80
84
|
|
|
81
85
|
module PulpPythonClient
|