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
  # Image serializer.
@@ -36,6 +37,11 @@ module PulpRpmClient
36
37
  }
37
38
  end
38
39
 
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
39
45
  # Attribute type mapping.
40
46
  def self.openapi_types
41
47
  {
@@ -70,24 +76,33 @@ module PulpRpmClient
70
76
 
71
77
  if attributes.key?(:'name')
72
78
  self.name = attributes[:'name']
79
+ else
80
+ self.name = nil
73
81
  end
74
82
 
75
83
  if attributes.key?(:'path')
76
84
  self.path = attributes[:'path']
85
+ else
86
+ self.path = nil
77
87
  end
78
88
 
79
89
  if attributes.key?(:'platforms')
80
90
  self.platforms = attributes[:'platforms']
91
+ else
92
+ self.platforms = nil
81
93
  end
82
94
 
83
95
  if attributes.key?(:'artifact')
84
96
  self.artifact = attributes[:'artifact']
97
+ else
98
+ self.artifact = nil
85
99
  end
86
100
  end
87
101
 
88
102
  # Show invalid properties with the reasons. Usually used together with valid?
89
103
  # @return Array for valid properties with the reasons
90
104
  def list_invalid_properties
105
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
106
  invalid_properties = Array.new
92
107
  if @name.nil?
93
108
  invalid_properties.push('invalid value for "name", name cannot be nil.')
@@ -107,6 +122,7 @@ module PulpRpmClient
107
122
  # Check to see if the all the properties in the model are valid
108
123
  # @return true if the model is valid
109
124
  def valid?
125
+ warn '[DEPRECATED] the `valid?` method is obsolete'
110
126
  return false if @name.nil?
111
127
  return false if @path.nil?
112
128
  return false if @platforms.nil?
@@ -140,37 +156,33 @@ module PulpRpmClient
140
156
  # @param [Hash] attributes Model attributes in the form of hash
141
157
  # @return [Object] Returns the model itself
142
158
  def self.build_from_hash(attributes)
143
- new.build_from_hash(attributes)
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 build_from_hash(attributes)
150
159
  return nil unless attributes.is_a?(Hash)
151
- self.class.openapi_types.each_pair do |key, type|
152
- if type =~ /\AArray<(.*)>/i
160
+ attributes = attributes.transform_keys(&:to_sym)
161
+ transformed_hash = {}
162
+ openapi_types.each_pair do |key, type|
163
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
164
+ transformed_hash["#{key}"] = nil
165
+ elsif type =~ /\AArray<(.*)>/i
153
166
  # check to ensure the input is an array given that the attribute
154
167
  # is documented as an array but the input is not
155
- if attributes[self.class.attribute_map[key]].is_a?(Array)
156
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
168
+ if attributes[attribute_map[key]].is_a?(Array)
169
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
157
170
  end
158
- elsif !attributes[self.class.attribute_map[key]].nil?
159
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
160
- end # or else data not found in attributes(hash), not an issue as the data can be optional
171
+ elsif !attributes[attribute_map[key]].nil?
172
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
173
+ end
161
174
  end
162
-
163
- self
175
+ new(transformed_hash)
164
176
  end
165
177
 
166
178
  # Deserializes the data based on type
167
179
  # @param string type Data type
168
180
  # @param string value Value to be deserialized
169
181
  # @return [Object] Deserialized data
170
- def _deserialize(type, value)
182
+ def self._deserialize(type, value)
171
183
  case type.to_sym
172
- when :DateTime
173
- DateTime.parse(value)
184
+ when :Time
185
+ Time.parse(value)
174
186
  when :Date
175
187
  Date.parse(value)
176
188
  when :String
@@ -200,7 +212,9 @@ module PulpRpmClient
200
212
  end
201
213
  end
202
214
  else # model
203
- PulpRpmClient.const_get(type).build_from_hash(value)
215
+ # models (e.g. Pet) or oneOf
216
+ klass = PulpRpmClient.const_get(type)
217
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
204
218
  end
205
219
  end
206
220
 
@@ -226,7 +240,7 @@ module PulpRpmClient
226
240
  is_nullable = self.class.openapi_nullable.include?(attr)
227
241
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
228
242
  end
229
-
243
+
230
244
  hash[param] = _to_hash(value)
231
245
  end
232
246
  hash
@@ -249,5 +263,7 @@ module PulpRpmClient
249
263
  value
250
264
  end
251
265
  end
266
+
252
267
  end
268
+
253
269
  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
  class MyPermissionsResponse
@@ -23,6 +24,11 @@ module PulpRpmClient
23
24
  }
24
25
  end
25
26
 
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
26
32
  # Attribute type mapping.
27
33
  def self.openapi_types
28
34
  {
@@ -55,12 +61,15 @@ module PulpRpmClient
55
61
  if (value = attributes[:'permissions']).is_a?(Array)
56
62
  self.permissions = value
57
63
  end
64
+ else
65
+ self.permissions = nil
58
66
  end
59
67
  end
60
68
 
61
69
  # Show invalid properties with the reasons. Usually used together with valid?
62
70
  # @return Array for valid properties with the reasons
63
71
  def list_invalid_properties
72
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
64
73
  invalid_properties = Array.new
65
74
  if @permissions.nil?
66
75
  invalid_properties.push('invalid value for "permissions", permissions cannot be nil.')
@@ -72,6 +81,7 @@ module PulpRpmClient
72
81
  # Check to see if the all the properties in the model are valid
73
82
  # @return true if the model is valid
74
83
  def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
75
85
  return false if @permissions.nil?
76
86
  true
77
87
  end
@@ -100,37 +110,33 @@ module PulpRpmClient
100
110
  # @param [Hash] attributes Model attributes in the form of hash
101
111
  # @return [Object] Returns the model itself
102
112
  def self.build_from_hash(attributes)
103
- new.build_from_hash(attributes)
104
- end
105
-
106
- # Builds the object from hash
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- # @return [Object] Returns the model itself
109
- def build_from_hash(attributes)
110
113
  return nil unless attributes.is_a?(Hash)
111
- self.class.openapi_types.each_pair do |key, type|
112
- if type =~ /\AArray<(.*)>/i
114
+ attributes = attributes.transform_keys(&:to_sym)
115
+ transformed_hash = {}
116
+ openapi_types.each_pair do |key, type|
117
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = nil
119
+ elsif type =~ /\AArray<(.*)>/i
113
120
  # check to ensure the input is an array given that the attribute
114
121
  # is documented as an array but the input is not
115
- if attributes[self.class.attribute_map[key]].is_a?(Array)
116
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
122
+ if attributes[attribute_map[key]].is_a?(Array)
123
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
117
124
  end
118
- elsif !attributes[self.class.attribute_map[key]].nil?
119
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
- end # or else data not found in attributes(hash), not an issue as the data can be optional
125
+ elsif !attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
127
+ end
121
128
  end
122
-
123
- self
129
+ new(transformed_hash)
124
130
  end
125
131
 
126
132
  # Deserializes the data based on type
127
133
  # @param string type Data type
128
134
  # @param string value Value to be deserialized
129
135
  # @return [Object] Deserialized data
130
- def _deserialize(type, value)
136
+ def self._deserialize(type, value)
131
137
  case type.to_sym
132
- when :DateTime
133
- DateTime.parse(value)
138
+ when :Time
139
+ Time.parse(value)
134
140
  when :Date
135
141
  Date.parse(value)
136
142
  when :String
@@ -160,7 +166,9 @@ module PulpRpmClient
160
166
  end
161
167
  end
162
168
  else # model
163
- PulpRpmClient.const_get(type).build_from_hash(value)
169
+ # models (e.g. Pet) or oneOf
170
+ klass = PulpRpmClient.const_get(type)
171
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
164
172
  end
165
173
  end
166
174
 
@@ -186,7 +194,7 @@ module PulpRpmClient
186
194
  is_nullable = self.class.openapi_nullable.include?(attr)
187
195
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
188
196
  end
189
-
197
+
190
198
  hash[param] = _to_hash(value)
191
199
  end
192
200
  hash
@@ -209,5 +217,7 @@ module PulpRpmClient
209
217
  value
210
218
  end
211
219
  end
220
+
212
221
  end
222
+
213
223
  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
  # Serializer to add/remove object roles to/from users/groups. This is used in conjunction with ``pulpcore.app.viewsets.base.RolesMixin`` and requires the underlying object to be passed as ``content_object`` in the context.
@@ -30,6 +31,11 @@ module PulpRpmClient
30
31
  }
31
32
  end
32
33
 
34
+ # Returns all the JSON keys this model knows about
35
+ def self.acceptable_attributes
36
+ attribute_map.values
37
+ end
38
+
33
39
  # Attribute type mapping.
34
40
  def self.openapi_types
35
41
  {
@@ -74,12 +80,15 @@ module PulpRpmClient
74
80
 
75
81
  if attributes.key?(:'role')
76
82
  self.role = attributes[:'role']
83
+ else
84
+ self.role = nil
77
85
  end
78
86
  end
79
87
 
80
88
  # Show invalid properties with the reasons. Usually used together with valid?
81
89
  # @return Array for valid properties with the reasons
82
90
  def list_invalid_properties
91
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
92
  invalid_properties = Array.new
84
93
  if @role.nil?
85
94
  invalid_properties.push('invalid value for "role", role cannot be nil.')
@@ -95,6 +104,7 @@ module PulpRpmClient
95
104
  # Check to see if the all the properties in the model are valid
96
105
  # @return true if the model is valid
97
106
  def valid?
107
+ warn '[DEPRECATED] the `valid?` method is obsolete'
98
108
  return false if @role.nil?
99
109
  return false if @role.to_s.length < 1
100
110
  true
@@ -140,37 +150,33 @@ module PulpRpmClient
140
150
  # @param [Hash] attributes Model attributes in the form of hash
141
151
  # @return [Object] Returns the model itself
142
152
  def self.build_from_hash(attributes)
143
- new.build_from_hash(attributes)
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 build_from_hash(attributes)
150
153
  return nil unless attributes.is_a?(Hash)
151
- self.class.openapi_types.each_pair do |key, type|
152
- if type =~ /\AArray<(.*)>/i
154
+ attributes = attributes.transform_keys(&:to_sym)
155
+ transformed_hash = {}
156
+ openapi_types.each_pair do |key, type|
157
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = nil
159
+ elsif type =~ /\AArray<(.*)>/i
153
160
  # check to ensure the input is an array given that the attribute
154
161
  # is documented as an array but the input is not
155
- if attributes[self.class.attribute_map[key]].is_a?(Array)
156
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
162
+ if attributes[attribute_map[key]].is_a?(Array)
163
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
157
164
  end
158
- elsif !attributes[self.class.attribute_map[key]].nil?
159
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
160
- end # or else data not found in attributes(hash), not an issue as the data can be optional
165
+ elsif !attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
167
+ end
161
168
  end
162
-
163
- self
169
+ new(transformed_hash)
164
170
  end
165
171
 
166
172
  # Deserializes the data based on type
167
173
  # @param string type Data type
168
174
  # @param string value Value to be deserialized
169
175
  # @return [Object] Deserialized data
170
- def _deserialize(type, value)
176
+ def self._deserialize(type, value)
171
177
  case type.to_sym
172
- when :DateTime
173
- DateTime.parse(value)
178
+ when :Time
179
+ Time.parse(value)
174
180
  when :Date
175
181
  Date.parse(value)
176
182
  when :String
@@ -200,7 +206,9 @@ module PulpRpmClient
200
206
  end
201
207
  end
202
208
  else # model
203
- PulpRpmClient.const_get(type).build_from_hash(value)
209
+ # models (e.g. Pet) or oneOf
210
+ klass = PulpRpmClient.const_get(type)
211
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
204
212
  end
205
213
  end
206
214
 
@@ -226,7 +234,7 @@ module PulpRpmClient
226
234
  is_nullable = self.class.openapi_nullable.include?(attr)
227
235
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
228
236
  end
229
-
237
+
230
238
  hash[param] = _to_hash(value)
231
239
  end
232
240
  hash
@@ -249,5 +257,7 @@ module PulpRpmClient
249
257
  value
250
258
  end
251
259
  end
260
+
252
261
  end
262
+
253
263
  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
  # Serializer to add/remove object roles to/from users/groups. This is used in conjunction with ``pulpcore.app.viewsets.base.RolesMixin`` and requires the underlying object to be passed as ``content_object`` in the context.
@@ -30,6 +31,11 @@ module PulpRpmClient
30
31
  }
31
32
  end
32
33
 
34
+ # Returns all the JSON keys this model knows about
35
+ def self.acceptable_attributes
36
+ attribute_map.values
37
+ end
38
+
33
39
  # Attribute type mapping.
34
40
  def self.openapi_types
35
41
  {
@@ -74,12 +80,15 @@ module PulpRpmClient
74
80
 
75
81
  if attributes.key?(:'role')
76
82
  self.role = attributes[:'role']
83
+ else
84
+ self.role = nil
77
85
  end
78
86
  end
79
87
 
80
88
  # Show invalid properties with the reasons. Usually used together with valid?
81
89
  # @return Array for valid properties with the reasons
82
90
  def list_invalid_properties
91
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
92
  invalid_properties = Array.new
84
93
  if @role.nil?
85
94
  invalid_properties.push('invalid value for "role", role cannot be nil.')
@@ -91,6 +100,7 @@ module PulpRpmClient
91
100
  # Check to see if the all the properties in the model are valid
92
101
  # @return true if the model is valid
93
102
  def valid?
103
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
104
  return false if @role.nil?
95
105
  true
96
106
  end
@@ -121,37 +131,33 @@ module PulpRpmClient
121
131
  # @param [Hash] attributes Model attributes in the form of hash
122
132
  # @return [Object] Returns the model itself
123
133
  def self.build_from_hash(attributes)
124
- new.build_from_hash(attributes)
125
- end
126
-
127
- # Builds the object from hash
128
- # @param [Hash] attributes Model attributes in the form of hash
129
- # @return [Object] Returns the model itself
130
- def build_from_hash(attributes)
131
134
  return nil unless attributes.is_a?(Hash)
132
- self.class.openapi_types.each_pair do |key, type|
133
- if type =~ /\AArray<(.*)>/i
135
+ attributes = attributes.transform_keys(&:to_sym)
136
+ transformed_hash = {}
137
+ openapi_types.each_pair do |key, type|
138
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
139
+ transformed_hash["#{key}"] = nil
140
+ elsif type =~ /\AArray<(.*)>/i
134
141
  # check to ensure the input is an array given that the attribute
135
142
  # is documented as an array but the input is not
136
- if attributes[self.class.attribute_map[key]].is_a?(Array)
137
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
143
+ if attributes[attribute_map[key]].is_a?(Array)
144
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
145
  end
139
- elsif !attributes[self.class.attribute_map[key]].nil?
140
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
- end # or else data not found in attributes(hash), not an issue as the data can be optional
146
+ elsif !attributes[attribute_map[key]].nil?
147
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
148
+ end
142
149
  end
143
-
144
- self
150
+ new(transformed_hash)
145
151
  end
146
152
 
147
153
  # Deserializes the data based on type
148
154
  # @param string type Data type
149
155
  # @param string value Value to be deserialized
150
156
  # @return [Object] Deserialized data
151
- def _deserialize(type, value)
157
+ def self._deserialize(type, value)
152
158
  case type.to_sym
153
- when :DateTime
154
- DateTime.parse(value)
159
+ when :Time
160
+ Time.parse(value)
155
161
  when :Date
156
162
  Date.parse(value)
157
163
  when :String
@@ -181,7 +187,9 @@ module PulpRpmClient
181
187
  end
182
188
  end
183
189
  else # model
184
- PulpRpmClient.const_get(type).build_from_hash(value)
190
+ # models (e.g. Pet) or oneOf
191
+ klass = PulpRpmClient.const_get(type)
192
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
185
193
  end
186
194
  end
187
195
 
@@ -207,7 +215,7 @@ module PulpRpmClient
207
215
  is_nullable = self.class.openapi_nullable.include?(attr)
208
216
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
209
217
  end
210
-
218
+
211
219
  hash[param] = _to_hash(value)
212
220
  end
213
221
  hash
@@ -230,5 +238,7 @@ module PulpRpmClient
230
238
  value
231
239
  end
232
240
  end
241
+
233
242
  end
243
+
234
244
  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
  class ObjectRolesResponse
@@ -23,6 +24,11 @@ module PulpRpmClient
23
24
  }
24
25
  end
25
26
 
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
26
32
  # Attribute type mapping.
27
33
  def self.openapi_types
28
34
  {
@@ -55,12 +61,15 @@ module PulpRpmClient
55
61
  if (value = attributes[:'roles']).is_a?(Array)
56
62
  self.roles = value
57
63
  end
64
+ else
65
+ self.roles = nil
58
66
  end
59
67
  end
60
68
 
61
69
  # Show invalid properties with the reasons. Usually used together with valid?
62
70
  # @return Array for valid properties with the reasons
63
71
  def list_invalid_properties
72
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
64
73
  invalid_properties = Array.new
65
74
  if @roles.nil?
66
75
  invalid_properties.push('invalid value for "roles", roles cannot be nil.')
@@ -72,6 +81,7 @@ module PulpRpmClient
72
81
  # Check to see if the all the properties in the model are valid
73
82
  # @return true if the model is valid
74
83
  def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
75
85
  return false if @roles.nil?
76
86
  true
77
87
  end
@@ -100,37 +110,33 @@ module PulpRpmClient
100
110
  # @param [Hash] attributes Model attributes in the form of hash
101
111
  # @return [Object] Returns the model itself
102
112
  def self.build_from_hash(attributes)
103
- new.build_from_hash(attributes)
104
- end
105
-
106
- # Builds the object from hash
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- # @return [Object] Returns the model itself
109
- def build_from_hash(attributes)
110
113
  return nil unless attributes.is_a?(Hash)
111
- self.class.openapi_types.each_pair do |key, type|
112
- if type =~ /\AArray<(.*)>/i
114
+ attributes = attributes.transform_keys(&:to_sym)
115
+ transformed_hash = {}
116
+ openapi_types.each_pair do |key, type|
117
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = nil
119
+ elsif type =~ /\AArray<(.*)>/i
113
120
  # check to ensure the input is an array given that the attribute
114
121
  # is documented as an array but the input is not
115
- if attributes[self.class.attribute_map[key]].is_a?(Array)
116
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
122
+ if attributes[attribute_map[key]].is_a?(Array)
123
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
117
124
  end
118
- elsif !attributes[self.class.attribute_map[key]].nil?
119
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
- end # or else data not found in attributes(hash), not an issue as the data can be optional
125
+ elsif !attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
127
+ end
121
128
  end
122
-
123
- self
129
+ new(transformed_hash)
124
130
  end
125
131
 
126
132
  # Deserializes the data based on type
127
133
  # @param string type Data type
128
134
  # @param string value Value to be deserialized
129
135
  # @return [Object] Deserialized data
130
- def _deserialize(type, value)
136
+ def self._deserialize(type, value)
131
137
  case type.to_sym
132
- when :DateTime
133
- DateTime.parse(value)
138
+ when :Time
139
+ Time.parse(value)
134
140
  when :Date
135
141
  Date.parse(value)
136
142
  when :String
@@ -160,7 +166,9 @@ module PulpRpmClient
160
166
  end
161
167
  end
162
168
  else # model
163
- PulpRpmClient.const_get(type).build_from_hash(value)
169
+ # models (e.g. Pet) or oneOf
170
+ klass = PulpRpmClient.const_get(type)
171
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
164
172
  end
165
173
  end
166
174
 
@@ -186,7 +194,7 @@ module PulpRpmClient
186
194
  is_nullable = self.class.openapi_nullable.include?(attr)
187
195
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
188
196
  end
189
-
197
+
190
198
  hash[param] = _to_hash(value)
191
199
  end
192
200
  hash
@@ -209,5 +217,7 @@ module PulpRpmClient
209
217
  value
210
218
  end
211
219
  end
220
+
212
221
  end
222
+
213
223
  end