pulp_ansible_client 0.2.0b5 → 0.2.0b6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +43 -23
  3. data/docs/{AnsibleDistribution.md → AnsibleAnsibleDistribution.md} +6 -6
  4. data/docs/AnsibleAnsibleRemote.md +39 -0
  5. data/docs/AnsibleAnsibleRepository.md +27 -0
  6. data/docs/AnsibleCollection.md +19 -0
  7. data/docs/AnsibleCollectionRemote.md +41 -0
  8. data/docs/AnsibleCollectionVersion.md +67 -0
  9. data/docs/AnsibleCollectionsApi.md +80 -18
  10. data/docs/AnsibleRole.md +27 -0
  11. data/docs/AnsibleTag.md +17 -0
  12. data/docs/Collection.md +31 -0
  13. data/docs/CollectionImportDetail.md +2 -2
  14. data/docs/CollectionMetadata.md +9 -9
  15. data/docs/{TagNested.md → CollectionNamespace.md} +3 -3
  16. data/docs/CollectionRef.md +21 -0
  17. data/docs/CollectionVersion.md +19 -59
  18. data/docs/ContentCollectionVersionsApi.md +25 -27
  19. data/docs/ContentRolesApi.md +17 -25
  20. data/docs/ContentSummary.md +21 -0
  21. data/docs/DistributionsAnsibleApi.md +16 -12
  22. data/docs/GalaxyCollection.md +2 -2
  23. data/docs/GalaxyCollectionVersion.md +4 -4
  24. data/docs/GalaxyRole.md +1 -1
  25. data/docs/GalaxyRoleVersion.md +1 -1
  26. data/docs/InlineResponse200.md +1 -1
  27. data/docs/InlineResponse2001.md +1 -1
  28. data/docs/InlineResponse20010.md +23 -0
  29. data/docs/InlineResponse20011.md +23 -0
  30. data/docs/InlineResponse20012.md +23 -0
  31. data/docs/InlineResponse20013.md +23 -0
  32. data/docs/InlineResponse2002.md +1 -1
  33. data/docs/InlineResponse2003.md +1 -1
  34. data/docs/InlineResponse2004.md +1 -1
  35. data/docs/InlineResponse2005.md +1 -1
  36. data/docs/InlineResponse2006.md +1 -1
  37. data/docs/InlineResponse2007.md +1 -1
  38. data/docs/InlineResponse2008.md +1 -1
  39. data/docs/InlineResponse2009.md +1 -1
  40. data/docs/PulpAnsibleApiApi.md +3 -1
  41. data/docs/PulpAnsibleGalaxyApiCollectionsApi.md +16 -9
  42. data/docs/PulpAnsibleGalaxyApiRolesApi.md +5 -3
  43. data/docs/PulpAnsibleGalaxyApiV1VersionsApi.md +5 -3
  44. data/docs/PulpAnsibleGalaxyApiV2VersionsApi.md +5 -3
  45. data/docs/PulpAnsibleGalaxyApiV3CollectionsApi.md +28 -10
  46. data/docs/PulpAnsibleTagsApi.md +5 -3
  47. data/docs/RemotesAnsibleApi.md +30 -81
  48. data/docs/RemotesCollectionApi.md +30 -81
  49. data/docs/RepositoriesAnsibleApi.md +409 -0
  50. data/docs/RepositoriesAnsibleVersionsApi.md +214 -0
  51. data/docs/RepositorySyncURL.md +2 -2
  52. data/docs/RepositoryVersion.md +25 -0
  53. data/docs/Tag.md +1 -1
  54. data/lib/pulp_ansible_client/api/ansible_collections_api.rb +103 -35
  55. data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +40 -57
  56. data/lib/pulp_ansible_client/api/content_roles_api.rb +28 -58
  57. data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +19 -13
  58. data/lib/pulp_ansible_client/api/pulp_ansible_api_api.rb +4 -1
  59. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_collections_api.rb +20 -9
  60. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_roles_api.rb +7 -4
  61. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v1_versions_api.rb +7 -4
  62. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v2_versions_api.rb +7 -4
  63. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_collections_api.rb +59 -12
  64. data/lib/pulp_ansible_client/api/pulp_ansible_tags_api.rb +7 -4
  65. data/lib/pulp_ansible_client/api/remotes_ansible_api.rb +40 -102
  66. data/lib/pulp_ansible_client/api/remotes_collection_api.rb +40 -102
  67. data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +498 -0
  68. data/lib/pulp_ansible_client/api/repositories_ansible_versions_api.rb +268 -0
  69. data/lib/pulp_ansible_client/api_client.rb +1 -1
  70. data/lib/pulp_ansible_client/api_error.rb +1 -1
  71. data/lib/pulp_ansible_client/configuration.rb +1 -1
  72. data/lib/pulp_ansible_client/models/{ansible_distribution.rb → ansible_ansible_distribution.rb} +31 -36
  73. data/lib/pulp_ansible_client/models/{ansible_remote.rb → ansible_ansible_remote.rb} +87 -147
  74. data/lib/pulp_ansible_client/models/ansible_ansible_repository.rb +294 -0
  75. data/lib/pulp_ansible_client/models/ansible_collection.rb +265 -0
  76. data/lib/pulp_ansible_client/models/{collection_remote.rb → ansible_collection_remote.rb} +88 -147
  77. data/lib/pulp_ansible_client/models/ansible_collection_version.rb +816 -0
  78. data/lib/pulp_ansible_client/models/{role.rb → ansible_role.rb} +31 -60
  79. data/lib/pulp_ansible_client/models/{tag_nested.rb → ansible_tag.rb} +15 -5
  80. data/lib/pulp_ansible_client/models/async_operation_response.rb +12 -2
  81. data/lib/pulp_ansible_client/models/collection.rb +314 -0
  82. data/lib/pulp_ansible_client/models/collection_import_detail.rb +14 -4
  83. data/lib/pulp_ansible_client/models/collection_metadata.rb +14 -4
  84. data/lib/pulp_ansible_client/models/collection_namespace.rb +230 -0
  85. data/lib/pulp_ansible_client/models/collection_ref.rb +272 -0
  86. data/lib/pulp_ansible_client/models/collection_version.rb +109 -536
  87. data/lib/pulp_ansible_client/models/content_summary.rb +246 -0
  88. data/lib/pulp_ansible_client/models/galaxy_collection.rb +12 -2
  89. data/lib/pulp_ansible_client/models/galaxy_collection_version.rb +12 -2
  90. data/lib/pulp_ansible_client/models/galaxy_role.rb +12 -2
  91. data/lib/pulp_ansible_client/models/galaxy_role_version.rb +12 -2
  92. data/lib/pulp_ansible_client/models/inline_response200.rb +15 -3
  93. data/lib/pulp_ansible_client/models/inline_response2001.rb +15 -3
  94. data/lib/pulp_ansible_client/models/inline_response20010.rb +247 -0
  95. data/lib/pulp_ansible_client/models/inline_response20011.rb +247 -0
  96. data/lib/pulp_ansible_client/models/inline_response20012.rb +247 -0
  97. data/lib/pulp_ansible_client/models/inline_response20013.rb +247 -0
  98. data/lib/pulp_ansible_client/models/inline_response2002.rb +15 -3
  99. data/lib/pulp_ansible_client/models/inline_response2003.rb +15 -3
  100. data/lib/pulp_ansible_client/models/inline_response2004.rb +15 -3
  101. data/lib/pulp_ansible_client/models/inline_response2005.rb +15 -3
  102. data/lib/pulp_ansible_client/models/inline_response2006.rb +15 -3
  103. data/lib/pulp_ansible_client/models/inline_response2007.rb +15 -3
  104. data/lib/pulp_ansible_client/models/inline_response2008.rb +15 -3
  105. data/lib/pulp_ansible_client/models/inline_response2009.rb +15 -3
  106. data/lib/pulp_ansible_client/models/repository_sync_url.rb +22 -12
  107. data/lib/pulp_ansible_client/models/repository_version.rb +244 -0
  108. data/lib/pulp_ansible_client/models/tag.rb +12 -2
  109. data/lib/pulp_ansible_client/version.rb +2 -2
  110. data/lib/pulp_ansible_client.rb +20 -6
  111. data/pulp_ansible_client.gemspec +1 -1
  112. data/spec/api/ansible_collections_api_spec.rb +25 -10
  113. data/spec/api/content_collection_versions_api_spec.rb +12 -12
  114. data/spec/api/content_roles_api_spec.rb +8 -11
  115. data/spec/api/distributions_ansible_api_spec.rb +5 -3
  116. data/spec/api/pulp_ansible_api_api_spec.rb +2 -1
  117. data/spec/api/pulp_ansible_galaxy_api_collections_api_spec.rb +6 -3
  118. data/spec/api/pulp_ansible_galaxy_api_roles_api_spec.rb +3 -2
  119. data/spec/api/pulp_ansible_galaxy_api_v1_versions_api_spec.rb +3 -2
  120. data/spec/api/pulp_ansible_galaxy_api_v2_versions_api_spec.rb +3 -2
  121. data/spec/api/pulp_ansible_galaxy_api_v3_collections_api_spec.rb +12 -4
  122. data/spec/api/pulp_ansible_tags_api_spec.rb +3 -2
  123. data/spec/api/remotes_ansible_api_spec.rb +12 -22
  124. data/spec/api/remotes_collection_api_spec.rb +12 -22
  125. data/spec/api/repositories_ansible_api_spec.rb +128 -0
  126. data/spec/api/repositories_ansible_versions_api_spec.rb +91 -0
  127. data/spec/api_client_spec.rb +2 -2
  128. data/spec/configuration_spec.rb +1 -1
  129. data/spec/models/{ansible_distribution_spec.rb → ansible_ansible_distribution_spec.rb} +9 -9
  130. data/spec/models/{collection_remote_spec.rb → ansible_ansible_remote_spec.rb} +14 -38
  131. data/spec/models/ansible_ansible_repository_spec.rb +71 -0
  132. data/spec/models/{ansible_remote_spec.rb → ansible_collection_remote_spec.rb} +20 -32
  133. data/spec/models/ansible_collection_spec.rb +47 -0
  134. data/spec/models/ansible_collection_version_spec.rb +191 -0
  135. data/spec/models/ansible_role_spec.rb +71 -0
  136. data/spec/models/{tag_nested_spec.rb → ansible_tag_spec.rb} +7 -7
  137. data/spec/models/async_operation_response_spec.rb +1 -1
  138. data/spec/models/collection_import_detail_spec.rb +1 -1
  139. data/spec/models/collection_metadata_spec.rb +1 -1
  140. data/spec/models/collection_namespace_spec.rb +41 -0
  141. data/spec/models/collection_ref_spec.rb +53 -0
  142. data/spec/models/{role_spec.rb → collection_spec.rb} +15 -21
  143. data/spec/models/collection_version_spec.rb +14 -130
  144. data/spec/models/content_summary_spec.rb +53 -0
  145. data/spec/models/galaxy_collection_spec.rb +1 -1
  146. data/spec/models/galaxy_collection_version_spec.rb +1 -1
  147. data/spec/models/galaxy_role_spec.rb +1 -1
  148. data/spec/models/galaxy_role_version_spec.rb +1 -1
  149. data/spec/models/inline_response20010_spec.rb +59 -0
  150. data/spec/models/inline_response20011_spec.rb +59 -0
  151. data/spec/models/inline_response20012_spec.rb +59 -0
  152. data/spec/models/inline_response20013_spec.rb +59 -0
  153. data/spec/models/inline_response2001_spec.rb +1 -1
  154. data/spec/models/inline_response2002_spec.rb +1 -1
  155. data/spec/models/inline_response2003_spec.rb +1 -1
  156. data/spec/models/inline_response2004_spec.rb +1 -1
  157. data/spec/models/inline_response2005_spec.rb +1 -1
  158. data/spec/models/inline_response2006_spec.rb +1 -1
  159. data/spec/models/inline_response2007_spec.rb +1 -1
  160. data/spec/models/inline_response2008_spec.rb +1 -1
  161. data/spec/models/inline_response2009_spec.rb +1 -1
  162. data/spec/models/inline_response200_spec.rb +1 -1
  163. data/spec/models/repository_sync_url_spec.rb +2 -2
  164. data/spec/models/repository_version_spec.rb +65 -0
  165. data/spec/models/tag_spec.rb +1 -1
  166. data/spec/spec_helper.rb +1 -1
  167. metadata +78 -22
  168. data/docs/AnsibleRemote.md +0 -45
  169. data/docs/CollectionRemote.md +0 -47
  170. data/docs/Role.md +0 -33
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -14,170 +14,90 @@ require 'date'
14
14
 
15
15
  module PulpAnsibleClient
16
16
  class CollectionVersion
17
- attr_accessor :_href
18
-
19
- # Timestamp of creation.
20
- attr_accessor :_created
21
-
22
- attr_accessor :_type
23
-
24
- # Artifact file representing the physical content
25
- attr_accessor :artifact
26
-
27
- # Path where the artifact is located relative to distributions base_path
28
- attr_accessor :relative_path
29
-
30
- # An uploaded file that should be turned into the artifact of the content unit.
31
- attr_accessor :file
32
-
33
- # A URI of a repository the new content unit should be associated with.
34
- attr_accessor :repository
35
-
36
- # The MD5 checksum if available.
37
- attr_accessor :md5
38
-
39
- # The SHA-1 checksum if available.
40
- attr_accessor :sha1
41
-
42
- # The SHA-224 checksum if available.
43
- attr_accessor :sha224
44
-
45
- # The SHA-256 checksum if available.
46
- attr_accessor :sha256
47
-
48
- # The SHA-384 checksum if available.
49
- attr_accessor :sha384
50
-
51
- # The SHA-512 checksum if available.
52
- attr_accessor :sha512
53
-
54
- # A collection identifier.
55
- attr_accessor :id
56
-
57
- # A list of the CollectionVersion content's authors.
58
- attr_accessor :authors
59
-
60
- # A JSON field with data about the contents.
61
- attr_accessor :contents
62
-
63
- # A dict declaring Collections that this collection requires to be installed for it to be usable.
64
- attr_accessor :dependencies
17
+ attr_accessor :version
65
18
 
66
- # A short summary description of the collection.
67
- attr_accessor :description
19
+ attr_accessor :certification
68
20
 
69
- # A JSON field holding the various documentation blobs in the collection.
70
- attr_accessor :docs_blob
21
+ attr_accessor :href
71
22
 
72
- # The URL to any online docs.
73
- attr_accessor :documentation
23
+ attr_accessor :created_at
74
24
 
75
- # The URL to the homepage of the collection/project.
76
- attr_accessor :homepage
25
+ attr_accessor :updated_at
77
26
 
78
- # The URL to the collection issue tracker.
79
- attr_accessor :issues
27
+ attr_accessor :artifact
80
28
 
81
- # Indicates that the version is certified
82
- attr_accessor :is_certified
29
+ attr_accessor :collection
83
30
 
84
- # A list of licenses for content inside of a collection.
85
- attr_accessor :license
31
+ attr_accessor :download_url
86
32
 
87
- # The name of the collection.
88
33
  attr_accessor :name
89
34
 
90
- # The namespace of the collection.
91
35
  attr_accessor :namespace
92
36
 
93
- attr_accessor :tags
94
-
95
- # The version of the collection.
96
- attr_accessor :version
97
-
98
- # The expected 'name' of the Collection to be verified against the metadata during import.
99
- attr_accessor :expected_name
100
-
101
- # The expected 'namespace' of the Collection to be verified against the metadata during import.
102
- attr_accessor :expected_namespace
37
+ attr_accessor :metadata
38
+
39
+ class EnumAttributeValidator
40
+ attr_reader :datatype
41
+ attr_reader :allowable_values
42
+
43
+ def initialize(datatype, allowable_values)
44
+ @allowable_values = allowable_values.map do |value|
45
+ case datatype.to_s
46
+ when /Integer/i
47
+ value.to_i
48
+ when /Float/i
49
+ value.to_f
50
+ else
51
+ value
52
+ end
53
+ end
54
+ end
103
55
 
104
- # The expected version of the Collection to be verified against the metadata during import.
105
- attr_accessor :expected_version
56
+ def valid?(value)
57
+ !value || allowable_values.include?(value)
58
+ end
59
+ end
106
60
 
107
61
  # Attribute mapping from ruby-style variable name to JSON key.
108
62
  def self.attribute_map
109
63
  {
110
- :'_href' => :'_href',
111
- :'_created' => :'_created',
112
- :'_type' => :'_type',
64
+ :'version' => :'version',
65
+ :'certification' => :'certification',
66
+ :'href' => :'href',
67
+ :'created_at' => :'created_at',
68
+ :'updated_at' => :'updated_at',
113
69
  :'artifact' => :'artifact',
114
- :'relative_path' => :'relative_path',
115
- :'file' => :'file',
116
- :'repository' => :'repository',
117
- :'md5' => :'md5',
118
- :'sha1' => :'sha1',
119
- :'sha224' => :'sha224',
120
- :'sha256' => :'sha256',
121
- :'sha384' => :'sha384',
122
- :'sha512' => :'sha512',
123
- :'id' => :'id',
124
- :'authors' => :'authors',
125
- :'contents' => :'contents',
126
- :'dependencies' => :'dependencies',
127
- :'description' => :'description',
128
- :'docs_blob' => :'docs_blob',
129
- :'documentation' => :'documentation',
130
- :'homepage' => :'homepage',
131
- :'issues' => :'issues',
132
- :'is_certified' => :'is_certified',
133
- :'license' => :'license',
70
+ :'collection' => :'collection',
71
+ :'download_url' => :'download_url',
134
72
  :'name' => :'name',
135
73
  :'namespace' => :'namespace',
136
- :'tags' => :'tags',
137
- :'version' => :'version',
138
- :'expected_name' => :'expected_name',
139
- :'expected_namespace' => :'expected_namespace',
140
- :'expected_version' => :'expected_version'
74
+ :'metadata' => :'metadata'
141
75
  }
142
76
  end
143
77
 
144
78
  # Attribute type mapping.
145
79
  def self.openapi_types
146
80
  {
147
- :'_href' => :'String',
148
- :'_created' => :'DateTime',
149
- :'_type' => :'String',
81
+ :'version' => :'String',
82
+ :'certification' => :'String',
83
+ :'href' => :'String',
84
+ :'created_at' => :'DateTime',
85
+ :'updated_at' => :'DateTime',
150
86
  :'artifact' => :'String',
151
- :'relative_path' => :'String',
152
- :'file' => :'String',
153
- :'repository' => :'String',
154
- :'md5' => :'String',
155
- :'sha1' => :'String',
156
- :'sha224' => :'String',
157
- :'sha256' => :'String',
158
- :'sha384' => :'String',
159
- :'sha512' => :'String',
160
- :'id' => :'String',
161
- :'authors' => :'Array<String>',
162
- :'contents' => :'Array<Hash<String, String>>',
163
- :'dependencies' => :'Hash<String, String>',
164
- :'description' => :'String',
165
- :'docs_blob' => :'Hash<String, String>',
166
- :'documentation' => :'String',
167
- :'homepage' => :'String',
168
- :'issues' => :'String',
169
- :'is_certified' => :'Boolean',
170
- :'license' => :'Array<String>',
87
+ :'collection' => :'CollectionRef',
88
+ :'download_url' => :'String',
171
89
  :'name' => :'String',
172
- :'namespace' => :'String',
173
- :'tags' => :'Array<TagNested>',
174
- :'version' => :'String',
175
- :'expected_name' => :'String',
176
- :'expected_namespace' => :'String',
177
- :'expected_version' => :'String'
90
+ :'namespace' => :'CollectionNamespace',
91
+ :'metadata' => :'CollectionMetadata'
178
92
  }
179
93
  end
180
94
 
95
+ # List of attributes with nullable: true
96
+ def self.openapi_nullable
97
+ Set.new([
98
+ ])
99
+ end
100
+
181
101
  # Initializes the object
182
102
  # @param [Hash] attributes Model attributes in the form of hash
183
103
  def initialize(attributes = {})
@@ -193,110 +113,36 @@ module PulpAnsibleClient
193
113
  h[k.to_sym] = v
194
114
  }
195
115
 
196
- if attributes.key?(:'_href')
197
- self._href = attributes[:'_href']
198
- end
199
-
200
- if attributes.key?(:'_created')
201
- self._created = attributes[:'_created']
202
- end
203
-
204
- if attributes.key?(:'_type')
205
- self._type = attributes[:'_type']
206
- end
207
-
208
- if attributes.key?(:'artifact')
209
- self.artifact = attributes[:'artifact']
210
- end
211
-
212
- if attributes.key?(:'relative_path')
213
- self.relative_path = attributes[:'relative_path']
214
- end
215
-
216
- if attributes.key?(:'file')
217
- self.file = attributes[:'file']
218
- end
219
-
220
- if attributes.key?(:'repository')
221
- self.repository = attributes[:'repository']
222
- end
223
-
224
- if attributes.key?(:'md5')
225
- self.md5 = attributes[:'md5']
226
- end
227
-
228
- if attributes.key?(:'sha1')
229
- self.sha1 = attributes[:'sha1']
230
- end
231
-
232
- if attributes.key?(:'sha224')
233
- self.sha224 = attributes[:'sha224']
234
- end
235
-
236
- if attributes.key?(:'sha256')
237
- self.sha256 = attributes[:'sha256']
238
- end
239
-
240
- if attributes.key?(:'sha384')
241
- self.sha384 = attributes[:'sha384']
242
- end
243
-
244
- if attributes.key?(:'sha512')
245
- self.sha512 = attributes[:'sha512']
246
- end
247
-
248
- if attributes.key?(:'id')
249
- self.id = attributes[:'id']
250
- end
251
-
252
- if attributes.key?(:'authors')
253
- if (value = attributes[:'authors']).is_a?(Array)
254
- self.authors = value
255
- end
256
- end
257
-
258
- if attributes.key?(:'contents')
259
- if (value = attributes[:'contents']).is_a?(Array)
260
- self.contents = value
261
- end
262
- end
263
-
264
- if attributes.key?(:'dependencies')
265
- if (value = attributes[:'dependencies']).is_a?(Hash)
266
- self.dependencies = value
267
- end
116
+ if attributes.key?(:'version')
117
+ self.version = attributes[:'version']
268
118
  end
269
119
 
270
- if attributes.key?(:'description')
271
- self.description = attributes[:'description']
120
+ if attributes.key?(:'certification')
121
+ self.certification = attributes[:'certification']
272
122
  end
273
123
 
274
- if attributes.key?(:'docs_blob')
275
- if (value = attributes[:'docs_blob']).is_a?(Hash)
276
- self.docs_blob = value
277
- end
124
+ if attributes.key?(:'href')
125
+ self.href = attributes[:'href']
278
126
  end
279
127
 
280
- if attributes.key?(:'documentation')
281
- self.documentation = attributes[:'documentation']
128
+ if attributes.key?(:'created_at')
129
+ self.created_at = attributes[:'created_at']
282
130
  end
283
131
 
284
- if attributes.key?(:'homepage')
285
- self.homepage = attributes[:'homepage']
132
+ if attributes.key?(:'updated_at')
133
+ self.updated_at = attributes[:'updated_at']
286
134
  end
287
135
 
288
- if attributes.key?(:'issues')
289
- self.issues = attributes[:'issues']
136
+ if attributes.key?(:'artifact')
137
+ self.artifact = attributes[:'artifact']
290
138
  end
291
139
 
292
- if attributes.key?(:'is_certified')
293
- self.is_certified = attributes[:'is_certified']
140
+ if attributes.key?(:'collection')
141
+ self.collection = attributes[:'collection']
294
142
  end
295
143
 
296
- if attributes.key?(:'license')
297
- if (value = attributes[:'license']).is_a?(Array)
298
- self.license = value
299
- end
144
+ if attributes.key?(:'download_url')
145
+ self.download_url = attributes[:'download_url']
300
146
  end
301
147
 
302
148
  if attributes.key?(:'name')
@@ -307,26 +153,8 @@ module PulpAnsibleClient
307
153
  self.namespace = attributes[:'namespace']
308
154
  end
309
155
 
310
- if attributes.key?(:'tags')
311
- if (value = attributes[:'tags']).is_a?(Array)
312
- self.tags = value
313
- end
314
- end
315
-
316
- if attributes.key?(:'version')
317
- self.version = attributes[:'version']
318
- end
319
-
320
- if attributes.key?(:'expected_name')
321
- self.expected_name = attributes[:'expected_name']
322
- end
323
-
324
- if attributes.key?(:'expected_namespace')
325
- self.expected_namespace = attributes[:'expected_namespace']
326
- end
327
-
328
- if attributes.key?(:'expected_version')
329
- self.expected_version = attributes[:'expected_version']
156
+ if attributes.key?(:'metadata')
157
+ self.metadata = attributes[:'metadata']
330
158
  end
331
159
  end
332
160
 
@@ -334,88 +162,20 @@ module PulpAnsibleClient
334
162
  # @return Array for valid properties with the reasons
335
163
  def list_invalid_properties
336
164
  invalid_properties = Array.new
337
- if !@_type.nil? && @_type.to_s.length < 1
338
- invalid_properties.push('invalid value for "_type", the character length must be great than or equal to 1.')
339
- end
340
-
341
- if @relative_path.nil?
342
- invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
343
- end
344
-
345
- if @relative_path.to_s.length < 1
346
- invalid_properties.push('invalid value for "relative_path", the character length must be great than or equal to 1.')
347
- end
348
-
349
- if !@md5.nil? && @md5.to_s.length < 1
350
- invalid_properties.push('invalid value for "md5", the character length must be great than or equal to 1.')
351
- end
352
-
353
- if !@sha1.nil? && @sha1.to_s.length < 1
354
- invalid_properties.push('invalid value for "sha1", the character length must be great than or equal to 1.')
355
- end
356
-
357
- if !@sha224.nil? && @sha224.to_s.length < 1
358
- invalid_properties.push('invalid value for "sha224", the character length must be great than or equal to 1.')
359
- end
360
-
361
- if !@sha256.nil? && @sha256.to_s.length < 1
362
- invalid_properties.push('invalid value for "sha256", the character length must be great than or equal to 1.')
363
- end
364
-
365
- if !@sha384.nil? && @sha384.to_s.length < 1
366
- invalid_properties.push('invalid value for "sha384", the character length must be great than or equal to 1.')
367
- end
368
-
369
- if !@sha512.nil? && @sha512.to_s.length < 1
370
- invalid_properties.push('invalid value for "sha512", the character length must be great than or equal to 1.')
371
- end
372
-
373
- if !@documentation.nil? && @documentation.to_s.length > 128
374
- invalid_properties.push('invalid value for "documentation", the character length must be smaller than or equal to 128.')
375
- end
376
-
377
- if !@homepage.nil? && @homepage.to_s.length > 128
378
- invalid_properties.push('invalid value for "homepage", the character length must be smaller than or equal to 128.')
379
- end
380
-
381
- if !@issues.nil? && @issues.to_s.length > 128
382
- invalid_properties.push('invalid value for "issues", the character length must be smaller than or equal to 128.')
383
- end
384
-
385
- if !@name.nil? && @name.to_s.length > 32
386
- invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 32.')
387
- end
388
-
389
- if !@name.nil? && @name.to_s.length < 1
390
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
391
- end
392
-
393
- if !@namespace.nil? && @namespace.to_s.length > 32
394
- invalid_properties.push('invalid value for "namespace", the character length must be smaller than or equal to 32.')
395
- end
396
-
397
- if !@namespace.nil? && @namespace.to_s.length < 1
398
- invalid_properties.push('invalid value for "namespace", the character length must be great than or equal to 1.')
399
- end
400
-
401
- if !@version.nil? && @version.to_s.length > 32
402
- invalid_properties.push('invalid value for "version", the character length must be smaller than or equal to 32.')
403
- end
404
-
405
165
  if !@version.nil? && @version.to_s.length < 1
406
166
  invalid_properties.push('invalid value for "version", the character length must be great than or equal to 1.')
407
167
  end
408
168
 
409
- if !@expected_name.nil? && @expected_name.to_s.length < 1
410
- invalid_properties.push('invalid value for "expected_name", the character length must be great than or equal to 1.')
169
+ if @created_at.nil?
170
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
411
171
  end
412
172
 
413
- if !@expected_namespace.nil? && @expected_namespace.to_s.length < 1
414
- invalid_properties.push('invalid value for "expected_namespace", the character length must be great than or equal to 1.')
173
+ if @updated_at.nil?
174
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
415
175
  end
416
176
 
417
- if !@expected_version.nil? && @expected_version.to_s.length < 1
418
- invalid_properties.push('invalid value for "expected_version", the character length must be great than or equal to 1.')
177
+ if !@name.nil? && @name.to_s.length < 1
178
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
419
179
  end
420
180
 
421
181
  invalid_properties
@@ -424,179 +184,18 @@ module PulpAnsibleClient
424
184
  # Check to see if the all the properties in the model are valid
425
185
  # @return true if the model is valid
426
186
  def valid?
427
- return false if !@_type.nil? && @_type.to_s.length < 1
428
- return false if @relative_path.nil?
429
- return false if @relative_path.to_s.length < 1
430
- return false if !@md5.nil? && @md5.to_s.length < 1
431
- return false if !@sha1.nil? && @sha1.to_s.length < 1
432
- return false if !@sha224.nil? && @sha224.to_s.length < 1
433
- return false if !@sha256.nil? && @sha256.to_s.length < 1
434
- return false if !@sha384.nil? && @sha384.to_s.length < 1
435
- return false if !@sha512.nil? && @sha512.to_s.length < 1
436
- return false if !@documentation.nil? && @documentation.to_s.length > 128
437
- return false if !@homepage.nil? && @homepage.to_s.length > 128
438
- return false if !@issues.nil? && @issues.to_s.length > 128
439
- return false if !@name.nil? && @name.to_s.length > 32
440
- return false if !@name.nil? && @name.to_s.length < 1
441
- return false if !@namespace.nil? && @namespace.to_s.length > 32
442
- return false if !@namespace.nil? && @namespace.to_s.length < 1
443
- return false if !@version.nil? && @version.to_s.length > 32
444
187
  return false if !@version.nil? && @version.to_s.length < 1
445
- return false if !@expected_name.nil? && @expected_name.to_s.length < 1
446
- return false if !@expected_namespace.nil? && @expected_namespace.to_s.length < 1
447
- return false if !@expected_version.nil? && @expected_version.to_s.length < 1
188
+ certification_validator = EnumAttributeValidator.new('String', ["certified", "not_certified", "needs_review"])
189
+ return false unless certification_validator.valid?(@certification)
190
+ return false if @created_at.nil?
191
+ return false if @updated_at.nil?
192
+ return false if !@name.nil? && @name.to_s.length < 1
448
193
  true
449
194
  end
450
195
 
451
- # Custom attribute writer method with validation
452
- # @param [Object] _type Value to be assigned
453
- def _type=(_type)
454
- if !_type.nil? && _type.to_s.length < 1
455
- fail ArgumentError, 'invalid value for "_type", the character length must be great than or equal to 1.'
456
- end
457
-
458
- @_type = _type
459
- end
460
-
461
- # Custom attribute writer method with validation
462
- # @param [Object] relative_path Value to be assigned
463
- def relative_path=(relative_path)
464
- if relative_path.nil?
465
- fail ArgumentError, 'relative_path cannot be nil'
466
- end
467
-
468
- if relative_path.to_s.length < 1
469
- fail ArgumentError, 'invalid value for "relative_path", the character length must be great than or equal to 1.'
470
- end
471
-
472
- @relative_path = relative_path
473
- end
474
-
475
- # Custom attribute writer method with validation
476
- # @param [Object] md5 Value to be assigned
477
- def md5=(md5)
478
- if !md5.nil? && md5.to_s.length < 1
479
- fail ArgumentError, 'invalid value for "md5", the character length must be great than or equal to 1.'
480
- end
481
-
482
- @md5 = md5
483
- end
484
-
485
- # Custom attribute writer method with validation
486
- # @param [Object] sha1 Value to be assigned
487
- def sha1=(sha1)
488
- if !sha1.nil? && sha1.to_s.length < 1
489
- fail ArgumentError, 'invalid value for "sha1", the character length must be great than or equal to 1.'
490
- end
491
-
492
- @sha1 = sha1
493
- end
494
-
495
- # Custom attribute writer method with validation
496
- # @param [Object] sha224 Value to be assigned
497
- def sha224=(sha224)
498
- if !sha224.nil? && sha224.to_s.length < 1
499
- fail ArgumentError, 'invalid value for "sha224", the character length must be great than or equal to 1.'
500
- end
501
-
502
- @sha224 = sha224
503
- end
504
-
505
- # Custom attribute writer method with validation
506
- # @param [Object] sha256 Value to be assigned
507
- def sha256=(sha256)
508
- if !sha256.nil? && sha256.to_s.length < 1
509
- fail ArgumentError, 'invalid value for "sha256", the character length must be great than or equal to 1.'
510
- end
511
-
512
- @sha256 = sha256
513
- end
514
-
515
- # Custom attribute writer method with validation
516
- # @param [Object] sha384 Value to be assigned
517
- def sha384=(sha384)
518
- if !sha384.nil? && sha384.to_s.length < 1
519
- fail ArgumentError, 'invalid value for "sha384", the character length must be great than or equal to 1.'
520
- end
521
-
522
- @sha384 = sha384
523
- end
524
-
525
- # Custom attribute writer method with validation
526
- # @param [Object] sha512 Value to be assigned
527
- def sha512=(sha512)
528
- if !sha512.nil? && sha512.to_s.length < 1
529
- fail ArgumentError, 'invalid value for "sha512", the character length must be great than or equal to 1.'
530
- end
531
-
532
- @sha512 = sha512
533
- end
534
-
535
- # Custom attribute writer method with validation
536
- # @param [Object] documentation Value to be assigned
537
- def documentation=(documentation)
538
- if !documentation.nil? && documentation.to_s.length > 128
539
- fail ArgumentError, 'invalid value for "documentation", the character length must be smaller than or equal to 128.'
540
- end
541
-
542
- @documentation = documentation
543
- end
544
-
545
- # Custom attribute writer method with validation
546
- # @param [Object] homepage Value to be assigned
547
- def homepage=(homepage)
548
- if !homepage.nil? && homepage.to_s.length > 128
549
- fail ArgumentError, 'invalid value for "homepage", the character length must be smaller than or equal to 128.'
550
- end
551
-
552
- @homepage = homepage
553
- end
554
-
555
- # Custom attribute writer method with validation
556
- # @param [Object] issues Value to be assigned
557
- def issues=(issues)
558
- if !issues.nil? && issues.to_s.length > 128
559
- fail ArgumentError, 'invalid value for "issues", the character length must be smaller than or equal to 128.'
560
- end
561
-
562
- @issues = issues
563
- end
564
-
565
- # Custom attribute writer method with validation
566
- # @param [Object] name Value to be assigned
567
- def name=(name)
568
- if !name.nil? && name.to_s.length > 32
569
- fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 32.'
570
- end
571
-
572
- if !name.nil? && name.to_s.length < 1
573
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
574
- end
575
-
576
- @name = name
577
- end
578
-
579
- # Custom attribute writer method with validation
580
- # @param [Object] namespace Value to be assigned
581
- def namespace=(namespace)
582
- if !namespace.nil? && namespace.to_s.length > 32
583
- fail ArgumentError, 'invalid value for "namespace", the character length must be smaller than or equal to 32.'
584
- end
585
-
586
- if !namespace.nil? && namespace.to_s.length < 1
587
- fail ArgumentError, 'invalid value for "namespace", the character length must be great than or equal to 1.'
588
- end
589
-
590
- @namespace = namespace
591
- end
592
-
593
196
  # Custom attribute writer method with validation
594
197
  # @param [Object] version Value to be assigned
595
198
  def version=(version)
596
- if !version.nil? && version.to_s.length > 32
597
- fail ArgumentError, 'invalid value for "version", the character length must be smaller than or equal to 32.'
598
- end
599
-
600
199
  if !version.nil? && version.to_s.length < 1
601
200
  fail ArgumentError, 'invalid value for "version", the character length must be great than or equal to 1.'
602
201
  end
@@ -604,34 +203,24 @@ module PulpAnsibleClient
604
203
  @version = version
605
204
  end
606
205
 
607
- # Custom attribute writer method with validation
608
- # @param [Object] expected_name Value to be assigned
609
- def expected_name=(expected_name)
610
- if !expected_name.nil? && expected_name.to_s.length < 1
611
- fail ArgumentError, 'invalid value for "expected_name", the character length must be great than or equal to 1.'
206
+ # Custom attribute writer method checking allowed values (enum).
207
+ # @param [Object] certification Object to be assigned
208
+ def certification=(certification)
209
+ validator = EnumAttributeValidator.new('String', ["certified", "not_certified", "needs_review"])
210
+ unless validator.valid?(certification)
211
+ fail ArgumentError, "invalid value for \"certification\", must be one of #{validator.allowable_values}."
612
212
  end
613
-
614
- @expected_name = expected_name
213
+ @certification = certification
615
214
  end
616
215
 
617
216
  # Custom attribute writer method with validation
618
- # @param [Object] expected_namespace Value to be assigned
619
- def expected_namespace=(expected_namespace)
620
- if !expected_namespace.nil? && expected_namespace.to_s.length < 1
621
- fail ArgumentError, 'invalid value for "expected_namespace", the character length must be great than or equal to 1.'
622
- end
623
-
624
- @expected_namespace = expected_namespace
625
- end
626
-
627
- # Custom attribute writer method with validation
628
- # @param [Object] expected_version Value to be assigned
629
- def expected_version=(expected_version)
630
- if !expected_version.nil? && expected_version.to_s.length < 1
631
- fail ArgumentError, 'invalid value for "expected_version", the character length must be great than or equal to 1.'
217
+ # @param [Object] name Value to be assigned
218
+ def name=(name)
219
+ if !name.nil? && name.to_s.length < 1
220
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
632
221
  end
633
222
 
634
- @expected_version = expected_version
223
+ @name = name
635
224
  end
636
225
 
637
226
  # Checks equality by comparing each attribute.
@@ -639,37 +228,17 @@ module PulpAnsibleClient
639
228
  def ==(o)
640
229
  return true if self.equal?(o)
641
230
  self.class == o.class &&
642
- _href == o._href &&
643
- _created == o._created &&
644
- _type == o._type &&
231
+ version == o.version &&
232
+ certification == o.certification &&
233
+ href == o.href &&
234
+ created_at == o.created_at &&
235
+ updated_at == o.updated_at &&
645
236
  artifact == o.artifact &&
646
- relative_path == o.relative_path &&
647
- file == o.file &&
648
- repository == o.repository &&
649
- md5 == o.md5 &&
650
- sha1 == o.sha1 &&
651
- sha224 == o.sha224 &&
652
- sha256 == o.sha256 &&
653
- sha384 == o.sha384 &&
654
- sha512 == o.sha512 &&
655
- id == o.id &&
656
- authors == o.authors &&
657
- contents == o.contents &&
658
- dependencies == o.dependencies &&
659
- description == o.description &&
660
- docs_blob == o.docs_blob &&
661
- documentation == o.documentation &&
662
- homepage == o.homepage &&
663
- issues == o.issues &&
664
- is_certified == o.is_certified &&
665
- license == o.license &&
237
+ collection == o.collection &&
238
+ download_url == o.download_url &&
666
239
  name == o.name &&
667
240
  namespace == o.namespace &&
668
- tags == o.tags &&
669
- version == o.version &&
670
- expected_name == o.expected_name &&
671
- expected_namespace == o.expected_namespace &&
672
- expected_version == o.expected_version
241
+ metadata == o.metadata
673
242
  end
674
243
 
675
244
  # @see the `==` method
@@ -681,7 +250,7 @@ module PulpAnsibleClient
681
250
  # Calculates hash code according to all attributes.
682
251
  # @return [Integer] Hash code
683
252
  def hash
684
- [_href, _created, _type, artifact, relative_path, file, repository, md5, sha1, sha224, sha256, sha384, sha512, id, authors, contents, dependencies, description, docs_blob, documentation, homepage, issues, is_certified, license, name, namespace, tags, version, expected_name, expected_namespace, expected_version].hash
253
+ [version, certification, href, created_at, updated_at, artifact, collection, download_url, name, namespace, metadata].hash
685
254
  end
686
255
 
687
256
  # Builds the object from hash
@@ -770,7 +339,11 @@ module PulpAnsibleClient
770
339
  hash = {}
771
340
  self.class.attribute_map.each_pair do |attr, param|
772
341
  value = self.send(attr)
773
- next if value.nil?
342
+ if value.nil?
343
+ is_nullable = self.class.openapi_nullable.include?(attr)
344
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
345
+ end
346
+
774
347
  hash[param] = _to_hash(value)
775
348
  end
776
349
  hash