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,597 @@
|
|
|
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, StrictInt, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional, cast as _cast
|
|
24
|
+
from typing_extensions import Annotated
|
|
25
|
+
from vrchatapi.models.group_access_type import GroupAccessType
|
|
26
|
+
from vrchatapi.models.instance_content_settings import InstanceContentSettings
|
|
27
|
+
from vrchatapi.models.instance_platforms import InstancePlatforms
|
|
28
|
+
from vrchatapi.models.instance_region import InstanceRegion
|
|
29
|
+
from vrchatapi.models.instance_type import InstanceType
|
|
30
|
+
from vrchatapi.models.limited_user_instance import LimitedUserInstance
|
|
31
|
+
from vrchatapi.models.region import Region
|
|
32
|
+
from vrchatapi.models.world import World
|
|
33
|
+
from typing import Optional, Set
|
|
34
|
+
from typing_extensions import Self
|
|
35
|
+
from pydantic_core import to_jsonable_python
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
_OPENAPI_GENERATOR_TO_DICT = "_openapi_generator_to_dict"
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _get_openapi_to_dict(value: Any) -> Any:
|
|
42
|
+
# Reciprocal function references preserve inherited generated methods
|
|
43
|
+
# without reserving model member names. Checking both directions also
|
|
44
|
+
# rejects overrides whose decorators copy function attributes.
|
|
45
|
+
to_dict = getattr(value, "to_dict", None)
|
|
46
|
+
type_to_dict = getattr(type(value), "to_dict", None)
|
|
47
|
+
if (
|
|
48
|
+
not callable(to_dict)
|
|
49
|
+
or getattr(to_dict, "__func__", None) is not type_to_dict
|
|
50
|
+
):
|
|
51
|
+
return None
|
|
52
|
+
|
|
53
|
+
openapi_to_dict = getattr(
|
|
54
|
+
type_to_dict, _OPENAPI_GENERATOR_TO_DICT, None
|
|
55
|
+
)
|
|
56
|
+
if (
|
|
57
|
+
not callable(openapi_to_dict)
|
|
58
|
+
or getattr(
|
|
59
|
+
openapi_to_dict,
|
|
60
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
61
|
+
None,
|
|
62
|
+
) is not type_to_dict
|
|
63
|
+
):
|
|
64
|
+
return None
|
|
65
|
+
return openapi_to_dict
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def _to_legacy_item(value: Any, serialize: bool) -> Any:
|
|
69
|
+
to_dict = getattr(value, "to_dict", None)
|
|
70
|
+
if _get_openapi_to_dict(value) is not None and callable(to_dict):
|
|
71
|
+
return to_dict(serialize=serialize)
|
|
72
|
+
if callable(to_dict):
|
|
73
|
+
return to_dict()
|
|
74
|
+
return value
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def _to_legacy_value(value: Any, serialize: bool) -> Any:
|
|
78
|
+
# python-legacy converted only immediate list elements or dictionary values:
|
|
79
|
+
# https://github.com/OpenAPITools/openapi-generator/blob/c84b949df1a9ec04ba75989cb49b45c940c2f694/modules/openapi-generator/src/main/resources/python-legacy/model.mustache#L203-L231
|
|
80
|
+
if isinstance(value, list):
|
|
81
|
+
return [_to_legacy_item(item, serialize) for item in value]
|
|
82
|
+
if isinstance(value, dict):
|
|
83
|
+
return {
|
|
84
|
+
key: _to_legacy_item(item, serialize)
|
|
85
|
+
for key, item in value.items()
|
|
86
|
+
}
|
|
87
|
+
return _to_legacy_item(value, serialize)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def _to_openapi_value(value: Any) -> Any:
|
|
91
|
+
if isinstance(value, list):
|
|
92
|
+
return [_to_openapi_value(item) for item in value]
|
|
93
|
+
if isinstance(value, dict):
|
|
94
|
+
return {key: _to_openapi_value(item) for key, item in value.items()}
|
|
95
|
+
|
|
96
|
+
to_openapi_dict = _get_openapi_to_dict(value)
|
|
97
|
+
if to_openapi_dict is not None:
|
|
98
|
+
return to_openapi_dict(value)
|
|
99
|
+
|
|
100
|
+
to_dict = getattr(value, "to_dict", None)
|
|
101
|
+
if callable(to_dict):
|
|
102
|
+
return to_dict()
|
|
103
|
+
return value
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
class Instance(BaseModel):
|
|
107
|
+
"""
|
|
108
|
+
* `hidden` field is only present if InstanceType is `hidden` aka \"Friends+\", and is instance creator. * `friends` field is only present if InstanceType is `friends` aka \"Friends\", and is instance creator. * `private` field is only present if InstanceType is `private` aka \"Invite\" or \"Invite+\", and is instance creator.
|
|
109
|
+
|
|
110
|
+
Attributes:
|
|
111
|
+
openapi_types (dict): The key is attribute name
|
|
112
|
+
and the value is attribute type.
|
|
113
|
+
attribute_map (dict): The key is attribute name
|
|
114
|
+
and the value is json key in definition.
|
|
115
|
+
""" # noqa: E501
|
|
116
|
+
active: Optional[StrictBool] = Field(default=True, json_schema_extra={"examples": [True]})
|
|
117
|
+
age_gate: Optional[StrictBool] = Field(default=None, validation_alias=AliasChoices("ageGate", "age_gate"), serialization_alias="ageGate")
|
|
118
|
+
calendar_entry_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("calendarEntryId", "calendar_entry_id"), serialization_alias="calendarEntryId")
|
|
119
|
+
can_request_invite: Optional[StrictBool] = Field(default=True, validation_alias=AliasChoices("canRequestInvite", "can_request_invite"), serialization_alias="canRequestInvite", json_schema_extra={"examples": [True]})
|
|
120
|
+
capacity: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, json_schema_extra={"examples": [8]})
|
|
121
|
+
client_number: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, validation_alias=AliasChoices("clientNumber", "client_number"), serialization_alias="clientNumber", description="Always returns \"unknown\".")
|
|
122
|
+
closed_at: Optional[datetime] = Field(default=None, validation_alias=AliasChoices("closedAt", "closed_at"), serialization_alias="closedAt")
|
|
123
|
+
content_settings: Optional[InstanceContentSettings] = Field(default=None, validation_alias=AliasChoices("contentSettings", "content_settings"), serialization_alias="contentSettings")
|
|
124
|
+
creator_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("creatorId", "creator_id"), serialization_alias="creatorId", 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"]})
|
|
125
|
+
display_name: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("displayName", "display_name"), serialization_alias="displayName")
|
|
126
|
+
friends: 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"]})
|
|
127
|
+
full: Optional[StrictBool] = None
|
|
128
|
+
game_server_version: Optional[StrictInt] = Field(default=None, validation_alias=AliasChoices("gameServerVersion", "game_server_version"), serialization_alias="gameServerVersion")
|
|
129
|
+
group_access_type: Optional[GroupAccessType] = Field(default=GroupAccessType.MEMBERS, validation_alias=AliasChoices("groupAccessType", "group_access_type"), serialization_alias="groupAccessType")
|
|
130
|
+
hard_close: Optional[StrictBool] = Field(default=None, validation_alias=AliasChoices("hardClose", "hard_close"), serialization_alias="hardClose")
|
|
131
|
+
has_capacity_for_you: Optional[StrictBool] = Field(default=None, validation_alias=AliasChoices("hasCapacityForYou", "has_capacity_for_you"), serialization_alias="hasCapacityForYou")
|
|
132
|
+
hidden: 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"]})
|
|
133
|
+
id: Optional[StrictStr] = Field(default=None, description="InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance.", json_schema_extra={"examples": ["12345~hidden(usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469)~region(eu)~nonce(27e8414a-59a0-4f3d-af1f-f27557eb49a2)"]})
|
|
134
|
+
instance_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("instanceId", "instance_id"), serialization_alias="instanceId", description="InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance.", json_schema_extra={"examples": ["12345~hidden(usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469)~region(eu)~nonce(27e8414a-59a0-4f3d-af1f-f27557eb49a2)"]})
|
|
135
|
+
instance_persistence_enabled: Optional[StrictBool] = Field(default=None, validation_alias=AliasChoices("instancePersistenceEnabled", "instance_persistence_enabled"), serialization_alias="instancePersistenceEnabled")
|
|
136
|
+
location: Optional[StrictStr] = Field(default=None, 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)"]})
|
|
137
|
+
n_users: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, json_schema_extra={"examples": [6]})
|
|
138
|
+
name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, json_schema_extra={"examples": ["12345"]})
|
|
139
|
+
nonce: Optional[StrictStr] = None
|
|
140
|
+
owner_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("ownerId", "owner_id"), serialization_alias="ownerId", description="A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise", json_schema_extra={"examples": ["usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469"]})
|
|
141
|
+
permanent: Optional[StrictBool] = None
|
|
142
|
+
photon_region: Optional[Region] = Field(default=None, validation_alias=AliasChoices("photonRegion", "photon_region"), serialization_alias="photonRegion")
|
|
143
|
+
platforms: Optional[InstancePlatforms] = None
|
|
144
|
+
player_persistence_enabled: Optional[StrictBool] = Field(default=None, validation_alias=AliasChoices("playerPersistenceEnabled", "player_persistence_enabled"), serialization_alias="playerPersistenceEnabled")
|
|
145
|
+
private: 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"]})
|
|
146
|
+
queue_enabled: Optional[StrictBool] = Field(default=None, validation_alias=AliasChoices("queueEnabled", "queue_enabled"), serialization_alias="queueEnabled")
|
|
147
|
+
queue_size: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, validation_alias=AliasChoices("queueSize", "queue_size"), serialization_alias="queueSize", json_schema_extra={"examples": [6]})
|
|
148
|
+
recommended_capacity: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, validation_alias=AliasChoices("recommendedCapacity", "recommended_capacity"), serialization_alias="recommendedCapacity", json_schema_extra={"examples": [6]})
|
|
149
|
+
region: Optional[InstanceRegion] = None
|
|
150
|
+
role_restricted: Optional[StrictBool] = Field(default=None, validation_alias=AliasChoices("roleRestricted", "role_restricted"), serialization_alias="roleRestricted")
|
|
151
|
+
secure_name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, validation_alias=AliasChoices("secureName", "secure_name"), serialization_alias="secureName", json_schema_extra={"examples": ["7eavhhng"]})
|
|
152
|
+
short_name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, validation_alias=AliasChoices("shortName", "short_name"), serialization_alias="shortName", json_schema_extra={"examples": ["02u7yz8j"]})
|
|
153
|
+
strict: Optional[StrictBool] = None
|
|
154
|
+
tags: Optional[List[Annotated[str, Field(min_length=1, strict=True)]]] = Field(default=None, description="The tags array on Instances usually contain the language tags of the people in the instance. ", json_schema_extra={"examples": [["language_eng", "language_jpn", "show_social_rank"]]})
|
|
155
|
+
type: Optional[InstanceType] = None
|
|
156
|
+
user_count: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, validation_alias=AliasChoices("userCount", "user_count"), serialization_alias="userCount", json_schema_extra={"examples": [6]})
|
|
157
|
+
users: Optional[List[LimitedUserInstance]] = Field(default=None, description="The users field is present on instances created by the requesting user.")
|
|
158
|
+
world: Optional[World] = None
|
|
159
|
+
world_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("worldId", "world_id"), serialization_alias="worldId", 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"]})
|
|
160
|
+
openapi_types: ClassVar[Dict[str, str]] = {
|
|
161
|
+
"active": "bool",
|
|
162
|
+
"age_gate": "bool",
|
|
163
|
+
"calendar_entry_id": "str",
|
|
164
|
+
"can_request_invite": "bool",
|
|
165
|
+
"capacity": "int",
|
|
166
|
+
"client_number": "str",
|
|
167
|
+
"closed_at": "datetime",
|
|
168
|
+
"content_settings": "InstanceContentSettings",
|
|
169
|
+
"creator_id": "str",
|
|
170
|
+
"display_name": "str",
|
|
171
|
+
"friends": "str",
|
|
172
|
+
"full": "bool",
|
|
173
|
+
"game_server_version": "int",
|
|
174
|
+
"group_access_type": "GroupAccessType",
|
|
175
|
+
"hard_close": "bool",
|
|
176
|
+
"has_capacity_for_you": "bool",
|
|
177
|
+
"hidden": "str",
|
|
178
|
+
"id": "str",
|
|
179
|
+
"instance_id": "str",
|
|
180
|
+
"instance_persistence_enabled": "bool",
|
|
181
|
+
"location": "str",
|
|
182
|
+
"n_users": "int",
|
|
183
|
+
"name": "str",
|
|
184
|
+
"nonce": "str",
|
|
185
|
+
"owner_id": "str",
|
|
186
|
+
"permanent": "bool",
|
|
187
|
+
"photon_region": "Region",
|
|
188
|
+
"platforms": "InstancePlatforms",
|
|
189
|
+
"player_persistence_enabled": "bool",
|
|
190
|
+
"private": "str",
|
|
191
|
+
"queue_enabled": "bool",
|
|
192
|
+
"queue_size": "int",
|
|
193
|
+
"recommended_capacity": "int",
|
|
194
|
+
"region": "InstanceRegion",
|
|
195
|
+
"role_restricted": "bool",
|
|
196
|
+
"secure_name": "str",
|
|
197
|
+
"short_name": "str",
|
|
198
|
+
"strict": "bool",
|
|
199
|
+
"tags": "List[str]",
|
|
200
|
+
"type": "InstanceType",
|
|
201
|
+
"user_count": "int",
|
|
202
|
+
"users": "List[LimitedUserInstance]",
|
|
203
|
+
"world": "World",
|
|
204
|
+
"world_id": "str"
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
attribute_map: ClassVar[Dict[str, str]] = {
|
|
208
|
+
"active": "active",
|
|
209
|
+
"age_gate": "ageGate",
|
|
210
|
+
"calendar_entry_id": "calendarEntryId",
|
|
211
|
+
"can_request_invite": "canRequestInvite",
|
|
212
|
+
"capacity": "capacity",
|
|
213
|
+
"client_number": "clientNumber",
|
|
214
|
+
"closed_at": "closedAt",
|
|
215
|
+
"content_settings": "contentSettings",
|
|
216
|
+
"creator_id": "creatorId",
|
|
217
|
+
"display_name": "displayName",
|
|
218
|
+
"friends": "friends",
|
|
219
|
+
"full": "full",
|
|
220
|
+
"game_server_version": "gameServerVersion",
|
|
221
|
+
"group_access_type": "groupAccessType",
|
|
222
|
+
"hard_close": "hardClose",
|
|
223
|
+
"has_capacity_for_you": "hasCapacityForYou",
|
|
224
|
+
"hidden": "hidden",
|
|
225
|
+
"id": "id",
|
|
226
|
+
"instance_id": "instanceId",
|
|
227
|
+
"instance_persistence_enabled": "instancePersistenceEnabled",
|
|
228
|
+
"location": "location",
|
|
229
|
+
"n_users": "n_users",
|
|
230
|
+
"name": "name",
|
|
231
|
+
"nonce": "nonce",
|
|
232
|
+
"owner_id": "ownerId",
|
|
233
|
+
"permanent": "permanent",
|
|
234
|
+
"photon_region": "photonRegion",
|
|
235
|
+
"platforms": "platforms",
|
|
236
|
+
"player_persistence_enabled": "playerPersistenceEnabled",
|
|
237
|
+
"private": "private",
|
|
238
|
+
"queue_enabled": "queueEnabled",
|
|
239
|
+
"queue_size": "queueSize",
|
|
240
|
+
"recommended_capacity": "recommendedCapacity",
|
|
241
|
+
"region": "region",
|
|
242
|
+
"role_restricted": "roleRestricted",
|
|
243
|
+
"secure_name": "secureName",
|
|
244
|
+
"short_name": "shortName",
|
|
245
|
+
"strict": "strict",
|
|
246
|
+
"tags": "tags",
|
|
247
|
+
"type": "type",
|
|
248
|
+
"user_count": "userCount",
|
|
249
|
+
"users": "users",
|
|
250
|
+
"world": "world",
|
|
251
|
+
"world_id": "worldId"
|
|
252
|
+
}
|
|
253
|
+
__properties: ClassVar[List[str]] = ["active", "ageGate", "calendarEntryId", "canRequestInvite", "capacity", "clientNumber", "closedAt", "contentSettings", "creatorId", "displayName", "friends", "full", "gameServerVersion", "groupAccessType", "hardClose", "hasCapacityForYou", "hidden", "id", "instanceId", "instancePersistenceEnabled", "location", "n_users", "name", "nonce", "ownerId", "permanent", "photonRegion", "platforms", "playerPersistenceEnabled", "private", "queueEnabled", "queueSize", "recommendedCapacity", "region", "roleRestricted", "secureName", "shortName", "strict", "tags", "type", "userCount", "users", "world", "worldId"]
|
|
254
|
+
|
|
255
|
+
@classmethod
|
|
256
|
+
def __preprocess_input_names(
|
|
257
|
+
cls,
|
|
258
|
+
obj: Any,
|
|
259
|
+
remove_hidden_storage_names: bool = True,
|
|
260
|
+
) -> Any:
|
|
261
|
+
if not isinstance(obj, _Mapping):
|
|
262
|
+
return obj
|
|
263
|
+
obj = dict(obj)
|
|
264
|
+
if "ageGate" not in obj and "age_gate" in obj:
|
|
265
|
+
obj["ageGate"] = obj["age_gate"]
|
|
266
|
+
obj.pop("age_gate", None)
|
|
267
|
+
if "calendarEntryId" not in obj and "calendar_entry_id" in obj:
|
|
268
|
+
obj["calendarEntryId"] = obj["calendar_entry_id"]
|
|
269
|
+
obj.pop("calendar_entry_id", None)
|
|
270
|
+
if "canRequestInvite" not in obj and "can_request_invite" in obj:
|
|
271
|
+
obj["canRequestInvite"] = obj["can_request_invite"]
|
|
272
|
+
obj.pop("can_request_invite", None)
|
|
273
|
+
if "clientNumber" not in obj and "client_number" in obj:
|
|
274
|
+
obj["clientNumber"] = obj["client_number"]
|
|
275
|
+
obj.pop("client_number", None)
|
|
276
|
+
if "closedAt" not in obj and "closed_at" in obj:
|
|
277
|
+
obj["closedAt"] = obj["closed_at"]
|
|
278
|
+
obj.pop("closed_at", None)
|
|
279
|
+
if "contentSettings" not in obj and "content_settings" in obj:
|
|
280
|
+
obj["contentSettings"] = obj["content_settings"]
|
|
281
|
+
obj.pop("content_settings", None)
|
|
282
|
+
if "creatorId" not in obj and "creator_id" in obj:
|
|
283
|
+
obj["creatorId"] = obj["creator_id"]
|
|
284
|
+
obj.pop("creator_id", None)
|
|
285
|
+
if "displayName" not in obj and "display_name" in obj:
|
|
286
|
+
obj["displayName"] = obj["display_name"]
|
|
287
|
+
obj.pop("display_name", None)
|
|
288
|
+
if "gameServerVersion" not in obj and "game_server_version" in obj:
|
|
289
|
+
obj["gameServerVersion"] = obj["game_server_version"]
|
|
290
|
+
obj.pop("game_server_version", None)
|
|
291
|
+
if "groupAccessType" not in obj and "group_access_type" in obj:
|
|
292
|
+
obj["groupAccessType"] = obj["group_access_type"]
|
|
293
|
+
obj.pop("group_access_type", None)
|
|
294
|
+
if "hardClose" not in obj and "hard_close" in obj:
|
|
295
|
+
obj["hardClose"] = obj["hard_close"]
|
|
296
|
+
obj.pop("hard_close", None)
|
|
297
|
+
if "hasCapacityForYou" not in obj and "has_capacity_for_you" in obj:
|
|
298
|
+
obj["hasCapacityForYou"] = obj["has_capacity_for_you"]
|
|
299
|
+
obj.pop("has_capacity_for_you", None)
|
|
300
|
+
if "instanceId" not in obj and "instance_id" in obj:
|
|
301
|
+
obj["instanceId"] = obj["instance_id"]
|
|
302
|
+
obj.pop("instance_id", None)
|
|
303
|
+
if "instancePersistenceEnabled" not in obj and "instance_persistence_enabled" in obj:
|
|
304
|
+
obj["instancePersistenceEnabled"] = obj["instance_persistence_enabled"]
|
|
305
|
+
obj.pop("instance_persistence_enabled", None)
|
|
306
|
+
if "ownerId" not in obj and "owner_id" in obj:
|
|
307
|
+
obj["ownerId"] = obj["owner_id"]
|
|
308
|
+
obj.pop("owner_id", None)
|
|
309
|
+
if "photonRegion" not in obj and "photon_region" in obj:
|
|
310
|
+
obj["photonRegion"] = obj["photon_region"]
|
|
311
|
+
obj.pop("photon_region", None)
|
|
312
|
+
if "playerPersistenceEnabled" not in obj and "player_persistence_enabled" in obj:
|
|
313
|
+
obj["playerPersistenceEnabled"] = obj["player_persistence_enabled"]
|
|
314
|
+
obj.pop("player_persistence_enabled", None)
|
|
315
|
+
if "queueEnabled" not in obj and "queue_enabled" in obj:
|
|
316
|
+
obj["queueEnabled"] = obj["queue_enabled"]
|
|
317
|
+
obj.pop("queue_enabled", None)
|
|
318
|
+
if "queueSize" not in obj and "queue_size" in obj:
|
|
319
|
+
obj["queueSize"] = obj["queue_size"]
|
|
320
|
+
obj.pop("queue_size", None)
|
|
321
|
+
if "recommendedCapacity" not in obj and "recommended_capacity" in obj:
|
|
322
|
+
obj["recommendedCapacity"] = obj["recommended_capacity"]
|
|
323
|
+
obj.pop("recommended_capacity", None)
|
|
324
|
+
if "roleRestricted" not in obj and "role_restricted" in obj:
|
|
325
|
+
obj["roleRestricted"] = obj["role_restricted"]
|
|
326
|
+
obj.pop("role_restricted", None)
|
|
327
|
+
if "secureName" not in obj and "secure_name" in obj:
|
|
328
|
+
obj["secureName"] = obj["secure_name"]
|
|
329
|
+
obj.pop("secure_name", None)
|
|
330
|
+
if "shortName" not in obj and "short_name" in obj:
|
|
331
|
+
obj["shortName"] = obj["short_name"]
|
|
332
|
+
obj.pop("short_name", None)
|
|
333
|
+
if "userCount" not in obj and "user_count" in obj:
|
|
334
|
+
obj["userCount"] = obj["user_count"]
|
|
335
|
+
obj.pop("user_count", None)
|
|
336
|
+
if "worldId" not in obj and "world_id" in obj:
|
|
337
|
+
obj["worldId"] = obj["world_id"]
|
|
338
|
+
obj.pop("world_id", None)
|
|
339
|
+
return obj
|
|
340
|
+
|
|
341
|
+
model_config = ConfigDict(
|
|
342
|
+
validate_by_name=True,
|
|
343
|
+
validate_by_alias=True,
|
|
344
|
+
validate_assignment=True,
|
|
345
|
+
extra="forbid",
|
|
346
|
+
protected_namespaces=(),
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
def to_str(self) -> str:
|
|
351
|
+
"""Returns the string representation of the model"""
|
|
352
|
+
return pprint.pformat(self.to_dict())
|
|
353
|
+
|
|
354
|
+
def __repr__(self) -> str:
|
|
355
|
+
"""For print and pprint"""
|
|
356
|
+
return self.to_str()
|
|
357
|
+
|
|
358
|
+
def __eq__(self, other: object) -> bool:
|
|
359
|
+
"""Returns true if both objects are equal"""
|
|
360
|
+
if not isinstance(other, Instance):
|
|
361
|
+
return False
|
|
362
|
+
|
|
363
|
+
return self.to_dict() == other.to_dict()
|
|
364
|
+
|
|
365
|
+
def __ne__(self, other: object) -> bool:
|
|
366
|
+
"""Returns true if both objects are not equal"""
|
|
367
|
+
if not isinstance(other, Instance):
|
|
368
|
+
return True
|
|
369
|
+
|
|
370
|
+
return not (self == other)
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
def to_json(self) -> str:
|
|
374
|
+
"""Returns the JSON representation of the model using alias"""
|
|
375
|
+
to_openapi_dict = _get_openapi_to_dict(self)
|
|
376
|
+
if to_openapi_dict is not None:
|
|
377
|
+
return json.dumps(to_jsonable_python(to_openapi_dict(self)))
|
|
378
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
379
|
+
|
|
380
|
+
@classmethod
|
|
381
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
382
|
+
"""Create an instance of Instance from a JSON string"""
|
|
383
|
+
return cls.from_dict(json.loads(json_str))
|
|
384
|
+
|
|
385
|
+
def to_dict(self, serialize: bool = False) -> Dict[str, Any]:
|
|
386
|
+
"""Return all declared model fields using public or wire names."""
|
|
387
|
+
return {
|
|
388
|
+
("active" if serialize else "active"): _to_legacy_value(getattr(self, "active", None), serialize),
|
|
389
|
+
("ageGate" if serialize else "age_gate"): _to_legacy_value(getattr(self, "age_gate", None), serialize),
|
|
390
|
+
("calendarEntryId" if serialize else "calendar_entry_id"): _to_legacy_value(getattr(self, "calendar_entry_id", None), serialize),
|
|
391
|
+
("canRequestInvite" if serialize else "can_request_invite"): _to_legacy_value(getattr(self, "can_request_invite", None), serialize),
|
|
392
|
+
("capacity" if serialize else "capacity"): _to_legacy_value(getattr(self, "capacity", None), serialize),
|
|
393
|
+
("clientNumber" if serialize else "client_number"): _to_legacy_value(getattr(self, "client_number", None), serialize),
|
|
394
|
+
("closedAt" if serialize else "closed_at"): _to_legacy_value(getattr(self, "closed_at", None), serialize),
|
|
395
|
+
("contentSettings" if serialize else "content_settings"): _to_legacy_value(getattr(self, "content_settings", None), serialize),
|
|
396
|
+
("creatorId" if serialize else "creator_id"): _to_legacy_value(getattr(self, "creator_id", None), serialize),
|
|
397
|
+
("displayName" if serialize else "display_name"): _to_legacy_value(getattr(self, "display_name", None), serialize),
|
|
398
|
+
("friends" if serialize else "friends"): _to_legacy_value(getattr(self, "friends", None), serialize),
|
|
399
|
+
("full" if serialize else "full"): _to_legacy_value(getattr(self, "full", None), serialize),
|
|
400
|
+
("gameServerVersion" if serialize else "game_server_version"): _to_legacy_value(getattr(self, "game_server_version", None), serialize),
|
|
401
|
+
("groupAccessType" if serialize else "group_access_type"): _to_legacy_value(getattr(self, "group_access_type", None), serialize),
|
|
402
|
+
("hardClose" if serialize else "hard_close"): _to_legacy_value(getattr(self, "hard_close", None), serialize),
|
|
403
|
+
("hasCapacityForYou" if serialize else "has_capacity_for_you"): _to_legacy_value(getattr(self, "has_capacity_for_you", None), serialize),
|
|
404
|
+
("hidden" if serialize else "hidden"): _to_legacy_value(getattr(self, "hidden", None), serialize),
|
|
405
|
+
("id" if serialize else "id"): _to_legacy_value(getattr(self, "id", None), serialize),
|
|
406
|
+
("instanceId" if serialize else "instance_id"): _to_legacy_value(getattr(self, "instance_id", None), serialize),
|
|
407
|
+
("instancePersistenceEnabled" if serialize else "instance_persistence_enabled"): _to_legacy_value(getattr(self, "instance_persistence_enabled", None), serialize),
|
|
408
|
+
("location" if serialize else "location"): _to_legacy_value(getattr(self, "location", None), serialize),
|
|
409
|
+
("n_users" if serialize else "n_users"): _to_legacy_value(getattr(self, "n_users", None), serialize),
|
|
410
|
+
("name" if serialize else "name"): _to_legacy_value(getattr(self, "name", None), serialize),
|
|
411
|
+
("nonce" if serialize else "nonce"): _to_legacy_value(getattr(self, "nonce", None), serialize),
|
|
412
|
+
("ownerId" if serialize else "owner_id"): _to_legacy_value(getattr(self, "owner_id", None), serialize),
|
|
413
|
+
("permanent" if serialize else "permanent"): _to_legacy_value(getattr(self, "permanent", None), serialize),
|
|
414
|
+
("photonRegion" if serialize else "photon_region"): _to_legacy_value(getattr(self, "photon_region", None), serialize),
|
|
415
|
+
("platforms" if serialize else "platforms"): _to_legacy_value(getattr(self, "platforms", None), serialize),
|
|
416
|
+
("playerPersistenceEnabled" if serialize else "player_persistence_enabled"): _to_legacy_value(getattr(self, "player_persistence_enabled", None), serialize),
|
|
417
|
+
("private" if serialize else "private"): _to_legacy_value(getattr(self, "private", None), serialize),
|
|
418
|
+
("queueEnabled" if serialize else "queue_enabled"): _to_legacy_value(getattr(self, "queue_enabled", None), serialize),
|
|
419
|
+
("queueSize" if serialize else "queue_size"): _to_legacy_value(getattr(self, "queue_size", None), serialize),
|
|
420
|
+
("recommendedCapacity" if serialize else "recommended_capacity"): _to_legacy_value(getattr(self, "recommended_capacity", None), serialize),
|
|
421
|
+
("region" if serialize else "region"): _to_legacy_value(getattr(self, "region", None), serialize),
|
|
422
|
+
("roleRestricted" if serialize else "role_restricted"): _to_legacy_value(getattr(self, "role_restricted", None), serialize),
|
|
423
|
+
("secureName" if serialize else "secure_name"): _to_legacy_value(getattr(self, "secure_name", None), serialize),
|
|
424
|
+
("shortName" if serialize else "short_name"): _to_legacy_value(getattr(self, "short_name", None), serialize),
|
|
425
|
+
("strict" if serialize else "strict"): _to_legacy_value(getattr(self, "strict", None), serialize),
|
|
426
|
+
("tags" if serialize else "tags"): _to_legacy_value(getattr(self, "tags", None), serialize),
|
|
427
|
+
("type" if serialize else "type"): _to_legacy_value(getattr(self, "type", None), serialize),
|
|
428
|
+
("userCount" if serialize else "user_count"): _to_legacy_value(getattr(self, "user_count", None), serialize),
|
|
429
|
+
("users" if serialize else "users"): _to_legacy_value(getattr(self, "users", None), serialize),
|
|
430
|
+
("world" if serialize else "world"): _to_legacy_value(getattr(self, "world", None), serialize),
|
|
431
|
+
("worldId" if serialize else "world_id"): _to_legacy_value(getattr(self, "world_id", None), serialize),
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
def __openapi_generator_modern_projection(self) -> Dict[str, Any]:
|
|
435
|
+
"""Return the dictionary representation of the model using alias.
|
|
436
|
+
|
|
437
|
+
This has the following differences from calling pydantic's
|
|
438
|
+
`self.model_dump(by_alias=True)`:
|
|
439
|
+
|
|
440
|
+
* `None` is only added to the output dict for nullable fields that
|
|
441
|
+
were set at model initialization. Other fields with value `None`
|
|
442
|
+
are ignored.
|
|
443
|
+
"""
|
|
444
|
+
excluded_fields: Set[str] = set([
|
|
445
|
+
])
|
|
446
|
+
|
|
447
|
+
_dict = self.model_dump(
|
|
448
|
+
by_alias=True,
|
|
449
|
+
exclude=excluded_fields,
|
|
450
|
+
exclude_none=True,
|
|
451
|
+
)
|
|
452
|
+
# override the default output from pydantic by calling `to_dict()` of content_settings
|
|
453
|
+
if self.content_settings:
|
|
454
|
+
_dict['contentSettings'] = _to_openapi_value(self.content_settings)
|
|
455
|
+
# override the default output from pydantic by calling `to_dict()` of platforms
|
|
456
|
+
if self.platforms:
|
|
457
|
+
_dict['platforms'] = _to_openapi_value(self.platforms)
|
|
458
|
+
# override the default output from pydantic by calling `to_dict()` of each item in users (list)
|
|
459
|
+
_items = []
|
|
460
|
+
if self.users:
|
|
461
|
+
for _item_users in self.users:
|
|
462
|
+
if _item_users:
|
|
463
|
+
_items.append(_to_openapi_value(_item_users))
|
|
464
|
+
_dict['users'] = _items
|
|
465
|
+
# override the default output from pydantic by calling `to_dict()` of world
|
|
466
|
+
if self.world:
|
|
467
|
+
_dict['world'] = _to_openapi_value(self.world)
|
|
468
|
+
# set to None if age_gate (nullable) is None
|
|
469
|
+
# and model_fields_set contains the field
|
|
470
|
+
if self.age_gate is None and "age_gate" in self.model_fields_set:
|
|
471
|
+
_dict['ageGate'] = None
|
|
472
|
+
|
|
473
|
+
# set to None if calendar_entry_id (nullable) is None
|
|
474
|
+
# and model_fields_set contains the field
|
|
475
|
+
if self.calendar_entry_id is None and "calendar_entry_id" in self.model_fields_set:
|
|
476
|
+
_dict['calendarEntryId'] = None
|
|
477
|
+
|
|
478
|
+
# set to None if closed_at (nullable) is None
|
|
479
|
+
# and model_fields_set contains the field
|
|
480
|
+
if self.closed_at is None and "closed_at" in self.model_fields_set:
|
|
481
|
+
_dict['closedAt'] = None
|
|
482
|
+
|
|
483
|
+
# set to None if display_name (nullable) is None
|
|
484
|
+
# and model_fields_set contains the field
|
|
485
|
+
if self.display_name is None and "display_name" in self.model_fields_set:
|
|
486
|
+
_dict['displayName'] = None
|
|
487
|
+
|
|
488
|
+
# set to None if game_server_version (nullable) is None
|
|
489
|
+
# and model_fields_set contains the field
|
|
490
|
+
if self.game_server_version is None and "game_server_version" in self.model_fields_set:
|
|
491
|
+
_dict['gameServerVersion'] = None
|
|
492
|
+
|
|
493
|
+
# set to None if hard_close (nullable) is None
|
|
494
|
+
# and model_fields_set contains the field
|
|
495
|
+
if self.hard_close is None and "hard_close" in self.model_fields_set:
|
|
496
|
+
_dict['hardClose'] = None
|
|
497
|
+
|
|
498
|
+
# set to None if instance_persistence_enabled (nullable) is None
|
|
499
|
+
# and model_fields_set contains the field
|
|
500
|
+
if self.instance_persistence_enabled is None and "instance_persistence_enabled" in self.model_fields_set:
|
|
501
|
+
_dict['instancePersistenceEnabled'] = None
|
|
502
|
+
|
|
503
|
+
# set to None if owner_id (nullable) is None
|
|
504
|
+
# and model_fields_set contains the field
|
|
505
|
+
if self.owner_id is None and "owner_id" in self.model_fields_set:
|
|
506
|
+
_dict['ownerId'] = None
|
|
507
|
+
|
|
508
|
+
# set to None if player_persistence_enabled (nullable) is None
|
|
509
|
+
# and model_fields_set contains the field
|
|
510
|
+
if self.player_persistence_enabled is None and "player_persistence_enabled" in self.model_fields_set:
|
|
511
|
+
_dict['playerPersistenceEnabled'] = None
|
|
512
|
+
|
|
513
|
+
# set to None if short_name (nullable) is None
|
|
514
|
+
# and model_fields_set contains the field
|
|
515
|
+
if self.short_name is None and "short_name" in self.model_fields_set:
|
|
516
|
+
_dict['shortName'] = None
|
|
517
|
+
|
|
518
|
+
return _dict
|
|
519
|
+
|
|
520
|
+
setattr(
|
|
521
|
+
to_dict,
|
|
522
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
523
|
+
__openapi_generator_modern_projection,
|
|
524
|
+
)
|
|
525
|
+
setattr(
|
|
526
|
+
__openapi_generator_modern_projection,
|
|
527
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
528
|
+
to_dict,
|
|
529
|
+
)
|
|
530
|
+
del __openapi_generator_modern_projection
|
|
531
|
+
|
|
532
|
+
@classmethod
|
|
533
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
534
|
+
"""Create an instance of Instance from a dict"""
|
|
535
|
+
if obj is None:
|
|
536
|
+
return None
|
|
537
|
+
|
|
538
|
+
if not isinstance(obj, dict):
|
|
539
|
+
return cls.model_validate(obj)
|
|
540
|
+
|
|
541
|
+
obj = _cast(
|
|
542
|
+
Dict[str, Any],
|
|
543
|
+
cls.__preprocess_input_names(
|
|
544
|
+
obj,
|
|
545
|
+
remove_hidden_storage_names=True,
|
|
546
|
+
),
|
|
547
|
+
)
|
|
548
|
+
|
|
549
|
+
_obj = cls.model_validate({
|
|
550
|
+
"active": obj.get("active") if obj.get("active") is not None else True,
|
|
551
|
+
"ageGate": obj.get("ageGate"),
|
|
552
|
+
"calendarEntryId": obj.get("calendarEntryId"),
|
|
553
|
+
"canRequestInvite": obj.get("canRequestInvite") if obj.get("canRequestInvite") is not None else True,
|
|
554
|
+
"capacity": obj.get("capacity"),
|
|
555
|
+
"clientNumber": obj.get("clientNumber"),
|
|
556
|
+
"closedAt": obj.get("closedAt"),
|
|
557
|
+
"contentSettings": InstanceContentSettings.from_dict(obj["contentSettings"]) if obj.get("contentSettings") is not None else None,
|
|
558
|
+
"creatorId": obj.get("creatorId"),
|
|
559
|
+
"displayName": obj.get("displayName"),
|
|
560
|
+
"friends": obj.get("friends"),
|
|
561
|
+
"full": obj.get("full") if obj.get("full") is not None else False,
|
|
562
|
+
"gameServerVersion": obj.get("gameServerVersion"),
|
|
563
|
+
"groupAccessType": obj.get("groupAccessType") if obj.get("groupAccessType") is not None else GroupAccessType.MEMBERS,
|
|
564
|
+
"hardClose": obj.get("hardClose"),
|
|
565
|
+
"hasCapacityForYou": obj.get("hasCapacityForYou"),
|
|
566
|
+
"hidden": obj.get("hidden"),
|
|
567
|
+
"id": obj.get("id"),
|
|
568
|
+
"instanceId": obj.get("instanceId"),
|
|
569
|
+
"instancePersistenceEnabled": obj.get("instancePersistenceEnabled"),
|
|
570
|
+
"location": obj.get("location"),
|
|
571
|
+
"n_users": obj.get("n_users"),
|
|
572
|
+
"name": obj.get("name"),
|
|
573
|
+
"nonce": obj.get("nonce"),
|
|
574
|
+
"ownerId": obj.get("ownerId"),
|
|
575
|
+
"permanent": obj.get("permanent") if obj.get("permanent") is not None else False,
|
|
576
|
+
"photonRegion": obj.get("photonRegion") if obj.get("photonRegion") is not None else Region.US,
|
|
577
|
+
"platforms": InstancePlatforms.from_dict(obj["platforms"]) if obj.get("platforms") is not None else None,
|
|
578
|
+
"playerPersistenceEnabled": obj.get("playerPersistenceEnabled"),
|
|
579
|
+
"private": obj.get("private"),
|
|
580
|
+
"queueEnabled": obj.get("queueEnabled"),
|
|
581
|
+
"queueSize": obj.get("queueSize"),
|
|
582
|
+
"recommendedCapacity": obj.get("recommendedCapacity"),
|
|
583
|
+
"region": obj.get("region") if obj.get("region") is not None else InstanceRegion.US,
|
|
584
|
+
"roleRestricted": obj.get("roleRestricted"),
|
|
585
|
+
"secureName": obj.get("secureName"),
|
|
586
|
+
"shortName": obj.get("shortName"),
|
|
587
|
+
"strict": obj.get("strict"),
|
|
588
|
+
"tags": obj.get("tags"),
|
|
589
|
+
"type": obj.get("type"),
|
|
590
|
+
"userCount": obj.get("userCount"),
|
|
591
|
+
"users": [LimitedUserInstance.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None,
|
|
592
|
+
"world": World.from_dict(obj["world"]) if obj.get("world") is not None else None,
|
|
593
|
+
"worldId": obj.get("worldId")
|
|
594
|
+
})
|
|
595
|
+
return _obj
|
|
596
|
+
|
|
597
|
+
|