pulp_python_client 3.0.0b10 → 3.0.0b11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +46 -33
  3. data/docs/ContentPackagesApi.md +52 -52
  4. data/docs/ContentSummary.md +3 -3
  5. data/docs/ContentSummaryResponse.md +21 -0
  6. data/docs/DistributionsPypiApi.md +108 -60
  7. data/docs/InlineResponse200.md +3 -3
  8. data/docs/InlineResponse2001.md +3 -3
  9. data/docs/InlineResponse2002.md +3 -3
  10. data/docs/InlineResponse2003.md +3 -3
  11. data/docs/InlineResponse2004.md +3 -3
  12. data/docs/InlineResponse2005.md +3 -3
  13. data/docs/PatchedpythonPythonDistribution.md +23 -0
  14. data/docs/PatchedpythonPythonRemote.md +43 -0
  15. data/docs/PatchedpythonPythonRepository.md +21 -0
  16. data/docs/PolicyEnum.md +16 -0
  17. data/docs/PublicationsPypiApi.md +40 -40
  18. data/docs/PythonBanderRemote.md +19 -0
  19. data/docs/PythonPythonDistribution.md +1 -7
  20. data/docs/PythonPythonDistributionResponse.md +29 -0
  21. data/docs/PythonPythonPackageContent.md +7 -15
  22. data/docs/PythonPythonPackageContentResponse.md +69 -0
  23. data/docs/PythonPythonPublication.md +2 -8
  24. data/docs/PythonPythonPublicationResponse.md +25 -0
  25. data/docs/PythonPythonRemote.md +4 -10
  26. data/docs/PythonPythonRemoteResponse.md +49 -0
  27. data/docs/PythonPythonRepository.md +4 -10
  28. data/docs/PythonPythonRepositoryResponse.md +29 -0
  29. data/docs/RemotesPythonApi.md +129 -69
  30. data/docs/RepositoriesPythonApi.md +97 -73
  31. data/docs/RepositoriesPythonVersionsApi.md +94 -62
  32. data/docs/RepositoryAddRemoveContent.md +2 -2
  33. data/docs/RepositorySyncURL.md +1 -1
  34. data/docs/RepositoryVersion.md +1 -9
  35. data/docs/RepositoryVersionResponse.md +25 -0
  36. data/lib/pulp_python_client.rb +14 -2
  37. data/lib/pulp_python_client/api/content_packages_api.rb +70 -70
  38. data/lib/pulp_python_client/api/distributions_pypi_api.rb +153 -90
  39. data/lib/pulp_python_client/api/publications_pypi_api.rb +59 -59
  40. data/lib/pulp_python_client/api/remotes_python_api.rb +185 -108
  41. data/lib/pulp_python_client/api/repositories_python_api.rb +145 -118
  42. data/lib/pulp_python_client/api/repositories_python_versions_api.rb +137 -92
  43. data/lib/pulp_python_client/api_client.rb +2 -2
  44. data/lib/pulp_python_client/api_error.rb +2 -2
  45. data/lib/pulp_python_client/configuration.rb +3 -3
  46. data/lib/pulp_python_client/models/async_operation_response.rb +3 -2
  47. data/lib/pulp_python_client/models/content_summary.rb +9 -15
  48. data/lib/pulp_python_client/models/content_summary_response.rb +240 -0
  49. data/lib/pulp_python_client/models/inline_response200.rb +3 -13
  50. data/lib/pulp_python_client/models/inline_response2001.rb +3 -13
  51. data/lib/pulp_python_client/models/inline_response2002.rb +3 -13
  52. data/lib/pulp_python_client/models/inline_response2003.rb +3 -13
  53. data/lib/pulp_python_client/models/inline_response2004.rb +3 -13
  54. data/lib/pulp_python_client/models/inline_response2005.rb +3 -13
  55. data/lib/pulp_python_client/models/patchedpython_python_distribution.rb +240 -0
  56. data/lib/pulp_python_client/models/patchedpython_python_remote.rb +359 -0
  57. data/lib/pulp_python_client/models/patchedpython_python_repository.rb +229 -0
  58. data/lib/pulp_python_client/models/policy_enum.rb +37 -0
  59. data/lib/pulp_python_client/models/python_bander_remote.rb +228 -0
  60. data/lib/pulp_python_client/models/python_python_distribution.rb +4 -85
  61. data/lib/pulp_python_client/models/python_python_distribution_response.rb +279 -0
  62. data/lib/pulp_python_client/models/python_python_package_content.rb +28 -136
  63. data/lib/pulp_python_client/models/python_python_package_content_response.rb +467 -0
  64. data/lib/pulp_python_client/models/python_python_publication.rb +7 -37
  65. data/lib/pulp_python_client/models/python_python_publication_response.rb +248 -0
  66. data/lib/pulp_python_client/models/python_python_remote.rb +7 -199
  67. data/lib/pulp_python_client/models/python_python_remote_response.rb +398 -0
  68. data/lib/pulp_python_client/models/python_python_repository.rb +18 -78
  69. data/lib/pulp_python_client/models/python_python_repository_response.rb +271 -0
  70. data/lib/pulp_python_client/models/repository_add_remove_content.rb +5 -4
  71. data/lib/pulp_python_client/models/repository_sync_url.rb +3 -8
  72. data/lib/pulp_python_client/models/repository_version.rb +7 -43
  73. data/lib/pulp_python_client/models/repository_version_response.rb +246 -0
  74. data/lib/pulp_python_client/version.rb +3 -3
  75. data/pulp_python_client.gemspec +4 -4
  76. data/spec/api/content_packages_api_spec.rb +24 -24
  77. data/spec/api/distributions_pypi_api_spec.rb +39 -18
  78. data/spec/api/publications_pypi_api_spec.rb +14 -14
  79. data/spec/api/remotes_python_api_spec.rb +49 -22
  80. data/spec/api/repositories_python_api_spec.rb +28 -19
  81. data/spec/api/repositories_python_versions_api_spec.rb +38 -23
  82. data/spec/api_client_spec.rb +2 -2
  83. data/spec/configuration_spec.rb +2 -2
  84. data/spec/models/async_operation_response_spec.rb +2 -2
  85. data/spec/models/content_summary_response_spec.rb +53 -0
  86. data/spec/models/content_summary_spec.rb +2 -2
  87. data/spec/models/inline_response2001_spec.rb +2 -2
  88. data/spec/models/inline_response2002_spec.rb +2 -2
  89. data/spec/models/inline_response2003_spec.rb +2 -2
  90. data/spec/models/inline_response2004_spec.rb +2 -2
  91. data/spec/models/inline_response2005_spec.rb +2 -2
  92. data/spec/models/inline_response200_spec.rb +2 -2
  93. data/spec/models/patchedpython_python_distribution_spec.rb +59 -0
  94. data/spec/models/patchedpython_python_remote_spec.rb +119 -0
  95. data/spec/models/patchedpython_python_repository_spec.rb +53 -0
  96. data/spec/models/policy_enum_spec.rb +35 -0
  97. data/spec/models/python_bander_remote_spec.rb +47 -0
  98. data/spec/models/python_python_distribution_response_spec.rb +77 -0
  99. data/spec/models/python_python_distribution_spec.rb +2 -20
  100. data/spec/models/python_python_package_content_response_spec.rb +197 -0
  101. data/spec/models/python_python_package_content_spec.rb +5 -29
  102. data/spec/models/python_python_publication_response_spec.rb +65 -0
  103. data/spec/models/python_python_publication_spec.rb +2 -20
  104. data/spec/models/python_python_remote_response_spec.rb +137 -0
  105. data/spec/models/python_python_remote_spec.rb +2 -24
  106. data/spec/models/python_python_repository_response_spec.rb +77 -0
  107. data/spec/models/python_python_repository_spec.rb +5 -23
  108. data/spec/models/repository_add_remove_content_spec.rb +2 -2
  109. data/spec/models/repository_sync_url_spec.rb +2 -2
  110. data/spec/models/repository_version_response_spec.rb +65 -0
  111. data/spec/models/repository_version_spec.rb +2 -26
  112. data/spec/spec_helper.rb +2 -2
  113. metadata +52 -4
@@ -1,10 +1,10 @@
1
1
  =begin
2
2
  #Pulp 3 API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
5
 
6
6
  The version of the OpenAPI document: v3
7
-
7
+ Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.2.3
10
10
 
@@ -13,18 +13,11 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module PulpPythonClient
16
+ # Serializer for Pulp distributions for the Python type.
16
17
  class PythonPythonDistribution
17
- attr_accessor :pulp_href
18
-
19
- # Timestamp of creation.
20
- attr_accessor :pulp_created
21
-
22
18
  # 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
19
  attr_accessor :base_path
24
20
 
25
- # The URL for accessing the publication as defined by this distribution.
26
- attr_accessor :base_url
27
-
28
21
  # An optional content-guard.
29
22
  attr_accessor :content_guard
30
23
 
@@ -37,10 +30,7 @@ module PulpPythonClient
37
30
  # Attribute mapping from ruby-style variable name to JSON key.
38
31
  def self.attribute_map
39
32
  {
40
- :'pulp_href' => :'pulp_href',
41
- :'pulp_created' => :'pulp_created',
42
33
  :'base_path' => :'base_path',
43
- :'base_url' => :'base_url',
44
34
  :'content_guard' => :'content_guard',
45
35
  :'name' => :'name',
46
36
  :'publication' => :'publication'
@@ -50,10 +40,7 @@ module PulpPythonClient
50
40
  # Attribute type mapping.
51
41
  def self.openapi_types
52
42
  {
53
- :'pulp_href' => :'String',
54
- :'pulp_created' => :'DateTime',
55
43
  :'base_path' => :'String',
56
- :'base_url' => :'String',
57
44
  :'content_guard' => :'String',
58
45
  :'name' => :'String',
59
46
  :'publication' => :'String'
@@ -83,22 +70,10 @@ module PulpPythonClient
83
70
  h[k.to_sym] = v
84
71
  }
85
72
 
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
73
  if attributes.key?(:'base_path')
95
74
  self.base_path = attributes[:'base_path']
96
75
  end
97
76
 
98
- if attributes.key?(:'base_url')
99
- self.base_url = attributes[:'base_url']
100
- end
101
-
102
77
  if attributes.key?(:'content_guard')
103
78
  self.content_guard = attributes[:'content_guard']
104
79
  end
@@ -120,22 +95,10 @@ module PulpPythonClient
120
95
  invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
121
96
  end
122
97
 
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
98
  if @name.nil?
132
99
  invalid_properties.push('invalid value for "name", name cannot be nil.')
133
100
  end
134
101
 
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
102
  invalid_properties
140
103
  end
141
104
 
@@ -143,60 +106,16 @@ module PulpPythonClient
143
106
  # @return true if the model is valid
144
107
  def valid?
145
108
  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
109
  return false if @name.nil?
149
- return false if @name.to_s.length < 1
150
110
  true
151
111
  end
152
112
 
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
113
  # Checks equality by comparing each attribute.
192
114
  # @param [Object] Object to be compared
193
115
  def ==(o)
194
116
  return true if self.equal?(o)
195
117
  self.class == o.class &&
196
- pulp_href == o.pulp_href &&
197
- pulp_created == o.pulp_created &&
198
118
  base_path == o.base_path &&
199
- base_url == o.base_url &&
200
119
  content_guard == o.content_guard &&
201
120
  name == o.name &&
202
121
  publication == o.publication
@@ -211,7 +130,7 @@ module PulpPythonClient
211
130
  # Calculates hash code according to all attributes.
212
131
  # @return [Integer] Hash code
213
132
  def hash
214
- [pulp_href, pulp_created, base_path, base_url, content_guard, name, publication].hash
133
+ [base_path, content_guard, name, publication].hash
215
134
  end
216
135
 
217
136
  # Builds the object from hash
@@ -0,0 +1,279 @@
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
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpPythonClient
16
+ # Serializer for Pulp distributions for the Python type.
17
+ class PythonPythonDistributionResponse
18
+ attr_accessor :pulp_href
19
+
20
+ # Timestamp of creation.
21
+ attr_accessor :pulp_created
22
+
23
+ # The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
24
+ attr_accessor :base_path
25
+
26
+ # The URL for accessing the publication as defined by this distribution.
27
+ attr_accessor :base_url
28
+
29
+ # An optional content-guard.
30
+ attr_accessor :content_guard
31
+
32
+ # A unique name. Ex, `rawhide` and `stable`.
33
+ attr_accessor :name
34
+
35
+ # Publication to be served
36
+ attr_accessor :publication
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'pulp_href' => :'pulp_href',
42
+ :'pulp_created' => :'pulp_created',
43
+ :'base_path' => :'base_path',
44
+ :'base_url' => :'base_url',
45
+ :'content_guard' => :'content_guard',
46
+ :'name' => :'name',
47
+ :'publication' => :'publication'
48
+ }
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'pulp_href' => :'String',
55
+ :'pulp_created' => :'DateTime',
56
+ :'base_path' => :'String',
57
+ :'base_url' => :'String',
58
+ :'content_guard' => :'String',
59
+ :'name' => :'String',
60
+ :'publication' => :'String'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ :'content_guard',
68
+ :'publication'
69
+ ])
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::PythonPythonDistributionResponse` initialize method"
77
+ end
78
+
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!self.class.attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::PythonPythonDistributionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'pulp_href')
88
+ self.pulp_href = attributes[:'pulp_href']
89
+ end
90
+
91
+ if attributes.key?(:'pulp_created')
92
+ self.pulp_created = attributes[:'pulp_created']
93
+ end
94
+
95
+ if attributes.key?(:'base_path')
96
+ self.base_path = attributes[:'base_path']
97
+ end
98
+
99
+ if attributes.key?(:'base_url')
100
+ self.base_url = attributes[:'base_url']
101
+ end
102
+
103
+ if attributes.key?(:'content_guard')
104
+ self.content_guard = attributes[:'content_guard']
105
+ end
106
+
107
+ if attributes.key?(:'name')
108
+ self.name = attributes[:'name']
109
+ end
110
+
111
+ if attributes.key?(:'publication')
112
+ self.publication = attributes[:'publication']
113
+ end
114
+ end
115
+
116
+ # Show invalid properties with the reasons. Usually used together with valid?
117
+ # @return Array for valid properties with the reasons
118
+ def list_invalid_properties
119
+ invalid_properties = Array.new
120
+ if @base_path.nil?
121
+ invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
122
+ end
123
+
124
+ if @name.nil?
125
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
126
+ end
127
+
128
+ invalid_properties
129
+ end
130
+
131
+ # Check to see if the all the properties in the model are valid
132
+ # @return true if the model is valid
133
+ def valid?
134
+ return false if @base_path.nil?
135
+ return false if @name.nil?
136
+ true
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ pulp_href == o.pulp_href &&
145
+ pulp_created == o.pulp_created &&
146
+ base_path == o.base_path &&
147
+ base_url == o.base_url &&
148
+ content_guard == o.content_guard &&
149
+ name == o.name &&
150
+ publication == o.publication
151
+ end
152
+
153
+ # @see the `==` method
154
+ # @param [Object] Object to be compared
155
+ def eql?(o)
156
+ self == o
157
+ end
158
+
159
+ # Calculates hash code according to all attributes.
160
+ # @return [Integer] Hash code
161
+ def hash
162
+ [pulp_href, pulp_created, base_path, base_url, content_guard, name, publication].hash
163
+ end
164
+
165
+ # Builds the object from hash
166
+ # @param [Hash] attributes Model attributes in the form of hash
167
+ # @return [Object] Returns the model itself
168
+ def self.build_from_hash(attributes)
169
+ new.build_from_hash(attributes)
170
+ end
171
+
172
+ # Builds the object from hash
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ # @return [Object] Returns the model itself
175
+ def build_from_hash(attributes)
176
+ return nil unless attributes.is_a?(Hash)
177
+ self.class.openapi_types.each_pair do |key, type|
178
+ if type =~ /\AArray<(.*)>/i
179
+ # check to ensure the input is an array given that the attribute
180
+ # is documented as an array but the input is not
181
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
182
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
183
+ end
184
+ elsif !attributes[self.class.attribute_map[key]].nil?
185
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
186
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
187
+ end
188
+
189
+ self
190
+ end
191
+
192
+ # Deserializes the data based on type
193
+ # @param string type Data type
194
+ # @param string value Value to be deserialized
195
+ # @return [Object] Deserialized data
196
+ def _deserialize(type, value)
197
+ case type.to_sym
198
+ when :DateTime
199
+ DateTime.parse(value)
200
+ when :Date
201
+ Date.parse(value)
202
+ when :String
203
+ value.to_s
204
+ when :Integer
205
+ value.to_i
206
+ when :Float
207
+ value.to_f
208
+ when :Boolean
209
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
210
+ true
211
+ else
212
+ false
213
+ end
214
+ when :Object
215
+ # generic object (usually a Hash), return directly
216
+ value
217
+ when /\AArray<(?<inner_type>.+)>\z/
218
+ inner_type = Regexp.last_match[:inner_type]
219
+ value.map { |v| _deserialize(inner_type, v) }
220
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
221
+ k_type = Regexp.last_match[:k_type]
222
+ v_type = Regexp.last_match[:v_type]
223
+ {}.tap do |hash|
224
+ value.each do |k, v|
225
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
226
+ end
227
+ end
228
+ else # model
229
+ PulpPythonClient.const_get(type).build_from_hash(value)
230
+ end
231
+ end
232
+
233
+ # Returns the string representation of the object
234
+ # @return [String] String presentation of the object
235
+ def to_s
236
+ to_hash.to_s
237
+ end
238
+
239
+ # to_body is an alias to to_hash (backward compatibility)
240
+ # @return [Hash] Returns the object in the form of hash
241
+ def to_body
242
+ to_hash
243
+ end
244
+
245
+ # Returns the object in the form of hash
246
+ # @return [Hash] Returns the object in the form of hash
247
+ def to_hash
248
+ hash = {}
249
+ self.class.attribute_map.each_pair do |attr, param|
250
+ value = self.send(attr)
251
+ if value.nil?
252
+ is_nullable = self.class.openapi_nullable.include?(attr)
253
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
254
+ end
255
+
256
+ hash[param] = _to_hash(value)
257
+ end
258
+ hash
259
+ end
260
+
261
+ # Outputs non-array value in the form of hash
262
+ # For object, use to_hash. Otherwise, just return the value
263
+ # @param [Object] value Any valid value
264
+ # @return [Hash] Returns the value in the form of hash
265
+ def _to_hash(value)
266
+ if value.is_a?(Array)
267
+ value.compact.map { |v| _to_hash(v) }
268
+ elsif value.is_a?(Hash)
269
+ {}.tap do |hash|
270
+ value.each { |k, v| hash[k] = _to_hash(v) }
271
+ end
272
+ elsif value.respond_to? :to_hash
273
+ value.to_hash
274
+ else
275
+ value
276
+ end
277
+ end
278
+ end
279
+ end
@@ -1,10 +1,10 @@
1
1
  =begin
2
2
  #Pulp 3 API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
5
 
6
6
  The version of the OpenAPI document: v3
7
-
7
+ Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.2.3
10
10
 
@@ -13,29 +13,19 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module PulpPythonClient
16
+ # A Serializer for PythonPackageContent.
16
17
  class PythonPythonPackageContent
17
- attr_accessor :pulp_href
18
-
19
- # Timestamp of creation.
20
- attr_accessor :pulp_created
21
-
22
18
  # Artifact file representing the physical content
23
19
  attr_accessor :artifact
24
20
 
25
- # The name of the distribution package, usually of the format: {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}.{packagetype}
26
- attr_accessor :filename
21
+ # Path where the artifact is located relative to distributions base_path
22
+ attr_accessor :relative_path
27
23
 
28
- # The type of the distribution package (e.g. sdist, bdist_wheel, bdist_egg, etc)
29
- attr_accessor :packagetype
24
+ # An uploaded file that may be turned into the artifact of the content unit.
25
+ attr_accessor :file
30
26
 
31
- # The name of the python project.
32
- attr_accessor :name
33
-
34
- # The packages version number.
35
- attr_accessor :version
36
-
37
- # Version of the file format
38
- attr_accessor :metadata_version
27
+ # A URI of a repository the new content unit should be associated with.
28
+ attr_accessor :repository
39
29
 
40
30
  # A one-line summary of what the package does.
41
31
  attr_accessor :summary
@@ -97,14 +87,10 @@ module PulpPythonClient
97
87
  # Attribute mapping from ruby-style variable name to JSON key.
98
88
  def self.attribute_map
99
89
  {
100
- :'pulp_href' => :'pulp_href',
101
- :'pulp_created' => :'pulp_created',
102
90
  :'artifact' => :'artifact',
103
- :'filename' => :'filename',
104
- :'packagetype' => :'packagetype',
105
- :'name' => :'name',
106
- :'version' => :'version',
107
- :'metadata_version' => :'metadata_version',
91
+ :'relative_path' => :'relative_path',
92
+ :'file' => :'file',
93
+ :'repository' => :'repository',
108
94
  :'summary' => :'summary',
109
95
  :'description' => :'description',
110
96
  :'keywords' => :'keywords',
@@ -130,14 +116,10 @@ module PulpPythonClient
130
116
  # Attribute type mapping.
131
117
  def self.openapi_types
132
118
  {
133
- :'pulp_href' => :'String',
134
- :'pulp_created' => :'DateTime',
135
119
  :'artifact' => :'String',
136
- :'filename' => :'String',
137
- :'packagetype' => :'String',
138
- :'name' => :'String',
139
- :'version' => :'String',
140
- :'metadata_version' => :'String',
120
+ :'relative_path' => :'String',
121
+ :'file' => :'File',
122
+ :'repository' => :'String',
141
123
  :'summary' => :'String',
142
124
  :'description' => :'String',
143
125
  :'keywords' => :'String',
@@ -181,36 +163,20 @@ module PulpPythonClient
181
163
  h[k.to_sym] = v
182
164
  }
183
165
 
184
- if attributes.key?(:'pulp_href')
185
- self.pulp_href = attributes[:'pulp_href']
186
- end
187
-
188
- if attributes.key?(:'pulp_created')
189
- self.pulp_created = attributes[:'pulp_created']
190
- end
191
-
192
166
  if attributes.key?(:'artifact')
193
167
  self.artifact = attributes[:'artifact']
194
168
  end
195
169
 
196
- if attributes.key?(:'filename')
197
- self.filename = attributes[:'filename']
198
- end
199
-
200
- if attributes.key?(:'packagetype')
201
- self.packagetype = attributes[:'packagetype']
170
+ if attributes.key?(:'relative_path')
171
+ self.relative_path = attributes[:'relative_path']
202
172
  end
203
173
 
204
- if attributes.key?(:'name')
205
- self.name = attributes[:'name']
174
+ if attributes.key?(:'file')
175
+ self.file = attributes[:'file']
206
176
  end
207
177
 
208
- if attributes.key?(:'version')
209
- self.version = attributes[:'version']
210
- end
211
-
212
- if attributes.key?(:'metadata_version')
213
- self.metadata_version = attributes[:'metadata_version']
178
+ if attributes.key?(:'repository')
179
+ self.repository = attributes[:'repository']
214
180
  end
215
181
 
216
182
  if attributes.key?(:'summary')
@@ -294,24 +260,8 @@ module PulpPythonClient
294
260
  # @return Array for valid properties with the reasons
295
261
  def list_invalid_properties
296
262
  invalid_properties = Array.new
297
- if !@filename.nil? && @filename.to_s.length < 1
298
- invalid_properties.push('invalid value for "filename", the character length must be great than or equal to 1.')
299
- end
300
-
301
- if !@packagetype.nil? && @packagetype.to_s.length < 1
302
- invalid_properties.push('invalid value for "packagetype", the character length must be great than or equal to 1.')
303
- end
304
-
305
- if !@name.nil? && @name.to_s.length < 1
306
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
307
- end
308
-
309
- if !@version.nil? && @version.to_s.length < 1
310
- invalid_properties.push('invalid value for "version", the character length must be great than or equal to 1.')
311
- end
312
-
313
- if !@metadata_version.nil? && @metadata_version.to_s.length < 1
314
- invalid_properties.push('invalid value for "metadata_version", the character length must be great than or equal to 1.')
263
+ if @relative_path.nil?
264
+ invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
315
265
  end
316
266
 
317
267
  invalid_properties
@@ -320,77 +270,19 @@ module PulpPythonClient
320
270
  # Check to see if the all the properties in the model are valid
321
271
  # @return true if the model is valid
322
272
  def valid?
323
- return false if !@filename.nil? && @filename.to_s.length < 1
324
- return false if !@packagetype.nil? && @packagetype.to_s.length < 1
325
- return false if !@name.nil? && @name.to_s.length < 1
326
- return false if !@version.nil? && @version.to_s.length < 1
327
- return false if !@metadata_version.nil? && @metadata_version.to_s.length < 1
273
+ return false if @relative_path.nil?
328
274
  true
329
275
  end
330
276
 
331
- # Custom attribute writer method with validation
332
- # @param [Object] filename Value to be assigned
333
- def filename=(filename)
334
- if !filename.nil? && filename.to_s.length < 1
335
- fail ArgumentError, 'invalid value for "filename", the character length must be great than or equal to 1.'
336
- end
337
-
338
- @filename = filename
339
- end
340
-
341
- # Custom attribute writer method with validation
342
- # @param [Object] packagetype Value to be assigned
343
- def packagetype=(packagetype)
344
- if !packagetype.nil? && packagetype.to_s.length < 1
345
- fail ArgumentError, 'invalid value for "packagetype", the character length must be great than or equal to 1.'
346
- end
347
-
348
- @packagetype = packagetype
349
- end
350
-
351
- # Custom attribute writer method with validation
352
- # @param [Object] name Value to be assigned
353
- def name=(name)
354
- if !name.nil? && name.to_s.length < 1
355
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
356
- end
357
-
358
- @name = name
359
- end
360
-
361
- # Custom attribute writer method with validation
362
- # @param [Object] version Value to be assigned
363
- def version=(version)
364
- if !version.nil? && version.to_s.length < 1
365
- fail ArgumentError, 'invalid value for "version", the character length must be great than or equal to 1.'
366
- end
367
-
368
- @version = version
369
- end
370
-
371
- # Custom attribute writer method with validation
372
- # @param [Object] metadata_version Value to be assigned
373
- def metadata_version=(metadata_version)
374
- if !metadata_version.nil? && metadata_version.to_s.length < 1
375
- fail ArgumentError, 'invalid value for "metadata_version", the character length must be great than or equal to 1.'
376
- end
377
-
378
- @metadata_version = metadata_version
379
- end
380
-
381
277
  # Checks equality by comparing each attribute.
382
278
  # @param [Object] Object to be compared
383
279
  def ==(o)
384
280
  return true if self.equal?(o)
385
281
  self.class == o.class &&
386
- pulp_href == o.pulp_href &&
387
- pulp_created == o.pulp_created &&
388
282
  artifact == o.artifact &&
389
- filename == o.filename &&
390
- packagetype == o.packagetype &&
391
- name == o.name &&
392
- version == o.version &&
393
- metadata_version == o.metadata_version &&
283
+ relative_path == o.relative_path &&
284
+ file == o.file &&
285
+ repository == o.repository &&
394
286
  summary == o.summary &&
395
287
  description == o.description &&
396
288
  keywords == o.keywords &&
@@ -421,7 +313,7 @@ module PulpPythonClient
421
313
  # Calculates hash code according to all attributes.
422
314
  # @return [Integer] Hash code
423
315
  def hash
424
- [pulp_href, pulp_created, artifact, filename, packagetype, name, version, metadata_version, summary, description, keywords, home_page, download_url, author, author_email, maintainer, maintainer_email, license, requires_python, project_url, platform, supported_platform, requires_dist, provides_dist, obsoletes_dist, requires_external, classifiers].hash
316
+ [artifact, relative_path, file, repository, summary, description, keywords, home_page, download_url, author, author_email, maintainer, maintainer_email, license, requires_python, project_url, platform, supported_platform, requires_dist, provides_dist, obsoletes_dist, requires_external, classifiers].hash
425
317
  end
426
318
 
427
319
  # Builds the object from hash