pulp_ansible_client 0.2.0b14 → 0.2.0b15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -20
  3. data/docs/{AnsibleCollectionRead.md → AnsibleCollection.md} +2 -2
  4. data/docs/AnsibleCollectionRemote.md +5 -1
  5. data/docs/AnsibleCollectionVersion.md +3 -3
  6. data/docs/AnsibleRole.md +3 -3
  7. data/docs/{CollectionImportDetailRead.md → CollectionImportDetail.md} +2 -2
  8. data/docs/ContentCollectionVersionsApi.md +4 -4
  9. data/docs/ContentRolesApi.md +4 -4
  10. data/docs/DistributionsAnsibleApi.md +2 -2
  11. data/docs/{GalaxyCollectionVersionRead.md → GalaxyCollectionVersion.md} +2 -2
  12. data/docs/{GalaxyRoleRead.md → GalaxyRole.md} +2 -2
  13. data/docs/{GalaxyRoleVersionRead.md → GalaxyRoleVersion.md} +2 -2
  14. data/docs/InlineResponse200.md +1 -1
  15. data/docs/InlineResponse2001.md +1 -1
  16. data/docs/InlineResponse20010.md +1 -1
  17. data/docs/InlineResponse20011.md +1 -1
  18. data/docs/InlineResponse20012.md +1 -1
  19. data/docs/InlineResponse20013.md +1 -1
  20. data/docs/InlineResponse2002.md +1 -1
  21. data/docs/InlineResponse2003.md +1 -1
  22. data/docs/InlineResponse2004.md +1 -1
  23. data/docs/InlineResponse2005.md +1 -1
  24. data/docs/InlineResponse2006.md +1 -1
  25. data/docs/InlineResponse2007.md +1 -1
  26. data/docs/InlineResponse2008.md +1 -1
  27. data/docs/InlineResponse2009.md +1 -1
  28. data/docs/PulpAnsibleGalaxyApiCollectionsApi.md +4 -4
  29. data/docs/PulpAnsibleGalaxyApiV3CollectionsApi.md +2 -2
  30. data/docs/RemotesAnsibleApi.md +4 -4
  31. data/docs/RemotesCollectionApi.md +4 -4
  32. data/docs/RepositoriesAnsibleApi.md +4 -4
  33. data/docs/RepositoriesAnsibleVersionsApi.md +6 -4
  34. data/docs/{TagRead.md → Tag.md} +2 -2
  35. data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +6 -6
  36. data/lib/pulp_ansible_client/api/content_roles_api.rb +6 -6
  37. data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +3 -3
  38. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_collections_api.rb +6 -6
  39. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_collections_api.rb +3 -3
  40. data/lib/pulp_ansible_client/api/remotes_ansible_api.rb +6 -6
  41. data/lib/pulp_ansible_client/api/remotes_collection_api.rb +6 -6
  42. data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +6 -6
  43. data/lib/pulp_ansible_client/api/repositories_ansible_versions_api.rb +9 -6
  44. data/lib/pulp_ansible_client/models/{ansible_collection_read.rb → ansible_collection.rb} +3 -3
  45. data/lib/pulp_ansible_client/models/ansible_collection_remote.rb +75 -5
  46. data/lib/pulp_ansible_client/models/ansible_collection_version.rb +11 -11
  47. data/lib/pulp_ansible_client/models/ansible_role.rb +11 -11
  48. data/lib/pulp_ansible_client/models/{collection_import_detail_read.rb → collection_import_detail.rb} +3 -3
  49. data/lib/pulp_ansible_client/models/{galaxy_collection_version_read.rb → galaxy_collection_version.rb} +3 -3
  50. data/lib/pulp_ansible_client/models/{galaxy_role_read.rb → galaxy_role.rb} +3 -3
  51. data/lib/pulp_ansible_client/models/{galaxy_role_version_read.rb → galaxy_role_version.rb} +3 -3
  52. data/lib/pulp_ansible_client/models/inline_response200.rb +1 -1
  53. data/lib/pulp_ansible_client/models/inline_response2001.rb +1 -1
  54. data/lib/pulp_ansible_client/models/inline_response20010.rb +1 -1
  55. data/lib/pulp_ansible_client/models/inline_response20011.rb +1 -1
  56. data/lib/pulp_ansible_client/models/inline_response20012.rb +1 -1
  57. data/lib/pulp_ansible_client/models/inline_response20013.rb +1 -1
  58. data/lib/pulp_ansible_client/models/inline_response2002.rb +1 -1
  59. data/lib/pulp_ansible_client/models/inline_response2003.rb +1 -1
  60. data/lib/pulp_ansible_client/models/inline_response2004.rb +1 -1
  61. data/lib/pulp_ansible_client/models/inline_response2005.rb +1 -1
  62. data/lib/pulp_ansible_client/models/inline_response2006.rb +1 -1
  63. data/lib/pulp_ansible_client/models/inline_response2007.rb +1 -1
  64. data/lib/pulp_ansible_client/models/inline_response2008.rb +1 -1
  65. data/lib/pulp_ansible_client/models/inline_response2009.rb +1 -1
  66. data/lib/pulp_ansible_client/models/{tag_read.rb → tag.rb} +3 -3
  67. data/lib/pulp_ansible_client/version.rb +1 -1
  68. data/lib/pulp_ansible_client.rb +6 -16
  69. data/spec/api/content_collection_versions_api_spec.rb +2 -2
  70. data/spec/api/content_roles_api_spec.rb +2 -2
  71. data/spec/api/distributions_ansible_api_spec.rb +1 -1
  72. data/spec/api/pulp_ansible_galaxy_api_collections_api_spec.rb +2 -2
  73. data/spec/api/pulp_ansible_galaxy_api_v3_collections_api_spec.rb +1 -1
  74. data/spec/api/remotes_ansible_api_spec.rb +2 -2
  75. data/spec/api/remotes_collection_api_spec.rb +2 -2
  76. data/spec/api/repositories_ansible_api_spec.rb +2 -2
  77. data/spec/api/repositories_ansible_versions_api_spec.rb +3 -2
  78. data/spec/models/ansible_collection_remote_spec.rb +12 -0
  79. data/spec/models/{ansible_collection_read_spec.rb → ansible_collection_spec.rb} +6 -6
  80. data/spec/models/ansible_collection_version_spec.rb +3 -3
  81. data/spec/models/ansible_role_spec.rb +3 -3
  82. data/spec/models/{collection_import_detail_read_spec.rb → collection_import_detail_spec.rb} +6 -6
  83. data/spec/models/{galaxy_collection_version_read_spec.rb → galaxy_collection_version_spec.rb} +6 -6
  84. data/spec/models/{galaxy_role_read_spec.rb → galaxy_role_spec.rb} +6 -6
  85. data/spec/models/{galaxy_role_version_read_spec.rb → galaxy_role_version_spec.rb} +6 -6
  86. data/spec/models/{tag_read_spec.rb → tag_spec.rb} +6 -6
  87. metadata +26 -66
  88. data/docs/AnsibleAnsibleDistributionRead.md +0 -31
  89. data/docs/AnsibleAnsibleRemoteRead.md +0 -43
  90. data/docs/AnsibleAnsibleRepositoryRead.md +0 -27
  91. data/docs/AnsibleCollectionRemoteRead.md +0 -45
  92. data/docs/AnsibleCollectionVersionRead.md +0 -67
  93. data/docs/AnsibleRoleRead.md +0 -27
  94. data/docs/CollectionRead.md +0 -31
  95. data/docs/CollectionVersionRead.md +0 -37
  96. data/docs/GalaxyCollectionRead.md +0 -23
  97. data/docs/RepositoryVersionRead.md +0 -25
  98. data/lib/pulp_ansible_client/models/ansible_ansible_distribution_read.rb +0 -327
  99. data/lib/pulp_ansible_client/models/ansible_ansible_remote_read.rb +0 -531
  100. data/lib/pulp_ansible_client/models/ansible_ansible_repository_read.rb +0 -294
  101. data/lib/pulp_ansible_client/models/ansible_collection_remote_read.rb +0 -557
  102. data/lib/pulp_ansible_client/models/ansible_collection_version_read.rb +0 -816
  103. data/lib/pulp_ansible_client/models/ansible_role_read.rb +0 -330
  104. data/lib/pulp_ansible_client/models/collection_read.rb +0 -314
  105. data/lib/pulp_ansible_client/models/collection_version_read.rb +0 -370
  106. data/lib/pulp_ansible_client/models/galaxy_collection_read.rb +0 -281
  107. data/lib/pulp_ansible_client/models/repository_version_read.rb +0 -244
  108. data/spec/models/ansible_ansible_distribution_read_spec.rb +0 -83
  109. data/spec/models/ansible_ansible_remote_read_spec.rb +0 -123
  110. data/spec/models/ansible_ansible_repository_read_spec.rb +0 -71
  111. data/spec/models/ansible_collection_remote_read_spec.rb +0 -129
  112. data/spec/models/ansible_collection_version_read_spec.rb +0 -191
  113. data/spec/models/ansible_role_read_spec.rb +0 -71
  114. data/spec/models/collection_read_spec.rb +0 -83
  115. data/spec/models/collection_version_read_spec.rb +0 -105
  116. data/spec/models/galaxy_collection_read_spec.rb +0 -59
  117. data/spec/models/repository_version_read_spec.rb +0 -65
@@ -1,816 +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 PulpAnsibleClient
16
- class AnsibleCollectionVersionRead
17
- attr_accessor :pulp_href
18
-
19
- # Artifact file representing the physical content
20
- attr_accessor :artifact
21
-
22
- # Timestamp of creation.
23
- attr_accessor :pulp_created
24
-
25
- # The MD5 checksum if available.
26
- attr_accessor :md5
27
-
28
- # The SHA-1 checksum if available.
29
- attr_accessor :sha1
30
-
31
- # The SHA-224 checksum if available.
32
- attr_accessor :sha224
33
-
34
- # The SHA-256 checksum if available.
35
- attr_accessor :sha256
36
-
37
- # The SHA-384 checksum if available.
38
- attr_accessor :sha384
39
-
40
- # The SHA-512 checksum if available.
41
- attr_accessor :sha512
42
-
43
- # A collection identifier.
44
- attr_accessor :id
45
-
46
- # A list of the CollectionVersion content's authors.
47
- attr_accessor :authors
48
-
49
- # A JSON field with data about the contents.
50
- attr_accessor :contents
51
-
52
- # A dict declaring Collections that this collection requires to be installed for it to be usable.
53
- attr_accessor :dependencies
54
-
55
- # A short summary description of the collection.
56
- attr_accessor :description
57
-
58
- # A JSON field holding the various documentation blobs in the collection.
59
- attr_accessor :docs_blob
60
-
61
- # The URL to any online docs.
62
- attr_accessor :documentation
63
-
64
- # The URL to the homepage of the collection/project.
65
- attr_accessor :homepage
66
-
67
- # The URL to the collection issue tracker.
68
- attr_accessor :issues
69
-
70
- # Indicates that the version is certified
71
- attr_accessor :certification
72
-
73
- # A list of licenses for content inside of a collection.
74
- attr_accessor :license
75
-
76
- # The name of the collection.
77
- attr_accessor :name
78
-
79
- # The namespace of the collection.
80
- attr_accessor :namespace
81
-
82
- # The URL of the originating SCM repository.
83
- attr_accessor :repository
84
-
85
- attr_accessor :tags
86
-
87
- # The version of the collection.
88
- attr_accessor :version
89
-
90
- # Whether or not the collection has been deprecated.
91
- attr_accessor :deprecated
92
-
93
- # Attribute mapping from ruby-style variable name to JSON key.
94
- def self.attribute_map
95
- {
96
- :'pulp_href' => :'pulp_href',
97
- :'artifact' => :'artifact',
98
- :'pulp_created' => :'pulp_created',
99
- :'md5' => :'md5',
100
- :'sha1' => :'sha1',
101
- :'sha224' => :'sha224',
102
- :'sha256' => :'sha256',
103
- :'sha384' => :'sha384',
104
- :'sha512' => :'sha512',
105
- :'id' => :'id',
106
- :'authors' => :'authors',
107
- :'contents' => :'contents',
108
- :'dependencies' => :'dependencies',
109
- :'description' => :'description',
110
- :'docs_blob' => :'docs_blob',
111
- :'documentation' => :'documentation',
112
- :'homepage' => :'homepage',
113
- :'issues' => :'issues',
114
- :'certification' => :'certification',
115
- :'license' => :'license',
116
- :'name' => :'name',
117
- :'namespace' => :'namespace',
118
- :'repository' => :'repository',
119
- :'tags' => :'tags',
120
- :'version' => :'version',
121
- :'deprecated' => :'deprecated'
122
- }
123
- end
124
-
125
- # Attribute type mapping.
126
- def self.openapi_types
127
- {
128
- :'pulp_href' => :'String',
129
- :'artifact' => :'String',
130
- :'pulp_created' => :'DateTime',
131
- :'md5' => :'String',
132
- :'sha1' => :'String',
133
- :'sha224' => :'String',
134
- :'sha256' => :'String',
135
- :'sha384' => :'String',
136
- :'sha512' => :'String',
137
- :'id' => :'String',
138
- :'authors' => :'Array<String>',
139
- :'contents' => :'Array<Hash<String, String>>',
140
- :'dependencies' => :'Hash<String, String>',
141
- :'description' => :'String',
142
- :'docs_blob' => :'Hash<String, String>',
143
- :'documentation' => :'String',
144
- :'homepage' => :'String',
145
- :'issues' => :'String',
146
- :'certification' => :'String',
147
- :'license' => :'Array<String>',
148
- :'name' => :'String',
149
- :'namespace' => :'String',
150
- :'repository' => :'String',
151
- :'tags' => :'Array<AnsibleTag>',
152
- :'version' => :'String',
153
- :'deprecated' => :'Boolean'
154
- }
155
- end
156
-
157
- # List of attributes with nullable: true
158
- def self.openapi_nullable
159
- Set.new([
160
- ])
161
- end
162
-
163
- # Initializes the object
164
- # @param [Hash] attributes Model attributes in the form of hash
165
- def initialize(attributes = {})
166
- if (!attributes.is_a?(Hash))
167
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::AnsibleCollectionVersionRead` initialize method"
168
- end
169
-
170
- # check to see if the attribute exists and convert string to symbol for hash key
171
- attributes = attributes.each_with_object({}) { |(k, v), h|
172
- if (!self.class.attribute_map.key?(k.to_sym))
173
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::AnsibleCollectionVersionRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
174
- end
175
- h[k.to_sym] = v
176
- }
177
-
178
- if attributes.key?(:'pulp_href')
179
- self.pulp_href = attributes[:'pulp_href']
180
- end
181
-
182
- if attributes.key?(:'artifact')
183
- self.artifact = attributes[:'artifact']
184
- end
185
-
186
- if attributes.key?(:'pulp_created')
187
- self.pulp_created = attributes[:'pulp_created']
188
- end
189
-
190
- if attributes.key?(:'md5')
191
- self.md5 = attributes[:'md5']
192
- end
193
-
194
- if attributes.key?(:'sha1')
195
- self.sha1 = attributes[:'sha1']
196
- end
197
-
198
- if attributes.key?(:'sha224')
199
- self.sha224 = attributes[:'sha224']
200
- end
201
-
202
- if attributes.key?(:'sha256')
203
- self.sha256 = attributes[:'sha256']
204
- end
205
-
206
- if attributes.key?(:'sha384')
207
- self.sha384 = attributes[:'sha384']
208
- end
209
-
210
- if attributes.key?(:'sha512')
211
- self.sha512 = attributes[:'sha512']
212
- end
213
-
214
- if attributes.key?(:'id')
215
- self.id = attributes[:'id']
216
- end
217
-
218
- if attributes.key?(:'authors')
219
- if (value = attributes[:'authors']).is_a?(Array)
220
- self.authors = value
221
- end
222
- end
223
-
224
- if attributes.key?(:'contents')
225
- if (value = attributes[:'contents']).is_a?(Array)
226
- self.contents = value
227
- end
228
- end
229
-
230
- if attributes.key?(:'dependencies')
231
- if (value = attributes[:'dependencies']).is_a?(Hash)
232
- self.dependencies = value
233
- end
234
- end
235
-
236
- if attributes.key?(:'description')
237
- self.description = attributes[:'description']
238
- end
239
-
240
- if attributes.key?(:'docs_blob')
241
- if (value = attributes[:'docs_blob']).is_a?(Hash)
242
- self.docs_blob = value
243
- end
244
- end
245
-
246
- if attributes.key?(:'documentation')
247
- self.documentation = attributes[:'documentation']
248
- end
249
-
250
- if attributes.key?(:'homepage')
251
- self.homepage = attributes[:'homepage']
252
- end
253
-
254
- if attributes.key?(:'issues')
255
- self.issues = attributes[:'issues']
256
- end
257
-
258
- if attributes.key?(:'certification')
259
- self.certification = attributes[:'certification']
260
- end
261
-
262
- if attributes.key?(:'license')
263
- if (value = attributes[:'license']).is_a?(Array)
264
- self.license = value
265
- end
266
- end
267
-
268
- if attributes.key?(:'name')
269
- self.name = attributes[:'name']
270
- end
271
-
272
- if attributes.key?(:'namespace')
273
- self.namespace = attributes[:'namespace']
274
- end
275
-
276
- if attributes.key?(:'repository')
277
- self.repository = attributes[:'repository']
278
- end
279
-
280
- if attributes.key?(:'tags')
281
- if (value = attributes[:'tags']).is_a?(Array)
282
- self.tags = value
283
- end
284
- end
285
-
286
- if attributes.key?(:'version')
287
- self.version = attributes[:'version']
288
- end
289
-
290
- if attributes.key?(:'deprecated')
291
- self.deprecated = attributes[:'deprecated']
292
- end
293
- end
294
-
295
- # Show invalid properties with the reasons. Usually used together with valid?
296
- # @return Array for valid properties with the reasons
297
- def list_invalid_properties
298
- invalid_properties = Array.new
299
- if @artifact.nil?
300
- invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
301
- end
302
-
303
- if !@md5.nil? && @md5.to_s.length < 1
304
- invalid_properties.push('invalid value for "md5", the character length must be great than or equal to 1.')
305
- end
306
-
307
- if !@sha1.nil? && @sha1.to_s.length < 1
308
- invalid_properties.push('invalid value for "sha1", the character length must be great than or equal to 1.')
309
- end
310
-
311
- if !@sha224.nil? && @sha224.to_s.length < 1
312
- invalid_properties.push('invalid value for "sha224", the character length must be great than or equal to 1.')
313
- end
314
-
315
- if !@sha256.nil? && @sha256.to_s.length < 1
316
- invalid_properties.push('invalid value for "sha256", the character length must be great than or equal to 1.')
317
- end
318
-
319
- if !@sha384.nil? && @sha384.to_s.length < 1
320
- invalid_properties.push('invalid value for "sha384", the character length must be great than or equal to 1.')
321
- end
322
-
323
- if !@sha512.nil? && @sha512.to_s.length < 1
324
- invalid_properties.push('invalid value for "sha512", the character length must be great than or equal to 1.')
325
- end
326
-
327
- if @id.nil?
328
- invalid_properties.push('invalid value for "id", id cannot be nil.')
329
- end
330
-
331
- if @authors.nil?
332
- invalid_properties.push('invalid value for "authors", authors cannot be nil.')
333
- end
334
-
335
- if @contents.nil?
336
- invalid_properties.push('invalid value for "contents", contents cannot be nil.')
337
- end
338
-
339
- if @dependencies.nil?
340
- invalid_properties.push('invalid value for "dependencies", dependencies cannot be nil.')
341
- end
342
-
343
- if @description.nil?
344
- invalid_properties.push('invalid value for "description", description cannot be nil.')
345
- end
346
-
347
- if @docs_blob.nil?
348
- invalid_properties.push('invalid value for "docs_blob", docs_blob cannot be nil.')
349
- end
350
-
351
- if @documentation.nil?
352
- invalid_properties.push('invalid value for "documentation", documentation cannot be nil.')
353
- end
354
-
355
- if @documentation.to_s.length > 2000
356
- invalid_properties.push('invalid value for "documentation", the character length must be smaller than or equal to 2000.')
357
- end
358
-
359
- if @homepage.nil?
360
- invalid_properties.push('invalid value for "homepage", homepage cannot be nil.')
361
- end
362
-
363
- if @homepage.to_s.length > 2000
364
- invalid_properties.push('invalid value for "homepage", the character length must be smaller than or equal to 2000.')
365
- end
366
-
367
- if @issues.nil?
368
- invalid_properties.push('invalid value for "issues", issues cannot be nil.')
369
- end
370
-
371
- if @issues.to_s.length > 2000
372
- invalid_properties.push('invalid value for "issues", the character length must be smaller than or equal to 2000.')
373
- end
374
-
375
- if @certification.nil?
376
- invalid_properties.push('invalid value for "certification", certification cannot be nil.')
377
- end
378
-
379
- if @certification.to_s.length < 1
380
- invalid_properties.push('invalid value for "certification", the character length must be great than or equal to 1.')
381
- end
382
-
383
- if @license.nil?
384
- invalid_properties.push('invalid value for "license", license cannot be nil.')
385
- end
386
-
387
- if @name.nil?
388
- invalid_properties.push('invalid value for "name", name cannot be nil.')
389
- end
390
-
391
- if @name.to_s.length > 32
392
- invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 32.')
393
- end
394
-
395
- if @name.to_s.length < 1
396
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
397
- end
398
-
399
- if @namespace.nil?
400
- invalid_properties.push('invalid value for "namespace", namespace cannot be nil.')
401
- end
402
-
403
- if @namespace.to_s.length > 32
404
- invalid_properties.push('invalid value for "namespace", the character length must be smaller than or equal to 32.')
405
- end
406
-
407
- if @namespace.to_s.length < 1
408
- invalid_properties.push('invalid value for "namespace", the character length must be great than or equal to 1.')
409
- end
410
-
411
- if @repository.nil?
412
- invalid_properties.push('invalid value for "repository", repository cannot be nil.')
413
- end
414
-
415
- if @repository.to_s.length > 2000
416
- invalid_properties.push('invalid value for "repository", the character length must be smaller than or equal to 2000.')
417
- end
418
-
419
- if @version.nil?
420
- invalid_properties.push('invalid value for "version", version cannot be nil.')
421
- end
422
-
423
- if @version.to_s.length > 32
424
- invalid_properties.push('invalid value for "version", the character length must be smaller than or equal to 32.')
425
- end
426
-
427
- if @version.to_s.length < 1
428
- invalid_properties.push('invalid value for "version", the character length must be great than or equal to 1.')
429
- end
430
-
431
- invalid_properties
432
- end
433
-
434
- # Check to see if the all the properties in the model are valid
435
- # @return true if the model is valid
436
- def valid?
437
- return false if @artifact.nil?
438
- return false if !@md5.nil? && @md5.to_s.length < 1
439
- return false if !@sha1.nil? && @sha1.to_s.length < 1
440
- return false if !@sha224.nil? && @sha224.to_s.length < 1
441
- return false if !@sha256.nil? && @sha256.to_s.length < 1
442
- return false if !@sha384.nil? && @sha384.to_s.length < 1
443
- return false if !@sha512.nil? && @sha512.to_s.length < 1
444
- return false if @id.nil?
445
- return false if @authors.nil?
446
- return false if @contents.nil?
447
- return false if @dependencies.nil?
448
- return false if @description.nil?
449
- return false if @docs_blob.nil?
450
- return false if @documentation.nil?
451
- return false if @documentation.to_s.length > 2000
452
- return false if @homepage.nil?
453
- return false if @homepage.to_s.length > 2000
454
- return false if @issues.nil?
455
- return false if @issues.to_s.length > 2000
456
- return false if @certification.nil?
457
- return false if @certification.to_s.length < 1
458
- return false if @license.nil?
459
- return false if @name.nil?
460
- return false if @name.to_s.length > 32
461
- return false if @name.to_s.length < 1
462
- return false if @namespace.nil?
463
- return false if @namespace.to_s.length > 32
464
- return false if @namespace.to_s.length < 1
465
- return false if @repository.nil?
466
- return false if @repository.to_s.length > 2000
467
- return false if @version.nil?
468
- return false if @version.to_s.length > 32
469
- return false if @version.to_s.length < 1
470
- true
471
- end
472
-
473
- # Custom attribute writer method with validation
474
- # @param [Object] md5 Value to be assigned
475
- def md5=(md5)
476
- if !md5.nil? && md5.to_s.length < 1
477
- fail ArgumentError, 'invalid value for "md5", the character length must be great than or equal to 1.'
478
- end
479
-
480
- @md5 = md5
481
- end
482
-
483
- # Custom attribute writer method with validation
484
- # @param [Object] sha1 Value to be assigned
485
- def sha1=(sha1)
486
- if !sha1.nil? && sha1.to_s.length < 1
487
- fail ArgumentError, 'invalid value for "sha1", the character length must be great than or equal to 1.'
488
- end
489
-
490
- @sha1 = sha1
491
- end
492
-
493
- # Custom attribute writer method with validation
494
- # @param [Object] sha224 Value to be assigned
495
- def sha224=(sha224)
496
- if !sha224.nil? && sha224.to_s.length < 1
497
- fail ArgumentError, 'invalid value for "sha224", the character length must be great than or equal to 1.'
498
- end
499
-
500
- @sha224 = sha224
501
- end
502
-
503
- # Custom attribute writer method with validation
504
- # @param [Object] sha256 Value to be assigned
505
- def sha256=(sha256)
506
- if !sha256.nil? && sha256.to_s.length < 1
507
- fail ArgumentError, 'invalid value for "sha256", the character length must be great than or equal to 1.'
508
- end
509
-
510
- @sha256 = sha256
511
- end
512
-
513
- # Custom attribute writer method with validation
514
- # @param [Object] sha384 Value to be assigned
515
- def sha384=(sha384)
516
- if !sha384.nil? && sha384.to_s.length < 1
517
- fail ArgumentError, 'invalid value for "sha384", the character length must be great than or equal to 1.'
518
- end
519
-
520
- @sha384 = sha384
521
- end
522
-
523
- # Custom attribute writer method with validation
524
- # @param [Object] sha512 Value to be assigned
525
- def sha512=(sha512)
526
- if !sha512.nil? && sha512.to_s.length < 1
527
- fail ArgumentError, 'invalid value for "sha512", the character length must be great than or equal to 1.'
528
- end
529
-
530
- @sha512 = sha512
531
- end
532
-
533
- # Custom attribute writer method with validation
534
- # @param [Object] documentation Value to be assigned
535
- def documentation=(documentation)
536
- if documentation.nil?
537
- fail ArgumentError, 'documentation cannot be nil'
538
- end
539
-
540
- if documentation.to_s.length > 2000
541
- fail ArgumentError, 'invalid value for "documentation", the character length must be smaller than or equal to 2000.'
542
- end
543
-
544
- @documentation = documentation
545
- end
546
-
547
- # Custom attribute writer method with validation
548
- # @param [Object] homepage Value to be assigned
549
- def homepage=(homepage)
550
- if homepage.nil?
551
- fail ArgumentError, 'homepage cannot be nil'
552
- end
553
-
554
- if homepage.to_s.length > 2000
555
- fail ArgumentError, 'invalid value for "homepage", the character length must be smaller than or equal to 2000.'
556
- end
557
-
558
- @homepage = homepage
559
- end
560
-
561
- # Custom attribute writer method with validation
562
- # @param [Object] issues Value to be assigned
563
- def issues=(issues)
564
- if issues.nil?
565
- fail ArgumentError, 'issues cannot be nil'
566
- end
567
-
568
- if issues.to_s.length > 2000
569
- fail ArgumentError, 'invalid value for "issues", the character length must be smaller than or equal to 2000.'
570
- end
571
-
572
- @issues = issues
573
- end
574
-
575
- # Custom attribute writer method with validation
576
- # @param [Object] certification Value to be assigned
577
- def certification=(certification)
578
- if certification.nil?
579
- fail ArgumentError, 'certification cannot be nil'
580
- end
581
-
582
- if certification.to_s.length < 1
583
- fail ArgumentError, 'invalid value for "certification", the character length must be great than or equal to 1.'
584
- end
585
-
586
- @certification = certification
587
- end
588
-
589
- # Custom attribute writer method with validation
590
- # @param [Object] name Value to be assigned
591
- def name=(name)
592
- if name.nil?
593
- fail ArgumentError, 'name cannot be nil'
594
- end
595
-
596
- if name.to_s.length > 32
597
- fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 32.'
598
- end
599
-
600
- if name.to_s.length < 1
601
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
602
- end
603
-
604
- @name = name
605
- end
606
-
607
- # Custom attribute writer method with validation
608
- # @param [Object] namespace Value to be assigned
609
- def namespace=(namespace)
610
- if namespace.nil?
611
- fail ArgumentError, 'namespace cannot be nil'
612
- end
613
-
614
- if namespace.to_s.length > 32
615
- fail ArgumentError, 'invalid value for "namespace", the character length must be smaller than or equal to 32.'
616
- end
617
-
618
- if namespace.to_s.length < 1
619
- fail ArgumentError, 'invalid value for "namespace", the character length must be great than or equal to 1.'
620
- end
621
-
622
- @namespace = namespace
623
- end
624
-
625
- # Custom attribute writer method with validation
626
- # @param [Object] repository Value to be assigned
627
- def repository=(repository)
628
- if repository.nil?
629
- fail ArgumentError, 'repository cannot be nil'
630
- end
631
-
632
- if repository.to_s.length > 2000
633
- fail ArgumentError, 'invalid value for "repository", the character length must be smaller than or equal to 2000.'
634
- end
635
-
636
- @repository = repository
637
- end
638
-
639
- # Custom attribute writer method with validation
640
- # @param [Object] version Value to be assigned
641
- def version=(version)
642
- if version.nil?
643
- fail ArgumentError, 'version cannot be nil'
644
- end
645
-
646
- if version.to_s.length > 32
647
- fail ArgumentError, 'invalid value for "version", the character length must be smaller than or equal to 32.'
648
- end
649
-
650
- if version.to_s.length < 1
651
- fail ArgumentError, 'invalid value for "version", the character length must be great than or equal to 1.'
652
- end
653
-
654
- @version = version
655
- end
656
-
657
- # Checks equality by comparing each attribute.
658
- # @param [Object] Object to be compared
659
- def ==(o)
660
- return true if self.equal?(o)
661
- self.class == o.class &&
662
- pulp_href == o.pulp_href &&
663
- artifact == o.artifact &&
664
- pulp_created == o.pulp_created &&
665
- md5 == o.md5 &&
666
- sha1 == o.sha1 &&
667
- sha224 == o.sha224 &&
668
- sha256 == o.sha256 &&
669
- sha384 == o.sha384 &&
670
- sha512 == o.sha512 &&
671
- id == o.id &&
672
- authors == o.authors &&
673
- contents == o.contents &&
674
- dependencies == o.dependencies &&
675
- description == o.description &&
676
- docs_blob == o.docs_blob &&
677
- documentation == o.documentation &&
678
- homepage == o.homepage &&
679
- issues == o.issues &&
680
- certification == o.certification &&
681
- license == o.license &&
682
- name == o.name &&
683
- namespace == o.namespace &&
684
- repository == o.repository &&
685
- tags == o.tags &&
686
- version == o.version &&
687
- deprecated == o.deprecated
688
- end
689
-
690
- # @see the `==` method
691
- # @param [Object] Object to be compared
692
- def eql?(o)
693
- self == o
694
- end
695
-
696
- # Calculates hash code according to all attributes.
697
- # @return [Integer] Hash code
698
- def hash
699
- [pulp_href, artifact, pulp_created, md5, sha1, sha224, sha256, sha384, sha512, id, authors, contents, dependencies, description, docs_blob, documentation, homepage, issues, certification, license, name, namespace, repository, tags, version, deprecated].hash
700
- end
701
-
702
- # Builds the object from hash
703
- # @param [Hash] attributes Model attributes in the form of hash
704
- # @return [Object] Returns the model itself
705
- def self.build_from_hash(attributes)
706
- new.build_from_hash(attributes)
707
- end
708
-
709
- # Builds the object from hash
710
- # @param [Hash] attributes Model attributes in the form of hash
711
- # @return [Object] Returns the model itself
712
- def build_from_hash(attributes)
713
- return nil unless attributes.is_a?(Hash)
714
- self.class.openapi_types.each_pair do |key, type|
715
- if type =~ /\AArray<(.*)>/i
716
- # check to ensure the input is an array given that the attribute
717
- # is documented as an array but the input is not
718
- if attributes[self.class.attribute_map[key]].is_a?(Array)
719
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
720
- end
721
- elsif !attributes[self.class.attribute_map[key]].nil?
722
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
723
- end # or else data not found in attributes(hash), not an issue as the data can be optional
724
- end
725
-
726
- self
727
- end
728
-
729
- # Deserializes the data based on type
730
- # @param string type Data type
731
- # @param string value Value to be deserialized
732
- # @return [Object] Deserialized data
733
- def _deserialize(type, value)
734
- case type.to_sym
735
- when :DateTime
736
- DateTime.parse(value)
737
- when :Date
738
- Date.parse(value)
739
- when :String
740
- value.to_s
741
- when :Integer
742
- value.to_i
743
- when :Float
744
- value.to_f
745
- when :Boolean
746
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
747
- true
748
- else
749
- false
750
- end
751
- when :Object
752
- # generic object (usually a Hash), return directly
753
- value
754
- when /\AArray<(?<inner_type>.+)>\z/
755
- inner_type = Regexp.last_match[:inner_type]
756
- value.map { |v| _deserialize(inner_type, v) }
757
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
758
- k_type = Regexp.last_match[:k_type]
759
- v_type = Regexp.last_match[:v_type]
760
- {}.tap do |hash|
761
- value.each do |k, v|
762
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
763
- end
764
- end
765
- else # model
766
- PulpAnsibleClient.const_get(type).build_from_hash(value)
767
- end
768
- end
769
-
770
- # Returns the string representation of the object
771
- # @return [String] String presentation of the object
772
- def to_s
773
- to_hash.to_s
774
- end
775
-
776
- # to_body is an alias to to_hash (backward compatibility)
777
- # @return [Hash] Returns the object in the form of hash
778
- def to_body
779
- to_hash
780
- end
781
-
782
- # Returns the object in the form of hash
783
- # @return [Hash] Returns the object in the form of hash
784
- def to_hash
785
- hash = {}
786
- self.class.attribute_map.each_pair do |attr, param|
787
- value = self.send(attr)
788
- if value.nil?
789
- is_nullable = self.class.openapi_nullable.include?(attr)
790
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
791
- end
792
-
793
- hash[param] = _to_hash(value)
794
- end
795
- hash
796
- end
797
-
798
- # Outputs non-array value in the form of hash
799
- # For object, use to_hash. Otherwise, just return the value
800
- # @param [Object] value Any valid value
801
- # @return [Hash] Returns the value in the form of hash
802
- def _to_hash(value)
803
- if value.is_a?(Array)
804
- value.compact.map { |v| _to_hash(v) }
805
- elsif value.is_a?(Hash)
806
- {}.tap do |hash|
807
- value.each { |k, v| hash[k] = _to_hash(v) }
808
- end
809
- elsif value.respond_to? :to_hash
810
- value.to_hash
811
- else
812
- value
813
- end
814
- end
815
- end
816
- end