pulp_rpm_client 3.27.2 → 3.28.1

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 (322) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -9
  3. data/docs/AcsRpmApi.md +343 -156
  4. data/docs/AddonResponse.md +16 -15
  5. data/docs/ArtifactResponse.md +30 -29
  6. data/docs/AsyncOperationResponse.md +8 -7
  7. data/docs/ChecksumResponse.md +10 -9
  8. data/docs/CompressionTypeEnum.md +4 -5
  9. data/docs/ContentAdvisoriesApi.md +275 -75
  10. data/docs/ContentDistributionTreesApi.md +227 -46
  11. data/docs/ContentModulemdDefaultsApi.md +262 -64
  12. data/docs/ContentModulemdObsoletesApi.md +255 -57
  13. data/docs/ContentModulemdsApi.md +271 -73
  14. data/docs/ContentPackagecategoriesApi.md +227 -46
  15. data/docs/ContentPackageenvironmentsApi.md +227 -46
  16. data/docs/ContentPackagegroupsApi.md +227 -46
  17. data/docs/ContentPackagelangpacksApi.md +227 -46
  18. data/docs/ContentPackagesApi.md +298 -98
  19. data/docs/ContentRepoMetadataFilesApi.md +227 -46
  20. data/docs/ContentSummaryResponse.md +12 -11
  21. data/docs/Copy.md +10 -9
  22. data/docs/DistributionsRpmApi.md +385 -182
  23. data/docs/ImageResponse.md +14 -13
  24. data/docs/MyPermissionsResponse.md +8 -7
  25. data/docs/NestedRole.md +12 -11
  26. data/docs/NestedRoleResponse.md +12 -11
  27. data/docs/ObjectRolesResponse.md +8 -7
  28. data/docs/PackageChecksumTypeEnum.md +4 -5
  29. data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
  30. data/docs/PaginatedrpmDistributionTreeResponseList.md +14 -13
  31. data/docs/PaginatedrpmModulemdDefaultsResponseList.md +14 -13
  32. data/docs/PaginatedrpmModulemdObsoleteResponseList.md +14 -13
  33. data/docs/PaginatedrpmModulemdResponseList.md +14 -13
  34. data/docs/PaginatedrpmPackageCategoryResponseList.md +14 -13
  35. data/docs/PaginatedrpmPackageEnvironmentResponseList.md +14 -13
  36. data/docs/PaginatedrpmPackageGroupResponseList.md +14 -13
  37. data/docs/PaginatedrpmPackageLangpacksResponseList.md +14 -13
  38. data/docs/PaginatedrpmPackageResponseList.md +14 -13
  39. data/docs/PaginatedrpmRepoMetadataFileResponseList.md +14 -13
  40. data/docs/PaginatedrpmRpmAlternateContentSourceResponseList.md +14 -13
  41. data/docs/PaginatedrpmRpmDistributionResponseList.md +14 -13
  42. data/docs/PaginatedrpmRpmPublicationResponseList.md +14 -13
  43. data/docs/PaginatedrpmRpmRemoteResponseList.md +14 -13
  44. data/docs/PaginatedrpmRpmRepositoryResponseList.md +14 -13
  45. data/docs/PaginatedrpmUlnRemoteResponseList.md +14 -13
  46. data/docs/PaginatedrpmUpdateRecordResponseList.md +14 -13
  47. data/docs/PatchedrpmRpmAlternateContentSource.md +14 -13
  48. data/docs/PatchedrpmRpmDistribution.md +22 -21
  49. data/docs/PatchedrpmRpmRemote.md +50 -49
  50. data/docs/PatchedrpmRpmRepository.md +40 -39
  51. data/docs/PatchedrpmUlnRemote.md +50 -49
  52. data/docs/PolicyEnum.md +4 -5
  53. data/docs/PrunePackages.md +12 -11
  54. data/docs/PublicationsRpmApi.md +267 -130
  55. data/docs/RemotesRpmApi.md +389 -184
  56. data/docs/RemotesUlnApi.md +389 -184
  57. data/docs/Repair.md +8 -7
  58. data/docs/RepositoriesRpmApi.md +444 -207
  59. data/docs/RepositoriesRpmVersionsApi.md +152 -82
  60. data/docs/RepositoryAddRemoveContent.md +12 -11
  61. data/docs/RepositoryVersionResponse.md +22 -21
  62. data/docs/RpmCompsApi.md +32 -16
  63. data/docs/RpmCopyApi.md +30 -14
  64. data/docs/RpmDistributionTreeResponse.md +46 -43
  65. data/docs/RpmModulemd.md +34 -31
  66. data/docs/RpmModulemdDefaults.md +18 -15
  67. data/docs/RpmModulemdDefaultsResponse.md +22 -19
  68. data/docs/RpmModulemdObsolete.md +30 -27
  69. data/docs/RpmModulemdObsoleteResponse.md +34 -31
  70. data/docs/RpmModulemdResponse.md +38 -35
  71. data/docs/RpmPackageCategoryResponse.md +32 -29
  72. data/docs/RpmPackageEnvironmentResponse.md +34 -31
  73. data/docs/RpmPackageGroupResponse.md +38 -35
  74. data/docs/RpmPackageLangpacksResponse.md +20 -17
  75. data/docs/RpmPackageResponse.md +102 -99
  76. data/docs/RpmPruneApi.md +30 -13
  77. data/docs/RpmRepoMetadataFileResponse.md +38 -35
  78. data/docs/RpmRepositorySyncURL.md +16 -15
  79. data/docs/RpmRpmAlternateContentSource.md +14 -13
  80. data/docs/RpmRpmAlternateContentSourceResponse.md +22 -21
  81. data/docs/RpmRpmDistribution.md +22 -21
  82. data/docs/RpmRpmDistributionResponse.md +34 -33
  83. data/docs/RpmRpmPublication.md +24 -23
  84. data/docs/RpmRpmPublicationResponse.md +34 -33
  85. data/docs/RpmRpmRemote.md +50 -49
  86. data/docs/RpmRpmRemoteResponse.md +50 -49
  87. data/docs/RpmRpmRemoteResponseHiddenFieldsInner.md +20 -0
  88. data/docs/RpmRpmRepository.md +40 -39
  89. data/docs/RpmRpmRepositoryResponse.md +54 -53
  90. data/docs/RpmUlnRemote.md +50 -49
  91. data/docs/RpmUlnRemoteResponse.md +50 -49
  92. data/docs/RpmUpdateCollection.md +12 -11
  93. data/docs/RpmUpdateCollectionResponse.md +14 -13
  94. data/docs/RpmUpdateRecordResponse.md +52 -49
  95. data/docs/SetLabel.md +10 -9
  96. data/docs/SetLabelResponse.md +10 -9
  97. data/docs/SkipTypesEnum.md +4 -5
  98. data/docs/SyncPolicyEnum.md +4 -5
  99. data/docs/TaskGroupOperationResponse.md +8 -7
  100. data/docs/UnsetLabel.md +8 -7
  101. data/docs/UnsetLabelResponse.md +10 -9
  102. data/docs/VariantResponse.md +26 -25
  103. data/lib/pulp_rpm_client/api/acs_rpm_api.rb +76 -50
  104. data/lib/pulp_rpm_client/api/content_advisories_api.rb +177 -17
  105. data/lib/pulp_rpm_client/api/content_distribution_trees_api.rb +162 -9
  106. data/lib/pulp_rpm_client/api/content_modulemd_defaults_api.rb +174 -17
  107. data/lib/pulp_rpm_client/api/content_modulemd_obsoletes_api.rb +171 -14
  108. data/lib/pulp_rpm_client/api/content_modulemds_api.rb +174 -17
  109. data/lib/pulp_rpm_client/api/content_packagecategories_api.rb +162 -9
  110. data/lib/pulp_rpm_client/api/content_packageenvironments_api.rb +162 -9
  111. data/lib/pulp_rpm_client/api/content_packagegroups_api.rb +162 -9
  112. data/lib/pulp_rpm_client/api/content_packagelangpacks_api.rb +162 -9
  113. data/lib/pulp_rpm_client/api/content_packages_api.rb +177 -17
  114. data/lib/pulp_rpm_client/api/content_repo_metadata_files_api.rb +162 -9
  115. data/lib/pulp_rpm_client/api/distributions_rpm_api.rb +89 -56
  116. data/lib/pulp_rpm_client/api/publications_rpm_api.rb +67 -47
  117. data/lib/pulp_rpm_client/api/remotes_rpm_api.rb +104 -68
  118. data/lib/pulp_rpm_client/api/remotes_uln_api.rb +104 -68
  119. data/lib/pulp_rpm_client/api/repositories_rpm_api.rb +107 -66
  120. data/lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb +40 -30
  121. data/lib/pulp_rpm_client/api/rpm_comps_api.rb +10 -6
  122. data/lib/pulp_rpm_client/api/rpm_copy_api.rb +10 -6
  123. data/lib/pulp_rpm_client/api/rpm_prune_api.rb +10 -6
  124. data/lib/pulp_rpm_client/api_client.rb +137 -102
  125. data/lib/pulp_rpm_client/api_error.rb +2 -1
  126. data/lib/pulp_rpm_client/configuration.rb +162 -21
  127. data/lib/pulp_rpm_client/models/addon_response.rb +40 -22
  128. data/lib/pulp_rpm_client/models/artifact_response.rb +34 -24
  129. data/lib/pulp_rpm_client/models/async_operation_response.rb +32 -22
  130. data/lib/pulp_rpm_client/models/checksum_response.rb +34 -22
  131. data/lib/pulp_rpm_client/models/compression_type_enum.rb +8 -4
  132. data/lib/pulp_rpm_client/models/content_summary_response.rb +36 -22
  133. data/lib/pulp_rpm_client/models/copy.rb +34 -28
  134. data/lib/pulp_rpm_client/models/image_response.rb +38 -22
  135. data/lib/pulp_rpm_client/models/my_permissions_response.rb +32 -22
  136. data/lib/pulp_rpm_client/models/nested_role.rb +32 -22
  137. data/lib/pulp_rpm_client/models/nested_role_response.rb +32 -22
  138. data/lib/pulp_rpm_client/models/object_roles_response.rb +32 -22
  139. data/lib/pulp_rpm_client/models/package_checksum_type_enum.rb +8 -4
  140. data/lib/pulp_rpm_client/models/paginated_repository_version_response_list.rb +34 -22
  141. data/lib/pulp_rpm_client/models/paginatedrpm_distribution_tree_response_list.rb +34 -22
  142. data/lib/pulp_rpm_client/models/paginatedrpm_modulemd_defaults_response_list.rb +34 -22
  143. data/lib/pulp_rpm_client/models/paginatedrpm_modulemd_obsolete_response_list.rb +34 -22
  144. data/lib/pulp_rpm_client/models/paginatedrpm_modulemd_response_list.rb +34 -22
  145. data/lib/pulp_rpm_client/models/paginatedrpm_package_category_response_list.rb +34 -22
  146. data/lib/pulp_rpm_client/models/paginatedrpm_package_environment_response_list.rb +34 -22
  147. data/lib/pulp_rpm_client/models/paginatedrpm_package_group_response_list.rb +34 -22
  148. data/lib/pulp_rpm_client/models/paginatedrpm_package_langpacks_response_list.rb +34 -22
  149. data/lib/pulp_rpm_client/models/paginatedrpm_package_response_list.rb +34 -22
  150. data/lib/pulp_rpm_client/models/paginatedrpm_repo_metadata_file_response_list.rb +34 -22
  151. data/lib/pulp_rpm_client/models/paginatedrpm_rpm_alternate_content_source_response_list.rb +34 -22
  152. data/lib/pulp_rpm_client/models/paginatedrpm_rpm_distribution_response_list.rb +34 -22
  153. data/lib/pulp_rpm_client/models/paginatedrpm_rpm_publication_response_list.rb +34 -22
  154. data/lib/pulp_rpm_client/models/paginatedrpm_rpm_remote_response_list.rb +34 -22
  155. data/lib/pulp_rpm_client/models/paginatedrpm_rpm_repository_response_list.rb +34 -22
  156. data/lib/pulp_rpm_client/models/paginatedrpm_uln_remote_response_list.rb +34 -22
  157. data/lib/pulp_rpm_client/models/paginatedrpm_update_record_response_list.rb +34 -22
  158. data/lib/pulp_rpm_client/models/patchedrpm_rpm_alternate_content_source.rb +36 -24
  159. data/lib/pulp_rpm_client/models/patchedrpm_rpm_distribution.rb +40 -24
  160. data/lib/pulp_rpm_client/models/patchedrpm_rpm_remote.rb +82 -44
  161. data/lib/pulp_rpm_client/models/patchedrpm_rpm_repository.rb +68 -25
  162. data/lib/pulp_rpm_client/models/patchedrpm_uln_remote.rb +92 -46
  163. data/lib/pulp_rpm_client/models/policy_enum.rb +8 -4
  164. data/lib/pulp_rpm_client/models/prune_packages.rb +37 -23
  165. data/lib/pulp_rpm_client/models/repair.rb +30 -22
  166. data/lib/pulp_rpm_client/models/repository_add_remove_content.rb +30 -22
  167. data/lib/pulp_rpm_client/models/repository_version_response.rb +32 -24
  168. data/lib/pulp_rpm_client/models/rpm_distribution_tree_response.rb +77 -23
  169. data/lib/pulp_rpm_client/models/rpm_modulemd.rb +63 -23
  170. data/lib/pulp_rpm_client/models/rpm_modulemd_defaults.rb +52 -28
  171. data/lib/pulp_rpm_client/models/rpm_modulemd_defaults_response.rb +52 -30
  172. data/lib/pulp_rpm_client/models/rpm_modulemd_obsolete.rb +68 -28
  173. data/lib/pulp_rpm_client/models/rpm_modulemd_obsolete_response.rb +63 -25
  174. data/lib/pulp_rpm_client/models/rpm_modulemd_response.rb +63 -25
  175. data/lib/pulp_rpm_client/models/rpm_package_category_response.rb +61 -25
  176. data/lib/pulp_rpm_client/models/rpm_package_environment_response.rb +63 -25
  177. data/lib/pulp_rpm_client/models/rpm_package_group_response.rb +61 -25
  178. data/lib/pulp_rpm_client/models/rpm_package_langpacks_response.rb +49 -25
  179. data/lib/pulp_rpm_client/models/rpm_package_response.rb +55 -25
  180. data/lib/pulp_rpm_client/models/rpm_repo_metadata_file_response.rb +53 -25
  181. data/lib/pulp_rpm_client/models/rpm_repository_sync_url.rb +52 -22
  182. data/lib/pulp_rpm_client/models/rpm_rpm_alternate_content_source.rb +35 -23
  183. data/lib/pulp_rpm_client/models/rpm_rpm_alternate_content_source_response.rb +37 -25
  184. data/lib/pulp_rpm_client/models/rpm_rpm_distribution.rb +34 -22
  185. data/lib/pulp_rpm_client/models/rpm_rpm_distribution_response.rb +36 -24
  186. data/lib/pulp_rpm_client/models/rpm_rpm_publication.rb +53 -22
  187. data/lib/pulp_rpm_client/models/rpm_rpm_publication_response.rb +55 -24
  188. data/lib/pulp_rpm_client/models/rpm_rpm_remote.rb +76 -42
  189. data/lib/pulp_rpm_client/models/rpm_rpm_remote_response.rb +79 -45
  190. data/lib/pulp_rpm_client/models/{rpm_rpm_remote_response_hidden_fields.rb → rpm_rpm_remote_response_hidden_fields_inner.rb} +37 -25
  191. data/lib/pulp_rpm_client/models/rpm_rpm_repository.rb +65 -24
  192. data/lib/pulp_rpm_client/models/rpm_rpm_repository_response.rb +67 -26
  193. data/lib/pulp_rpm_client/models/rpm_uln_remote.rb +80 -42
  194. data/lib/pulp_rpm_client/models/rpm_uln_remote_response.rb +79 -45
  195. data/lib/pulp_rpm_client/models/rpm_update_collection.rb +36 -22
  196. data/lib/pulp_rpm_client/models/rpm_update_collection_response.rb +36 -22
  197. data/lib/pulp_rpm_client/models/rpm_update_record_response.rb +45 -25
  198. data/lib/pulp_rpm_client/models/set_label.rb +34 -22
  199. data/lib/pulp_rpm_client/models/set_label_response.rb +34 -22
  200. data/lib/pulp_rpm_client/models/skip_types_enum.rb +8 -4
  201. data/lib/pulp_rpm_client/models/sync_policy_enum.rb +8 -4
  202. data/lib/pulp_rpm_client/models/task_group_operation_response.rb +32 -22
  203. data/lib/pulp_rpm_client/models/unset_label.rb +33 -23
  204. data/lib/pulp_rpm_client/models/unset_label_response.rb +33 -23
  205. data/lib/pulp_rpm_client/models/variant_response.rb +50 -22
  206. data/lib/pulp_rpm_client/version.rb +2 -2
  207. data/lib/pulp_rpm_client.rb +2 -5
  208. data/pulp_rpm_client.gemspec +9 -6
  209. data/spec/api/acs_rpm_api_spec.rb +12 -12
  210. data/spec/api/content_advisories_api_spec.rb +33 -5
  211. data/spec/api/content_distribution_trees_api_spec.rb +30 -3
  212. data/spec/api/content_modulemd_defaults_api_spec.rb +32 -5
  213. data/spec/api/content_modulemd_obsoletes_api_spec.rb +31 -4
  214. data/spec/api/content_modulemds_api_spec.rb +32 -5
  215. data/spec/api/content_packagecategories_api_spec.rb +30 -3
  216. data/spec/api/content_packageenvironments_api_spec.rb +30 -3
  217. data/spec/api/content_packagegroups_api_spec.rb +30 -3
  218. data/spec/api/content_packagelangpacks_api_spec.rb +30 -3
  219. data/spec/api/content_packages_api_spec.rb +33 -5
  220. data/spec/api/content_repo_metadata_files_api_spec.rb +30 -3
  221. data/spec/api/distributions_rpm_api_spec.rb +13 -13
  222. data/spec/api/publications_rpm_api_spec.rb +16 -15
  223. data/spec/api/remotes_rpm_api_spec.rb +20 -19
  224. data/spec/api/remotes_uln_api_spec.rb +20 -19
  225. data/spec/api/repositories_rpm_api_spec.rb +15 -15
  226. data/spec/api/repositories_rpm_versions_api_spec.rb +12 -11
  227. data/spec/api/rpm_comps_api_spec.rb +2 -2
  228. data/spec/api/rpm_copy_api_spec.rb +2 -2
  229. data/spec/api/rpm_prune_api_spec.rb +2 -2
  230. data/spec/models/addon_response_spec.rb +11 -16
  231. data/spec/models/artifact_response_spec.rb +18 -23
  232. data/spec/models/async_operation_response_spec.rb +7 -12
  233. data/spec/models/checksum_response_spec.rb +8 -13
  234. data/spec/models/compression_type_enum_spec.rb +6 -11
  235. data/spec/models/content_summary_response_spec.rb +9 -14
  236. data/spec/models/copy_spec.rb +8 -13
  237. data/spec/models/image_response_spec.rb +10 -15
  238. data/spec/models/my_permissions_response_spec.rb +7 -12
  239. data/spec/models/nested_role_response_spec.rb +9 -14
  240. data/spec/models/nested_role_spec.rb +9 -14
  241. data/spec/models/object_roles_response_spec.rb +7 -12
  242. data/spec/models/package_checksum_type_enum_spec.rb +6 -11
  243. data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
  244. data/spec/models/paginatedrpm_distribution_tree_response_list_spec.rb +10 -15
  245. data/spec/models/paginatedrpm_modulemd_defaults_response_list_spec.rb +10 -15
  246. data/spec/models/paginatedrpm_modulemd_obsolete_response_list_spec.rb +10 -15
  247. data/spec/models/paginatedrpm_modulemd_response_list_spec.rb +10 -15
  248. data/spec/models/paginatedrpm_package_category_response_list_spec.rb +10 -15
  249. data/spec/models/paginatedrpm_package_environment_response_list_spec.rb +10 -15
  250. data/spec/models/paginatedrpm_package_group_response_list_spec.rb +10 -15
  251. data/spec/models/paginatedrpm_package_langpacks_response_list_spec.rb +10 -15
  252. data/spec/models/paginatedrpm_package_response_list_spec.rb +10 -15
  253. data/spec/models/paginatedrpm_repo_metadata_file_response_list_spec.rb +10 -15
  254. data/spec/models/paginatedrpm_rpm_alternate_content_source_response_list_spec.rb +10 -15
  255. data/spec/models/paginatedrpm_rpm_distribution_response_list_spec.rb +10 -15
  256. data/spec/models/paginatedrpm_rpm_publication_response_list_spec.rb +10 -15
  257. data/spec/models/paginatedrpm_rpm_remote_response_list_spec.rb +10 -15
  258. data/spec/models/paginatedrpm_rpm_repository_response_list_spec.rb +10 -15
  259. data/spec/models/paginatedrpm_uln_remote_response_list_spec.rb +10 -15
  260. data/spec/models/paginatedrpm_update_record_response_list_spec.rb +10 -15
  261. data/spec/models/patchedrpm_rpm_alternate_content_source_spec.rb +10 -15
  262. data/spec/models/patchedrpm_rpm_distribution_spec.rb +14 -19
  263. data/spec/models/patchedrpm_rpm_remote_spec.rb +28 -33
  264. data/spec/models/patchedrpm_rpm_repository_spec.rb +23 -28
  265. data/spec/models/patchedrpm_uln_remote_spec.rb +28 -33
  266. data/spec/models/policy_enum_spec.rb +6 -11
  267. data/spec/models/prune_packages_spec.rb +9 -14
  268. data/spec/models/repair_spec.rb +7 -12
  269. data/spec/models/repository_add_remove_content_spec.rb +9 -14
  270. data/spec/models/repository_version_response_spec.rb +14 -19
  271. data/spec/models/rpm_distribution_tree_response_spec.rb +31 -30
  272. data/spec/models/rpm_modulemd_defaults_response_spec.rb +19 -18
  273. data/spec/models/rpm_modulemd_defaults_spec.rb +17 -16
  274. data/spec/models/rpm_modulemd_obsolete_response_spec.rb +25 -24
  275. data/spec/models/rpm_modulemd_obsolete_spec.rb +23 -22
  276. data/spec/models/rpm_modulemd_response_spec.rb +27 -26
  277. data/spec/models/rpm_modulemd_spec.rb +25 -24
  278. data/spec/models/rpm_package_category_response_spec.rb +24 -23
  279. data/spec/models/rpm_package_environment_response_spec.rb +25 -24
  280. data/spec/models/rpm_package_group_response_spec.rb +27 -26
  281. data/spec/models/rpm_package_langpacks_response_spec.rb +18 -17
  282. data/spec/models/rpm_package_response_spec.rb +59 -58
  283. data/spec/models/rpm_repo_metadata_file_response_spec.rb +27 -26
  284. data/spec/models/rpm_repository_sync_url_spec.rb +11 -16
  285. data/spec/models/rpm_rpm_alternate_content_source_response_spec.rb +14 -19
  286. data/spec/models/rpm_rpm_alternate_content_source_spec.rb +10 -15
  287. data/spec/models/rpm_rpm_distribution_response_spec.rb +20 -25
  288. data/spec/models/rpm_rpm_distribution_spec.rb +14 -19
  289. data/spec/models/rpm_rpm_publication_response_spec.rb +20 -25
  290. data/spec/models/rpm_rpm_publication_spec.rb +15 -20
  291. data/spec/models/{rpm_rpm_remote_response_hidden_fields_spec.rb → rpm_rpm_remote_response_hidden_fields_inner_spec.rb} +11 -16
  292. data/spec/models/rpm_rpm_remote_response_spec.rb +28 -33
  293. data/spec/models/rpm_rpm_remote_spec.rb +28 -33
  294. data/spec/models/rpm_rpm_repository_response_spec.rb +30 -35
  295. data/spec/models/rpm_rpm_repository_spec.rb +23 -28
  296. data/spec/models/rpm_uln_remote_response_spec.rb +28 -33
  297. data/spec/models/rpm_uln_remote_spec.rb +28 -33
  298. data/spec/models/rpm_update_collection_response_spec.rb +10 -15
  299. data/spec/models/rpm_update_collection_spec.rb +9 -14
  300. data/spec/models/rpm_update_record_response_spec.rb +34 -33
  301. data/spec/models/set_label_response_spec.rb +8 -13
  302. data/spec/models/set_label_spec.rb +8 -13
  303. data/spec/models/skip_types_enum_spec.rb +6 -11
  304. data/spec/models/sync_policy_enum_spec.rb +6 -11
  305. data/spec/models/task_group_operation_response_spec.rb +7 -12
  306. data/spec/models/unset_label_response_spec.rb +8 -13
  307. data/spec/models/unset_label_spec.rb +7 -12
  308. data/spec/models/variant_response_spec.rb +16 -21
  309. data/spec/spec_helper.rb +1 -1
  310. metadata +127 -115
  311. data/docs/CompsXml.md +0 -21
  312. data/docs/RpmPackage.md +0 -27
  313. data/docs/RpmRpmRemoteResponseHiddenFields.md +0 -19
  314. data/docs/RpmUpdateRecord.md +0 -23
  315. data/lib/pulp_rpm_client/models/comps_xml.rb +0 -233
  316. data/lib/pulp_rpm_client/models/rpm_package.rb +0 -288
  317. data/lib/pulp_rpm_client/models/rpm_update_record.rb +0 -253
  318. data/spec/api_client_spec.rb +0 -188
  319. data/spec/configuration_spec.rb +0 -42
  320. data/spec/models/comps_xml_spec.rb +0 -53
  321. data/spec/models/rpm_package_spec.rb +0 -71
  322. data/spec/models/rpm_update_record_spec.rb +0 -59
@@ -6,11 +6,12 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module PulpRpmClient
16
17
  # Modulemd serializer.
@@ -18,6 +19,9 @@ module PulpRpmClient
18
19
  # A URI of a repository the new content unit should be associated with.
19
20
  attr_accessor :repository
20
21
 
22
+ # A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
23
+ attr_accessor :pulp_labels
24
+
21
25
  # Modulemd name.
22
26
  attr_accessor :name
23
27
 
@@ -58,6 +62,7 @@ module PulpRpmClient
58
62
  def self.attribute_map
59
63
  {
60
64
  :'repository' => :'repository',
65
+ :'pulp_labels' => :'pulp_labels',
61
66
  :'name' => :'name',
62
67
  :'stream' => :'stream',
63
68
  :'version' => :'version',
@@ -73,10 +78,16 @@ module PulpRpmClient
73
78
  }
74
79
  end
75
80
 
81
+ # Returns all the JSON keys this model knows about
82
+ def self.acceptable_attributes
83
+ attribute_map.values
84
+ end
85
+
76
86
  # Attribute type mapping.
77
87
  def self.openapi_types
78
88
  {
79
89
  :'repository' => :'String',
90
+ :'pulp_labels' => :'Hash<String, String>',
80
91
  :'name' => :'String',
81
92
  :'stream' => :'String',
82
93
  :'version' => :'String',
@@ -120,16 +131,28 @@ module PulpRpmClient
120
131
  self.repository = attributes[:'repository']
121
132
  end
122
133
 
134
+ if attributes.key?(:'pulp_labels')
135
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
136
+ self.pulp_labels = value
137
+ end
138
+ end
139
+
123
140
  if attributes.key?(:'name')
124
141
  self.name = attributes[:'name']
142
+ else
143
+ self.name = nil
125
144
  end
126
145
 
127
146
  if attributes.key?(:'stream')
128
147
  self.stream = attributes[:'stream']
148
+ else
149
+ self.stream = nil
129
150
  end
130
151
 
131
152
  if attributes.key?(:'version')
132
153
  self.version = attributes[:'version']
154
+ else
155
+ self.version = nil
133
156
  end
134
157
 
135
158
  if attributes.key?(:'static_context')
@@ -138,18 +161,26 @@ module PulpRpmClient
138
161
 
139
162
  if attributes.key?(:'context')
140
163
  self.context = attributes[:'context']
164
+ else
165
+ self.context = nil
141
166
  end
142
167
 
143
168
  if attributes.key?(:'arch')
144
169
  self.arch = attributes[:'arch']
170
+ else
171
+ self.arch = nil
145
172
  end
146
173
 
147
174
  if attributes.key?(:'artifacts')
148
175
  self.artifacts = attributes[:'artifacts']
176
+ else
177
+ self.artifacts = nil
149
178
  end
150
179
 
151
180
  if attributes.key?(:'dependencies')
152
181
  self.dependencies = attributes[:'dependencies']
182
+ else
183
+ self.dependencies = nil
153
184
  end
154
185
 
155
186
  if attributes.key?(:'packages')
@@ -160,20 +191,27 @@ module PulpRpmClient
160
191
 
161
192
  if attributes.key?(:'snippet')
162
193
  self.snippet = attributes[:'snippet']
194
+ else
195
+ self.snippet = nil
163
196
  end
164
197
 
165
198
  if attributes.key?(:'profiles')
166
199
  self.profiles = attributes[:'profiles']
200
+ else
201
+ self.profiles = nil
167
202
  end
168
203
 
169
204
  if attributes.key?(:'description')
170
205
  self.description = attributes[:'description']
206
+ else
207
+ self.description = nil
171
208
  end
172
209
  end
173
210
 
174
211
  # Show invalid properties with the reasons. Usually used together with valid?
175
212
  # @return Array for valid properties with the reasons
176
213
  def list_invalid_properties
214
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
177
215
  invalid_properties = Array.new
178
216
  if @name.nil?
179
217
  invalid_properties.push('invalid value for "name", name cannot be nil.')
@@ -237,6 +275,7 @@ module PulpRpmClient
237
275
  # Check to see if the all the properties in the model are valid
238
276
  # @return true if the model is valid
239
277
  def valid?
278
+ warn '[DEPRECATED] the `valid?` method is obsolete'
240
279
  return false if @name.nil?
241
280
  return false if @name.to_s.length < 1
242
281
  return false if @stream.nil?
@@ -358,6 +397,7 @@ module PulpRpmClient
358
397
  return true if self.equal?(o)
359
398
  self.class == o.class &&
360
399
  repository == o.repository &&
400
+ pulp_labels == o.pulp_labels &&
361
401
  name == o.name &&
362
402
  stream == o.stream &&
363
403
  version == o.version &&
@@ -381,44 +421,40 @@ module PulpRpmClient
381
421
  # Calculates hash code according to all attributes.
382
422
  # @return [Integer] Hash code
383
423
  def hash
384
- [repository, name, stream, version, static_context, context, arch, artifacts, dependencies, packages, snippet, profiles, description].hash
424
+ [repository, pulp_labels, name, stream, version, static_context, context, arch, artifacts, dependencies, packages, snippet, profiles, description].hash
385
425
  end
386
426
 
387
427
  # Builds the object from hash
388
428
  # @param [Hash] attributes Model attributes in the form of hash
389
429
  # @return [Object] Returns the model itself
390
430
  def self.build_from_hash(attributes)
391
- new.build_from_hash(attributes)
392
- end
393
-
394
- # Builds the object from hash
395
- # @param [Hash] attributes Model attributes in the form of hash
396
- # @return [Object] Returns the model itself
397
- def build_from_hash(attributes)
398
431
  return nil unless attributes.is_a?(Hash)
399
- self.class.openapi_types.each_pair do |key, type|
400
- if type =~ /\AArray<(.*)>/i
432
+ attributes = attributes.transform_keys(&:to_sym)
433
+ transformed_hash = {}
434
+ openapi_types.each_pair do |key, type|
435
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
436
+ transformed_hash["#{key}"] = nil
437
+ elsif type =~ /\AArray<(.*)>/i
401
438
  # check to ensure the input is an array given that the attribute
402
439
  # is documented as an array but the input is not
403
- if attributes[self.class.attribute_map[key]].is_a?(Array)
404
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
440
+ if attributes[attribute_map[key]].is_a?(Array)
441
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
405
442
  end
406
- elsif !attributes[self.class.attribute_map[key]].nil?
407
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
408
- end # or else data not found in attributes(hash), not an issue as the data can be optional
443
+ elsif !attributes[attribute_map[key]].nil?
444
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
445
+ end
409
446
  end
410
-
411
- self
447
+ new(transformed_hash)
412
448
  end
413
449
 
414
450
  # Deserializes the data based on type
415
451
  # @param string type Data type
416
452
  # @param string value Value to be deserialized
417
453
  # @return [Object] Deserialized data
418
- def _deserialize(type, value)
454
+ def self._deserialize(type, value)
419
455
  case type.to_sym
420
- when :DateTime
421
- DateTime.parse(value)
456
+ when :Time
457
+ Time.parse(value)
422
458
  when :Date
423
459
  Date.parse(value)
424
460
  when :String
@@ -448,7 +484,9 @@ module PulpRpmClient
448
484
  end
449
485
  end
450
486
  else # model
451
- PulpRpmClient.const_get(type).build_from_hash(value)
487
+ # models (e.g. Pet) or oneOf
488
+ klass = PulpRpmClient.const_get(type)
489
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
452
490
  end
453
491
  end
454
492
 
@@ -474,7 +512,7 @@ module PulpRpmClient
474
512
  is_nullable = self.class.openapi_nullable.include?(attr)
475
513
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
476
514
  end
477
-
515
+
478
516
  hash[param] = _to_hash(value)
479
517
  end
480
518
  hash
@@ -497,5 +535,7 @@ module PulpRpmClient
497
535
  value
498
536
  end
499
537
  end
538
+
500
539
  end
540
+
501
541
  end
@@ -6,11 +6,12 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module PulpRpmClient
16
17
  # ModulemdDefaults serializer.
@@ -18,6 +19,9 @@ module PulpRpmClient
18
19
  # A URI of a repository the new content unit should be associated with.
19
20
  attr_accessor :repository
20
21
 
22
+ # A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
23
+ attr_accessor :pulp_labels
24
+
21
25
  # Modulemd name.
22
26
  attr_accessor :_module
23
27
 
@@ -34,6 +38,7 @@ module PulpRpmClient
34
38
  def self.attribute_map
35
39
  {
36
40
  :'repository' => :'repository',
41
+ :'pulp_labels' => :'pulp_labels',
37
42
  :'_module' => :'module',
38
43
  :'stream' => :'stream',
39
44
  :'profiles' => :'profiles',
@@ -41,10 +46,16 @@ module PulpRpmClient
41
46
  }
42
47
  end
43
48
 
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ attribute_map.values
52
+ end
53
+
44
54
  # Attribute type mapping.
45
55
  def self.openapi_types
46
56
  {
47
57
  :'repository' => :'String',
58
+ :'pulp_labels' => :'Hash<String, String>',
48
59
  :'_module' => :'String',
49
60
  :'stream' => :'String',
50
61
  :'profiles' => :'Object',
@@ -55,6 +66,7 @@ module PulpRpmClient
55
66
  # List of attributes with nullable: true
56
67
  def self.openapi_nullable
57
68
  Set.new([
69
+ :'profiles',
58
70
  ])
59
71
  end
60
72
 
@@ -77,26 +89,41 @@ module PulpRpmClient
77
89
  self.repository = attributes[:'repository']
78
90
  end
79
91
 
92
+ if attributes.key?(:'pulp_labels')
93
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
94
+ self.pulp_labels = value
95
+ end
96
+ end
97
+
80
98
  if attributes.key?(:'_module')
81
99
  self._module = attributes[:'_module']
100
+ else
101
+ self._module = nil
82
102
  end
83
103
 
84
104
  if attributes.key?(:'stream')
85
105
  self.stream = attributes[:'stream']
106
+ else
107
+ self.stream = nil
86
108
  end
87
109
 
88
110
  if attributes.key?(:'profiles')
89
111
  self.profiles = attributes[:'profiles']
112
+ else
113
+ self.profiles = nil
90
114
  end
91
115
 
92
116
  if attributes.key?(:'snippet')
93
117
  self.snippet = attributes[:'snippet']
118
+ else
119
+ self.snippet = nil
94
120
  end
95
121
  end
96
122
 
97
123
  # Show invalid properties with the reasons. Usually used together with valid?
98
124
  # @return Array for valid properties with the reasons
99
125
  def list_invalid_properties
126
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
127
  invalid_properties = Array.new
101
128
  if @_module.nil?
102
129
  invalid_properties.push('invalid value for "_module", _module cannot be nil.')
@@ -114,10 +141,6 @@ module PulpRpmClient
114
141
  invalid_properties.push('invalid value for "stream", the character length must be great than or equal to 1.')
115
142
  end
116
143
 
117
- if @profiles.nil?
118
- invalid_properties.push('invalid value for "profiles", profiles cannot be nil.')
119
- end
120
-
121
144
  if @snippet.nil?
122
145
  invalid_properties.push('invalid value for "snippet", snippet cannot be nil.')
123
146
  end
@@ -132,11 +155,11 @@ module PulpRpmClient
132
155
  # Check to see if the all the properties in the model are valid
133
156
  # @return true if the model is valid
134
157
  def valid?
158
+ warn '[DEPRECATED] the `valid?` method is obsolete'
135
159
  return false if @_module.nil?
136
160
  return false if @_module.to_s.length < 1
137
161
  return false if @stream.nil?
138
162
  return false if @stream.to_s.length < 1
139
- return false if @profiles.nil?
140
163
  return false if @snippet.nil?
141
164
  return false if @snippet.to_s.length < 1
142
165
  true
@@ -190,6 +213,7 @@ module PulpRpmClient
190
213
  return true if self.equal?(o)
191
214
  self.class == o.class &&
192
215
  repository == o.repository &&
216
+ pulp_labels == o.pulp_labels &&
193
217
  _module == o._module &&
194
218
  stream == o.stream &&
195
219
  profiles == o.profiles &&
@@ -205,44 +229,40 @@ module PulpRpmClient
205
229
  # Calculates hash code according to all attributes.
206
230
  # @return [Integer] Hash code
207
231
  def hash
208
- [repository, _module, stream, profiles, snippet].hash
232
+ [repository, pulp_labels, _module, stream, profiles, snippet].hash
209
233
  end
210
234
 
211
235
  # Builds the object from hash
212
236
  # @param [Hash] attributes Model attributes in the form of hash
213
237
  # @return [Object] Returns the model itself
214
238
  def self.build_from_hash(attributes)
215
- new.build_from_hash(attributes)
216
- end
217
-
218
- # Builds the object from hash
219
- # @param [Hash] attributes Model attributes in the form of hash
220
- # @return [Object] Returns the model itself
221
- def build_from_hash(attributes)
222
239
  return nil unless attributes.is_a?(Hash)
223
- self.class.openapi_types.each_pair do |key, type|
224
- if type =~ /\AArray<(.*)>/i
240
+ attributes = attributes.transform_keys(&:to_sym)
241
+ transformed_hash = {}
242
+ openapi_types.each_pair do |key, type|
243
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
244
+ transformed_hash["#{key}"] = nil
245
+ elsif type =~ /\AArray<(.*)>/i
225
246
  # check to ensure the input is an array given that the attribute
226
247
  # is documented as an array but the input is not
227
- if attributes[self.class.attribute_map[key]].is_a?(Array)
228
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
248
+ if attributes[attribute_map[key]].is_a?(Array)
249
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
229
250
  end
230
- elsif !attributes[self.class.attribute_map[key]].nil?
231
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
232
- end # or else data not found in attributes(hash), not an issue as the data can be optional
251
+ elsif !attributes[attribute_map[key]].nil?
252
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
253
+ end
233
254
  end
234
-
235
- self
255
+ new(transformed_hash)
236
256
  end
237
257
 
238
258
  # Deserializes the data based on type
239
259
  # @param string type Data type
240
260
  # @param string value Value to be deserialized
241
261
  # @return [Object] Deserialized data
242
- def _deserialize(type, value)
262
+ def self._deserialize(type, value)
243
263
  case type.to_sym
244
- when :DateTime
245
- DateTime.parse(value)
264
+ when :Time
265
+ Time.parse(value)
246
266
  when :Date
247
267
  Date.parse(value)
248
268
  when :String
@@ -272,7 +292,9 @@ module PulpRpmClient
272
292
  end
273
293
  end
274
294
  else # model
275
- PulpRpmClient.const_get(type).build_from_hash(value)
295
+ # models (e.g. Pet) or oneOf
296
+ klass = PulpRpmClient.const_get(type)
297
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
276
298
  end
277
299
  end
278
300
 
@@ -298,7 +320,7 @@ module PulpRpmClient
298
320
  is_nullable = self.class.openapi_nullable.include?(attr)
299
321
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
300
322
  end
301
-
323
+
302
324
  hash[param] = _to_hash(value)
303
325
  end
304
326
  hash
@@ -321,5 +343,7 @@ module PulpRpmClient
321
343
  value
322
344
  end
323
345
  end
346
+
324
347
  end
348
+
325
349
  end
@@ -6,11 +6,12 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module PulpRpmClient
16
17
  # ModulemdDefaults serializer.
@@ -26,6 +27,9 @@ module PulpRpmClient
26
27
  # Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.
27
28
  attr_accessor :pulp_last_updated
28
29
 
30
+ # A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
31
+ attr_accessor :pulp_labels
32
+
29
33
  # Modulemd name.
30
34
  attr_accessor :_module
31
35
 
@@ -42,19 +46,26 @@ module PulpRpmClient
42
46
  :'prn' => :'prn',
43
47
  :'pulp_created' => :'pulp_created',
44
48
  :'pulp_last_updated' => :'pulp_last_updated',
49
+ :'pulp_labels' => :'pulp_labels',
45
50
  :'_module' => :'module',
46
51
  :'stream' => :'stream',
47
52
  :'profiles' => :'profiles'
48
53
  }
49
54
  end
50
55
 
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ attribute_map.values
59
+ end
60
+
51
61
  # Attribute type mapping.
52
62
  def self.openapi_types
53
63
  {
54
64
  :'pulp_href' => :'String',
55
65
  :'prn' => :'String',
56
- :'pulp_created' => :'DateTime',
57
- :'pulp_last_updated' => :'DateTime',
66
+ :'pulp_created' => :'Time',
67
+ :'pulp_last_updated' => :'Time',
68
+ :'pulp_labels' => :'Hash<String, String>',
58
69
  :'_module' => :'String',
59
70
  :'stream' => :'String',
60
71
  :'profiles' => :'Object'
@@ -64,6 +75,7 @@ module PulpRpmClient
64
75
  # List of attributes with nullable: true
65
76
  def self.openapi_nullable
66
77
  Set.new([
78
+ :'profiles'
67
79
  ])
68
80
  end
69
81
 
@@ -98,22 +110,35 @@ module PulpRpmClient
98
110
  self.pulp_last_updated = attributes[:'pulp_last_updated']
99
111
  end
100
112
 
113
+ if attributes.key?(:'pulp_labels')
114
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
115
+ self.pulp_labels = value
116
+ end
117
+ end
118
+
101
119
  if attributes.key?(:'_module')
102
120
  self._module = attributes[:'_module']
121
+ else
122
+ self._module = nil
103
123
  end
104
124
 
105
125
  if attributes.key?(:'stream')
106
126
  self.stream = attributes[:'stream']
127
+ else
128
+ self.stream = nil
107
129
  end
108
130
 
109
131
  if attributes.key?(:'profiles')
110
132
  self.profiles = attributes[:'profiles']
133
+ else
134
+ self.profiles = nil
111
135
  end
112
136
  end
113
137
 
114
138
  # Show invalid properties with the reasons. Usually used together with valid?
115
139
  # @return Array for valid properties with the reasons
116
140
  def list_invalid_properties
141
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
117
142
  invalid_properties = Array.new
118
143
  if @_module.nil?
119
144
  invalid_properties.push('invalid value for "_module", _module cannot be nil.')
@@ -123,19 +148,15 @@ module PulpRpmClient
123
148
  invalid_properties.push('invalid value for "stream", stream cannot be nil.')
124
149
  end
125
150
 
126
- if @profiles.nil?
127
- invalid_properties.push('invalid value for "profiles", profiles cannot be nil.')
128
- end
129
-
130
151
  invalid_properties
131
152
  end
132
153
 
133
154
  # Check to see if the all the properties in the model are valid
134
155
  # @return true if the model is valid
135
156
  def valid?
157
+ warn '[DEPRECATED] the `valid?` method is obsolete'
136
158
  return false if @_module.nil?
137
159
  return false if @stream.nil?
138
- return false if @profiles.nil?
139
160
  true
140
161
  end
141
162
 
@@ -148,6 +169,7 @@ module PulpRpmClient
148
169
  prn == o.prn &&
149
170
  pulp_created == o.pulp_created &&
150
171
  pulp_last_updated == o.pulp_last_updated &&
172
+ pulp_labels == o.pulp_labels &&
151
173
  _module == o._module &&
152
174
  stream == o.stream &&
153
175
  profiles == o.profiles
@@ -162,44 +184,40 @@ module PulpRpmClient
162
184
  # Calculates hash code according to all attributes.
163
185
  # @return [Integer] Hash code
164
186
  def hash
165
- [pulp_href, prn, pulp_created, pulp_last_updated, _module, stream, profiles].hash
187
+ [pulp_href, prn, pulp_created, pulp_last_updated, pulp_labels, _module, stream, profiles].hash
166
188
  end
167
189
 
168
190
  # Builds the object from hash
169
191
  # @param [Hash] attributes Model attributes in the form of hash
170
192
  # @return [Object] Returns the model itself
171
193
  def self.build_from_hash(attributes)
172
- new.build_from_hash(attributes)
173
- end
174
-
175
- # Builds the object from hash
176
- # @param [Hash] attributes Model attributes in the form of hash
177
- # @return [Object] Returns the model itself
178
- def build_from_hash(attributes)
179
194
  return nil unless attributes.is_a?(Hash)
180
- self.class.openapi_types.each_pair do |key, type|
181
- if type =~ /\AArray<(.*)>/i
195
+ attributes = attributes.transform_keys(&:to_sym)
196
+ transformed_hash = {}
197
+ openapi_types.each_pair do |key, type|
198
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
199
+ transformed_hash["#{key}"] = nil
200
+ elsif type =~ /\AArray<(.*)>/i
182
201
  # check to ensure the input is an array given that the attribute
183
202
  # is documented as an array but the input is not
184
- if attributes[self.class.attribute_map[key]].is_a?(Array)
185
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
203
+ if attributes[attribute_map[key]].is_a?(Array)
204
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
186
205
  end
187
- elsif !attributes[self.class.attribute_map[key]].nil?
188
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
189
- end # or else data not found in attributes(hash), not an issue as the data can be optional
206
+ elsif !attributes[attribute_map[key]].nil?
207
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
208
+ end
190
209
  end
191
-
192
- self
210
+ new(transformed_hash)
193
211
  end
194
212
 
195
213
  # Deserializes the data based on type
196
214
  # @param string type Data type
197
215
  # @param string value Value to be deserialized
198
216
  # @return [Object] Deserialized data
199
- def _deserialize(type, value)
217
+ def self._deserialize(type, value)
200
218
  case type.to_sym
201
- when :DateTime
202
- DateTime.parse(value)
219
+ when :Time
220
+ Time.parse(value)
203
221
  when :Date
204
222
  Date.parse(value)
205
223
  when :String
@@ -229,7 +247,9 @@ module PulpRpmClient
229
247
  end
230
248
  end
231
249
  else # model
232
- PulpRpmClient.const_get(type).build_from_hash(value)
250
+ # models (e.g. Pet) or oneOf
251
+ klass = PulpRpmClient.const_get(type)
252
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
233
253
  end
234
254
  end
235
255
 
@@ -255,7 +275,7 @@ module PulpRpmClient
255
275
  is_nullable = self.class.openapi_nullable.include?(attr)
256
276
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
257
277
  end
258
-
278
+
259
279
  hash[param] = _to_hash(value)
260
280
  end
261
281
  hash
@@ -278,5 +298,7 @@ module PulpRpmClient
278
298
  value
279
299
  end
280
300
  end
301
+
281
302
  end
303
+
282
304
  end