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.
- vrchatapi/__init__.py +742 -0
- vrchatapi/api/__init__.py +23 -0
- vrchatapi/api/authentication_api.py +6253 -0
- vrchatapi/api/avatars_api.py +4234 -0
- vrchatapi/api/calendar_api.py +4090 -0
- vrchatapi/api/economy_api.py +11547 -0
- vrchatapi/api/favorites_api.py +2368 -0
- vrchatapi/api/files_api.py +6109 -0
- vrchatapi/api/friends_api.py +1708 -0
- vrchatapi/api/groups_api.py +15085 -0
- vrchatapi/api/instances_api.py +1754 -0
- vrchatapi/api/inventory_api.py +4333 -0
- vrchatapi/api/invite_api.py +3337 -0
- vrchatapi/api/jams_api.py +1446 -0
- vrchatapi/api/miscellaneous_api.py +2384 -0
- vrchatapi/api/notifications_api.py +3624 -0
- vrchatapi/api/playermoderation_api.py +1127 -0
- vrchatapi/api/prints_api.py +1478 -0
- vrchatapi/api/props_api.py +2269 -0
- vrchatapi/api/users_api.py +7894 -0
- vrchatapi/api/worlds_api.py +6153 -0
- vrchatapi/api_client.py +865 -0
- vrchatapi/api_response.py +21 -0
- vrchatapi/configuration.py +686 -0
- vrchatapi/exceptions.py +218 -0
- vrchatapi/models/__init__.py +345 -0
- vrchatapi/models/account_deletion_log.py +253 -0
- vrchatapi/models/add_favorite_request.py +246 -0
- vrchatapi/models/add_group_gallery_image_request.py +234 -0
- vrchatapi/models/admin_asset_bundle.py +337 -0
- vrchatapi/models/admin_unity_package.py +261 -0
- vrchatapi/models/age_verification_status.py +38 -0
- vrchatapi/models/agreement.py +280 -0
- vrchatapi/models/agreement_code.py +36 -0
- vrchatapi/models/agreement_request.py +256 -0
- vrchatapi/models/agreement_status.py +261 -0
- vrchatapi/models/api_config.py +1299 -0
- vrchatapi/models/api_config_access_logs_urls.py +258 -0
- vrchatapi/models/api_config_announcement.py +217 -0
- vrchatapi/models/api_config_audio_config.py +311 -0
- vrchatapi/models/api_config_avatar_perf_limiter.py +293 -0
- vrchatapi/models/api_config_constants.py +262 -0
- vrchatapi/models/api_config_constants_groups.py +306 -0
- vrchatapi/models/api_config_constants_instance.py +238 -0
- vrchatapi/models/api_config_constants_instancepopulationbrackets.py +262 -0
- vrchatapi/models/api_config_constants_instancepopulationbracketscrowded.py +216 -0
- vrchatapi/models/api_config_constants_instancepopulationbracketsfew.py +216 -0
- vrchatapi/models/api_config_constants_instancepopulationbracketsmany.py +216 -0
- vrchatapi/models/api_config_constants_language.py +234 -0
- vrchatapi/models/api_config_download_url_list.py +258 -0
- vrchatapi/models/api_config_events.py +314 -0
- vrchatapi/models/api_config_ios_version.py +216 -0
- vrchatapi/models/api_config_min_supported_client_build_number.py +348 -0
- vrchatapi/models/api_config_offline_analysis.py +216 -0
- vrchatapi/models/api_health.py +248 -0
- vrchatapi/models/avatar.py +463 -0
- vrchatapi/models/avatar_moderation.py +249 -0
- vrchatapi/models/avatar_moderation_created.py +248 -0
- vrchatapi/models/avatar_moderation_type.py +36 -0
- vrchatapi/models/avatar_performance.py +265 -0
- vrchatapi/models/avatar_published_listings_inner.py +271 -0
- vrchatapi/models/avatar_style.py +239 -0
- vrchatapi/models/avatar_styles.py +231 -0
- vrchatapi/models/avatar_unity_package_url_object.py +234 -0
- vrchatapi/models/badge.py +308 -0
- vrchatapi/models/balance.py +247 -0
- vrchatapi/models/ban_group_member_request.py +234 -0
- vrchatapi/models/boop_request.py +250 -0
- vrchatapi/models/calendar_day_of_week.py +42 -0
- vrchatapi/models/calendar_event.py +475 -0
- vrchatapi/models/calendar_event_access.py +37 -0
- vrchatapi/models/calendar_event_category.py +48 -0
- vrchatapi/models/calendar_event_discovery.py +247 -0
- vrchatapi/models/calendar_event_discovery_inclusion.py +38 -0
- vrchatapi/models/calendar_event_discovery_scope.py +38 -0
- vrchatapi/models/calendar_event_frequency.py +39 -0
- vrchatapi/models/calendar_event_occurrence_kind.py +38 -0
- vrchatapi/models/calendar_event_platform.py +38 -0
- vrchatapi/models/calendar_event_recurrence.py +261 -0
- vrchatapi/models/calendar_event_recurrence_end.py +246 -0
- vrchatapi/models/calendar_event_recurrence_end_type.py +37 -0
- vrchatapi/models/calendar_event_user_interest.py +251 -0
- vrchatapi/models/change_user_tags_request.py +212 -0
- vrchatapi/models/change_world_tags_request.py +212 -0
- vrchatapi/models/content_filter.py +40 -0
- vrchatapi/models/create_avatar_moderation_request.py +243 -0
- vrchatapi/models/create_avatar_request.py +324 -0
- vrchatapi/models/create_calendar_event_request.py +385 -0
- vrchatapi/models/create_file_request.py +251 -0
- vrchatapi/models/create_file_version_request.py +259 -0
- vrchatapi/models/create_group_announcement_request.py +253 -0
- vrchatapi/models/create_group_gallery_request.py +297 -0
- vrchatapi/models/create_group_invite_request.py +242 -0
- vrchatapi/models/create_group_post_request.py +267 -0
- vrchatapi/models/create_group_request.py +295 -0
- vrchatapi/models/create_group_role_request.py +255 -0
- vrchatapi/models/create_instance_request.py +384 -0
- vrchatapi/models/create_jam_submission_request.py +239 -0
- vrchatapi/models/create_listing_request.py +285 -0
- vrchatapi/models/create_product_request.py +270 -0
- vrchatapi/models/create_prop_request.py +308 -0
- vrchatapi/models/create_world_request.py +322 -0
- vrchatapi/models/current_user.py +909 -0
- vrchatapi/models/current_user_platform_history_inner.py +245 -0
- vrchatapi/models/current_user_presence.py +379 -0
- vrchatapi/models/decline_group_invite_request.py +211 -0
- vrchatapi/models/developer_type.py +39 -0
- vrchatapi/models/disable2_fa_result.py +211 -0
- vrchatapi/models/discord_details.py +216 -0
- vrchatapi/models/dynamic_content_row.py +276 -0
- vrchatapi/models/earnings_metrics.py +248 -0
- vrchatapi/models/earnings_metrics_totals.py +267 -0
- vrchatapi/models/economy_account.py +360 -0
- vrchatapi/models/economy_balances.py +221 -0
- vrchatapi/models/economy_payout.py +385 -0
- vrchatapi/models/economy_payout_eligibility.py +263 -0
- vrchatapi/models/economy_payout_list.py +219 -0
- vrchatapi/models/economy_payout_status.py +295 -0
- vrchatapi/models/equip_inventory_item_request.py +235 -0
- vrchatapi/models/error.py +215 -0
- vrchatapi/models/favorite.py +251 -0
- vrchatapi/models/favorite_group.py +278 -0
- vrchatapi/models/favorite_group_limits.py +249 -0
- vrchatapi/models/favorite_group_visibility.py +38 -0
- vrchatapi/models/favorite_limits.py +265 -0
- vrchatapi/models/favorite_type.py +39 -0
- vrchatapi/models/favorited_world.py +441 -0
- vrchatapi/models/feedback.py +331 -0
- vrchatapi/models/file.py +325 -0
- vrchatapi/models/file_analysis.py +281 -0
- vrchatapi/models/file_analysis_avatar_stats.py +575 -0
- vrchatapi/models/file_data.py +279 -0
- vrchatapi/models/file_status.py +39 -0
- vrchatapi/models/file_upload_url.py +212 -0
- vrchatapi/models/file_version.py +254 -0
- vrchatapi/models/file_version_upload_status.py +269 -0
- vrchatapi/models/finish_file_data_upload_request.py +248 -0
- vrchatapi/models/follow_calendar_event_request.py +234 -0
- vrchatapi/models/friend_status.py +250 -0
- vrchatapi/models/get_group_posts200_response.py +219 -0
- vrchatapi/models/get_user_group_instances200_response.py +248 -0
- vrchatapi/models/group.py +514 -0
- vrchatapi/models/group_access_type.py +38 -0
- vrchatapi/models/group_announcement.py +315 -0
- vrchatapi/models/group_audit_log_entry.py +287 -0
- vrchatapi/models/group_gallery.py +319 -0
- vrchatapi/models/group_gallery_file_order.py +211 -0
- vrchatapi/models/group_gallery_file_order_request.py +239 -0
- vrchatapi/models/group_gallery_image.py +301 -0
- vrchatapi/models/group_instance.py +257 -0
- vrchatapi/models/group_join_request_action.py +37 -0
- vrchatapi/models/group_join_state.py +39 -0
- vrchatapi/models/group_member.py +415 -0
- vrchatapi/models/group_member_limited_user.py +290 -0
- vrchatapi/models/group_member_status.py +41 -0
- vrchatapi/models/group_my_member.py +399 -0
- vrchatapi/models/group_permission.py +260 -0
- vrchatapi/models/group_permissions.py +63 -0
- vrchatapi/models/group_post.py +317 -0
- vrchatapi/models/group_post_visibility.py +37 -0
- vrchatapi/models/group_privacy.py +37 -0
- vrchatapi/models/group_role.py +309 -0
- vrchatapi/models/group_role_template.py +39 -0
- vrchatapi/models/group_role_template_values.py +254 -0
- vrchatapi/models/group_role_template_values_roles.py +253 -0
- vrchatapi/models/group_search_sort.py +37 -0
- vrchatapi/models/group_transferable.py +215 -0
- vrchatapi/models/group_transferable_requirements.py +266 -0
- vrchatapi/models/group_user_visibility.py +38 -0
- vrchatapi/models/image_animation_style.py +62 -0
- vrchatapi/models/image_loop_style.py +37 -0
- vrchatapi/models/image_mask.py +41 -0
- vrchatapi/models/image_purpose.py +46 -0
- vrchatapi/models/info_push.py +306 -0
- vrchatapi/models/info_push_data.py +288 -0
- vrchatapi/models/info_push_data_article.py +215 -0
- vrchatapi/models/info_push_data_article_content.py +251 -0
- vrchatapi/models/info_push_data_clickable.py +224 -0
- vrchatapi/models/instance.py +597 -0
- vrchatapi/models/instance_content_settings.py +236 -0
- vrchatapi/models/instance_platforms.py +222 -0
- vrchatapi/models/instance_region.py +40 -0
- vrchatapi/models/instance_short_name_response.py +248 -0
- vrchatapi/models/instance_type.py +40 -0
- vrchatapi/models/inventory.py +247 -0
- vrchatapi/models/inventory_consumption_results.py +255 -0
- vrchatapi/models/inventory_default_attributes_value.py +243 -0
- vrchatapi/models/inventory_default_attributes_value_validator.py +211 -0
- vrchatapi/models/inventory_drop.py +331 -0
- vrchatapi/models/inventory_equip_slot.py +39 -0
- vrchatapi/models/inventory_flag.py +43 -0
- vrchatapi/models/inventory_item.py +420 -0
- vrchatapi/models/inventory_item_type.py +42 -0
- vrchatapi/models/inventory_metadata.py +287 -0
- vrchatapi/models/inventory_notification_details.py +244 -0
- vrchatapi/models/inventory_spawn.py +216 -0
- vrchatapi/models/inventory_template.py +351 -0
- vrchatapi/models/inventory_user_attributes.py +250 -0
- vrchatapi/models/invite_message.py +276 -0
- vrchatapi/models/invite_message_type.py +39 -0
- vrchatapi/models/invite_request.py +243 -0
- vrchatapi/models/invite_response.py +235 -0
- vrchatapi/models/jam.py +302 -0
- vrchatapi/models/jam_state_change_dates.py +276 -0
- vrchatapi/models/jam_submission.py +275 -0
- vrchatapi/models/join_group_request.py +234 -0
- vrchatapi/models/license.py +261 -0
- vrchatapi/models/license_action.py +37 -0
- vrchatapi/models/license_group.py +235 -0
- vrchatapi/models/license_type.py +39 -0
- vrchatapi/models/limited_group.py +377 -0
- vrchatapi/models/limited_unity_package.py +251 -0
- vrchatapi/models/limited_user_friend.py +399 -0
- vrchatapi/models/limited_user_groups.py +386 -0
- vrchatapi/models/limited_user_instance.py +430 -0
- vrchatapi/models/limited_user_search.py +395 -0
- vrchatapi/models/limited_world.py +410 -0
- vrchatapi/models/mime_type.py +50 -0
- vrchatapi/models/model_print.py +299 -0
- vrchatapi/models/moderate_user_request.py +217 -0
- vrchatapi/models/moderation_report.py +296 -0
- vrchatapi/models/mutual_friend.py +302 -0
- vrchatapi/models/mutuals.py +217 -0
- vrchatapi/models/notification.py +283 -0
- vrchatapi/models/notification_detail_invite.py +250 -0
- vrchatapi/models/notification_detail_invite_response.py +242 -0
- vrchatapi/models/notification_detail_request_invite.py +239 -0
- vrchatapi/models/notification_detail_request_invite_response.py +242 -0
- vrchatapi/models/notification_detail_vote_to_kick.py +242 -0
- vrchatapi/models/notification_type.py +43 -0
- vrchatapi/models/notification_v2.py +466 -0
- vrchatapi/models/notification_v2_details_boop.py +255 -0
- vrchatapi/models/notification_v2_response.py +259 -0
- vrchatapi/models/notification_v2_type.py +58 -0
- vrchatapi/models/ok_status.py +211 -0
- vrchatapi/models/ok_status2.py +234 -0
- vrchatapi/models/order_option.py +37 -0
- vrchatapi/models/order_option_short.py +37 -0
- vrchatapi/models/paginated_calendar_event_list.py +255 -0
- vrchatapi/models/paginated_group_audit_log_entry_list.py +255 -0
- vrchatapi/models/paginated_moderation_report_list.py +255 -0
- vrchatapi/models/past_display_name.py +241 -0
- vrchatapi/models/pending2_fa_result.py +239 -0
- vrchatapi/models/performance_limiter_info.py +234 -0
- vrchatapi/models/performance_ratings.py +41 -0
- vrchatapi/models/permission.py +280 -0
- vrchatapi/models/permission_data.py +258 -0
- vrchatapi/models/platform_build_info.py +242 -0
- vrchatapi/models/player_moderation.py +276 -0
- vrchatapi/models/player_moderation_type.py +44 -0
- vrchatapi/models/print_files.py +239 -0
- vrchatapi/models/private_profile.py +267 -0
- vrchatapi/models/private_profile_activity.py +292 -0
- vrchatapi/models/product.py +389 -0
- vrchatapi/models/product_listing.py +538 -0
- vrchatapi/models/product_listing_type.py +39 -0
- vrchatapi/models/product_listing_variant.py +272 -0
- vrchatapi/models/product_purchase.py +571 -0
- vrchatapi/models/product_purchase_history.py +256 -0
- vrchatapi/models/product_purchase_location_type.py +46 -0
- vrchatapi/models/product_purchase_product.py +269 -0
- vrchatapi/models/product_purchase_purchase_context.py +250 -0
- vrchatapi/models/product_purchase_record.py +312 -0
- vrchatapi/models/product_type.py +39 -0
- vrchatapi/models/profile_represented_group.py +262 -0
- vrchatapi/models/prop.py +358 -0
- vrchatapi/models/prop_publish_status.py +234 -0
- vrchatapi/models/prop_unity_package.py +269 -0
- vrchatapi/models/public_profile.py +398 -0
- vrchatapi/models/purchase_context_data.py +251 -0
- vrchatapi/models/purchase_product_listing_request.py +281 -0
- vrchatapi/models/region.py +42 -0
- vrchatapi/models/register_user_account_request.py +278 -0
- vrchatapi/models/release_status.py +39 -0
- vrchatapi/models/report_category.py +226 -0
- vrchatapi/models/report_reason.py +216 -0
- vrchatapi/models/represented_group.py +348 -0
- vrchatapi/models/request_invite_request.py +235 -0
- vrchatapi/models/respond_group_join_request.py +217 -0
- vrchatapi/models/respond_notification_v2_request.py +242 -0
- vrchatapi/models/response.py +217 -0
- vrchatapi/models/reward_badge.py +308 -0
- vrchatapi/models/reward_redemption.py +220 -0
- vrchatapi/models/reward_redemption_data.py +224 -0
- vrchatapi/models/reward_redemption_request.py +211 -0
- vrchatapi/models/reward_redemption_result.py +250 -0
- vrchatapi/models/search_group_members200_response.py +224 -0
- vrchatapi/models/seller_eligibility.py +211 -0
- vrchatapi/models/sent_notification.py +278 -0
- vrchatapi/models/service_queue_stats.py +234 -0
- vrchatapi/models/service_status.py +281 -0
- vrchatapi/models/share_inventory_item_direct_request.py +239 -0
- vrchatapi/models/sort_option.py +53 -0
- vrchatapi/models/sort_option_product_purchase.py +36 -0
- vrchatapi/models/store.py +372 -0
- vrchatapi/models/store_context.py +249 -0
- vrchatapi/models/store_shelf.py +304 -0
- vrchatapi/models/store_type.py +38 -0
- vrchatapi/models/store_view.py +40 -0
- vrchatapi/models/submit_moderation_report_request.py +263 -0
- vrchatapi/models/submit_moderation_report_request_details.py +283 -0
- vrchatapi/models/subscription.py +301 -0
- vrchatapi/models/subscription_period.py +40 -0
- vrchatapi/models/success.py +215 -0
- vrchatapi/models/success_flag.py +211 -0
- vrchatapi/models/tilia_kyc.py +246 -0
- vrchatapi/models/tilia_status.py +259 -0
- vrchatapi/models/tilia_tos.py +211 -0
- vrchatapi/models/token_bundle.py +286 -0
- vrchatapi/models/transaction.py +322 -0
- vrchatapi/models/transaction_agreement.py +353 -0
- vrchatapi/models/transaction_status.py +39 -0
- vrchatapi/models/transaction_steam_info.py +271 -0
- vrchatapi/models/transaction_steam_wallet_info.py +227 -0
- vrchatapi/models/transfer_group_request.py +234 -0
- vrchatapi/models/tutorial_status.py +255 -0
- vrchatapi/models/two_factor_auth_code.py +211 -0
- vrchatapi/models/two_factor_email_code.py +211 -0
- vrchatapi/models/two_factor_recovery_codes.py +247 -0
- vrchatapi/models/two_factor_recovery_codes_otp_inner.py +216 -0
- vrchatapi/models/unity_package.py +360 -0
- vrchatapi/models/update_asset_review_notes_request.py +234 -0
- vrchatapi/models/update_avatar_request.py +293 -0
- vrchatapi/models/update_calendar_event_request.py +365 -0
- vrchatapi/models/update_favorite_group_request.py +246 -0
- vrchatapi/models/update_group_gallery_request.py +297 -0
- vrchatapi/models/update_group_member_request.py +256 -0
- vrchatapi/models/update_group_representation_request.py +234 -0
- vrchatapi/models/update_group_request.py +300 -0
- vrchatapi/models/update_group_role_request.py +255 -0
- vrchatapi/models/update_inventory_item_request.py +254 -0
- vrchatapi/models/update_invite_message_request.py +211 -0
- vrchatapi/models/update_listing_request.py +211 -0
- vrchatapi/models/update_product_request.py +261 -0
- vrchatapi/models/update_prop_request.py +303 -0
- vrchatapi/models/update_tilia_tos_request.py +211 -0
- vrchatapi/models/update_user_badge_request.py +216 -0
- vrchatapi/models/update_user_note_request.py +239 -0
- vrchatapi/models/update_user_request.py +358 -0
- vrchatapi/models/update_world_request.py +317 -0
- vrchatapi/models/user.py +549 -0
- vrchatapi/models/user_credits_eligible.py +216 -0
- vrchatapi/models/user_exists.py +242 -0
- vrchatapi/models/user_note.py +273 -0
- vrchatapi/models/user_note_target_user.py +277 -0
- vrchatapi/models/user_state.py +38 -0
- vrchatapi/models/user_status.py +40 -0
- vrchatapi/models/user_subscription.py +330 -0
- vrchatapi/models/user_subscription_eligible.py +274 -0
- vrchatapi/models/verify2_fa_email_code_result.py +211 -0
- vrchatapi/models/verify2_fa_result.py +216 -0
- vrchatapi/models/verify_auth_token_result.py +217 -0
- vrchatapi/models/world.py +459 -0
- vrchatapi/models/world_metadata.py +216 -0
- vrchatapi/models/world_publish_status.py +234 -0
- vrchatapi/py.typed +0 -0
- vrchatapi/rest.py +303 -0
- vrchatapi_async-1.20.8.dev1.dist-info/METADATA +137 -0
- vrchatapi_async-1.20.8.dev1.dist-info/RECORD +362 -0
- vrchatapi_async-1.20.8.dev1.dist-info/WHEEL +5 -0
- vrchatapi_async-1.20.8.dev1.dist-info/licenses/LICENSE +21 -0
- vrchatapi_async-1.20.8.dev1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,245 @@
|
|
|
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 datetime import datetime
|
|
22
|
+
from pydantic import AliasChoices, BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional, cast as _cast
|
|
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 CurrentUserPlatformHistoryInner(BaseModel):
|
|
98
|
+
"""
|
|
99
|
+
CurrentUserPlatformHistoryInner
|
|
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
|
+
is_mobile: Optional[StrictBool] = Field(default=None, validation_alias=AliasChoices("isMobile", "is_mobile"), serialization_alias="isMobile")
|
|
108
|
+
platform: Optional[StrictStr] = Field(default=None, description="This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.", json_schema_extra={"examples": ["standalonewindows"]})
|
|
109
|
+
recorded: Optional[datetime] = None
|
|
110
|
+
openapi_types: ClassVar[Dict[str, str]] = {
|
|
111
|
+
"is_mobile": "bool",
|
|
112
|
+
"platform": "str",
|
|
113
|
+
"recorded": "datetime"
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
attribute_map: ClassVar[Dict[str, str]] = {
|
|
117
|
+
"is_mobile": "isMobile",
|
|
118
|
+
"platform": "platform",
|
|
119
|
+
"recorded": "recorded"
|
|
120
|
+
}
|
|
121
|
+
__properties: ClassVar[List[str]] = ["isMobile", "platform", "recorded"]
|
|
122
|
+
|
|
123
|
+
@classmethod
|
|
124
|
+
def __preprocess_input_names(
|
|
125
|
+
cls,
|
|
126
|
+
obj: Any,
|
|
127
|
+
remove_hidden_storage_names: bool = True,
|
|
128
|
+
) -> Any:
|
|
129
|
+
if not isinstance(obj, _Mapping):
|
|
130
|
+
return obj
|
|
131
|
+
obj = dict(obj)
|
|
132
|
+
if "isMobile" not in obj and "is_mobile" in obj:
|
|
133
|
+
obj["isMobile"] = obj["is_mobile"]
|
|
134
|
+
obj.pop("is_mobile", None)
|
|
135
|
+
return obj
|
|
136
|
+
|
|
137
|
+
model_config = ConfigDict(
|
|
138
|
+
validate_by_name=True,
|
|
139
|
+
validate_by_alias=True,
|
|
140
|
+
validate_assignment=True,
|
|
141
|
+
extra="forbid",
|
|
142
|
+
protected_namespaces=(),
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def to_str(self) -> str:
|
|
147
|
+
"""Returns the string representation of the model"""
|
|
148
|
+
return pprint.pformat(self.to_dict())
|
|
149
|
+
|
|
150
|
+
def __repr__(self) -> str:
|
|
151
|
+
"""For print and pprint"""
|
|
152
|
+
return self.to_str()
|
|
153
|
+
|
|
154
|
+
def __eq__(self, other: object) -> bool:
|
|
155
|
+
"""Returns true if both objects are equal"""
|
|
156
|
+
if not isinstance(other, CurrentUserPlatformHistoryInner):
|
|
157
|
+
return False
|
|
158
|
+
|
|
159
|
+
return self.to_dict() == other.to_dict()
|
|
160
|
+
|
|
161
|
+
def __ne__(self, other: object) -> bool:
|
|
162
|
+
"""Returns true if both objects are not equal"""
|
|
163
|
+
if not isinstance(other, CurrentUserPlatformHistoryInner):
|
|
164
|
+
return True
|
|
165
|
+
|
|
166
|
+
return not (self == other)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
def to_json(self) -> str:
|
|
170
|
+
"""Returns the JSON representation of the model using alias"""
|
|
171
|
+
to_openapi_dict = _get_openapi_to_dict(self)
|
|
172
|
+
if to_openapi_dict is not None:
|
|
173
|
+
return json.dumps(to_jsonable_python(to_openapi_dict(self)))
|
|
174
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
175
|
+
|
|
176
|
+
@classmethod
|
|
177
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
178
|
+
"""Create an instance of CurrentUserPlatformHistoryInner from a JSON string"""
|
|
179
|
+
return cls.from_dict(json.loads(json_str))
|
|
180
|
+
|
|
181
|
+
def to_dict(self, serialize: bool = False) -> Dict[str, Any]:
|
|
182
|
+
"""Return all declared model fields using public or wire names."""
|
|
183
|
+
return {
|
|
184
|
+
("isMobile" if serialize else "is_mobile"): _to_legacy_value(getattr(self, "is_mobile", None), serialize),
|
|
185
|
+
("platform" if serialize else "platform"): _to_legacy_value(getattr(self, "platform", None), serialize),
|
|
186
|
+
("recorded" if serialize else "recorded"): _to_legacy_value(getattr(self, "recorded", None), serialize),
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
def __openapi_generator_modern_projection(self) -> Dict[str, Any]:
|
|
190
|
+
"""Return the dictionary representation of the model using alias.
|
|
191
|
+
|
|
192
|
+
This has the following differences from calling pydantic's
|
|
193
|
+
`self.model_dump(by_alias=True)`:
|
|
194
|
+
|
|
195
|
+
* `None` is only added to the output dict for nullable fields that
|
|
196
|
+
were set at model initialization. Other fields with value `None`
|
|
197
|
+
are ignored.
|
|
198
|
+
"""
|
|
199
|
+
excluded_fields: Set[str] = set([
|
|
200
|
+
])
|
|
201
|
+
|
|
202
|
+
_dict = self.model_dump(
|
|
203
|
+
by_alias=True,
|
|
204
|
+
exclude=excluded_fields,
|
|
205
|
+
exclude_none=True,
|
|
206
|
+
)
|
|
207
|
+
return _dict
|
|
208
|
+
|
|
209
|
+
setattr(
|
|
210
|
+
to_dict,
|
|
211
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
212
|
+
__openapi_generator_modern_projection,
|
|
213
|
+
)
|
|
214
|
+
setattr(
|
|
215
|
+
__openapi_generator_modern_projection,
|
|
216
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
217
|
+
to_dict,
|
|
218
|
+
)
|
|
219
|
+
del __openapi_generator_modern_projection
|
|
220
|
+
|
|
221
|
+
@classmethod
|
|
222
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
223
|
+
"""Create an instance of CurrentUserPlatformHistoryInner from a dict"""
|
|
224
|
+
if obj is None:
|
|
225
|
+
return None
|
|
226
|
+
|
|
227
|
+
if not isinstance(obj, dict):
|
|
228
|
+
return cls.model_validate(obj)
|
|
229
|
+
|
|
230
|
+
obj = _cast(
|
|
231
|
+
Dict[str, Any],
|
|
232
|
+
cls.__preprocess_input_names(
|
|
233
|
+
obj,
|
|
234
|
+
remove_hidden_storage_names=True,
|
|
235
|
+
),
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
_obj = cls.model_validate({
|
|
239
|
+
"isMobile": obj.get("isMobile"),
|
|
240
|
+
"platform": obj.get("platform"),
|
|
241
|
+
"recorded": obj.get("recorded")
|
|
242
|
+
})
|
|
243
|
+
return _obj
|
|
244
|
+
|
|
245
|
+
|
|
@@ -0,0 +1,379 @@
|
|
|
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 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 CurrentUserPresence(BaseModel):
|
|
98
|
+
"""
|
|
99
|
+
CurrentUserPresence
|
|
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
|
+
avatar_thumbnail: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("avatarThumbnail", "avatar_thumbnail"), serialization_alias="avatarThumbnail")
|
|
108
|
+
current_avatar_tags: Optional[List[Annotated[str, Field(min_length=1, strict=True)]]] = Field(default=None, validation_alias=AliasChoices("currentAvatarTags", "current_avatar_tags"), serialization_alias="currentAvatarTags")
|
|
109
|
+
debugflag: Optional[StrictStr] = None
|
|
110
|
+
display_name: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("displayName", "display_name"), serialization_alias="displayName")
|
|
111
|
+
groups: Optional[List[StrictStr]] = None
|
|
112
|
+
id: Optional[StrictStr] = Field(default=None, 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"]})
|
|
113
|
+
instance: Optional[StrictStr] = None
|
|
114
|
+
instance_type: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("instanceType", "instance_type"), serialization_alias="instanceType", description="either an InstanceType or an empty string")
|
|
115
|
+
is_rejoining: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("isRejoining", "is_rejoining"), serialization_alias="isRejoining")
|
|
116
|
+
platform: Optional[StrictStr] = Field(default=None, description="This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.", json_schema_extra={"examples": ["standalonewindows"]})
|
|
117
|
+
profile_pic_override: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("profilePicOverride", "profile_pic_override"), serialization_alias="profilePicOverride")
|
|
118
|
+
status: Optional[StrictStr] = Field(default=None, description="either a UserStatus or empty string")
|
|
119
|
+
traveling_to_instance: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("travelingToInstance", "traveling_to_instance"), serialization_alias="travelingToInstance")
|
|
120
|
+
traveling_to_world: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("travelingToWorld", "traveling_to_world"), serialization_alias="travelingToWorld", description="Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list.", json_schema_extra={"examples": ["wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd:12345~hidden(usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469)~region(eu)~nonce(27e8414a-59a0-4f3d-af1f-f27557eb49a2)"]})
|
|
121
|
+
user_icon: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("userIcon", "user_icon"), serialization_alias="userIcon")
|
|
122
|
+
world: Optional[StrictStr] = Field(default=None, description="WorldID be \"offline\" on User profiles if you are not friends with that user.", json_schema_extra={"examples": ["wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd"]})
|
|
123
|
+
openapi_types: ClassVar[Dict[str, str]] = {
|
|
124
|
+
"avatar_thumbnail": "str",
|
|
125
|
+
"current_avatar_tags": "List[str]",
|
|
126
|
+
"debugflag": "str",
|
|
127
|
+
"display_name": "str",
|
|
128
|
+
"groups": "List[str]",
|
|
129
|
+
"id": "str",
|
|
130
|
+
"instance": "str",
|
|
131
|
+
"instance_type": "str",
|
|
132
|
+
"is_rejoining": "str",
|
|
133
|
+
"platform": "str",
|
|
134
|
+
"profile_pic_override": "str",
|
|
135
|
+
"status": "str",
|
|
136
|
+
"traveling_to_instance": "str",
|
|
137
|
+
"traveling_to_world": "str",
|
|
138
|
+
"user_icon": "str",
|
|
139
|
+
"world": "str"
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
attribute_map: ClassVar[Dict[str, str]] = {
|
|
143
|
+
"avatar_thumbnail": "avatarThumbnail",
|
|
144
|
+
"current_avatar_tags": "currentAvatarTags",
|
|
145
|
+
"debugflag": "debugflag",
|
|
146
|
+
"display_name": "displayName",
|
|
147
|
+
"groups": "groups",
|
|
148
|
+
"id": "id",
|
|
149
|
+
"instance": "instance",
|
|
150
|
+
"instance_type": "instanceType",
|
|
151
|
+
"is_rejoining": "isRejoining",
|
|
152
|
+
"platform": "platform",
|
|
153
|
+
"profile_pic_override": "profilePicOverride",
|
|
154
|
+
"status": "status",
|
|
155
|
+
"traveling_to_instance": "travelingToInstance",
|
|
156
|
+
"traveling_to_world": "travelingToWorld",
|
|
157
|
+
"user_icon": "userIcon",
|
|
158
|
+
"world": "world"
|
|
159
|
+
}
|
|
160
|
+
__properties: ClassVar[List[str]] = ["avatarThumbnail", "currentAvatarTags", "debugflag", "displayName", "groups", "id", "instance", "instanceType", "isRejoining", "platform", "profilePicOverride", "status", "travelingToInstance", "travelingToWorld", "userIcon", "world"]
|
|
161
|
+
|
|
162
|
+
@classmethod
|
|
163
|
+
def __preprocess_input_names(
|
|
164
|
+
cls,
|
|
165
|
+
obj: Any,
|
|
166
|
+
remove_hidden_storage_names: bool = True,
|
|
167
|
+
) -> Any:
|
|
168
|
+
if not isinstance(obj, _Mapping):
|
|
169
|
+
return obj
|
|
170
|
+
obj = dict(obj)
|
|
171
|
+
if "avatarThumbnail" not in obj and "avatar_thumbnail" in obj:
|
|
172
|
+
obj["avatarThumbnail"] = obj["avatar_thumbnail"]
|
|
173
|
+
obj.pop("avatar_thumbnail", None)
|
|
174
|
+
if "currentAvatarTags" not in obj and "current_avatar_tags" in obj:
|
|
175
|
+
obj["currentAvatarTags"] = obj["current_avatar_tags"]
|
|
176
|
+
obj.pop("current_avatar_tags", None)
|
|
177
|
+
if "displayName" not in obj and "display_name" in obj:
|
|
178
|
+
obj["displayName"] = obj["display_name"]
|
|
179
|
+
obj.pop("display_name", None)
|
|
180
|
+
if "instanceType" not in obj and "instance_type" in obj:
|
|
181
|
+
obj["instanceType"] = obj["instance_type"]
|
|
182
|
+
obj.pop("instance_type", None)
|
|
183
|
+
if "isRejoining" not in obj and "is_rejoining" in obj:
|
|
184
|
+
obj["isRejoining"] = obj["is_rejoining"]
|
|
185
|
+
obj.pop("is_rejoining", None)
|
|
186
|
+
if "profilePicOverride" not in obj and "profile_pic_override" in obj:
|
|
187
|
+
obj["profilePicOverride"] = obj["profile_pic_override"]
|
|
188
|
+
obj.pop("profile_pic_override", None)
|
|
189
|
+
if "travelingToInstance" not in obj and "traveling_to_instance" in obj:
|
|
190
|
+
obj["travelingToInstance"] = obj["traveling_to_instance"]
|
|
191
|
+
obj.pop("traveling_to_instance", None)
|
|
192
|
+
if "travelingToWorld" not in obj and "traveling_to_world" in obj:
|
|
193
|
+
obj["travelingToWorld"] = obj["traveling_to_world"]
|
|
194
|
+
obj.pop("traveling_to_world", None)
|
|
195
|
+
if "userIcon" not in obj and "user_icon" in obj:
|
|
196
|
+
obj["userIcon"] = obj["user_icon"]
|
|
197
|
+
obj.pop("user_icon", None)
|
|
198
|
+
return obj
|
|
199
|
+
|
|
200
|
+
model_config = ConfigDict(
|
|
201
|
+
validate_by_name=True,
|
|
202
|
+
validate_by_alias=True,
|
|
203
|
+
validate_assignment=True,
|
|
204
|
+
extra="forbid",
|
|
205
|
+
protected_namespaces=(),
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def to_str(self) -> str:
|
|
210
|
+
"""Returns the string representation of the model"""
|
|
211
|
+
return pprint.pformat(self.to_dict())
|
|
212
|
+
|
|
213
|
+
def __repr__(self) -> str:
|
|
214
|
+
"""For print and pprint"""
|
|
215
|
+
return self.to_str()
|
|
216
|
+
|
|
217
|
+
def __eq__(self, other: object) -> bool:
|
|
218
|
+
"""Returns true if both objects are equal"""
|
|
219
|
+
if not isinstance(other, CurrentUserPresence):
|
|
220
|
+
return False
|
|
221
|
+
|
|
222
|
+
return self.to_dict() == other.to_dict()
|
|
223
|
+
|
|
224
|
+
def __ne__(self, other: object) -> bool:
|
|
225
|
+
"""Returns true if both objects are not equal"""
|
|
226
|
+
if not isinstance(other, CurrentUserPresence):
|
|
227
|
+
return True
|
|
228
|
+
|
|
229
|
+
return not (self == other)
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
def to_json(self) -> str:
|
|
233
|
+
"""Returns the JSON representation of the model using alias"""
|
|
234
|
+
to_openapi_dict = _get_openapi_to_dict(self)
|
|
235
|
+
if to_openapi_dict is not None:
|
|
236
|
+
return json.dumps(to_jsonable_python(to_openapi_dict(self)))
|
|
237
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
238
|
+
|
|
239
|
+
@classmethod
|
|
240
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
241
|
+
"""Create an instance of CurrentUserPresence from a JSON string"""
|
|
242
|
+
return cls.from_dict(json.loads(json_str))
|
|
243
|
+
|
|
244
|
+
def to_dict(self, serialize: bool = False) -> Dict[str, Any]:
|
|
245
|
+
"""Return all declared model fields using public or wire names."""
|
|
246
|
+
return {
|
|
247
|
+
("avatarThumbnail" if serialize else "avatar_thumbnail"): _to_legacy_value(getattr(self, "avatar_thumbnail", None), serialize),
|
|
248
|
+
("currentAvatarTags" if serialize else "current_avatar_tags"): _to_legacy_value(getattr(self, "current_avatar_tags", None), serialize),
|
|
249
|
+
("debugflag" if serialize else "debugflag"): _to_legacy_value(getattr(self, "debugflag", None), serialize),
|
|
250
|
+
("displayName" if serialize else "display_name"): _to_legacy_value(getattr(self, "display_name", None), serialize),
|
|
251
|
+
("groups" if serialize else "groups"): _to_legacy_value(getattr(self, "groups", None), serialize),
|
|
252
|
+
("id" if serialize else "id"): _to_legacy_value(getattr(self, "id", None), serialize),
|
|
253
|
+
("instance" if serialize else "instance"): _to_legacy_value(getattr(self, "instance", None), serialize),
|
|
254
|
+
("instanceType" if serialize else "instance_type"): _to_legacy_value(getattr(self, "instance_type", None), serialize),
|
|
255
|
+
("isRejoining" if serialize else "is_rejoining"): _to_legacy_value(getattr(self, "is_rejoining", None), serialize),
|
|
256
|
+
("platform" if serialize else "platform"): _to_legacy_value(getattr(self, "platform", None), serialize),
|
|
257
|
+
("profilePicOverride" if serialize else "profile_pic_override"): _to_legacy_value(getattr(self, "profile_pic_override", None), serialize),
|
|
258
|
+
("status" if serialize else "status"): _to_legacy_value(getattr(self, "status", None), serialize),
|
|
259
|
+
("travelingToInstance" if serialize else "traveling_to_instance"): _to_legacy_value(getattr(self, "traveling_to_instance", None), serialize),
|
|
260
|
+
("travelingToWorld" if serialize else "traveling_to_world"): _to_legacy_value(getattr(self, "traveling_to_world", None), serialize),
|
|
261
|
+
("userIcon" if serialize else "user_icon"): _to_legacy_value(getattr(self, "user_icon", None), serialize),
|
|
262
|
+
("world" if serialize else "world"): _to_legacy_value(getattr(self, "world", None), serialize),
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
def __openapi_generator_modern_projection(self) -> Dict[str, Any]:
|
|
266
|
+
"""Return the dictionary representation of the model using alias.
|
|
267
|
+
|
|
268
|
+
This has the following differences from calling pydantic's
|
|
269
|
+
`self.model_dump(by_alias=True)`:
|
|
270
|
+
|
|
271
|
+
* `None` is only added to the output dict for nullable fields that
|
|
272
|
+
were set at model initialization. Other fields with value `None`
|
|
273
|
+
are ignored.
|
|
274
|
+
"""
|
|
275
|
+
excluded_fields: Set[str] = set([
|
|
276
|
+
])
|
|
277
|
+
|
|
278
|
+
_dict = self.model_dump(
|
|
279
|
+
by_alias=True,
|
|
280
|
+
exclude=excluded_fields,
|
|
281
|
+
exclude_none=True,
|
|
282
|
+
)
|
|
283
|
+
# set to None if avatar_thumbnail (nullable) is None
|
|
284
|
+
# and model_fields_set contains the field
|
|
285
|
+
if self.avatar_thumbnail is None and "avatar_thumbnail" in self.model_fields_set:
|
|
286
|
+
_dict['avatarThumbnail'] = None
|
|
287
|
+
|
|
288
|
+
# set to None if groups (nullable) is None
|
|
289
|
+
# and model_fields_set contains the field
|
|
290
|
+
if self.groups is None and "groups" in self.model_fields_set:
|
|
291
|
+
_dict['groups'] = None
|
|
292
|
+
|
|
293
|
+
# set to None if instance (nullable) is None
|
|
294
|
+
# and model_fields_set contains the field
|
|
295
|
+
if self.instance is None and "instance" in self.model_fields_set:
|
|
296
|
+
_dict['instance'] = None
|
|
297
|
+
|
|
298
|
+
# set to None if instance_type (nullable) is None
|
|
299
|
+
# and model_fields_set contains the field
|
|
300
|
+
if self.instance_type is None and "instance_type" in self.model_fields_set:
|
|
301
|
+
_dict['instanceType'] = None
|
|
302
|
+
|
|
303
|
+
# set to None if is_rejoining (nullable) is None
|
|
304
|
+
# and model_fields_set contains the field
|
|
305
|
+
if self.is_rejoining is None and "is_rejoining" in self.model_fields_set:
|
|
306
|
+
_dict['isRejoining'] = None
|
|
307
|
+
|
|
308
|
+
# set to None if profile_pic_override (nullable) is None
|
|
309
|
+
# and model_fields_set contains the field
|
|
310
|
+
if self.profile_pic_override is None and "profile_pic_override" in self.model_fields_set:
|
|
311
|
+
_dict['profilePicOverride'] = None
|
|
312
|
+
|
|
313
|
+
# set to None if status (nullable) is None
|
|
314
|
+
# and model_fields_set contains the field
|
|
315
|
+
if self.status is None and "status" in self.model_fields_set:
|
|
316
|
+
_dict['status'] = None
|
|
317
|
+
|
|
318
|
+
# set to None if traveling_to_instance (nullable) is None
|
|
319
|
+
# and model_fields_set contains the field
|
|
320
|
+
if self.traveling_to_instance is None and "traveling_to_instance" in self.model_fields_set:
|
|
321
|
+
_dict['travelingToInstance'] = None
|
|
322
|
+
|
|
323
|
+
# set to None if user_icon (nullable) is None
|
|
324
|
+
# and model_fields_set contains the field
|
|
325
|
+
if self.user_icon is None and "user_icon" in self.model_fields_set:
|
|
326
|
+
_dict['userIcon'] = None
|
|
327
|
+
|
|
328
|
+
return _dict
|
|
329
|
+
|
|
330
|
+
setattr(
|
|
331
|
+
to_dict,
|
|
332
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
333
|
+
__openapi_generator_modern_projection,
|
|
334
|
+
)
|
|
335
|
+
setattr(
|
|
336
|
+
__openapi_generator_modern_projection,
|
|
337
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
338
|
+
to_dict,
|
|
339
|
+
)
|
|
340
|
+
del __openapi_generator_modern_projection
|
|
341
|
+
|
|
342
|
+
@classmethod
|
|
343
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
344
|
+
"""Create an instance of CurrentUserPresence from a dict"""
|
|
345
|
+
if obj is None:
|
|
346
|
+
return None
|
|
347
|
+
|
|
348
|
+
if not isinstance(obj, dict):
|
|
349
|
+
return cls.model_validate(obj)
|
|
350
|
+
|
|
351
|
+
obj = _cast(
|
|
352
|
+
Dict[str, Any],
|
|
353
|
+
cls.__preprocess_input_names(
|
|
354
|
+
obj,
|
|
355
|
+
remove_hidden_storage_names=True,
|
|
356
|
+
),
|
|
357
|
+
)
|
|
358
|
+
|
|
359
|
+
_obj = cls.model_validate({
|
|
360
|
+
"avatarThumbnail": obj.get("avatarThumbnail"),
|
|
361
|
+
"currentAvatarTags": obj.get("currentAvatarTags"),
|
|
362
|
+
"debugflag": obj.get("debugflag"),
|
|
363
|
+
"displayName": obj.get("displayName"),
|
|
364
|
+
"groups": obj.get("groups"),
|
|
365
|
+
"id": obj.get("id"),
|
|
366
|
+
"instance": obj.get("instance"),
|
|
367
|
+
"instanceType": obj.get("instanceType"),
|
|
368
|
+
"isRejoining": obj.get("isRejoining"),
|
|
369
|
+
"platform": obj.get("platform"),
|
|
370
|
+
"profilePicOverride": obj.get("profilePicOverride"),
|
|
371
|
+
"status": obj.get("status"),
|
|
372
|
+
"travelingToInstance": obj.get("travelingToInstance"),
|
|
373
|
+
"travelingToWorld": obj.get("travelingToWorld"),
|
|
374
|
+
"userIcon": obj.get("userIcon"),
|
|
375
|
+
"world": obj.get("world")
|
|
376
|
+
})
|
|
377
|
+
return _obj
|
|
378
|
+
|
|
379
|
+
|