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
  # Serializer for Rpm Repositories.
@@ -65,6 +66,28 @@ module PulpRpmClient
65
66
  # The compression type to use for metadata files. * `zstd` - zstd * `gz` - gz
66
67
  attr_accessor :compression_type
67
68
 
69
+ class EnumAttributeValidator
70
+ attr_reader :datatype
71
+ attr_reader :allowable_values
72
+
73
+ def initialize(datatype, allowable_values)
74
+ @allowable_values = allowable_values.map do |value|
75
+ case datatype.to_s
76
+ when /Integer/i
77
+ value.to_i
78
+ when /Float/i
79
+ value.to_f
80
+ else
81
+ value
82
+ end
83
+ end
84
+ end
85
+
86
+ def valid?(value)
87
+ !value || allowable_values.include?(value)
88
+ end
89
+ end
90
+
68
91
  # Attribute mapping from ruby-style variable name to JSON key.
69
92
  def self.attribute_map
70
93
  {
@@ -88,6 +111,11 @@ module PulpRpmClient
88
111
  }
89
112
  end
90
113
 
114
+ # Returns all the JSON keys this model knows about
115
+ def self.acceptable_attributes
116
+ attribute_map.values
117
+ end
118
+
91
119
  # Attribute type mapping.
92
120
  def self.openapi_types
93
121
  {
@@ -124,6 +152,7 @@ module PulpRpmClient
124
152
  :'package_checksum_type',
125
153
  :'gpgcheck',
126
154
  :'repo_gpgcheck',
155
+ :'repo_config',
127
156
  :'compression_type'
128
157
  ])
129
158
  end
@@ -151,6 +180,8 @@ module PulpRpmClient
151
180
 
152
181
  if attributes.key?(:'name')
153
182
  self.name = attributes[:'name']
183
+ else
184
+ self.name = nil
154
185
  end
155
186
 
156
187
  if attributes.key?(:'description')
@@ -221,6 +252,7 @@ module PulpRpmClient
221
252
  # Show invalid properties with the reasons. Usually used together with valid?
222
253
  # @return Array for valid properties with the reasons
223
254
  def list_invalid_properties
255
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
224
256
  invalid_properties = Array.new
225
257
  if @name.nil?
226
258
  invalid_properties.push('invalid value for "name", name cannot be nil.')
@@ -268,6 +300,7 @@ module PulpRpmClient
268
300
  # Check to see if the all the properties in the model are valid
269
301
  # @return true if the model is valid
270
302
  def valid?
303
+ warn '[DEPRECATED] the `valid?` method is obsolete'
271
304
  return false if @name.nil?
272
305
  return false if @name.to_s.length < 1
273
306
  return false if !@description.nil? && @description.to_s.length < 1
@@ -318,7 +351,11 @@ module PulpRpmClient
318
351
  # Custom attribute writer method with validation
319
352
  # @param [Object] package_signing_fingerprint Value to be assigned
320
353
  def package_signing_fingerprint=(package_signing_fingerprint)
321
- if !package_signing_fingerprint.nil? && package_signing_fingerprint.to_s.length > 40
354
+ if package_signing_fingerprint.nil?
355
+ fail ArgumentError, 'package_signing_fingerprint cannot be nil'
356
+ end
357
+
358
+ if package_signing_fingerprint.to_s.length > 40
322
359
  fail ArgumentError, 'invalid value for "package_signing_fingerprint", the character length must be smaller than or equal to 40.'
323
360
  end
324
361
 
@@ -328,7 +365,11 @@ module PulpRpmClient
328
365
  # Custom attribute writer method with validation
329
366
  # @param [Object] retain_package_versions Value to be assigned
330
367
  def retain_package_versions=(retain_package_versions)
331
- if !retain_package_versions.nil? && retain_package_versions < 0
368
+ if retain_package_versions.nil?
369
+ fail ArgumentError, 'retain_package_versions cannot be nil'
370
+ end
371
+
372
+ if retain_package_versions < 0
332
373
  fail ArgumentError, 'invalid value for "retain_package_versions", must be greater than or equal to 0.'
333
374
  end
334
375
 
@@ -403,37 +444,33 @@ module PulpRpmClient
403
444
  # @param [Hash] attributes Model attributes in the form of hash
404
445
  # @return [Object] Returns the model itself
405
446
  def self.build_from_hash(attributes)
406
- new.build_from_hash(attributes)
407
- end
408
-
409
- # Builds the object from hash
410
- # @param [Hash] attributes Model attributes in the form of hash
411
- # @return [Object] Returns the model itself
412
- def build_from_hash(attributes)
413
447
  return nil unless attributes.is_a?(Hash)
414
- self.class.openapi_types.each_pair do |key, type|
415
- if type =~ /\AArray<(.*)>/i
448
+ attributes = attributes.transform_keys(&:to_sym)
449
+ transformed_hash = {}
450
+ openapi_types.each_pair do |key, type|
451
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
452
+ transformed_hash["#{key}"] = nil
453
+ elsif type =~ /\AArray<(.*)>/i
416
454
  # check to ensure the input is an array given that the attribute
417
455
  # is documented as an array but the input is not
418
- if attributes[self.class.attribute_map[key]].is_a?(Array)
419
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
456
+ if attributes[attribute_map[key]].is_a?(Array)
457
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
420
458
  end
421
- elsif !attributes[self.class.attribute_map[key]].nil?
422
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
423
- end # or else data not found in attributes(hash), not an issue as the data can be optional
459
+ elsif !attributes[attribute_map[key]].nil?
460
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
461
+ end
424
462
  end
425
-
426
- self
463
+ new(transformed_hash)
427
464
  end
428
465
 
429
466
  # Deserializes the data based on type
430
467
  # @param string type Data type
431
468
  # @param string value Value to be deserialized
432
469
  # @return [Object] Deserialized data
433
- def _deserialize(type, value)
470
+ def self._deserialize(type, value)
434
471
  case type.to_sym
435
- when :DateTime
436
- DateTime.parse(value)
472
+ when :Time
473
+ Time.parse(value)
437
474
  when :Date
438
475
  Date.parse(value)
439
476
  when :String
@@ -463,7 +500,9 @@ module PulpRpmClient
463
500
  end
464
501
  end
465
502
  else # model
466
- PulpRpmClient.const_get(type).build_from_hash(value)
503
+ # models (e.g. Pet) or oneOf
504
+ klass = PulpRpmClient.const_get(type)
505
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
467
506
  end
468
507
  end
469
508
 
@@ -489,7 +528,7 @@ module PulpRpmClient
489
528
  is_nullable = self.class.openapi_nullable.include?(attr)
490
529
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
491
530
  end
492
-
531
+
493
532
  hash[param] = _to_hash(value)
494
533
  end
495
534
  hash
@@ -512,5 +551,7 @@ module PulpRpmClient
512
551
  value
513
552
  end
514
553
  end
554
+
515
555
  end
556
+
516
557
  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 for Rpm Repositories.
@@ -83,6 +84,28 @@ module PulpRpmClient
83
84
  # The compression type to use for metadata files. * `zstd` - zstd * `gz` - gz
84
85
  attr_accessor :compression_type
85
86
 
87
+ class EnumAttributeValidator
88
+ attr_reader :datatype
89
+ attr_reader :allowable_values
90
+
91
+ def initialize(datatype, allowable_values)
92
+ @allowable_values = allowable_values.map do |value|
93
+ case datatype.to_s
94
+ when /Integer/i
95
+ value.to_i
96
+ when /Float/i
97
+ value.to_f
98
+ else
99
+ value
100
+ end
101
+ end
102
+ end
103
+
104
+ def valid?(value)
105
+ !value || allowable_values.include?(value)
106
+ end
107
+ end
108
+
86
109
  # Attribute mapping from ruby-style variable name to JSON key.
87
110
  def self.attribute_map
88
111
  {
@@ -113,13 +136,18 @@ module PulpRpmClient
113
136
  }
114
137
  end
115
138
 
139
+ # Returns all the JSON keys this model knows about
140
+ def self.acceptable_attributes
141
+ attribute_map.values
142
+ end
143
+
116
144
  # Attribute type mapping.
117
145
  def self.openapi_types
118
146
  {
119
147
  :'pulp_href' => :'String',
120
148
  :'prn' => :'String',
121
- :'pulp_created' => :'DateTime',
122
- :'pulp_last_updated' => :'DateTime',
149
+ :'pulp_created' => :'Time',
150
+ :'pulp_last_updated' => :'Time',
123
151
  :'versions_href' => :'String',
124
152
  :'pulp_labels' => :'Hash<String, String>',
125
153
  :'latest_version_href' => :'String',
@@ -156,6 +184,7 @@ module PulpRpmClient
156
184
  :'package_checksum_type',
157
185
  :'gpgcheck',
158
186
  :'repo_gpgcheck',
187
+ :'repo_config',
159
188
  :'compression_type'
160
189
  ])
161
190
  end
@@ -207,6 +236,8 @@ module PulpRpmClient
207
236
 
208
237
  if attributes.key?(:'name')
209
238
  self.name = attributes[:'name']
239
+ else
240
+ self.name = nil
210
241
  end
211
242
 
212
243
  if attributes.key?(:'description')
@@ -283,6 +314,7 @@ module PulpRpmClient
283
314
  # Show invalid properties with the reasons. Usually used together with valid?
284
315
  # @return Array for valid properties with the reasons
285
316
  def list_invalid_properties
317
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
286
318
  invalid_properties = Array.new
287
319
  if @name.nil?
288
320
  invalid_properties.push('invalid value for "name", name cannot be nil.')
@@ -322,6 +354,7 @@ module PulpRpmClient
322
354
  # Check to see if the all the properties in the model are valid
323
355
  # @return true if the model is valid
324
356
  def valid?
357
+ warn '[DEPRECATED] the `valid?` method is obsolete'
325
358
  return false if @name.nil?
326
359
  return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
327
360
  return false if !@package_signing_fingerprint.nil? && @package_signing_fingerprint.to_s.length > 40
@@ -346,7 +379,11 @@ module PulpRpmClient
346
379
  # Custom attribute writer method with validation
347
380
  # @param [Object] package_signing_fingerprint Value to be assigned
348
381
  def package_signing_fingerprint=(package_signing_fingerprint)
349
- if !package_signing_fingerprint.nil? && package_signing_fingerprint.to_s.length > 40
382
+ if package_signing_fingerprint.nil?
383
+ fail ArgumentError, 'package_signing_fingerprint cannot be nil'
384
+ end
385
+
386
+ if package_signing_fingerprint.to_s.length > 40
350
387
  fail ArgumentError, 'invalid value for "package_signing_fingerprint", the character length must be smaller than or equal to 40.'
351
388
  end
352
389
 
@@ -356,7 +393,11 @@ module PulpRpmClient
356
393
  # Custom attribute writer method with validation
357
394
  # @param [Object] retain_package_versions Value to be assigned
358
395
  def retain_package_versions=(retain_package_versions)
359
- if !retain_package_versions.nil? && retain_package_versions < 0
396
+ if retain_package_versions.nil?
397
+ fail ArgumentError, 'retain_package_versions cannot be nil'
398
+ end
399
+
400
+ if retain_package_versions < 0
360
401
  fail ArgumentError, 'invalid value for "retain_package_versions", must be greater than or equal to 0.'
361
402
  end
362
403
 
@@ -438,37 +479,33 @@ module PulpRpmClient
438
479
  # @param [Hash] attributes Model attributes in the form of hash
439
480
  # @return [Object] Returns the model itself
440
481
  def self.build_from_hash(attributes)
441
- new.build_from_hash(attributes)
442
- end
443
-
444
- # Builds the object from hash
445
- # @param [Hash] attributes Model attributes in the form of hash
446
- # @return [Object] Returns the model itself
447
- def build_from_hash(attributes)
448
482
  return nil unless attributes.is_a?(Hash)
449
- self.class.openapi_types.each_pair do |key, type|
450
- if type =~ /\AArray<(.*)>/i
483
+ attributes = attributes.transform_keys(&:to_sym)
484
+ transformed_hash = {}
485
+ openapi_types.each_pair do |key, type|
486
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
487
+ transformed_hash["#{key}"] = nil
488
+ elsif type =~ /\AArray<(.*)>/i
451
489
  # check to ensure the input is an array given that the attribute
452
490
  # is documented as an array but the input is not
453
- if attributes[self.class.attribute_map[key]].is_a?(Array)
454
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
491
+ if attributes[attribute_map[key]].is_a?(Array)
492
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
455
493
  end
456
- elsif !attributes[self.class.attribute_map[key]].nil?
457
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
458
- end # or else data not found in attributes(hash), not an issue as the data can be optional
494
+ elsif !attributes[attribute_map[key]].nil?
495
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
496
+ end
459
497
  end
460
-
461
- self
498
+ new(transformed_hash)
462
499
  end
463
500
 
464
501
  # Deserializes the data based on type
465
502
  # @param string type Data type
466
503
  # @param string value Value to be deserialized
467
504
  # @return [Object] Deserialized data
468
- def _deserialize(type, value)
505
+ def self._deserialize(type, value)
469
506
  case type.to_sym
470
- when :DateTime
471
- DateTime.parse(value)
507
+ when :Time
508
+ Time.parse(value)
472
509
  when :Date
473
510
  Date.parse(value)
474
511
  when :String
@@ -498,7 +535,9 @@ module PulpRpmClient
498
535
  end
499
536
  end
500
537
  else # model
501
- PulpRpmClient.const_get(type).build_from_hash(value)
538
+ # models (e.g. Pet) or oneOf
539
+ klass = PulpRpmClient.const_get(type)
540
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
502
541
  end
503
542
  end
504
543
 
@@ -524,7 +563,7 @@ module PulpRpmClient
524
563
  is_nullable = self.class.openapi_nullable.include?(attr)
525
564
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
526
565
  end
527
-
566
+
528
567
  hash[param] = _to_hash(value)
529
568
  end
530
569
  hash
@@ -547,5 +586,7 @@ module PulpRpmClient
547
586
  value
548
587
  end
549
588
  end
589
+
550
590
  end
591
+
551
592
  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
  # A Serializer for UlnRemote.
@@ -80,6 +81,28 @@ module PulpRpmClient
80
81
  # Base URL of the ULN server. If the uln_server_base_url is not provided pulp_rpm willuse the contents of the DEFAULT_ULN_SERVER_BASE_URL setting instead.
81
82
  attr_accessor :uln_server_base_url
82
83
 
84
+ class EnumAttributeValidator
85
+ attr_reader :datatype
86
+ attr_reader :allowable_values
87
+
88
+ def initialize(datatype, allowable_values)
89
+ @allowable_values = allowable_values.map do |value|
90
+ case datatype.to_s
91
+ when /Integer/i
92
+ value.to_i
93
+ when /Float/i
94
+ value.to_f
95
+ else
96
+ value
97
+ end
98
+ end
99
+ end
100
+
101
+ def valid?(value)
102
+ !value || allowable_values.include?(value)
103
+ end
104
+ end
105
+
83
106
  # Attribute mapping from ruby-style variable name to JSON key.
84
107
  def self.attribute_map
85
108
  {
@@ -108,6 +131,11 @@ module PulpRpmClient
108
131
  }
109
132
  end
110
133
 
134
+ # Returns all the JSON keys this model knows about
135
+ def self.acceptable_attributes
136
+ attribute_map.values
137
+ end
138
+
111
139
  # Attribute type mapping.
112
140
  def self.openapi_types
113
141
  {
@@ -173,10 +201,14 @@ module PulpRpmClient
173
201
 
174
202
  if attributes.key?(:'name')
175
203
  self.name = attributes[:'name']
204
+ else
205
+ self.name = nil
176
206
  end
177
207
 
178
208
  if attributes.key?(:'url')
179
209
  self.url = attributes[:'url']
210
+ else
211
+ self.url = nil
180
212
  end
181
213
 
182
214
  if attributes.key?(:'ca_cert')
@@ -209,10 +241,14 @@ module PulpRpmClient
209
241
 
210
242
  if attributes.key?(:'username')
211
243
  self.username = attributes[:'username']
244
+ else
245
+ self.username = nil
212
246
  end
213
247
 
214
248
  if attributes.key?(:'password')
215
249
  self.password = attributes[:'password']
250
+ else
251
+ self.password = nil
216
252
  end
217
253
 
218
254
  if attributes.key?(:'pulp_labels')
@@ -267,6 +303,7 @@ module PulpRpmClient
267
303
  # Show invalid properties with the reasons. Usually used together with valid?
268
304
  # @return Array for valid properties with the reasons
269
305
  def list_invalid_properties
306
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
270
307
  invalid_properties = Array.new
271
308
  if @name.nil?
272
309
  invalid_properties.push('invalid value for "name", name cannot be nil.')
@@ -328,20 +365,20 @@ module PulpRpmClient
328
365
  invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
329
366
  end
330
367
 
331
- if !@total_timeout.nil? && @total_timeout < 0
332
- invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.')
368
+ if !@total_timeout.nil? && @total_timeout < 0.0
369
+ invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
333
370
  end
334
371
 
335
- if !@connect_timeout.nil? && @connect_timeout < 0
336
- invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.')
372
+ if !@connect_timeout.nil? && @connect_timeout < 0.0
373
+ invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
337
374
  end
338
375
 
339
- if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
340
- invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.')
376
+ if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
377
+ invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
341
378
  end
342
379
 
343
- if !@sock_read_timeout.nil? && @sock_read_timeout < 0
344
- invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.')
380
+ if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
381
+ invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
345
382
  end
346
383
 
347
384
  if !@uln_server_base_url.nil? && @uln_server_base_url.to_s.length < 1
@@ -354,6 +391,7 @@ module PulpRpmClient
354
391
  # Check to see if the all the properties in the model are valid
355
392
  # @return true if the model is valid
356
393
  def valid?
394
+ warn '[DEPRECATED] the `valid?` method is obsolete'
357
395
  return false if @name.nil?
358
396
  return false if @name.to_s.length < 1
359
397
  return false if @url.nil?
@@ -369,10 +407,10 @@ module PulpRpmClient
369
407
  return false if @password.nil?
370
408
  return false if @password.to_s.length < 1
371
409
  return false if !@download_concurrency.nil? && @download_concurrency < 1
372
- return false if !@total_timeout.nil? && @total_timeout < 0
373
- return false if !@connect_timeout.nil? && @connect_timeout < 0
374
- return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
375
- return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0
410
+ return false if !@total_timeout.nil? && @total_timeout < 0.0
411
+ return false if !@connect_timeout.nil? && @connect_timeout < 0.0
412
+ return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
413
+ return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
376
414
  return false if !@uln_server_base_url.nil? && @uln_server_base_url.to_s.length < 1
377
415
  true
378
416
  end
@@ -506,8 +544,8 @@ module PulpRpmClient
506
544
  # Custom attribute writer method with validation
507
545
  # @param [Object] total_timeout Value to be assigned
508
546
  def total_timeout=(total_timeout)
509
- if !total_timeout.nil? && total_timeout < 0
510
- fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.'
547
+ if !total_timeout.nil? && total_timeout < 0.0
548
+ fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
511
549
  end
512
550
 
513
551
  @total_timeout = total_timeout
@@ -516,8 +554,8 @@ module PulpRpmClient
516
554
  # Custom attribute writer method with validation
517
555
  # @param [Object] connect_timeout Value to be assigned
518
556
  def connect_timeout=(connect_timeout)
519
- if !connect_timeout.nil? && connect_timeout < 0
520
- fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.'
557
+ if !connect_timeout.nil? && connect_timeout < 0.0
558
+ fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
521
559
  end
522
560
 
523
561
  @connect_timeout = connect_timeout
@@ -526,8 +564,8 @@ module PulpRpmClient
526
564
  # Custom attribute writer method with validation
527
565
  # @param [Object] sock_connect_timeout Value to be assigned
528
566
  def sock_connect_timeout=(sock_connect_timeout)
529
- if !sock_connect_timeout.nil? && sock_connect_timeout < 0
530
- fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.'
567
+ if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
568
+ fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
531
569
  end
532
570
 
533
571
  @sock_connect_timeout = sock_connect_timeout
@@ -536,8 +574,8 @@ module PulpRpmClient
536
574
  # Custom attribute writer method with validation
537
575
  # @param [Object] sock_read_timeout Value to be assigned
538
576
  def sock_read_timeout=(sock_read_timeout)
539
- if !sock_read_timeout.nil? && sock_read_timeout < 0
540
- fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.'
577
+ if !sock_read_timeout.nil? && sock_read_timeout < 0.0
578
+ fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
541
579
  end
542
580
 
543
581
  @sock_read_timeout = sock_read_timeout
@@ -598,37 +636,33 @@ module PulpRpmClient
598
636
  # @param [Hash] attributes Model attributes in the form of hash
599
637
  # @return [Object] Returns the model itself
600
638
  def self.build_from_hash(attributes)
601
- new.build_from_hash(attributes)
602
- end
603
-
604
- # Builds the object from hash
605
- # @param [Hash] attributes Model attributes in the form of hash
606
- # @return [Object] Returns the model itself
607
- def build_from_hash(attributes)
608
639
  return nil unless attributes.is_a?(Hash)
609
- self.class.openapi_types.each_pair do |key, type|
610
- if type =~ /\AArray<(.*)>/i
640
+ attributes = attributes.transform_keys(&:to_sym)
641
+ transformed_hash = {}
642
+ openapi_types.each_pair do |key, type|
643
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
644
+ transformed_hash["#{key}"] = nil
645
+ elsif type =~ /\AArray<(.*)>/i
611
646
  # check to ensure the input is an array given that the attribute
612
647
  # is documented as an array but the input is not
613
- if attributes[self.class.attribute_map[key]].is_a?(Array)
614
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
648
+ if attributes[attribute_map[key]].is_a?(Array)
649
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
615
650
  end
616
- elsif !attributes[self.class.attribute_map[key]].nil?
617
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
618
- end # or else data not found in attributes(hash), not an issue as the data can be optional
651
+ elsif !attributes[attribute_map[key]].nil?
652
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
653
+ end
619
654
  end
620
-
621
- self
655
+ new(transformed_hash)
622
656
  end
623
657
 
624
658
  # Deserializes the data based on type
625
659
  # @param string type Data type
626
660
  # @param string value Value to be deserialized
627
661
  # @return [Object] Deserialized data
628
- def _deserialize(type, value)
662
+ def self._deserialize(type, value)
629
663
  case type.to_sym
630
- when :DateTime
631
- DateTime.parse(value)
664
+ when :Time
665
+ Time.parse(value)
632
666
  when :Date
633
667
  Date.parse(value)
634
668
  when :String
@@ -658,7 +692,9 @@ module PulpRpmClient
658
692
  end
659
693
  end
660
694
  else # model
661
- PulpRpmClient.const_get(type).build_from_hash(value)
695
+ # models (e.g. Pet) or oneOf
696
+ klass = PulpRpmClient.const_get(type)
697
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
662
698
  end
663
699
  end
664
700
 
@@ -684,7 +720,7 @@ module PulpRpmClient
684
720
  is_nullable = self.class.openapi_nullable.include?(attr)
685
721
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
686
722
  end
687
-
723
+
688
724
  hash[param] = _to_hash(value)
689
725
  end
690
726
  hash
@@ -707,5 +743,7 @@ module PulpRpmClient
707
743
  value
708
744
  end
709
745
  end
746
+
710
747
  end
748
+
711
749
  end