pulp_deb_client 3.4.0 → 3.5.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 (296) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +34 -9
  3. data/docs/AptRepositorySyncURL.md +12 -11
  4. data/docs/AsyncOperationResponse.md +8 -7
  5. data/docs/ContentGenericContentsApi.md +114 -64
  6. data/docs/ContentInstallerFileIndicesApi.md +111 -61
  7. data/docs/ContentInstallerPackagesApi.md +130 -80
  8. data/docs/ContentPackageIndicesApi.md +111 -61
  9. data/docs/ContentPackageReleaseComponentsApi.md +111 -61
  10. data/docs/ContentPackagesApi.md +144 -94
  11. data/docs/ContentReleaseArchitecturesApi.md +109 -59
  12. data/docs/ContentReleaseComponentsApi.md +110 -60
  13. data/docs/ContentReleaseFilesApi.md +111 -61
  14. data/docs/ContentReleasesApi.md +114 -64
  15. data/docs/ContentSourceIndicesApi.md +110 -60
  16. data/docs/ContentSourcePackagesApi.md +137 -87
  17. data/docs/ContentSourceReleaseComponentsApi.md +111 -61
  18. data/docs/ContentSummaryResponse.md +12 -11
  19. data/docs/Copy.md +12 -11
  20. data/docs/DebAptDistribution.md +20 -19
  21. data/docs/DebAptDistributionResponse.md +32 -31
  22. data/docs/DebAptPublication.md +18 -17
  23. data/docs/DebAptPublicationResponse.md +26 -25
  24. data/docs/DebAptRemote.md +64 -63
  25. data/docs/DebAptRemoteResponse.md +64 -63
  26. data/docs/DebAptRemoteResponseHiddenFieldsInner.md +20 -0
  27. data/docs/DebAptRepository.md +22 -21
  28. data/docs/DebAptRepositoryResponse.md +34 -33
  29. data/docs/DebCopyApi.md +30 -14
  30. data/docs/DebGenericContentResponse.md +30 -29
  31. data/docs/DebInstallerFileIndex.md +16 -15
  32. data/docs/DebInstallerFileIndexResponse.md +22 -21
  33. data/docs/DebInstallerPackageResponse.md +88 -87
  34. data/docs/DebPackageIndex.md +16 -15
  35. data/docs/DebPackageIndexResponse.md +22 -21
  36. data/docs/DebPackageReleaseComponent.md +12 -11
  37. data/docs/DebPackageReleaseComponentResponse.md +18 -17
  38. data/docs/DebPackageResponse.md +92 -91
  39. data/docs/DebRelease.md +26 -25
  40. data/docs/DebReleaseArchitecture.md +12 -11
  41. data/docs/DebReleaseArchitectureResponse.md +18 -17
  42. data/docs/DebReleaseComponent.md +12 -11
  43. data/docs/DebReleaseComponentResponse.md +20 -17
  44. data/docs/DebReleaseFile.md +18 -17
  45. data/docs/DebReleaseFileResponse.md +24 -23
  46. data/docs/DebReleaseResponse.md +32 -31
  47. data/docs/DebSourceIndex.md +16 -15
  48. data/docs/DebSourceIndexResponse.md +22 -21
  49. data/docs/DebSourcePackage.md +12 -11
  50. data/docs/DebSourcePackageReleaseComponent.md +12 -11
  51. data/docs/DebSourcePackageReleaseComponentResponse.md +18 -17
  52. data/docs/DebSourcePackageResponse.md +74 -71
  53. data/docs/DebVerbatimPublication.md +10 -9
  54. data/docs/DebVerbatimPublicationResponse.md +18 -17
  55. data/docs/DistributionsAptApi.md +564 -129
  56. data/docs/MyPermissionsResponse.md +18 -0
  57. data/docs/NestedRole.md +22 -0
  58. data/docs/NestedRoleResponse.md +22 -0
  59. data/docs/ObjectRolesResponse.md +18 -0
  60. data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
  61. data/docs/PaginateddebAptDistributionResponseList.md +14 -13
  62. data/docs/PaginateddebAptPublicationResponseList.md +14 -13
  63. data/docs/PaginateddebAptRemoteResponseList.md +14 -13
  64. data/docs/PaginateddebAptRepositoryResponseList.md +14 -13
  65. data/docs/PaginateddebGenericContentResponseList.md +14 -13
  66. data/docs/PaginateddebInstallerFileIndexResponseList.md +14 -13
  67. data/docs/PaginateddebInstallerPackageResponseList.md +14 -13
  68. data/docs/PaginateddebPackageIndexResponseList.md +14 -13
  69. data/docs/PaginateddebPackageReleaseComponentResponseList.md +14 -13
  70. data/docs/PaginateddebPackageResponseList.md +14 -13
  71. data/docs/PaginateddebReleaseArchitectureResponseList.md +14 -13
  72. data/docs/PaginateddebReleaseComponentResponseList.md +14 -13
  73. data/docs/PaginateddebReleaseFileResponseList.md +14 -13
  74. data/docs/PaginateddebReleaseResponseList.md +14 -13
  75. data/docs/PaginateddebSourceIndexResponseList.md +14 -13
  76. data/docs/PaginateddebSourcePackageReleaseComponentResponseList.md +14 -13
  77. data/docs/PaginateddebSourcePackageResponseList.md +14 -13
  78. data/docs/PaginateddebVerbatimPublicationResponseList.md +14 -13
  79. data/docs/PatcheddebAptDistribution.md +20 -19
  80. data/docs/PatcheddebAptRemote.md +64 -63
  81. data/docs/PatcheddebAptRepository.md +22 -21
  82. data/docs/PolicyEnum.md +4 -5
  83. data/docs/PublicationsAptApi.md +446 -77
  84. data/docs/PublicationsVerbatimApi.md +446 -77
  85. data/docs/RemotesAptApi.md +568 -131
  86. data/docs/Repair.md +8 -7
  87. data/docs/RepositoriesAptApi.md +623 -154
  88. data/docs/RepositoriesAptVersionsApi.md +152 -82
  89. data/docs/RepositoryAddRemoveContent.md +12 -11
  90. data/docs/RepositoryVersionResponse.md +22 -21
  91. data/docs/SetLabel.md +10 -9
  92. data/docs/SetLabelResponse.md +10 -9
  93. data/docs/UnsetLabel.md +8 -7
  94. data/docs/UnsetLabelResponse.md +10 -9
  95. data/lib/pulp_deb_client/api/content_generic_contents_api.rb +20 -14
  96. data/lib/pulp_deb_client/api/content_installer_file_indices_api.rb +20 -14
  97. data/lib/pulp_deb_client/api/content_installer_packages_api.rb +20 -22
  98. data/lib/pulp_deb_client/api/content_package_indices_api.rb +20 -14
  99. data/lib/pulp_deb_client/api/content_package_release_components_api.rb +20 -14
  100. data/lib/pulp_deb_client/api/content_packages_api.rb +20 -22
  101. data/lib/pulp_deb_client/api/content_release_architectures_api.rb +20 -14
  102. data/lib/pulp_deb_client/api/content_release_components_api.rb +20 -14
  103. data/lib/pulp_deb_client/api/content_release_files_api.rb +20 -14
  104. data/lib/pulp_deb_client/api/content_releases_api.rb +20 -14
  105. data/lib/pulp_deb_client/api/content_source_indices_api.rb +20 -14
  106. data/lib/pulp_deb_client/api/content_source_packages_api.rb +20 -14
  107. data/lib/pulp_deb_client/api/content_source_release_components_api.rb +20 -14
  108. data/lib/pulp_deb_client/api/deb_copy_api.rb +10 -6
  109. data/lib/pulp_deb_client/api/distributions_apt_api.rb +347 -38
  110. data/lib/pulp_deb_client/api/publications_apt_api.rb +325 -29
  111. data/lib/pulp_deb_client/api/publications_verbatim_api.rb +325 -29
  112. data/lib/pulp_deb_client/api/remotes_apt_api.rb +362 -50
  113. data/lib/pulp_deb_client/api/repositories_apt_api.rb +365 -48
  114. data/lib/pulp_deb_client/api/repositories_apt_versions_api.rb +40 -30
  115. data/lib/pulp_deb_client/api_client.rb +137 -102
  116. data/lib/pulp_deb_client/api_error.rb +2 -1
  117. data/lib/pulp_deb_client/configuration.rb +162 -21
  118. data/lib/pulp_deb_client/models/apt_repository_sync_url.rb +30 -22
  119. data/lib/pulp_deb_client/models/async_operation_response.rb +32 -22
  120. data/lib/pulp_deb_client/models/content_summary_response.rb +36 -22
  121. data/lib/pulp_deb_client/models/copy.rb +34 -28
  122. data/lib/pulp_deb_client/models/deb_apt_distribution.rb +34 -22
  123. data/lib/pulp_deb_client/models/deb_apt_distribution_response.rb +36 -24
  124. data/lib/pulp_deb_client/models/deb_apt_publication.rb +30 -22
  125. data/lib/pulp_deb_client/models/deb_apt_publication_response.rb +32 -24
  126. data/lib/pulp_deb_client/models/deb_apt_remote.rb +78 -42
  127. data/lib/pulp_deb_client/models/deb_apt_remote_response.rb +81 -45
  128. data/lib/pulp_deb_client/models/{deb_apt_remote_response_hidden_fields.rb → deb_apt_remote_response_hidden_fields_inner.rb} +37 -25
  129. data/lib/pulp_deb_client/models/deb_apt_repository.rb +32 -22
  130. data/lib/pulp_deb_client/models/deb_apt_repository_response.rb +34 -24
  131. data/lib/pulp_deb_client/models/deb_generic_content_response.rb +34 -24
  132. data/lib/pulp_deb_client/models/deb_installer_file_index.rb +41 -23
  133. data/lib/pulp_deb_client/models/deb_installer_file_index_response.rb +38 -24
  134. data/lib/pulp_deb_client/models/deb_installer_package_response.rb +32 -24
  135. data/lib/pulp_deb_client/models/deb_package_index.rb +47 -25
  136. data/lib/pulp_deb_client/models/deb_package_index_response.rb +34 -24
  137. data/lib/pulp_deb_client/models/deb_package_release_component.rb +34 -22
  138. data/lib/pulp_deb_client/models/deb_package_release_component_response.rb +36 -24
  139. data/lib/pulp_deb_client/models/deb_package_response.rb +32 -24
  140. data/lib/pulp_deb_client/models/deb_release.rb +36 -22
  141. data/lib/pulp_deb_client/models/deb_release_architecture.rb +34 -22
  142. data/lib/pulp_deb_client/models/deb_release_architecture_response.rb +36 -24
  143. data/lib/pulp_deb_client/models/deb_release_component.rb +34 -22
  144. data/lib/pulp_deb_client/models/deb_release_component_response.rb +50 -28
  145. data/lib/pulp_deb_client/models/deb_release_file.rb +49 -25
  146. data/lib/pulp_deb_client/models/deb_release_file_response.rb +36 -24
  147. data/lib/pulp_deb_client/models/deb_release_response.rb +38 -24
  148. data/lib/pulp_deb_client/models/deb_source_index.rb +41 -23
  149. data/lib/pulp_deb_client/models/deb_source_index_response.rb +38 -24
  150. data/lib/pulp_deb_client/models/deb_source_package.rb +37 -23
  151. data/lib/pulp_deb_client/models/deb_source_package_release_component.rb +34 -22
  152. data/lib/pulp_deb_client/models/deb_source_package_release_component_response.rb +36 -24
  153. data/lib/pulp_deb_client/models/deb_source_package_response.rb +45 -25
  154. data/lib/pulp_deb_client/models/deb_verbatim_publication.rb +30 -22
  155. data/lib/pulp_deb_client/models/deb_verbatim_publication_response.rb +32 -24
  156. data/lib/pulp_deb_client/models/my_permissions_response.rb +223 -0
  157. data/lib/pulp_deb_client/models/{deb_installer_package.rb → nested_role.rb} +72 -97
  158. data/lib/pulp_deb_client/models/{deb_generic_content.rb → nested_role_response.rb} +62 -115
  159. data/lib/pulp_deb_client/models/object_roles_response.rb +223 -0
  160. data/lib/pulp_deb_client/models/paginated_repository_version_response_list.rb +34 -22
  161. data/lib/pulp_deb_client/models/paginateddeb_apt_distribution_response_list.rb +34 -22
  162. data/lib/pulp_deb_client/models/paginateddeb_apt_publication_response_list.rb +34 -22
  163. data/lib/pulp_deb_client/models/paginateddeb_apt_remote_response_list.rb +34 -22
  164. data/lib/pulp_deb_client/models/paginateddeb_apt_repository_response_list.rb +34 -22
  165. data/lib/pulp_deb_client/models/paginateddeb_generic_content_response_list.rb +34 -22
  166. data/lib/pulp_deb_client/models/paginateddeb_installer_file_index_response_list.rb +34 -22
  167. data/lib/pulp_deb_client/models/paginateddeb_installer_package_response_list.rb +34 -22
  168. data/lib/pulp_deb_client/models/paginateddeb_package_index_response_list.rb +34 -22
  169. data/lib/pulp_deb_client/models/paginateddeb_package_release_component_response_list.rb +34 -22
  170. data/lib/pulp_deb_client/models/paginateddeb_package_response_list.rb +34 -22
  171. data/lib/pulp_deb_client/models/paginateddeb_release_architecture_response_list.rb +34 -22
  172. data/lib/pulp_deb_client/models/paginateddeb_release_component_response_list.rb +34 -22
  173. data/lib/pulp_deb_client/models/paginateddeb_release_file_response_list.rb +34 -22
  174. data/lib/pulp_deb_client/models/paginateddeb_release_response_list.rb +34 -22
  175. data/lib/pulp_deb_client/models/paginateddeb_source_index_response_list.rb +34 -22
  176. data/lib/pulp_deb_client/models/paginateddeb_source_package_release_component_response_list.rb +34 -22
  177. data/lib/pulp_deb_client/models/paginateddeb_source_package_response_list.rb +34 -22
  178. data/lib/pulp_deb_client/models/paginateddeb_verbatim_publication_response_list.rb +34 -22
  179. data/lib/pulp_deb_client/models/patcheddeb_apt_distribution.rb +40 -24
  180. data/lib/pulp_deb_client/models/patcheddeb_apt_remote.rb +87 -45
  181. data/lib/pulp_deb_client/models/patcheddeb_apt_repository.rb +35 -23
  182. data/lib/pulp_deb_client/models/policy_enum.rb +8 -4
  183. data/lib/pulp_deb_client/models/repair.rb +30 -22
  184. data/lib/pulp_deb_client/models/repository_add_remove_content.rb +30 -22
  185. data/lib/pulp_deb_client/models/repository_version_response.rb +32 -24
  186. data/lib/pulp_deb_client/models/set_label.rb +34 -22
  187. data/lib/pulp_deb_client/models/set_label_response.rb +34 -22
  188. data/lib/pulp_deb_client/models/unset_label.rb +32 -22
  189. data/lib/pulp_deb_client/models/unset_label_response.rb +32 -22
  190. data/lib/pulp_deb_client/version.rb +2 -2
  191. data/lib/pulp_deb_client.rb +6 -5
  192. data/pulp_deb_client.gemspec +9 -6
  193. data/spec/api/content_generic_contents_api_spec.rb +4 -4
  194. data/spec/api/content_installer_file_indices_api_spec.rb +4 -4
  195. data/spec/api/content_installer_packages_api_spec.rb +4 -4
  196. data/spec/api/content_package_indices_api_spec.rb +4 -4
  197. data/spec/api/content_package_release_components_api_spec.rb +4 -4
  198. data/spec/api/content_packages_api_spec.rb +4 -4
  199. data/spec/api/content_release_architectures_api_spec.rb +4 -4
  200. data/spec/api/content_release_components_api_spec.rb +4 -4
  201. data/spec/api/content_release_files_api_spec.rb +4 -4
  202. data/spec/api/content_releases_api_spec.rb +4 -4
  203. data/spec/api/content_source_indices_api_spec.rb +4 -4
  204. data/spec/api/content_source_packages_api_spec.rb +4 -4
  205. data/spec/api/content_source_release_components_api_spec.rb +4 -4
  206. data/spec/api/deb_copy_api_spec.rb +2 -2
  207. data/spec/api/distributions_apt_api_spec.rb +63 -9
  208. data/spec/api/publications_apt_api_spec.rb +66 -11
  209. data/spec/api/publications_verbatim_api_spec.rb +66 -11
  210. data/spec/api/remotes_apt_api_spec.rb +70 -15
  211. data/spec/api/repositories_apt_api_spec.rb +65 -11
  212. data/spec/api/repositories_apt_versions_api_spec.rb +12 -11
  213. data/spec/models/apt_repository_sync_url_spec.rb +9 -14
  214. data/spec/models/async_operation_response_spec.rb +7 -12
  215. data/spec/models/content_summary_response_spec.rb +9 -14
  216. data/spec/models/copy_spec.rb +9 -14
  217. data/spec/models/deb_apt_distribution_response_spec.rb +19 -24
  218. data/spec/models/deb_apt_distribution_spec.rb +13 -18
  219. data/spec/models/deb_apt_publication_response_spec.rb +16 -21
  220. data/spec/models/deb_apt_publication_spec.rb +12 -17
  221. data/spec/models/{deb_apt_remote_response_hidden_fields_spec.rb → deb_apt_remote_response_hidden_fields_inner_spec.rb} +11 -16
  222. data/spec/models/deb_apt_remote_response_spec.rb +35 -40
  223. data/spec/models/deb_apt_remote_spec.rb +35 -40
  224. data/spec/models/deb_apt_repository_response_spec.rb +20 -25
  225. data/spec/models/deb_apt_repository_spec.rb +14 -19
  226. data/spec/models/deb_generic_content_response_spec.rb +18 -23
  227. data/spec/models/deb_installer_file_index_response_spec.rb +14 -19
  228. data/spec/models/deb_installer_file_index_spec.rb +11 -16
  229. data/spec/models/deb_installer_package_response_spec.rb +47 -52
  230. data/spec/models/deb_package_index_response_spec.rb +14 -19
  231. data/spec/models/deb_package_index_spec.rb +11 -16
  232. data/spec/models/deb_package_release_component_response_spec.rb +12 -17
  233. data/spec/models/deb_package_release_component_spec.rb +9 -14
  234. data/spec/models/deb_package_response_spec.rb +49 -54
  235. data/spec/models/deb_release_architecture_response_spec.rb +12 -17
  236. data/spec/models/deb_release_architecture_spec.rb +9 -14
  237. data/spec/models/deb_release_component_response_spec.rb +18 -17
  238. data/spec/models/deb_release_component_spec.rb +9 -14
  239. data/spec/models/deb_release_file_response_spec.rb +15 -20
  240. data/spec/models/deb_release_file_spec.rb +12 -17
  241. data/spec/models/deb_release_response_spec.rb +19 -24
  242. data/spec/models/deb_release_spec.rb +16 -21
  243. data/spec/models/deb_source_index_response_spec.rb +14 -19
  244. data/spec/models/deb_source_index_spec.rb +11 -16
  245. data/spec/models/deb_source_package_release_component_response_spec.rb +12 -17
  246. data/spec/models/deb_source_package_release_component_spec.rb +9 -14
  247. data/spec/models/deb_source_package_response_spec.rb +45 -44
  248. data/spec/models/deb_source_package_spec.rb +9 -14
  249. data/spec/models/deb_verbatim_publication_response_spec.rb +12 -17
  250. data/spec/models/deb_verbatim_publication_spec.rb +8 -13
  251. data/spec/models/my_permissions_response_spec.rb +36 -0
  252. data/spec/models/nested_role_response_spec.rb +48 -0
  253. data/spec/models/nested_role_spec.rb +48 -0
  254. data/spec/models/object_roles_response_spec.rb +36 -0
  255. data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
  256. data/spec/models/paginateddeb_apt_distribution_response_list_spec.rb +10 -15
  257. data/spec/models/paginateddeb_apt_publication_response_list_spec.rb +10 -15
  258. data/spec/models/paginateddeb_apt_remote_response_list_spec.rb +10 -15
  259. data/spec/models/paginateddeb_apt_repository_response_list_spec.rb +10 -15
  260. data/spec/models/paginateddeb_generic_content_response_list_spec.rb +10 -15
  261. data/spec/models/paginateddeb_installer_file_index_response_list_spec.rb +10 -15
  262. data/spec/models/paginateddeb_installer_package_response_list_spec.rb +10 -15
  263. data/spec/models/paginateddeb_package_index_response_list_spec.rb +10 -15
  264. data/spec/models/paginateddeb_package_release_component_response_list_spec.rb +10 -15
  265. data/spec/models/paginateddeb_package_response_list_spec.rb +10 -15
  266. data/spec/models/paginateddeb_release_architecture_response_list_spec.rb +10 -15
  267. data/spec/models/paginateddeb_release_component_response_list_spec.rb +10 -15
  268. data/spec/models/paginateddeb_release_file_response_list_spec.rb +10 -15
  269. data/spec/models/paginateddeb_release_response_list_spec.rb +10 -15
  270. data/spec/models/paginateddeb_source_index_response_list_spec.rb +10 -15
  271. data/spec/models/paginateddeb_source_package_release_component_response_list_spec.rb +10 -15
  272. data/spec/models/paginateddeb_source_package_response_list_spec.rb +10 -15
  273. data/spec/models/paginateddeb_verbatim_publication_response_list_spec.rb +10 -15
  274. data/spec/models/patcheddeb_apt_distribution_spec.rb +13 -18
  275. data/spec/models/patcheddeb_apt_remote_spec.rb +35 -40
  276. data/spec/models/patcheddeb_apt_repository_spec.rb +14 -19
  277. data/spec/models/policy_enum_spec.rb +6 -11
  278. data/spec/models/repair_spec.rb +7 -12
  279. data/spec/models/repository_add_remove_content_spec.rb +9 -14
  280. data/spec/models/repository_version_response_spec.rb +14 -19
  281. data/spec/models/set_label_response_spec.rb +8 -13
  282. data/spec/models/set_label_spec.rb +8 -13
  283. data/spec/models/unset_label_response_spec.rb +8 -13
  284. data/spec/models/unset_label_spec.rb +7 -12
  285. data/spec/spec_helper.rb +1 -1
  286. metadata +136 -108
  287. data/docs/DebAptRemoteResponseHiddenFields.md +0 -19
  288. data/docs/DebGenericContent.md +0 -27
  289. data/docs/DebInstallerPackage.md +0 -27
  290. data/docs/DebPackage.md +0 -31
  291. data/lib/pulp_deb_client/models/deb_package.rb +0 -338
  292. data/spec/api_client_spec.rb +0 -188
  293. data/spec/configuration_spec.rb +0 -42
  294. data/spec/models/deb_generic_content_spec.rb +0 -71
  295. data/spec/models/deb_installer_package_spec.rb +0 -71
  296. data/spec/models/deb_package_spec.rb +0 -83
@@ -6,54 +6,42 @@
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 PulpDebClient
16
- # A Serializer for InstallerPackage.
17
- class DebInstallerPackage
18
- # A URI of a repository the new content unit should be associated with.
19
- attr_accessor :repository
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.
18
+ class NestedRole
19
+ attr_accessor :users
20
20
 
21
- # Artifact file representing the physical content
22
- attr_accessor :artifact
21
+ attr_accessor :groups
23
22
 
24
- # Path where the artifact is located relative to distributions base_path
25
- attr_accessor :relative_path
26
-
27
- # An uploaded file that may be turned into the content unit.
28
- attr_accessor :file
29
-
30
- # An uncommitted upload that may be turned into the content unit.
31
- attr_accessor :upload
32
-
33
- # A url that Pulp can download and turn into the content unit.
34
- attr_accessor :file_url
23
+ attr_accessor :role
35
24
 
36
25
  # Attribute mapping from ruby-style variable name to JSON key.
37
26
  def self.attribute_map
38
27
  {
39
- :'repository' => :'repository',
40
- :'artifact' => :'artifact',
41
- :'relative_path' => :'relative_path',
42
- :'file' => :'file',
43
- :'upload' => :'upload',
44
- :'file_url' => :'file_url'
28
+ :'users' => :'users',
29
+ :'groups' => :'groups',
30
+ :'role' => :'role'
45
31
  }
46
32
  end
47
33
 
34
+ # Returns all the JSON keys this model knows about
35
+ def self.acceptable_attributes
36
+ attribute_map.values
37
+ end
38
+
48
39
  # Attribute type mapping.
49
40
  def self.openapi_types
50
41
  {
51
- :'repository' => :'String',
52
- :'artifact' => :'String',
53
- :'relative_path' => :'String',
54
- :'file' => :'File',
55
- :'upload' => :'String',
56
- :'file_url' => :'String'
42
+ :'users' => :'Array<String>',
43
+ :'groups' => :'Array<String>',
44
+ :'role' => :'String'
57
45
  }
58
46
  end
59
47
 
@@ -67,52 +55,47 @@ module PulpDebClient
67
55
  # @param [Hash] attributes Model attributes in the form of hash
68
56
  def initialize(attributes = {})
69
57
  if (!attributes.is_a?(Hash))
70
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebInstallerPackage` initialize method"
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::NestedRole` initialize method"
71
59
  end
72
60
 
73
61
  # check to see if the attribute exists and convert string to symbol for hash key
74
62
  attributes = attributes.each_with_object({}) { |(k, v), h|
75
63
  if (!self.class.attribute_map.key?(k.to_sym))
76
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebInstallerPackage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::NestedRole`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
65
  end
78
66
  h[k.to_sym] = v
79
67
  }
80
68
 
81
- if attributes.key?(:'repository')
82
- self.repository = attributes[:'repository']
83
- end
84
-
85
- if attributes.key?(:'artifact')
86
- self.artifact = attributes[:'artifact']
87
- end
88
-
89
- if attributes.key?(:'relative_path')
90
- self.relative_path = attributes[:'relative_path']
91
- end
92
-
93
- if attributes.key?(:'file')
94
- self.file = attributes[:'file']
69
+ if attributes.key?(:'users')
70
+ if (value = attributes[:'users']).is_a?(Array)
71
+ self.users = value
72
+ end
95
73
  end
96
74
 
97
- if attributes.key?(:'upload')
98
- self.upload = attributes[:'upload']
75
+ if attributes.key?(:'groups')
76
+ if (value = attributes[:'groups']).is_a?(Array)
77
+ self.groups = value
78
+ end
99
79
  end
100
80
 
101
- if attributes.key?(:'file_url')
102
- self.file_url = attributes[:'file_url']
81
+ if attributes.key?(:'role')
82
+ self.role = attributes[:'role']
83
+ else
84
+ self.role = nil
103
85
  end
104
86
  end
105
87
 
106
88
  # Show invalid properties with the reasons. Usually used together with valid?
107
89
  # @return Array for valid properties with the reasons
108
90
  def list_invalid_properties
91
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
92
  invalid_properties = Array.new
110
- if !@relative_path.nil? && @relative_path.to_s.length < 1
111
- invalid_properties.push('invalid value for "relative_path", the character length must be great than or equal to 1.')
93
+ if @role.nil?
94
+ invalid_properties.push('invalid value for "role", role cannot be nil.')
112
95
  end
113
96
 
114
- if !@file_url.nil? && @file_url.to_s.length < 1
115
- invalid_properties.push('invalid value for "file_url", the character length must be great than or equal to 1.')
97
+ if @role.to_s.length < 1
98
+ invalid_properties.push('invalid value for "role", the character length must be great than or equal to 1.')
116
99
  end
117
100
 
118
101
  invalid_properties
@@ -121,29 +104,24 @@ module PulpDebClient
121
104
  # Check to see if the all the properties in the model are valid
122
105
  # @return true if the model is valid
123
106
  def valid?
124
- return false if !@relative_path.nil? && @relative_path.to_s.length < 1
125
- return false if !@file_url.nil? && @file_url.to_s.length < 1
107
+ warn '[DEPRECATED] the `valid?` method is obsolete'
108
+ return false if @role.nil?
109
+ return false if @role.to_s.length < 1
126
110
  true
127
111
  end
128
112
 
129
113
  # Custom attribute writer method with validation
130
- # @param [Object] relative_path Value to be assigned
131
- def relative_path=(relative_path)
132
- if !relative_path.nil? && relative_path.to_s.length < 1
133
- fail ArgumentError, 'invalid value for "relative_path", the character length must be great than or equal to 1.'
114
+ # @param [Object] role Value to be assigned
115
+ def role=(role)
116
+ if role.nil?
117
+ fail ArgumentError, 'role cannot be nil'
134
118
  end
135
119
 
136
- @relative_path = relative_path
137
- end
138
-
139
- # Custom attribute writer method with validation
140
- # @param [Object] file_url Value to be assigned
141
- def file_url=(file_url)
142
- if !file_url.nil? && file_url.to_s.length < 1
143
- fail ArgumentError, 'invalid value for "file_url", the character length must be great than or equal to 1.'
120
+ if role.to_s.length < 1
121
+ fail ArgumentError, 'invalid value for "role", the character length must be great than or equal to 1.'
144
122
  end
145
123
 
146
- @file_url = file_url
124
+ @role = role
147
125
  end
148
126
 
149
127
  # Checks equality by comparing each attribute.
@@ -151,12 +129,9 @@ module PulpDebClient
151
129
  def ==(o)
152
130
  return true if self.equal?(o)
153
131
  self.class == o.class &&
154
- repository == o.repository &&
155
- artifact == o.artifact &&
156
- relative_path == o.relative_path &&
157
- file == o.file &&
158
- upload == o.upload &&
159
- file_url == o.file_url
132
+ users == o.users &&
133
+ groups == o.groups &&
134
+ role == o.role
160
135
  end
161
136
 
162
137
  # @see the `==` method
@@ -168,44 +143,40 @@ module PulpDebClient
168
143
  # Calculates hash code according to all attributes.
169
144
  # @return [Integer] Hash code
170
145
  def hash
171
- [repository, artifact, relative_path, file, upload, file_url].hash
146
+ [users, groups, role].hash
172
147
  end
173
148
 
174
149
  # Builds the object from hash
175
150
  # @param [Hash] attributes Model attributes in the form of hash
176
151
  # @return [Object] Returns the model itself
177
152
  def self.build_from_hash(attributes)
178
- new.build_from_hash(attributes)
179
- end
180
-
181
- # Builds the object from hash
182
- # @param [Hash] attributes Model attributes in the form of hash
183
- # @return [Object] Returns the model itself
184
- def build_from_hash(attributes)
185
153
  return nil unless attributes.is_a?(Hash)
186
- self.class.openapi_types.each_pair do |key, type|
187
- 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
188
160
  # check to ensure the input is an array given that the attribute
189
161
  # is documented as an array but the input is not
190
- if attributes[self.class.attribute_map[key]].is_a?(Array)
191
- 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) }
192
164
  end
193
- elsif !attributes[self.class.attribute_map[key]].nil?
194
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
195
- 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
196
168
  end
197
-
198
- self
169
+ new(transformed_hash)
199
170
  end
200
171
 
201
172
  # Deserializes the data based on type
202
173
  # @param string type Data type
203
174
  # @param string value Value to be deserialized
204
175
  # @return [Object] Deserialized data
205
- def _deserialize(type, value)
176
+ def self._deserialize(type, value)
206
177
  case type.to_sym
207
- when :DateTime
208
- DateTime.parse(value)
178
+ when :Time
179
+ Time.parse(value)
209
180
  when :Date
210
181
  Date.parse(value)
211
182
  when :String
@@ -235,7 +206,9 @@ module PulpDebClient
235
206
  end
236
207
  end
237
208
  else # model
238
- PulpDebClient.const_get(type).build_from_hash(value)
209
+ # models (e.g. Pet) or oneOf
210
+ klass = PulpDebClient.const_get(type)
211
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
239
212
  end
240
213
  end
241
214
 
@@ -261,7 +234,7 @@ module PulpDebClient
261
234
  is_nullable = self.class.openapi_nullable.include?(attr)
262
235
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
263
236
  end
264
-
237
+
265
238
  hash[param] = _to_hash(value)
266
239
  end
267
240
  hash
@@ -284,5 +257,7 @@ module PulpDebClient
284
257
  value
285
258
  end
286
259
  end
260
+
287
261
  end
262
+
288
263
  end
@@ -6,54 +6,42 @@
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 PulpDebClient
16
- # A serializer for GenericContent.
17
- class DebGenericContent
18
- # A URI of a repository the new content unit should be associated with.
19
- attr_accessor :repository
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.
18
+ class NestedRoleResponse
19
+ attr_accessor :users
20
20
 
21
- # Artifact file representing the physical content
22
- attr_accessor :artifact
21
+ attr_accessor :groups
23
22
 
24
- # Path where the artifact is located relative to distributions base_path
25
- attr_accessor :relative_path
26
-
27
- # An uploaded file that may be turned into the content unit.
28
- attr_accessor :file
29
-
30
- # An uncommitted upload that may be turned into the content unit.
31
- attr_accessor :upload
32
-
33
- # A url that Pulp can download and turn into the content unit.
34
- attr_accessor :file_url
23
+ attr_accessor :role
35
24
 
36
25
  # Attribute mapping from ruby-style variable name to JSON key.
37
26
  def self.attribute_map
38
27
  {
39
- :'repository' => :'repository',
40
- :'artifact' => :'artifact',
41
- :'relative_path' => :'relative_path',
42
- :'file' => :'file',
43
- :'upload' => :'upload',
44
- :'file_url' => :'file_url'
28
+ :'users' => :'users',
29
+ :'groups' => :'groups',
30
+ :'role' => :'role'
45
31
  }
46
32
  end
47
33
 
34
+ # Returns all the JSON keys this model knows about
35
+ def self.acceptable_attributes
36
+ attribute_map.values
37
+ end
38
+
48
39
  # Attribute type mapping.
49
40
  def self.openapi_types
50
41
  {
51
- :'repository' => :'String',
52
- :'artifact' => :'String',
53
- :'relative_path' => :'String',
54
- :'file' => :'File',
55
- :'upload' => :'String',
56
- :'file_url' => :'String'
42
+ :'users' => :'Array<String>',
43
+ :'groups' => :'Array<String>',
44
+ :'role' => :'String'
57
45
  }
58
46
  end
59
47
 
@@ -67,56 +55,43 @@ module PulpDebClient
67
55
  # @param [Hash] attributes Model attributes in the form of hash
68
56
  def initialize(attributes = {})
69
57
  if (!attributes.is_a?(Hash))
70
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebGenericContent` initialize method"
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::NestedRoleResponse` initialize method"
71
59
  end
72
60
 
73
61
  # check to see if the attribute exists and convert string to symbol for hash key
74
62
  attributes = attributes.each_with_object({}) { |(k, v), h|
75
63
  if (!self.class.attribute_map.key?(k.to_sym))
76
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebGenericContent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::NestedRoleResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
65
  end
78
66
  h[k.to_sym] = v
79
67
  }
80
68
 
81
- if attributes.key?(:'repository')
82
- self.repository = attributes[:'repository']
83
- end
84
-
85
- if attributes.key?(:'artifact')
86
- self.artifact = attributes[:'artifact']
87
- end
88
-
89
- if attributes.key?(:'relative_path')
90
- self.relative_path = attributes[:'relative_path']
91
- end
92
-
93
- if attributes.key?(:'file')
94
- self.file = attributes[:'file']
69
+ if attributes.key?(:'users')
70
+ if (value = attributes[:'users']).is_a?(Array)
71
+ self.users = value
72
+ end
95
73
  end
96
74
 
97
- if attributes.key?(:'upload')
98
- self.upload = attributes[:'upload']
75
+ if attributes.key?(:'groups')
76
+ if (value = attributes[:'groups']).is_a?(Array)
77
+ self.groups = value
78
+ end
99
79
  end
100
80
 
101
- if attributes.key?(:'file_url')
102
- self.file_url = attributes[:'file_url']
81
+ if attributes.key?(:'role')
82
+ self.role = attributes[:'role']
83
+ else
84
+ self.role = nil
103
85
  end
104
86
  end
105
87
 
106
88
  # Show invalid properties with the reasons. Usually used together with valid?
107
89
  # @return Array for valid properties with the reasons
108
90
  def list_invalid_properties
91
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
92
  invalid_properties = Array.new
110
- if @relative_path.nil?
111
- invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
112
- end
113
-
114
- if @relative_path.to_s.length < 1
115
- invalid_properties.push('invalid value for "relative_path", the character length must be great than or equal to 1.')
116
- end
117
-
118
- if !@file_url.nil? && @file_url.to_s.length < 1
119
- invalid_properties.push('invalid value for "file_url", the character length must be great than or equal to 1.')
93
+ if @role.nil?
94
+ invalid_properties.push('invalid value for "role", role cannot be nil.')
120
95
  end
121
96
 
122
97
  invalid_properties
@@ -125,47 +100,19 @@ module PulpDebClient
125
100
  # Check to see if the all the properties in the model are valid
126
101
  # @return true if the model is valid
127
102
  def valid?
128
- return false if @relative_path.nil?
129
- return false if @relative_path.to_s.length < 1
130
- return false if !@file_url.nil? && @file_url.to_s.length < 1
103
+ warn '[DEPRECATED] the `valid?` method is obsolete'
104
+ return false if @role.nil?
131
105
  true
132
106
  end
133
107
 
134
- # Custom attribute writer method with validation
135
- # @param [Object] relative_path Value to be assigned
136
- def relative_path=(relative_path)
137
- if relative_path.nil?
138
- fail ArgumentError, 'relative_path cannot be nil'
139
- end
140
-
141
- if relative_path.to_s.length < 1
142
- fail ArgumentError, 'invalid value for "relative_path", the character length must be great than or equal to 1.'
143
- end
144
-
145
- @relative_path = relative_path
146
- end
147
-
148
- # Custom attribute writer method with validation
149
- # @param [Object] file_url Value to be assigned
150
- def file_url=(file_url)
151
- if !file_url.nil? && file_url.to_s.length < 1
152
- fail ArgumentError, 'invalid value for "file_url", the character length must be great than or equal to 1.'
153
- end
154
-
155
- @file_url = file_url
156
- end
157
-
158
108
  # Checks equality by comparing each attribute.
159
109
  # @param [Object] Object to be compared
160
110
  def ==(o)
161
111
  return true if self.equal?(o)
162
112
  self.class == o.class &&
163
- repository == o.repository &&
164
- artifact == o.artifact &&
165
- relative_path == o.relative_path &&
166
- file == o.file &&
167
- upload == o.upload &&
168
- file_url == o.file_url
113
+ users == o.users &&
114
+ groups == o.groups &&
115
+ role == o.role
169
116
  end
170
117
 
171
118
  # @see the `==` method
@@ -177,44 +124,40 @@ module PulpDebClient
177
124
  # Calculates hash code according to all attributes.
178
125
  # @return [Integer] Hash code
179
126
  def hash
180
- [repository, artifact, relative_path, file, upload, file_url].hash
127
+ [users, groups, role].hash
181
128
  end
182
129
 
183
130
  # Builds the object from hash
184
131
  # @param [Hash] attributes Model attributes in the form of hash
185
132
  # @return [Object] Returns the model itself
186
133
  def self.build_from_hash(attributes)
187
- new.build_from_hash(attributes)
188
- end
189
-
190
- # Builds the object from hash
191
- # @param [Hash] attributes Model attributes in the form of hash
192
- # @return [Object] Returns the model itself
193
- def build_from_hash(attributes)
194
134
  return nil unless attributes.is_a?(Hash)
195
- self.class.openapi_types.each_pair do |key, type|
196
- 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
197
141
  # check to ensure the input is an array given that the attribute
198
142
  # is documented as an array but the input is not
199
- if attributes[self.class.attribute_map[key]].is_a?(Array)
200
- 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) }
201
145
  end
202
- elsif !attributes[self.class.attribute_map[key]].nil?
203
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
204
- 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
205
149
  end
206
-
207
- self
150
+ new(transformed_hash)
208
151
  end
209
152
 
210
153
  # Deserializes the data based on type
211
154
  # @param string type Data type
212
155
  # @param string value Value to be deserialized
213
156
  # @return [Object] Deserialized data
214
- def _deserialize(type, value)
157
+ def self._deserialize(type, value)
215
158
  case type.to_sym
216
- when :DateTime
217
- DateTime.parse(value)
159
+ when :Time
160
+ Time.parse(value)
218
161
  when :Date
219
162
  Date.parse(value)
220
163
  when :String
@@ -244,7 +187,9 @@ module PulpDebClient
244
187
  end
245
188
  end
246
189
  else # model
247
- PulpDebClient.const_get(type).build_from_hash(value)
190
+ # models (e.g. Pet) or oneOf
191
+ klass = PulpDebClient.const_get(type)
192
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
248
193
  end
249
194
  end
250
195
 
@@ -270,7 +215,7 @@ module PulpDebClient
270
215
  is_nullable = self.class.openapi_nullable.include?(attr)
271
216
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
272
217
  end
273
-
218
+
274
219
  hash[param] = _to_hash(value)
275
220
  end
276
221
  hash
@@ -293,5 +238,7 @@ module PulpDebClient
293
238
  value
294
239
  end
295
240
  end
241
+
296
242
  end
243
+
297
244
  end