pulp_ansible_client 0.16.6 → 0.17.0

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.
Files changed (221) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +89 -21
  3. data/docs/AnsibleAnsibleNamespaceMetadata.md +29 -0
  4. data/docs/AnsibleAnsibleNamespaceMetadataResponse.md +35 -0
  5. data/docs/AnsibleAnsibleRepository.md +4 -2
  6. data/docs/AnsibleAnsibleRepositoryResponse.md +6 -2
  7. data/docs/AnsibleCollectionRemoteResponse.md +3 -1
  8. data/docs/AnsibleCollectionRemoteResponseHiddenFields.md +2 -2
  9. data/docs/AnsibleCollectionVersion.md +5 -5
  10. data/docs/AnsibleCollectionVersionMark.md +19 -0
  11. data/docs/AnsibleCollectionVersionMarkResponse.md +23 -0
  12. data/docs/AnsibleCollectionVersionResponse.md +3 -3
  13. data/docs/AnsibleCollectionsApi.md +229 -1
  14. data/docs/AnsibleCopyApi.md +1 -1
  15. data/docs/AnsibleGitRemote.md +25 -25
  16. data/docs/AnsibleGitRemoteResponse.md +23 -23
  17. data/docs/AnsibleRepositoryMark.md +19 -0
  18. data/docs/AnsibleRoleResponse.md +3 -3
  19. data/docs/ApiCollectionsApi.md +1 -1
  20. data/docs/ApiRolesApi.md +1 -1
  21. data/docs/CollectionImportApi.md +1 -1
  22. data/docs/CollectionNamespaceResponse.md +3 -1
  23. data/docs/CollectionSummaryResponse.md +35 -0
  24. data/docs/CollectionVersionCopyMove.md +21 -0
  25. data/docs/CollectionVersionListResponse.md +3 -1
  26. data/docs/CollectionVersionResponse.md +2 -0
  27. data/docs/CollectionVersionSearchList.md +27 -0
  28. data/docs/CollectionVersionSearchListResponse.md +29 -0
  29. data/docs/ContentCollectionDeprecationsApi.md +1 -1
  30. data/docs/ContentCollectionMarksApi.md +198 -0
  31. data/docs/ContentCollectionSignaturesApi.md +1 -1
  32. data/docs/ContentCollectionVersionsApi.md +5 -5
  33. data/docs/ContentNamespacesApi.md +220 -0
  34. data/docs/ContentRolesApi.md +1 -1
  35. data/docs/DistributionsAnsibleApi.md +233 -1
  36. data/docs/GalaxyDetailApi.md +1 -1
  37. data/docs/MyPermissionsResponse.md +17 -0
  38. data/docs/NamespaceLink.md +19 -0
  39. data/docs/NamespaceLinkResponse.md +19 -0
  40. data/docs/NestedRole.md +21 -0
  41. data/docs/NestedRoleResponse.md +21 -0
  42. data/docs/ObjectRolesResponse.md +17 -0
  43. data/docs/PaginatedCollectionVersionSearchListResponseList.md +21 -0
  44. data/docs/PaginatedansibleAnsibleNamespaceMetadataResponseList.md +23 -0
  45. data/docs/PaginatedansibleCollectionVersionMarkResponseList.md +23 -0
  46. data/docs/PatchedansibleAnsibleNamespaceMetadata.md +29 -0
  47. data/docs/PatchedansibleAnsibleRepository.md +4 -2
  48. data/docs/PatchedansibleGitRemote.md +25 -25
  49. data/docs/ProgressReportResponse.md +27 -0
  50. data/docs/PulpAnsibleApiApi.md +1 -1
  51. data/docs/PulpAnsibleApiV2CollectionsVersionsApi.md +1 -1
  52. data/docs/PulpAnsibleApiV3Api.md +1 -1
  53. data/docs/PulpAnsibleApiV3ArtifactsCollectionsApi.md +1 -1
  54. data/docs/PulpAnsibleApiV3CollectionVersionsAllApi.md +1 -1
  55. data/docs/PulpAnsibleApiV3CollectionsAllApi.md +1 -1
  56. data/docs/PulpAnsibleApiV3CollectionsApi.md +1 -1
  57. data/docs/PulpAnsibleApiV3CollectionsVersionsApi.md +1 -1
  58. data/docs/PulpAnsibleApiV3CollectionsVersionsDocsBlobApi.md +1 -1
  59. data/docs/PulpAnsibleApiV3NamespacesApi.md +158 -0
  60. data/docs/PulpAnsibleApiV3PluginAnsibleClientConfigurationApi.md +7 -7
  61. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsApi.md +1 -1
  62. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsApi.md +1 -1
  63. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsApi.md +1 -1
  64. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsApi.md +1 -1
  65. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexApi.md +1 -1
  66. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsApi.md +1 -1
  67. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobApi.md +1 -1
  68. data/docs/PulpAnsibleApiV3PluginAnsibleContentNamespacesApi.md +363 -0
  69. data/docs/PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsApi.md +168 -0
  70. data/docs/PulpAnsibleArtifactsCollectionsV3Api.md +1 -1
  71. data/docs/PulpAnsibleDefaultApiApi.md +1 -1
  72. data/docs/PulpAnsibleDefaultApiV3Api.md +1 -1
  73. data/docs/PulpAnsibleDefaultApiV3ArtifactsCollectionsApi.md +1 -1
  74. data/docs/PulpAnsibleDefaultApiV3CollectionVersionsAllApi.md +1 -1
  75. data/docs/PulpAnsibleDefaultApiV3CollectionsAllApi.md +1 -1
  76. data/docs/PulpAnsibleDefaultApiV3CollectionsApi.md +1 -1
  77. data/docs/PulpAnsibleDefaultApiV3CollectionsVersionsApi.md +1 -1
  78. data/docs/PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobApi.md +1 -1
  79. data/docs/PulpAnsibleDefaultApiV3NamespacesApi.md +154 -0
  80. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationApi.md +7 -7
  81. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsApi.md +1 -1
  82. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsApi.md +1 -1
  83. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsApi.md +1 -1
  84. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsApi.md +1 -1
  85. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.md +1 -1
  86. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsApi.md +1 -1
  87. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobApi.md +1 -1
  88. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesApi.md +353 -0
  89. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsApi.md +164 -0
  90. data/docs/PulpAnsibleTagsApi.md +1 -1
  91. data/docs/RemotesCollectionApi.md +237 -1
  92. data/docs/RemotesGitApi.md +229 -1
  93. data/docs/RemotesRoleApi.md +229 -1
  94. data/docs/RepositoriesAnsibleApi.md +465 -1
  95. data/docs/RepositoriesAnsibleVersionsApi.md +1 -1
  96. data/docs/Repository.md +25 -0
  97. data/docs/RepositoryAddRemoveContent.md +2 -2
  98. data/docs/RepositoryResponse.md +33 -0
  99. data/docs/Task.md +19 -0
  100. data/docs/TaskResponse.md +45 -0
  101. data/docs/UnpaginatedCollectionVersionResponse.md +2 -0
  102. data/docs/VersionsApi.md +11 -11
  103. data/lib/pulp_ansible_client/api/ansible_collections_api.rb +268 -0
  104. data/lib/pulp_ansible_client/api/content_collection_marks_api.rb +247 -0
  105. data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +6 -6
  106. data/lib/pulp_ansible_client/api/content_namespaces_api.rb +276 -0
  107. data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +274 -0
  108. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_namespaces_api.rb +209 -0
  109. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_client_configuration_api.rb +8 -8
  110. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_namespaces_api.rb +531 -0
  111. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_search_collection_versions_api.rb +229 -0
  112. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_namespaces_api.rb +197 -0
  113. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_client_configuration_api.rb +7 -7
  114. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_namespaces_api.rb +501 -0
  115. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_search_collection_versions_api.rb +217 -0
  116. data/lib/pulp_ansible_client/api/remotes_collection_api.rb +281 -1
  117. data/lib/pulp_ansible_client/api/remotes_git_api.rb +268 -0
  118. data/lib/pulp_ansible_client/api/remotes_role_api.rb +268 -0
  119. data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +564 -0
  120. data/lib/pulp_ansible_client/api/versions_api.rb +12 -12
  121. data/lib/pulp_ansible_client/configuration.rb +3 -3
  122. data/lib/pulp_ansible_client/models/ansible_ansible_namespace_metadata.rb +359 -0
  123. data/lib/pulp_ansible_client/models/ansible_ansible_namespace_metadata_response.rb +402 -0
  124. data/lib/pulp_ansible_client/models/ansible_ansible_repository.rb +15 -6
  125. data/lib/pulp_ansible_client/models/ansible_ansible_repository_response.rb +24 -6
  126. data/lib/pulp_ansible_client/models/ansible_collection_remote_response.rb +13 -4
  127. data/lib/pulp_ansible_client/models/ansible_collection_remote_response_hidden_fields.rb +0 -10
  128. data/lib/pulp_ansible_client/models/ansible_collection_version.rb +21 -21
  129. data/lib/pulp_ansible_client/models/ansible_collection_version_mark.rb +258 -0
  130. data/lib/pulp_ansible_client/models/ansible_collection_version_mark_response.rb +268 -0
  131. data/lib/pulp_ansible_client/models/ansible_collection_version_response.rb +10 -10
  132. data/lib/pulp_ansible_client/models/ansible_git_remote.rb +205 -205
  133. data/lib/pulp_ansible_client/models/ansible_git_remote_response.rb +138 -138
  134. data/lib/pulp_ansible_client/models/ansible_repository_mark.rb +260 -0
  135. data/lib/pulp_ansible_client/models/ansible_role_response.rb +10 -10
  136. data/lib/pulp_ansible_client/models/collection_namespace_response.rb +13 -4
  137. data/lib/pulp_ansible_client/models/collection_summary_response.rb +359 -0
  138. data/lib/pulp_ansible_client/models/collection_version_copy_move.rb +242 -0
  139. data/lib/pulp_ansible_client/models/collection_version_list_response.rb +16 -5
  140. data/lib/pulp_ansible_client/models/collection_version_response.rb +12 -1
  141. data/lib/pulp_ansible_client/models/collection_version_search_list.rb +279 -0
  142. data/lib/pulp_ansible_client/models/collection_version_search_list_response.rb +287 -0
  143. data/lib/pulp_ansible_client/models/my_permissions_response.rb +213 -0
  144. data/lib/pulp_ansible_client/models/namespace_link.rb +282 -0
  145. data/lib/pulp_ansible_client/models/namespace_link_response.rb +264 -0
  146. data/lib/pulp_ansible_client/models/nested_role.rb +253 -0
  147. data/lib/pulp_ansible_client/models/nested_role_response.rb +234 -0
  148. data/lib/pulp_ansible_client/models/object_roles_response.rb +213 -0
  149. data/lib/pulp_ansible_client/models/paginated_collection_version_search_list_response_list.rb +226 -0
  150. data/lib/pulp_ansible_client/models/paginatedansible_ansible_namespace_metadata_response_list.rb +237 -0
  151. data/lib/pulp_ansible_client/models/paginatedansible_collection_version_mark_response_list.rb +237 -0
  152. data/lib/pulp_ansible_client/models/patchedansible_ansible_namespace_metadata.rb +350 -0
  153. data/lib/pulp_ansible_client/models/patchedansible_ansible_repository.rb +15 -6
  154. data/lib/pulp_ansible_client/models/patchedansible_git_remote.rb +204 -204
  155. data/lib/pulp_ansible_client/models/progress_report_response.rb +259 -0
  156. data/lib/pulp_ansible_client/models/repository.rb +306 -0
  157. data/lib/pulp_ansible_client/models/repository_add_remove_content.rb +2 -2
  158. data/lib/pulp_ansible_client/models/repository_response.rb +309 -0
  159. data/lib/pulp_ansible_client/models/task.rb +266 -0
  160. data/lib/pulp_ansible_client/models/task_response.rb +366 -0
  161. data/lib/pulp_ansible_client/models/unpaginated_collection_version_response.rb +12 -1
  162. data/lib/pulp_ansible_client/version.rb +1 -1
  163. data/lib/pulp_ansible_client.rb +32 -0
  164. data/spec/api/ansible_collections_api_spec.rb +50 -0
  165. data/spec/api/content_collection_marks_api_spec.rb +83 -0
  166. data/spec/api/content_collection_versions_api_spec.rb +2 -2
  167. data/spec/api/content_namespaces_api_spec.rb +93 -0
  168. data/spec/api/distributions_ansible_api_spec.rb +52 -0
  169. data/spec/api/pulp_ansible_api_v3_namespaces_api_spec.rb +77 -0
  170. data/spec/api/pulp_ansible_api_v3_plugin_ansible_client_configuration_api_spec.rb +3 -3
  171. data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_namespaces_api_spec.rb +131 -0
  172. data/spec/api/pulp_ansible_api_v3_plugin_ansible_search_collection_versions_api_spec.rb +83 -0
  173. data/spec/api/pulp_ansible_default_api_v3_namespaces_api_spec.rb +75 -0
  174. data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_client_configuration_api_spec.rb +3 -3
  175. data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_namespaces_api_spec.rb +126 -0
  176. data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_search_collection_versions_api_spec.rb +81 -0
  177. data/spec/api/remotes_collection_api_spec.rb +54 -0
  178. data/spec/api/remotes_git_api_spec.rb +50 -0
  179. data/spec/api/remotes_role_api_spec.rb +50 -0
  180. data/spec/api/repositories_ansible_api_spec.rb +106 -0
  181. data/spec/api/versions_api_spec.rb +4 -4
  182. data/spec/configuration_spec.rb +3 -3
  183. data/spec/models/ansible_ansible_namespace_metadata_response_spec.rb +95 -0
  184. data/spec/models/ansible_ansible_namespace_metadata_spec.rb +77 -0
  185. data/spec/models/ansible_ansible_repository_response_spec.rb +12 -0
  186. data/spec/models/ansible_ansible_repository_spec.rb +6 -0
  187. data/spec/models/ansible_collection_remote_response_spec.rb +6 -0
  188. data/spec/models/ansible_collection_version_mark_response_spec.rb +59 -0
  189. data/spec/models/ansible_collection_version_mark_spec.rb +47 -0
  190. data/spec/models/ansible_collection_version_response_spec.rb +2 -2
  191. data/spec/models/ansible_collection_version_spec.rb +4 -4
  192. data/spec/models/ansible_git_remote_response_spec.rb +19 -19
  193. data/spec/models/ansible_git_remote_spec.rb +20 -20
  194. data/spec/models/ansible_repository_mark_spec.rb +47 -0
  195. data/spec/models/ansible_role_response_spec.rb +2 -2
  196. data/spec/models/collection_namespace_response_spec.rb +6 -0
  197. data/spec/models/collection_summary_response_spec.rb +95 -0
  198. data/spec/models/collection_version_copy_move_spec.rb +53 -0
  199. data/spec/models/collection_version_list_response_spec.rb +6 -0
  200. data/spec/models/collection_version_response_spec.rb +6 -0
  201. data/spec/models/collection_version_search_list_response_spec.rb +77 -0
  202. data/spec/models/collection_version_search_list_spec.rb +71 -0
  203. data/spec/models/my_permissions_response_spec.rb +41 -0
  204. data/spec/models/namespace_link_response_spec.rb +47 -0
  205. data/spec/models/namespace_link_spec.rb +47 -0
  206. data/spec/models/nested_role_response_spec.rb +53 -0
  207. data/spec/models/nested_role_spec.rb +53 -0
  208. data/spec/models/object_roles_response_spec.rb +41 -0
  209. data/spec/models/paginated_collection_version_search_list_response_list_spec.rb +53 -0
  210. data/spec/models/paginatedansible_ansible_namespace_metadata_response_list_spec.rb +59 -0
  211. data/spec/models/paginatedansible_collection_version_mark_response_list_spec.rb +59 -0
  212. data/spec/models/patchedansible_ansible_namespace_metadata_spec.rb +77 -0
  213. data/spec/models/patchedansible_ansible_repository_spec.rb +6 -0
  214. data/spec/models/patchedansible_git_remote_spec.rb +20 -20
  215. data/spec/models/progress_report_response_spec.rb +71 -0
  216. data/spec/models/repository_response_spec.rb +89 -0
  217. data/spec/models/repository_spec.rb +65 -0
  218. data/spec/models/task_response_spec.rb +125 -0
  219. data/spec/models/task_spec.rb +47 -0
  220. data/spec/models/unpaginated_collection_version_response_spec.rb +6 -0
  221. metadata +244 -116
@@ -25,6 +25,8 @@ module PulpAnsibleClient
25
25
 
26
26
  attr_accessor :requires_ansible
27
27
 
28
+ attr_accessor :marks
29
+
28
30
  attr_accessor :artifact
29
31
 
30
32
  attr_accessor :collection
@@ -57,6 +59,7 @@ module PulpAnsibleClient
57
59
  :'created_at' => :'created_at',
58
60
  :'updated_at' => :'updated_at',
59
61
  :'requires_ansible' => :'requires_ansible',
62
+ :'marks' => :'marks',
60
63
  :'artifact' => :'artifact',
61
64
  :'collection' => :'collection',
62
65
  :'download_url' => :'download_url',
@@ -79,6 +82,7 @@ module PulpAnsibleClient
79
82
  :'created_at' => :'DateTime',
80
83
  :'updated_at' => :'DateTime',
81
84
  :'requires_ansible' => :'String',
85
+ :'marks' => :'Array<String>',
82
86
  :'artifact' => :'ArtifactRefResponse',
83
87
  :'collection' => :'CollectionRefResponse',
84
88
  :'download_url' => :'String',
@@ -135,6 +139,12 @@ module PulpAnsibleClient
135
139
  self.requires_ansible = attributes[:'requires_ansible']
136
140
  end
137
141
 
142
+ if attributes.key?(:'marks')
143
+ if (value = attributes[:'marks']).is_a?(Array)
144
+ self.marks = value
145
+ end
146
+ end
147
+
138
148
  if attributes.key?(:'artifact')
139
149
  self.artifact = attributes[:'artifact']
140
150
  end
@@ -228,6 +238,7 @@ module PulpAnsibleClient
228
238
  created_at == o.created_at &&
229
239
  updated_at == o.updated_at &&
230
240
  requires_ansible == o.requires_ansible &&
241
+ marks == o.marks &&
231
242
  artifact == o.artifact &&
232
243
  collection == o.collection &&
233
244
  download_url == o.download_url &&
@@ -250,7 +261,7 @@ module PulpAnsibleClient
250
261
  # Calculates hash code according to all attributes.
251
262
  # @return [Integer] Hash code
252
263
  def hash
253
- [version, href, created_at, updated_at, requires_ansible, artifact, collection, download_url, name, namespace, signatures, metadata, git_url, git_commit_sha, manifest, files].hash
264
+ [version, href, created_at, updated_at, requires_ansible, marks, artifact, collection, download_url, name, namespace, signatures, metadata, git_url, git_commit_sha, manifest, files].hash
254
265
  end
255
266
 
256
267
  # Builds the object from hash
@@ -0,0 +1,279 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpAnsibleClient
16
+ # Cross-repo search results.
17
+ class CollectionVersionSearchList
18
+ attr_accessor :repository
19
+
20
+ # Collection Version serializer without docs blob.
21
+ attr_accessor :collection_version
22
+
23
+ attr_accessor :namespace_metadata
24
+
25
+ attr_accessor :is_highest
26
+
27
+ attr_accessor :is_deprecated
28
+
29
+ attr_accessor :is_signed
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'repository' => :'repository',
35
+ :'collection_version' => :'collection_version',
36
+ :'namespace_metadata' => :'namespace_metadata',
37
+ :'is_highest' => :'is_highest',
38
+ :'is_deprecated' => :'is_deprecated',
39
+ :'is_signed' => :'is_signed'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'repository' => :'Repository',
47
+ :'collection_version' => :'Object',
48
+ :'namespace_metadata' => :'AnsibleAnsibleNamespaceMetadata',
49
+ :'is_highest' => :'Boolean',
50
+ :'is_deprecated' => :'Boolean',
51
+ :'is_signed' => :'Boolean'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ :'namespace_metadata',
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::CollectionVersionSearchList` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::CollectionVersionSearchList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'repository')
78
+ self.repository = attributes[:'repository']
79
+ end
80
+
81
+ if attributes.key?(:'collection_version')
82
+ self.collection_version = attributes[:'collection_version']
83
+ end
84
+
85
+ if attributes.key?(:'namespace_metadata')
86
+ self.namespace_metadata = attributes[:'namespace_metadata']
87
+ end
88
+
89
+ if attributes.key?(:'is_highest')
90
+ self.is_highest = attributes[:'is_highest']
91
+ end
92
+
93
+ if attributes.key?(:'is_deprecated')
94
+ self.is_deprecated = attributes[:'is_deprecated']
95
+ end
96
+
97
+ if attributes.key?(:'is_signed')
98
+ self.is_signed = attributes[:'is_signed']
99
+ end
100
+ end
101
+
102
+ # Show invalid properties with the reasons. Usually used together with valid?
103
+ # @return Array for valid properties with the reasons
104
+ def list_invalid_properties
105
+ invalid_properties = Array.new
106
+ if @repository.nil?
107
+ invalid_properties.push('invalid value for "repository", repository cannot be nil.')
108
+ end
109
+
110
+ if @collection_version.nil?
111
+ invalid_properties.push('invalid value for "collection_version", collection_version cannot be nil.')
112
+ end
113
+
114
+ if @is_highest.nil?
115
+ invalid_properties.push('invalid value for "is_highest", is_highest cannot be nil.')
116
+ end
117
+
118
+ if @is_deprecated.nil?
119
+ invalid_properties.push('invalid value for "is_deprecated", is_deprecated cannot be nil.')
120
+ end
121
+
122
+ if @is_signed.nil?
123
+ invalid_properties.push('invalid value for "is_signed", is_signed cannot be nil.')
124
+ end
125
+
126
+ invalid_properties
127
+ end
128
+
129
+ # Check to see if the all the properties in the model are valid
130
+ # @return true if the model is valid
131
+ def valid?
132
+ return false if @repository.nil?
133
+ return false if @collection_version.nil?
134
+ return false if @is_highest.nil?
135
+ return false if @is_deprecated.nil?
136
+ return false if @is_signed.nil?
137
+ true
138
+ end
139
+
140
+ # Checks equality by comparing each attribute.
141
+ # @param [Object] Object to be compared
142
+ def ==(o)
143
+ return true if self.equal?(o)
144
+ self.class == o.class &&
145
+ repository == o.repository &&
146
+ collection_version == o.collection_version &&
147
+ namespace_metadata == o.namespace_metadata &&
148
+ is_highest == o.is_highest &&
149
+ is_deprecated == o.is_deprecated &&
150
+ is_signed == o.is_signed
151
+ end
152
+
153
+ # @see the `==` method
154
+ # @param [Object] Object to be compared
155
+ def eql?(o)
156
+ self == o
157
+ end
158
+
159
+ # Calculates hash code according to all attributes.
160
+ # @return [Integer] Hash code
161
+ def hash
162
+ [repository, collection_version, namespace_metadata, is_highest, is_deprecated, is_signed].hash
163
+ end
164
+
165
+ # Builds the object from hash
166
+ # @param [Hash] attributes Model attributes in the form of hash
167
+ # @return [Object] Returns the model itself
168
+ def self.build_from_hash(attributes)
169
+ new.build_from_hash(attributes)
170
+ end
171
+
172
+ # Builds the object from hash
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ # @return [Object] Returns the model itself
175
+ def build_from_hash(attributes)
176
+ return nil unless attributes.is_a?(Hash)
177
+ self.class.openapi_types.each_pair do |key, type|
178
+ if type =~ /\AArray<(.*)>/i
179
+ # check to ensure the input is an array given that the attribute
180
+ # is documented as an array but the input is not
181
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
182
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
183
+ end
184
+ elsif !attributes[self.class.attribute_map[key]].nil?
185
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
186
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
187
+ end
188
+
189
+ self
190
+ end
191
+
192
+ # Deserializes the data based on type
193
+ # @param string type Data type
194
+ # @param string value Value to be deserialized
195
+ # @return [Object] Deserialized data
196
+ def _deserialize(type, value)
197
+ case type.to_sym
198
+ when :DateTime
199
+ DateTime.parse(value)
200
+ when :Date
201
+ Date.parse(value)
202
+ when :String
203
+ value.to_s
204
+ when :Integer
205
+ value.to_i
206
+ when :Float
207
+ value.to_f
208
+ when :Boolean
209
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
210
+ true
211
+ else
212
+ false
213
+ end
214
+ when :Object
215
+ # generic object (usually a Hash), return directly
216
+ value
217
+ when /\AArray<(?<inner_type>.+)>\z/
218
+ inner_type = Regexp.last_match[:inner_type]
219
+ value.map { |v| _deserialize(inner_type, v) }
220
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
221
+ k_type = Regexp.last_match[:k_type]
222
+ v_type = Regexp.last_match[:v_type]
223
+ {}.tap do |hash|
224
+ value.each do |k, v|
225
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
226
+ end
227
+ end
228
+ else # model
229
+ PulpAnsibleClient.const_get(type).build_from_hash(value)
230
+ end
231
+ end
232
+
233
+ # Returns the string representation of the object
234
+ # @return [String] String presentation of the object
235
+ def to_s
236
+ to_hash.to_s
237
+ end
238
+
239
+ # to_body is an alias to to_hash (backward compatibility)
240
+ # @return [Hash] Returns the object in the form of hash
241
+ def to_body
242
+ to_hash
243
+ end
244
+
245
+ # Returns the object in the form of hash
246
+ # @return [Hash] Returns the object in the form of hash
247
+ def to_hash
248
+ hash = {}
249
+ self.class.attribute_map.each_pair do |attr, param|
250
+ value = self.send(attr)
251
+ if value.nil?
252
+ is_nullable = self.class.openapi_nullable.include?(attr)
253
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
254
+ end
255
+
256
+ hash[param] = _to_hash(value)
257
+ end
258
+ hash
259
+ end
260
+
261
+ # Outputs non-array value in the form of hash
262
+ # For object, use to_hash. Otherwise, just return the value
263
+ # @param [Object] value Any valid value
264
+ # @return [Hash] Returns the value in the form of hash
265
+ def _to_hash(value)
266
+ if value.is_a?(Array)
267
+ value.compact.map { |v| _to_hash(v) }
268
+ elsif value.is_a?(Hash)
269
+ {}.tap do |hash|
270
+ value.each { |k, v| hash[k] = _to_hash(v) }
271
+ end
272
+ elsif value.respond_to? :to_hash
273
+ value.to_hash
274
+ else
275
+ value
276
+ end
277
+ end
278
+ end
279
+ end
@@ -0,0 +1,287 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpAnsibleClient
16
+ # Cross-repo search results.
17
+ class CollectionVersionSearchListResponse
18
+ attr_accessor :repository
19
+
20
+ attr_accessor :collection_version
21
+
22
+ attr_accessor :repository_version
23
+
24
+ attr_accessor :namespace_metadata
25
+
26
+ attr_accessor :is_highest
27
+
28
+ attr_accessor :is_deprecated
29
+
30
+ attr_accessor :is_signed
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'repository' => :'repository',
36
+ :'collection_version' => :'collection_version',
37
+ :'repository_version' => :'repository_version',
38
+ :'namespace_metadata' => :'namespace_metadata',
39
+ :'is_highest' => :'is_highest',
40
+ :'is_deprecated' => :'is_deprecated',
41
+ :'is_signed' => :'is_signed'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'repository' => :'RepositoryResponse',
49
+ :'collection_version' => :'CollectionSummaryResponse',
50
+ :'repository_version' => :'String',
51
+ :'namespace_metadata' => :'AnsibleAnsibleNamespaceMetadataResponse',
52
+ :'is_highest' => :'Boolean',
53
+ :'is_deprecated' => :'Boolean',
54
+ :'is_signed' => :'Boolean'
55
+ }
56
+ end
57
+
58
+ # List of attributes with nullable: true
59
+ def self.openapi_nullable
60
+ Set.new([
61
+ :'namespace_metadata',
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::CollectionVersionSearchListResponse` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::CollectionVersionSearchListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'repository')
81
+ self.repository = attributes[:'repository']
82
+ end
83
+
84
+ if attributes.key?(:'collection_version')
85
+ self.collection_version = attributes[:'collection_version']
86
+ end
87
+
88
+ if attributes.key?(:'repository_version')
89
+ self.repository_version = attributes[:'repository_version']
90
+ end
91
+
92
+ if attributes.key?(:'namespace_metadata')
93
+ self.namespace_metadata = attributes[:'namespace_metadata']
94
+ end
95
+
96
+ if attributes.key?(:'is_highest')
97
+ self.is_highest = attributes[:'is_highest']
98
+ end
99
+
100
+ if attributes.key?(:'is_deprecated')
101
+ self.is_deprecated = attributes[:'is_deprecated']
102
+ end
103
+
104
+ if attributes.key?(:'is_signed')
105
+ self.is_signed = attributes[:'is_signed']
106
+ end
107
+ end
108
+
109
+ # Show invalid properties with the reasons. Usually used together with valid?
110
+ # @return Array for valid properties with the reasons
111
+ def list_invalid_properties
112
+ invalid_properties = Array.new
113
+ if @repository.nil?
114
+ invalid_properties.push('invalid value for "repository", repository cannot be nil.')
115
+ end
116
+
117
+ if @collection_version.nil?
118
+ invalid_properties.push('invalid value for "collection_version", collection_version cannot be nil.')
119
+ end
120
+
121
+ if @is_highest.nil?
122
+ invalid_properties.push('invalid value for "is_highest", is_highest cannot be nil.')
123
+ end
124
+
125
+ if @is_deprecated.nil?
126
+ invalid_properties.push('invalid value for "is_deprecated", is_deprecated cannot be nil.')
127
+ end
128
+
129
+ if @is_signed.nil?
130
+ invalid_properties.push('invalid value for "is_signed", is_signed cannot be nil.')
131
+ end
132
+
133
+ invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ return false if @repository.nil?
140
+ return false if @collection_version.nil?
141
+ return false if @is_highest.nil?
142
+ return false if @is_deprecated.nil?
143
+ return false if @is_signed.nil?
144
+ true
145
+ end
146
+
147
+ # Checks equality by comparing each attribute.
148
+ # @param [Object] Object to be compared
149
+ def ==(o)
150
+ return true if self.equal?(o)
151
+ self.class == o.class &&
152
+ repository == o.repository &&
153
+ collection_version == o.collection_version &&
154
+ repository_version == o.repository_version &&
155
+ namespace_metadata == o.namespace_metadata &&
156
+ is_highest == o.is_highest &&
157
+ is_deprecated == o.is_deprecated &&
158
+ is_signed == o.is_signed
159
+ end
160
+
161
+ # @see the `==` method
162
+ # @param [Object] Object to be compared
163
+ def eql?(o)
164
+ self == o
165
+ end
166
+
167
+ # Calculates hash code according to all attributes.
168
+ # @return [Integer] Hash code
169
+ def hash
170
+ [repository, collection_version, repository_version, namespace_metadata, is_highest, is_deprecated, is_signed].hash
171
+ end
172
+
173
+ # Builds the object from hash
174
+ # @param [Hash] attributes Model attributes in the form of hash
175
+ # @return [Object] Returns the model itself
176
+ def self.build_from_hash(attributes)
177
+ new.build_from_hash(attributes)
178
+ end
179
+
180
+ # Builds the object from hash
181
+ # @param [Hash] attributes Model attributes in the form of hash
182
+ # @return [Object] Returns the model itself
183
+ def build_from_hash(attributes)
184
+ return nil unless attributes.is_a?(Hash)
185
+ self.class.openapi_types.each_pair do |key, type|
186
+ if type =~ /\AArray<(.*)>/i
187
+ # check to ensure the input is an array given that the attribute
188
+ # is documented as an array but the input is not
189
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
190
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
191
+ end
192
+ elsif !attributes[self.class.attribute_map[key]].nil?
193
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
194
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
195
+ end
196
+
197
+ self
198
+ end
199
+
200
+ # Deserializes the data based on type
201
+ # @param string type Data type
202
+ # @param string value Value to be deserialized
203
+ # @return [Object] Deserialized data
204
+ def _deserialize(type, value)
205
+ case type.to_sym
206
+ when :DateTime
207
+ DateTime.parse(value)
208
+ when :Date
209
+ Date.parse(value)
210
+ when :String
211
+ value.to_s
212
+ when :Integer
213
+ value.to_i
214
+ when :Float
215
+ value.to_f
216
+ when :Boolean
217
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
218
+ true
219
+ else
220
+ false
221
+ end
222
+ when :Object
223
+ # generic object (usually a Hash), return directly
224
+ value
225
+ when /\AArray<(?<inner_type>.+)>\z/
226
+ inner_type = Regexp.last_match[:inner_type]
227
+ value.map { |v| _deserialize(inner_type, v) }
228
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
229
+ k_type = Regexp.last_match[:k_type]
230
+ v_type = Regexp.last_match[:v_type]
231
+ {}.tap do |hash|
232
+ value.each do |k, v|
233
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
234
+ end
235
+ end
236
+ else # model
237
+ PulpAnsibleClient.const_get(type).build_from_hash(value)
238
+ end
239
+ end
240
+
241
+ # Returns the string representation of the object
242
+ # @return [String] String presentation of the object
243
+ def to_s
244
+ to_hash.to_s
245
+ end
246
+
247
+ # to_body is an alias to to_hash (backward compatibility)
248
+ # @return [Hash] Returns the object in the form of hash
249
+ def to_body
250
+ to_hash
251
+ end
252
+
253
+ # Returns the object in the form of hash
254
+ # @return [Hash] Returns the object in the form of hash
255
+ def to_hash
256
+ hash = {}
257
+ self.class.attribute_map.each_pair do |attr, param|
258
+ value = self.send(attr)
259
+ if value.nil?
260
+ is_nullable = self.class.openapi_nullable.include?(attr)
261
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
262
+ end
263
+
264
+ hash[param] = _to_hash(value)
265
+ end
266
+ hash
267
+ end
268
+
269
+ # Outputs non-array value in the form of hash
270
+ # For object, use to_hash. Otherwise, just return the value
271
+ # @param [Object] value Any valid value
272
+ # @return [Hash] Returns the value in the form of hash
273
+ def _to_hash(value)
274
+ if value.is_a?(Array)
275
+ value.compact.map { |v| _to_hash(v) }
276
+ elsif value.is_a?(Hash)
277
+ {}.tap do |hash|
278
+ value.each { |k, v| hash[k] = _to_hash(v) }
279
+ end
280
+ elsif value.respond_to? :to_hash
281
+ value.to_hash
282
+ else
283
+ value
284
+ end
285
+ end
286
+ end
287
+ end