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,255 @@
|
|
|
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, StrictBool, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, cast as _cast
|
|
23
|
+
from vrchatapi.models.group_permissions import GroupPermissions
|
|
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 CreateGroupRoleRequest(BaseModel):
|
|
98
|
+
"""
|
|
99
|
+
CreateGroupRoleRequest
|
|
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
|
+
description: Optional[StrictStr] = None
|
|
108
|
+
id: Optional[StrictStr] = None
|
|
109
|
+
is_self_assignable: Optional[StrictBool] = Field(default=False, validation_alias=AliasChoices("isSelfAssignable", "is_self_assignable"), serialization_alias="isSelfAssignable")
|
|
110
|
+
name: Optional[StrictStr] = None
|
|
111
|
+
permissions: Optional[List[GroupPermissions]] = None
|
|
112
|
+
openapi_types: ClassVar[Dict[str, str]] = {
|
|
113
|
+
"description": "str",
|
|
114
|
+
"id": "str",
|
|
115
|
+
"is_self_assignable": "bool",
|
|
116
|
+
"name": "str",
|
|
117
|
+
"permissions": "List[GroupPermissions]"
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
attribute_map: ClassVar[Dict[str, str]] = {
|
|
121
|
+
"description": "description",
|
|
122
|
+
"id": "id",
|
|
123
|
+
"is_self_assignable": "isSelfAssignable",
|
|
124
|
+
"name": "name",
|
|
125
|
+
"permissions": "permissions"
|
|
126
|
+
}
|
|
127
|
+
__properties: ClassVar[List[str]] = ["description", "id", "isSelfAssignable", "name", "permissions"]
|
|
128
|
+
|
|
129
|
+
@classmethod
|
|
130
|
+
def __preprocess_input_names(
|
|
131
|
+
cls,
|
|
132
|
+
obj: Any,
|
|
133
|
+
remove_hidden_storage_names: bool = True,
|
|
134
|
+
) -> Any:
|
|
135
|
+
if not isinstance(obj, _Mapping):
|
|
136
|
+
return obj
|
|
137
|
+
obj = dict(obj)
|
|
138
|
+
if "isSelfAssignable" not in obj and "is_self_assignable" in obj:
|
|
139
|
+
obj["isSelfAssignable"] = obj["is_self_assignable"]
|
|
140
|
+
obj.pop("is_self_assignable", None)
|
|
141
|
+
return obj
|
|
142
|
+
|
|
143
|
+
model_config = ConfigDict(
|
|
144
|
+
validate_by_name=True,
|
|
145
|
+
validate_by_alias=True,
|
|
146
|
+
validate_assignment=True,
|
|
147
|
+
extra="forbid",
|
|
148
|
+
protected_namespaces=(),
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def to_str(self) -> str:
|
|
153
|
+
"""Returns the string representation of the model"""
|
|
154
|
+
return pprint.pformat(self.to_dict())
|
|
155
|
+
|
|
156
|
+
def __repr__(self) -> str:
|
|
157
|
+
"""For print and pprint"""
|
|
158
|
+
return self.to_str()
|
|
159
|
+
|
|
160
|
+
def __eq__(self, other: object) -> bool:
|
|
161
|
+
"""Returns true if both objects are equal"""
|
|
162
|
+
if not isinstance(other, CreateGroupRoleRequest):
|
|
163
|
+
return False
|
|
164
|
+
|
|
165
|
+
return self.to_dict() == other.to_dict()
|
|
166
|
+
|
|
167
|
+
def __ne__(self, other: object) -> bool:
|
|
168
|
+
"""Returns true if both objects are not equal"""
|
|
169
|
+
if not isinstance(other, CreateGroupRoleRequest):
|
|
170
|
+
return True
|
|
171
|
+
|
|
172
|
+
return not (self == other)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def to_json(self) -> str:
|
|
176
|
+
"""Returns the JSON representation of the model using alias"""
|
|
177
|
+
to_openapi_dict = _get_openapi_to_dict(self)
|
|
178
|
+
if to_openapi_dict is not None:
|
|
179
|
+
return json.dumps(to_jsonable_python(to_openapi_dict(self)))
|
|
180
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
181
|
+
|
|
182
|
+
@classmethod
|
|
183
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
184
|
+
"""Create an instance of CreateGroupRoleRequest from a JSON string"""
|
|
185
|
+
return cls.from_dict(json.loads(json_str))
|
|
186
|
+
|
|
187
|
+
def to_dict(self, serialize: bool = False) -> Dict[str, Any]:
|
|
188
|
+
"""Return all declared model fields using public or wire names."""
|
|
189
|
+
return {
|
|
190
|
+
("description" if serialize else "description"): _to_legacy_value(getattr(self, "description", None), serialize),
|
|
191
|
+
("id" if serialize else "id"): _to_legacy_value(getattr(self, "id", None), serialize),
|
|
192
|
+
("isSelfAssignable" if serialize else "is_self_assignable"): _to_legacy_value(getattr(self, "is_self_assignable", None), serialize),
|
|
193
|
+
("name" if serialize else "name"): _to_legacy_value(getattr(self, "name", None), serialize),
|
|
194
|
+
("permissions" if serialize else "permissions"): _to_legacy_value(getattr(self, "permissions", None), serialize),
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
def __openapi_generator_modern_projection(self) -> Dict[str, Any]:
|
|
198
|
+
"""Return the dictionary representation of the model using alias.
|
|
199
|
+
|
|
200
|
+
This has the following differences from calling pydantic's
|
|
201
|
+
`self.model_dump(by_alias=True)`:
|
|
202
|
+
|
|
203
|
+
* `None` is only added to the output dict for nullable fields that
|
|
204
|
+
were set at model initialization. Other fields with value `None`
|
|
205
|
+
are ignored.
|
|
206
|
+
"""
|
|
207
|
+
excluded_fields: Set[str] = set([
|
|
208
|
+
])
|
|
209
|
+
|
|
210
|
+
_dict = self.model_dump(
|
|
211
|
+
by_alias=True,
|
|
212
|
+
exclude=excluded_fields,
|
|
213
|
+
exclude_none=True,
|
|
214
|
+
)
|
|
215
|
+
return _dict
|
|
216
|
+
|
|
217
|
+
setattr(
|
|
218
|
+
to_dict,
|
|
219
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
220
|
+
__openapi_generator_modern_projection,
|
|
221
|
+
)
|
|
222
|
+
setattr(
|
|
223
|
+
__openapi_generator_modern_projection,
|
|
224
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
225
|
+
to_dict,
|
|
226
|
+
)
|
|
227
|
+
del __openapi_generator_modern_projection
|
|
228
|
+
|
|
229
|
+
@classmethod
|
|
230
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
231
|
+
"""Create an instance of CreateGroupRoleRequest from a dict"""
|
|
232
|
+
if obj is None:
|
|
233
|
+
return None
|
|
234
|
+
|
|
235
|
+
if not isinstance(obj, dict):
|
|
236
|
+
return cls.model_validate(obj)
|
|
237
|
+
|
|
238
|
+
obj = _cast(
|
|
239
|
+
Dict[str, Any],
|
|
240
|
+
cls.__preprocess_input_names(
|
|
241
|
+
obj,
|
|
242
|
+
remove_hidden_storage_names=True,
|
|
243
|
+
),
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
_obj = cls.model_validate({
|
|
247
|
+
"description": obj.get("description"),
|
|
248
|
+
"id": obj.get("id"),
|
|
249
|
+
"isSelfAssignable": obj.get("isSelfAssignable") if obj.get("isSelfAssignable") is not None else False,
|
|
250
|
+
"name": obj.get("name"),
|
|
251
|
+
"permissions": obj.get("permissions")
|
|
252
|
+
})
|
|
253
|
+
return _obj
|
|
254
|
+
|
|
255
|
+
|
|
@@ -0,0 +1,384 @@
|
|
|
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 vrchatapi.models.group_access_type import GroupAccessType
|
|
25
|
+
from vrchatapi.models.instance_content_settings import InstanceContentSettings
|
|
26
|
+
from vrchatapi.models.instance_region import InstanceRegion
|
|
27
|
+
from vrchatapi.models.instance_type import InstanceType
|
|
28
|
+
from typing import Optional, Set
|
|
29
|
+
from typing_extensions import Self
|
|
30
|
+
from pydantic_core import to_jsonable_python
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
_OPENAPI_GENERATOR_TO_DICT = "_openapi_generator_to_dict"
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _get_openapi_to_dict(value: Any) -> Any:
|
|
37
|
+
# Reciprocal function references preserve inherited generated methods
|
|
38
|
+
# without reserving model member names. Checking both directions also
|
|
39
|
+
# rejects overrides whose decorators copy function attributes.
|
|
40
|
+
to_dict = getattr(value, "to_dict", None)
|
|
41
|
+
type_to_dict = getattr(type(value), "to_dict", None)
|
|
42
|
+
if (
|
|
43
|
+
not callable(to_dict)
|
|
44
|
+
or getattr(to_dict, "__func__", None) is not type_to_dict
|
|
45
|
+
):
|
|
46
|
+
return None
|
|
47
|
+
|
|
48
|
+
openapi_to_dict = getattr(
|
|
49
|
+
type_to_dict, _OPENAPI_GENERATOR_TO_DICT, None
|
|
50
|
+
)
|
|
51
|
+
if (
|
|
52
|
+
not callable(openapi_to_dict)
|
|
53
|
+
or getattr(
|
|
54
|
+
openapi_to_dict,
|
|
55
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
56
|
+
None,
|
|
57
|
+
) is not type_to_dict
|
|
58
|
+
):
|
|
59
|
+
return None
|
|
60
|
+
return openapi_to_dict
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def _to_legacy_item(value: Any, serialize: bool) -> Any:
|
|
64
|
+
to_dict = getattr(value, "to_dict", None)
|
|
65
|
+
if _get_openapi_to_dict(value) is not None and callable(to_dict):
|
|
66
|
+
return to_dict(serialize=serialize)
|
|
67
|
+
if callable(to_dict):
|
|
68
|
+
return to_dict()
|
|
69
|
+
return value
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def _to_legacy_value(value: Any, serialize: bool) -> Any:
|
|
73
|
+
# python-legacy converted only immediate list elements or dictionary values:
|
|
74
|
+
# https://github.com/OpenAPITools/openapi-generator/blob/c84b949df1a9ec04ba75989cb49b45c940c2f694/modules/openapi-generator/src/main/resources/python-legacy/model.mustache#L203-L231
|
|
75
|
+
if isinstance(value, list):
|
|
76
|
+
return [_to_legacy_item(item, serialize) for item in value]
|
|
77
|
+
if isinstance(value, dict):
|
|
78
|
+
return {
|
|
79
|
+
key: _to_legacy_item(item, serialize)
|
|
80
|
+
for key, item in value.items()
|
|
81
|
+
}
|
|
82
|
+
return _to_legacy_item(value, serialize)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def _to_openapi_value(value: Any) -> Any:
|
|
86
|
+
if isinstance(value, list):
|
|
87
|
+
return [_to_openapi_value(item) for item in value]
|
|
88
|
+
if isinstance(value, dict):
|
|
89
|
+
return {key: _to_openapi_value(item) for key, item in value.items()}
|
|
90
|
+
|
|
91
|
+
to_openapi_dict = _get_openapi_to_dict(value)
|
|
92
|
+
if to_openapi_dict is not None:
|
|
93
|
+
return to_openapi_dict(value)
|
|
94
|
+
|
|
95
|
+
to_dict = getattr(value, "to_dict", None)
|
|
96
|
+
if callable(to_dict):
|
|
97
|
+
return to_dict()
|
|
98
|
+
return value
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class CreateInstanceRequest(BaseModel):
|
|
102
|
+
"""
|
|
103
|
+
CreateInstanceRequest
|
|
104
|
+
|
|
105
|
+
Attributes:
|
|
106
|
+
openapi_types (dict): The key is attribute name
|
|
107
|
+
and the value is attribute type.
|
|
108
|
+
attribute_map (dict): The key is attribute name
|
|
109
|
+
and the value is json key in definition.
|
|
110
|
+
""" # noqa: E501
|
|
111
|
+
age_gate: Optional[StrictBool] = Field(default=False, validation_alias=AliasChoices("ageGate", "age_gate"), serialization_alias="ageGate")
|
|
112
|
+
calendar_entry_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("calendarEntryId", "calendar_entry_id"), serialization_alias="calendarEntryId")
|
|
113
|
+
can_request_invite: Optional[StrictBool] = Field(default=False, validation_alias=AliasChoices("canRequestInvite", "can_request_invite"), serialization_alias="canRequestInvite", description="Only applies to invite type instances to make them invite+")
|
|
114
|
+
closed_at: Optional[datetime] = Field(default=None, validation_alias=AliasChoices("closedAt", "closed_at"), serialization_alias="closedAt", description="The time after which users won't be allowed to join the instance. This doesn't work for public instances.")
|
|
115
|
+
content_settings: Optional[InstanceContentSettings] = Field(default=None, validation_alias=AliasChoices("contentSettings", "content_settings"), serialization_alias="contentSettings")
|
|
116
|
+
display_name: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("displayName", "display_name"), serialization_alias="displayName")
|
|
117
|
+
group_access_type: Optional[GroupAccessType] = Field(default=GroupAccessType.MEMBERS, validation_alias=AliasChoices("groupAccessType", "group_access_type"), serialization_alias="groupAccessType")
|
|
118
|
+
hard_close: Optional[StrictBool] = Field(default=False, validation_alias=AliasChoices("hardClose", "hard_close"), serialization_alias="hardClose", description="Currently unused, but will eventually be a flag to set if the closing of the instance should kick people.")
|
|
119
|
+
instance_persistence_enabled: Optional[StrictBool] = Field(default=None, validation_alias=AliasChoices("instancePersistenceEnabled", "instance_persistence_enabled"), serialization_alias="instancePersistenceEnabled")
|
|
120
|
+
invite_only: Optional[StrictBool] = Field(default=False, validation_alias=AliasChoices("inviteOnly", "invite_only"), serialization_alias="inviteOnly")
|
|
121
|
+
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"]})
|
|
122
|
+
player_persistence_enabled: Optional[StrictBool] = Field(default=None, validation_alias=AliasChoices("playerPersistenceEnabled", "player_persistence_enabled"), serialization_alias="playerPersistenceEnabled")
|
|
123
|
+
queue_enabled: Optional[StrictBool] = Field(default=False, validation_alias=AliasChoices("queueEnabled", "queue_enabled"), serialization_alias="queueEnabled")
|
|
124
|
+
region: Optional[InstanceRegion] = None
|
|
125
|
+
role_ids: Optional[List[StrictStr]] = Field(default=None, validation_alias=AliasChoices("roleIds", "role_ids"), serialization_alias="roleIds", description="Group roleIds that are allowed to join if the type is \"group\" and groupAccessType is \"member\"")
|
|
126
|
+
type: Optional[InstanceType] = None
|
|
127
|
+
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"]})
|
|
128
|
+
openapi_types: ClassVar[Dict[str, str]] = {
|
|
129
|
+
"age_gate": "bool",
|
|
130
|
+
"calendar_entry_id": "str",
|
|
131
|
+
"can_request_invite": "bool",
|
|
132
|
+
"closed_at": "datetime",
|
|
133
|
+
"content_settings": "InstanceContentSettings",
|
|
134
|
+
"display_name": "str",
|
|
135
|
+
"group_access_type": "GroupAccessType",
|
|
136
|
+
"hard_close": "bool",
|
|
137
|
+
"instance_persistence_enabled": "bool",
|
|
138
|
+
"invite_only": "bool",
|
|
139
|
+
"owner_id": "str",
|
|
140
|
+
"player_persistence_enabled": "bool",
|
|
141
|
+
"queue_enabled": "bool",
|
|
142
|
+
"region": "InstanceRegion",
|
|
143
|
+
"role_ids": "List[str]",
|
|
144
|
+
"type": "InstanceType",
|
|
145
|
+
"world_id": "str"
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
attribute_map: ClassVar[Dict[str, str]] = {
|
|
149
|
+
"age_gate": "ageGate",
|
|
150
|
+
"calendar_entry_id": "calendarEntryId",
|
|
151
|
+
"can_request_invite": "canRequestInvite",
|
|
152
|
+
"closed_at": "closedAt",
|
|
153
|
+
"content_settings": "contentSettings",
|
|
154
|
+
"display_name": "displayName",
|
|
155
|
+
"group_access_type": "groupAccessType",
|
|
156
|
+
"hard_close": "hardClose",
|
|
157
|
+
"instance_persistence_enabled": "instancePersistenceEnabled",
|
|
158
|
+
"invite_only": "inviteOnly",
|
|
159
|
+
"owner_id": "ownerId",
|
|
160
|
+
"player_persistence_enabled": "playerPersistenceEnabled",
|
|
161
|
+
"queue_enabled": "queueEnabled",
|
|
162
|
+
"region": "region",
|
|
163
|
+
"role_ids": "roleIds",
|
|
164
|
+
"type": "type",
|
|
165
|
+
"world_id": "worldId"
|
|
166
|
+
}
|
|
167
|
+
__properties: ClassVar[List[str]] = ["ageGate", "calendarEntryId", "canRequestInvite", "closedAt", "contentSettings", "displayName", "groupAccessType", "hardClose", "instancePersistenceEnabled", "inviteOnly", "ownerId", "playerPersistenceEnabled", "queueEnabled", "region", "roleIds", "type", "worldId"]
|
|
168
|
+
|
|
169
|
+
@classmethod
|
|
170
|
+
def __preprocess_input_names(
|
|
171
|
+
cls,
|
|
172
|
+
obj: Any,
|
|
173
|
+
remove_hidden_storage_names: bool = True,
|
|
174
|
+
) -> Any:
|
|
175
|
+
if not isinstance(obj, _Mapping):
|
|
176
|
+
return obj
|
|
177
|
+
obj = dict(obj)
|
|
178
|
+
if "ageGate" not in obj and "age_gate" in obj:
|
|
179
|
+
obj["ageGate"] = obj["age_gate"]
|
|
180
|
+
obj.pop("age_gate", None)
|
|
181
|
+
if "calendarEntryId" not in obj and "calendar_entry_id" in obj:
|
|
182
|
+
obj["calendarEntryId"] = obj["calendar_entry_id"]
|
|
183
|
+
obj.pop("calendar_entry_id", None)
|
|
184
|
+
if "canRequestInvite" not in obj and "can_request_invite" in obj:
|
|
185
|
+
obj["canRequestInvite"] = obj["can_request_invite"]
|
|
186
|
+
obj.pop("can_request_invite", None)
|
|
187
|
+
if "closedAt" not in obj and "closed_at" in obj:
|
|
188
|
+
obj["closedAt"] = obj["closed_at"]
|
|
189
|
+
obj.pop("closed_at", None)
|
|
190
|
+
if "contentSettings" not in obj and "content_settings" in obj:
|
|
191
|
+
obj["contentSettings"] = obj["content_settings"]
|
|
192
|
+
obj.pop("content_settings", None)
|
|
193
|
+
if "displayName" not in obj and "display_name" in obj:
|
|
194
|
+
obj["displayName"] = obj["display_name"]
|
|
195
|
+
obj.pop("display_name", None)
|
|
196
|
+
if "groupAccessType" not in obj and "group_access_type" in obj:
|
|
197
|
+
obj["groupAccessType"] = obj["group_access_type"]
|
|
198
|
+
obj.pop("group_access_type", None)
|
|
199
|
+
if "hardClose" not in obj and "hard_close" in obj:
|
|
200
|
+
obj["hardClose"] = obj["hard_close"]
|
|
201
|
+
obj.pop("hard_close", None)
|
|
202
|
+
if "instancePersistenceEnabled" not in obj and "instance_persistence_enabled" in obj:
|
|
203
|
+
obj["instancePersistenceEnabled"] = obj["instance_persistence_enabled"]
|
|
204
|
+
obj.pop("instance_persistence_enabled", None)
|
|
205
|
+
if "inviteOnly" not in obj and "invite_only" in obj:
|
|
206
|
+
obj["inviteOnly"] = obj["invite_only"]
|
|
207
|
+
obj.pop("invite_only", None)
|
|
208
|
+
if "ownerId" not in obj and "owner_id" in obj:
|
|
209
|
+
obj["ownerId"] = obj["owner_id"]
|
|
210
|
+
obj.pop("owner_id", None)
|
|
211
|
+
if "playerPersistenceEnabled" not in obj and "player_persistence_enabled" in obj:
|
|
212
|
+
obj["playerPersistenceEnabled"] = obj["player_persistence_enabled"]
|
|
213
|
+
obj.pop("player_persistence_enabled", None)
|
|
214
|
+
if "queueEnabled" not in obj and "queue_enabled" in obj:
|
|
215
|
+
obj["queueEnabled"] = obj["queue_enabled"]
|
|
216
|
+
obj.pop("queue_enabled", None)
|
|
217
|
+
if "roleIds" not in obj and "role_ids" in obj:
|
|
218
|
+
obj["roleIds"] = obj["role_ids"]
|
|
219
|
+
obj.pop("role_ids", None)
|
|
220
|
+
if "worldId" not in obj and "world_id" in obj:
|
|
221
|
+
obj["worldId"] = obj["world_id"]
|
|
222
|
+
obj.pop("world_id", None)
|
|
223
|
+
return obj
|
|
224
|
+
|
|
225
|
+
model_config = ConfigDict(
|
|
226
|
+
validate_by_name=True,
|
|
227
|
+
validate_by_alias=True,
|
|
228
|
+
validate_assignment=True,
|
|
229
|
+
extra="forbid",
|
|
230
|
+
protected_namespaces=(),
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
def to_str(self) -> str:
|
|
235
|
+
"""Returns the string representation of the model"""
|
|
236
|
+
return pprint.pformat(self.to_dict())
|
|
237
|
+
|
|
238
|
+
def __repr__(self) -> str:
|
|
239
|
+
"""For print and pprint"""
|
|
240
|
+
return self.to_str()
|
|
241
|
+
|
|
242
|
+
def __eq__(self, other: object) -> bool:
|
|
243
|
+
"""Returns true if both objects are equal"""
|
|
244
|
+
if not isinstance(other, CreateInstanceRequest):
|
|
245
|
+
return False
|
|
246
|
+
|
|
247
|
+
return self.to_dict() == other.to_dict()
|
|
248
|
+
|
|
249
|
+
def __ne__(self, other: object) -> bool:
|
|
250
|
+
"""Returns true if both objects are not equal"""
|
|
251
|
+
if not isinstance(other, CreateInstanceRequest):
|
|
252
|
+
return True
|
|
253
|
+
|
|
254
|
+
return not (self == other)
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
def to_json(self) -> str:
|
|
258
|
+
"""Returns the JSON representation of the model using alias"""
|
|
259
|
+
to_openapi_dict = _get_openapi_to_dict(self)
|
|
260
|
+
if to_openapi_dict is not None:
|
|
261
|
+
return json.dumps(to_jsonable_python(to_openapi_dict(self)))
|
|
262
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
263
|
+
|
|
264
|
+
@classmethod
|
|
265
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
266
|
+
"""Create an instance of CreateInstanceRequest from a JSON string"""
|
|
267
|
+
return cls.from_dict(json.loads(json_str))
|
|
268
|
+
|
|
269
|
+
def to_dict(self, serialize: bool = False) -> Dict[str, Any]:
|
|
270
|
+
"""Return all declared model fields using public or wire names."""
|
|
271
|
+
return {
|
|
272
|
+
("ageGate" if serialize else "age_gate"): _to_legacy_value(getattr(self, "age_gate", None), serialize),
|
|
273
|
+
("calendarEntryId" if serialize else "calendar_entry_id"): _to_legacy_value(getattr(self, "calendar_entry_id", None), serialize),
|
|
274
|
+
("canRequestInvite" if serialize else "can_request_invite"): _to_legacy_value(getattr(self, "can_request_invite", None), serialize),
|
|
275
|
+
("closedAt" if serialize else "closed_at"): _to_legacy_value(getattr(self, "closed_at", None), serialize),
|
|
276
|
+
("contentSettings" if serialize else "content_settings"): _to_legacy_value(getattr(self, "content_settings", None), serialize),
|
|
277
|
+
("displayName" if serialize else "display_name"): _to_legacy_value(getattr(self, "display_name", None), serialize),
|
|
278
|
+
("groupAccessType" if serialize else "group_access_type"): _to_legacy_value(getattr(self, "group_access_type", None), serialize),
|
|
279
|
+
("hardClose" if serialize else "hard_close"): _to_legacy_value(getattr(self, "hard_close", None), serialize),
|
|
280
|
+
("instancePersistenceEnabled" if serialize else "instance_persistence_enabled"): _to_legacy_value(getattr(self, "instance_persistence_enabled", None), serialize),
|
|
281
|
+
("inviteOnly" if serialize else "invite_only"): _to_legacy_value(getattr(self, "invite_only", None), serialize),
|
|
282
|
+
("ownerId" if serialize else "owner_id"): _to_legacy_value(getattr(self, "owner_id", None), serialize),
|
|
283
|
+
("playerPersistenceEnabled" if serialize else "player_persistence_enabled"): _to_legacy_value(getattr(self, "player_persistence_enabled", None), serialize),
|
|
284
|
+
("queueEnabled" if serialize else "queue_enabled"): _to_legacy_value(getattr(self, "queue_enabled", None), serialize),
|
|
285
|
+
("region" if serialize else "region"): _to_legacy_value(getattr(self, "region", None), serialize),
|
|
286
|
+
("roleIds" if serialize else "role_ids"): _to_legacy_value(getattr(self, "role_ids", None), serialize),
|
|
287
|
+
("type" if serialize else "type"): _to_legacy_value(getattr(self, "type", None), serialize),
|
|
288
|
+
("worldId" if serialize else "world_id"): _to_legacy_value(getattr(self, "world_id", None), serialize),
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
def __openapi_generator_modern_projection(self) -> Dict[str, Any]:
|
|
292
|
+
"""Return the dictionary representation of the model using alias.
|
|
293
|
+
|
|
294
|
+
This has the following differences from calling pydantic's
|
|
295
|
+
`self.model_dump(by_alias=True)`:
|
|
296
|
+
|
|
297
|
+
* `None` is only added to the output dict for nullable fields that
|
|
298
|
+
were set at model initialization. Other fields with value `None`
|
|
299
|
+
are ignored.
|
|
300
|
+
"""
|
|
301
|
+
excluded_fields: Set[str] = set([
|
|
302
|
+
])
|
|
303
|
+
|
|
304
|
+
_dict = self.model_dump(
|
|
305
|
+
by_alias=True,
|
|
306
|
+
exclude=excluded_fields,
|
|
307
|
+
exclude_none=True,
|
|
308
|
+
)
|
|
309
|
+
# override the default output from pydantic by calling `to_dict()` of content_settings
|
|
310
|
+
if self.content_settings:
|
|
311
|
+
_dict['contentSettings'] = _to_openapi_value(self.content_settings)
|
|
312
|
+
# set to None if display_name (nullable) is None
|
|
313
|
+
# and model_fields_set contains the field
|
|
314
|
+
if self.display_name is None and "display_name" in self.model_fields_set:
|
|
315
|
+
_dict['displayName'] = None
|
|
316
|
+
|
|
317
|
+
# set to None if instance_persistence_enabled (nullable) is None
|
|
318
|
+
# and model_fields_set contains the field
|
|
319
|
+
if self.instance_persistence_enabled is None and "instance_persistence_enabled" in self.model_fields_set:
|
|
320
|
+
_dict['instancePersistenceEnabled'] = None
|
|
321
|
+
|
|
322
|
+
# set to None if owner_id (nullable) is None
|
|
323
|
+
# and model_fields_set contains the field
|
|
324
|
+
if self.owner_id is None and "owner_id" in self.model_fields_set:
|
|
325
|
+
_dict['ownerId'] = None
|
|
326
|
+
|
|
327
|
+
# set to None if player_persistence_enabled (nullable) is None
|
|
328
|
+
# and model_fields_set contains the field
|
|
329
|
+
if self.player_persistence_enabled is None and "player_persistence_enabled" in self.model_fields_set:
|
|
330
|
+
_dict['playerPersistenceEnabled'] = None
|
|
331
|
+
|
|
332
|
+
return _dict
|
|
333
|
+
|
|
334
|
+
setattr(
|
|
335
|
+
to_dict,
|
|
336
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
337
|
+
__openapi_generator_modern_projection,
|
|
338
|
+
)
|
|
339
|
+
setattr(
|
|
340
|
+
__openapi_generator_modern_projection,
|
|
341
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
342
|
+
to_dict,
|
|
343
|
+
)
|
|
344
|
+
del __openapi_generator_modern_projection
|
|
345
|
+
|
|
346
|
+
@classmethod
|
|
347
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
348
|
+
"""Create an instance of CreateInstanceRequest from a dict"""
|
|
349
|
+
if obj is None:
|
|
350
|
+
return None
|
|
351
|
+
|
|
352
|
+
if not isinstance(obj, dict):
|
|
353
|
+
return cls.model_validate(obj)
|
|
354
|
+
|
|
355
|
+
obj = _cast(
|
|
356
|
+
Dict[str, Any],
|
|
357
|
+
cls.__preprocess_input_names(
|
|
358
|
+
obj,
|
|
359
|
+
remove_hidden_storage_names=True,
|
|
360
|
+
),
|
|
361
|
+
)
|
|
362
|
+
|
|
363
|
+
_obj = cls.model_validate({
|
|
364
|
+
"ageGate": obj.get("ageGate") if obj.get("ageGate") is not None else False,
|
|
365
|
+
"calendarEntryId": obj.get("calendarEntryId"),
|
|
366
|
+
"canRequestInvite": obj.get("canRequestInvite") if obj.get("canRequestInvite") is not None else False,
|
|
367
|
+
"closedAt": obj.get("closedAt"),
|
|
368
|
+
"contentSettings": InstanceContentSettings.from_dict(obj["contentSettings"]) if obj.get("contentSettings") is not None else None,
|
|
369
|
+
"displayName": obj.get("displayName"),
|
|
370
|
+
"groupAccessType": obj.get("groupAccessType") if obj.get("groupAccessType") is not None else GroupAccessType.MEMBERS,
|
|
371
|
+
"hardClose": obj.get("hardClose") if obj.get("hardClose") is not None else False,
|
|
372
|
+
"instancePersistenceEnabled": obj.get("instancePersistenceEnabled"),
|
|
373
|
+
"inviteOnly": obj.get("inviteOnly") if obj.get("inviteOnly") is not None else False,
|
|
374
|
+
"ownerId": obj.get("ownerId"),
|
|
375
|
+
"playerPersistenceEnabled": obj.get("playerPersistenceEnabled"),
|
|
376
|
+
"queueEnabled": obj.get("queueEnabled") if obj.get("queueEnabled") is not None else False,
|
|
377
|
+
"region": obj.get("region") if obj.get("region") is not None else InstanceRegion.US,
|
|
378
|
+
"roleIds": obj.get("roleIds"),
|
|
379
|
+
"type": obj.get("type"),
|
|
380
|
+
"worldId": obj.get("worldId")
|
|
381
|
+
})
|
|
382
|
+
return _obj
|
|
383
|
+
|
|
384
|
+
|