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,283 @@
|
|
|
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.content_filter import ContentFilter
|
|
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 SubmitModerationReportRequestDetails(BaseModel):
|
|
98
|
+
"""
|
|
99
|
+
Relevant details specific to the type of the report. `fileId` is for the image file attached to an inventory item, such as an emoji. `holderId` is for the user who owns an inventory item, such as a emoji.
|
|
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
|
+
file_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("fileId", "file_id"), serialization_alias="fileId", json_schema_extra={"examples": ["file_ce35d830-e20a-4df0-a6d4-5aaef4508044"]})
|
|
108
|
+
holder_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("holderId", "holder_id"), serialization_alias="holderId", 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"]})
|
|
109
|
+
image_type: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("imageType", "image_type"), serialization_alias="imageType", description="Relevant detail for reports about image content, such as emoji.")
|
|
110
|
+
instance_age_gated: Optional[StrictBool] = Field(default=None, validation_alias=AliasChoices("instanceAgeGated", "instance_age_gated"), serialization_alias="instanceAgeGated", description="Relevant detail for reports taking place from within an instance.")
|
|
111
|
+
instance_type: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("instanceType", "instance_type"), serialization_alias="instanceType", description="Relevant detail for reports taking place from within an instance.")
|
|
112
|
+
suggested_warnings: Optional[List[ContentFilter]] = Field(default=None, validation_alias=AliasChoices("suggestedWarnings", "suggested_warnings"), serialization_alias="suggestedWarnings", description="Relevant detail for reports about content that might not be tagged properly.")
|
|
113
|
+
user_in_same_instance: Optional[StrictBool] = Field(default=None, validation_alias=AliasChoices("userInSameInstance", "user_in_same_instance"), serialization_alias="userInSameInstance", description="Relevant detail for reports involving another user in the same instance world.")
|
|
114
|
+
openapi_types: ClassVar[Dict[str, str]] = {
|
|
115
|
+
"file_id": "str",
|
|
116
|
+
"holder_id": "str",
|
|
117
|
+
"image_type": "str",
|
|
118
|
+
"instance_age_gated": "bool",
|
|
119
|
+
"instance_type": "str",
|
|
120
|
+
"suggested_warnings": "List[ContentFilter]",
|
|
121
|
+
"user_in_same_instance": "bool"
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
attribute_map: ClassVar[Dict[str, str]] = {
|
|
125
|
+
"file_id": "fileId",
|
|
126
|
+
"holder_id": "holderId",
|
|
127
|
+
"image_type": "imageType",
|
|
128
|
+
"instance_age_gated": "instanceAgeGated",
|
|
129
|
+
"instance_type": "instanceType",
|
|
130
|
+
"suggested_warnings": "suggestedWarnings",
|
|
131
|
+
"user_in_same_instance": "userInSameInstance"
|
|
132
|
+
}
|
|
133
|
+
__properties: ClassVar[List[str]] = ["fileId", "holderId", "imageType", "instanceAgeGated", "instanceType", "suggestedWarnings", "userInSameInstance"]
|
|
134
|
+
|
|
135
|
+
@classmethod
|
|
136
|
+
def __preprocess_input_names(
|
|
137
|
+
cls,
|
|
138
|
+
obj: Any,
|
|
139
|
+
remove_hidden_storage_names: bool = True,
|
|
140
|
+
) -> Any:
|
|
141
|
+
if not isinstance(obj, _Mapping):
|
|
142
|
+
return obj
|
|
143
|
+
obj = dict(obj)
|
|
144
|
+
if "fileId" not in obj and "file_id" in obj:
|
|
145
|
+
obj["fileId"] = obj["file_id"]
|
|
146
|
+
obj.pop("file_id", None)
|
|
147
|
+
if "holderId" not in obj and "holder_id" in obj:
|
|
148
|
+
obj["holderId"] = obj["holder_id"]
|
|
149
|
+
obj.pop("holder_id", None)
|
|
150
|
+
if "imageType" not in obj and "image_type" in obj:
|
|
151
|
+
obj["imageType"] = obj["image_type"]
|
|
152
|
+
obj.pop("image_type", None)
|
|
153
|
+
if "instanceAgeGated" not in obj and "instance_age_gated" in obj:
|
|
154
|
+
obj["instanceAgeGated"] = obj["instance_age_gated"]
|
|
155
|
+
obj.pop("instance_age_gated", None)
|
|
156
|
+
if "instanceType" not in obj and "instance_type" in obj:
|
|
157
|
+
obj["instanceType"] = obj["instance_type"]
|
|
158
|
+
obj.pop("instance_type", None)
|
|
159
|
+
if "suggestedWarnings" not in obj and "suggested_warnings" in obj:
|
|
160
|
+
obj["suggestedWarnings"] = obj["suggested_warnings"]
|
|
161
|
+
obj.pop("suggested_warnings", None)
|
|
162
|
+
if "userInSameInstance" not in obj and "user_in_same_instance" in obj:
|
|
163
|
+
obj["userInSameInstance"] = obj["user_in_same_instance"]
|
|
164
|
+
obj.pop("user_in_same_instance", None)
|
|
165
|
+
return obj
|
|
166
|
+
|
|
167
|
+
model_config = ConfigDict(
|
|
168
|
+
validate_by_name=True,
|
|
169
|
+
validate_by_alias=True,
|
|
170
|
+
validate_assignment=True,
|
|
171
|
+
extra="forbid",
|
|
172
|
+
protected_namespaces=(),
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
def to_str(self) -> str:
|
|
177
|
+
"""Returns the string representation of the model"""
|
|
178
|
+
return pprint.pformat(self.to_dict())
|
|
179
|
+
|
|
180
|
+
def __repr__(self) -> str:
|
|
181
|
+
"""For print and pprint"""
|
|
182
|
+
return self.to_str()
|
|
183
|
+
|
|
184
|
+
def __eq__(self, other: object) -> bool:
|
|
185
|
+
"""Returns true if both objects are equal"""
|
|
186
|
+
if not isinstance(other, SubmitModerationReportRequestDetails):
|
|
187
|
+
return False
|
|
188
|
+
|
|
189
|
+
return self.to_dict() == other.to_dict()
|
|
190
|
+
|
|
191
|
+
def __ne__(self, other: object) -> bool:
|
|
192
|
+
"""Returns true if both objects are not equal"""
|
|
193
|
+
if not isinstance(other, SubmitModerationReportRequestDetails):
|
|
194
|
+
return True
|
|
195
|
+
|
|
196
|
+
return not (self == other)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
def to_json(self) -> str:
|
|
200
|
+
"""Returns the JSON representation of the model using alias"""
|
|
201
|
+
to_openapi_dict = _get_openapi_to_dict(self)
|
|
202
|
+
if to_openapi_dict is not None:
|
|
203
|
+
return json.dumps(to_jsonable_python(to_openapi_dict(self)))
|
|
204
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
205
|
+
|
|
206
|
+
@classmethod
|
|
207
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
208
|
+
"""Create an instance of SubmitModerationReportRequestDetails from a JSON string"""
|
|
209
|
+
return cls.from_dict(json.loads(json_str))
|
|
210
|
+
|
|
211
|
+
def to_dict(self, serialize: bool = False) -> Dict[str, Any]:
|
|
212
|
+
"""Return all declared model fields using public or wire names."""
|
|
213
|
+
return {
|
|
214
|
+
("fileId" if serialize else "file_id"): _to_legacy_value(getattr(self, "file_id", None), serialize),
|
|
215
|
+
("holderId" if serialize else "holder_id"): _to_legacy_value(getattr(self, "holder_id", None), serialize),
|
|
216
|
+
("imageType" if serialize else "image_type"): _to_legacy_value(getattr(self, "image_type", None), serialize),
|
|
217
|
+
("instanceAgeGated" if serialize else "instance_age_gated"): _to_legacy_value(getattr(self, "instance_age_gated", None), serialize),
|
|
218
|
+
("instanceType" if serialize else "instance_type"): _to_legacy_value(getattr(self, "instance_type", None), serialize),
|
|
219
|
+
("suggestedWarnings" if serialize else "suggested_warnings"): _to_legacy_value(getattr(self, "suggested_warnings", None), serialize),
|
|
220
|
+
("userInSameInstance" if serialize else "user_in_same_instance"): _to_legacy_value(getattr(self, "user_in_same_instance", None), serialize),
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
def __openapi_generator_modern_projection(self) -> Dict[str, Any]:
|
|
224
|
+
"""Return the dictionary representation of the model using alias.
|
|
225
|
+
|
|
226
|
+
This has the following differences from calling pydantic's
|
|
227
|
+
`self.model_dump(by_alias=True)`:
|
|
228
|
+
|
|
229
|
+
* `None` is only added to the output dict for nullable fields that
|
|
230
|
+
were set at model initialization. Other fields with value `None`
|
|
231
|
+
are ignored.
|
|
232
|
+
"""
|
|
233
|
+
excluded_fields: Set[str] = set([
|
|
234
|
+
])
|
|
235
|
+
|
|
236
|
+
_dict = self.model_dump(
|
|
237
|
+
by_alias=True,
|
|
238
|
+
exclude=excluded_fields,
|
|
239
|
+
exclude_none=True,
|
|
240
|
+
)
|
|
241
|
+
return _dict
|
|
242
|
+
|
|
243
|
+
setattr(
|
|
244
|
+
to_dict,
|
|
245
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
246
|
+
__openapi_generator_modern_projection,
|
|
247
|
+
)
|
|
248
|
+
setattr(
|
|
249
|
+
__openapi_generator_modern_projection,
|
|
250
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
251
|
+
to_dict,
|
|
252
|
+
)
|
|
253
|
+
del __openapi_generator_modern_projection
|
|
254
|
+
|
|
255
|
+
@classmethod
|
|
256
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
257
|
+
"""Create an instance of SubmitModerationReportRequestDetails from a dict"""
|
|
258
|
+
if obj is None:
|
|
259
|
+
return None
|
|
260
|
+
|
|
261
|
+
if not isinstance(obj, dict):
|
|
262
|
+
return cls.model_validate(obj)
|
|
263
|
+
|
|
264
|
+
obj = _cast(
|
|
265
|
+
Dict[str, Any],
|
|
266
|
+
cls.__preprocess_input_names(
|
|
267
|
+
obj,
|
|
268
|
+
remove_hidden_storage_names=True,
|
|
269
|
+
),
|
|
270
|
+
)
|
|
271
|
+
|
|
272
|
+
_obj = cls.model_validate({
|
|
273
|
+
"fileId": obj.get("fileId"),
|
|
274
|
+
"holderId": obj.get("holderId"),
|
|
275
|
+
"imageType": obj.get("imageType"),
|
|
276
|
+
"instanceAgeGated": obj.get("instanceAgeGated"),
|
|
277
|
+
"instanceType": obj.get("instanceType"),
|
|
278
|
+
"suggestedWarnings": obj.get("suggestedWarnings"),
|
|
279
|
+
"userInSameInstance": obj.get("userInSameInstance")
|
|
280
|
+
})
|
|
281
|
+
return _obj
|
|
282
|
+
|
|
283
|
+
|
|
@@ -0,0 +1,301 @@
|
|
|
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, StrictFloat, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union, cast as _cast
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from vrchatapi.models.subscription_period import SubscriptionPeriod
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
from pydantic_core import to_jsonable_python
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
_OPENAPI_GENERATOR_TO_DICT = "_openapi_generator_to_dict"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _get_openapi_to_dict(value: Any) -> Any:
|
|
34
|
+
# Reciprocal function references preserve inherited generated methods
|
|
35
|
+
# without reserving model member names. Checking both directions also
|
|
36
|
+
# rejects overrides whose decorators copy function attributes.
|
|
37
|
+
to_dict = getattr(value, "to_dict", None)
|
|
38
|
+
type_to_dict = getattr(type(value), "to_dict", None)
|
|
39
|
+
if (
|
|
40
|
+
not callable(to_dict)
|
|
41
|
+
or getattr(to_dict, "__func__", None) is not type_to_dict
|
|
42
|
+
):
|
|
43
|
+
return None
|
|
44
|
+
|
|
45
|
+
openapi_to_dict = getattr(
|
|
46
|
+
type_to_dict, _OPENAPI_GENERATOR_TO_DICT, None
|
|
47
|
+
)
|
|
48
|
+
if (
|
|
49
|
+
not callable(openapi_to_dict)
|
|
50
|
+
or getattr(
|
|
51
|
+
openapi_to_dict,
|
|
52
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
53
|
+
None,
|
|
54
|
+
) is not type_to_dict
|
|
55
|
+
):
|
|
56
|
+
return None
|
|
57
|
+
return openapi_to_dict
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def _to_legacy_item(value: Any, serialize: bool) -> Any:
|
|
61
|
+
to_dict = getattr(value, "to_dict", None)
|
|
62
|
+
if _get_openapi_to_dict(value) is not None and callable(to_dict):
|
|
63
|
+
return to_dict(serialize=serialize)
|
|
64
|
+
if callable(to_dict):
|
|
65
|
+
return to_dict()
|
|
66
|
+
return value
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def _to_legacy_value(value: Any, serialize: bool) -> Any:
|
|
70
|
+
# python-legacy converted only immediate list elements or dictionary values:
|
|
71
|
+
# https://github.com/OpenAPITools/openapi-generator/blob/c84b949df1a9ec04ba75989cb49b45c940c2f694/modules/openapi-generator/src/main/resources/python-legacy/model.mustache#L203-L231
|
|
72
|
+
if isinstance(value, list):
|
|
73
|
+
return [_to_legacy_item(item, serialize) for item in value]
|
|
74
|
+
if isinstance(value, dict):
|
|
75
|
+
return {
|
|
76
|
+
key: _to_legacy_item(item, serialize)
|
|
77
|
+
for key, item in value.items()
|
|
78
|
+
}
|
|
79
|
+
return _to_legacy_item(value, serialize)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def _to_openapi_value(value: Any) -> Any:
|
|
83
|
+
if isinstance(value, list):
|
|
84
|
+
return [_to_openapi_value(item) for item in value]
|
|
85
|
+
if isinstance(value, dict):
|
|
86
|
+
return {key: _to_openapi_value(item) for key, item in value.items()}
|
|
87
|
+
|
|
88
|
+
to_openapi_dict = _get_openapi_to_dict(value)
|
|
89
|
+
if to_openapi_dict is not None:
|
|
90
|
+
return to_openapi_dict(value)
|
|
91
|
+
|
|
92
|
+
to_dict = getattr(value, "to_dict", None)
|
|
93
|
+
if callable(to_dict):
|
|
94
|
+
return to_dict()
|
|
95
|
+
return value
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
class Subscription(BaseModel):
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
Attributes:
|
|
103
|
+
openapi_types (dict): The key is attribute name
|
|
104
|
+
and the value is attribute type.
|
|
105
|
+
attribute_map (dict): The key is attribute name
|
|
106
|
+
and the value is json key in definition.
|
|
107
|
+
""" # noqa: E501
|
|
108
|
+
amount: Optional[Union[StrictFloat, StrictInt]] = None
|
|
109
|
+
apple_product_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, validation_alias=AliasChoices("appleProductId", "apple_product_id"), serialization_alias="appleProductId")
|
|
110
|
+
description: Optional[StrictStr] = None
|
|
111
|
+
google_plan_id: Optional[StrictStr] = Field(default=None, validation_alias=AliasChoices("googlePlanId", "google_plan_id"), serialization_alias="googlePlanId")
|
|
112
|
+
google_product_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, validation_alias=AliasChoices("googleProductId", "google_product_id"), serialization_alias="googleProductId")
|
|
113
|
+
id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None
|
|
114
|
+
oculus_sku: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, validation_alias=AliasChoices("oculusSku", "oculus_sku"), serialization_alias="oculusSku")
|
|
115
|
+
period: Optional[SubscriptionPeriod] = None
|
|
116
|
+
pico_sku: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, validation_alias=AliasChoices("picoSku", "pico_sku"), serialization_alias="picoSku")
|
|
117
|
+
steam_item_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, validation_alias=AliasChoices("steamItemId", "steam_item_id"), serialization_alias="steamItemId")
|
|
118
|
+
tier: Optional[StrictInt] = None
|
|
119
|
+
openapi_types: ClassVar[Dict[str, str]] = {
|
|
120
|
+
"amount": "float",
|
|
121
|
+
"apple_product_id": "str",
|
|
122
|
+
"description": "str",
|
|
123
|
+
"google_plan_id": "str",
|
|
124
|
+
"google_product_id": "str",
|
|
125
|
+
"id": "str",
|
|
126
|
+
"oculus_sku": "str",
|
|
127
|
+
"period": "SubscriptionPeriod",
|
|
128
|
+
"pico_sku": "str",
|
|
129
|
+
"steam_item_id": "str",
|
|
130
|
+
"tier": "int"
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
attribute_map: ClassVar[Dict[str, str]] = {
|
|
134
|
+
"amount": "amount",
|
|
135
|
+
"apple_product_id": "appleProductId",
|
|
136
|
+
"description": "description",
|
|
137
|
+
"google_plan_id": "googlePlanId",
|
|
138
|
+
"google_product_id": "googleProductId",
|
|
139
|
+
"id": "id",
|
|
140
|
+
"oculus_sku": "oculusSku",
|
|
141
|
+
"period": "period",
|
|
142
|
+
"pico_sku": "picoSku",
|
|
143
|
+
"steam_item_id": "steamItemId",
|
|
144
|
+
"tier": "tier"
|
|
145
|
+
}
|
|
146
|
+
__properties: ClassVar[List[str]] = ["amount", "appleProductId", "description", "googlePlanId", "googleProductId", "id", "oculusSku", "period", "picoSku", "steamItemId", "tier"]
|
|
147
|
+
|
|
148
|
+
@classmethod
|
|
149
|
+
def __preprocess_input_names(
|
|
150
|
+
cls,
|
|
151
|
+
obj: Any,
|
|
152
|
+
remove_hidden_storage_names: bool = True,
|
|
153
|
+
) -> Any:
|
|
154
|
+
if not isinstance(obj, _Mapping):
|
|
155
|
+
return obj
|
|
156
|
+
obj = dict(obj)
|
|
157
|
+
if "appleProductId" not in obj and "apple_product_id" in obj:
|
|
158
|
+
obj["appleProductId"] = obj["apple_product_id"]
|
|
159
|
+
obj.pop("apple_product_id", None)
|
|
160
|
+
if "googlePlanId" not in obj and "google_plan_id" in obj:
|
|
161
|
+
obj["googlePlanId"] = obj["google_plan_id"]
|
|
162
|
+
obj.pop("google_plan_id", None)
|
|
163
|
+
if "googleProductId" not in obj and "google_product_id" in obj:
|
|
164
|
+
obj["googleProductId"] = obj["google_product_id"]
|
|
165
|
+
obj.pop("google_product_id", None)
|
|
166
|
+
if "oculusSku" not in obj and "oculus_sku" in obj:
|
|
167
|
+
obj["oculusSku"] = obj["oculus_sku"]
|
|
168
|
+
obj.pop("oculus_sku", None)
|
|
169
|
+
if "picoSku" not in obj and "pico_sku" in obj:
|
|
170
|
+
obj["picoSku"] = obj["pico_sku"]
|
|
171
|
+
obj.pop("pico_sku", None)
|
|
172
|
+
if "steamItemId" not in obj and "steam_item_id" in obj:
|
|
173
|
+
obj["steamItemId"] = obj["steam_item_id"]
|
|
174
|
+
obj.pop("steam_item_id", None)
|
|
175
|
+
return obj
|
|
176
|
+
|
|
177
|
+
model_config = ConfigDict(
|
|
178
|
+
validate_by_name=True,
|
|
179
|
+
validate_by_alias=True,
|
|
180
|
+
validate_assignment=True,
|
|
181
|
+
extra="forbid",
|
|
182
|
+
protected_namespaces=(),
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def to_str(self) -> str:
|
|
187
|
+
"""Returns the string representation of the model"""
|
|
188
|
+
return pprint.pformat(self.to_dict())
|
|
189
|
+
|
|
190
|
+
def __repr__(self) -> str:
|
|
191
|
+
"""For print and pprint"""
|
|
192
|
+
return self.to_str()
|
|
193
|
+
|
|
194
|
+
def __eq__(self, other: object) -> bool:
|
|
195
|
+
"""Returns true if both objects are equal"""
|
|
196
|
+
if not isinstance(other, Subscription):
|
|
197
|
+
return False
|
|
198
|
+
|
|
199
|
+
return self.to_dict() == other.to_dict()
|
|
200
|
+
|
|
201
|
+
def __ne__(self, other: object) -> bool:
|
|
202
|
+
"""Returns true if both objects are not equal"""
|
|
203
|
+
if not isinstance(other, Subscription):
|
|
204
|
+
return True
|
|
205
|
+
|
|
206
|
+
return not (self == other)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def to_json(self) -> str:
|
|
210
|
+
"""Returns the JSON representation of the model using alias"""
|
|
211
|
+
to_openapi_dict = _get_openapi_to_dict(self)
|
|
212
|
+
if to_openapi_dict is not None:
|
|
213
|
+
return json.dumps(to_jsonable_python(to_openapi_dict(self)))
|
|
214
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
215
|
+
|
|
216
|
+
@classmethod
|
|
217
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
218
|
+
"""Create an instance of Subscription from a JSON string"""
|
|
219
|
+
return cls.from_dict(json.loads(json_str))
|
|
220
|
+
|
|
221
|
+
def to_dict(self, serialize: bool = False) -> Dict[str, Any]:
|
|
222
|
+
"""Return all declared model fields using public or wire names."""
|
|
223
|
+
return {
|
|
224
|
+
("amount" if serialize else "amount"): _to_legacy_value(getattr(self, "amount", None), serialize),
|
|
225
|
+
("appleProductId" if serialize else "apple_product_id"): _to_legacy_value(getattr(self, "apple_product_id", None), serialize),
|
|
226
|
+
("description" if serialize else "description"): _to_legacy_value(getattr(self, "description", None), serialize),
|
|
227
|
+
("googlePlanId" if serialize else "google_plan_id"): _to_legacy_value(getattr(self, "google_plan_id", None), serialize),
|
|
228
|
+
("googleProductId" if serialize else "google_product_id"): _to_legacy_value(getattr(self, "google_product_id", None), serialize),
|
|
229
|
+
("id" if serialize else "id"): _to_legacy_value(getattr(self, "id", None), serialize),
|
|
230
|
+
("oculusSku" if serialize else "oculus_sku"): _to_legacy_value(getattr(self, "oculus_sku", None), serialize),
|
|
231
|
+
("period" if serialize else "period"): _to_legacy_value(getattr(self, "period", None), serialize),
|
|
232
|
+
("picoSku" if serialize else "pico_sku"): _to_legacy_value(getattr(self, "pico_sku", None), serialize),
|
|
233
|
+
("steamItemId" if serialize else "steam_item_id"): _to_legacy_value(getattr(self, "steam_item_id", None), serialize),
|
|
234
|
+
("tier" if serialize else "tier"): _to_legacy_value(getattr(self, "tier", None), serialize),
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
def __openapi_generator_modern_projection(self) -> Dict[str, Any]:
|
|
238
|
+
"""Return the dictionary representation of the model using alias.
|
|
239
|
+
|
|
240
|
+
This has the following differences from calling pydantic's
|
|
241
|
+
`self.model_dump(by_alias=True)`:
|
|
242
|
+
|
|
243
|
+
* `None` is only added to the output dict for nullable fields that
|
|
244
|
+
were set at model initialization. Other fields with value `None`
|
|
245
|
+
are ignored.
|
|
246
|
+
"""
|
|
247
|
+
excluded_fields: Set[str] = set([
|
|
248
|
+
])
|
|
249
|
+
|
|
250
|
+
_dict = self.model_dump(
|
|
251
|
+
by_alias=True,
|
|
252
|
+
exclude=excluded_fields,
|
|
253
|
+
exclude_none=True,
|
|
254
|
+
)
|
|
255
|
+
return _dict
|
|
256
|
+
|
|
257
|
+
setattr(
|
|
258
|
+
to_dict,
|
|
259
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
260
|
+
__openapi_generator_modern_projection,
|
|
261
|
+
)
|
|
262
|
+
setattr(
|
|
263
|
+
__openapi_generator_modern_projection,
|
|
264
|
+
_OPENAPI_GENERATOR_TO_DICT,
|
|
265
|
+
to_dict,
|
|
266
|
+
)
|
|
267
|
+
del __openapi_generator_modern_projection
|
|
268
|
+
|
|
269
|
+
@classmethod
|
|
270
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
271
|
+
"""Create an instance of Subscription from a dict"""
|
|
272
|
+
if obj is None:
|
|
273
|
+
return None
|
|
274
|
+
|
|
275
|
+
if not isinstance(obj, dict):
|
|
276
|
+
return cls.model_validate(obj)
|
|
277
|
+
|
|
278
|
+
obj = _cast(
|
|
279
|
+
Dict[str, Any],
|
|
280
|
+
cls.__preprocess_input_names(
|
|
281
|
+
obj,
|
|
282
|
+
remove_hidden_storage_names=True,
|
|
283
|
+
),
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
_obj = cls.model_validate({
|
|
287
|
+
"amount": obj.get("amount"),
|
|
288
|
+
"appleProductId": obj.get("appleProductId"),
|
|
289
|
+
"description": obj.get("description"),
|
|
290
|
+
"googlePlanId": obj.get("googlePlanId"),
|
|
291
|
+
"googleProductId": obj.get("googleProductId"),
|
|
292
|
+
"id": obj.get("id"),
|
|
293
|
+
"oculusSku": obj.get("oculusSku"),
|
|
294
|
+
"period": obj.get("period") if obj.get("period") is not None else SubscriptionPeriod.MONTH,
|
|
295
|
+
"picoSku": obj.get("picoSku"),
|
|
296
|
+
"steamItemId": obj.get("steamItemId"),
|
|
297
|
+
"tier": obj.get("tier")
|
|
298
|
+
})
|
|
299
|
+
return _obj
|
|
300
|
+
|
|
301
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
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 SubscriptionPeriod(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
SubscriptionPeriod
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
DAY = 'day'
|
|
30
|
+
HOUR = 'hour'
|
|
31
|
+
MONTH = 'month'
|
|
32
|
+
WEEK = 'week'
|
|
33
|
+
YEAR = 'year'
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def from_json(cls, json_str: str) -> Self:
|
|
37
|
+
"""Create an instance of SubscriptionPeriod from a JSON string"""
|
|
38
|
+
return cls(json.loads(json_str))
|
|
39
|
+
|
|
40
|
+
|