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,514 @@
|
|
|
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, StrictFloat, StrictInt, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union, cast as _cast
|
|
24
|
+
from typing_extensions import Annotated
|
|
25
|
+
from vrchatapi.models.group_gallery import GroupGallery
|
|
26
|
+
from vrchatapi.models.group_join_state import GroupJoinState
|
|
27
|
+
from vrchatapi.models.group_member_status import GroupMemberStatus
|
|
28
|
+
from vrchatapi.models.group_my_member import GroupMyMember
|
|
29
|
+
from vrchatapi.models.group_privacy import GroupPrivacy
|
|
30
|
+
from vrchatapi.models.group_role import GroupRole
|
|
31
|
+
from typing import Optional, Set
|
|
32
|
+
from typing_extensions import Self
|
|
33
|
+
from pydantic_core import to_jsonable_python
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
_OPENAPI_GENERATOR_TO_DICT = "_openapi_generator_to_dict"
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _get_openapi_to_dict(value: Any) -> Any:
|
|
40
|
+
# Reciprocal function references preserve inherited generated methods
|
|
41
|
+
# without reserving model member names. Checking both directions also
|
|
42
|
+
# rejects overrides whose decorators copy function attributes.
|
|
43
|
+
to_dict = getattr(value, "to_dict", None)
|
|
44
|
+
type_to_dict = getattr(type(value), "to_dict", None)
|
|
45
|
+
if (
|
|
46
|
+
not callable(to_dict)
|
|
47
|
+
or getattr(to_dict, "__func__", None) is not type_to_dict
|
|
48
|
+
):
|
|
49
|
+
return None
|
|
50
|
+
|
|
51
|
+
openapi_to_dict = getattr(
|
|
52
|
+
type_to_dict, _OPENAPI_GENERATOR_TO_DICT, None
|
|
53
|
+
)
|
|
54
|
+
if (
|
|
55
|
+
not callable(openapi_to_dict)
|
|
56
|
+
or getattr(
|
|
57
|
+
openapi_to_dict,
|
|
58
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
59
|
+
None,
|
|
60
|
+
) is not type_to_dict
|
|
61
|
+
):
|
|
62
|
+
return None
|
|
63
|
+
return openapi_to_dict
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _to_legacy_item(value: Any, serialize: bool) -> Any:
|
|
67
|
+
to_dict = getattr(value, "to_dict", None)
|
|
68
|
+
if _get_openapi_to_dict(value) is not None and callable(to_dict):
|
|
69
|
+
return to_dict(serialize=serialize)
|
|
70
|
+
if callable(to_dict):
|
|
71
|
+
return to_dict()
|
|
72
|
+
return value
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def _to_legacy_value(value: Any, serialize: bool) -> Any:
|
|
76
|
+
# python-legacy converted only immediate list elements or dictionary values:
|
|
77
|
+
# https://github.com/OpenAPITools/openapi-generator/blob/c84b949df1a9ec04ba75989cb49b45c940c2f694/modules/openapi-generator/src/main/resources/python-legacy/model.mustache#L203-L231
|
|
78
|
+
if isinstance(value, list):
|
|
79
|
+
return [_to_legacy_item(item, serialize) for item in value]
|
|
80
|
+
if isinstance(value, dict):
|
|
81
|
+
return {
|
|
82
|
+
key: _to_legacy_item(item, serialize)
|
|
83
|
+
for key, item in value.items()
|
|
84
|
+
}
|
|
85
|
+
return _to_legacy_item(value, serialize)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def _to_openapi_value(value: Any) -> Any:
|
|
89
|
+
if isinstance(value, list):
|
|
90
|
+
return [_to_openapi_value(item) for item in value]
|
|
91
|
+
if isinstance(value, dict):
|
|
92
|
+
return {key: _to_openapi_value(item) for key, item in value.items()}
|
|
93
|
+
|
|
94
|
+
to_openapi_dict = _get_openapi_to_dict(value)
|
|
95
|
+
if to_openapi_dict is not None:
|
|
96
|
+
return to_openapi_dict(value)
|
|
97
|
+
|
|
98
|
+
to_dict = getattr(value, "to_dict", None)
|
|
99
|
+
if callable(to_dict):
|
|
100
|
+
return to_dict()
|
|
101
|
+
return value
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class Group(BaseModel):
|
|
105
|
+
"""
|
|
106
|
+
Group
|
|
107
|
+
|
|
108
|
+
Attributes:
|
|
109
|
+
openapi_types (dict): The key is attribute name
|
|
110
|
+
and the value is attribute type.
|
|
111
|
+
attribute_map (dict): The key is attribute name
|
|
112
|
+
and the value is json key in definition.
|
|
113
|
+
""" # noqa: E501
|
|
114
|
+
age_verification_beta_code: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("ageVerificationBetaCode", "age_verification_beta_code"), serialization_alias="ageVerificationBetaCode", json_schema_extra={"examples": ["abc1234"]})
|
|
115
|
+
age_verification_beta_slots: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, validation_alias=AliasChoices("ageVerificationBetaSlots", "age_verification_beta_slots"), serialization_alias="ageVerificationBetaSlots", json_schema_extra={"examples": [500]})
|
|
116
|
+
age_verification_slots_available: Optional[StrictBool] = Field(default=None, validation_alias=AliasChoices("ageVerificationSlotsAvailable", "age_verification_slots_available"), serialization_alias="ageVerificationSlotsAvailable")
|
|
117
|
+
allow_group_join_prompt: Optional[StrictBool] = Field(default=None, validation_alias=AliasChoices("allowGroupJoinPrompt", "allow_group_join_prompt"), serialization_alias="allowGroupJoinPrompt")
|
|
118
|
+
badges: Optional[List[StrictStr]] = None
|
|
119
|
+
banner_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("bannerId", "banner_id"), serialization_alias="bannerId")
|
|
120
|
+
banner_url: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("bannerUrl", "banner_url"), serialization_alias="bannerUrl")
|
|
121
|
+
created_at: Optional[datetime] = Field(default=None, validation_alias=AliasChoices("createdAt", "created_at"), serialization_alias="createdAt")
|
|
122
|
+
description: Optional[StrictStr] = None
|
|
123
|
+
discriminator: Optional[StrictStr] = Field(default=None, json_schema_extra={"examples": ["0000"]})
|
|
124
|
+
galleries: Optional[List[GroupGallery]] = None
|
|
125
|
+
icon_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("iconId", "icon_id"), serialization_alias="iconId")
|
|
126
|
+
icon_url: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("iconUrl", "icon_url"), serialization_alias="iconUrl")
|
|
127
|
+
id: Optional[StrictStr] = Field(default=None, json_schema_extra={"examples": ["grp_71a7ff59-112c-4e78-a990-c7cc650776e5"]})
|
|
128
|
+
is_verified: Optional[StrictBool] = Field(default=False, validation_alias=AliasChoices("isVerified", "is_verified"), serialization_alias="isVerified")
|
|
129
|
+
join_state: Optional[GroupJoinState] = Field(default=GroupJoinState.OPEN, validation_alias=AliasChoices("joinState", "join_state"), serialization_alias="joinState")
|
|
130
|
+
languages: Optional[List[StrictStr]] = None
|
|
131
|
+
last_post_created_at: Optional[datetime] = Field(default=None, validation_alias=AliasChoices("lastPostCreatedAt", "last_post_created_at"), serialization_alias="lastPostCreatedAt")
|
|
132
|
+
links: Optional[List[StrictStr]] = None
|
|
133
|
+
member_count: Optional[StrictInt] = Field(default=None, validation_alias=AliasChoices("memberCount", "member_count"), serialization_alias="memberCount")
|
|
134
|
+
member_count_synced_at: Optional[datetime] = Field(default=None, validation_alias=AliasChoices("memberCountSyncedAt", "member_count_synced_at"), serialization_alias="memberCountSyncedAt")
|
|
135
|
+
membership_status: Optional[GroupMemberStatus] = Field(default=GroupMemberStatus.INACTIVE, validation_alias=AliasChoices("membershipStatus", "membership_status"), serialization_alias="membershipStatus")
|
|
136
|
+
my_member: Optional[GroupMyMember] = Field(default=None, validation_alias=AliasChoices("myMember", "my_member"), serialization_alias="myMember")
|
|
137
|
+
name: Optional[StrictStr] = None
|
|
138
|
+
online_member_count: Optional[StrictInt] = Field(default=None, validation_alias=AliasChoices("onlineMemberCount", "online_member_count"), serialization_alias="onlineMemberCount")
|
|
139
|
+
owner_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("ownerId", "owner_id"), serialization_alias="ownerId", description="A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.", json_schema_extra={"examples": ["usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469"]})
|
|
140
|
+
privacy: Optional[GroupPrivacy] = GroupPrivacy.DEFAULT
|
|
141
|
+
roles: Optional[List[GroupRole]] = Field(default=None, description="Only returned if ?includeRoles=true is specified.")
|
|
142
|
+
rules: Optional[StrictStr] = None
|
|
143
|
+
short_code: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("shortCode", "short_code"), serialization_alias="shortCode", json_schema_extra={"examples": ["VRCHAT"]})
|
|
144
|
+
tags: Optional[List[Annotated[str, Field(min_length=1, strict=True)]]] = None
|
|
145
|
+
transfer_target_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("transferTargetId", "transfer_target_id"), serialization_alias="transferTargetId", 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
|
+
updated_at: Optional[datetime] = Field(default=None, validation_alias=AliasChoices("updatedAt", "updated_at"), serialization_alias="updatedAt")
|
|
147
|
+
openapi_types: ClassVar[Dict[str, str]] = {
|
|
148
|
+
"age_verification_beta_code": "str",
|
|
149
|
+
"age_verification_beta_slots": "float",
|
|
150
|
+
"age_verification_slots_available": "bool",
|
|
151
|
+
"allow_group_join_prompt": "bool",
|
|
152
|
+
"badges": "List[str]",
|
|
153
|
+
"banner_id": "str",
|
|
154
|
+
"banner_url": "str",
|
|
155
|
+
"created_at": "datetime",
|
|
156
|
+
"description": "str",
|
|
157
|
+
"discriminator": "str",
|
|
158
|
+
"galleries": "List[GroupGallery]",
|
|
159
|
+
"icon_id": "str",
|
|
160
|
+
"icon_url": "str",
|
|
161
|
+
"id": "str",
|
|
162
|
+
"is_verified": "bool",
|
|
163
|
+
"join_state": "GroupJoinState",
|
|
164
|
+
"languages": "List[str]",
|
|
165
|
+
"last_post_created_at": "datetime",
|
|
166
|
+
"links": "List[str]",
|
|
167
|
+
"member_count": "int",
|
|
168
|
+
"member_count_synced_at": "datetime",
|
|
169
|
+
"membership_status": "GroupMemberStatus",
|
|
170
|
+
"my_member": "GroupMyMember",
|
|
171
|
+
"name": "str",
|
|
172
|
+
"online_member_count": "int",
|
|
173
|
+
"owner_id": "str",
|
|
174
|
+
"privacy": "GroupPrivacy",
|
|
175
|
+
"roles": "List[GroupRole]",
|
|
176
|
+
"rules": "str",
|
|
177
|
+
"short_code": "str",
|
|
178
|
+
"tags": "List[str]",
|
|
179
|
+
"transfer_target_id": "str",
|
|
180
|
+
"updated_at": "datetime"
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
attribute_map: ClassVar[Dict[str, str]] = {
|
|
184
|
+
"age_verification_beta_code": "ageVerificationBetaCode",
|
|
185
|
+
"age_verification_beta_slots": "ageVerificationBetaSlots",
|
|
186
|
+
"age_verification_slots_available": "ageVerificationSlotsAvailable",
|
|
187
|
+
"allow_group_join_prompt": "allowGroupJoinPrompt",
|
|
188
|
+
"badges": "badges",
|
|
189
|
+
"banner_id": "bannerId",
|
|
190
|
+
"banner_url": "bannerUrl",
|
|
191
|
+
"created_at": "createdAt",
|
|
192
|
+
"description": "description",
|
|
193
|
+
"discriminator": "discriminator",
|
|
194
|
+
"galleries": "galleries",
|
|
195
|
+
"icon_id": "iconId",
|
|
196
|
+
"icon_url": "iconUrl",
|
|
197
|
+
"id": "id",
|
|
198
|
+
"is_verified": "isVerified",
|
|
199
|
+
"join_state": "joinState",
|
|
200
|
+
"languages": "languages",
|
|
201
|
+
"last_post_created_at": "lastPostCreatedAt",
|
|
202
|
+
"links": "links",
|
|
203
|
+
"member_count": "memberCount",
|
|
204
|
+
"member_count_synced_at": "memberCountSyncedAt",
|
|
205
|
+
"membership_status": "membershipStatus",
|
|
206
|
+
"my_member": "myMember",
|
|
207
|
+
"name": "name",
|
|
208
|
+
"online_member_count": "onlineMemberCount",
|
|
209
|
+
"owner_id": "ownerId",
|
|
210
|
+
"privacy": "privacy",
|
|
211
|
+
"roles": "roles",
|
|
212
|
+
"rules": "rules",
|
|
213
|
+
"short_code": "shortCode",
|
|
214
|
+
"tags": "tags",
|
|
215
|
+
"transfer_target_id": "transferTargetId",
|
|
216
|
+
"updated_at": "updatedAt"
|
|
217
|
+
}
|
|
218
|
+
__properties: ClassVar[List[str]] = ["ageVerificationBetaCode", "ageVerificationBetaSlots", "ageVerificationSlotsAvailable", "allowGroupJoinPrompt", "badges", "bannerId", "bannerUrl", "createdAt", "description", "discriminator", "galleries", "iconId", "iconUrl", "id", "isVerified", "joinState", "languages", "lastPostCreatedAt", "links", "memberCount", "memberCountSyncedAt", "membershipStatus", "myMember", "name", "onlineMemberCount", "ownerId", "privacy", "roles", "rules", "shortCode", "tags", "transferTargetId", "updatedAt"]
|
|
219
|
+
|
|
220
|
+
@classmethod
|
|
221
|
+
def __preprocess_input_names(
|
|
222
|
+
cls,
|
|
223
|
+
obj: Any,
|
|
224
|
+
remove_hidden_storage_names: bool = True,
|
|
225
|
+
) -> Any:
|
|
226
|
+
if not isinstance(obj, _Mapping):
|
|
227
|
+
return obj
|
|
228
|
+
obj = dict(obj)
|
|
229
|
+
if "ageVerificationBetaCode" not in obj and "age_verification_beta_code" in obj:
|
|
230
|
+
obj["ageVerificationBetaCode"] = obj["age_verification_beta_code"]
|
|
231
|
+
obj.pop("age_verification_beta_code", None)
|
|
232
|
+
if "ageVerificationBetaSlots" not in obj and "age_verification_beta_slots" in obj:
|
|
233
|
+
obj["ageVerificationBetaSlots"] = obj["age_verification_beta_slots"]
|
|
234
|
+
obj.pop("age_verification_beta_slots", None)
|
|
235
|
+
if "ageVerificationSlotsAvailable" not in obj and "age_verification_slots_available" in obj:
|
|
236
|
+
obj["ageVerificationSlotsAvailable"] = obj["age_verification_slots_available"]
|
|
237
|
+
obj.pop("age_verification_slots_available", None)
|
|
238
|
+
if "allowGroupJoinPrompt" not in obj and "allow_group_join_prompt" in obj:
|
|
239
|
+
obj["allowGroupJoinPrompt"] = obj["allow_group_join_prompt"]
|
|
240
|
+
obj.pop("allow_group_join_prompt", None)
|
|
241
|
+
if "bannerId" not in obj and "banner_id" in obj:
|
|
242
|
+
obj["bannerId"] = obj["banner_id"]
|
|
243
|
+
obj.pop("banner_id", None)
|
|
244
|
+
if "bannerUrl" not in obj and "banner_url" in obj:
|
|
245
|
+
obj["bannerUrl"] = obj["banner_url"]
|
|
246
|
+
obj.pop("banner_url", None)
|
|
247
|
+
if "createdAt" not in obj and "created_at" in obj:
|
|
248
|
+
obj["createdAt"] = obj["created_at"]
|
|
249
|
+
obj.pop("created_at", None)
|
|
250
|
+
if "iconId" not in obj and "icon_id" in obj:
|
|
251
|
+
obj["iconId"] = obj["icon_id"]
|
|
252
|
+
obj.pop("icon_id", None)
|
|
253
|
+
if "iconUrl" not in obj and "icon_url" in obj:
|
|
254
|
+
obj["iconUrl"] = obj["icon_url"]
|
|
255
|
+
obj.pop("icon_url", None)
|
|
256
|
+
if "isVerified" not in obj and "is_verified" in obj:
|
|
257
|
+
obj["isVerified"] = obj["is_verified"]
|
|
258
|
+
obj.pop("is_verified", None)
|
|
259
|
+
if "joinState" not in obj and "join_state" in obj:
|
|
260
|
+
obj["joinState"] = obj["join_state"]
|
|
261
|
+
obj.pop("join_state", None)
|
|
262
|
+
if "lastPostCreatedAt" not in obj and "last_post_created_at" in obj:
|
|
263
|
+
obj["lastPostCreatedAt"] = obj["last_post_created_at"]
|
|
264
|
+
obj.pop("last_post_created_at", None)
|
|
265
|
+
if "memberCount" not in obj and "member_count" in obj:
|
|
266
|
+
obj["memberCount"] = obj["member_count"]
|
|
267
|
+
obj.pop("member_count", None)
|
|
268
|
+
if "memberCountSyncedAt" not in obj and "member_count_synced_at" in obj:
|
|
269
|
+
obj["memberCountSyncedAt"] = obj["member_count_synced_at"]
|
|
270
|
+
obj.pop("member_count_synced_at", None)
|
|
271
|
+
if "membershipStatus" not in obj and "membership_status" in obj:
|
|
272
|
+
obj["membershipStatus"] = obj["membership_status"]
|
|
273
|
+
obj.pop("membership_status", None)
|
|
274
|
+
if "myMember" not in obj and "my_member" in obj:
|
|
275
|
+
obj["myMember"] = obj["my_member"]
|
|
276
|
+
obj.pop("my_member", None)
|
|
277
|
+
if "onlineMemberCount" not in obj and "online_member_count" in obj:
|
|
278
|
+
obj["onlineMemberCount"] = obj["online_member_count"]
|
|
279
|
+
obj.pop("online_member_count", None)
|
|
280
|
+
if "ownerId" not in obj and "owner_id" in obj:
|
|
281
|
+
obj["ownerId"] = obj["owner_id"]
|
|
282
|
+
obj.pop("owner_id", None)
|
|
283
|
+
if "shortCode" not in obj and "short_code" in obj:
|
|
284
|
+
obj["shortCode"] = obj["short_code"]
|
|
285
|
+
obj.pop("short_code", None)
|
|
286
|
+
if "transferTargetId" not in obj and "transfer_target_id" in obj:
|
|
287
|
+
obj["transferTargetId"] = obj["transfer_target_id"]
|
|
288
|
+
obj.pop("transfer_target_id", None)
|
|
289
|
+
if "updatedAt" not in obj and "updated_at" in obj:
|
|
290
|
+
obj["updatedAt"] = obj["updated_at"]
|
|
291
|
+
obj.pop("updated_at", None)
|
|
292
|
+
return obj
|
|
293
|
+
|
|
294
|
+
model_config = ConfigDict(
|
|
295
|
+
validate_by_name=True,
|
|
296
|
+
validate_by_alias=True,
|
|
297
|
+
validate_assignment=True,
|
|
298
|
+
extra="forbid",
|
|
299
|
+
protected_namespaces=(),
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
def to_str(self) -> str:
|
|
304
|
+
"""Returns the string representation of the model"""
|
|
305
|
+
return pprint.pformat(self.to_dict())
|
|
306
|
+
|
|
307
|
+
def __repr__(self) -> str:
|
|
308
|
+
"""For print and pprint"""
|
|
309
|
+
return self.to_str()
|
|
310
|
+
|
|
311
|
+
def __eq__(self, other: object) -> bool:
|
|
312
|
+
"""Returns true if both objects are equal"""
|
|
313
|
+
if not isinstance(other, Group):
|
|
314
|
+
return False
|
|
315
|
+
|
|
316
|
+
return self.to_dict() == other.to_dict()
|
|
317
|
+
|
|
318
|
+
def __ne__(self, other: object) -> bool:
|
|
319
|
+
"""Returns true if both objects are not equal"""
|
|
320
|
+
if not isinstance(other, Group):
|
|
321
|
+
return True
|
|
322
|
+
|
|
323
|
+
return not (self == other)
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
def to_json(self) -> str:
|
|
327
|
+
"""Returns the JSON representation of the model using alias"""
|
|
328
|
+
to_openapi_dict = _get_openapi_to_dict(self)
|
|
329
|
+
if to_openapi_dict is not None:
|
|
330
|
+
return json.dumps(to_jsonable_python(to_openapi_dict(self)))
|
|
331
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
332
|
+
|
|
333
|
+
@classmethod
|
|
334
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
335
|
+
"""Create an instance of Group from a JSON string"""
|
|
336
|
+
return cls.from_dict(json.loads(json_str))
|
|
337
|
+
|
|
338
|
+
def to_dict(self, serialize: bool = False) -> Dict[str, Any]:
|
|
339
|
+
"""Return all declared model fields using public or wire names."""
|
|
340
|
+
return {
|
|
341
|
+
("ageVerificationBetaCode" if serialize else "age_verification_beta_code"): _to_legacy_value(getattr(self, "age_verification_beta_code", None), serialize),
|
|
342
|
+
("ageVerificationBetaSlots" if serialize else "age_verification_beta_slots"): _to_legacy_value(getattr(self, "age_verification_beta_slots", None), serialize),
|
|
343
|
+
("ageVerificationSlotsAvailable" if serialize else "age_verification_slots_available"): _to_legacy_value(getattr(self, "age_verification_slots_available", None), serialize),
|
|
344
|
+
("allowGroupJoinPrompt" if serialize else "allow_group_join_prompt"): _to_legacy_value(getattr(self, "allow_group_join_prompt", None), serialize),
|
|
345
|
+
("badges" if serialize else "badges"): _to_legacy_value(getattr(self, "badges", None), serialize),
|
|
346
|
+
("bannerId" if serialize else "banner_id"): _to_legacy_value(getattr(self, "banner_id", None), serialize),
|
|
347
|
+
("bannerUrl" if serialize else "banner_url"): _to_legacy_value(getattr(self, "banner_url", None), serialize),
|
|
348
|
+
("createdAt" if serialize else "created_at"): _to_legacy_value(getattr(self, "created_at", None), serialize),
|
|
349
|
+
("description" if serialize else "description"): _to_legacy_value(getattr(self, "description", None), serialize),
|
|
350
|
+
("discriminator" if serialize else "discriminator"): _to_legacy_value(getattr(self, "discriminator", None), serialize),
|
|
351
|
+
("galleries" if serialize else "galleries"): _to_legacy_value(getattr(self, "galleries", None), serialize),
|
|
352
|
+
("iconId" if serialize else "icon_id"): _to_legacy_value(getattr(self, "icon_id", None), serialize),
|
|
353
|
+
("iconUrl" if serialize else "icon_url"): _to_legacy_value(getattr(self, "icon_url", None), serialize),
|
|
354
|
+
("id" if serialize else "id"): _to_legacy_value(getattr(self, "id", None), serialize),
|
|
355
|
+
("isVerified" if serialize else "is_verified"): _to_legacy_value(getattr(self, "is_verified", None), serialize),
|
|
356
|
+
("joinState" if serialize else "join_state"): _to_legacy_value(getattr(self, "join_state", None), serialize),
|
|
357
|
+
("languages" if serialize else "languages"): _to_legacy_value(getattr(self, "languages", None), serialize),
|
|
358
|
+
("lastPostCreatedAt" if serialize else "last_post_created_at"): _to_legacy_value(getattr(self, "last_post_created_at", None), serialize),
|
|
359
|
+
("links" if serialize else "links"): _to_legacy_value(getattr(self, "links", None), serialize),
|
|
360
|
+
("memberCount" if serialize else "member_count"): _to_legacy_value(getattr(self, "member_count", None), serialize),
|
|
361
|
+
("memberCountSyncedAt" if serialize else "member_count_synced_at"): _to_legacy_value(getattr(self, "member_count_synced_at", None), serialize),
|
|
362
|
+
("membershipStatus" if serialize else "membership_status"): _to_legacy_value(getattr(self, "membership_status", None), serialize),
|
|
363
|
+
("myMember" if serialize else "my_member"): _to_legacy_value(getattr(self, "my_member", None), serialize),
|
|
364
|
+
("name" if serialize else "name"): _to_legacy_value(getattr(self, "name", None), serialize),
|
|
365
|
+
("onlineMemberCount" if serialize else "online_member_count"): _to_legacy_value(getattr(self, "online_member_count", None), serialize),
|
|
366
|
+
("ownerId" if serialize else "owner_id"): _to_legacy_value(getattr(self, "owner_id", None), serialize),
|
|
367
|
+
("privacy" if serialize else "privacy"): _to_legacy_value(getattr(self, "privacy", None), serialize),
|
|
368
|
+
("roles" if serialize else "roles"): _to_legacy_value(getattr(self, "roles", None), serialize),
|
|
369
|
+
("rules" if serialize else "rules"): _to_legacy_value(getattr(self, "rules", None), serialize),
|
|
370
|
+
("shortCode" if serialize else "short_code"): _to_legacy_value(getattr(self, "short_code", None), serialize),
|
|
371
|
+
("tags" if serialize else "tags"): _to_legacy_value(getattr(self, "tags", None), serialize),
|
|
372
|
+
("transferTargetId" if serialize else "transfer_target_id"): _to_legacy_value(getattr(self, "transfer_target_id", None), serialize),
|
|
373
|
+
("updatedAt" if serialize else "updated_at"): _to_legacy_value(getattr(self, "updated_at", None), serialize),
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
def __openapi_generator_modern_projection(self) -> Dict[str, Any]:
|
|
377
|
+
"""Return the dictionary representation of the model using alias.
|
|
378
|
+
|
|
379
|
+
This has the following differences from calling pydantic's
|
|
380
|
+
`self.model_dump(by_alias=True)`:
|
|
381
|
+
|
|
382
|
+
* `None` is only added to the output dict for nullable fields that
|
|
383
|
+
were set at model initialization. Other fields with value `None`
|
|
384
|
+
are ignored.
|
|
385
|
+
"""
|
|
386
|
+
excluded_fields: Set[str] = set([
|
|
387
|
+
])
|
|
388
|
+
|
|
389
|
+
_dict = self.model_dump(
|
|
390
|
+
by_alias=True,
|
|
391
|
+
exclude=excluded_fields,
|
|
392
|
+
exclude_none=True,
|
|
393
|
+
)
|
|
394
|
+
# override the default output from pydantic by calling `to_dict()` of each item in galleries (list)
|
|
395
|
+
_items = []
|
|
396
|
+
if self.galleries:
|
|
397
|
+
for _item_galleries in self.galleries:
|
|
398
|
+
if _item_galleries:
|
|
399
|
+
_items.append(_to_openapi_value(_item_galleries))
|
|
400
|
+
_dict['galleries'] = _items
|
|
401
|
+
# override the default output from pydantic by calling `to_dict()` of my_member
|
|
402
|
+
if self.my_member:
|
|
403
|
+
_dict['myMember'] = _to_openapi_value(self.my_member)
|
|
404
|
+
# override the default output from pydantic by calling `to_dict()` of each item in roles (list)
|
|
405
|
+
_items = []
|
|
406
|
+
if self.roles:
|
|
407
|
+
for _item_roles in self.roles:
|
|
408
|
+
if _item_roles:
|
|
409
|
+
_items.append(_to_openapi_value(_item_roles))
|
|
410
|
+
_dict['roles'] = _items
|
|
411
|
+
# set to None if banner_id (nullable) is None
|
|
412
|
+
# and model_fields_set contains the field
|
|
413
|
+
if self.banner_id is None and "banner_id" in self.model_fields_set:
|
|
414
|
+
_dict['bannerId'] = None
|
|
415
|
+
|
|
416
|
+
# set to None if banner_url (nullable) is None
|
|
417
|
+
# and model_fields_set contains the field
|
|
418
|
+
if self.banner_url is None and "banner_url" in self.model_fields_set:
|
|
419
|
+
_dict['bannerUrl'] = None
|
|
420
|
+
|
|
421
|
+
# set to None if icon_id (nullable) is None
|
|
422
|
+
# and model_fields_set contains the field
|
|
423
|
+
if self.icon_id is None and "icon_id" in self.model_fields_set:
|
|
424
|
+
_dict['iconId'] = None
|
|
425
|
+
|
|
426
|
+
# set to None if icon_url (nullable) is None
|
|
427
|
+
# and model_fields_set contains the field
|
|
428
|
+
if self.icon_url is None and "icon_url" in self.model_fields_set:
|
|
429
|
+
_dict['iconUrl'] = None
|
|
430
|
+
|
|
431
|
+
# set to None if last_post_created_at (nullable) is None
|
|
432
|
+
# and model_fields_set contains the field
|
|
433
|
+
if self.last_post_created_at is None and "last_post_created_at" in self.model_fields_set:
|
|
434
|
+
_dict['lastPostCreatedAt'] = None
|
|
435
|
+
|
|
436
|
+
# set to None if roles (nullable) is None
|
|
437
|
+
# and model_fields_set contains the field
|
|
438
|
+
if self.roles is None and "roles" in self.model_fields_set:
|
|
439
|
+
_dict['roles'] = None
|
|
440
|
+
|
|
441
|
+
# set to None if rules (nullable) is None
|
|
442
|
+
# and model_fields_set contains the field
|
|
443
|
+
if self.rules is None and "rules" in self.model_fields_set:
|
|
444
|
+
_dict['rules'] = None
|
|
445
|
+
|
|
446
|
+
return _dict
|
|
447
|
+
|
|
448
|
+
setattr(
|
|
449
|
+
to_dict,
|
|
450
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
451
|
+
__openapi_generator_modern_projection,
|
|
452
|
+
)
|
|
453
|
+
setattr(
|
|
454
|
+
__openapi_generator_modern_projection,
|
|
455
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
456
|
+
to_dict,
|
|
457
|
+
)
|
|
458
|
+
del __openapi_generator_modern_projection
|
|
459
|
+
|
|
460
|
+
@classmethod
|
|
461
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
462
|
+
"""Create an instance of Group from a dict"""
|
|
463
|
+
if obj is None:
|
|
464
|
+
return None
|
|
465
|
+
|
|
466
|
+
if not isinstance(obj, dict):
|
|
467
|
+
return cls.model_validate(obj)
|
|
468
|
+
|
|
469
|
+
obj = _cast(
|
|
470
|
+
Dict[str, Any],
|
|
471
|
+
cls.__preprocess_input_names(
|
|
472
|
+
obj,
|
|
473
|
+
remove_hidden_storage_names=True,
|
|
474
|
+
),
|
|
475
|
+
)
|
|
476
|
+
|
|
477
|
+
_obj = cls.model_validate({
|
|
478
|
+
"ageVerificationBetaCode": obj.get("ageVerificationBetaCode"),
|
|
479
|
+
"ageVerificationBetaSlots": obj.get("ageVerificationBetaSlots"),
|
|
480
|
+
"ageVerificationSlotsAvailable": obj.get("ageVerificationSlotsAvailable"),
|
|
481
|
+
"allowGroupJoinPrompt": obj.get("allowGroupJoinPrompt"),
|
|
482
|
+
"badges": obj.get("badges"),
|
|
483
|
+
"bannerId": obj.get("bannerId"),
|
|
484
|
+
"bannerUrl": obj.get("bannerUrl"),
|
|
485
|
+
"createdAt": obj.get("createdAt"),
|
|
486
|
+
"description": obj.get("description"),
|
|
487
|
+
"discriminator": obj.get("discriminator"),
|
|
488
|
+
"galleries": [GroupGallery.from_dict(_item) for _item in obj["galleries"]] if obj.get("galleries") is not None else None,
|
|
489
|
+
"iconId": obj.get("iconId"),
|
|
490
|
+
"iconUrl": obj.get("iconUrl"),
|
|
491
|
+
"id": obj.get("id"),
|
|
492
|
+
"isVerified": obj.get("isVerified") if obj.get("isVerified") is not None else False,
|
|
493
|
+
"joinState": obj.get("joinState") if obj.get("joinState") is not None else GroupJoinState.OPEN,
|
|
494
|
+
"languages": obj.get("languages"),
|
|
495
|
+
"lastPostCreatedAt": obj.get("lastPostCreatedAt"),
|
|
496
|
+
"links": obj.get("links"),
|
|
497
|
+
"memberCount": obj.get("memberCount"),
|
|
498
|
+
"memberCountSyncedAt": obj.get("memberCountSyncedAt"),
|
|
499
|
+
"membershipStatus": obj.get("membershipStatus") if obj.get("membershipStatus") is not None else GroupMemberStatus.INACTIVE,
|
|
500
|
+
"myMember": GroupMyMember.from_dict(obj["myMember"]) if obj.get("myMember") is not None else None,
|
|
501
|
+
"name": obj.get("name"),
|
|
502
|
+
"onlineMemberCount": obj.get("onlineMemberCount"),
|
|
503
|
+
"ownerId": obj.get("ownerId"),
|
|
504
|
+
"privacy": obj.get("privacy") if obj.get("privacy") is not None else GroupPrivacy.DEFAULT,
|
|
505
|
+
"roles": [GroupRole.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None,
|
|
506
|
+
"rules": obj.get("rules"),
|
|
507
|
+
"shortCode": obj.get("shortCode"),
|
|
508
|
+
"tags": obj.get("tags"),
|
|
509
|
+
"transferTargetId": obj.get("transferTargetId"),
|
|
510
|
+
"updatedAt": obj.get("updatedAt")
|
|
511
|
+
})
|
|
512
|
+
return _obj
|
|
513
|
+
|
|
514
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
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 json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class GroupAccessType(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
Group access type when the instance type is \"group\"
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
MEMBERS = 'members'
|
|
30
|
+
PLUS = 'plus'
|
|
31
|
+
PUBLIC = 'public'
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def from_json(cls, json_str: str) -> Self:
|
|
35
|
+
"""Create an instance of GroupAccessType from a JSON string"""
|
|
36
|
+
return cls(json.loads(json_str))
|
|
37
|
+
|
|
38
|
+
|