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
@@ -15,18 +15,18 @@ require 'date'
15
15
  module PulpAnsibleClient
16
16
  # A serializer for CollectionVersion Content.
17
17
  class AnsibleCollectionVersion
18
- # An uncommitted upload that may be turned into the artifact of the content unit.
19
- attr_accessor :upload
20
-
21
18
  # An uploaded file that may be turned into the artifact of the content unit.
22
19
  attr_accessor :file
23
20
 
24
- # A URI of a repository the new content unit should be associated with.
25
- attr_accessor :repository
26
-
27
21
  # Artifact file representing the physical content
28
22
  attr_accessor :artifact
29
23
 
24
+ # An uncommitted upload that may be turned into the artifact of the content unit.
25
+ attr_accessor :upload
26
+
27
+ # A URI of a repository the new content unit should be associated with.
28
+ attr_accessor :repository
29
+
30
30
  # The name of the collection.
31
31
  attr_accessor :expected_name
32
32
 
@@ -39,10 +39,10 @@ module PulpAnsibleClient
39
39
  # Attribute mapping from ruby-style variable name to JSON key.
40
40
  def self.attribute_map
41
41
  {
42
- :'upload' => :'upload',
43
42
  :'file' => :'file',
44
- :'repository' => :'repository',
45
43
  :'artifact' => :'artifact',
44
+ :'upload' => :'upload',
45
+ :'repository' => :'repository',
46
46
  :'expected_name' => :'expected_name',
47
47
  :'expected_namespace' => :'expected_namespace',
48
48
  :'expected_version' => :'expected_version'
@@ -52,10 +52,10 @@ module PulpAnsibleClient
52
52
  # Attribute type mapping.
53
53
  def self.openapi_types
54
54
  {
55
- :'upload' => :'String',
56
55
  :'file' => :'File',
57
- :'repository' => :'String',
58
56
  :'artifact' => :'String',
57
+ :'upload' => :'String',
58
+ :'repository' => :'String',
59
59
  :'expected_name' => :'String',
60
60
  :'expected_namespace' => :'String',
61
61
  :'expected_version' => :'String'
@@ -83,22 +83,22 @@ module PulpAnsibleClient
83
83
  h[k.to_sym] = v
84
84
  }
85
85
 
86
- if attributes.key?(:'upload')
87
- self.upload = attributes[:'upload']
88
- end
89
-
90
86
  if attributes.key?(:'file')
91
87
  self.file = attributes[:'file']
92
88
  end
93
89
 
94
- if attributes.key?(:'repository')
95
- self.repository = attributes[:'repository']
96
- end
97
-
98
90
  if attributes.key?(:'artifact')
99
91
  self.artifact = attributes[:'artifact']
100
92
  end
101
93
 
94
+ if attributes.key?(:'upload')
95
+ self.upload = attributes[:'upload']
96
+ end
97
+
98
+ if attributes.key?(:'repository')
99
+ self.repository = attributes[:'repository']
100
+ end
101
+
102
102
  if attributes.key?(:'expected_name')
103
103
  self.expected_name = attributes[:'expected_name']
104
104
  end
@@ -202,10 +202,10 @@ module PulpAnsibleClient
202
202
  def ==(o)
203
203
  return true if self.equal?(o)
204
204
  self.class == o.class &&
205
- upload == o.upload &&
206
205
  file == o.file &&
207
- repository == o.repository &&
208
206
  artifact == o.artifact &&
207
+ upload == o.upload &&
208
+ repository == o.repository &&
209
209
  expected_name == o.expected_name &&
210
210
  expected_namespace == o.expected_namespace &&
211
211
  expected_version == o.expected_version
@@ -220,7 +220,7 @@ module PulpAnsibleClient
220
220
  # Calculates hash code according to all attributes.
221
221
  # @return [Integer] Hash code
222
222
  def hash
223
- [upload, file, repository, artifact, expected_name, expected_namespace, expected_version].hash
223
+ [file, artifact, upload, repository, expected_name, expected_namespace, expected_version].hash
224
224
  end
225
225
 
226
226
  # Builds the object from hash
@@ -0,0 +1,258 @@
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
+ # A serializer for mark models.
17
+ class AnsibleCollectionVersionMark
18
+ # The content this mark is pointing to.
19
+ attr_accessor :marked_collection
20
+
21
+ # The string value of this mark.
22
+ attr_accessor :value
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'marked_collection' => :'marked_collection',
28
+ :'value' => :'value'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'marked_collection' => :'String',
36
+ :'value' => :'String'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::AnsibleCollectionVersionMark` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::AnsibleCollectionVersionMark`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'marked_collection')
62
+ self.marked_collection = attributes[:'marked_collection']
63
+ end
64
+
65
+ if attributes.key?(:'value')
66
+ self.value = attributes[:'value']
67
+ end
68
+ end
69
+
70
+ # Show invalid properties with the reasons. Usually used together with valid?
71
+ # @return Array for valid properties with the reasons
72
+ def list_invalid_properties
73
+ invalid_properties = Array.new
74
+ if @marked_collection.nil?
75
+ invalid_properties.push('invalid value for "marked_collection", marked_collection cannot be nil.')
76
+ end
77
+
78
+ if @value.nil?
79
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
80
+ end
81
+
82
+ if @value.to_s.length < 1
83
+ invalid_properties.push('invalid value for "value", the character length must be great than or equal to 1.')
84
+ end
85
+
86
+ pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
87
+ if @value !~ pattern
88
+ invalid_properties.push("invalid value for \"value\", must conform to the pattern #{pattern}.")
89
+ end
90
+
91
+ invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ return false if @marked_collection.nil?
98
+ return false if @value.nil?
99
+ return false if @value.to_s.length < 1
100
+ return false if @value !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
101
+ true
102
+ end
103
+
104
+ # Custom attribute writer method with validation
105
+ # @param [Object] value Value to be assigned
106
+ def value=(value)
107
+ if value.nil?
108
+ fail ArgumentError, 'value cannot be nil'
109
+ end
110
+
111
+ if value.to_s.length < 1
112
+ fail ArgumentError, 'invalid value for "value", the character length must be great than or equal to 1.'
113
+ end
114
+
115
+ pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
116
+ if value !~ pattern
117
+ fail ArgumentError, "invalid value for \"value\", must conform to the pattern #{pattern}."
118
+ end
119
+
120
+ @value = value
121
+ end
122
+
123
+ # Checks equality by comparing each attribute.
124
+ # @param [Object] Object to be compared
125
+ def ==(o)
126
+ return true if self.equal?(o)
127
+ self.class == o.class &&
128
+ marked_collection == o.marked_collection &&
129
+ value == o.value
130
+ end
131
+
132
+ # @see the `==` method
133
+ # @param [Object] Object to be compared
134
+ def eql?(o)
135
+ self == o
136
+ end
137
+
138
+ # Calculates hash code according to all attributes.
139
+ # @return [Integer] Hash code
140
+ def hash
141
+ [marked_collection, value].hash
142
+ end
143
+
144
+ # Builds the object from hash
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ # @return [Object] Returns the model itself
147
+ def self.build_from_hash(attributes)
148
+ new.build_from_hash(attributes)
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ self.class.openapi_types.each_pair do |key, type|
157
+ if type =~ /\AArray<(.*)>/i
158
+ # check to ensure the input is an array given that the attribute
159
+ # is documented as an array but the input is not
160
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
161
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
162
+ end
163
+ elsif !attributes[self.class.attribute_map[key]].nil?
164
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
165
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
166
+ end
167
+
168
+ self
169
+ end
170
+
171
+ # Deserializes the data based on type
172
+ # @param string type Data type
173
+ # @param string value Value to be deserialized
174
+ # @return [Object] Deserialized data
175
+ def _deserialize(type, value)
176
+ case type.to_sym
177
+ when :DateTime
178
+ DateTime.parse(value)
179
+ when :Date
180
+ Date.parse(value)
181
+ when :String
182
+ value.to_s
183
+ when :Integer
184
+ value.to_i
185
+ when :Float
186
+ value.to_f
187
+ when :Boolean
188
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
189
+ true
190
+ else
191
+ false
192
+ end
193
+ when :Object
194
+ # generic object (usually a Hash), return directly
195
+ value
196
+ when /\AArray<(?<inner_type>.+)>\z/
197
+ inner_type = Regexp.last_match[:inner_type]
198
+ value.map { |v| _deserialize(inner_type, v) }
199
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
200
+ k_type = Regexp.last_match[:k_type]
201
+ v_type = Regexp.last_match[:v_type]
202
+ {}.tap do |hash|
203
+ value.each do |k, v|
204
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
205
+ end
206
+ end
207
+ else # model
208
+ PulpAnsibleClient.const_get(type).build_from_hash(value)
209
+ end
210
+ end
211
+
212
+ # Returns the string representation of the object
213
+ # @return [String] String presentation of the object
214
+ def to_s
215
+ to_hash.to_s
216
+ end
217
+
218
+ # to_body is an alias to to_hash (backward compatibility)
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_body
221
+ to_hash
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ # Outputs non-array value in the form of hash
241
+ # For object, use to_hash. Otherwise, just return the value
242
+ # @param [Object] value Any valid value
243
+ # @return [Hash] Returns the value in the form of hash
244
+ def _to_hash(value)
245
+ if value.is_a?(Array)
246
+ value.compact.map { |v| _to_hash(v) }
247
+ elsif value.is_a?(Hash)
248
+ {}.tap do |hash|
249
+ value.each { |k, v| hash[k] = _to_hash(v) }
250
+ end
251
+ elsif value.respond_to? :to_hash
252
+ value.to_hash
253
+ else
254
+ value
255
+ end
256
+ end
257
+ end
258
+ end
@@ -0,0 +1,268 @@
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
+ # A serializer for mark models.
17
+ class AnsibleCollectionVersionMarkResponse
18
+ # Timestamp of creation.
19
+ attr_accessor :pulp_created
20
+
21
+ attr_accessor :pulp_href
22
+
23
+ # The content this mark is pointing to.
24
+ attr_accessor :marked_collection
25
+
26
+ # The string value of this mark.
27
+ attr_accessor :value
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'pulp_created' => :'pulp_created',
33
+ :'pulp_href' => :'pulp_href',
34
+ :'marked_collection' => :'marked_collection',
35
+ :'value' => :'value'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'pulp_created' => :'DateTime',
43
+ :'pulp_href' => :'String',
44
+ :'marked_collection' => :'String',
45
+ :'value' => :'String'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::AnsibleCollectionVersionMarkResponse` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!self.class.attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::AnsibleCollectionVersionMarkResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'pulp_created')
71
+ self.pulp_created = attributes[:'pulp_created']
72
+ end
73
+
74
+ if attributes.key?(:'pulp_href')
75
+ self.pulp_href = attributes[:'pulp_href']
76
+ end
77
+
78
+ if attributes.key?(:'marked_collection')
79
+ self.marked_collection = attributes[:'marked_collection']
80
+ end
81
+
82
+ if attributes.key?(:'value')
83
+ self.value = attributes[:'value']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ invalid_properties = Array.new
91
+ if @marked_collection.nil?
92
+ invalid_properties.push('invalid value for "marked_collection", marked_collection cannot be nil.')
93
+ end
94
+
95
+ if @value.nil?
96
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
97
+ end
98
+
99
+ pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
100
+ if @value !~ pattern
101
+ invalid_properties.push("invalid value for \"value\", must conform to the pattern #{pattern}.")
102
+ end
103
+
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ return false if @marked_collection.nil?
111
+ return false if @value.nil?
112
+ return false if @value !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
113
+ true
114
+ end
115
+
116
+ # Custom attribute writer method with validation
117
+ # @param [Object] value Value to be assigned
118
+ def value=(value)
119
+ if value.nil?
120
+ fail ArgumentError, 'value cannot be nil'
121
+ end
122
+
123
+ pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
124
+ if value !~ pattern
125
+ fail ArgumentError, "invalid value for \"value\", must conform to the pattern #{pattern}."
126
+ end
127
+
128
+ @value = value
129
+ end
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param [Object] Object to be compared
133
+ def ==(o)
134
+ return true if self.equal?(o)
135
+ self.class == o.class &&
136
+ pulp_created == o.pulp_created &&
137
+ pulp_href == o.pulp_href &&
138
+ marked_collection == o.marked_collection &&
139
+ value == o.value
140
+ end
141
+
142
+ # @see the `==` method
143
+ # @param [Object] Object to be compared
144
+ def eql?(o)
145
+ self == o
146
+ end
147
+
148
+ # Calculates hash code according to all attributes.
149
+ # @return [Integer] Hash code
150
+ def hash
151
+ [pulp_created, pulp_href, marked_collection, value].hash
152
+ end
153
+
154
+ # Builds the object from hash
155
+ # @param [Hash] attributes Model attributes in the form of hash
156
+ # @return [Object] Returns the model itself
157
+ def self.build_from_hash(attributes)
158
+ new.build_from_hash(attributes)
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def build_from_hash(attributes)
165
+ return nil unless attributes.is_a?(Hash)
166
+ self.class.openapi_types.each_pair do |key, type|
167
+ if type =~ /\AArray<(.*)>/i
168
+ # check to ensure the input is an array given that the attribute
169
+ # is documented as an array but the input is not
170
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
171
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
172
+ end
173
+ elsif !attributes[self.class.attribute_map[key]].nil?
174
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
175
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
176
+ end
177
+
178
+ self
179
+ end
180
+
181
+ # Deserializes the data based on type
182
+ # @param string type Data type
183
+ # @param string value Value to be deserialized
184
+ # @return [Object] Deserialized data
185
+ def _deserialize(type, value)
186
+ case type.to_sym
187
+ when :DateTime
188
+ DateTime.parse(value)
189
+ when :Date
190
+ Date.parse(value)
191
+ when :String
192
+ value.to_s
193
+ when :Integer
194
+ value.to_i
195
+ when :Float
196
+ value.to_f
197
+ when :Boolean
198
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
199
+ true
200
+ else
201
+ false
202
+ end
203
+ when :Object
204
+ # generic object (usually a Hash), return directly
205
+ value
206
+ when /\AArray<(?<inner_type>.+)>\z/
207
+ inner_type = Regexp.last_match[:inner_type]
208
+ value.map { |v| _deserialize(inner_type, v) }
209
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
210
+ k_type = Regexp.last_match[:k_type]
211
+ v_type = Regexp.last_match[:v_type]
212
+ {}.tap do |hash|
213
+ value.each do |k, v|
214
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
215
+ end
216
+ end
217
+ else # model
218
+ PulpAnsibleClient.const_get(type).build_from_hash(value)
219
+ end
220
+ end
221
+
222
+ # Returns the string representation of the object
223
+ # @return [String] String presentation of the object
224
+ def to_s
225
+ to_hash.to_s
226
+ end
227
+
228
+ # to_body is an alias to to_hash (backward compatibility)
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_body
231
+ to_hash
232
+ end
233
+
234
+ # Returns the object in the form of hash
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_hash
237
+ hash = {}
238
+ self.class.attribute_map.each_pair do |attr, param|
239
+ value = self.send(attr)
240
+ if value.nil?
241
+ is_nullable = self.class.openapi_nullable.include?(attr)
242
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
243
+ end
244
+
245
+ hash[param] = _to_hash(value)
246
+ end
247
+ hash
248
+ end
249
+
250
+ # Outputs non-array value in the form of hash
251
+ # For object, use to_hash. Otherwise, just return the value
252
+ # @param [Object] value Any valid value
253
+ # @return [Hash] Returns the value in the form of hash
254
+ def _to_hash(value)
255
+ if value.is_a?(Array)
256
+ value.compact.map { |v| _to_hash(v) }
257
+ elsif value.is_a?(Hash)
258
+ {}.tap do |hash|
259
+ value.each { |k, v| hash[k] = _to_hash(v) }
260
+ end
261
+ elsif value.respond_to? :to_hash
262
+ value.to_hash
263
+ else
264
+ value
265
+ end
266
+ end
267
+ end
268
+ end
@@ -15,11 +15,11 @@ require 'date'
15
15
  module PulpAnsibleClient
16
16
  # A serializer for CollectionVersion Content.
17
17
  class AnsibleCollectionVersionResponse
18
+ attr_accessor :pulp_href
19
+
18
20
  # Timestamp of creation.
19
21
  attr_accessor :pulp_created
20
22
 
21
- attr_accessor :pulp_href
22
-
23
23
  # Artifact file representing the physical content
24
24
  attr_accessor :artifact
25
25
 
@@ -97,8 +97,8 @@ module PulpAnsibleClient
97
97
  # Attribute mapping from ruby-style variable name to JSON key.
98
98
  def self.attribute_map
99
99
  {
100
- :'pulp_created' => :'pulp_created',
101
100
  :'pulp_href' => :'pulp_href',
101
+ :'pulp_created' => :'pulp_created',
102
102
  :'artifact' => :'artifact',
103
103
  :'sha256' => :'sha256',
104
104
  :'md5' => :'md5',
@@ -130,8 +130,8 @@ module PulpAnsibleClient
130
130
  # Attribute type mapping.
131
131
  def self.openapi_types
132
132
  {
133
- :'pulp_created' => :'DateTime',
134
133
  :'pulp_href' => :'String',
134
+ :'pulp_created' => :'DateTime',
135
135
  :'artifact' => :'String',
136
136
  :'sha256' => :'String',
137
137
  :'md5' => :'String',
@@ -182,14 +182,14 @@ module PulpAnsibleClient
182
182
  h[k.to_sym] = v
183
183
  }
184
184
 
185
- if attributes.key?(:'pulp_created')
186
- self.pulp_created = attributes[:'pulp_created']
187
- end
188
-
189
185
  if attributes.key?(:'pulp_href')
190
186
  self.pulp_href = attributes[:'pulp_href']
191
187
  end
192
188
 
189
+ if attributes.key?(:'pulp_created')
190
+ self.pulp_created = attributes[:'pulp_created']
191
+ end
192
+
193
193
  if attributes.key?(:'artifact')
194
194
  self.artifact = attributes[:'artifact']
195
195
  end
@@ -435,8 +435,8 @@ module PulpAnsibleClient
435
435
  def ==(o)
436
436
  return true if self.equal?(o)
437
437
  self.class == o.class &&
438
- pulp_created == o.pulp_created &&
439
438
  pulp_href == o.pulp_href &&
439
+ pulp_created == o.pulp_created &&
440
440
  artifact == o.artifact &&
441
441
  sha256 == o.sha256 &&
442
442
  md5 == o.md5 &&
@@ -473,7 +473,7 @@ module PulpAnsibleClient
473
473
  # Calculates hash code according to all attributes.
474
474
  # @return [Integer] Hash code
475
475
  def hash
476
- [pulp_created, pulp_href, artifact, sha256, md5, sha1, sha224, sha384, sha512, id, authors, contents, dependencies, description, docs_blob, manifest, files, documentation, homepage, issues, license, name, namespace, origin_repository, tags, version, requires_ansible].hash
476
+ [pulp_href, pulp_created, artifact, sha256, md5, sha1, sha224, sha384, sha512, id, authors, contents, dependencies, description, docs_blob, manifest, files, documentation, homepage, issues, license, name, namespace, origin_repository, tags, version, requires_ansible].hash
477
477
  end
478
478
 
479
479
  # Builds the object from hash