pulp_ansible_client 0.16.7 → 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 (215) 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/AnsibleCollectionsApi.md +229 -1
  13. data/docs/AnsibleCopyApi.md +1 -1
  14. data/docs/AnsibleGitRemote.md +28 -28
  15. data/docs/AnsibleGitRemoteResponse.md +26 -26
  16. data/docs/AnsibleRepositoryMark.md +19 -0
  17. data/docs/ApiCollectionsApi.md +1 -1
  18. data/docs/ApiRolesApi.md +1 -1
  19. data/docs/CollectionImportApi.md +1 -1
  20. data/docs/CollectionNamespaceResponse.md +3 -1
  21. data/docs/CollectionSummaryResponse.md +35 -0
  22. data/docs/CollectionVersionCopyMove.md +21 -0
  23. data/docs/CollectionVersionListResponse.md +3 -1
  24. data/docs/CollectionVersionResponse.md +2 -0
  25. data/docs/CollectionVersionSearchList.md +27 -0
  26. data/docs/CollectionVersionSearchListResponse.md +29 -0
  27. data/docs/ContentCollectionDeprecationsApi.md +1 -1
  28. data/docs/ContentCollectionMarksApi.md +198 -0
  29. data/docs/ContentCollectionSignaturesApi.md +1 -1
  30. data/docs/ContentCollectionVersionsApi.md +5 -5
  31. data/docs/ContentNamespacesApi.md +220 -0
  32. data/docs/ContentRolesApi.md +1 -1
  33. data/docs/DistributionsAnsibleApi.md +233 -1
  34. data/docs/GalaxyDetailApi.md +1 -1
  35. data/docs/MyPermissionsResponse.md +17 -0
  36. data/docs/NamespaceLink.md +19 -0
  37. data/docs/NamespaceLinkResponse.md +19 -0
  38. data/docs/NestedRole.md +21 -0
  39. data/docs/NestedRoleResponse.md +21 -0
  40. data/docs/ObjectRolesResponse.md +17 -0
  41. data/docs/PaginatedCollectionVersionSearchListResponseList.md +21 -0
  42. data/docs/PaginatedansibleAnsibleNamespaceMetadataResponseList.md +23 -0
  43. data/docs/PaginatedansibleCollectionVersionMarkResponseList.md +23 -0
  44. data/docs/PatchedansibleAnsibleNamespaceMetadata.md +29 -0
  45. data/docs/PatchedansibleAnsibleRepository.md +4 -2
  46. data/docs/PatchedansibleGitRemote.md +28 -28
  47. data/docs/ProgressReportResponse.md +27 -0
  48. data/docs/PulpAnsibleApiApi.md +1 -1
  49. data/docs/PulpAnsibleApiV2CollectionsVersionsApi.md +1 -1
  50. data/docs/PulpAnsibleApiV3Api.md +1 -1
  51. data/docs/PulpAnsibleApiV3ArtifactsCollectionsApi.md +1 -1
  52. data/docs/PulpAnsibleApiV3CollectionVersionsAllApi.md +1 -1
  53. data/docs/PulpAnsibleApiV3CollectionsAllApi.md +1 -1
  54. data/docs/PulpAnsibleApiV3CollectionsApi.md +1 -1
  55. data/docs/PulpAnsibleApiV3CollectionsVersionsApi.md +1 -1
  56. data/docs/PulpAnsibleApiV3CollectionsVersionsDocsBlobApi.md +1 -1
  57. data/docs/PulpAnsibleApiV3NamespacesApi.md +158 -0
  58. data/docs/PulpAnsibleApiV3PluginAnsibleClientConfigurationApi.md +7 -7
  59. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsApi.md +1 -1
  60. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsApi.md +1 -1
  61. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsApi.md +1 -1
  62. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsApi.md +1 -1
  63. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexApi.md +1 -1
  64. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsApi.md +1 -1
  65. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobApi.md +1 -1
  66. data/docs/PulpAnsibleApiV3PluginAnsibleContentNamespacesApi.md +363 -0
  67. data/docs/PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsApi.md +168 -0
  68. data/docs/PulpAnsibleArtifactsCollectionsV3Api.md +1 -1
  69. data/docs/PulpAnsibleDefaultApiApi.md +1 -1
  70. data/docs/PulpAnsibleDefaultApiV3Api.md +1 -1
  71. data/docs/PulpAnsibleDefaultApiV3ArtifactsCollectionsApi.md +1 -1
  72. data/docs/PulpAnsibleDefaultApiV3CollectionVersionsAllApi.md +1 -1
  73. data/docs/PulpAnsibleDefaultApiV3CollectionsAllApi.md +1 -1
  74. data/docs/PulpAnsibleDefaultApiV3CollectionsApi.md +1 -1
  75. data/docs/PulpAnsibleDefaultApiV3CollectionsVersionsApi.md +1 -1
  76. data/docs/PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobApi.md +1 -1
  77. data/docs/PulpAnsibleDefaultApiV3NamespacesApi.md +154 -0
  78. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationApi.md +7 -7
  79. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsApi.md +1 -1
  80. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsApi.md +1 -1
  81. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsApi.md +1 -1
  82. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsApi.md +1 -1
  83. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.md +1 -1
  84. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsApi.md +1 -1
  85. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobApi.md +1 -1
  86. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesApi.md +353 -0
  87. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsApi.md +164 -0
  88. data/docs/PulpAnsibleTagsApi.md +1 -1
  89. data/docs/RemotesCollectionApi.md +237 -1
  90. data/docs/RemotesGitApi.md +229 -1
  91. data/docs/RemotesRoleApi.md +229 -1
  92. data/docs/RepositoriesAnsibleApi.md +465 -1
  93. data/docs/RepositoriesAnsibleVersionsApi.md +1 -1
  94. data/docs/Repository.md +25 -0
  95. data/docs/RepositoryAddRemoveContent.md +2 -2
  96. data/docs/RepositoryResponse.md +33 -0
  97. data/docs/Task.md +19 -0
  98. data/docs/TaskResponse.md +45 -0
  99. data/docs/UnpaginatedCollectionVersionResponse.md +2 -0
  100. data/docs/VersionsApi.md +11 -11
  101. data/lib/pulp_ansible_client/api/ansible_collections_api.rb +268 -0
  102. data/lib/pulp_ansible_client/api/content_collection_marks_api.rb +247 -0
  103. data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +6 -6
  104. data/lib/pulp_ansible_client/api/content_namespaces_api.rb +276 -0
  105. data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +274 -0
  106. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_namespaces_api.rb +209 -0
  107. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_client_configuration_api.rb +8 -8
  108. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_namespaces_api.rb +531 -0
  109. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_search_collection_versions_api.rb +229 -0
  110. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_namespaces_api.rb +197 -0
  111. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_client_configuration_api.rb +7 -7
  112. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_namespaces_api.rb +501 -0
  113. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_search_collection_versions_api.rb +217 -0
  114. data/lib/pulp_ansible_client/api/remotes_collection_api.rb +281 -1
  115. data/lib/pulp_ansible_client/api/remotes_git_api.rb +268 -0
  116. data/lib/pulp_ansible_client/api/remotes_role_api.rb +268 -0
  117. data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +564 -0
  118. data/lib/pulp_ansible_client/api/versions_api.rb +12 -12
  119. data/lib/pulp_ansible_client/configuration.rb +3 -3
  120. data/lib/pulp_ansible_client/models/ansible_ansible_namespace_metadata.rb +359 -0
  121. data/lib/pulp_ansible_client/models/ansible_ansible_namespace_metadata_response.rb +402 -0
  122. data/lib/pulp_ansible_client/models/ansible_ansible_repository.rb +15 -6
  123. data/lib/pulp_ansible_client/models/ansible_ansible_repository_response.rb +24 -6
  124. data/lib/pulp_ansible_client/models/ansible_collection_remote_response.rb +13 -4
  125. data/lib/pulp_ansible_client/models/ansible_collection_remote_response_hidden_fields.rb +0 -10
  126. data/lib/pulp_ansible_client/models/ansible_collection_version.rb +18 -18
  127. data/lib/pulp_ansible_client/models/ansible_collection_version_mark.rb +258 -0
  128. data/lib/pulp_ansible_client/models/ansible_collection_version_mark_response.rb +268 -0
  129. data/lib/pulp_ansible_client/models/ansible_git_remote.rb +241 -241
  130. data/lib/pulp_ansible_client/models/ansible_git_remote_response.rb +159 -159
  131. data/lib/pulp_ansible_client/models/ansible_repository_mark.rb +260 -0
  132. data/lib/pulp_ansible_client/models/collection_namespace_response.rb +13 -4
  133. data/lib/pulp_ansible_client/models/collection_summary_response.rb +359 -0
  134. data/lib/pulp_ansible_client/models/collection_version_copy_move.rb +242 -0
  135. data/lib/pulp_ansible_client/models/collection_version_list_response.rb +16 -5
  136. data/lib/pulp_ansible_client/models/collection_version_response.rb +12 -1
  137. data/lib/pulp_ansible_client/models/collection_version_search_list.rb +279 -0
  138. data/lib/pulp_ansible_client/models/collection_version_search_list_response.rb +287 -0
  139. data/lib/pulp_ansible_client/models/my_permissions_response.rb +213 -0
  140. data/lib/pulp_ansible_client/models/namespace_link.rb +282 -0
  141. data/lib/pulp_ansible_client/models/namespace_link_response.rb +264 -0
  142. data/lib/pulp_ansible_client/models/nested_role.rb +253 -0
  143. data/lib/pulp_ansible_client/models/nested_role_response.rb +234 -0
  144. data/lib/pulp_ansible_client/models/object_roles_response.rb +213 -0
  145. data/lib/pulp_ansible_client/models/paginated_collection_version_search_list_response_list.rb +226 -0
  146. data/lib/pulp_ansible_client/models/paginatedansible_ansible_namespace_metadata_response_list.rb +237 -0
  147. data/lib/pulp_ansible_client/models/paginatedansible_collection_version_mark_response_list.rb +237 -0
  148. data/lib/pulp_ansible_client/models/patchedansible_ansible_namespace_metadata.rb +350 -0
  149. data/lib/pulp_ansible_client/models/patchedansible_ansible_repository.rb +15 -6
  150. data/lib/pulp_ansible_client/models/patchedansible_git_remote.rb +223 -223
  151. data/lib/pulp_ansible_client/models/progress_report_response.rb +259 -0
  152. data/lib/pulp_ansible_client/models/repository.rb +306 -0
  153. data/lib/pulp_ansible_client/models/repository_add_remove_content.rb +2 -2
  154. data/lib/pulp_ansible_client/models/repository_response.rb +309 -0
  155. data/lib/pulp_ansible_client/models/task.rb +266 -0
  156. data/lib/pulp_ansible_client/models/task_response.rb +366 -0
  157. data/lib/pulp_ansible_client/models/unpaginated_collection_version_response.rb +12 -1
  158. data/lib/pulp_ansible_client/version.rb +1 -1
  159. data/lib/pulp_ansible_client.rb +32 -0
  160. data/spec/api/ansible_collections_api_spec.rb +50 -0
  161. data/spec/api/content_collection_marks_api_spec.rb +83 -0
  162. data/spec/api/content_collection_versions_api_spec.rb +2 -2
  163. data/spec/api/content_namespaces_api_spec.rb +93 -0
  164. data/spec/api/distributions_ansible_api_spec.rb +52 -0
  165. data/spec/api/pulp_ansible_api_v3_namespaces_api_spec.rb +77 -0
  166. data/spec/api/pulp_ansible_api_v3_plugin_ansible_client_configuration_api_spec.rb +3 -3
  167. data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_namespaces_api_spec.rb +131 -0
  168. data/spec/api/pulp_ansible_api_v3_plugin_ansible_search_collection_versions_api_spec.rb +83 -0
  169. data/spec/api/pulp_ansible_default_api_v3_namespaces_api_spec.rb +75 -0
  170. data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_client_configuration_api_spec.rb +3 -3
  171. data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_namespaces_api_spec.rb +126 -0
  172. data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_search_collection_versions_api_spec.rb +81 -0
  173. data/spec/api/remotes_collection_api_spec.rb +54 -0
  174. data/spec/api/remotes_git_api_spec.rb +50 -0
  175. data/spec/api/remotes_role_api_spec.rb +50 -0
  176. data/spec/api/repositories_ansible_api_spec.rb +106 -0
  177. data/spec/api/versions_api_spec.rb +4 -4
  178. data/spec/configuration_spec.rb +3 -3
  179. data/spec/models/ansible_ansible_namespace_metadata_response_spec.rb +95 -0
  180. data/spec/models/ansible_ansible_namespace_metadata_spec.rb +77 -0
  181. data/spec/models/ansible_ansible_repository_response_spec.rb +12 -0
  182. data/spec/models/ansible_ansible_repository_spec.rb +6 -0
  183. data/spec/models/ansible_collection_remote_response_spec.rb +6 -0
  184. data/spec/models/ansible_collection_version_mark_response_spec.rb +59 -0
  185. data/spec/models/ansible_collection_version_mark_spec.rb +47 -0
  186. data/spec/models/ansible_collection_version_spec.rb +3 -3
  187. data/spec/models/ansible_git_remote_response_spec.rb +18 -18
  188. data/spec/models/ansible_git_remote_spec.rb +19 -19
  189. data/spec/models/ansible_repository_mark_spec.rb +47 -0
  190. data/spec/models/collection_namespace_response_spec.rb +6 -0
  191. data/spec/models/collection_summary_response_spec.rb +95 -0
  192. data/spec/models/collection_version_copy_move_spec.rb +53 -0
  193. data/spec/models/collection_version_list_response_spec.rb +6 -0
  194. data/spec/models/collection_version_response_spec.rb +6 -0
  195. data/spec/models/collection_version_search_list_response_spec.rb +77 -0
  196. data/spec/models/collection_version_search_list_spec.rb +71 -0
  197. data/spec/models/my_permissions_response_spec.rb +41 -0
  198. data/spec/models/namespace_link_response_spec.rb +47 -0
  199. data/spec/models/namespace_link_spec.rb +47 -0
  200. data/spec/models/nested_role_response_spec.rb +53 -0
  201. data/spec/models/nested_role_spec.rb +53 -0
  202. data/spec/models/object_roles_response_spec.rb +41 -0
  203. data/spec/models/paginated_collection_version_search_list_response_list_spec.rb +53 -0
  204. data/spec/models/paginatedansible_ansible_namespace_metadata_response_list_spec.rb +59 -0
  205. data/spec/models/paginatedansible_collection_version_mark_response_list_spec.rb +59 -0
  206. data/spec/models/patchedansible_ansible_namespace_metadata_spec.rb +77 -0
  207. data/spec/models/patchedansible_ansible_repository_spec.rb +6 -0
  208. data/spec/models/patchedansible_git_remote_spec.rb +19 -19
  209. data/spec/models/progress_report_response_spec.rb +71 -0
  210. data/spec/models/repository_response_spec.rb +89 -0
  211. data/spec/models/repository_spec.rb +65 -0
  212. data/spec/models/task_response_spec.rb +125 -0
  213. data/spec/models/task_spec.rb +47 -0
  214. data/spec/models/unpaginated_collection_version_response_spec.rb +6 -0
  215. metadata +248 -120
@@ -0,0 +1,260 @@
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 the mark action.
17
+ class AnsibleRepositoryMark
18
+ # List of collection version hrefs to mark, use * to mark all content in repository
19
+ attr_accessor :content_units
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
+ :'content_units' => :'content_units',
28
+ :'value' => :'value'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'content_units' => :'Array<AnyType>',
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::AnsibleRepositoryMark` 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::AnsibleRepositoryMark`. 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?(:'content_units')
62
+ if (value = attributes[:'content_units']).is_a?(Array)
63
+ self.content_units = value
64
+ end
65
+ end
66
+
67
+ if attributes.key?(:'value')
68
+ self.value = attributes[:'value']
69
+ end
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properties with the reasons
74
+ def list_invalid_properties
75
+ invalid_properties = Array.new
76
+ if @content_units.nil?
77
+ invalid_properties.push('invalid value for "content_units", content_units cannot be nil.')
78
+ end
79
+
80
+ if @value.nil?
81
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
82
+ end
83
+
84
+ if @value.to_s.length < 1
85
+ invalid_properties.push('invalid value for "value", the character length must be great than or equal to 1.')
86
+ end
87
+
88
+ pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
89
+ if @value !~ pattern
90
+ invalid_properties.push("invalid value for \"value\", must conform to the pattern #{pattern}.")
91
+ end
92
+
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ return false if @content_units.nil?
100
+ return false if @value.nil?
101
+ return false if @value.to_s.length < 1
102
+ return false if @value !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
103
+ true
104
+ end
105
+
106
+ # Custom attribute writer method with validation
107
+ # @param [Object] value Value to be assigned
108
+ def value=(value)
109
+ if value.nil?
110
+ fail ArgumentError, 'value cannot be nil'
111
+ end
112
+
113
+ if value.to_s.length < 1
114
+ fail ArgumentError, 'invalid value for "value", the character length must be great than or equal to 1.'
115
+ end
116
+
117
+ pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
118
+ if value !~ pattern
119
+ fail ArgumentError, "invalid value for \"value\", must conform to the pattern #{pattern}."
120
+ end
121
+
122
+ @value = value
123
+ end
124
+
125
+ # Checks equality by comparing each attribute.
126
+ # @param [Object] Object to be compared
127
+ def ==(o)
128
+ return true if self.equal?(o)
129
+ self.class == o.class &&
130
+ content_units == o.content_units &&
131
+ value == o.value
132
+ end
133
+
134
+ # @see the `==` method
135
+ # @param [Object] Object to be compared
136
+ def eql?(o)
137
+ self == o
138
+ end
139
+
140
+ # Calculates hash code according to all attributes.
141
+ # @return [Integer] Hash code
142
+ def hash
143
+ [content_units, value].hash
144
+ end
145
+
146
+ # Builds the object from hash
147
+ # @param [Hash] attributes Model attributes in the form of hash
148
+ # @return [Object] Returns the model itself
149
+ def self.build_from_hash(attributes)
150
+ new.build_from_hash(attributes)
151
+ end
152
+
153
+ # Builds the object from hash
154
+ # @param [Hash] attributes Model attributes in the form of hash
155
+ # @return [Object] Returns the model itself
156
+ def build_from_hash(attributes)
157
+ return nil unless attributes.is_a?(Hash)
158
+ self.class.openapi_types.each_pair do |key, type|
159
+ if type =~ /\AArray<(.*)>/i
160
+ # check to ensure the input is an array given that the attribute
161
+ # is documented as an array but the input is not
162
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
163
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
164
+ end
165
+ elsif !attributes[self.class.attribute_map[key]].nil?
166
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
167
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
168
+ end
169
+
170
+ self
171
+ end
172
+
173
+ # Deserializes the data based on type
174
+ # @param string type Data type
175
+ # @param string value Value to be deserialized
176
+ # @return [Object] Deserialized data
177
+ def _deserialize(type, value)
178
+ case type.to_sym
179
+ when :DateTime
180
+ DateTime.parse(value)
181
+ when :Date
182
+ Date.parse(value)
183
+ when :String
184
+ value.to_s
185
+ when :Integer
186
+ value.to_i
187
+ when :Float
188
+ value.to_f
189
+ when :Boolean
190
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
191
+ true
192
+ else
193
+ false
194
+ end
195
+ when :Object
196
+ # generic object (usually a Hash), return directly
197
+ value
198
+ when /\AArray<(?<inner_type>.+)>\z/
199
+ inner_type = Regexp.last_match[:inner_type]
200
+ value.map { |v| _deserialize(inner_type, v) }
201
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
202
+ k_type = Regexp.last_match[:k_type]
203
+ v_type = Regexp.last_match[:v_type]
204
+ {}.tap do |hash|
205
+ value.each do |k, v|
206
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
207
+ end
208
+ end
209
+ else # model
210
+ PulpAnsibleClient.const_get(type).build_from_hash(value)
211
+ end
212
+ end
213
+
214
+ # Returns the string representation of the object
215
+ # @return [String] String presentation of the object
216
+ def to_s
217
+ to_hash.to_s
218
+ end
219
+
220
+ # to_body is an alias to to_hash (backward compatibility)
221
+ # @return [Hash] Returns the object in the form of hash
222
+ def to_body
223
+ to_hash
224
+ end
225
+
226
+ # Returns the object in the form of hash
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_hash
229
+ hash = {}
230
+ self.class.attribute_map.each_pair do |attr, param|
231
+ value = self.send(attr)
232
+ if value.nil?
233
+ is_nullable = self.class.openapi_nullable.include?(attr)
234
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
235
+ end
236
+
237
+ hash[param] = _to_hash(value)
238
+ end
239
+ hash
240
+ end
241
+
242
+ # Outputs non-array value in the form of hash
243
+ # For object, use to_hash. Otherwise, just return the value
244
+ # @param [Object] value Any valid value
245
+ # @return [Hash] Returns the value in the form of hash
246
+ def _to_hash(value)
247
+ if value.is_a?(Array)
248
+ value.compact.map { |v| _to_hash(v) }
249
+ elsif value.is_a?(Hash)
250
+ {}.tap do |hash|
251
+ value.each { |k, v| hash[k] = _to_hash(v) }
252
+ end
253
+ elsif value.respond_to? :to_hash
254
+ value.to_hash
255
+ else
256
+ value
257
+ end
258
+ end
259
+ end
260
+ end
@@ -17,17 +17,21 @@ module PulpAnsibleClient
17
17
  class CollectionNamespaceResponse
18
18
  attr_accessor :name
19
19
 
20
+ attr_accessor :metadata_sha256
21
+
20
22
  # Attribute mapping from ruby-style variable name to JSON key.
21
23
  def self.attribute_map
22
24
  {
23
- :'name' => :'name'
25
+ :'name' => :'name',
26
+ :'metadata_sha256' => :'metadata_sha256'
24
27
  }
25
28
  end
26
29
 
27
30
  # Attribute type mapping.
28
31
  def self.openapi_types
29
32
  {
30
- :'name' => :'String'
33
+ :'name' => :'String',
34
+ :'metadata_sha256' => :'String'
31
35
  }
32
36
  end
33
37
 
@@ -55,6 +59,10 @@ module PulpAnsibleClient
55
59
  if attributes.key?(:'name')
56
60
  self.name = attributes[:'name']
57
61
  end
62
+
63
+ if attributes.key?(:'metadata_sha256')
64
+ self.metadata_sha256 = attributes[:'metadata_sha256']
65
+ end
58
66
  end
59
67
 
60
68
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -80,7 +88,8 @@ module PulpAnsibleClient
80
88
  def ==(o)
81
89
  return true if self.equal?(o)
82
90
  self.class == o.class &&
83
- name == o.name
91
+ name == o.name &&
92
+ metadata_sha256 == o.metadata_sha256
84
93
  end
85
94
 
86
95
  # @see the `==` method
@@ -92,7 +101,7 @@ module PulpAnsibleClient
92
101
  # Calculates hash code according to all attributes.
93
102
  # @return [Integer] Hash code
94
103
  def hash
95
- [name].hash
104
+ [name, metadata_sha256].hash
96
105
  end
97
106
 
98
107
  # Builds the object from hash
@@ -0,0 +1,359 @@
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
+ # Collection Version serializer without docs blob.
17
+ class CollectionSummaryResponse
18
+ attr_accessor :pulp_href
19
+
20
+ # The namespace of the collection.
21
+ attr_accessor :namespace
22
+
23
+ # The name of the collection.
24
+ attr_accessor :name
25
+
26
+ # The version of the collection.
27
+ attr_accessor :version
28
+
29
+ # The version of Ansible required to use the collection. Multiple versions can be separated with a comma.
30
+ attr_accessor :requires_ansible
31
+
32
+ # Timestamp of creation.
33
+ attr_accessor :pulp_created
34
+
35
+ # A JSON field with data about the contents.
36
+ attr_accessor :contents
37
+
38
+ # A dict declaring Collections that this collection requires to be installed for it to be usable.
39
+ attr_accessor :dependencies
40
+
41
+ # A short summary description of the collection.
42
+ attr_accessor :description
43
+
44
+ attr_accessor :tags
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'pulp_href' => :'pulp_href',
50
+ :'namespace' => :'namespace',
51
+ :'name' => :'name',
52
+ :'version' => :'version',
53
+ :'requires_ansible' => :'requires_ansible',
54
+ :'pulp_created' => :'pulp_created',
55
+ :'contents' => :'contents',
56
+ :'dependencies' => :'dependencies',
57
+ :'description' => :'description',
58
+ :'tags' => :'tags'
59
+ }
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'pulp_href' => :'String',
66
+ :'namespace' => :'String',
67
+ :'name' => :'String',
68
+ :'version' => :'String',
69
+ :'requires_ansible' => :'String',
70
+ :'pulp_created' => :'DateTime',
71
+ :'contents' => :'Object',
72
+ :'dependencies' => :'Object',
73
+ :'description' => :'String',
74
+ :'tags' => :'Array<AnsibleTagResponse>'
75
+ }
76
+ end
77
+
78
+ # List of attributes with nullable: true
79
+ def self.openapi_nullable
80
+ Set.new([
81
+ :'requires_ansible',
82
+ ])
83
+ end
84
+
85
+ # Initializes the object
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ def initialize(attributes = {})
88
+ if (!attributes.is_a?(Hash))
89
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::CollectionSummaryResponse` initialize method"
90
+ end
91
+
92
+ # check to see if the attribute exists and convert string to symbol for hash key
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!self.class.attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::CollectionSummaryResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'pulp_href')
101
+ self.pulp_href = attributes[:'pulp_href']
102
+ end
103
+
104
+ if attributes.key?(:'namespace')
105
+ self.namespace = attributes[:'namespace']
106
+ end
107
+
108
+ if attributes.key?(:'name')
109
+ self.name = attributes[:'name']
110
+ end
111
+
112
+ if attributes.key?(:'version')
113
+ self.version = attributes[:'version']
114
+ end
115
+
116
+ if attributes.key?(:'requires_ansible')
117
+ self.requires_ansible = attributes[:'requires_ansible']
118
+ end
119
+
120
+ if attributes.key?(:'pulp_created')
121
+ self.pulp_created = attributes[:'pulp_created']
122
+ end
123
+
124
+ if attributes.key?(:'contents')
125
+ self.contents = attributes[:'contents']
126
+ end
127
+
128
+ if attributes.key?(:'dependencies')
129
+ self.dependencies = attributes[:'dependencies']
130
+ end
131
+
132
+ if attributes.key?(:'description')
133
+ self.description = attributes[:'description']
134
+ end
135
+
136
+ if attributes.key?(:'tags')
137
+ if (value = attributes[:'tags']).is_a?(Array)
138
+ self.tags = value
139
+ end
140
+ end
141
+ end
142
+
143
+ # Show invalid properties with the reasons. Usually used together with valid?
144
+ # @return Array for valid properties with the reasons
145
+ def list_invalid_properties
146
+ invalid_properties = Array.new
147
+ if !@namespace.nil? && @namespace.to_s.length > 64
148
+ invalid_properties.push('invalid value for "namespace", the character length must be smaller than or equal to 64.')
149
+ end
150
+
151
+ if !@name.nil? && @name.to_s.length > 64
152
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 64.')
153
+ end
154
+
155
+ if !@version.nil? && @version.to_s.length > 128
156
+ invalid_properties.push('invalid value for "version", the character length must be smaller than or equal to 128.')
157
+ end
158
+
159
+ if !@requires_ansible.nil? && @requires_ansible.to_s.length > 255
160
+ invalid_properties.push('invalid value for "requires_ansible", the character length must be smaller than or equal to 255.')
161
+ end
162
+
163
+ invalid_properties
164
+ end
165
+
166
+ # Check to see if the all the properties in the model are valid
167
+ # @return true if the model is valid
168
+ def valid?
169
+ return false if !@namespace.nil? && @namespace.to_s.length > 64
170
+ return false if !@name.nil? && @name.to_s.length > 64
171
+ return false if !@version.nil? && @version.to_s.length > 128
172
+ return false if !@requires_ansible.nil? && @requires_ansible.to_s.length > 255
173
+ true
174
+ end
175
+
176
+ # Custom attribute writer method with validation
177
+ # @param [Object] namespace Value to be assigned
178
+ def namespace=(namespace)
179
+ if !namespace.nil? && namespace.to_s.length > 64
180
+ fail ArgumentError, 'invalid value for "namespace", the character length must be smaller than or equal to 64.'
181
+ end
182
+
183
+ @namespace = namespace
184
+ end
185
+
186
+ # Custom attribute writer method with validation
187
+ # @param [Object] name Value to be assigned
188
+ def name=(name)
189
+ if !name.nil? && name.to_s.length > 64
190
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 64.'
191
+ end
192
+
193
+ @name = name
194
+ end
195
+
196
+ # Custom attribute writer method with validation
197
+ # @param [Object] version Value to be assigned
198
+ def version=(version)
199
+ if !version.nil? && version.to_s.length > 128
200
+ fail ArgumentError, 'invalid value for "version", the character length must be smaller than or equal to 128.'
201
+ end
202
+
203
+ @version = version
204
+ end
205
+
206
+ # Custom attribute writer method with validation
207
+ # @param [Object] requires_ansible Value to be assigned
208
+ def requires_ansible=(requires_ansible)
209
+ if !requires_ansible.nil? && requires_ansible.to_s.length > 255
210
+ fail ArgumentError, 'invalid value for "requires_ansible", the character length must be smaller than or equal to 255.'
211
+ end
212
+
213
+ @requires_ansible = requires_ansible
214
+ end
215
+
216
+ # Checks equality by comparing each attribute.
217
+ # @param [Object] Object to be compared
218
+ def ==(o)
219
+ return true if self.equal?(o)
220
+ self.class == o.class &&
221
+ pulp_href == o.pulp_href &&
222
+ namespace == o.namespace &&
223
+ name == o.name &&
224
+ version == o.version &&
225
+ requires_ansible == o.requires_ansible &&
226
+ pulp_created == o.pulp_created &&
227
+ contents == o.contents &&
228
+ dependencies == o.dependencies &&
229
+ description == o.description &&
230
+ tags == o.tags
231
+ end
232
+
233
+ # @see the `==` method
234
+ # @param [Object] Object to be compared
235
+ def eql?(o)
236
+ self == o
237
+ end
238
+
239
+ # Calculates hash code according to all attributes.
240
+ # @return [Integer] Hash code
241
+ def hash
242
+ [pulp_href, namespace, name, version, requires_ansible, pulp_created, contents, dependencies, description, tags].hash
243
+ end
244
+
245
+ # Builds the object from hash
246
+ # @param [Hash] attributes Model attributes in the form of hash
247
+ # @return [Object] Returns the model itself
248
+ def self.build_from_hash(attributes)
249
+ new.build_from_hash(attributes)
250
+ end
251
+
252
+ # Builds the object from hash
253
+ # @param [Hash] attributes Model attributes in the form of hash
254
+ # @return [Object] Returns the model itself
255
+ def build_from_hash(attributes)
256
+ return nil unless attributes.is_a?(Hash)
257
+ self.class.openapi_types.each_pair do |key, type|
258
+ if type =~ /\AArray<(.*)>/i
259
+ # check to ensure the input is an array given that the attribute
260
+ # is documented as an array but the input is not
261
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
262
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
263
+ end
264
+ elsif !attributes[self.class.attribute_map[key]].nil?
265
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
266
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
267
+ end
268
+
269
+ self
270
+ end
271
+
272
+ # Deserializes the data based on type
273
+ # @param string type Data type
274
+ # @param string value Value to be deserialized
275
+ # @return [Object] Deserialized data
276
+ def _deserialize(type, value)
277
+ case type.to_sym
278
+ when :DateTime
279
+ DateTime.parse(value)
280
+ when :Date
281
+ Date.parse(value)
282
+ when :String
283
+ value.to_s
284
+ when :Integer
285
+ value.to_i
286
+ when :Float
287
+ value.to_f
288
+ when :Boolean
289
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
290
+ true
291
+ else
292
+ false
293
+ end
294
+ when :Object
295
+ # generic object (usually a Hash), return directly
296
+ value
297
+ when /\AArray<(?<inner_type>.+)>\z/
298
+ inner_type = Regexp.last_match[:inner_type]
299
+ value.map { |v| _deserialize(inner_type, v) }
300
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
301
+ k_type = Regexp.last_match[:k_type]
302
+ v_type = Regexp.last_match[:v_type]
303
+ {}.tap do |hash|
304
+ value.each do |k, v|
305
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
306
+ end
307
+ end
308
+ else # model
309
+ PulpAnsibleClient.const_get(type).build_from_hash(value)
310
+ end
311
+ end
312
+
313
+ # Returns the string representation of the object
314
+ # @return [String] String presentation of the object
315
+ def to_s
316
+ to_hash.to_s
317
+ end
318
+
319
+ # to_body is an alias to to_hash (backward compatibility)
320
+ # @return [Hash] Returns the object in the form of hash
321
+ def to_body
322
+ to_hash
323
+ end
324
+
325
+ # Returns the object in the form of hash
326
+ # @return [Hash] Returns the object in the form of hash
327
+ def to_hash
328
+ hash = {}
329
+ self.class.attribute_map.each_pair do |attr, param|
330
+ value = self.send(attr)
331
+ if value.nil?
332
+ is_nullable = self.class.openapi_nullable.include?(attr)
333
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
334
+ end
335
+
336
+ hash[param] = _to_hash(value)
337
+ end
338
+ hash
339
+ end
340
+
341
+ # Outputs non-array value in the form of hash
342
+ # For object, use to_hash. Otherwise, just return the value
343
+ # @param [Object] value Any valid value
344
+ # @return [Hash] Returns the value in the form of hash
345
+ def _to_hash(value)
346
+ if value.is_a?(Array)
347
+ value.compact.map { |v| _to_hash(v) }
348
+ elsif value.is_a?(Hash)
349
+ {}.tap do |hash|
350
+ value.each { |k, v| hash[k] = _to_hash(v) }
351
+ end
352
+ elsif value.respond_to? :to_hash
353
+ value.to_hash
354
+ else
355
+ value
356
+ end
357
+ end
358
+ end
359
+ end