pulp_ansible_client 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (467) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +4 -4
  4. data/docs/AnsibleCollectionVersionResponse.md +4 -4
  5. data/docs/AnsibleRoleResponse.md +4 -4
  6. data/docs/RepositoryAddRemoveContent.md +2 -2
  7. data/lib/pulp_ansible_client.rb +1 -1
  8. data/lib/pulp_ansible_client/api/ansible_collections_api.rb +1 -1
  9. data/lib/pulp_ansible_client/api/ansible_copy_api.rb +1 -1
  10. data/lib/pulp_ansible_client/api/api_collections_api.rb +1 -1
  11. data/lib/pulp_ansible_client/api/api_roles_api.rb +1 -1
  12. data/lib/pulp_ansible_client/api/collection_import_api.rb +1 -1
  13. data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +1 -1
  14. data/lib/pulp_ansible_client/api/content_roles_api.rb +1 -1
  15. data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +1 -1
  16. data/lib/pulp_ansible_client/api/galaxy_detail_api.rb +1 -1
  17. data/lib/pulp_ansible_client/api/pulp_ansible_api_api.rb +1 -1
  18. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_collections_api.rb +1 -1
  19. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v2_versions_api.rb +1 -1
  20. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_all_api.rb +1 -1
  21. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_collections_api.rb +1 -1
  22. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_collections_docs_blob_api.rb +1 -1
  23. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_versions_api.rb +1 -1
  24. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_v3_api.rb +1 -1
  25. data/lib/pulp_ansible_client/api/pulp_ansible_tags_api.rb +1 -1
  26. data/lib/pulp_ansible_client/api/remotes_collection_api.rb +1 -1
  27. data/lib/pulp_ansible_client/api/remotes_role_api.rb +1 -1
  28. data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +1 -1
  29. data/lib/pulp_ansible_client/api/repositories_ansible_versions_api.rb +1 -1
  30. data/lib/pulp_ansible_client/api/versions_api.rb +1 -1
  31. data/lib/pulp_ansible_client/api_client.rb +12 -8
  32. data/lib/pulp_ansible_client/api_error.rb +1 -1
  33. data/lib/pulp_ansible_client/configuration.rb +8 -1
  34. data/lib/pulp_ansible_client/models/ansible_ansible_distribution.rb +1 -1
  35. data/lib/pulp_ansible_client/models/ansible_ansible_distribution_response.rb +1 -1
  36. data/lib/pulp_ansible_client/models/ansible_ansible_repository.rb +1 -1
  37. data/lib/pulp_ansible_client/models/ansible_ansible_repository_response.rb +1 -1
  38. data/lib/pulp_ansible_client/models/ansible_collection_remote.rb +1 -1
  39. data/lib/pulp_ansible_client/models/ansible_collection_remote_response.rb +1 -1
  40. data/lib/pulp_ansible_client/models/ansible_collection_response.rb +1 -1
  41. data/lib/pulp_ansible_client/models/ansible_collection_version.rb +1 -1
  42. data/lib/pulp_ansible_client/models/ansible_collection_version_response.rb +15 -15
  43. data/lib/pulp_ansible_client/models/ansible_repository_sync_url.rb +1 -1
  44. data/lib/pulp_ansible_client/models/ansible_role.rb +1 -1
  45. data/lib/pulp_ansible_client/models/ansible_role_remote.rb +1 -1
  46. data/lib/pulp_ansible_client/models/ansible_role_remote_response.rb +1 -1
  47. data/lib/pulp_ansible_client/models/ansible_role_response.rb +15 -15
  48. data/lib/pulp_ansible_client/models/ansible_tag_response.rb +1 -1
  49. data/lib/pulp_ansible_client/models/artifact_ref_response.rb +1 -1
  50. data/lib/pulp_ansible_client/models/async_operation_response.rb +1 -1
  51. data/lib/pulp_ansible_client/models/collection_import_detail_response.rb +1 -1
  52. data/lib/pulp_ansible_client/models/collection_metadata_response.rb +1 -1
  53. data/lib/pulp_ansible_client/models/collection_namespace_response.rb +1 -1
  54. data/lib/pulp_ansible_client/models/collection_one_shot.rb +1 -1
  55. data/lib/pulp_ansible_client/models/collection_ref_response.rb +1 -1
  56. data/lib/pulp_ansible_client/models/collection_response.rb +1 -1
  57. data/lib/pulp_ansible_client/models/collection_version_docs_response.rb +1 -1
  58. data/lib/pulp_ansible_client/models/collection_version_response.rb +1 -1
  59. data/lib/pulp_ansible_client/models/content_summary.rb +1 -1
  60. data/lib/pulp_ansible_client/models/content_summary_response.rb +1 -1
  61. data/lib/pulp_ansible_client/models/copy.rb +1 -1
  62. data/lib/pulp_ansible_client/models/galaxy_collection.rb +1 -1
  63. data/lib/pulp_ansible_client/models/galaxy_collection_response.rb +1 -1
  64. data/lib/pulp_ansible_client/models/galaxy_collection_version_response.rb +1 -1
  65. data/lib/pulp_ansible_client/models/galaxy_role_response.rb +1 -1
  66. data/lib/pulp_ansible_client/models/galaxy_role_version_response.rb +1 -1
  67. data/lib/pulp_ansible_client/models/paginated_collection_response_list.rb +1 -1
  68. data/lib/pulp_ansible_client/models/paginated_collection_response_list_links.rb +1 -1
  69. data/lib/pulp_ansible_client/models/paginated_collection_response_list_meta.rb +1 -1
  70. data/lib/pulp_ansible_client/models/paginated_collection_version_response_list.rb +1 -1
  71. data/lib/pulp_ansible_client/models/paginated_galaxy_collection_response_list.rb +1 -1
  72. data/lib/pulp_ansible_client/models/paginated_galaxy_collection_version_response_list.rb +1 -1
  73. data/lib/pulp_ansible_client/models/paginated_galaxy_role_response_list.rb +1 -1
  74. data/lib/pulp_ansible_client/models/paginated_galaxy_role_version_response_list.rb +1 -1
  75. data/lib/pulp_ansible_client/models/paginated_repository_version_response_list.rb +1 -1
  76. data/lib/pulp_ansible_client/models/paginated_tag_response_list.rb +1 -1
  77. data/lib/pulp_ansible_client/models/paginatedansible_ansible_distribution_response_list.rb +1 -1
  78. data/lib/pulp_ansible_client/models/paginatedansible_ansible_repository_response_list.rb +1 -1
  79. data/lib/pulp_ansible_client/models/paginatedansible_collection_remote_response_list.rb +1 -1
  80. data/lib/pulp_ansible_client/models/paginatedansible_collection_response_list.rb +1 -1
  81. data/lib/pulp_ansible_client/models/paginatedansible_collection_version_response_list.rb +1 -1
  82. data/lib/pulp_ansible_client/models/paginatedansible_role_remote_response_list.rb +1 -1
  83. data/lib/pulp_ansible_client/models/paginatedansible_role_response_list.rb +1 -1
  84. data/lib/pulp_ansible_client/models/patchedansible_ansible_distribution.rb +1 -1
  85. data/lib/pulp_ansible_client/models/patchedansible_ansible_repository.rb +1 -1
  86. data/lib/pulp_ansible_client/models/patchedansible_collection_remote.rb +1 -1
  87. data/lib/pulp_ansible_client/models/patchedansible_role_remote.rb +1 -1
  88. data/lib/pulp_ansible_client/models/policy_enum.rb +1 -1
  89. data/lib/pulp_ansible_client/models/repo_metadata_response.rb +1 -1
  90. data/lib/pulp_ansible_client/models/repository_add_remove_content.rb +3 -3
  91. data/lib/pulp_ansible_client/models/repository_version.rb +1 -1
  92. data/lib/pulp_ansible_client/models/repository_version_response.rb +1 -1
  93. data/lib/pulp_ansible_client/models/tag_response.rb +1 -1
  94. data/lib/pulp_ansible_client/models/unpaginated_collection_version_response.rb +1 -1
  95. data/lib/pulp_ansible_client/version.rb +2 -2
  96. data/pulp_ansible_client.gemspec +1 -1
  97. data/spec/api/ansible_collections_api_spec.rb +1 -1
  98. data/spec/api/ansible_copy_api_spec.rb +1 -1
  99. data/spec/api/api_collections_api_spec.rb +1 -1
  100. data/spec/api/api_roles_api_spec.rb +1 -1
  101. data/spec/api/collection_import_api_spec.rb +1 -1
  102. data/spec/api/content_collection_versions_api_spec.rb +1 -1
  103. data/spec/api/content_roles_api_spec.rb +1 -1
  104. data/spec/api/distributions_ansible_api_spec.rb +1 -1
  105. data/spec/api/galaxy_detail_api_spec.rb +1 -1
  106. data/spec/api/pulp_ansible_api_api_spec.rb +1 -1
  107. data/spec/api/pulp_ansible_galaxy_api_collections_api_spec.rb +1 -1
  108. data/spec/api/pulp_ansible_galaxy_api_v2_versions_api_spec.rb +1 -1
  109. data/spec/api/pulp_ansible_galaxy_api_v3_all_api_spec.rb +1 -1
  110. data/spec/api/pulp_ansible_galaxy_api_v3_collections_api_spec.rb +1 -1
  111. data/spec/api/pulp_ansible_galaxy_api_v3_collections_docs_blob_api_spec.rb +1 -1
  112. data/spec/api/pulp_ansible_galaxy_api_v3_versions_api_spec.rb +1 -1
  113. data/spec/api/pulp_ansible_galaxy_v3_api_spec.rb +1 -1
  114. data/spec/api/pulp_ansible_tags_api_spec.rb +1 -1
  115. data/spec/api/remotes_collection_api_spec.rb +1 -1
  116. data/spec/api/remotes_role_api_spec.rb +1 -1
  117. data/spec/api/repositories_ansible_api_spec.rb +1 -1
  118. data/spec/api/repositories_ansible_versions_api_spec.rb +1 -1
  119. data/spec/api/versions_api_spec.rb +1 -1
  120. data/spec/api_client_spec.rb +2 -2
  121. data/spec/configuration_spec.rb +1 -1
  122. data/spec/models/ansible_ansible_distribution_response_spec.rb +1 -1
  123. data/spec/models/ansible_ansible_distribution_spec.rb +1 -1
  124. data/spec/models/ansible_ansible_repository_response_spec.rb +1 -1
  125. data/spec/models/ansible_ansible_repository_spec.rb +1 -1
  126. data/spec/models/ansible_collection_remote_response_spec.rb +1 -1
  127. data/spec/models/ansible_collection_remote_spec.rb +1 -1
  128. data/spec/models/ansible_collection_response_spec.rb +1 -1
  129. data/spec/models/ansible_collection_version_response_spec.rb +3 -3
  130. data/spec/models/ansible_collection_version_spec.rb +1 -1
  131. data/spec/models/ansible_repository_sync_url_spec.rb +1 -1
  132. data/spec/models/ansible_role_remote_response_spec.rb +1 -1
  133. data/spec/models/ansible_role_remote_spec.rb +1 -1
  134. data/spec/models/ansible_role_response_spec.rb +3 -3
  135. data/spec/models/ansible_role_spec.rb +1 -1
  136. data/spec/models/ansible_tag_response_spec.rb +1 -1
  137. data/spec/models/artifact_ref_response_spec.rb +1 -1
  138. data/spec/models/async_operation_response_spec.rb +1 -1
  139. data/spec/models/collection_import_detail_response_spec.rb +1 -1
  140. data/spec/models/collection_metadata_response_spec.rb +1 -1
  141. data/spec/models/collection_namespace_response_spec.rb +1 -1
  142. data/spec/models/collection_one_shot_spec.rb +1 -1
  143. data/spec/models/collection_ref_response_spec.rb +1 -1
  144. data/spec/models/collection_response_spec.rb +1 -1
  145. data/spec/models/collection_version_docs_response_spec.rb +1 -1
  146. data/spec/models/collection_version_response_spec.rb +1 -1
  147. data/spec/models/content_summary_response_spec.rb +1 -1
  148. data/spec/models/content_summary_spec.rb +1 -1
  149. data/spec/models/copy_spec.rb +1 -1
  150. data/spec/models/galaxy_collection_response_spec.rb +1 -1
  151. data/spec/models/galaxy_collection_spec.rb +1 -1
  152. data/spec/models/galaxy_collection_version_response_spec.rb +1 -1
  153. data/spec/models/galaxy_role_response_spec.rb +1 -1
  154. data/spec/models/galaxy_role_version_response_spec.rb +1 -1
  155. data/spec/models/paginated_collection_response_list_links_spec.rb +1 -1
  156. data/spec/models/paginated_collection_response_list_meta_spec.rb +1 -1
  157. data/spec/models/paginated_collection_response_list_spec.rb +1 -1
  158. data/spec/models/paginated_collection_version_response_list_spec.rb +1 -1
  159. data/spec/models/paginated_galaxy_collection_response_list_spec.rb +1 -1
  160. data/spec/models/paginated_galaxy_collection_version_response_list_spec.rb +1 -1
  161. data/spec/models/paginated_galaxy_role_response_list_spec.rb +1 -1
  162. data/spec/models/paginated_galaxy_role_version_response_list_spec.rb +1 -1
  163. data/spec/models/paginated_repository_version_response_list_spec.rb +1 -1
  164. data/spec/models/paginated_tag_response_list_spec.rb +1 -1
  165. data/spec/models/paginatedansible_ansible_distribution_response_list_spec.rb +1 -1
  166. data/spec/models/paginatedansible_ansible_repository_response_list_spec.rb +1 -1
  167. data/spec/models/paginatedansible_collection_remote_response_list_spec.rb +1 -1
  168. data/spec/models/paginatedansible_collection_response_list_spec.rb +1 -1
  169. data/spec/models/paginatedansible_collection_version_response_list_spec.rb +1 -1
  170. data/spec/models/paginatedansible_role_remote_response_list_spec.rb +1 -1
  171. data/spec/models/paginatedansible_role_response_list_spec.rb +1 -1
  172. data/spec/models/patchedansible_ansible_distribution_spec.rb +1 -1
  173. data/spec/models/patchedansible_ansible_repository_spec.rb +1 -1
  174. data/spec/models/patchedansible_collection_remote_spec.rb +1 -1
  175. data/spec/models/patchedansible_role_remote_spec.rb +1 -1
  176. data/spec/models/policy_enum_spec.rb +1 -1
  177. data/spec/models/repo_metadata_response_spec.rb +1 -1
  178. data/spec/models/repository_add_remove_content_spec.rb +1 -1
  179. data/spec/models/repository_version_response_spec.rb +1 -1
  180. data/spec/models/repository_version_spec.rb +1 -1
  181. data/spec/models/tag_response_spec.rb +1 -1
  182. data/spec/models/unpaginated_collection_version_response_spec.rb +1 -1
  183. data/spec/spec_helper.rb +1 -1
  184. metadata +68 -351
  185. data/build/lib/pulpcore/__init__.py +0 -2
  186. data/build/lib/pulpcore/client/__init__.py +0 -2
  187. data/build/lib/pulpcore/client/pulp_ansible/__init__.py +0 -115
  188. data/build/lib/pulpcore/client/pulp_ansible/api/__init__.py +0 -28
  189. data/build/lib/pulpcore/client/pulp_ansible/api/ansible_collections_api.py +0 -316
  190. data/build/lib/pulpcore/client/pulp_ansible/api/ansible_copy_api.py +0 -156
  191. data/build/lib/pulpcore/client/pulp_ansible/api/api_collections_api.py +0 -294
  192. data/build/lib/pulpcore/client/pulp_ansible/api/api_roles_api.py +0 -172
  193. data/build/lib/pulpcore/client/pulp_ansible/api/collection_import_api.py +0 -167
  194. data/build/lib/pulpcore/client/pulp_ansible/api/content_collection_versions_api.py +0 -455
  195. data/build/lib/pulpcore/client/pulp_ansible/api/content_roles_api.py +0 -440
  196. data/build/lib/pulpcore/client/pulp_ansible/api/distributions_ansible_api.py +0 -830
  197. data/build/lib/pulpcore/client/pulp_ansible/api/galaxy_detail_api.py +0 -162
  198. data/build/lib/pulpcore/client/pulp_ansible/api/pulp_ansible_api_api.py +0 -158
  199. data/build/lib/pulpcore/client/pulp_ansible/api/pulp_ansible_galaxy_api_collections_api.py +0 -474
  200. data/build/lib/pulpcore/client/pulp_ansible/api/pulp_ansible_galaxy_api_v2_versions_api.py +0 -185
  201. data/build/lib/pulpcore/client/pulp_ansible/api/pulp_ansible_galaxy_api_v3_all_api.py +0 -301
  202. data/build/lib/pulpcore/client/pulp_ansible/api/pulp_ansible_galaxy_api_v3_collections_api.py +0 -185
  203. data/build/lib/pulpcore/client/pulp_ansible/api/pulp_ansible_galaxy_api_v3_collections_docs_blob_api.py +0 -189
  204. data/build/lib/pulpcore/client/pulp_ansible/api/pulp_ansible_galaxy_api_v3_versions_api.py +0 -386
  205. data/build/lib/pulpcore/client/pulp_ansible/api/pulp_ansible_galaxy_v3_api.py +0 -162
  206. data/build/lib/pulpcore/client/pulp_ansible/api/pulp_ansible_tags_api.py +0 -168
  207. data/build/lib/pulpcore/client/pulp_ansible/api/remotes_collection_api.py +0 -840
  208. data/build/lib/pulpcore/client/pulp_ansible/api/remotes_role_api.py +0 -840
  209. data/build/lib/pulpcore/client/pulp_ansible/api/repositories_ansible_api.py +0 -1063
  210. data/build/lib/pulpcore/client/pulp_ansible/api/repositories_ansible_versions_api.py +0 -614
  211. data/build/lib/pulpcore/client/pulp_ansible/api/versions_api.py +0 -301
  212. data/build/lib/pulpcore/client/pulp_ansible/api_client.py +0 -667
  213. data/build/lib/pulpcore/client/pulp_ansible/configuration.py +0 -427
  214. data/build/lib/pulpcore/client/pulp_ansible/exceptions.py +0 -121
  215. data/build/lib/pulpcore/client/pulp_ansible/models/__init__.py +0 -78
  216. data/build/lib/pulpcore/client/pulp_ansible/models/ansible_ansible_distribution.py +0 -260
  217. data/build/lib/pulpcore/client/pulp_ansible/models/ansible_ansible_distribution_response.py +0 -342
  218. data/build/lib/pulpcore/client/pulp_ansible/models/ansible_ansible_repository.py +0 -259
  219. data/build/lib/pulpcore/client/pulp_ansible/models/ansible_ansible_repository_response.py +0 -365
  220. data/build/lib/pulpcore/client/pulp_ansible/models/ansible_collection_remote.py +0 -771
  221. data/build/lib/pulpcore/client/pulp_ansible/models/ansible_collection_remote_response.py +0 -718
  222. data/build/lib/pulpcore/client/pulp_ansible/models/ansible_collection_response.py +0 -153
  223. data/build/lib/pulpcore/client/pulp_ansible/models/ansible_collection_version.py +0 -639
  224. data/build/lib/pulpcore/client/pulp_ansible/models/ansible_collection_version_response.py +0 -887
  225. data/build/lib/pulpcore/client/pulp_ansible/models/ansible_repository_sync_url.py +0 -179
  226. data/build/lib/pulpcore/client/pulp_ansible/models/ansible_role.py +0 -205
  227. data/build/lib/pulpcore/client/pulp_ansible/models/ansible_role_remote.py +0 -657
  228. data/build/lib/pulpcore/client/pulp_ansible/models/ansible_role_remote_response.py +0 -604
  229. data/build/lib/pulpcore/client/pulp_ansible/models/ansible_role_response.py +0 -259
  230. data/build/lib/pulpcore/client/pulp_ansible/models/ansible_tag_response.py +0 -123
  231. data/build/lib/pulpcore/client/pulp_ansible/models/artifact_ref_response.py +0 -176
  232. data/build/lib/pulpcore/client/pulp_ansible/models/async_operation_response.py +0 -124
  233. data/build/lib/pulpcore/client/pulp_ansible/models/collection_import_detail_response.py +0 -311
  234. data/build/lib/pulpcore/client/pulp_ansible/models/collection_metadata_response.py +0 -356
  235. data/build/lib/pulpcore/client/pulp_ansible/models/collection_namespace_response.py +0 -122
  236. data/build/lib/pulpcore/client/pulp_ansible/models/collection_one_shot.py +0 -236
  237. data/build/lib/pulpcore/client/pulp_ansible/models/collection_ref_response.py +0 -175
  238. data/build/lib/pulpcore/client/pulp_ansible/models/collection_response.py +0 -303
  239. data/build/lib/pulpcore/client/pulp_ansible/models/collection_version_docs_response.py +0 -122
  240. data/build/lib/pulpcore/client/pulp_ansible/models/collection_version_response.py +0 -441
  241. data/build/lib/pulpcore/client/pulp_ansible/models/content_summary.py +0 -176
  242. data/build/lib/pulpcore/client/pulp_ansible/models/content_summary_response.py +0 -176
  243. data/build/lib/pulpcore/client/pulp_ansible/models/copy.py +0 -124
  244. data/build/lib/pulpcore/client/pulp_ansible/models/galaxy_collection.py +0 -203
  245. data/build/lib/pulpcore/client/pulp_ansible/models/galaxy_collection_response.py +0 -307
  246. data/build/lib/pulpcore/client/pulp_ansible/models/galaxy_collection_version_response.py +0 -253
  247. data/build/lib/pulpcore/client/pulp_ansible/models/galaxy_role_response.py +0 -175
  248. data/build/lib/pulpcore/client/pulp_ansible/models/galaxy_role_version_response.py +0 -148
  249. data/build/lib/pulpcore/client/pulp_ansible/models/paginated_collection_response_list.py +0 -173
  250. data/build/lib/pulpcore/client/pulp_ansible/models/paginated_collection_response_list_links.py +0 -195
  251. data/build/lib/pulpcore/client/pulp_ansible/models/paginated_collection_response_list_meta.py +0 -121
  252. data/build/lib/pulpcore/client/pulp_ansible/models/paginated_collection_version_response_list.py +0 -173
  253. data/build/lib/pulpcore/client/pulp_ansible/models/paginated_galaxy_collection_response_list.py +0 -197
  254. data/build/lib/pulpcore/client/pulp_ansible/models/paginated_galaxy_collection_version_response_list.py +0 -197
  255. data/build/lib/pulpcore/client/pulp_ansible/models/paginated_galaxy_role_response_list.py +0 -197
  256. data/build/lib/pulpcore/client/pulp_ansible/models/paginated_galaxy_role_version_response_list.py +0 -197
  257. data/build/lib/pulpcore/client/pulp_ansible/models/paginated_repository_version_response_list.py +0 -197
  258. data/build/lib/pulpcore/client/pulp_ansible/models/paginated_tag_response_list.py +0 -197
  259. data/build/lib/pulpcore/client/pulp_ansible/models/paginatedansible_ansible_distribution_response_list.py +0 -197
  260. data/build/lib/pulpcore/client/pulp_ansible/models/paginatedansible_ansible_repository_response_list.py +0 -197
  261. data/build/lib/pulpcore/client/pulp_ansible/models/paginatedansible_collection_remote_response_list.py +0 -197
  262. data/build/lib/pulpcore/client/pulp_ansible/models/paginatedansible_collection_response_list.py +0 -197
  263. data/build/lib/pulpcore/client/pulp_ansible/models/paginatedansible_collection_version_response_list.py +0 -197
  264. data/build/lib/pulpcore/client/pulp_ansible/models/paginatedansible_role_remote_response_list.py +0 -197
  265. data/build/lib/pulpcore/client/pulp_ansible/models/paginatedansible_role_response_list.py +0 -197
  266. data/build/lib/pulpcore/client/pulp_ansible/models/patchedansible_ansible_distribution.py +0 -258
  267. data/build/lib/pulpcore/client/pulp_ansible/models/patchedansible_ansible_repository.py +0 -258
  268. data/build/lib/pulpcore/client/pulp_ansible/models/patchedansible_collection_remote.py +0 -769
  269. data/build/lib/pulpcore/client/pulp_ansible/models/patchedansible_role_remote.py +0 -655
  270. data/build/lib/pulpcore/client/pulp_ansible/models/policy_enum.py +0 -101
  271. data/build/lib/pulpcore/client/pulp_ansible/models/repo_metadata_response.py +0 -122
  272. data/build/lib/pulpcore/client/pulp_ansible/models/repository_add_remove_content.py +0 -179
  273. data/build/lib/pulpcore/client/pulp_ansible/models/repository_version.py +0 -123
  274. data/build/lib/pulpcore/client/pulp_ansible/models/repository_version_response.py +0 -257
  275. data/build/lib/pulpcore/client/pulp_ansible/models/tag_response.py +0 -121
  276. data/build/lib/pulpcore/client/pulp_ansible/models/unpaginated_collection_version_response.py +0 -385
  277. data/build/lib/pulpcore/client/pulp_ansible/rest.py +0 -292
  278. data/dist/pulp_ansible-client-0.8.0.tar.gz +0 -0
  279. data/dist/pulp_ansible_client-0.8.0-py3-none-any.whl +0 -0
  280. data/pulp_ansible_client.egg-info/PKG-INFO +0 -15
  281. data/pulp_ansible_client.egg-info/SOURCES.txt +0 -185
  282. data/pulp_ansible_client.egg-info/dependency_links.txt +0 -1
  283. data/pulp_ansible_client.egg-info/requires.txt +0 -4
  284. data/pulp_ansible_client.egg-info/top_level.txt +0 -1
  285. data/pulpcore/__init__.py +0 -2
  286. data/pulpcore/client/__init__.py +0 -2
  287. data/pulpcore/client/pulp_ansible/__init__.py +0 -115
  288. data/pulpcore/client/pulp_ansible/api/__init__.py +0 -28
  289. data/pulpcore/client/pulp_ansible/api/ansible_collections_api.py +0 -316
  290. data/pulpcore/client/pulp_ansible/api/ansible_copy_api.py +0 -156
  291. data/pulpcore/client/pulp_ansible/api/api_collections_api.py +0 -294
  292. data/pulpcore/client/pulp_ansible/api/api_roles_api.py +0 -172
  293. data/pulpcore/client/pulp_ansible/api/collection_import_api.py +0 -167
  294. data/pulpcore/client/pulp_ansible/api/content_collection_versions_api.py +0 -455
  295. data/pulpcore/client/pulp_ansible/api/content_roles_api.py +0 -440
  296. data/pulpcore/client/pulp_ansible/api/distributions_ansible_api.py +0 -830
  297. data/pulpcore/client/pulp_ansible/api/galaxy_detail_api.py +0 -162
  298. data/pulpcore/client/pulp_ansible/api/pulp_ansible_api_api.py +0 -158
  299. data/pulpcore/client/pulp_ansible/api/pulp_ansible_galaxy_api_collections_api.py +0 -474
  300. data/pulpcore/client/pulp_ansible/api/pulp_ansible_galaxy_api_v2_versions_api.py +0 -185
  301. data/pulpcore/client/pulp_ansible/api/pulp_ansible_galaxy_api_v3_all_api.py +0 -301
  302. data/pulpcore/client/pulp_ansible/api/pulp_ansible_galaxy_api_v3_collections_api.py +0 -185
  303. data/pulpcore/client/pulp_ansible/api/pulp_ansible_galaxy_api_v3_collections_docs_blob_api.py +0 -189
  304. data/pulpcore/client/pulp_ansible/api/pulp_ansible_galaxy_api_v3_versions_api.py +0 -386
  305. data/pulpcore/client/pulp_ansible/api/pulp_ansible_galaxy_v3_api.py +0 -162
  306. data/pulpcore/client/pulp_ansible/api/pulp_ansible_tags_api.py +0 -168
  307. data/pulpcore/client/pulp_ansible/api/remotes_collection_api.py +0 -840
  308. data/pulpcore/client/pulp_ansible/api/remotes_role_api.py +0 -840
  309. data/pulpcore/client/pulp_ansible/api/repositories_ansible_api.py +0 -1063
  310. data/pulpcore/client/pulp_ansible/api/repositories_ansible_versions_api.py +0 -614
  311. data/pulpcore/client/pulp_ansible/api/versions_api.py +0 -301
  312. data/pulpcore/client/pulp_ansible/api_client.py +0 -667
  313. data/pulpcore/client/pulp_ansible/configuration.py +0 -427
  314. data/pulpcore/client/pulp_ansible/exceptions.py +0 -121
  315. data/pulpcore/client/pulp_ansible/models/__init__.py +0 -78
  316. data/pulpcore/client/pulp_ansible/models/ansible_ansible_distribution.py +0 -260
  317. data/pulpcore/client/pulp_ansible/models/ansible_ansible_distribution_response.py +0 -342
  318. data/pulpcore/client/pulp_ansible/models/ansible_ansible_repository.py +0 -259
  319. data/pulpcore/client/pulp_ansible/models/ansible_ansible_repository_response.py +0 -365
  320. data/pulpcore/client/pulp_ansible/models/ansible_collection_remote.py +0 -771
  321. data/pulpcore/client/pulp_ansible/models/ansible_collection_remote_response.py +0 -718
  322. data/pulpcore/client/pulp_ansible/models/ansible_collection_response.py +0 -153
  323. data/pulpcore/client/pulp_ansible/models/ansible_collection_version.py +0 -639
  324. data/pulpcore/client/pulp_ansible/models/ansible_collection_version_response.py +0 -887
  325. data/pulpcore/client/pulp_ansible/models/ansible_repository_sync_url.py +0 -179
  326. data/pulpcore/client/pulp_ansible/models/ansible_role.py +0 -205
  327. data/pulpcore/client/pulp_ansible/models/ansible_role_remote.py +0 -657
  328. data/pulpcore/client/pulp_ansible/models/ansible_role_remote_response.py +0 -604
  329. data/pulpcore/client/pulp_ansible/models/ansible_role_response.py +0 -259
  330. data/pulpcore/client/pulp_ansible/models/ansible_tag_response.py +0 -123
  331. data/pulpcore/client/pulp_ansible/models/artifact_ref_response.py +0 -176
  332. data/pulpcore/client/pulp_ansible/models/async_operation_response.py +0 -124
  333. data/pulpcore/client/pulp_ansible/models/collection_import_detail_response.py +0 -311
  334. data/pulpcore/client/pulp_ansible/models/collection_metadata_response.py +0 -356
  335. data/pulpcore/client/pulp_ansible/models/collection_namespace_response.py +0 -122
  336. data/pulpcore/client/pulp_ansible/models/collection_one_shot.py +0 -236
  337. data/pulpcore/client/pulp_ansible/models/collection_ref_response.py +0 -175
  338. data/pulpcore/client/pulp_ansible/models/collection_response.py +0 -303
  339. data/pulpcore/client/pulp_ansible/models/collection_version_docs_response.py +0 -122
  340. data/pulpcore/client/pulp_ansible/models/collection_version_response.py +0 -441
  341. data/pulpcore/client/pulp_ansible/models/content_summary.py +0 -176
  342. data/pulpcore/client/pulp_ansible/models/content_summary_response.py +0 -176
  343. data/pulpcore/client/pulp_ansible/models/copy.py +0 -124
  344. data/pulpcore/client/pulp_ansible/models/galaxy_collection.py +0 -203
  345. data/pulpcore/client/pulp_ansible/models/galaxy_collection_response.py +0 -307
  346. data/pulpcore/client/pulp_ansible/models/galaxy_collection_version_response.py +0 -253
  347. data/pulpcore/client/pulp_ansible/models/galaxy_role_response.py +0 -175
  348. data/pulpcore/client/pulp_ansible/models/galaxy_role_version_response.py +0 -148
  349. data/pulpcore/client/pulp_ansible/models/paginated_collection_response_list.py +0 -173
  350. data/pulpcore/client/pulp_ansible/models/paginated_collection_response_list_links.py +0 -195
  351. data/pulpcore/client/pulp_ansible/models/paginated_collection_response_list_meta.py +0 -121
  352. data/pulpcore/client/pulp_ansible/models/paginated_collection_version_response_list.py +0 -173
  353. data/pulpcore/client/pulp_ansible/models/paginated_galaxy_collection_response_list.py +0 -197
  354. data/pulpcore/client/pulp_ansible/models/paginated_galaxy_collection_version_response_list.py +0 -197
  355. data/pulpcore/client/pulp_ansible/models/paginated_galaxy_role_response_list.py +0 -197
  356. data/pulpcore/client/pulp_ansible/models/paginated_galaxy_role_version_response_list.py +0 -197
  357. data/pulpcore/client/pulp_ansible/models/paginated_repository_version_response_list.py +0 -197
  358. data/pulpcore/client/pulp_ansible/models/paginated_tag_response_list.py +0 -197
  359. data/pulpcore/client/pulp_ansible/models/paginatedansible_ansible_distribution_response_list.py +0 -197
  360. data/pulpcore/client/pulp_ansible/models/paginatedansible_ansible_repository_response_list.py +0 -197
  361. data/pulpcore/client/pulp_ansible/models/paginatedansible_collection_remote_response_list.py +0 -197
  362. data/pulpcore/client/pulp_ansible/models/paginatedansible_collection_response_list.py +0 -197
  363. data/pulpcore/client/pulp_ansible/models/paginatedansible_collection_version_response_list.py +0 -197
  364. data/pulpcore/client/pulp_ansible/models/paginatedansible_role_remote_response_list.py +0 -197
  365. data/pulpcore/client/pulp_ansible/models/paginatedansible_role_response_list.py +0 -197
  366. data/pulpcore/client/pulp_ansible/models/patchedansible_ansible_distribution.py +0 -258
  367. data/pulpcore/client/pulp_ansible/models/patchedansible_ansible_repository.py +0 -258
  368. data/pulpcore/client/pulp_ansible/models/patchedansible_collection_remote.py +0 -769
  369. data/pulpcore/client/pulp_ansible/models/patchedansible_role_remote.py +0 -655
  370. data/pulpcore/client/pulp_ansible/models/policy_enum.py +0 -101
  371. data/pulpcore/client/pulp_ansible/models/repo_metadata_response.py +0 -122
  372. data/pulpcore/client/pulp_ansible/models/repository_add_remove_content.py +0 -179
  373. data/pulpcore/client/pulp_ansible/models/repository_version.py +0 -123
  374. data/pulpcore/client/pulp_ansible/models/repository_version_response.py +0 -257
  375. data/pulpcore/client/pulp_ansible/models/tag_response.py +0 -121
  376. data/pulpcore/client/pulp_ansible/models/unpaginated_collection_version_response.py +0 -385
  377. data/pulpcore/client/pulp_ansible/rest.py +0 -292
  378. data/requirements.txt +0 -6
  379. data/setup.cfg +0 -2
  380. data/setup.py +0 -42
  381. data/test-requirements.txt +0 -3
  382. data/test/__init__.py +0 -0
  383. data/test/test_ansible_ansible_distribution.py +0 -60
  384. data/test/test_ansible_ansible_distribution_response.py +0 -63
  385. data/test/test_ansible_ansible_repository.py +0 -59
  386. data/test/test_ansible_ansible_repository_response.py +0 -63
  387. data/test/test_ansible_collection_remote.py +0 -80
  388. data/test/test_ansible_collection_remote_response.py +0 -78
  389. data/test/test_ansible_collection_response.py +0 -56
  390. data/test/test_ansible_collection_version.py +0 -99
  391. data/test/test_ansible_collection_version_response.py +0 -111
  392. data/test/test_ansible_collections_api.py +0 -48
  393. data/test/test_ansible_copy_api.py +0 -41
  394. data/test/test_ansible_repository_sync_url.py +0 -55
  395. data/test/test_ansible_role.py +0 -60
  396. data/test/test_ansible_role_remote.py +0 -76
  397. data/test/test_ansible_role_remote_response.py +0 -74
  398. data/test/test_ansible_role_response.py +0 -62
  399. data/test/test_ansible_tag_response.py +0 -53
  400. data/test/test_api_collections_api.py +0 -46
  401. data/test/test_api_roles_api.py +0 -40
  402. data/test/test_artifact_ref_response.py +0 -58
  403. data/test/test_async_operation_response.py +0 -54
  404. data/test/test_collection_import_api.py +0 -41
  405. data/test/test_collection_import_detail_response.py +0 -68
  406. data/test/test_collection_metadata_response.py +0 -71
  407. data/test/test_collection_namespace_response.py +0 -54
  408. data/test/test_collection_one_shot.py +0 -58
  409. data/test/test_collection_ref_response.py +0 -57
  410. data/test/test_collection_response.py +0 -60
  411. data/test/test_collection_version_docs_response.py +0 -54
  412. data/test/test_collection_version_response.py +0 -67
  413. data/test/test_content_collection_versions_api.py +0 -55
  414. data/test/test_content_roles_api.py +0 -55
  415. data/test/test_content_summary.py +0 -70
  416. data/test/test_content_summary_response.py +0 -70
  417. data/test/test_copy.py +0 -54
  418. data/test/test_distributions_ansible_api.py +0 -76
  419. data/test/test_galaxy_collection.py +0 -60
  420. data/test/test_galaxy_collection_response.py +0 -64
  421. data/test/test_galaxy_collection_version_response.py +0 -92
  422. data/test/test_galaxy_detail_api.py +0 -40
  423. data/test/test_galaxy_role_response.py +0 -57
  424. data/test/test_galaxy_role_version_response.py +0 -55
  425. data/test/test_paginated_collection_response_list.py +0 -70
  426. data/test/test_paginated_collection_response_list_links.py +0 -56
  427. data/test/test_paginated_collection_response_list_meta.py +0 -53
  428. data/test/test_paginated_collection_version_response_list.py +0 -75
  429. data/test/test_paginated_galaxy_collection_response_list.py +0 -66
  430. data/test/test_paginated_galaxy_collection_version_response_list.py +0 -80
  431. data/test/test_paginated_galaxy_role_response_list.py +0 -61
  432. data/test/test_paginated_galaxy_role_version_response_list.py +0 -60
  433. data/test/test_paginated_repository_version_response_list.py +0 -64
  434. data/test/test_paginated_tag_response_list.py +0 -59
  435. data/test/test_paginatedansible_ansible_distribution_response_list.py +0 -67
  436. data/test/test_paginatedansible_ansible_repository_response_list.py +0 -68
  437. data/test/test_paginatedansible_collection_remote_response_list.py +0 -82
  438. data/test/test_paginatedansible_collection_response_list.py +0 -60
  439. data/test/test_paginatedansible_collection_version_response_list.py +0 -94
  440. data/test/test_paginatedansible_role_remote_response_list.py +0 -78
  441. data/test/test_paginatedansible_role_response_list.py +0 -64
  442. data/test/test_patchedansible_ansible_distribution.py +0 -58
  443. data/test/test_patchedansible_ansible_repository.py +0 -58
  444. data/test/test_patchedansible_collection_remote.py +0 -78
  445. data/test/test_patchedansible_role_remote.py +0 -74
  446. data/test/test_policy_enum.py +0 -52
  447. data/test/test_pulp_ansible_api_api.py +0 -40
  448. data/test/test_pulp_ansible_galaxy_api_collections_api.py +0 -52
  449. data/test/test_pulp_ansible_galaxy_api_v2_versions_api.py +0 -40
  450. data/test/test_pulp_ansible_galaxy_api_v3_all_api.py +0 -46
  451. data/test/test_pulp_ansible_galaxy_api_v3_collections_api.py +0 -41
  452. data/test/test_pulp_ansible_galaxy_api_v3_collections_docs_blob_api.py +0 -40
  453. data/test/test_pulp_ansible_galaxy_api_v3_versions_api.py +0 -46
  454. data/test/test_pulp_ansible_galaxy_v3_api.py +0 -40
  455. data/test/test_pulp_ansible_tags_api.py +0 -41
  456. data/test/test_remotes_collection_api.py +0 -76
  457. data/test/test_remotes_role_api.py +0 -76
  458. data/test/test_repo_metadata_response.py +0 -54
  459. data/test/test_repositories_ansible_api.py +0 -89
  460. data/test/test_repositories_ansible_versions_api.py +0 -61
  461. data/test/test_repository_add_remove_content.py +0 -59
  462. data/test/test_repository_version.py +0 -53
  463. data/test/test_repository_version_response.py +0 -58
  464. data/test/test_tag_response.py +0 -53
  465. data/test/test_unpaginated_collection_version_response.py +0 -65
  466. data/test/test_versions_api.py +0 -46
  467. data/tox.ini +0 -9
@@ -1,301 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Pulp 3 API
5
-
6
- Fetch, Upload, Organize, and Distribute Software Packages # noqa: E501
7
-
8
- The version of the OpenAPI document: v3
9
- Contact: pulp-list@redhat.com
10
- Generated by: https://openapi-generator.tech
11
- """
12
-
13
-
14
- from __future__ import absolute_import
15
-
16
- import re # noqa: F401
17
-
18
- # python 2 and python 3 compatibility library
19
- import six
20
-
21
- from pulpcore.client.pulp_ansible.api_client import ApiClient
22
- from pulpcore.client.pulp_ansible.exceptions import ( # noqa: F401
23
- ApiTypeError,
24
- ApiValueError
25
- )
26
-
27
-
28
- class VersionsApi(object):
29
- """NOTE: This class is auto generated by OpenAPI Generator
30
- Ref: https://openapi-generator.tech
31
-
32
- Do not edit the class manually.
33
- """
34
-
35
- def __init__(self, api_client=None):
36
- if api_client is None:
37
- api_client = ApiClient()
38
- self.api_client = api_client
39
-
40
- def get(self, ansible_role_href, **kwargs): # noqa: E501
41
- """get # noqa: E501
42
-
43
- APIView for Role Versions. # noqa: E501
44
- This method makes a synchronous HTTP request by default. To make an
45
- asynchronous HTTP request, please pass async_req=True
46
- >>> thread = api.get(ansible_role_href, async_req=True)
47
- >>> result = thread.get()
48
-
49
- :param async_req bool: execute request asynchronously
50
- :param str ansible_role_href: (required)
51
- :param int limit: Number of results to return per page.
52
- :param int offset: The initial index from which to return the results.
53
- :param str fields: A list of fields to include in the response.
54
- :param str exclude_fields: A list of fields to exclude from the response.
55
- :param _preload_content: if False, the urllib3.HTTPResponse object will
56
- be returned without reading/decoding response
57
- data. Default is True.
58
- :param _request_timeout: timeout setting for this request. If one
59
- number provided, it will be total request
60
- timeout. It can also be a pair (tuple) of
61
- (connection, read) timeouts.
62
- :return: PaginatedGalaxyRoleVersionResponseList
63
- If the method is called asynchronously,
64
- returns the request thread.
65
- """
66
- kwargs['_return_http_data_only'] = True
67
- return self.get_with_http_info(ansible_role_href, **kwargs) # noqa: E501
68
-
69
- def get_with_http_info(self, ansible_role_href, **kwargs): # noqa: E501
70
- """get # noqa: E501
71
-
72
- APIView for Role Versions. # noqa: E501
73
- This method makes a synchronous HTTP request by default. To make an
74
- asynchronous HTTP request, please pass async_req=True
75
- >>> thread = api.get_with_http_info(ansible_role_href, async_req=True)
76
- >>> result = thread.get()
77
-
78
- :param async_req bool: execute request asynchronously
79
- :param str ansible_role_href: (required)
80
- :param int limit: Number of results to return per page.
81
- :param int offset: The initial index from which to return the results.
82
- :param str fields: A list of fields to include in the response.
83
- :param str exclude_fields: A list of fields to exclude from the response.
84
- :param _return_http_data_only: response data without head status code
85
- and headers
86
- :param _preload_content: if False, the urllib3.HTTPResponse object will
87
- be returned without reading/decoding response
88
- data. Default is True.
89
- :param _request_timeout: timeout setting for this request. If one
90
- number provided, it will be total request
91
- timeout. It can also be a pair (tuple) of
92
- (connection, read) timeouts.
93
- :return: tuple(PaginatedGalaxyRoleVersionResponseList, status_code(int), headers(HTTPHeaderDict))
94
- If the method is called asynchronously,
95
- returns the request thread.
96
- """
97
-
98
- local_var_params = locals()
99
-
100
- all_params = [
101
- 'ansible_role_href',
102
- 'limit',
103
- 'offset',
104
- 'fields',
105
- 'exclude_fields'
106
- ]
107
- all_params.extend(
108
- [
109
- 'async_req',
110
- '_return_http_data_only',
111
- '_preload_content',
112
- '_request_timeout'
113
- ]
114
- )
115
-
116
- for key, val in six.iteritems(local_var_params['kwargs']):
117
- if key not in all_params:
118
- raise ApiTypeError(
119
- "Got an unexpected keyword argument '%s'"
120
- " to method get" % key
121
- )
122
- local_var_params[key] = val
123
- del local_var_params['kwargs']
124
- # verify the required parameter 'ansible_role_href' is set
125
- if self.api_client.client_side_validation and ('ansible_role_href' not in local_var_params or # noqa: E501
126
- local_var_params['ansible_role_href'] is None): # noqa: E501
127
- raise ApiValueError("Missing the required parameter `ansible_role_href` when calling `get`") # noqa: E501
128
-
129
- collection_formats = {}
130
-
131
- path_params = {}
132
- if 'ansible_role_href' in local_var_params:
133
- path_params['ansible_role_href'] = local_var_params['ansible_role_href'] # noqa: E501
134
-
135
- query_params = []
136
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
137
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
138
- if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
139
- query_params.append(('offset', local_var_params['offset'])) # noqa: E501
140
- if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
141
- query_params.append(('fields', local_var_params['fields'])) # noqa: E501
142
- if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
143
- query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
144
-
145
- header_params = {}
146
-
147
- form_params = []
148
- local_var_files = {}
149
-
150
- body_params = None
151
- # HTTP header `Accept`
152
- header_params['Accept'] = self.api_client.select_header_accept(
153
- ['application/json']) # noqa: E501
154
-
155
- # Authentication setting
156
- auth_settings = [] # noqa: E501
157
-
158
- return self.api_client.call_api(
159
- '{ansible_role_href}versions/', 'GET',
160
- path_params,
161
- query_params,
162
- header_params,
163
- body=body_params,
164
- post_params=form_params,
165
- files=local_var_files,
166
- response_type='PaginatedGalaxyRoleVersionResponseList', # noqa: E501
167
- auth_settings=auth_settings,
168
- async_req=local_var_params.get('async_req'),
169
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
170
- _preload_content=local_var_params.get('_preload_content', True),
171
- _request_timeout=local_var_params.get('_request_timeout'),
172
- collection_formats=collection_formats)
173
-
174
- def get_0(self, ansible_collection_version_href, **kwargs): # noqa: E501
175
- """get_0 # noqa: E501
176
-
177
- APIView for Collections by namespace/name. # noqa: E501
178
- This method makes a synchronous HTTP request by default. To make an
179
- asynchronous HTTP request, please pass async_req=True
180
- >>> thread = api.get_0(ansible_collection_version_href, async_req=True)
181
- >>> result = thread.get()
182
-
183
- :param async_req bool: execute request asynchronously
184
- :param str ansible_collection_version_href: (required)
185
- :param int page: A page number within the paginated result set.
186
- :param str fields: A list of fields to include in the response.
187
- :param str exclude_fields: A list of fields to exclude from the response.
188
- :param _preload_content: if False, the urllib3.HTTPResponse object will
189
- be returned without reading/decoding response
190
- data. Default is True.
191
- :param _request_timeout: timeout setting for this request. If one
192
- number provided, it will be total request
193
- timeout. It can also be a pair (tuple) of
194
- (connection, read) timeouts.
195
- :return: PaginatedGalaxyCollectionVersionResponseList
196
- If the method is called asynchronously,
197
- returns the request thread.
198
- """
199
- kwargs['_return_http_data_only'] = True
200
- return self.get_0_with_http_info(ansible_collection_version_href, **kwargs) # noqa: E501
201
-
202
- def get_0_with_http_info(self, ansible_collection_version_href, **kwargs): # noqa: E501
203
- """get_0 # noqa: E501
204
-
205
- APIView for Collections by namespace/name. # noqa: E501
206
- This method makes a synchronous HTTP request by default. To make an
207
- asynchronous HTTP request, please pass async_req=True
208
- >>> thread = api.get_0_with_http_info(ansible_collection_version_href, async_req=True)
209
- >>> result = thread.get()
210
-
211
- :param async_req bool: execute request asynchronously
212
- :param str ansible_collection_version_href: (required)
213
- :param int page: A page number within the paginated result set.
214
- :param str fields: A list of fields to include in the response.
215
- :param str exclude_fields: A list of fields to exclude from the response.
216
- :param _return_http_data_only: response data without head status code
217
- and headers
218
- :param _preload_content: if False, the urllib3.HTTPResponse object will
219
- be returned without reading/decoding response
220
- data. Default is True.
221
- :param _request_timeout: timeout setting for this request. If one
222
- number provided, it will be total request
223
- timeout. It can also be a pair (tuple) of
224
- (connection, read) timeouts.
225
- :return: tuple(PaginatedGalaxyCollectionVersionResponseList, status_code(int), headers(HTTPHeaderDict))
226
- If the method is called asynchronously,
227
- returns the request thread.
228
- """
229
-
230
- local_var_params = locals()
231
-
232
- all_params = [
233
- 'ansible_collection_version_href',
234
- 'page',
235
- 'fields',
236
- 'exclude_fields'
237
- ]
238
- all_params.extend(
239
- [
240
- 'async_req',
241
- '_return_http_data_only',
242
- '_preload_content',
243
- '_request_timeout'
244
- ]
245
- )
246
-
247
- for key, val in six.iteritems(local_var_params['kwargs']):
248
- if key not in all_params:
249
- raise ApiTypeError(
250
- "Got an unexpected keyword argument '%s'"
251
- " to method get_0" % key
252
- )
253
- local_var_params[key] = val
254
- del local_var_params['kwargs']
255
- # verify the required parameter 'ansible_collection_version_href' is set
256
- if self.api_client.client_side_validation and ('ansible_collection_version_href' not in local_var_params or # noqa: E501
257
- local_var_params['ansible_collection_version_href'] is None): # noqa: E501
258
- raise ApiValueError("Missing the required parameter `ansible_collection_version_href` when calling `get_0`") # noqa: E501
259
-
260
- collection_formats = {}
261
-
262
- path_params = {}
263
- if 'ansible_collection_version_href' in local_var_params:
264
- path_params['ansible_collection_version_href'] = local_var_params['ansible_collection_version_href'] # noqa: E501
265
-
266
- query_params = []
267
- if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
268
- query_params.append(('page', local_var_params['page'])) # noqa: E501
269
- if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
270
- query_params.append(('fields', local_var_params['fields'])) # noqa: E501
271
- if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
272
- query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
273
-
274
- header_params = {}
275
-
276
- form_params = []
277
- local_var_files = {}
278
-
279
- body_params = None
280
- # HTTP header `Accept`
281
- header_params['Accept'] = self.api_client.select_header_accept(
282
- ['application/json']) # noqa: E501
283
-
284
- # Authentication setting
285
- auth_settings = [] # noqa: E501
286
-
287
- return self.api_client.call_api(
288
- '{ansible_collection_version_href}versions/', 'GET',
289
- path_params,
290
- query_params,
291
- header_params,
292
- body=body_params,
293
- post_params=form_params,
294
- files=local_var_files,
295
- response_type='PaginatedGalaxyCollectionVersionResponseList', # noqa: E501
296
- auth_settings=auth_settings,
297
- async_req=local_var_params.get('async_req'),
298
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
299
- _preload_content=local_var_params.get('_preload_content', True),
300
- _request_timeout=local_var_params.get('_request_timeout'),
301
- collection_formats=collection_formats)
@@ -1,667 +0,0 @@
1
- # coding: utf-8
2
- """
3
- Pulp 3 API
4
-
5
- Fetch, Upload, Organize, and Distribute Software Packages # noqa: E501
6
-
7
- The version of the OpenAPI document: v3
8
- Contact: pulp-list@redhat.com
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
- from __future__ import absolute_import
13
-
14
- import atexit
15
- import datetime
16
- from dateutil.parser import parse
17
- import json
18
- import mimetypes
19
- from multiprocessing.pool import ThreadPool
20
- import os
21
- import re
22
- import tempfile
23
-
24
- # python 2 and python 3 compatibility library
25
- import six
26
- from six.moves.urllib.parse import quote
27
-
28
- from pulpcore.client.pulp_ansible.configuration import Configuration
29
- import pulpcore.client.pulp_ansible.models
30
- from pulpcore.client.pulp_ansible import rest
31
- from pulpcore.client.pulp_ansible.exceptions import ApiValueError, ApiException
32
-
33
-
34
- class ApiClient(object):
35
- """Generic API client for OpenAPI client library builds.
36
-
37
- OpenAPI generic API client. This client handles the client-
38
- server communication, and is invariant across implementations. Specifics of
39
- the methods and models for each application are generated from the OpenAPI
40
- templates.
41
-
42
- NOTE: This class is auto generated by OpenAPI Generator.
43
- Ref: https://openapi-generator.tech
44
- Do not edit the class manually.
45
-
46
- :param configuration: .Configuration object for this client
47
- :param header_name: a header to pass when making calls to the API.
48
- :param header_value: a header value to pass when making calls to
49
- the API.
50
- :param cookie: a cookie to include in the header when making calls
51
- to the API
52
- :param pool_threads: The number of threads to use for async requests
53
- to the API. More threads means more concurrent API requests.
54
- """
55
-
56
- PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
57
- NATIVE_TYPES_MAPPING = {
58
- 'int': int,
59
- 'long': int if six.PY3 else long, # noqa: F821
60
- 'float': float,
61
- 'str': str,
62
- 'bool': bool,
63
- 'date': datetime.date,
64
- 'datetime': datetime.datetime,
65
- 'object': object,
66
- }
67
- _pool = None
68
-
69
- def __init__(self, configuration=None, header_name=None, header_value=None,
70
- cookie=None, pool_threads=1):
71
- if configuration is None:
72
- configuration = Configuration.get_default_copy()
73
- self.configuration = configuration
74
- self.pool_threads = pool_threads
75
-
76
- self.rest_client = rest.RESTClientObject(configuration)
77
- self.default_headers = {}
78
- if header_name is not None:
79
- self.default_headers[header_name] = header_value
80
- self.cookie = cookie
81
- # Set default User-Agent.
82
- self.user_agent = 'OpenAPI-Generator/0.8.0/python'
83
- self.client_side_validation = configuration.client_side_validation
84
-
85
- def __enter__(self):
86
- return self
87
-
88
- def __exit__(self, exc_type, exc_value, traceback):
89
- self.close()
90
-
91
- def close(self):
92
- if self._pool:
93
- self._pool.close()
94
- self._pool.join()
95
- self._pool = None
96
- if hasattr(atexit, 'unregister'):
97
- atexit.unregister(self.close)
98
-
99
- @property
100
- def pool(self):
101
- """Create thread pool on first request
102
- avoids instantiating unused threadpool for blocking clients.
103
- """
104
- if self._pool is None:
105
- atexit.register(self.close)
106
- self._pool = ThreadPool(self.pool_threads)
107
- return self._pool
108
-
109
- @property
110
- def user_agent(self):
111
- """User agent for this API client"""
112
- return self.default_headers['User-Agent']
113
-
114
- @user_agent.setter
115
- def user_agent(self, value):
116
- self.default_headers['User-Agent'] = value
117
-
118
- def set_default_header(self, header_name, header_value):
119
- self.default_headers[header_name] = header_value
120
-
121
- def __call_api(
122
- self, resource_path, method, path_params=None,
123
- query_params=None, header_params=None, body=None, post_params=None,
124
- files=None, response_type=None, auth_settings=None,
125
- _return_http_data_only=None, collection_formats=None,
126
- _preload_content=True, _request_timeout=None, _host=None):
127
-
128
- config = self.configuration
129
-
130
- # header parameters
131
- header_params = header_params or {}
132
- header_params.update(self.default_headers)
133
- if self.cookie:
134
- header_params['Cookie'] = self.cookie
135
- if header_params:
136
- header_params = self.sanitize_for_serialization(header_params)
137
- header_params = dict(self.parameters_to_tuples(header_params,
138
- collection_formats))
139
-
140
- # path parameters
141
- if path_params:
142
- path_params = self.sanitize_for_serialization(path_params)
143
- path_params = self.parameters_to_tuples(path_params,
144
- collection_formats)
145
- for k, v in path_params:
146
- # specified safe chars, encode everything
147
- resource_path = resource_path.replace(
148
- '{%s}' % k,
149
- quote(str(v), safe=config.safe_chars_for_path_param)
150
- )
151
-
152
- # query parameters
153
- if query_params:
154
- query_params = self.sanitize_for_serialization(query_params)
155
- query_params = self.parameters_to_tuples(query_params,
156
- collection_formats)
157
-
158
- # post parameters
159
- if post_params or files:
160
- post_params = post_params if post_params else []
161
- post_params = self.sanitize_for_serialization(post_params)
162
- post_params = self.parameters_to_tuples(post_params,
163
- collection_formats)
164
- post_params.extend(self.files_parameters(files))
165
-
166
- # auth setting
167
- self.update_params_for_auth(header_params, query_params, auth_settings)
168
-
169
- # body
170
- if body:
171
- body = self.sanitize_for_serialization(body)
172
-
173
- # request url
174
- if _host is None:
175
- url = self.configuration.host + resource_path
176
- else:
177
- # use server/host defined in path or operation instead
178
- url = _host + resource_path
179
-
180
- try:
181
- # perform request and return response
182
- response_data = self.request(
183
- method, url, query_params=query_params, headers=header_params,
184
- post_params=post_params, body=body,
185
- _preload_content=_preload_content,
186
- _request_timeout=_request_timeout)
187
- except ApiException as e:
188
- e.body = e.body.decode('utf-8') if six.PY3 else e.body
189
- raise e
190
-
191
- content_type = response_data.getheader('content-type')
192
-
193
- self.last_response = response_data
194
-
195
- return_data = response_data
196
-
197
- if not _preload_content:
198
- return return_data
199
-
200
- if six.PY3 and response_type not in ["file", "bytes"]:
201
- match = None
202
- if content_type is not None:
203
- match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type)
204
- encoding = match.group(1) if match else "utf-8"
205
- response_data.data = response_data.data.decode(encoding)
206
-
207
- # deserialize response data
208
- if response_type:
209
- return_data = self.deserialize(response_data, response_type)
210
- else:
211
- return_data = None
212
-
213
- if _return_http_data_only:
214
- return (return_data)
215
- else:
216
- return (return_data, response_data.status,
217
- response_data.getheaders())
218
-
219
- def sanitize_for_serialization(self, obj):
220
- """Builds a JSON POST object.
221
-
222
- If obj is None, return None.
223
- If obj is str, int, long, float, bool, return directly.
224
- If obj is datetime.datetime, datetime.date
225
- convert to string in iso8601 format.
226
- If obj is list, sanitize each element in the list.
227
- If obj is dict, return the dict.
228
- If obj is OpenAPI model, return the properties dict.
229
-
230
- :param obj: The data to serialize.
231
- :return: The serialized form of data.
232
- """
233
- if obj is None:
234
- return None
235
- elif isinstance(obj, self.PRIMITIVE_TYPES):
236
- return obj
237
- elif isinstance(obj, list):
238
- return [self.sanitize_for_serialization(sub_obj)
239
- for sub_obj in obj]
240
- elif isinstance(obj, tuple):
241
- return tuple(self.sanitize_for_serialization(sub_obj)
242
- for sub_obj in obj)
243
- elif isinstance(obj, (datetime.datetime, datetime.date)):
244
- return obj.isoformat()
245
-
246
- if isinstance(obj, dict):
247
- obj_dict = obj
248
- else:
249
- # Convert model obj to dict except
250
- # attributes `openapi_types`, `attribute_map`
251
- # and attributes which value is not None.
252
- # Convert attribute name to json key in
253
- # model definition for request.
254
- obj_dict = {obj.attribute_map[attr]: getattr(obj, attr)
255
- for attr, _ in six.iteritems(obj.openapi_types)
256
- if getattr(obj, attr) is not None}
257
-
258
- return {key: self.sanitize_for_serialization(val)
259
- for key, val in six.iteritems(obj_dict)}
260
-
261
- def deserialize(self, response, response_type):
262
- """Deserializes response into an object.
263
-
264
- :param response: RESTResponse object to be deserialized.
265
- :param response_type: class literal for
266
- deserialized object, or string of class name.
267
-
268
- :return: deserialized object.
269
- """
270
- # handle file downloading
271
- # save response body into a tmp file and return the instance
272
- if response_type == "file":
273
- return self.__deserialize_file(response)
274
-
275
- # fetch data from response object
276
- try:
277
- data = json.loads(response.data)
278
- except ValueError:
279
- data = response.data
280
-
281
- return self.__deserialize(data, response_type)
282
-
283
- def __deserialize(self, data, klass):
284
- """Deserializes dict, list, str into an object.
285
-
286
- :param data: dict, list or str.
287
- :param klass: class literal, or string of class name.
288
-
289
- :return: object.
290
- """
291
- if data is None:
292
- return None
293
-
294
- if type(klass) == str:
295
- if klass.startswith('list['):
296
- sub_kls = re.match(r'list\[(.*)\]', klass).group(1)
297
- return [self.__deserialize(sub_data, sub_kls)
298
- for sub_data in data]
299
-
300
- if klass.startswith('dict('):
301
- sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2)
302
- return {k: self.__deserialize(v, sub_kls)
303
- for k, v in six.iteritems(data)}
304
-
305
- # convert str to class
306
- if klass in self.NATIVE_TYPES_MAPPING:
307
- klass = self.NATIVE_TYPES_MAPPING[klass]
308
- else:
309
- klass = getattr(pulpcore.client.pulp_ansible.models, klass)
310
-
311
- if klass in self.PRIMITIVE_TYPES:
312
- return self.__deserialize_primitive(data, klass)
313
- elif klass == object:
314
- return self.__deserialize_object(data)
315
- elif klass == datetime.date:
316
- return self.__deserialize_date(data)
317
- elif klass == datetime.datetime:
318
- return self.__deserialize_datetime(data)
319
- else:
320
- return self.__deserialize_model(data, klass)
321
-
322
- def call_api(self, resource_path, method,
323
- path_params=None, query_params=None, header_params=None,
324
- body=None, post_params=None, files=None,
325
- response_type=None, auth_settings=None, async_req=None,
326
- _return_http_data_only=None, collection_formats=None,
327
- _preload_content=True, _request_timeout=None, _host=None):
328
- """Makes the HTTP request (synchronous) and returns deserialized data.
329
-
330
- To make an async_req request, set the async_req parameter.
331
-
332
- :param resource_path: Path to method endpoint.
333
- :param method: Method to call.
334
- :param path_params: Path parameters in the url.
335
- :param query_params: Query parameters in the url.
336
- :param header_params: Header parameters to be
337
- placed in the request header.
338
- :param body: Request body.
339
- :param post_params dict: Request post form parameters,
340
- for `application/x-www-form-urlencoded`, `multipart/form-data`.
341
- :param auth_settings list: Auth Settings names for the request.
342
- :param response: Response data type.
343
- :param files dict: key -> filename, value -> filepath,
344
- for `multipart/form-data`.
345
- :param async_req bool: execute request asynchronously
346
- :param _return_http_data_only: response data without head status code
347
- and headers
348
- :param collection_formats: dict of collection formats for path, query,
349
- header, and post parameters.
350
- :param _preload_content: if False, the urllib3.HTTPResponse object will
351
- be returned without reading/decoding response
352
- data. Default is True.
353
- :param _request_timeout: timeout setting for this request. If one
354
- number provided, it will be total request
355
- timeout. It can also be a pair (tuple) of
356
- (connection, read) timeouts.
357
- :return:
358
- If async_req parameter is True,
359
- the request will be called asynchronously.
360
- The method will return the request thread.
361
- If parameter async_req is False or missing,
362
- then the method will return the response directly.
363
- """
364
- if not async_req:
365
- return self.__call_api(resource_path, method,
366
- path_params, query_params, header_params,
367
- body, post_params, files,
368
- response_type, auth_settings,
369
- _return_http_data_only, collection_formats,
370
- _preload_content, _request_timeout, _host)
371
-
372
- return self.pool.apply_async(self.__call_api, (resource_path,
373
- method, path_params,
374
- query_params,
375
- header_params, body,
376
- post_params, files,
377
- response_type,
378
- auth_settings,
379
- _return_http_data_only,
380
- collection_formats,
381
- _preload_content,
382
- _request_timeout,
383
- _host))
384
-
385
- def request(self, method, url, query_params=None, headers=None,
386
- post_params=None, body=None, _preload_content=True,
387
- _request_timeout=None):
388
- """Makes the HTTP request using RESTClient."""
389
- if method == "GET":
390
- return self.rest_client.GET(url,
391
- query_params=query_params,
392
- _preload_content=_preload_content,
393
- _request_timeout=_request_timeout,
394
- headers=headers)
395
- elif method == "HEAD":
396
- return self.rest_client.HEAD(url,
397
- query_params=query_params,
398
- _preload_content=_preload_content,
399
- _request_timeout=_request_timeout,
400
- headers=headers)
401
- elif method == "OPTIONS":
402
- return self.rest_client.OPTIONS(url,
403
- query_params=query_params,
404
- headers=headers,
405
- _preload_content=_preload_content,
406
- _request_timeout=_request_timeout)
407
- elif method == "POST":
408
- return self.rest_client.POST(url,
409
- query_params=query_params,
410
- headers=headers,
411
- post_params=post_params,
412
- _preload_content=_preload_content,
413
- _request_timeout=_request_timeout,
414
- body=body)
415
- elif method == "PUT":
416
- return self.rest_client.PUT(url,
417
- query_params=query_params,
418
- headers=headers,
419
- post_params=post_params,
420
- _preload_content=_preload_content,
421
- _request_timeout=_request_timeout,
422
- body=body)
423
- elif method == "PATCH":
424
- return self.rest_client.PATCH(url,
425
- query_params=query_params,
426
- headers=headers,
427
- post_params=post_params,
428
- _preload_content=_preload_content,
429
- _request_timeout=_request_timeout,
430
- body=body)
431
- elif method == "DELETE":
432
- return self.rest_client.DELETE(url,
433
- query_params=query_params,
434
- headers=headers,
435
- _preload_content=_preload_content,
436
- _request_timeout=_request_timeout,
437
- body=body)
438
- else:
439
- raise ApiValueError(
440
- "http method must be `GET`, `HEAD`, `OPTIONS`,"
441
- " `POST`, `PATCH`, `PUT` or `DELETE`."
442
- )
443
-
444
- def parameters_to_tuples(self, params, collection_formats):
445
- """Get parameters as list of tuples, formatting collections.
446
-
447
- :param params: Parameters as dict or list of two-tuples
448
- :param dict collection_formats: Parameter collection formats
449
- :return: Parameters as list of tuples, collections formatted
450
- """
451
- new_params = []
452
- if collection_formats is None:
453
- collection_formats = {}
454
- for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501
455
- if k in collection_formats:
456
- collection_format = collection_formats[k]
457
- if collection_format == 'multi':
458
- new_params.extend((k, value) for value in v)
459
- else:
460
- if collection_format == 'ssv':
461
- delimiter = ' '
462
- elif collection_format == 'tsv':
463
- delimiter = '\t'
464
- elif collection_format == 'pipes':
465
- delimiter = '|'
466
- else: # csv is the default
467
- delimiter = ','
468
- new_params.append(
469
- (k, delimiter.join(str(value) for value in v)))
470
- else:
471
- new_params.append((k, v))
472
- return new_params
473
-
474
- def files_parameters(self, files=None):
475
- """Builds form parameters.
476
-
477
- :param files: File parameters.
478
- :return: Form parameters with files.
479
- """
480
- params = []
481
-
482
- if files:
483
- for k, v in six.iteritems(files):
484
- if not v:
485
- continue
486
- file_names = v if type(v) is list else [v]
487
- for n in file_names:
488
- with open(n, 'rb') as f:
489
- filename = os.path.basename(f.name)
490
- filedata = f.read()
491
- mimetype = (mimetypes.guess_type(filename)[0] or
492
- 'application/octet-stream')
493
- params.append(
494
- tuple([k, tuple([filename, filedata, mimetype])]))
495
-
496
- return params
497
-
498
- def select_header_accept(self, accepts):
499
- """Returns `Accept` based on an array of accepts provided.
500
-
501
- :param accepts: List of headers.
502
- :return: Accept (e.g. application/json).
503
- """
504
- if not accepts:
505
- return
506
-
507
- accepts = [x.lower() for x in accepts]
508
-
509
- if 'application/json' in accepts:
510
- return 'application/json'
511
- else:
512
- return ', '.join(accepts)
513
-
514
- def select_header_content_type(self, content_types):
515
- """Returns `Content-Type` based on an array of content_types provided.
516
-
517
- :param content_types: List of content-types.
518
- :return: Content-Type (e.g. application/json).
519
- """
520
- if not content_types:
521
- return 'application/json'
522
-
523
- content_types = [x.lower() for x in content_types]
524
-
525
- if 'application/json' in content_types or '*/*' in content_types:
526
- return 'application/json'
527
- else:
528
- return content_types[0]
529
-
530
- def update_params_for_auth(self, headers, querys, auth_settings):
531
- """Updates header and query params based on authentication setting.
532
-
533
- :param headers: Header parameters dict to be updated.
534
- :param querys: Query parameters tuple list to be updated.
535
- :param auth_settings: Authentication setting identifiers list.
536
- """
537
- if not auth_settings:
538
- return
539
-
540
- for auth in auth_settings:
541
- auth_setting = self.configuration.auth_settings().get(auth)
542
- if auth_setting:
543
- if auth_setting['in'] == 'cookie':
544
- headers['Cookie'] = auth_setting['value']
545
- elif auth_setting['in'] == 'header':
546
- headers[auth_setting['key']] = auth_setting['value']
547
- elif auth_setting['in'] == 'query':
548
- querys.append((auth_setting['key'], auth_setting['value']))
549
- else:
550
- raise ApiValueError(
551
- 'Authentication token must be in `query` or `header`'
552
- )
553
-
554
- def __deserialize_file(self, response):
555
- """Deserializes body to file
556
-
557
- Saves response body into a file in a temporary folder,
558
- using the filename from the `Content-Disposition` header if provided.
559
-
560
- :param response: RESTResponse.
561
- :return: file path.
562
- """
563
- fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)
564
- os.close(fd)
565
- os.remove(path)
566
-
567
- content_disposition = response.getheader("Content-Disposition")
568
- if content_disposition:
569
- filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?',
570
- content_disposition).group(1)
571
- path = os.path.join(os.path.dirname(path), filename)
572
-
573
- with open(path, "wb") as f:
574
- f.write(response.data)
575
-
576
- return path
577
-
578
- def __deserialize_primitive(self, data, klass):
579
- """Deserializes string to primitive type.
580
-
581
- :param data: str.
582
- :param klass: class literal.
583
-
584
- :return: int, long, float, str, bool.
585
- """
586
- try:
587
- return klass(data)
588
- except UnicodeEncodeError:
589
- return six.text_type(data)
590
- except TypeError:
591
- return data
592
-
593
- def __deserialize_object(self, value):
594
- """Return an original value.
595
-
596
- :return: object.
597
- """
598
- return value
599
-
600
- def __deserialize_date(self, string):
601
- """Deserializes string to date.
602
-
603
- :param string: str.
604
- :return: date.
605
- """
606
- try:
607
- return parse(string).date()
608
- except ImportError:
609
- return string
610
- except ValueError:
611
- raise rest.ApiException(
612
- status=0,
613
- reason="Failed to parse `{0}` as date object".format(string)
614
- )
615
-
616
- def __deserialize_datetime(self, string):
617
- """Deserializes string to datetime.
618
-
619
- The string should be in iso8601 datetime format.
620
-
621
- :param string: str.
622
- :return: datetime.
623
- """
624
- try:
625
- return parse(string)
626
- except ImportError:
627
- return string
628
- except ValueError:
629
- raise rest.ApiException(
630
- status=0,
631
- reason=(
632
- "Failed to parse `{0}` as datetime object"
633
- .format(string)
634
- )
635
- )
636
-
637
- def __deserialize_model(self, data, klass):
638
- """Deserializes list or dict to model.
639
-
640
- :param data: dict, list.
641
- :param klass: class literal.
642
- :return: model object.
643
- """
644
- has_discriminator = False
645
- if (hasattr(klass, 'get_real_child_model')
646
- and klass.discriminator_value_class_map):
647
- has_discriminator = True
648
-
649
- if not klass.openapi_types and has_discriminator is False:
650
- return data
651
-
652
- kwargs = {}
653
- if (data is not None and
654
- klass.openapi_types is not None and
655
- isinstance(data, (list, dict))):
656
- for attr, attr_type in six.iteritems(klass.openapi_types):
657
- if klass.attribute_map[attr] in data:
658
- value = data[klass.attribute_map[attr]]
659
- kwargs[attr] = self.__deserialize(value, attr_type)
660
-
661
- instance = klass(**kwargs)
662
-
663
- if has_discriminator:
664
- klass_name = instance.get_real_child_model(data)
665
- if klass_name:
666
- instance = self.__deserialize(data, klass_name)
667
- return instance