pulp_python_client 3.0.0b9 → 3.0.0b10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -13
  3. data/docs/ContentPackagesApi.md +4 -6
  4. data/docs/DistributionsPypiApi.md +2 -2
  5. data/docs/InlineResponse200.md +1 -1
  6. data/docs/InlineResponse2001.md +1 -1
  7. data/docs/InlineResponse2002.md +1 -1
  8. data/docs/InlineResponse2003.md +1 -1
  9. data/docs/InlineResponse2004.md +1 -1
  10. data/docs/InlineResponse2005.md +1 -1
  11. data/docs/PublicationsPypiApi.md +2 -2
  12. data/docs/{PythonPythonPackageContentRead.md → PythonPythonPackageContent.md} +3 -3
  13. data/docs/PythonPythonRemote.md +2 -2
  14. data/docs/RemotesPythonApi.md +60 -4
  15. data/docs/RepositoriesPythonApi.md +4 -4
  16. data/docs/RepositoriesPythonVersionsApi.md +6 -4
  17. data/lib/pulp_python_client/api/content_packages_api.rb +6 -17
  18. data/lib/pulp_python_client/api/distributions_pypi_api.rb +3 -3
  19. data/lib/pulp_python_client/api/publications_pypi_api.rb +3 -3
  20. data/lib/pulp_python_client/api/remotes_python_api.rb +82 -6
  21. data/lib/pulp_python_client/api/repositories_python_api.rb +6 -6
  22. data/lib/pulp_python_client/api/repositories_python_versions_api.rb +9 -6
  23. data/lib/pulp_python_client/models/inline_response200.rb +1 -1
  24. data/lib/pulp_python_client/models/inline_response2001.rb +1 -1
  25. data/lib/pulp_python_client/models/inline_response2002.rb +1 -1
  26. data/lib/pulp_python_client/models/inline_response2003.rb +1 -1
  27. data/lib/pulp_python_client/models/inline_response2004.rb +1 -1
  28. data/lib/pulp_python_client/models/inline_response2005.rb +1 -1
  29. data/lib/pulp_python_client/models/{python_python_package_content_read.rb → python_python_package_content.rb} +6 -15
  30. data/lib/pulp_python_client/models/python_python_remote.rb +6 -10
  31. data/lib/pulp_python_client/version.rb +1 -1
  32. data/lib/pulp_python_client.rb +1 -7
  33. data/spec/api/content_packages_api_spec.rb +1 -2
  34. data/spec/api/distributions_pypi_api_spec.rb +1 -1
  35. data/spec/api/publications_pypi_api_spec.rb +1 -1
  36. data/spec/api/remotes_python_api_spec.rb +15 -2
  37. data/spec/api/repositories_python_api_spec.rb +2 -2
  38. data/spec/api/repositories_python_versions_api_spec.rb +3 -2
  39. data/spec/models/{python_python_package_content_read_spec.rb → python_python_package_content_spec.rb} +6 -6
  40. metadata +20 -44
  41. data/docs/ProjectSpecifier.md +0 -19
  42. data/docs/PythonPythonDistributionRead.md +0 -29
  43. data/docs/PythonPythonPublicationRead.md +0 -25
  44. data/docs/PythonPythonRemoteRead.md +0 -49
  45. data/docs/PythonPythonRepositoryRead.md +0 -27
  46. data/docs/RepositoryVersionRead.md +0 -25
  47. data/lib/pulp_python_client/models/project_specifier.rb +0 -242
  48. data/lib/pulp_python_client/models/python_python_distribution_read.rb +0 -331
  49. data/lib/pulp_python_client/models/python_python_publication_read.rb +0 -247
  50. data/lib/pulp_python_client/models/python_python_remote_read.rb +0 -565
  51. data/lib/pulp_python_client/models/python_python_repository_read.rb +0 -294
  52. data/lib/pulp_python_client/models/repository_version_read.rb +0 -244
  53. data/spec/models/project_specifier_spec.rb +0 -47
  54. data/spec/models/python_python_distribution_read_spec.rb +0 -77
  55. data/spec/models/python_python_publication_read_spec.rb +0 -65
  56. data/spec/models/python_python_remote_read_spec.rb +0 -141
  57. data/spec/models/python_python_repository_read_spec.rb +0 -71
  58. data/spec/models/repository_version_read_spec.rb +0 -65
@@ -1,331 +0,0 @@
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 'date'
14
-
15
- module PulpPythonClient
16
- class PythonPythonDistributionRead
17
- attr_accessor :pulp_href
18
-
19
- # Timestamp of creation.
20
- attr_accessor :pulp_created
21
-
22
- # The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
23
- attr_accessor :base_path
24
-
25
- # The URL for accessing the publication as defined by this distribution.
26
- attr_accessor :base_url
27
-
28
- # An optional content-guard.
29
- attr_accessor :content_guard
30
-
31
- # A unique name. Ex, `rawhide` and `stable`.
32
- attr_accessor :name
33
-
34
- # Publication to be served
35
- attr_accessor :publication
36
-
37
- # Attribute mapping from ruby-style variable name to JSON key.
38
- def self.attribute_map
39
- {
40
- :'pulp_href' => :'pulp_href',
41
- :'pulp_created' => :'pulp_created',
42
- :'base_path' => :'base_path',
43
- :'base_url' => :'base_url',
44
- :'content_guard' => :'content_guard',
45
- :'name' => :'name',
46
- :'publication' => :'publication'
47
- }
48
- end
49
-
50
- # Attribute type mapping.
51
- def self.openapi_types
52
- {
53
- :'pulp_href' => :'String',
54
- :'pulp_created' => :'DateTime',
55
- :'base_path' => :'String',
56
- :'base_url' => :'String',
57
- :'content_guard' => :'String',
58
- :'name' => :'String',
59
- :'publication' => :'String'
60
- }
61
- end
62
-
63
- # List of attributes with nullable: true
64
- def self.openapi_nullable
65
- Set.new([
66
- :'content_guard',
67
- :'publication'
68
- ])
69
- end
70
-
71
- # Initializes the object
72
- # @param [Hash] attributes Model attributes in the form of hash
73
- def initialize(attributes = {})
74
- if (!attributes.is_a?(Hash))
75
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::PythonPythonDistributionRead` initialize method"
76
- end
77
-
78
- # check to see if the attribute exists and convert string to symbol for hash key
79
- attributes = attributes.each_with_object({}) { |(k, v), h|
80
- if (!self.class.attribute_map.key?(k.to_sym))
81
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::PythonPythonDistributionRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
- end
83
- h[k.to_sym] = v
84
- }
85
-
86
- if attributes.key?(:'pulp_href')
87
- self.pulp_href = attributes[:'pulp_href']
88
- end
89
-
90
- if attributes.key?(:'pulp_created')
91
- self.pulp_created = attributes[:'pulp_created']
92
- end
93
-
94
- if attributes.key?(:'base_path')
95
- self.base_path = attributes[:'base_path']
96
- end
97
-
98
- if attributes.key?(:'base_url')
99
- self.base_url = attributes[:'base_url']
100
- end
101
-
102
- if attributes.key?(:'content_guard')
103
- self.content_guard = attributes[:'content_guard']
104
- end
105
-
106
- if attributes.key?(:'name')
107
- self.name = attributes[:'name']
108
- end
109
-
110
- if attributes.key?(:'publication')
111
- self.publication = attributes[:'publication']
112
- end
113
- end
114
-
115
- # Show invalid properties with the reasons. Usually used together with valid?
116
- # @return Array for valid properties with the reasons
117
- def list_invalid_properties
118
- invalid_properties = Array.new
119
- if @base_path.nil?
120
- invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
121
- end
122
-
123
- if @base_path.to_s.length < 1
124
- invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
125
- end
126
-
127
- if !@base_url.nil? && @base_url.to_s.length < 1
128
- invalid_properties.push('invalid value for "base_url", the character length must be great than or equal to 1.')
129
- end
130
-
131
- if @name.nil?
132
- invalid_properties.push('invalid value for "name", name cannot be nil.')
133
- end
134
-
135
- if @name.to_s.length < 1
136
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
137
- end
138
-
139
- invalid_properties
140
- end
141
-
142
- # Check to see if the all the properties in the model are valid
143
- # @return true if the model is valid
144
- def valid?
145
- return false if @base_path.nil?
146
- return false if @base_path.to_s.length < 1
147
- return false if !@base_url.nil? && @base_url.to_s.length < 1
148
- return false if @name.nil?
149
- return false if @name.to_s.length < 1
150
- true
151
- end
152
-
153
- # Custom attribute writer method with validation
154
- # @param [Object] base_path Value to be assigned
155
- def base_path=(base_path)
156
- if base_path.nil?
157
- fail ArgumentError, 'base_path cannot be nil'
158
- end
159
-
160
- if base_path.to_s.length < 1
161
- fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
162
- end
163
-
164
- @base_path = base_path
165
- end
166
-
167
- # Custom attribute writer method with validation
168
- # @param [Object] base_url Value to be assigned
169
- def base_url=(base_url)
170
- if !base_url.nil? && base_url.to_s.length < 1
171
- fail ArgumentError, 'invalid value for "base_url", the character length must be great than or equal to 1.'
172
- end
173
-
174
- @base_url = base_url
175
- end
176
-
177
- # Custom attribute writer method with validation
178
- # @param [Object] name Value to be assigned
179
- def name=(name)
180
- if name.nil?
181
- fail ArgumentError, 'name cannot be nil'
182
- end
183
-
184
- if name.to_s.length < 1
185
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
186
- end
187
-
188
- @name = name
189
- end
190
-
191
- # Checks equality by comparing each attribute.
192
- # @param [Object] Object to be compared
193
- def ==(o)
194
- return true if self.equal?(o)
195
- self.class == o.class &&
196
- pulp_href == o.pulp_href &&
197
- pulp_created == o.pulp_created &&
198
- base_path == o.base_path &&
199
- base_url == o.base_url &&
200
- content_guard == o.content_guard &&
201
- name == o.name &&
202
- publication == o.publication
203
- end
204
-
205
- # @see the `==` method
206
- # @param [Object] Object to be compared
207
- def eql?(o)
208
- self == o
209
- end
210
-
211
- # Calculates hash code according to all attributes.
212
- # @return [Integer] Hash code
213
- def hash
214
- [pulp_href, pulp_created, base_path, base_url, content_guard, name, publication].hash
215
- end
216
-
217
- # Builds the object from hash
218
- # @param [Hash] attributes Model attributes in the form of hash
219
- # @return [Object] Returns the model itself
220
- def self.build_from_hash(attributes)
221
- new.build_from_hash(attributes)
222
- end
223
-
224
- # Builds the object from hash
225
- # @param [Hash] attributes Model attributes in the form of hash
226
- # @return [Object] Returns the model itself
227
- def build_from_hash(attributes)
228
- return nil unless attributes.is_a?(Hash)
229
- self.class.openapi_types.each_pair do |key, type|
230
- if type =~ /\AArray<(.*)>/i
231
- # check to ensure the input is an array given that the attribute
232
- # is documented as an array but the input is not
233
- if attributes[self.class.attribute_map[key]].is_a?(Array)
234
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
235
- end
236
- elsif !attributes[self.class.attribute_map[key]].nil?
237
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
238
- end # or else data not found in attributes(hash), not an issue as the data can be optional
239
- end
240
-
241
- self
242
- end
243
-
244
- # Deserializes the data based on type
245
- # @param string type Data type
246
- # @param string value Value to be deserialized
247
- # @return [Object] Deserialized data
248
- def _deserialize(type, value)
249
- case type.to_sym
250
- when :DateTime
251
- DateTime.parse(value)
252
- when :Date
253
- Date.parse(value)
254
- when :String
255
- value.to_s
256
- when :Integer
257
- value.to_i
258
- when :Float
259
- value.to_f
260
- when :Boolean
261
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
262
- true
263
- else
264
- false
265
- end
266
- when :Object
267
- # generic object (usually a Hash), return directly
268
- value
269
- when /\AArray<(?<inner_type>.+)>\z/
270
- inner_type = Regexp.last_match[:inner_type]
271
- value.map { |v| _deserialize(inner_type, v) }
272
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
273
- k_type = Regexp.last_match[:k_type]
274
- v_type = Regexp.last_match[:v_type]
275
- {}.tap do |hash|
276
- value.each do |k, v|
277
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
278
- end
279
- end
280
- else # model
281
- PulpPythonClient.const_get(type).build_from_hash(value)
282
- end
283
- end
284
-
285
- # Returns the string representation of the object
286
- # @return [String] String presentation of the object
287
- def to_s
288
- to_hash.to_s
289
- end
290
-
291
- # to_body is an alias to to_hash (backward compatibility)
292
- # @return [Hash] Returns the object in the form of hash
293
- def to_body
294
- to_hash
295
- end
296
-
297
- # Returns the object in the form of hash
298
- # @return [Hash] Returns the object in the form of hash
299
- def to_hash
300
- hash = {}
301
- self.class.attribute_map.each_pair do |attr, param|
302
- value = self.send(attr)
303
- if value.nil?
304
- is_nullable = self.class.openapi_nullable.include?(attr)
305
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
306
- end
307
-
308
- hash[param] = _to_hash(value)
309
- end
310
- hash
311
- end
312
-
313
- # Outputs non-array value in the form of hash
314
- # For object, use to_hash. Otherwise, just return the value
315
- # @param [Object] value Any valid value
316
- # @return [Hash] Returns the value in the form of hash
317
- def _to_hash(value)
318
- if value.is_a?(Array)
319
- value.compact.map { |v| _to_hash(v) }
320
- elsif value.is_a?(Hash)
321
- {}.tap do |hash|
322
- value.each { |k, v| hash[k] = _to_hash(v) }
323
- end
324
- elsif value.respond_to? :to_hash
325
- value.to_hash
326
- else
327
- value
328
- end
329
- end
330
- end
331
- end
@@ -1,247 +0,0 @@
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 'date'
14
-
15
- module PulpPythonClient
16
- class PythonPythonPublicationRead
17
- attr_accessor :pulp_href
18
-
19
- # Timestamp of creation.
20
- attr_accessor :pulp_created
21
-
22
- attr_accessor :repository_version
23
-
24
- # A URI of the repository to be published.
25
- attr_accessor :repository
26
-
27
- # This publication is currently being hosted as configured by these distributions.
28
- attr_accessor :distributions
29
-
30
- # Attribute mapping from ruby-style variable name to JSON key.
31
- def self.attribute_map
32
- {
33
- :'pulp_href' => :'pulp_href',
34
- :'pulp_created' => :'pulp_created',
35
- :'repository_version' => :'repository_version',
36
- :'repository' => :'repository',
37
- :'distributions' => :'distributions'
38
- }
39
- end
40
-
41
- # Attribute type mapping.
42
- def self.openapi_types
43
- {
44
- :'pulp_href' => :'String',
45
- :'pulp_created' => :'DateTime',
46
- :'repository_version' => :'String',
47
- :'repository' => :'String',
48
- :'distributions' => :'Array<String>'
49
- }
50
- end
51
-
52
- # List of attributes with nullable: true
53
- def self.openapi_nullable
54
- Set.new([
55
- ])
56
- end
57
-
58
- # Initializes the object
59
- # @param [Hash] attributes Model attributes in the form of hash
60
- def initialize(attributes = {})
61
- if (!attributes.is_a?(Hash))
62
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::PythonPythonPublicationRead` initialize method"
63
- end
64
-
65
- # check to see if the attribute exists and convert string to symbol for hash key
66
- attributes = attributes.each_with_object({}) { |(k, v), h|
67
- if (!self.class.attribute_map.key?(k.to_sym))
68
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::PythonPythonPublicationRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
- end
70
- h[k.to_sym] = v
71
- }
72
-
73
- if attributes.key?(:'pulp_href')
74
- self.pulp_href = attributes[:'pulp_href']
75
- end
76
-
77
- if attributes.key?(:'pulp_created')
78
- self.pulp_created = attributes[:'pulp_created']
79
- end
80
-
81
- if attributes.key?(:'repository_version')
82
- self.repository_version = attributes[:'repository_version']
83
- end
84
-
85
- if attributes.key?(:'repository')
86
- self.repository = attributes[:'repository']
87
- end
88
-
89
- if attributes.key?(:'distributions')
90
- if (value = attributes[:'distributions']).is_a?(Array)
91
- self.distributions = value
92
- end
93
- end
94
- end
95
-
96
- # Show invalid properties with the reasons. Usually used together with valid?
97
- # @return Array for valid properties with the reasons
98
- def list_invalid_properties
99
- invalid_properties = Array.new
100
- invalid_properties
101
- end
102
-
103
- # Check to see if the all the properties in the model are valid
104
- # @return true if the model is valid
105
- def valid?
106
- true
107
- end
108
-
109
- # Checks equality by comparing each attribute.
110
- # @param [Object] Object to be compared
111
- def ==(o)
112
- return true if self.equal?(o)
113
- self.class == o.class &&
114
- pulp_href == o.pulp_href &&
115
- pulp_created == o.pulp_created &&
116
- repository_version == o.repository_version &&
117
- repository == o.repository &&
118
- distributions == o.distributions
119
- end
120
-
121
- # @see the `==` method
122
- # @param [Object] Object to be compared
123
- def eql?(o)
124
- self == o
125
- end
126
-
127
- # Calculates hash code according to all attributes.
128
- # @return [Integer] Hash code
129
- def hash
130
- [pulp_href, pulp_created, repository_version, repository, distributions].hash
131
- end
132
-
133
- # Builds the object from hash
134
- # @param [Hash] attributes Model attributes in the form of hash
135
- # @return [Object] Returns the model itself
136
- def self.build_from_hash(attributes)
137
- new.build_from_hash(attributes)
138
- end
139
-
140
- # Builds the object from hash
141
- # @param [Hash] attributes Model attributes in the form of hash
142
- # @return [Object] Returns the model itself
143
- def build_from_hash(attributes)
144
- return nil unless attributes.is_a?(Hash)
145
- self.class.openapi_types.each_pair do |key, type|
146
- if type =~ /\AArray<(.*)>/i
147
- # check to ensure the input is an array given that the attribute
148
- # is documented as an array but the input is not
149
- if attributes[self.class.attribute_map[key]].is_a?(Array)
150
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
151
- end
152
- elsif !attributes[self.class.attribute_map[key]].nil?
153
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
- end # or else data not found in attributes(hash), not an issue as the data can be optional
155
- end
156
-
157
- self
158
- end
159
-
160
- # Deserializes the data based on type
161
- # @param string type Data type
162
- # @param string value Value to be deserialized
163
- # @return [Object] Deserialized data
164
- def _deserialize(type, value)
165
- case type.to_sym
166
- when :DateTime
167
- DateTime.parse(value)
168
- when :Date
169
- Date.parse(value)
170
- when :String
171
- value.to_s
172
- when :Integer
173
- value.to_i
174
- when :Float
175
- value.to_f
176
- when :Boolean
177
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
178
- true
179
- else
180
- false
181
- end
182
- when :Object
183
- # generic object (usually a Hash), return directly
184
- value
185
- when /\AArray<(?<inner_type>.+)>\z/
186
- inner_type = Regexp.last_match[:inner_type]
187
- value.map { |v| _deserialize(inner_type, v) }
188
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
189
- k_type = Regexp.last_match[:k_type]
190
- v_type = Regexp.last_match[:v_type]
191
- {}.tap do |hash|
192
- value.each do |k, v|
193
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
194
- end
195
- end
196
- else # model
197
- PulpPythonClient.const_get(type).build_from_hash(value)
198
- end
199
- end
200
-
201
- # Returns the string representation of the object
202
- # @return [String] String presentation of the object
203
- def to_s
204
- to_hash.to_s
205
- end
206
-
207
- # to_body is an alias to to_hash (backward compatibility)
208
- # @return [Hash] Returns the object in the form of hash
209
- def to_body
210
- to_hash
211
- end
212
-
213
- # Returns the object in the form of hash
214
- # @return [Hash] Returns the object in the form of hash
215
- def to_hash
216
- hash = {}
217
- self.class.attribute_map.each_pair do |attr, param|
218
- value = self.send(attr)
219
- if value.nil?
220
- is_nullable = self.class.openapi_nullable.include?(attr)
221
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
- end
223
-
224
- hash[param] = _to_hash(value)
225
- end
226
- hash
227
- end
228
-
229
- # Outputs non-array value in the form of hash
230
- # For object, use to_hash. Otherwise, just return the value
231
- # @param [Object] value Any valid value
232
- # @return [Hash] Returns the value in the form of hash
233
- def _to_hash(value)
234
- if value.is_a?(Array)
235
- value.compact.map { |v| _to_hash(v) }
236
- elsif value.is_a?(Hash)
237
- {}.tap do |hash|
238
- value.each { |k, v| hash[k] = _to_hash(v) }
239
- end
240
- elsif value.respond_to? :to_hash
241
- value.to_hash
242
- else
243
- value
244
- end
245
- end
246
- end
247
- end