pulp_rpm_client 3.0.0b4
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 +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +79 -0
- data/README.md +134 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/ContentAdvisoriesApi.md +196 -0
- data/docs/ContentPackagesApi.md +208 -0
- data/docs/DistributionsRpmApi.md +352 -0
- data/docs/InlineResponse200.md +23 -0
- data/docs/InlineResponse2001.md +23 -0
- data/docs/InlineResponse2002.md +23 -0
- data/docs/InlineResponse2003.md +23 -0
- data/docs/InlineResponse2004.md +23 -0
- data/docs/Package.md +95 -0
- data/docs/PublicationsRpmApi.md +229 -0
- data/docs/RemotesRpmApi.md +412 -0
- data/docs/RepositorySyncURL.md +19 -0
- data/docs/RpmCopyApi.md +70 -0
- data/docs/RpmDistribution.md +29 -0
- data/docs/RpmPublication.md +27 -0
- data/docs/RpmRemote.md +45 -0
- data/docs/RpmUploadApi.md +66 -0
- data/docs/UpdateRecord.md +55 -0
- data/git_push.sh +55 -0
- data/lib/pulp_rpm_client/api/content_advisories_api.rb +243 -0
- data/lib/pulp_rpm_client/api/content_packages_api.rb +261 -0
- data/lib/pulp_rpm_client/api/distributions_rpm_api.rb +430 -0
- data/lib/pulp_rpm_client/api/publications_rpm_api.rb +273 -0
- data/lib/pulp_rpm_client/api/remotes_rpm_api.rb +506 -0
- data/lib/pulp_rpm_client/api/rpm_copy_api.rb +96 -0
- data/lib/pulp_rpm_client/api/rpm_upload_api.rb +90 -0
- data/lib/pulp_rpm_client/api_client.rb +387 -0
- data/lib/pulp_rpm_client/api_error.rb +57 -0
- data/lib/pulp_rpm_client/configuration.rb +251 -0
- data/lib/pulp_rpm_client/models/async_operation_response.rb +202 -0
- data/lib/pulp_rpm_client/models/inline_response200.rb +235 -0
- data/lib/pulp_rpm_client/models/inline_response2001.rb +235 -0
- data/lib/pulp_rpm_client/models/inline_response2002.rb +235 -0
- data/lib/pulp_rpm_client/models/inline_response2003.rb +235 -0
- data/lib/pulp_rpm_client/models/inline_response2004.rb +235 -0
- data/lib/pulp_rpm_client/models/package.rb +983 -0
- data/lib/pulp_rpm_client/models/repository_sync_url.rb +214 -0
- data/lib/pulp_rpm_client/models/rpm_distribution.rb +337 -0
- data/lib/pulp_rpm_client/models/rpm_publication.rb +258 -0
- data/lib/pulp_rpm_client/models/rpm_remote.rb +539 -0
- data/lib/pulp_rpm_client/models/update_record.rb +764 -0
- data/lib/pulp_rpm_client/version.rb +15 -0
- data/lib/pulp_rpm_client.rb +58 -0
- data/pulp_rpm_client.gemspec +45 -0
- data/spec/api/content_advisories_api_spec.rb +83 -0
- data/spec/api/content_packages_api_spec.rb +89 -0
- data/spec/api/distributions_rpm_api_spec.rb +116 -0
- data/spec/api/publications_rpm_api_spec.rb +85 -0
- data/spec/api/remotes_rpm_api_spec.rb +131 -0
- data/spec/api/rpm_copy_api_spec.rb +50 -0
- data/spec/api/rpm_upload_api_spec.rb +48 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/async_operation_response_spec.rb +41 -0
- data/spec/models/inline_response2001_spec.rb +59 -0
- data/spec/models/inline_response2002_spec.rb +59 -0
- data/spec/models/inline_response2003_spec.rb +59 -0
- data/spec/models/inline_response2004_spec.rb +59 -0
- data/spec/models/inline_response200_spec.rb +59 -0
- data/spec/models/package_spec.rb +275 -0
- data/spec/models/repository_sync_url_spec.rb +47 -0
- data/spec/models/rpm_distribution_spec.rb +77 -0
- data/spec/models/rpm_publication_spec.rb +71 -0
- data/spec/models/rpm_remote_spec.rb +129 -0
- data/spec/models/update_record_spec.rb +155 -0
- data/spec/spec_helper.rb +111 -0
- metadata +317 -0
@@ -0,0 +1,764 @@
|
|
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.0.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module PulpRpmClient
|
16
|
+
class UpdateRecord
|
17
|
+
attr_accessor :_href
|
18
|
+
|
19
|
+
# Timestamp of creation.
|
20
|
+
attr_accessor :_created
|
21
|
+
|
22
|
+
attr_accessor :_type
|
23
|
+
|
24
|
+
# Update id (short update name, e.g. RHEA-2013:1777)
|
25
|
+
attr_accessor :id
|
26
|
+
|
27
|
+
# Date when the update was updated (e.g. '2013-12-02 00:00:00')
|
28
|
+
attr_accessor :updated_date
|
29
|
+
|
30
|
+
# Update description
|
31
|
+
attr_accessor :description
|
32
|
+
|
33
|
+
# Date when the update was issued (e.g. '2013-12-02 00:00:00')
|
34
|
+
attr_accessor :issued_date
|
35
|
+
|
36
|
+
# Source of the update (e.g. security@redhat.com)
|
37
|
+
attr_accessor :fromstr
|
38
|
+
|
39
|
+
# Update status ('final', ...)
|
40
|
+
attr_accessor :status
|
41
|
+
|
42
|
+
# Update name
|
43
|
+
attr_accessor :title
|
44
|
+
|
45
|
+
# Short summary
|
46
|
+
attr_accessor :summary
|
47
|
+
|
48
|
+
# Update version (probably always an integer number)
|
49
|
+
attr_accessor :version
|
50
|
+
|
51
|
+
# Update type ('enhancement', 'bugfix', ...)
|
52
|
+
attr_accessor :type
|
53
|
+
|
54
|
+
# Severity
|
55
|
+
attr_accessor :severity
|
56
|
+
|
57
|
+
# Solution
|
58
|
+
attr_accessor :solution
|
59
|
+
|
60
|
+
# Update release
|
61
|
+
attr_accessor :release
|
62
|
+
|
63
|
+
# Copyrights
|
64
|
+
attr_accessor :rights
|
65
|
+
|
66
|
+
# Push count
|
67
|
+
attr_accessor :pushcount
|
68
|
+
|
69
|
+
# List of packages
|
70
|
+
attr_accessor :pkglist
|
71
|
+
|
72
|
+
# List of references
|
73
|
+
attr_accessor :references
|
74
|
+
|
75
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
76
|
+
def self.attribute_map
|
77
|
+
{
|
78
|
+
:'_href' => :'_href',
|
79
|
+
:'_created' => :'_created',
|
80
|
+
:'_type' => :'_type',
|
81
|
+
:'id' => :'id',
|
82
|
+
:'updated_date' => :'updated_date',
|
83
|
+
:'description' => :'description',
|
84
|
+
:'issued_date' => :'issued_date',
|
85
|
+
:'fromstr' => :'fromstr',
|
86
|
+
:'status' => :'status',
|
87
|
+
:'title' => :'title',
|
88
|
+
:'summary' => :'summary',
|
89
|
+
:'version' => :'version',
|
90
|
+
:'type' => :'type',
|
91
|
+
:'severity' => :'severity',
|
92
|
+
:'solution' => :'solution',
|
93
|
+
:'release' => :'release',
|
94
|
+
:'rights' => :'rights',
|
95
|
+
:'pushcount' => :'pushcount',
|
96
|
+
:'pkglist' => :'pkglist',
|
97
|
+
:'references' => :'references'
|
98
|
+
}
|
99
|
+
end
|
100
|
+
|
101
|
+
# Attribute type mapping.
|
102
|
+
def self.openapi_types
|
103
|
+
{
|
104
|
+
:'_href' => :'String',
|
105
|
+
:'_created' => :'DateTime',
|
106
|
+
:'_type' => :'String',
|
107
|
+
:'id' => :'String',
|
108
|
+
:'updated_date' => :'String',
|
109
|
+
:'description' => :'String',
|
110
|
+
:'issued_date' => :'String',
|
111
|
+
:'fromstr' => :'String',
|
112
|
+
:'status' => :'String',
|
113
|
+
:'title' => :'String',
|
114
|
+
:'summary' => :'String',
|
115
|
+
:'version' => :'String',
|
116
|
+
:'type' => :'String',
|
117
|
+
:'severity' => :'String',
|
118
|
+
:'solution' => :'String',
|
119
|
+
:'release' => :'String',
|
120
|
+
:'rights' => :'String',
|
121
|
+
:'pushcount' => :'String',
|
122
|
+
:'pkglist' => :'Array<String>',
|
123
|
+
:'references' => :'Array<String>'
|
124
|
+
}
|
125
|
+
end
|
126
|
+
|
127
|
+
# Initializes the object
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
129
|
+
def initialize(attributes = {})
|
130
|
+
if (!attributes.is_a?(Hash))
|
131
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::UpdateRecord` initialize method"
|
132
|
+
end
|
133
|
+
|
134
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
135
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
136
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
137
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::UpdateRecord`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
138
|
+
end
|
139
|
+
h[k.to_sym] = v
|
140
|
+
}
|
141
|
+
|
142
|
+
if attributes.key?(:'_href')
|
143
|
+
self._href = attributes[:'_href']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.key?(:'_created')
|
147
|
+
self._created = attributes[:'_created']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.key?(:'_type')
|
151
|
+
self._type = attributes[:'_type']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.key?(:'id')
|
155
|
+
self.id = attributes[:'id']
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes.key?(:'updated_date')
|
159
|
+
self.updated_date = attributes[:'updated_date']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes.key?(:'description')
|
163
|
+
self.description = attributes[:'description']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.key?(:'issued_date')
|
167
|
+
self.issued_date = attributes[:'issued_date']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.key?(:'fromstr')
|
171
|
+
self.fromstr = attributes[:'fromstr']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.key?(:'status')
|
175
|
+
self.status = attributes[:'status']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.key?(:'title')
|
179
|
+
self.title = attributes[:'title']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes.key?(:'summary')
|
183
|
+
self.summary = attributes[:'summary']
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes.key?(:'version')
|
187
|
+
self.version = attributes[:'version']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.key?(:'type')
|
191
|
+
self.type = attributes[:'type']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.key?(:'severity')
|
195
|
+
self.severity = attributes[:'severity']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes.key?(:'solution')
|
199
|
+
self.solution = attributes[:'solution']
|
200
|
+
end
|
201
|
+
|
202
|
+
if attributes.key?(:'release')
|
203
|
+
self.release = attributes[:'release']
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes.key?(:'rights')
|
207
|
+
self.rights = attributes[:'rights']
|
208
|
+
end
|
209
|
+
|
210
|
+
if attributes.key?(:'pushcount')
|
211
|
+
self.pushcount = attributes[:'pushcount']
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes.key?(:'pkglist')
|
215
|
+
if (value = attributes[:'pkglist']).is_a?(Array)
|
216
|
+
self.pkglist = value
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
if attributes.key?(:'references')
|
221
|
+
if (value = attributes[:'references']).is_a?(Array)
|
222
|
+
self.references = value
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
228
|
+
# @return Array for valid properties with the reasons
|
229
|
+
def list_invalid_properties
|
230
|
+
invalid_properties = Array.new
|
231
|
+
if !@_type.nil? && @_type.to_s.length < 1
|
232
|
+
invalid_properties.push('invalid value for "_type", the character length must be great than or equal to 1.')
|
233
|
+
end
|
234
|
+
|
235
|
+
if @id.nil?
|
236
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
237
|
+
end
|
238
|
+
|
239
|
+
if @id.to_s.length < 1
|
240
|
+
invalid_properties.push('invalid value for "id", the character length must be great than or equal to 1.')
|
241
|
+
end
|
242
|
+
|
243
|
+
if @updated_date.nil?
|
244
|
+
invalid_properties.push('invalid value for "updated_date", updated_date cannot be nil.')
|
245
|
+
end
|
246
|
+
|
247
|
+
if @updated_date.to_s.length < 1
|
248
|
+
invalid_properties.push('invalid value for "updated_date", the character length must be great than or equal to 1.')
|
249
|
+
end
|
250
|
+
|
251
|
+
if @description.nil?
|
252
|
+
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
253
|
+
end
|
254
|
+
|
255
|
+
if @description.to_s.length < 1
|
256
|
+
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
|
257
|
+
end
|
258
|
+
|
259
|
+
if @issued_date.nil?
|
260
|
+
invalid_properties.push('invalid value for "issued_date", issued_date cannot be nil.')
|
261
|
+
end
|
262
|
+
|
263
|
+
if @issued_date.to_s.length < 1
|
264
|
+
invalid_properties.push('invalid value for "issued_date", the character length must be great than or equal to 1.')
|
265
|
+
end
|
266
|
+
|
267
|
+
if @fromstr.nil?
|
268
|
+
invalid_properties.push('invalid value for "fromstr", fromstr cannot be nil.')
|
269
|
+
end
|
270
|
+
|
271
|
+
if @fromstr.to_s.length < 1
|
272
|
+
invalid_properties.push('invalid value for "fromstr", the character length must be great than or equal to 1.')
|
273
|
+
end
|
274
|
+
|
275
|
+
if @status.nil?
|
276
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
277
|
+
end
|
278
|
+
|
279
|
+
if @status.to_s.length < 1
|
280
|
+
invalid_properties.push('invalid value for "status", the character length must be great than or equal to 1.')
|
281
|
+
end
|
282
|
+
|
283
|
+
if @title.nil?
|
284
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
285
|
+
end
|
286
|
+
|
287
|
+
if @title.to_s.length < 1
|
288
|
+
invalid_properties.push('invalid value for "title", the character length must be great than or equal to 1.')
|
289
|
+
end
|
290
|
+
|
291
|
+
if @summary.nil?
|
292
|
+
invalid_properties.push('invalid value for "summary", summary cannot be nil.')
|
293
|
+
end
|
294
|
+
|
295
|
+
if @summary.to_s.length < 1
|
296
|
+
invalid_properties.push('invalid value for "summary", the character length must be great than or equal to 1.')
|
297
|
+
end
|
298
|
+
|
299
|
+
if @version.nil?
|
300
|
+
invalid_properties.push('invalid value for "version", version cannot be nil.')
|
301
|
+
end
|
302
|
+
|
303
|
+
if @version.to_s.length < 1
|
304
|
+
invalid_properties.push('invalid value for "version", the character length must be great than or equal to 1.')
|
305
|
+
end
|
306
|
+
|
307
|
+
if @type.nil?
|
308
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
309
|
+
end
|
310
|
+
|
311
|
+
if @type.to_s.length < 1
|
312
|
+
invalid_properties.push('invalid value for "type", the character length must be great than or equal to 1.')
|
313
|
+
end
|
314
|
+
|
315
|
+
if @severity.nil?
|
316
|
+
invalid_properties.push('invalid value for "severity", severity cannot be nil.')
|
317
|
+
end
|
318
|
+
|
319
|
+
if @severity.to_s.length < 1
|
320
|
+
invalid_properties.push('invalid value for "severity", the character length must be great than or equal to 1.')
|
321
|
+
end
|
322
|
+
|
323
|
+
if @solution.nil?
|
324
|
+
invalid_properties.push('invalid value for "solution", solution cannot be nil.')
|
325
|
+
end
|
326
|
+
|
327
|
+
if @solution.to_s.length < 1
|
328
|
+
invalid_properties.push('invalid value for "solution", the character length must be great than or equal to 1.')
|
329
|
+
end
|
330
|
+
|
331
|
+
if @release.nil?
|
332
|
+
invalid_properties.push('invalid value for "release", release cannot be nil.')
|
333
|
+
end
|
334
|
+
|
335
|
+
if @release.to_s.length < 1
|
336
|
+
invalid_properties.push('invalid value for "release", the character length must be great than or equal to 1.')
|
337
|
+
end
|
338
|
+
|
339
|
+
if @rights.nil?
|
340
|
+
invalid_properties.push('invalid value for "rights", rights cannot be nil.')
|
341
|
+
end
|
342
|
+
|
343
|
+
if @rights.to_s.length < 1
|
344
|
+
invalid_properties.push('invalid value for "rights", the character length must be great than or equal to 1.')
|
345
|
+
end
|
346
|
+
|
347
|
+
if @pushcount.nil?
|
348
|
+
invalid_properties.push('invalid value for "pushcount", pushcount cannot be nil.')
|
349
|
+
end
|
350
|
+
|
351
|
+
if @pushcount.to_s.length < 1
|
352
|
+
invalid_properties.push('invalid value for "pushcount", the character length must be great than or equal to 1.')
|
353
|
+
end
|
354
|
+
|
355
|
+
invalid_properties
|
356
|
+
end
|
357
|
+
|
358
|
+
# Check to see if the all the properties in the model are valid
|
359
|
+
# @return true if the model is valid
|
360
|
+
def valid?
|
361
|
+
return false if !@_type.nil? && @_type.to_s.length < 1
|
362
|
+
return false if @id.nil?
|
363
|
+
return false if @id.to_s.length < 1
|
364
|
+
return false if @updated_date.nil?
|
365
|
+
return false if @updated_date.to_s.length < 1
|
366
|
+
return false if @description.nil?
|
367
|
+
return false if @description.to_s.length < 1
|
368
|
+
return false if @issued_date.nil?
|
369
|
+
return false if @issued_date.to_s.length < 1
|
370
|
+
return false if @fromstr.nil?
|
371
|
+
return false if @fromstr.to_s.length < 1
|
372
|
+
return false if @status.nil?
|
373
|
+
return false if @status.to_s.length < 1
|
374
|
+
return false if @title.nil?
|
375
|
+
return false if @title.to_s.length < 1
|
376
|
+
return false if @summary.nil?
|
377
|
+
return false if @summary.to_s.length < 1
|
378
|
+
return false if @version.nil?
|
379
|
+
return false if @version.to_s.length < 1
|
380
|
+
return false if @type.nil?
|
381
|
+
return false if @type.to_s.length < 1
|
382
|
+
return false if @severity.nil?
|
383
|
+
return false if @severity.to_s.length < 1
|
384
|
+
return false if @solution.nil?
|
385
|
+
return false if @solution.to_s.length < 1
|
386
|
+
return false if @release.nil?
|
387
|
+
return false if @release.to_s.length < 1
|
388
|
+
return false if @rights.nil?
|
389
|
+
return false if @rights.to_s.length < 1
|
390
|
+
return false if @pushcount.nil?
|
391
|
+
return false if @pushcount.to_s.length < 1
|
392
|
+
true
|
393
|
+
end
|
394
|
+
|
395
|
+
# Custom attribute writer method with validation
|
396
|
+
# @param [Object] _type Value to be assigned
|
397
|
+
def _type=(_type)
|
398
|
+
if !_type.nil? && _type.to_s.length < 1
|
399
|
+
fail ArgumentError, 'invalid value for "_type", the character length must be great than or equal to 1.'
|
400
|
+
end
|
401
|
+
|
402
|
+
@_type = _type
|
403
|
+
end
|
404
|
+
|
405
|
+
# Custom attribute writer method with validation
|
406
|
+
# @param [Object] id Value to be assigned
|
407
|
+
def id=(id)
|
408
|
+
if id.nil?
|
409
|
+
fail ArgumentError, 'id cannot be nil'
|
410
|
+
end
|
411
|
+
|
412
|
+
if id.to_s.length < 1
|
413
|
+
fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.'
|
414
|
+
end
|
415
|
+
|
416
|
+
@id = id
|
417
|
+
end
|
418
|
+
|
419
|
+
# Custom attribute writer method with validation
|
420
|
+
# @param [Object] updated_date Value to be assigned
|
421
|
+
def updated_date=(updated_date)
|
422
|
+
if updated_date.nil?
|
423
|
+
fail ArgumentError, 'updated_date cannot be nil'
|
424
|
+
end
|
425
|
+
|
426
|
+
if updated_date.to_s.length < 1
|
427
|
+
fail ArgumentError, 'invalid value for "updated_date", the character length must be great than or equal to 1.'
|
428
|
+
end
|
429
|
+
|
430
|
+
@updated_date = updated_date
|
431
|
+
end
|
432
|
+
|
433
|
+
# Custom attribute writer method with validation
|
434
|
+
# @param [Object] description Value to be assigned
|
435
|
+
def description=(description)
|
436
|
+
if description.nil?
|
437
|
+
fail ArgumentError, 'description cannot be nil'
|
438
|
+
end
|
439
|
+
|
440
|
+
if description.to_s.length < 1
|
441
|
+
fail ArgumentError, 'invalid value for "description", the character length must be great than or equal to 1.'
|
442
|
+
end
|
443
|
+
|
444
|
+
@description = description
|
445
|
+
end
|
446
|
+
|
447
|
+
# Custom attribute writer method with validation
|
448
|
+
# @param [Object] issued_date Value to be assigned
|
449
|
+
def issued_date=(issued_date)
|
450
|
+
if issued_date.nil?
|
451
|
+
fail ArgumentError, 'issued_date cannot be nil'
|
452
|
+
end
|
453
|
+
|
454
|
+
if issued_date.to_s.length < 1
|
455
|
+
fail ArgumentError, 'invalid value for "issued_date", the character length must be great than or equal to 1.'
|
456
|
+
end
|
457
|
+
|
458
|
+
@issued_date = issued_date
|
459
|
+
end
|
460
|
+
|
461
|
+
# Custom attribute writer method with validation
|
462
|
+
# @param [Object] fromstr Value to be assigned
|
463
|
+
def fromstr=(fromstr)
|
464
|
+
if fromstr.nil?
|
465
|
+
fail ArgumentError, 'fromstr cannot be nil'
|
466
|
+
end
|
467
|
+
|
468
|
+
if fromstr.to_s.length < 1
|
469
|
+
fail ArgumentError, 'invalid value for "fromstr", the character length must be great than or equal to 1.'
|
470
|
+
end
|
471
|
+
|
472
|
+
@fromstr = fromstr
|
473
|
+
end
|
474
|
+
|
475
|
+
# Custom attribute writer method with validation
|
476
|
+
# @param [Object] status Value to be assigned
|
477
|
+
def status=(status)
|
478
|
+
if status.nil?
|
479
|
+
fail ArgumentError, 'status cannot be nil'
|
480
|
+
end
|
481
|
+
|
482
|
+
if status.to_s.length < 1
|
483
|
+
fail ArgumentError, 'invalid value for "status", the character length must be great than or equal to 1.'
|
484
|
+
end
|
485
|
+
|
486
|
+
@status = status
|
487
|
+
end
|
488
|
+
|
489
|
+
# Custom attribute writer method with validation
|
490
|
+
# @param [Object] title Value to be assigned
|
491
|
+
def title=(title)
|
492
|
+
if title.nil?
|
493
|
+
fail ArgumentError, 'title cannot be nil'
|
494
|
+
end
|
495
|
+
|
496
|
+
if title.to_s.length < 1
|
497
|
+
fail ArgumentError, 'invalid value for "title", the character length must be great than or equal to 1.'
|
498
|
+
end
|
499
|
+
|
500
|
+
@title = title
|
501
|
+
end
|
502
|
+
|
503
|
+
# Custom attribute writer method with validation
|
504
|
+
# @param [Object] summary Value to be assigned
|
505
|
+
def summary=(summary)
|
506
|
+
if summary.nil?
|
507
|
+
fail ArgumentError, 'summary cannot be nil'
|
508
|
+
end
|
509
|
+
|
510
|
+
if summary.to_s.length < 1
|
511
|
+
fail ArgumentError, 'invalid value for "summary", the character length must be great than or equal to 1.'
|
512
|
+
end
|
513
|
+
|
514
|
+
@summary = summary
|
515
|
+
end
|
516
|
+
|
517
|
+
# Custom attribute writer method with validation
|
518
|
+
# @param [Object] version Value to be assigned
|
519
|
+
def version=(version)
|
520
|
+
if version.nil?
|
521
|
+
fail ArgumentError, 'version cannot be nil'
|
522
|
+
end
|
523
|
+
|
524
|
+
if version.to_s.length < 1
|
525
|
+
fail ArgumentError, 'invalid value for "version", the character length must be great than or equal to 1.'
|
526
|
+
end
|
527
|
+
|
528
|
+
@version = version
|
529
|
+
end
|
530
|
+
|
531
|
+
# Custom attribute writer method with validation
|
532
|
+
# @param [Object] type Value to be assigned
|
533
|
+
def type=(type)
|
534
|
+
if type.nil?
|
535
|
+
fail ArgumentError, 'type cannot be nil'
|
536
|
+
end
|
537
|
+
|
538
|
+
if type.to_s.length < 1
|
539
|
+
fail ArgumentError, 'invalid value for "type", the character length must be great than or equal to 1.'
|
540
|
+
end
|
541
|
+
|
542
|
+
@type = type
|
543
|
+
end
|
544
|
+
|
545
|
+
# Custom attribute writer method with validation
|
546
|
+
# @param [Object] severity Value to be assigned
|
547
|
+
def severity=(severity)
|
548
|
+
if severity.nil?
|
549
|
+
fail ArgumentError, 'severity cannot be nil'
|
550
|
+
end
|
551
|
+
|
552
|
+
if severity.to_s.length < 1
|
553
|
+
fail ArgumentError, 'invalid value for "severity", the character length must be great than or equal to 1.'
|
554
|
+
end
|
555
|
+
|
556
|
+
@severity = severity
|
557
|
+
end
|
558
|
+
|
559
|
+
# Custom attribute writer method with validation
|
560
|
+
# @param [Object] solution Value to be assigned
|
561
|
+
def solution=(solution)
|
562
|
+
if solution.nil?
|
563
|
+
fail ArgumentError, 'solution cannot be nil'
|
564
|
+
end
|
565
|
+
|
566
|
+
if solution.to_s.length < 1
|
567
|
+
fail ArgumentError, 'invalid value for "solution", the character length must be great than or equal to 1.'
|
568
|
+
end
|
569
|
+
|
570
|
+
@solution = solution
|
571
|
+
end
|
572
|
+
|
573
|
+
# Custom attribute writer method with validation
|
574
|
+
# @param [Object] release Value to be assigned
|
575
|
+
def release=(release)
|
576
|
+
if release.nil?
|
577
|
+
fail ArgumentError, 'release cannot be nil'
|
578
|
+
end
|
579
|
+
|
580
|
+
if release.to_s.length < 1
|
581
|
+
fail ArgumentError, 'invalid value for "release", the character length must be great than or equal to 1.'
|
582
|
+
end
|
583
|
+
|
584
|
+
@release = release
|
585
|
+
end
|
586
|
+
|
587
|
+
# Custom attribute writer method with validation
|
588
|
+
# @param [Object] rights Value to be assigned
|
589
|
+
def rights=(rights)
|
590
|
+
if rights.nil?
|
591
|
+
fail ArgumentError, 'rights cannot be nil'
|
592
|
+
end
|
593
|
+
|
594
|
+
if rights.to_s.length < 1
|
595
|
+
fail ArgumentError, 'invalid value for "rights", the character length must be great than or equal to 1.'
|
596
|
+
end
|
597
|
+
|
598
|
+
@rights = rights
|
599
|
+
end
|
600
|
+
|
601
|
+
# Custom attribute writer method with validation
|
602
|
+
# @param [Object] pushcount Value to be assigned
|
603
|
+
def pushcount=(pushcount)
|
604
|
+
if pushcount.nil?
|
605
|
+
fail ArgumentError, 'pushcount cannot be nil'
|
606
|
+
end
|
607
|
+
|
608
|
+
if pushcount.to_s.length < 1
|
609
|
+
fail ArgumentError, 'invalid value for "pushcount", the character length must be great than or equal to 1.'
|
610
|
+
end
|
611
|
+
|
612
|
+
@pushcount = pushcount
|
613
|
+
end
|
614
|
+
|
615
|
+
# Checks equality by comparing each attribute.
|
616
|
+
# @param [Object] Object to be compared
|
617
|
+
def ==(o)
|
618
|
+
return true if self.equal?(o)
|
619
|
+
self.class == o.class &&
|
620
|
+
_href == o._href &&
|
621
|
+
_created == o._created &&
|
622
|
+
_type == o._type &&
|
623
|
+
id == o.id &&
|
624
|
+
updated_date == o.updated_date &&
|
625
|
+
description == o.description &&
|
626
|
+
issued_date == o.issued_date &&
|
627
|
+
fromstr == o.fromstr &&
|
628
|
+
status == o.status &&
|
629
|
+
title == o.title &&
|
630
|
+
summary == o.summary &&
|
631
|
+
version == o.version &&
|
632
|
+
type == o.type &&
|
633
|
+
severity == o.severity &&
|
634
|
+
solution == o.solution &&
|
635
|
+
release == o.release &&
|
636
|
+
rights == o.rights &&
|
637
|
+
pushcount == o.pushcount &&
|
638
|
+
pkglist == o.pkglist &&
|
639
|
+
references == o.references
|
640
|
+
end
|
641
|
+
|
642
|
+
# @see the `==` method
|
643
|
+
# @param [Object] Object to be compared
|
644
|
+
def eql?(o)
|
645
|
+
self == o
|
646
|
+
end
|
647
|
+
|
648
|
+
# Calculates hash code according to all attributes.
|
649
|
+
# @return [Integer] Hash code
|
650
|
+
def hash
|
651
|
+
[_href, _created, _type, id, updated_date, description, issued_date, fromstr, status, title, summary, version, type, severity, solution, release, rights, pushcount, pkglist, references].hash
|
652
|
+
end
|
653
|
+
|
654
|
+
# Builds the object from hash
|
655
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
656
|
+
# @return [Object] Returns the model itself
|
657
|
+
def self.build_from_hash(attributes)
|
658
|
+
new.build_from_hash(attributes)
|
659
|
+
end
|
660
|
+
|
661
|
+
# Builds the object from hash
|
662
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
663
|
+
# @return [Object] Returns the model itself
|
664
|
+
def build_from_hash(attributes)
|
665
|
+
return nil unless attributes.is_a?(Hash)
|
666
|
+
self.class.openapi_types.each_pair do |key, type|
|
667
|
+
if type =~ /\AArray<(.*)>/i
|
668
|
+
# check to ensure the input is an array given that the attribute
|
669
|
+
# is documented as an array but the input is not
|
670
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
671
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
672
|
+
end
|
673
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
674
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
675
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
676
|
+
end
|
677
|
+
|
678
|
+
self
|
679
|
+
end
|
680
|
+
|
681
|
+
# Deserializes the data based on type
|
682
|
+
# @param string type Data type
|
683
|
+
# @param string value Value to be deserialized
|
684
|
+
# @return [Object] Deserialized data
|
685
|
+
def _deserialize(type, value)
|
686
|
+
case type.to_sym
|
687
|
+
when :DateTime
|
688
|
+
DateTime.parse(value)
|
689
|
+
when :Date
|
690
|
+
Date.parse(value)
|
691
|
+
when :String
|
692
|
+
value.to_s
|
693
|
+
when :Integer
|
694
|
+
value.to_i
|
695
|
+
when :Float
|
696
|
+
value.to_f
|
697
|
+
when :Boolean
|
698
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
699
|
+
true
|
700
|
+
else
|
701
|
+
false
|
702
|
+
end
|
703
|
+
when :Object
|
704
|
+
# generic object (usually a Hash), return directly
|
705
|
+
value
|
706
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
707
|
+
inner_type = Regexp.last_match[:inner_type]
|
708
|
+
value.map { |v| _deserialize(inner_type, v) }
|
709
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
710
|
+
k_type = Regexp.last_match[:k_type]
|
711
|
+
v_type = Regexp.last_match[:v_type]
|
712
|
+
{}.tap do |hash|
|
713
|
+
value.each do |k, v|
|
714
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
715
|
+
end
|
716
|
+
end
|
717
|
+
else # model
|
718
|
+
PulpRpmClient.const_get(type).build_from_hash(value)
|
719
|
+
end
|
720
|
+
end
|
721
|
+
|
722
|
+
# Returns the string representation of the object
|
723
|
+
# @return [String] String presentation of the object
|
724
|
+
def to_s
|
725
|
+
to_hash.to_s
|
726
|
+
end
|
727
|
+
|
728
|
+
# to_body is an alias to to_hash (backward compatibility)
|
729
|
+
# @return [Hash] Returns the object in the form of hash
|
730
|
+
def to_body
|
731
|
+
to_hash
|
732
|
+
end
|
733
|
+
|
734
|
+
# Returns the object in the form of hash
|
735
|
+
# @return [Hash] Returns the object in the form of hash
|
736
|
+
def to_hash
|
737
|
+
hash = {}
|
738
|
+
self.class.attribute_map.each_pair do |attr, param|
|
739
|
+
value = self.send(attr)
|
740
|
+
next if value.nil?
|
741
|
+
hash[param] = _to_hash(value)
|
742
|
+
end
|
743
|
+
hash
|
744
|
+
end
|
745
|
+
|
746
|
+
# Outputs non-array value in the form of hash
|
747
|
+
# For object, use to_hash. Otherwise, just return the value
|
748
|
+
# @param [Object] value Any valid value
|
749
|
+
# @return [Hash] Returns the value in the form of hash
|
750
|
+
def _to_hash(value)
|
751
|
+
if value.is_a?(Array)
|
752
|
+
value.compact.map { |v| _to_hash(v) }
|
753
|
+
elsif value.is_a?(Hash)
|
754
|
+
{}.tap do |hash|
|
755
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
756
|
+
end
|
757
|
+
elsif value.respond_to? :to_hash
|
758
|
+
value.to_hash
|
759
|
+
else
|
760
|
+
value
|
761
|
+
end
|
762
|
+
end
|
763
|
+
end
|
764
|
+
end
|