vrchatapi-async 1.20.8.dev1__py3-none-any.whl

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 (362) hide show
  1. vrchatapi/__init__.py +742 -0
  2. vrchatapi/api/__init__.py +23 -0
  3. vrchatapi/api/authentication_api.py +6253 -0
  4. vrchatapi/api/avatars_api.py +4234 -0
  5. vrchatapi/api/calendar_api.py +4090 -0
  6. vrchatapi/api/economy_api.py +11547 -0
  7. vrchatapi/api/favorites_api.py +2368 -0
  8. vrchatapi/api/files_api.py +6109 -0
  9. vrchatapi/api/friends_api.py +1708 -0
  10. vrchatapi/api/groups_api.py +15085 -0
  11. vrchatapi/api/instances_api.py +1754 -0
  12. vrchatapi/api/inventory_api.py +4333 -0
  13. vrchatapi/api/invite_api.py +3337 -0
  14. vrchatapi/api/jams_api.py +1446 -0
  15. vrchatapi/api/miscellaneous_api.py +2384 -0
  16. vrchatapi/api/notifications_api.py +3624 -0
  17. vrchatapi/api/playermoderation_api.py +1127 -0
  18. vrchatapi/api/prints_api.py +1478 -0
  19. vrchatapi/api/props_api.py +2269 -0
  20. vrchatapi/api/users_api.py +7894 -0
  21. vrchatapi/api/worlds_api.py +6153 -0
  22. vrchatapi/api_client.py +865 -0
  23. vrchatapi/api_response.py +21 -0
  24. vrchatapi/configuration.py +686 -0
  25. vrchatapi/exceptions.py +218 -0
  26. vrchatapi/models/__init__.py +345 -0
  27. vrchatapi/models/account_deletion_log.py +253 -0
  28. vrchatapi/models/add_favorite_request.py +246 -0
  29. vrchatapi/models/add_group_gallery_image_request.py +234 -0
  30. vrchatapi/models/admin_asset_bundle.py +337 -0
  31. vrchatapi/models/admin_unity_package.py +261 -0
  32. vrchatapi/models/age_verification_status.py +38 -0
  33. vrchatapi/models/agreement.py +280 -0
  34. vrchatapi/models/agreement_code.py +36 -0
  35. vrchatapi/models/agreement_request.py +256 -0
  36. vrchatapi/models/agreement_status.py +261 -0
  37. vrchatapi/models/api_config.py +1299 -0
  38. vrchatapi/models/api_config_access_logs_urls.py +258 -0
  39. vrchatapi/models/api_config_announcement.py +217 -0
  40. vrchatapi/models/api_config_audio_config.py +311 -0
  41. vrchatapi/models/api_config_avatar_perf_limiter.py +293 -0
  42. vrchatapi/models/api_config_constants.py +262 -0
  43. vrchatapi/models/api_config_constants_groups.py +306 -0
  44. vrchatapi/models/api_config_constants_instance.py +238 -0
  45. vrchatapi/models/api_config_constants_instancepopulationbrackets.py +262 -0
  46. vrchatapi/models/api_config_constants_instancepopulationbracketscrowded.py +216 -0
  47. vrchatapi/models/api_config_constants_instancepopulationbracketsfew.py +216 -0
  48. vrchatapi/models/api_config_constants_instancepopulationbracketsmany.py +216 -0
  49. vrchatapi/models/api_config_constants_language.py +234 -0
  50. vrchatapi/models/api_config_download_url_list.py +258 -0
  51. vrchatapi/models/api_config_events.py +314 -0
  52. vrchatapi/models/api_config_ios_version.py +216 -0
  53. vrchatapi/models/api_config_min_supported_client_build_number.py +348 -0
  54. vrchatapi/models/api_config_offline_analysis.py +216 -0
  55. vrchatapi/models/api_health.py +248 -0
  56. vrchatapi/models/avatar.py +463 -0
  57. vrchatapi/models/avatar_moderation.py +249 -0
  58. vrchatapi/models/avatar_moderation_created.py +248 -0
  59. vrchatapi/models/avatar_moderation_type.py +36 -0
  60. vrchatapi/models/avatar_performance.py +265 -0
  61. vrchatapi/models/avatar_published_listings_inner.py +271 -0
  62. vrchatapi/models/avatar_style.py +239 -0
  63. vrchatapi/models/avatar_styles.py +231 -0
  64. vrchatapi/models/avatar_unity_package_url_object.py +234 -0
  65. vrchatapi/models/badge.py +308 -0
  66. vrchatapi/models/balance.py +247 -0
  67. vrchatapi/models/ban_group_member_request.py +234 -0
  68. vrchatapi/models/boop_request.py +250 -0
  69. vrchatapi/models/calendar_day_of_week.py +42 -0
  70. vrchatapi/models/calendar_event.py +475 -0
  71. vrchatapi/models/calendar_event_access.py +37 -0
  72. vrchatapi/models/calendar_event_category.py +48 -0
  73. vrchatapi/models/calendar_event_discovery.py +247 -0
  74. vrchatapi/models/calendar_event_discovery_inclusion.py +38 -0
  75. vrchatapi/models/calendar_event_discovery_scope.py +38 -0
  76. vrchatapi/models/calendar_event_frequency.py +39 -0
  77. vrchatapi/models/calendar_event_occurrence_kind.py +38 -0
  78. vrchatapi/models/calendar_event_platform.py +38 -0
  79. vrchatapi/models/calendar_event_recurrence.py +261 -0
  80. vrchatapi/models/calendar_event_recurrence_end.py +246 -0
  81. vrchatapi/models/calendar_event_recurrence_end_type.py +37 -0
  82. vrchatapi/models/calendar_event_user_interest.py +251 -0
  83. vrchatapi/models/change_user_tags_request.py +212 -0
  84. vrchatapi/models/change_world_tags_request.py +212 -0
  85. vrchatapi/models/content_filter.py +40 -0
  86. vrchatapi/models/create_avatar_moderation_request.py +243 -0
  87. vrchatapi/models/create_avatar_request.py +324 -0
  88. vrchatapi/models/create_calendar_event_request.py +385 -0
  89. vrchatapi/models/create_file_request.py +251 -0
  90. vrchatapi/models/create_file_version_request.py +259 -0
  91. vrchatapi/models/create_group_announcement_request.py +253 -0
  92. vrchatapi/models/create_group_gallery_request.py +297 -0
  93. vrchatapi/models/create_group_invite_request.py +242 -0
  94. vrchatapi/models/create_group_post_request.py +267 -0
  95. vrchatapi/models/create_group_request.py +295 -0
  96. vrchatapi/models/create_group_role_request.py +255 -0
  97. vrchatapi/models/create_instance_request.py +384 -0
  98. vrchatapi/models/create_jam_submission_request.py +239 -0
  99. vrchatapi/models/create_listing_request.py +285 -0
  100. vrchatapi/models/create_product_request.py +270 -0
  101. vrchatapi/models/create_prop_request.py +308 -0
  102. vrchatapi/models/create_world_request.py +322 -0
  103. vrchatapi/models/current_user.py +909 -0
  104. vrchatapi/models/current_user_platform_history_inner.py +245 -0
  105. vrchatapi/models/current_user_presence.py +379 -0
  106. vrchatapi/models/decline_group_invite_request.py +211 -0
  107. vrchatapi/models/developer_type.py +39 -0
  108. vrchatapi/models/disable2_fa_result.py +211 -0
  109. vrchatapi/models/discord_details.py +216 -0
  110. vrchatapi/models/dynamic_content_row.py +276 -0
  111. vrchatapi/models/earnings_metrics.py +248 -0
  112. vrchatapi/models/earnings_metrics_totals.py +267 -0
  113. vrchatapi/models/economy_account.py +360 -0
  114. vrchatapi/models/economy_balances.py +221 -0
  115. vrchatapi/models/economy_payout.py +385 -0
  116. vrchatapi/models/economy_payout_eligibility.py +263 -0
  117. vrchatapi/models/economy_payout_list.py +219 -0
  118. vrchatapi/models/economy_payout_status.py +295 -0
  119. vrchatapi/models/equip_inventory_item_request.py +235 -0
  120. vrchatapi/models/error.py +215 -0
  121. vrchatapi/models/favorite.py +251 -0
  122. vrchatapi/models/favorite_group.py +278 -0
  123. vrchatapi/models/favorite_group_limits.py +249 -0
  124. vrchatapi/models/favorite_group_visibility.py +38 -0
  125. vrchatapi/models/favorite_limits.py +265 -0
  126. vrchatapi/models/favorite_type.py +39 -0
  127. vrchatapi/models/favorited_world.py +441 -0
  128. vrchatapi/models/feedback.py +331 -0
  129. vrchatapi/models/file.py +325 -0
  130. vrchatapi/models/file_analysis.py +281 -0
  131. vrchatapi/models/file_analysis_avatar_stats.py +575 -0
  132. vrchatapi/models/file_data.py +279 -0
  133. vrchatapi/models/file_status.py +39 -0
  134. vrchatapi/models/file_upload_url.py +212 -0
  135. vrchatapi/models/file_version.py +254 -0
  136. vrchatapi/models/file_version_upload_status.py +269 -0
  137. vrchatapi/models/finish_file_data_upload_request.py +248 -0
  138. vrchatapi/models/follow_calendar_event_request.py +234 -0
  139. vrchatapi/models/friend_status.py +250 -0
  140. vrchatapi/models/get_group_posts200_response.py +219 -0
  141. vrchatapi/models/get_user_group_instances200_response.py +248 -0
  142. vrchatapi/models/group.py +514 -0
  143. vrchatapi/models/group_access_type.py +38 -0
  144. vrchatapi/models/group_announcement.py +315 -0
  145. vrchatapi/models/group_audit_log_entry.py +287 -0
  146. vrchatapi/models/group_gallery.py +319 -0
  147. vrchatapi/models/group_gallery_file_order.py +211 -0
  148. vrchatapi/models/group_gallery_file_order_request.py +239 -0
  149. vrchatapi/models/group_gallery_image.py +301 -0
  150. vrchatapi/models/group_instance.py +257 -0
  151. vrchatapi/models/group_join_request_action.py +37 -0
  152. vrchatapi/models/group_join_state.py +39 -0
  153. vrchatapi/models/group_member.py +415 -0
  154. vrchatapi/models/group_member_limited_user.py +290 -0
  155. vrchatapi/models/group_member_status.py +41 -0
  156. vrchatapi/models/group_my_member.py +399 -0
  157. vrchatapi/models/group_permission.py +260 -0
  158. vrchatapi/models/group_permissions.py +63 -0
  159. vrchatapi/models/group_post.py +317 -0
  160. vrchatapi/models/group_post_visibility.py +37 -0
  161. vrchatapi/models/group_privacy.py +37 -0
  162. vrchatapi/models/group_role.py +309 -0
  163. vrchatapi/models/group_role_template.py +39 -0
  164. vrchatapi/models/group_role_template_values.py +254 -0
  165. vrchatapi/models/group_role_template_values_roles.py +253 -0
  166. vrchatapi/models/group_search_sort.py +37 -0
  167. vrchatapi/models/group_transferable.py +215 -0
  168. vrchatapi/models/group_transferable_requirements.py +266 -0
  169. vrchatapi/models/group_user_visibility.py +38 -0
  170. vrchatapi/models/image_animation_style.py +62 -0
  171. vrchatapi/models/image_loop_style.py +37 -0
  172. vrchatapi/models/image_mask.py +41 -0
  173. vrchatapi/models/image_purpose.py +46 -0
  174. vrchatapi/models/info_push.py +306 -0
  175. vrchatapi/models/info_push_data.py +288 -0
  176. vrchatapi/models/info_push_data_article.py +215 -0
  177. vrchatapi/models/info_push_data_article_content.py +251 -0
  178. vrchatapi/models/info_push_data_clickable.py +224 -0
  179. vrchatapi/models/instance.py +597 -0
  180. vrchatapi/models/instance_content_settings.py +236 -0
  181. vrchatapi/models/instance_platforms.py +222 -0
  182. vrchatapi/models/instance_region.py +40 -0
  183. vrchatapi/models/instance_short_name_response.py +248 -0
  184. vrchatapi/models/instance_type.py +40 -0
  185. vrchatapi/models/inventory.py +247 -0
  186. vrchatapi/models/inventory_consumption_results.py +255 -0
  187. vrchatapi/models/inventory_default_attributes_value.py +243 -0
  188. vrchatapi/models/inventory_default_attributes_value_validator.py +211 -0
  189. vrchatapi/models/inventory_drop.py +331 -0
  190. vrchatapi/models/inventory_equip_slot.py +39 -0
  191. vrchatapi/models/inventory_flag.py +43 -0
  192. vrchatapi/models/inventory_item.py +420 -0
  193. vrchatapi/models/inventory_item_type.py +42 -0
  194. vrchatapi/models/inventory_metadata.py +287 -0
  195. vrchatapi/models/inventory_notification_details.py +244 -0
  196. vrchatapi/models/inventory_spawn.py +216 -0
  197. vrchatapi/models/inventory_template.py +351 -0
  198. vrchatapi/models/inventory_user_attributes.py +250 -0
  199. vrchatapi/models/invite_message.py +276 -0
  200. vrchatapi/models/invite_message_type.py +39 -0
  201. vrchatapi/models/invite_request.py +243 -0
  202. vrchatapi/models/invite_response.py +235 -0
  203. vrchatapi/models/jam.py +302 -0
  204. vrchatapi/models/jam_state_change_dates.py +276 -0
  205. vrchatapi/models/jam_submission.py +275 -0
  206. vrchatapi/models/join_group_request.py +234 -0
  207. vrchatapi/models/license.py +261 -0
  208. vrchatapi/models/license_action.py +37 -0
  209. vrchatapi/models/license_group.py +235 -0
  210. vrchatapi/models/license_type.py +39 -0
  211. vrchatapi/models/limited_group.py +377 -0
  212. vrchatapi/models/limited_unity_package.py +251 -0
  213. vrchatapi/models/limited_user_friend.py +399 -0
  214. vrchatapi/models/limited_user_groups.py +386 -0
  215. vrchatapi/models/limited_user_instance.py +430 -0
  216. vrchatapi/models/limited_user_search.py +395 -0
  217. vrchatapi/models/limited_world.py +410 -0
  218. vrchatapi/models/mime_type.py +50 -0
  219. vrchatapi/models/model_print.py +299 -0
  220. vrchatapi/models/moderate_user_request.py +217 -0
  221. vrchatapi/models/moderation_report.py +296 -0
  222. vrchatapi/models/mutual_friend.py +302 -0
  223. vrchatapi/models/mutuals.py +217 -0
  224. vrchatapi/models/notification.py +283 -0
  225. vrchatapi/models/notification_detail_invite.py +250 -0
  226. vrchatapi/models/notification_detail_invite_response.py +242 -0
  227. vrchatapi/models/notification_detail_request_invite.py +239 -0
  228. vrchatapi/models/notification_detail_request_invite_response.py +242 -0
  229. vrchatapi/models/notification_detail_vote_to_kick.py +242 -0
  230. vrchatapi/models/notification_type.py +43 -0
  231. vrchatapi/models/notification_v2.py +466 -0
  232. vrchatapi/models/notification_v2_details_boop.py +255 -0
  233. vrchatapi/models/notification_v2_response.py +259 -0
  234. vrchatapi/models/notification_v2_type.py +58 -0
  235. vrchatapi/models/ok_status.py +211 -0
  236. vrchatapi/models/ok_status2.py +234 -0
  237. vrchatapi/models/order_option.py +37 -0
  238. vrchatapi/models/order_option_short.py +37 -0
  239. vrchatapi/models/paginated_calendar_event_list.py +255 -0
  240. vrchatapi/models/paginated_group_audit_log_entry_list.py +255 -0
  241. vrchatapi/models/paginated_moderation_report_list.py +255 -0
  242. vrchatapi/models/past_display_name.py +241 -0
  243. vrchatapi/models/pending2_fa_result.py +239 -0
  244. vrchatapi/models/performance_limiter_info.py +234 -0
  245. vrchatapi/models/performance_ratings.py +41 -0
  246. vrchatapi/models/permission.py +280 -0
  247. vrchatapi/models/permission_data.py +258 -0
  248. vrchatapi/models/platform_build_info.py +242 -0
  249. vrchatapi/models/player_moderation.py +276 -0
  250. vrchatapi/models/player_moderation_type.py +44 -0
  251. vrchatapi/models/print_files.py +239 -0
  252. vrchatapi/models/private_profile.py +267 -0
  253. vrchatapi/models/private_profile_activity.py +292 -0
  254. vrchatapi/models/product.py +389 -0
  255. vrchatapi/models/product_listing.py +538 -0
  256. vrchatapi/models/product_listing_type.py +39 -0
  257. vrchatapi/models/product_listing_variant.py +272 -0
  258. vrchatapi/models/product_purchase.py +571 -0
  259. vrchatapi/models/product_purchase_history.py +256 -0
  260. vrchatapi/models/product_purchase_location_type.py +46 -0
  261. vrchatapi/models/product_purchase_product.py +269 -0
  262. vrchatapi/models/product_purchase_purchase_context.py +250 -0
  263. vrchatapi/models/product_purchase_record.py +312 -0
  264. vrchatapi/models/product_type.py +39 -0
  265. vrchatapi/models/profile_represented_group.py +262 -0
  266. vrchatapi/models/prop.py +358 -0
  267. vrchatapi/models/prop_publish_status.py +234 -0
  268. vrchatapi/models/prop_unity_package.py +269 -0
  269. vrchatapi/models/public_profile.py +398 -0
  270. vrchatapi/models/purchase_context_data.py +251 -0
  271. vrchatapi/models/purchase_product_listing_request.py +281 -0
  272. vrchatapi/models/region.py +42 -0
  273. vrchatapi/models/register_user_account_request.py +278 -0
  274. vrchatapi/models/release_status.py +39 -0
  275. vrchatapi/models/report_category.py +226 -0
  276. vrchatapi/models/report_reason.py +216 -0
  277. vrchatapi/models/represented_group.py +348 -0
  278. vrchatapi/models/request_invite_request.py +235 -0
  279. vrchatapi/models/respond_group_join_request.py +217 -0
  280. vrchatapi/models/respond_notification_v2_request.py +242 -0
  281. vrchatapi/models/response.py +217 -0
  282. vrchatapi/models/reward_badge.py +308 -0
  283. vrchatapi/models/reward_redemption.py +220 -0
  284. vrchatapi/models/reward_redemption_data.py +224 -0
  285. vrchatapi/models/reward_redemption_request.py +211 -0
  286. vrchatapi/models/reward_redemption_result.py +250 -0
  287. vrchatapi/models/search_group_members200_response.py +224 -0
  288. vrchatapi/models/seller_eligibility.py +211 -0
  289. vrchatapi/models/sent_notification.py +278 -0
  290. vrchatapi/models/service_queue_stats.py +234 -0
  291. vrchatapi/models/service_status.py +281 -0
  292. vrchatapi/models/share_inventory_item_direct_request.py +239 -0
  293. vrchatapi/models/sort_option.py +53 -0
  294. vrchatapi/models/sort_option_product_purchase.py +36 -0
  295. vrchatapi/models/store.py +372 -0
  296. vrchatapi/models/store_context.py +249 -0
  297. vrchatapi/models/store_shelf.py +304 -0
  298. vrchatapi/models/store_type.py +38 -0
  299. vrchatapi/models/store_view.py +40 -0
  300. vrchatapi/models/submit_moderation_report_request.py +263 -0
  301. vrchatapi/models/submit_moderation_report_request_details.py +283 -0
  302. vrchatapi/models/subscription.py +301 -0
  303. vrchatapi/models/subscription_period.py +40 -0
  304. vrchatapi/models/success.py +215 -0
  305. vrchatapi/models/success_flag.py +211 -0
  306. vrchatapi/models/tilia_kyc.py +246 -0
  307. vrchatapi/models/tilia_status.py +259 -0
  308. vrchatapi/models/tilia_tos.py +211 -0
  309. vrchatapi/models/token_bundle.py +286 -0
  310. vrchatapi/models/transaction.py +322 -0
  311. vrchatapi/models/transaction_agreement.py +353 -0
  312. vrchatapi/models/transaction_status.py +39 -0
  313. vrchatapi/models/transaction_steam_info.py +271 -0
  314. vrchatapi/models/transaction_steam_wallet_info.py +227 -0
  315. vrchatapi/models/transfer_group_request.py +234 -0
  316. vrchatapi/models/tutorial_status.py +255 -0
  317. vrchatapi/models/two_factor_auth_code.py +211 -0
  318. vrchatapi/models/two_factor_email_code.py +211 -0
  319. vrchatapi/models/two_factor_recovery_codes.py +247 -0
  320. vrchatapi/models/two_factor_recovery_codes_otp_inner.py +216 -0
  321. vrchatapi/models/unity_package.py +360 -0
  322. vrchatapi/models/update_asset_review_notes_request.py +234 -0
  323. vrchatapi/models/update_avatar_request.py +293 -0
  324. vrchatapi/models/update_calendar_event_request.py +365 -0
  325. vrchatapi/models/update_favorite_group_request.py +246 -0
  326. vrchatapi/models/update_group_gallery_request.py +297 -0
  327. vrchatapi/models/update_group_member_request.py +256 -0
  328. vrchatapi/models/update_group_representation_request.py +234 -0
  329. vrchatapi/models/update_group_request.py +300 -0
  330. vrchatapi/models/update_group_role_request.py +255 -0
  331. vrchatapi/models/update_inventory_item_request.py +254 -0
  332. vrchatapi/models/update_invite_message_request.py +211 -0
  333. vrchatapi/models/update_listing_request.py +211 -0
  334. vrchatapi/models/update_product_request.py +261 -0
  335. vrchatapi/models/update_prop_request.py +303 -0
  336. vrchatapi/models/update_tilia_tos_request.py +211 -0
  337. vrchatapi/models/update_user_badge_request.py +216 -0
  338. vrchatapi/models/update_user_note_request.py +239 -0
  339. vrchatapi/models/update_user_request.py +358 -0
  340. vrchatapi/models/update_world_request.py +317 -0
  341. vrchatapi/models/user.py +549 -0
  342. vrchatapi/models/user_credits_eligible.py +216 -0
  343. vrchatapi/models/user_exists.py +242 -0
  344. vrchatapi/models/user_note.py +273 -0
  345. vrchatapi/models/user_note_target_user.py +277 -0
  346. vrchatapi/models/user_state.py +38 -0
  347. vrchatapi/models/user_status.py +40 -0
  348. vrchatapi/models/user_subscription.py +330 -0
  349. vrchatapi/models/user_subscription_eligible.py +274 -0
  350. vrchatapi/models/verify2_fa_email_code_result.py +211 -0
  351. vrchatapi/models/verify2_fa_result.py +216 -0
  352. vrchatapi/models/verify_auth_token_result.py +217 -0
  353. vrchatapi/models/world.py +459 -0
  354. vrchatapi/models/world_metadata.py +216 -0
  355. vrchatapi/models/world_publish_status.py +234 -0
  356. vrchatapi/py.typed +0 -0
  357. vrchatapi/rest.py +303 -0
  358. vrchatapi_async-1.20.8.dev1.dist-info/METADATA +137 -0
  359. vrchatapi_async-1.20.8.dev1.dist-info/RECORD +362 -0
  360. vrchatapi_async-1.20.8.dev1.dist-info/WHEEL +5 -0
  361. vrchatapi_async-1.20.8.dev1.dist-info/licenses/LICENSE +21 -0
  362. vrchatapi_async-1.20.8.dev1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,331 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ VRChat API Documentation
5
+
6
+
7
+ The version of the OpenAPI document: 1.20.8
8
+ Contact: vrchatapi.lpv0t@aries.fyi
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from collections.abc import Mapping as _Mapping
21
+ from pydantic import AliasChoices, BaseModel, ConfigDict, Field, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional, cast as _cast
23
+ from typing_extensions import Annotated
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+ from pydantic_core import to_jsonable_python
27
+
28
+
29
+ _OPENAPI_GENERATOR_TO_DICT = "_openapi_generator_to_dict"
30
+
31
+
32
+ def _get_openapi_to_dict(value: Any) -> Any:
33
+ # Reciprocal function references preserve inherited generated methods
34
+ # without reserving model member names. Checking both directions also
35
+ # rejects overrides whose decorators copy function attributes.
36
+ to_dict = getattr(value, "to_dict", None)
37
+ type_to_dict = getattr(type(value), "to_dict", None)
38
+ if (
39
+ not callable(to_dict)
40
+ or getattr(to_dict, "__func__", None) is not type_to_dict
41
+ ):
42
+ return None
43
+
44
+ openapi_to_dict = getattr(
45
+ type_to_dict, _OPENAPI_GENERATOR_TO_DICT, None
46
+ )
47
+ if (
48
+ not callable(openapi_to_dict)
49
+ or getattr(
50
+ openapi_to_dict,
51
+ _OPENAPI_GENERATOR_TO_DICT,
52
+ None,
53
+ ) is not type_to_dict
54
+ ):
55
+ return None
56
+ return openapi_to_dict
57
+
58
+
59
+ def _to_legacy_item(value: Any, serialize: bool) -> Any:
60
+ to_dict = getattr(value, "to_dict", None)
61
+ if _get_openapi_to_dict(value) is not None and callable(to_dict):
62
+ return to_dict(serialize=serialize)
63
+ if callable(to_dict):
64
+ return to_dict()
65
+ return value
66
+
67
+
68
+ def _to_legacy_value(value: Any, serialize: bool) -> Any:
69
+ # python-legacy converted only immediate list elements or dictionary values:
70
+ # https://github.com/OpenAPITools/openapi-generator/blob/c84b949df1a9ec04ba75989cb49b45c940c2f694/modules/openapi-generator/src/main/resources/python-legacy/model.mustache#L203-L231
71
+ if isinstance(value, list):
72
+ return [_to_legacy_item(item, serialize) for item in value]
73
+ if isinstance(value, dict):
74
+ return {
75
+ key: _to_legacy_item(item, serialize)
76
+ for key, item in value.items()
77
+ }
78
+ return _to_legacy_item(value, serialize)
79
+
80
+
81
+ def _to_openapi_value(value: Any) -> Any:
82
+ if isinstance(value, list):
83
+ return [_to_openapi_value(item) for item in value]
84
+ if isinstance(value, dict):
85
+ return {key: _to_openapi_value(item) for key, item in value.items()}
86
+
87
+ to_openapi_dict = _get_openapi_to_dict(value)
88
+ if to_openapi_dict is not None:
89
+ return to_openapi_dict(value)
90
+
91
+ to_dict = getattr(value, "to_dict", None)
92
+ if callable(to_dict):
93
+ return to_dict()
94
+ return value
95
+
96
+
97
+ class Feedback(BaseModel):
98
+ """
99
+ Feedback
100
+
101
+ Attributes:
102
+ openapi_types (dict): The key is attribute name
103
+ and the value is attribute type.
104
+ attribute_map (dict): The key is attribute name
105
+ and the value is json key in definition.
106
+ """ # noqa: E501
107
+ commenter_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("commenterId", "commenter_id"), serialization_alias="commenterId", description="A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.", json_schema_extra={"examples": ["usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469"]})
108
+ commenter_name: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("commenterName", "commenter_name"), serialization_alias="commenterName")
109
+ content_author_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("contentAuthorId", "content_author_id"), serialization_alias="contentAuthorId", description="A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.", json_schema_extra={"examples": ["usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469"]})
110
+ content_author_name: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("contentAuthorName", "content_author_name"), serialization_alias="contentAuthorName")
111
+ content_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("contentId", "content_id"), serialization_alias="contentId")
112
+ content_name: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("contentName", "content_name"), serialization_alias="contentName")
113
+ content_type: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("contentType", "content_type"), serialization_alias="contentType")
114
+ content_version: Optional[StrictInt] = Field(default=None, validation_alias=AliasChoices("contentVersion", "content_version"), serialization_alias="contentVersion")
115
+ description: Optional[StrictStr] = None
116
+ id: Optional[StrictStr] = Field(default=None, json_schema_extra={"examples": ["feedback_8cffb23a-f961-444e-b496-0196d1c90adb"]})
117
+ reason: Optional[StrictStr] = None
118
+ tags: Optional[List[Annotated[str, Field(min_length=1, strict=True)]]] = None
119
+ type: Optional[StrictStr] = None
120
+ openapi_types: ClassVar[Dict[str, str]] = {
121
+ "commenter_id": "str",
122
+ "commenter_name": "str",
123
+ "content_author_id": "str",
124
+ "content_author_name": "str",
125
+ "content_id": "str",
126
+ "content_name": "str",
127
+ "content_type": "str",
128
+ "content_version": "int",
129
+ "description": "str",
130
+ "id": "str",
131
+ "reason": "str",
132
+ "tags": "List[str]",
133
+ "type": "str"
134
+ }
135
+
136
+ attribute_map: ClassVar[Dict[str, str]] = {
137
+ "commenter_id": "commenterId",
138
+ "commenter_name": "commenterName",
139
+ "content_author_id": "contentAuthorId",
140
+ "content_author_name": "contentAuthorName",
141
+ "content_id": "contentId",
142
+ "content_name": "contentName",
143
+ "content_type": "contentType",
144
+ "content_version": "contentVersion",
145
+ "description": "description",
146
+ "id": "id",
147
+ "reason": "reason",
148
+ "tags": "tags",
149
+ "type": "type"
150
+ }
151
+ __properties: ClassVar[List[str]] = ["commenterId", "commenterName", "contentAuthorId", "contentAuthorName", "contentId", "contentName", "contentType", "contentVersion", "description", "id", "reason", "tags", "type"]
152
+
153
+ @classmethod
154
+ def __preprocess_input_names(
155
+ cls,
156
+ obj: Any,
157
+ remove_hidden_storage_names: bool = True,
158
+ ) -> Any:
159
+ if not isinstance(obj, _Mapping):
160
+ return obj
161
+ obj = dict(obj)
162
+ if "commenterId" not in obj and "commenter_id" in obj:
163
+ obj["commenterId"] = obj["commenter_id"]
164
+ obj.pop("commenter_id", None)
165
+ if "commenterName" not in obj and "commenter_name" in obj:
166
+ obj["commenterName"] = obj["commenter_name"]
167
+ obj.pop("commenter_name", None)
168
+ if "contentAuthorId" not in obj and "content_author_id" in obj:
169
+ obj["contentAuthorId"] = obj["content_author_id"]
170
+ obj.pop("content_author_id", None)
171
+ if "contentAuthorName" not in obj and "content_author_name" in obj:
172
+ obj["contentAuthorName"] = obj["content_author_name"]
173
+ obj.pop("content_author_name", None)
174
+ if "contentId" not in obj and "content_id" in obj:
175
+ obj["contentId"] = obj["content_id"]
176
+ obj.pop("content_id", None)
177
+ if "contentName" not in obj and "content_name" in obj:
178
+ obj["contentName"] = obj["content_name"]
179
+ obj.pop("content_name", None)
180
+ if "contentType" not in obj and "content_type" in obj:
181
+ obj["contentType"] = obj["content_type"]
182
+ obj.pop("content_type", None)
183
+ if "contentVersion" not in obj and "content_version" in obj:
184
+ obj["contentVersion"] = obj["content_version"]
185
+ obj.pop("content_version", None)
186
+ return obj
187
+
188
+ model_config = ConfigDict(
189
+ validate_by_name=True,
190
+ validate_by_alias=True,
191
+ validate_assignment=True,
192
+ extra="forbid",
193
+ protected_namespaces=(),
194
+ )
195
+
196
+
197
+ def to_str(self) -> str:
198
+ """Returns the string representation of the model"""
199
+ return pprint.pformat(self.to_dict())
200
+
201
+ def __repr__(self) -> str:
202
+ """For print and pprint"""
203
+ return self.to_str()
204
+
205
+ def __eq__(self, other: object) -> bool:
206
+ """Returns true if both objects are equal"""
207
+ if not isinstance(other, Feedback):
208
+ return False
209
+
210
+ return self.to_dict() == other.to_dict()
211
+
212
+ def __ne__(self, other: object) -> bool:
213
+ """Returns true if both objects are not equal"""
214
+ if not isinstance(other, Feedback):
215
+ return True
216
+
217
+ return not (self == other)
218
+
219
+
220
+ def to_json(self) -> str:
221
+ """Returns the JSON representation of the model using alias"""
222
+ to_openapi_dict = _get_openapi_to_dict(self)
223
+ if to_openapi_dict is not None:
224
+ return json.dumps(to_jsonable_python(to_openapi_dict(self)))
225
+ return json.dumps(to_jsonable_python(self.to_dict()))
226
+
227
+ @classmethod
228
+ def from_json(cls, json_str: str) -> Optional[Self]:
229
+ """Create an instance of Feedback from a JSON string"""
230
+ return cls.from_dict(json.loads(json_str))
231
+
232
+ def to_dict(self, serialize: bool = False) -> Dict[str, Any]:
233
+ """Return all declared model fields using public or wire names."""
234
+ return {
235
+ ("commenterId" if serialize else "commenter_id"): _to_legacy_value(getattr(self, "commenter_id", None), serialize),
236
+ ("commenterName" if serialize else "commenter_name"): _to_legacy_value(getattr(self, "commenter_name", None), serialize),
237
+ ("contentAuthorId" if serialize else "content_author_id"): _to_legacy_value(getattr(self, "content_author_id", None), serialize),
238
+ ("contentAuthorName" if serialize else "content_author_name"): _to_legacy_value(getattr(self, "content_author_name", None), serialize),
239
+ ("contentId" if serialize else "content_id"): _to_legacy_value(getattr(self, "content_id", None), serialize),
240
+ ("contentName" if serialize else "content_name"): _to_legacy_value(getattr(self, "content_name", None), serialize),
241
+ ("contentType" if serialize else "content_type"): _to_legacy_value(getattr(self, "content_type", None), serialize),
242
+ ("contentVersion" if serialize else "content_version"): _to_legacy_value(getattr(self, "content_version", None), serialize),
243
+ ("description" if serialize else "description"): _to_legacy_value(getattr(self, "description", None), serialize),
244
+ ("id" if serialize else "id"): _to_legacy_value(getattr(self, "id", None), serialize),
245
+ ("reason" if serialize else "reason"): _to_legacy_value(getattr(self, "reason", None), serialize),
246
+ ("tags" if serialize else "tags"): _to_legacy_value(getattr(self, "tags", None), serialize),
247
+ ("type" if serialize else "type"): _to_legacy_value(getattr(self, "type", None), serialize),
248
+ }
249
+
250
+ def __openapi_generator_modern_projection(self) -> Dict[str, Any]:
251
+ """Return the dictionary representation of the model using alias.
252
+
253
+ This has the following differences from calling pydantic's
254
+ `self.model_dump(by_alias=True)`:
255
+
256
+ * `None` is only added to the output dict for nullable fields that
257
+ were set at model initialization. Other fields with value `None`
258
+ are ignored.
259
+ """
260
+ excluded_fields: Set[str] = set([
261
+ ])
262
+
263
+ _dict = self.model_dump(
264
+ by_alias=True,
265
+ exclude=excluded_fields,
266
+ exclude_none=True,
267
+ )
268
+ # set to None if content_author_name (nullable) is None
269
+ # and model_fields_set contains the field
270
+ if self.content_author_name is None and "content_author_name" in self.model_fields_set:
271
+ _dict['contentAuthorName'] = None
272
+
273
+ # set to None if content_version (nullable) is None
274
+ # and model_fields_set contains the field
275
+ if self.content_version is None and "content_version" in self.model_fields_set:
276
+ _dict['contentVersion'] = None
277
+
278
+ # set to None if description (nullable) is None
279
+ # and model_fields_set contains the field
280
+ if self.description is None and "description" in self.model_fields_set:
281
+ _dict['description'] = None
282
+
283
+ return _dict
284
+
285
+ setattr(
286
+ to_dict,
287
+ _OPENAPI_GENERATOR_TO_DICT,
288
+ __openapi_generator_modern_projection,
289
+ )
290
+ setattr(
291
+ __openapi_generator_modern_projection,
292
+ _OPENAPI_GENERATOR_TO_DICT,
293
+ to_dict,
294
+ )
295
+ del __openapi_generator_modern_projection
296
+
297
+ @classmethod
298
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
299
+ """Create an instance of Feedback from a dict"""
300
+ if obj is None:
301
+ return None
302
+
303
+ if not isinstance(obj, dict):
304
+ return cls.model_validate(obj)
305
+
306
+ obj = _cast(
307
+ Dict[str, Any],
308
+ cls.__preprocess_input_names(
309
+ obj,
310
+ remove_hidden_storage_names=True,
311
+ ),
312
+ )
313
+
314
+ _obj = cls.model_validate({
315
+ "commenterId": obj.get("commenterId"),
316
+ "commenterName": obj.get("commenterName"),
317
+ "contentAuthorId": obj.get("contentAuthorId"),
318
+ "contentAuthorName": obj.get("contentAuthorName"),
319
+ "contentId": obj.get("contentId"),
320
+ "contentName": obj.get("contentName"),
321
+ "contentType": obj.get("contentType"),
322
+ "contentVersion": obj.get("contentVersion"),
323
+ "description": obj.get("description"),
324
+ "id": obj.get("id"),
325
+ "reason": obj.get("reason"),
326
+ "tags": obj.get("tags"),
327
+ "type": obj.get("type")
328
+ })
329
+ return _obj
330
+
331
+
@@ -0,0 +1,325 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ VRChat API Documentation
5
+
6
+
7
+ The version of the OpenAPI document: 1.20.8
8
+ Contact: vrchatapi.lpv0t@aries.fyi
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from collections.abc import Mapping as _Mapping
21
+ from pydantic import AliasChoices, BaseModel, ConfigDict, Field, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional, cast as _cast
23
+ from typing_extensions import Annotated
24
+ from vrchatapi.models.file_version import FileVersion
25
+ from vrchatapi.models.image_animation_style import ImageAnimationStyle
26
+ from vrchatapi.models.image_loop_style import ImageLoopStyle
27
+ from vrchatapi.models.image_mask import ImageMask
28
+ from vrchatapi.models.mime_type import MIMEType
29
+ from typing import Optional, Set
30
+ from typing_extensions import Self
31
+ from pydantic_core import to_jsonable_python
32
+
33
+
34
+ _OPENAPI_GENERATOR_TO_DICT = "_openapi_generator_to_dict"
35
+
36
+
37
+ def _get_openapi_to_dict(value: Any) -> Any:
38
+ # Reciprocal function references preserve inherited generated methods
39
+ # without reserving model member names. Checking both directions also
40
+ # rejects overrides whose decorators copy function attributes.
41
+ to_dict = getattr(value, "to_dict", None)
42
+ type_to_dict = getattr(type(value), "to_dict", None)
43
+ if (
44
+ not callable(to_dict)
45
+ or getattr(to_dict, "__func__", None) is not type_to_dict
46
+ ):
47
+ return None
48
+
49
+ openapi_to_dict = getattr(
50
+ type_to_dict, _OPENAPI_GENERATOR_TO_DICT, None
51
+ )
52
+ if (
53
+ not callable(openapi_to_dict)
54
+ or getattr(
55
+ openapi_to_dict,
56
+ _OPENAPI_GENERATOR_TO_DICT,
57
+ None,
58
+ ) is not type_to_dict
59
+ ):
60
+ return None
61
+ return openapi_to_dict
62
+
63
+
64
+ def _to_legacy_item(value: Any, serialize: bool) -> Any:
65
+ to_dict = getattr(value, "to_dict", None)
66
+ if _get_openapi_to_dict(value) is not None and callable(to_dict):
67
+ return to_dict(serialize=serialize)
68
+ if callable(to_dict):
69
+ return to_dict()
70
+ return value
71
+
72
+
73
+ def _to_legacy_value(value: Any, serialize: bool) -> Any:
74
+ # python-legacy converted only immediate list elements or dictionary values:
75
+ # https://github.com/OpenAPITools/openapi-generator/blob/c84b949df1a9ec04ba75989cb49b45c940c2f694/modules/openapi-generator/src/main/resources/python-legacy/model.mustache#L203-L231
76
+ if isinstance(value, list):
77
+ return [_to_legacy_item(item, serialize) for item in value]
78
+ if isinstance(value, dict):
79
+ return {
80
+ key: _to_legacy_item(item, serialize)
81
+ for key, item in value.items()
82
+ }
83
+ return _to_legacy_item(value, serialize)
84
+
85
+
86
+ def _to_openapi_value(value: Any) -> Any:
87
+ if isinstance(value, list):
88
+ return [_to_openapi_value(item) for item in value]
89
+ if isinstance(value, dict):
90
+ return {key: _to_openapi_value(item) for key, item in value.items()}
91
+
92
+ to_openapi_dict = _get_openapi_to_dict(value)
93
+ if to_openapi_dict is not None:
94
+ return to_openapi_dict(value)
95
+
96
+ to_dict = getattr(value, "to_dict", None)
97
+ if callable(to_dict):
98
+ return to_dict()
99
+ return value
100
+
101
+
102
+ class File(BaseModel):
103
+ """
104
+
105
+
106
+ Attributes:
107
+ openapi_types (dict): The key is attribute name
108
+ and the value is attribute type.
109
+ attribute_map (dict): The key is attribute name
110
+ and the value is json key in definition.
111
+ """ # noqa: E501
112
+ animation_style: Optional[ImageAnimationStyle] = Field(default=None, validation_alias=AliasChoices("animationStyle", "animation_style"), serialization_alias="animationStyle")
113
+ extension: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, json_schema_extra={"examples": [".unitypackage"]})
114
+ frames: Optional[Annotated[int, Field(le=64, strict=True, ge=2)]] = Field(default=None, description="The number of frames for animated spritesheet images.")
115
+ frames_over_time: Optional[Annotated[int, Field(le=64, strict=True, ge=1)]] = Field(default=None, validation_alias=AliasChoices("framesOverTime", "frames_over_time"), serialization_alias="framesOverTime", description="The frames per second for animated spritesheet images.")
116
+ id: Optional[StrictStr] = Field(default=None, json_schema_extra={"examples": ["file_ce35d830-e20a-4df0-a6d4-5aaef4508044"]})
117
+ loop_style: Optional[ImageLoopStyle] = Field(default=ImageLoopStyle.LINEAR, validation_alias=AliasChoices("loopStyle", "loop_style"), serialization_alias="loopStyle")
118
+ mask_tag: Optional[ImageMask] = Field(default=ImageMask.SQUARE, validation_alias=AliasChoices("maskTag", "mask_tag"), serialization_alias="maskTag")
119
+ mime_type: Optional[MIMEType] = Field(default=None, validation_alias=AliasChoices("mimeType", "mime_type"), serialization_alias="mimeType")
120
+ modified_thumbnail_file_name: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("modifiedThumbnailFileName", "modified_thumbnail_file_name"), serialization_alias="modifiedThumbnailFileName", json_schema_extra={"examples": ["thumbnails/file_00000000-0000-0000-0000-000000000000.ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.1.modified-thumbnail-256.png"]})
121
+ name: Optional[Annotated[str, Field(min_length=0, strict=True)]] = Field(default=None, json_schema_extra={"examples": ["Example File"]})
122
+ owner_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("ownerId", "owner_id"), serialization_alias="ownerId", description="A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.", json_schema_extra={"examples": ["usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469"]})
123
+ tags: Optional[List[Annotated[str, Field(min_length=1, strict=True)]]] = Field(default=None, description=" ")
124
+ versions: Optional[Annotated[List[FileVersion], Field(min_length=1)]] = Field(default=None, description=" ")
125
+ openapi_types: ClassVar[Dict[str, str]] = {
126
+ "animation_style": "ImageAnimationStyle",
127
+ "extension": "str",
128
+ "frames": "int",
129
+ "frames_over_time": "int",
130
+ "id": "str",
131
+ "loop_style": "ImageLoopStyle",
132
+ "mask_tag": "ImageMask",
133
+ "mime_type": "MIMEType",
134
+ "modified_thumbnail_file_name": "str",
135
+ "name": "str",
136
+ "owner_id": "str",
137
+ "tags": "List[str]",
138
+ "versions": "List[FileVersion]"
139
+ }
140
+
141
+ attribute_map: ClassVar[Dict[str, str]] = {
142
+ "animation_style": "animationStyle",
143
+ "extension": "extension",
144
+ "frames": "frames",
145
+ "frames_over_time": "framesOverTime",
146
+ "id": "id",
147
+ "loop_style": "loopStyle",
148
+ "mask_tag": "maskTag",
149
+ "mime_type": "mimeType",
150
+ "modified_thumbnail_file_name": "modifiedThumbnailFileName",
151
+ "name": "name",
152
+ "owner_id": "ownerId",
153
+ "tags": "tags",
154
+ "versions": "versions"
155
+ }
156
+ __properties: ClassVar[List[str]] = ["animationStyle", "extension", "frames", "framesOverTime", "id", "loopStyle", "maskTag", "mimeType", "modifiedThumbnailFileName", "name", "ownerId", "tags", "versions"]
157
+
158
+ @classmethod
159
+ def __preprocess_input_names(
160
+ cls,
161
+ obj: Any,
162
+ remove_hidden_storage_names: bool = True,
163
+ ) -> Any:
164
+ if not isinstance(obj, _Mapping):
165
+ return obj
166
+ obj = dict(obj)
167
+ if "animationStyle" not in obj and "animation_style" in obj:
168
+ obj["animationStyle"] = obj["animation_style"]
169
+ obj.pop("animation_style", None)
170
+ if "framesOverTime" not in obj and "frames_over_time" in obj:
171
+ obj["framesOverTime"] = obj["frames_over_time"]
172
+ obj.pop("frames_over_time", None)
173
+ if "loopStyle" not in obj and "loop_style" in obj:
174
+ obj["loopStyle"] = obj["loop_style"]
175
+ obj.pop("loop_style", None)
176
+ if "maskTag" not in obj and "mask_tag" in obj:
177
+ obj["maskTag"] = obj["mask_tag"]
178
+ obj.pop("mask_tag", None)
179
+ if "mimeType" not in obj and "mime_type" in obj:
180
+ obj["mimeType"] = obj["mime_type"]
181
+ obj.pop("mime_type", None)
182
+ if "modifiedThumbnailFileName" not in obj and "modified_thumbnail_file_name" in obj:
183
+ obj["modifiedThumbnailFileName"] = obj["modified_thumbnail_file_name"]
184
+ obj.pop("modified_thumbnail_file_name", None)
185
+ if "ownerId" not in obj and "owner_id" in obj:
186
+ obj["ownerId"] = obj["owner_id"]
187
+ obj.pop("owner_id", None)
188
+ return obj
189
+
190
+ model_config = ConfigDict(
191
+ validate_by_name=True,
192
+ validate_by_alias=True,
193
+ validate_assignment=True,
194
+ extra="forbid",
195
+ protected_namespaces=(),
196
+ )
197
+
198
+
199
+ def to_str(self) -> str:
200
+ """Returns the string representation of the model"""
201
+ return pprint.pformat(self.to_dict())
202
+
203
+ def __repr__(self) -> str:
204
+ """For print and pprint"""
205
+ return self.to_str()
206
+
207
+ def __eq__(self, other: object) -> bool:
208
+ """Returns true if both objects are equal"""
209
+ if not isinstance(other, File):
210
+ return False
211
+
212
+ return self.to_dict() == other.to_dict()
213
+
214
+ def __ne__(self, other: object) -> bool:
215
+ """Returns true if both objects are not equal"""
216
+ if not isinstance(other, File):
217
+ return True
218
+
219
+ return not (self == other)
220
+
221
+
222
+ def to_json(self) -> str:
223
+ """Returns the JSON representation of the model using alias"""
224
+ to_openapi_dict = _get_openapi_to_dict(self)
225
+ if to_openapi_dict is not None:
226
+ return json.dumps(to_jsonable_python(to_openapi_dict(self)))
227
+ return json.dumps(to_jsonable_python(self.to_dict()))
228
+
229
+ @classmethod
230
+ def from_json(cls, json_str: str) -> Optional[Self]:
231
+ """Create an instance of File from a JSON string"""
232
+ return cls.from_dict(json.loads(json_str))
233
+
234
+ def to_dict(self, serialize: bool = False) -> Dict[str, Any]:
235
+ """Return all declared model fields using public or wire names."""
236
+ return {
237
+ ("animationStyle" if serialize else "animation_style"): _to_legacy_value(getattr(self, "animation_style", None), serialize),
238
+ ("extension" if serialize else "extension"): _to_legacy_value(getattr(self, "extension", None), serialize),
239
+ ("frames" if serialize else "frames"): _to_legacy_value(getattr(self, "frames", None), serialize),
240
+ ("framesOverTime" if serialize else "frames_over_time"): _to_legacy_value(getattr(self, "frames_over_time", None), serialize),
241
+ ("id" if serialize else "id"): _to_legacy_value(getattr(self, "id", None), serialize),
242
+ ("loopStyle" if serialize else "loop_style"): _to_legacy_value(getattr(self, "loop_style", None), serialize),
243
+ ("maskTag" if serialize else "mask_tag"): _to_legacy_value(getattr(self, "mask_tag", None), serialize),
244
+ ("mimeType" if serialize else "mime_type"): _to_legacy_value(getattr(self, "mime_type", None), serialize),
245
+ ("modifiedThumbnailFileName" if serialize else "modified_thumbnail_file_name"): _to_legacy_value(getattr(self, "modified_thumbnail_file_name", None), serialize),
246
+ ("name" if serialize else "name"): _to_legacy_value(getattr(self, "name", None), serialize),
247
+ ("ownerId" if serialize else "owner_id"): _to_legacy_value(getattr(self, "owner_id", None), serialize),
248
+ ("tags" if serialize else "tags"): _to_legacy_value(getattr(self, "tags", None), serialize),
249
+ ("versions" if serialize else "versions"): _to_legacy_value(getattr(self, "versions", None), serialize),
250
+ }
251
+
252
+ def __openapi_generator_modern_projection(self) -> Dict[str, Any]:
253
+ """Return the dictionary representation of the model using alias.
254
+
255
+ This has the following differences from calling pydantic's
256
+ `self.model_dump(by_alias=True)`:
257
+
258
+ * `None` is only added to the output dict for nullable fields that
259
+ were set at model initialization. Other fields with value `None`
260
+ are ignored.
261
+ """
262
+ excluded_fields: Set[str] = set([
263
+ ])
264
+
265
+ _dict = self.model_dump(
266
+ by_alias=True,
267
+ exclude=excluded_fields,
268
+ exclude_none=True,
269
+ )
270
+ # override the default output from pydantic by calling `to_dict()` of each item in versions (list)
271
+ _items = []
272
+ if self.versions:
273
+ for _item_versions in self.versions:
274
+ if _item_versions:
275
+ _items.append(_to_openapi_value(_item_versions))
276
+ _dict['versions'] = _items
277
+ return _dict
278
+
279
+ setattr(
280
+ to_dict,
281
+ _OPENAPI_GENERATOR_TO_DICT,
282
+ __openapi_generator_modern_projection,
283
+ )
284
+ setattr(
285
+ __openapi_generator_modern_projection,
286
+ _OPENAPI_GENERATOR_TO_DICT,
287
+ to_dict,
288
+ )
289
+ del __openapi_generator_modern_projection
290
+
291
+ @classmethod
292
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
293
+ """Create an instance of File from a dict"""
294
+ if obj is None:
295
+ return None
296
+
297
+ if not isinstance(obj, dict):
298
+ return cls.model_validate(obj)
299
+
300
+ obj = _cast(
301
+ Dict[str, Any],
302
+ cls.__preprocess_input_names(
303
+ obj,
304
+ remove_hidden_storage_names=True,
305
+ ),
306
+ )
307
+
308
+ _obj = cls.model_validate({
309
+ "animationStyle": obj.get("animationStyle"),
310
+ "extension": obj.get("extension"),
311
+ "frames": obj.get("frames"),
312
+ "framesOverTime": obj.get("framesOverTime"),
313
+ "id": obj.get("id"),
314
+ "loopStyle": obj.get("loopStyle") if obj.get("loopStyle") is not None else ImageLoopStyle.LINEAR,
315
+ "maskTag": obj.get("maskTag") if obj.get("maskTag") is not None else ImageMask.SQUARE,
316
+ "mimeType": obj.get("mimeType") if obj.get("mimeType") is not None else MIMEType.IMAGE_SLASH_JPEG,
317
+ "modifiedThumbnailFileName": obj.get("modifiedThumbnailFileName"),
318
+ "name": obj.get("name"),
319
+ "ownerId": obj.get("ownerId"),
320
+ "tags": obj.get("tags"),
321
+ "versions": [FileVersion.from_dict(_item) for _item in obj["versions"]] if obj.get("versions") is not None else None
322
+ })
323
+ return _obj
324
+
325
+